[GDBserver] Move arm-linux.o and arm-get-next-pcs.o to arch/
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-10-17 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
4 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5
6 2017-10-17 Yao Qi <yao.qi@linaro.org>
7
8 * configure.srv: Rename arm.o with arch/arm.o.
9
10 2017-10-17 Yao Qi <yao.qi@linaro.org>
11
12 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
13 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
14 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
15 (arch-i386.o, arch-amd64.o): Remove rules.
16 (arch/%.o): New rule.
17 Update POSTCOMPILE and COMPILE.pre.
18 * configure.ac: Invoke AC_CONFIG_COMMANDS.
19 * configure: Re-generated.
20 * configure.srv: Replace arch-i386.o with arch/i386.o.
21 Replace arch-amd64.o with arch/amd64.o.
22
23 2017-10-16 Yao Qi <yao.qi@linaro.org>
24
25 * configure: Regenerated.
26
27 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
28
29 * inferiors.h: (struct inferior_list): Remove.
30 (struct inferior_list_entry); Remove.
31 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
32 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
33 get_first_inferior): Remove.
34 (for_each_inferior, for_each_inferior_with_data, find_inferior,
35 find_inferior_id, find_inferior_in_random): Change signature.
36 * inferiors.c (all_threads): Change type to
37 std::list<thread_info *>.
38 (get_thread): Remove macro.
39 (find_inferior, find_inferior_id): Change signature, implement
40 using find_thread.
41 (find_inferior_in_random): Change signature, implement using
42 find_thread_in_random.
43 (for_each_inferior, for_each_inferior_with_data): Change
44 signature, implement using for_each_thread.
45 (add_inferior_to_list, remove_inferior): Remove.
46 (add_thread, get_first_thread, thread_of_pid,
47 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
48 (get_first_inferior, one_inferior_p, clear_inferior_list):
49 Remove.
50 (clear_inferiors, get_thread_process): Update.
51 * gdbthread.h: Include <list>.
52 (struct thread_info) <entry>: Remove field.
53 <id>: New field.
54 (all_threads): Change type to std::list<thread_info *>.
55 (get_first_inferior): Add doc.
56 (find_thread, for_each_thread, find_thread_in_random): New
57 functions.
58 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
59 * linux-arm-low.c (update_registers_callback): Update.
60 * linux-low.c (second_thread_of_pid_p): Update.
61 (kill_one_lwp_callback, linux_detach_lwp_callback,
62 delete_lwp_callback, status_pending_p_callback, same_lwp,
63 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
64 iterate_over_lwps, not_stopped_callback,
65 resume_stopped_resumed_lwps, count_events_callback,
66 select_singlestep_lwp_callback, select_event_lwp_callback,
67 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
68 suspend_and_send_sigstop_callback, wait_for_sigstop,
69 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
70 lwp_running, linux_set_resume_request, resume_status_pending_p,
71 need_step_over_p, start_step_over, linux_resume_one_thread,
72 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
73 reset_lwp_ptrace_options_callback): Update.
74 * linux-mips-low.c (update_watch_registers_callback): Update.
75 * regcache.c (regcache_invalidate_one, regcache_invalidate):
76 Update.
77 (free_register_cache_thread_one): Remove.
78 (regcache_release): Update.
79 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
80 handle_qxfer_threads_worker): Update.
81 (handle_query): Update, use list iterator.
82 (visit_actioned_threads, handle_pending_status,
83 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
84 clear_pending_status_callback, set_pending_status_callback,
85 find_status_pending_thread_callback, handle_status,
86 process_serial_event): Update.
87 * target.c (thread_search_callback): Update.
88 * thread-db.c (thread_db_get_tls_address): Update.
89 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
90 Update.
91 * win32-i386-low.c (update_debug_registers_callback): Update.
92 * win32-low.c (delete_thread_info, child_delete_thread,
93 continue_one_thread, suspend_one_thread,
94 get_child_debug_event): Adjust.
95
96 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
97
98 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
99 * inferiors.h: Include <list>.
100 (struct process_info) <entry>: Remove field.
101 <pid>: New field.
102 (pid_of): Change macro to function.
103 (ptid_of, lwpid_of): Remove macro.
104 (all_processes): Change type to std::list<process_info *>.
105 (ALL_PROCESSES): Remove macro.
106 (for_each_process, find_process): New function.
107 * inferiors.c (all_processes): Change type to
108 std::list<process_info *>.
109 (find_thread_process): Adjust.
110 (add_process): Likewise.
111 (remove_process): Likewise.
112 (find_process_pid): Likewise.
113 (get_first_process): Likewise.
114 (started_inferior_callback): Remove.
115 (have_started_inferiors_p): Adjust.
116 (attached_inferior_callback): Remove.
117 (have_attached_inferiors_p): Adjust.
118 * linux-low.c (check_zombie_leaders): Likewise.
119 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
120 (x86_linux_update_xmltarget): Adjust.
121 * server.c (handle_query): Likewise.
122 (gdb_reattached_process): Remove.
123 (handle_status): Adjust.
124 (kill_inferior_callback): Likewise.
125 (detach_or_kill_inferior): Remove.
126 (print_started_pid): Likewise.
127 (print_attached_pid): Likewise.
128 (detach_or_kill_for_exit): Update.
129 (process_serial_event): Likewise.
130 * linux-arm-low.c (arm_new_fork): Likewise.
131
132 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
133
134 * dll.h: Include <list>.
135 (struct dll_info): Add constructor.
136 <entry>: Remove field.
137 (all_dlls): Change type to std::list<dll_info>.
138 * dll.c: Include <algorithm>.
139 (get_dll): Remove macro.
140 (all_dlls): Change type to std::list<dll_info *>.
141 (free_one_dll): Remove.
142 (match_dll): Likewise.
143 (loaded_dll): Adjust.
144 (unloaded_dll): Adjust to all_dlls type change, use
145 std::find_if. Inline code from match_dll.
146 (clear_dlls): Adjust to all_dlls type change.
147 * server.c (emit_dll_description): Remove.
148 (handle_qxfer_libraries): Adjust to all_dlls type change,
149 integrate emit_dll_description's functionality.
150
151 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
152
153 * linux-low.h (struct linux_target_ops) <delete_process>: New
154 field.
155 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
156 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
157 (struct linux_target_ops): Add delete_process callback.
158 * linux-arm-low.c (arm_delete_process): New.
159 (struct linux_target_ops): Add delete_process callback.
160 * linux-bfin-low.c (struct linux_target_ops): Likewise.
161 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
162 * linux-m32r-low.c (struct linux_target_ops): Likewise.
163 * linux-mips-low.c (mips_linux_delete_process): New.
164 (struct linux_target_ops): Add delete_process callback.
165 * linux-ppc-low.c (struct linux_target_ops): Likewise.
166 * linux-s390-low.c (struct linux_target_ops): Likewise.
167 * linux-sh-low.c (struct linux_target_ops): Likewise.
168 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
169 * linux-tile-low.c (struct linux_target_ops): Likewise.
170 * linux-x86-low.c (x86_linux_delete_process): New.
171 (struct linux_target_ops): Add delete_process callback.
172 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
173
174 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
175
176 * linux-aarch64-low.c (the_low_target): Add thread delete
177 callback.
178 * linux-arm-low.c (arm_delete_thread): New function.
179 (the_low_target): Add thread delete callback.
180 * linux-bfin-low.c (the_low_target): Likewise.
181 * linux-crisv32-low.c (the_low_target): Likewise.
182 * linux-low.c (delete_lwp): Invoke delete_thread callback if
183 set.
184 * linux-low.h (struct linux_target_ops) <delete_thread>: New
185 field.
186 * linux-m32r-low.c (the_low_target): Add thread delete callback.
187 * linux-mips-low.c (mips_linux_delete_thread): New function.
188 (the_low_target): Add thread delete callback.
189 * linux-ppc-low.c (the_low_target): Likewise.
190 * linux-s390-low.c (the_low_target): Likewise.
191 * linux-sh-low.c (the_low_target): Likewise.
192 * linux-tic6x-low.c (the_low_target): Likewise.
193 * linux-tile-low.c (the_low_target): Likewise.
194 * linux-x86-low.c (the_low_target): Likewise.
195 * linux-xtensa-low.c (the_low_target): Likewise.
196
197 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
198
199 * win32-low.c: Include "common-inferior.h".
200
201 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
202
203 * inferiors.c (set_inferior_cwd): New function.
204 * server.c (handle_general_set): Handle QSetWorkingDir packet.
205 (handle_query): Inform that QSetWorkingDir is supported.
206 * win32-low.c (create_process): Pass the inferior's cwd to
207 CreateProcess.
208
209 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
210
211 * inferiors.c (current_inferior_cwd): New global variable.
212 (get_inferior_cwd): New function.
213 * inferiors.h (struct process_info) <cwd>: New field.
214
215 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
216
217 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
218 (OBS): Add gdb_tilde_expand.o.
219
220 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
221
222 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
223 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
224
225 2017-09-29 Pedro Alves <palves@redhat.com>
226
227 * ax.c (gdb_parse_agent_expr): Constify.
228 * ax.h (gdb_parse_agent_expr): Constify.
229 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
230 Constify.
231 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
232 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
233 * remote-utils.h (read_ptid): Constify.
234 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
235 (process_point_options, process_serial_event): Constify.
236 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
237 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
238 (cmd_qtbuffer): Constify.
239
240 2017-09-29 Pedro Alves <palves@redhat.com>
241
242 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
243 fails.
244
245 2017-09-29 Pedro Alves <palves@redhat.com>
246
247 * linux-low.c (handle_extended_wait): Pass parent thread instead
248 of process to thread_db_notice_clone.
249 * linux-low.h (thread_db_notice_clone): Replace parent process
250 parameter with parent thread parameter.
251 * thread-db.c (find_one_thread): Add comment.
252 (thread_db_notice_clone): Replace parent process parameter with
253 parent thread parameter. Temporarily switch to the parent thread.
254
255 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
256
257 * gdbthread.h: Include "common-gdbthread.h".
258 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
259 "if" when validating the ptid.
260 * remote-utils.c: Include "gdbthread.h".
261 (prepare_resume_reply): Use "switch_to_thread".
262 * target.c (done_accessing_memory): Likewise.
263
264 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
265
266 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
267 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
268 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
269 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
270 s390x-gs-linux64-ipa.o to ipa_obj.
271 * linux-s390-low.c (HWCAP_S390_GS): New define.
272 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
273 New functions.
274 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
275 (s390_arch_setup): Check for guarded-storage support and choose
276 appropriate tdesc.
277 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
278 init_registers_s390x_gs_linux64.
279 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
280 enum value.
281 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
282 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
283
284 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
285
286 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
287
288 2017-09-21 Kevin Buettner <kevinb@redhat.com>
289
290 * linux-low.h (struct lwp_info): Add new field, thread_handle.
291 (thread_db_thread_handle): Declare.
292 * linux-low.c (linux_target_ops): Initialize thread_handle.
293 * server.c (handle_qxfer_threads_worker): Add support for
294 "handle" attribute.
295 * target.h (struct target_ops): Add new function pointer,
296 thread_handle.
297 (target_thread_handle): Define.
298 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
299 field in lwp.
300 (thread_db_thread_handle): New function.
301
302 2017-09-21 Kevin Buettner <kevinb@redhat.com>
303
304 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
305 * linux-low.h (thread_db_notice_clone): Declare.
306 * thread-db.c (thread_db_notice_clone): New function.
307
308 2017-09-21 Pedro Alves <palves@redhat.com>
309
310 * server.c (gdb_read_memory, handle_status, process_serial_event)
311 (handle_serial_event, handle_target_event): Adjust to
312 set_desired_thread prototype change.
313 * target.c (set_desired_thread): Remove 'use_general' parameter
314 and adjust.
315 * target.h (set_desired_thread): Remove 'use_general' parameter.
316
317 2017-09-20 Tom Tromey <tom@tromey.com>
318
319 * target.c (target_terminal::terminal_state): Define.
320 (target_terminal::init): Rename from target_terminal_init.
321 (target_terminal::inferior): Rename from
322 target_terminal_inferior.
323 (target_terminal::ours): Rename from target_terminal_ours.
324 (target_terminal::ours_for_output, target_terminal::info): New.
325
326 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
327
328 * server.c (accumulate_file_name_length): Remove.
329 (emit_dll_description): Adjust to std::string change.
330 (handle_qxfer_libraries): Use std::string to hold document.
331
332 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
333
334 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
335 return type of xml_escape_text.
336 * server.c (emit_dll_description): Likewise.
337
338 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
339
340 * server.c (captured_main): Accept argument for --selftest.
341 Update run_tests call.
342 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
343 when registering selftests.
344
345 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
346
347 * regcache.c (get_thread_regcache): Update code to use "std::vector"
348 instead of "VEC" for "target_desc.reg_defs".
349 (regcache_cpy): Likewise.
350 (registers_to_string): Likewise.
351 (registers_from_string): Likewise.
352 (find_regno): Likewise.
353 (supply_regblock): Likewise.
354 (regcache_raw_read_unsigned): Likewise.
355 * tdesc.c (init_target_desc): Likewise.
356 (tdesc_create_reg): Likewise.
357 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
358 (struct target_desc) <reg_defs>: Convert to "std::vector".
359 (target_desc): Do not initialize "reg_defs".
360 (~target_desc): Update code to use "std::vector" instead of "VEC"
361 for "target_desc.reg_defs".
362 (operator==): Likewise.
363
364 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
365
366 * inferiors.h (thread_to_gdb_id): Remove.
367 * inferiors.c (thread_to_gdb_id): Remove.
368 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
369 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
370 lynx_store_registers, lynx_read_memory, lynx_write_memory):
371 Likewise.
372 * nto-low.c (nto_fetch_registers, nto_store_registers,
373 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
374
375 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
376
377 * inferiors.h (gdb_id_to_thread_id): Remove.
378 * inferiors.c (gdb_id_to_thread_id): Remove.
379 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
380 removal. Move pid declaration closer to where it's used.
381
382 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
383
384 * server.c (handle_detach): New function.
385 (process_serial_event): Move code out, call handle_detach.
386
387 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
388
389 * server.c (require_running): Rename to ...
390 (require_running_or_return): ... this ...
391 (require_running_or_break): ... and this.
392 (handle_query, process_serial_event): Adjust.
393
394 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
395
396 * linux-low.c (linux_set_resume_request): Remove unused
397 variables.
398
399 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
400
401 * server.c (first_thread_of): Remove.
402 (process_serial_event): Replace usage of first_thread_of with
403 find_any_thread_of_pid.
404 * tracepoint.c (same_process_p): Remove.
405 (gdb_agent_about_to_close): Replace usage of same_process_p with
406 find_any_thread_of_pid.
407 * linux-x86-low.c (same_process_callback): Remove.
408 (x86_arch_setup_process_callback): Replace usage of
409 same_process_callback with find_any_thread_of_pid.
410 * thread-db.c (any_thread_of): Remove.
411 (switch_to_process): Replace usage of any_thread_of with
412 find_any_thread_of_pid.
413 * inferiors.c (thread_pid_matches_callback): Remove.
414 (find_thread_process): Adjust to use find_any_thread_of_pid.
415
416 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
417
418 * regcache.c (get_thread_regcache): Guard calls to "memset"
419 with "!VEC_empty".
420
421 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
422
423 * linux-low.c (handle_extended_wait): Use
424 "allocate_target_description" instead of "XNEW".
425 * linux-x86-low.c (initialize_low_arch): Likewise.
426
427 2017-09-05 Yao Qi <yao.qi@linaro.org>
428
429 * configure.srv (srv_i386_regobj): Remove.
430 (srv_amd64_regobj): Remove.
431 (srv_regobj): Set it to "" for x86 non-linux targets.
432 * linux-x86-tdesc.c (i386_linux_read_description):
433 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
434 (init_registers_i386): Remove the declaration.
435 (tdesc_i386): Remove the declaration.
436 (lynx_i386_arch_setup): Call i386_create_target_description.
437 * nto-x86-low.c: Likewise.
438 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
439 [!__x86_64__]: include arch/i386.h.
440 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
441
442 2017-09-05 Yao Qi <yao.qi@linaro.org>
443
444 * configure.srv (srv_amd64_linux_xmlfiles): Remove
445 i386/amd64-XXX-linux from it.
446
447 2017-09-05 Yao Qi <yao.qi@linaro.org>
448
449 * configure.srv: Empty srv_amd64_linux_regobj if $development is
450 false.
451 (ipa_amd64_linux_regobj): Remove.
452 (ipa_x32_linux_regobj): Remove.
453
454 2017-09-05 Yao Qi <yao.qi@linaro.org>
455
456 * Makefile.in (arch-amd64.o): New rule.
457 * configure.srv: Append arch-amd64.o.
458 * linux-amd64-ipa.c: Include common/x86-xstate.h.
459 (get_ipa_tdesc): Call amd64_linux_read_description.
460 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
461 and init_registers_amd64_XXX.
462 * linux-x86-low.c (x86_linux_read_description): Call
463 amd64_linux_read_description.
464 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
465 (initialize_low_arch): Don't call init_registers_x32_XXX and
466 init_registers_amd64_XXX.
467 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
468 and tdesc_amd64_XXX.
469 [__x86_64__] (amd64_tdesc_test): New function.
470 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
471 and init_registers_amd64_XXX.
472 * linux-x86-tdesc.c: Include arch/amd64.h.
473 (xcr0_to_tdesc_idx): New function.
474 (i386_linux_read_description): New function.
475 (amd64_get_ipa_tdesc_idx): New function.
476 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
477 (amd64_get_ipa_tdesc): Declare.
478
479 2017-09-05 Yao Qi <yao.qi@linaro.org>
480
481 * configure.srv (srv_i386_linux_xmlfiles): Remove
482 i386/i386-XXX-linux.xml from it.
483
484 2017-09-05 Yao Qi <yao.qi@linaro.org>
485
486 * configure.srv: Set srv_i386_linux_regobj empty if $development
487 is false.
488 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
489 initialize_low_tdesc.
490 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
491 with #if initialize_low_tdesc.
492 * linux-x86-tdesc-selftest.c: New file.
493 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
494
495 2017-09-05 Yao Qi <yao.qi@linaro.org>
496
497 * Makefile.in (arch-i386.o): New rule.
498 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
499 (x86_64-*-linux*): Likewise.
500 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
501 include arch/i386.h.
502 (i386_linux_read_description): Remove code and call
503 i386_create_target_description.
504 * tdesc.c (allocate_target_description): New function.
505 * tdesc.h (set_tdesc_architecture): Remove declaration.
506 (set_tdesc_osabi): Likewise.
507
508 2017-09-05 Yao Qi <yao.qi@linaro.org>
509
510 * linux-x86-tdesc.c: Don't include <inttypes.h>.
511 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
512 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
513 .xmltarget.
514 * server.c (get_features_xml): Call tdesc_get_features_xml.
515 * tdesc.c (set_tdesc_architecture): New function.
516 (set_tdesc_osabi): New function.
517 (tdesc_get_features_xml): New function.
518 (tdesc_create_feature): Add an argument.
519 * tdesc.h (struct target_desc) <features>: New field.
520 <arch, osabi>: New field.
521 (~target_desc): xfree features, arch, and osabi.
522 (target_desc::oerator==): Don't compare .xmltarget.
523 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
524 (set_tdesc_osabi): Likewise.
525 (tdesc_get_features_xml): Likewise.
526
527 2017-09-05 Yao Qi <yao.qi@linaro.org>
528
529 * linux-x86-tdesc.c: Include selftest.h.
530 (i386_tdesc_test): New function.
531 (initialize_low_tdesc): Call selftests::register_test.
532 * tdesc.h: Include regdef.h.
533 (target_desc): Override operator == and !=.
534
535 2017-09-05 Yao Qi <yao.qi@linaro.org>
536
537 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
538 (ipa_obj): Likewise.
539 * linux-i386-ipa.c: Include common/x86-xstate.h
540 (get_ipa_tdesc): Call i386_linux_read_description.
541 (initialize_low_tracepoint): Don't call init_registers_XXX
542 functions, call initialize_low_tdesc instead.
543 * linux-x86-low.c (x86_linux_read_description): Call
544 i386_linux_read_description.
545 (initialize_low_arch): Don't call init_registers_i386_XXX
546 functions, call initialize_low_tdesc.
547 * linux-x86-tdesc.c: New file.
548 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
549 (i386_get_ipa_tdesc_idx): Declare.
550 (i386_get_ipa_tdesc): Declare.
551 (initialize_low_tdesc): Declare.
552
553 2017-09-05 Yao Qi <yao.qi@linaro.org>
554
555 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
556 instead of 0.
557
558 2017-09-05 Yao Qi <yao.qi@linaro.org>
559
560 * Makefile.in (IPA_OBJS): Add vec-ipa.o
561 * regcache.c (get_thread_regcache): Use VEC_length.
562 (init_register_cache): Likewise.
563 (regcache_cpy): Likewise.
564 (registers_to_string): Iterate reg_defs via VEC_iterate.
565 (find_regno): Likewise.
566 (find_register_by_number): Use VEC_index.
567 (register_size): Call find_register_by_number.
568 (register_data): Call find_register_by_number.
569 (supply_regblock): Use VEC_length.
570 (regcache_raw_read_unsigned): Likewise.
571 * tdesc.c (init_target_desc): Iterate reg_defs via
572 VEC_iterate.
573 (default_description): Update initializer.
574 (copy_target_description): Don't update field num_registers.
575 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
576 <num_registers>: Remove.
577
578 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
579
580 * Makefile.in (.SECONDARY): Define target.
581
582 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
583
584 * linux-low.c (linux_wait_1): Adjust.
585 * server.c (queue_stop_reply_callback): Adjust.
586
587 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
588
589 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
590 QEnvironmentUnset and QEnvironmentReset packets.
591 (handle_query): Inform remote that QEnvironmentHexEncoded,
592 QEnvironmentUnset and QEnvironmentReset are supported.
593
594 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
595
596 * inferiors.h (inferior_target_data): Rename to ...
597 (thread_target_data): ... this.
598 (inferior_regcache_data): Rename to ...
599 (thread_regcache_data): ... this.
600 (set_inferior_regcache_data): Rename to ...
601 (set_thread_regcache_data): ... this.
602 * inferiors.c (inferior_target_data): Rename to ...
603 (thread_target_data): ... this.
604 (inferior_regcache_data): Rename to ...
605 (thread_regcache_data): ... this.
606 (set_inferior_regcache_data): Rename to ...
607 (set_thread_regcache_data): ... this.
608 (free_one_thread): Update.
609 * linux-low.h (get_thread_lwp): Update.
610 * regcache.c (get_thread_regcache): Update.
611 (regcache_invalidate_thread): Update.
612 (free_register_cache_thread): Update.
613 * win32-i386-low.c (update_debug_registers_callback): Update.
614 (win32_get_current_dr): Update.
615 * win32-low.c (thread_rec): Update.
616 (delete_thread_info): Update.
617 (continue_one_thread): Update.
618 (suspend_one_thread): Update.
619
620 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
621
622 * inferiors.c (set_inferior_target_data): Remove.
623 * inferiors.h (set_inferior_target_data): Remove.
624
625 2017-08-18 Yao Qi <yao.qi@linaro.org>
626
627 * Makefile.in (OBS): Add selftest.o.
628 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
629 * configure, config.in: Re-generated.
630 * server.c: Include common/sefltest.h.
631 (captured_main): Handle option --selftest.
632
633 2017-08-09 Yao Qi <yao.qi@linaro.org>
634
635 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
636 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
637 i386-avx-mpx.o and i386-mmx.o.
638 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
639 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
640 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
641 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
642 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
643 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
644 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
645 i386/amd64-avx-mpx.xml.
646
647 2017-08-09 Yao Qi <yao.qi@linaro.org>
648
649 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
650 and x32-avx-avx512.o.
651 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
652 i386/x32-avx-avx512.xml.
653
654 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
655
656 * tracepoint.h (enum class fast_tpoint_collect_result): New
657 enumeration.
658 (fast_tracepoint_collecting): Change return type to
659 fast_tpoint_collect_result.
660 * tracepoint.c (fast_tracepoint_collecting): Likewise.
661 * linux-low.h: Include tracepoint.h.
662 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
663 fast_tpoint_collect_result.
664 * linux-low.c (handle_tracepoints): Adjust.
665 (linux_fast_tracepoint_collecting): Change return type to
666 fast_tpoint_collect_result.
667 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
668 linux_wait_1, stuck_in_jump_pad_callback,
669 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
670 proceed_one_lwp): Adjust to type change.
671
672 2017-07-10 Yao Qi <yao.qi@linaro.org>
673
674 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
675
676 2017-06-29 Yao Qi <yao.qi@linaro.org>
677
678 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
679 Remove.
680 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
681
682 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
683
684 * Makefile.in (IPA_OBJS): Sort and format one item per line.
685
686 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
687
688 * linux-low.c (linux_create_inferior): Adjust code to access the
689 environment information via 'gdb_environ' class.
690 * lynx-low.c (lynx_create_inferior): Likewise.
691 * server.c (our_environ): Make it an instance of 'gdb_environ'.
692 (get_environ): Return a pointer to 'our_environ'.
693 (captured_main): Initialize 'our_environ'.
694 * server.h (get_environ): Adjust prototype.
695 * spu-low.c (spu_create_inferior): Adjust code to access the
696 environment information via 'gdb_environ' class.
697
698 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
699
700 * linux-low.c (linux_read_memory, linux_write_memory): Remove
701 usage of "register" keyword.
702
703 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
704
705 * configure: Re-generate.
706
707 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
708
709 * configure: Re-generate.
710
711 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
712
713 * Makefile.in (COMPILE.pre): Add "-x c++".
714
715 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
716
717 * fork-child.c: Conditionally include <signal.h>.
718
719 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
720
721 * server.c (handle_general_set): Handle new packet
722 "QStartupWithShell".
723 (handle_query): Add "QStartupWithShell" to the list of supported
724 packets.
725 (gdbserver_usage): Add help text explaining the
726 new "--startup-with-shell" and "--no-startup-with-shell" CLI
727 options.
728 (captured_main): Recognize and act upon the presence of the new
729 CLI options.
730
731 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
732 Pedro Alves <palves@redhat.com>
733
734 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
735 * configure: Regenerate.
736 * configure.srv (srv_linux_obj): Add "fork-child.o" and
737 "fork-inferior.o".
738 (i[34567]86-*-lynxos*): Likewise.
739 (spu*-*-*): Likewise.
740 * fork-child.c: New file.
741 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
742 and "environ.h".
743 (linux_ptrace_fun): New function.
744 (linux_create_inferior): Adjust function prototype to reflect
745 change on "target.h". Adjust function code to use
746 "fork_inferior".
747 (linux_request_interrupt): Delete "signal_pid".
748 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
749 (lynx_ptrace_fun): New function.
750 (lynx_create_inferior): Adjust function prototype to reflect
751 change on "target.h". Adjust function code to use
752 "fork_inferior".
753 * nto-low.c (nto_create_inferior): Adjust function prototype and
754 code to reflect change on "target.h". Update comments.
755 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
756 "common-terminal.h" and "environ.h".
757 (terminal_fd): Moved to fork-child.c.
758 (old_foreground_pgrp): Likewise.
759 (restore_old_foreground_pgrp): Likewise.
760 (last_status): Make it global.
761 (last_ptid): Likewise.
762 (our_environ): New variable.
763 (startup_with_shell): Likewise.
764 (program_name): Likewise.
765 (program_argv): Rename to...
766 (program_args): ...this.
767 (wrapper_argv): New variable.
768 (start_inferior): Delete function.
769 (get_exec_wrapper): New function.
770 (get_exec_file): Likewise.
771 (get_environ): Likewise.
772 (prefork_hook): Likewise.
773 (post_fork_inferior): Likewise.
774 (postfork_hook): Likewise.
775 (postfork_child_hook): Likewise.
776 (handle_v_run): Update code to deal with arguments coming from the
777 remote host. Update calls from "start_inferior" to
778 "create_inferior".
779 (captured_main): Likewise. Initialize environment variable. Call
780 "have_job_control".
781 * server.h (post_fork_inferior): New prototype.
782 (get_environ): Likewise.
783 (last_status): Declare.
784 (last_ptid): Likewise.
785 (signal_pid): Likewise.
786 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
787 (spu_ptrace_fun): New function.
788 (spu_create_inferior): Adjust function prototype to reflect change
789 on "target.h". Adjust function code to use "fork_inferior".
790 * target.c (target_terminal_init): New function.
791 (target_terminal_inferior): Likewise.
792 (target_terminal_ours): Likewise.
793 * target.h: Include <vector>.
794 (struct target_ops) <create_inferior>: Update prototype.
795 (create_inferior): Update macro.
796 * utils.c (gdb_flush_out_err): New function.
797 * win32-low.c (win32_create_inferior): Adjust function prototype
798 and code to reflect change on "target.h".
799
800 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
801
802 * inferiors.c (switch_to_thread): New function.
803
804 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
805
806 * Makefile.in (SFILE): Add "common/job-control.c".
807 (OBS): Add "job-control.o".
808
809 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
810
811 * Makefile: Remove "@host_makefile_frag@".
812
813 2017-05-05 Pedro Alves <palves@redhat.com>
814
815 * configure: Regenerate.
816
817 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
818
819 * configure: Regenerate.
820
821 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
822
823 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
824 software_single_step change of return type to
825 std::vector<CORE_ADDR>.
826 * linux-low.c (install_software_single_step_breakpoints):
827 Likewise.
828 * linux-low.h (install_software_single_step_breakpoints):
829 Likewise.
830
831 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
832
833 * remote-utils.c: Include "gdb_termios.h" instead of
834 "terminal.h".
835 * terminal.h: Delete file.
836
837 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
838
839 * server.c: Include <vector>.
840 <program_argv, wrapper_argv>: Convert to std::vector.
841 (start_inferior): Rewrite function to use C++.
842 (handle_v_run): Likewise. Update code that calculates the argv
843 based on the vRun packet; use C++.
844 (captured_main): Likewise.
845
846 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
847
848 * server.c (handle_v_cont): Initialize thread_resume::thread
849 with null_ptid.
850
851 2017-04-05 Pedro Alves <palves@redhat.com>
852
853 * configure: Regenerate.
854
855 2017-04-05 Pedro Alves <palves@redhat.com>
856
857 * gdbreplay.c (sync_error): Constify.
858 * linux-x86-low.c (push_opcode): Constify.
859
860 2017-04-05 Pedro Alves <palves@redhat.com>
861
862 * win32-low.c (get_child_debug_event)
863 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
864 Report TARGET_WAITKIND_SPURIOUS instead.
865
866 2017-04-05 Pedro Alves <palves@redhat.com>
867
868 * remote-utils.c (remote_prepare, remote_open): Constify.
869 * remote-utils.h (remote_prepare, remote_open): Constify.
870 * server.c (captured_main): Constify 'port' handling.
871
872 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
873
874 * Makefile.in (clean): Clear .deps.
875
876 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
877
878 * .gitignore: Remove generated files, replace with wildcard.
879 * (clean): Replace removal of generated files with wildcard.
880 (version.c): Replace with...
881 (version-generated.c): ...this.
882 (xml-builtin.c): Replace with...
883 (xml-builtin-generated.c): ...this.
884 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
885 (%.c: *regformats*): Replace with...
886 (%-generated.c: *regformats*): ...this.
887
888 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
889
890 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
891 (xtensa_fill_gregset): Call collect_register_by_name for
892 threadptr register.
893 (xtensa_store_gregset): Call supply_register_by_name for
894 threadptr register.
895
896 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
897
898 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
899 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
900 (xtensa_store_gregset): Call supply_register for all registers in
901 a0_regnum..a0_regnum + C0_NREGS range.
902
903 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
904
905 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
906 (ax-ipa.o: ax.c): Remove.
907 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
908 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
909 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
910 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
911 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
912
913 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
914
915 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
916 (print-utils-ipa.o: ../common/print-utils.c): Remove.
917 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
918 (errors-ipa.o: ../common/errors.c): Remove.
919 (format-ipa.o: ../common/format.c): Remove.
920 (common-utils-ipa.o: ../common/common-utils.c): Remove.
921
922 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
923
924 * Makefile.in (%-ipa.o: %.c): New rule.
925 (tracepoint-ipa.o: tracepoint.c): Remove.
926 (utils-ipa.o: utils.c): Remove.
927 (remote-utils-ipa.o: remote-utils.c): Remove.
928 (regcache-ipa.o: regcache.c): Remove.
929 (i386-linux-ipa.o: i386-linux.c): Remove.
930 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
931 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
932 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
933 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
934 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
935 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
936 (amd64-linux-ipa.o: amd64-linux.c): Remove.
937 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
938 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
939 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
940 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
941 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
942 (aarch64-ipa.o: aarch64.c): Remove.
943 (s390-linux32-ipa.o: s390-linux32.c): Remove.
944 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
945 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
946 (s390-linux64-ipa.o: s390-linux64.c): Remove.
947 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
948 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
949 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
950 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
951 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
952 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
953 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
954 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
955 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
956 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
957 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
958 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
959 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
960 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
961 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
962 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
963 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
964 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
965 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
966 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
967 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
968 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
969 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
970 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
971 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
972 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
973 (tdesc-ipa.o: tdesc.c): Remove.
974 (x32-linux-ipa.o: x32-linux.c): Remove.
975 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
976 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
977
978 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
979
980 * Makefile.in (%.o: ../arch/%.c): New rule.
981 (arm.o: ../arch/arm.c): Remove.
982 (arm-linux.o: ../arch/arm-linux.c): Remove.
983 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
984 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
985
986 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
987
988 * Makefile.in (%.o: ../nat/%.c): New rule.
989 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
990 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
991 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
992 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
993 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
994 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
995 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
996 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
997 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
998 (linux-personality.o: ../nat/linux-personality.c): Remove.
999 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1000 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1001 (x86-linux.o: ../nat/x86-linux.c): Remove.
1002 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1003 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1004
1005 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1006
1007 * Makefile.in (%.o: ../common/%.c): New rule.
1008 (signals.o: ../common/signals.c): Remove.
1009 (print-utils.o: ../common/print-utils.c): Remove.
1010 (rsp-low.o: ../common/rsp-low.c): Remove.
1011 (common-utils.o: ../common/common-utils.c): Remove.
1012 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1013 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1014 (vec.o: ../common/vec.c): Remove.
1015 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1016 (xml-utils.o: ../common/xml-utils.c): Remove.
1017 (ptid.o: ../common/ptid.c): Remove.
1018 (buffer.o: ../common/buffer.c): Remove.
1019 (format.o: ../common/format.c): Remove.
1020 (filestuff.o: ../common/filestuff.c): Remove.
1021 (agent.o: ../common/agent.c): Remove.
1022 (errors.o: ../common/errors.c): Remove.
1023 (environ.o: ../common/environ.c): Remove.
1024 (common-debug.o: ../common/common-debug.c): Remove.
1025 (cleanups.o: ../common/cleanups.c): Remove.
1026 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1027 (fileio.o: ../common/fileio.c): Remove.
1028 (common-regcache.o: ../common/common-regcache.c): Remove.
1029 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1030 (new-op.o: ../common/new-op.c): Remove.
1031 (btrace-common.o: ../common/btrace-common.c): Remove.
1032
1033 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1034
1035 * Makefile.in (%.o: ../target/%.c): New rule.
1036 (waitstatus.o: ../target/waitstatus.c): Remove.
1037
1038 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1039
1040 * Makefile.in
1041 (%.c: ../regformats/%.dat,
1042 (%.c: ../regformats/arm/%.dat,
1043 (%.c: ../regformats/i386/%.dat,
1044 (%.c: ../regformats/rs6000/%.dat): New rules.
1045 (aarch64.c): Remove.
1046 (reg-arm.c): Remove.
1047 (arm-with-iwmmxt.c): Remove.
1048 (arm-with-vfpv2.c): Remove.
1049 (arm-with-vfpv3.c): Remove.
1050 (arm-with-neon.c): Remove.
1051 (reg-bfin.c): Remove.
1052 (reg-cris.c): Remove.
1053 (reg-crisv32.c): Remove.
1054 (i386.c): Remove.
1055 (i386-linux.c): Remove.
1056 (i386-avx.c): Remove.
1057 (i386-avx-linux.c): Remove.
1058 (i386-avx-avx512.c): Remove.
1059 (i386-avx-avx512-linux.c): Remove.
1060 (i386-mpx.c): Remove.
1061 (i386-mpx-linux.c): Remove.
1062 (i386-avx-mpx-avx512-pku.c): Remove.
1063 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1064 (i386-avx-mpx.c): Remove.
1065 (i386-avx-mpx-linux.c): Remove.
1066 (i386-mmx.c): Remove.
1067 (i386-mmx-linux.c): Remove.
1068 (reg-ia64.c): Remove.
1069 (reg-m32r.c): Remove.
1070 (reg-m68k.c): Remove.
1071 (reg-cf.c): Remove.
1072 (mips-linux.c): Remove.
1073 (mips-dsp-linux.c): Remove.
1074 (mips64-linux.c): Remove.
1075 (mips64-dsp-linux.c): Remove.
1076 (nios2-linux.c): Remove.
1077 (powerpc-32.c): Remove.
1078 (powerpc-32l.c): Remove.
1079 (powerpc-altivec32l.c): Remove.
1080 (powerpc-cell32l.c): Remove.
1081 (powerpc-vsx32l.c): Remove.
1082 (powerpc-isa205-32l.c): Remove.
1083 (powerpc-isa205-altivec32l.c): Remove.
1084 (powerpc-isa205-vsx32l.c): Remove.
1085 (powerpc-e500l.c): Remove.
1086 (powerpc-64l.c): Remove.
1087 (powerpc-altivec64l.c): Remove.
1088 (powerpc-cell64l.c): Remove.
1089 (powerpc-vsx64l.c): Remove.
1090 (powerpc-isa205-64l.c): Remove.
1091 (powerpc-isa205-altivec64l.c): Remove.
1092 (powerpc-isa205-vsx64l.c): Remove.
1093 (s390-linux32.c): Remove.
1094 (s390-linux32v1.c): Remove.
1095 (s390-linux32v2.c): Remove.
1096 (s390-linux64.c): Remove.
1097 (s390-linux64v1.c): Remove.
1098 (s390-linux64v2.c): Remove.
1099 (s390-te-linux64.c): Remove.
1100 (s390-vx-linux64.c): Remove.
1101 (s390-tevx-linux64.c): Remove.
1102 (s390x-linux64.c): Remove.
1103 (s390x-linux64v1.c): Remove.
1104 (s390x-linux64v2.c): Remove.
1105 (s390x-te-linux64.c): Remove.
1106 (s390x-vx-linux64.c): Remove.
1107 (s390x-tevx-linux64.c): Remove.
1108 (tic6x-c64xp-linux.c): Remove.
1109 (tic6x-c64x-linux.c): Remove.
1110 (tic6x-c62x-linux.c): Remove.
1111 (reg-sh.c): Remove.
1112 (reg-sparc64.c): Remove.
1113 (reg-spu.c): Remove.
1114 (amd64.c): Remove.
1115 (amd64-linux.c): Remove.
1116 (amd64-avx.c): Remove.
1117 (amd64-avx-linux.c): Remove.
1118 (amd64-avx-avx512.c): Remove.
1119 (amd64-avx-avx512-linux.c): Remove.
1120 (amd64-mpx.c): Remove.
1121 (amd64-mpx-linux.c): Remove.
1122 (amd64-avx-mpx-avx512-pku.c): Remove.
1123 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1124 (amd64-avx-mpx.c): Remove.
1125 (amd64-avx-mpx-linux.c): Remove.
1126 (x32.c): Remove.
1127 (x32-linux.c): Remove.
1128 (x32-avx.c): Remove.
1129 (x32-avx-linux.c): Remove.
1130 (x32-avx-avx512.c): Remove.
1131 (x32-avx-avx512-linux.c): Remove.
1132 (reg-xtensa.c): Remove.
1133 (reg-tilegx.c): Remove.
1134 (reg-tilegx32.c): Remove.
1135
1136 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1137
1138 * Makefile.in (SFILES): Add "common/environ.c".
1139 (OBJS): Add "common/environ.h".
1140
1141 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1142
1143 * configure.ac: Check if the fs_base and gs_base members of
1144 `struct user_regs_struct' exist.
1145 * config.in: Regenerated.
1146 * configure: Likewise.
1147
1148 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1149
1150 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1151 target_read_memory.
1152 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1153 (get_next_pcs_syscall_next_pc): Likewise.
1154
1155 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1156
1157 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1158 * nto-x86-low.c: Likewise.
1159
1160 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1161
1162 * Makefile.in: Include disable-implicit-rules.mk.
1163
1164 2016-11-23 Pedro Alves <palves@redhat.com>
1165
1166 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1167 (debug_vprintf): Use std::chrono::steady_clock instead of
1168 gettimeofday. Use '.' instead of ':'.
1169 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1170 (get_timestamp): Use std::chrono::steady_clock instead of
1171 gettimeofday.
1172
1173 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1174
1175 * Makefile.in: Fix whitespace formatting.
1176
1177 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1178
1179 * Makefile.in (SFILES, OBS): Flatten list and order
1180 alphabetically.
1181
1182 2016-11-23 Pedro Alves <palves@redhat.com>
1183
1184 * event-loop.c (handle_file_event): Use warning.
1185 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1186 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1187 Use warning.
1188
1189 2016-11-23 Pedro Alves <palves@redhat.com>
1190
1191 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1192 output.
1193 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1194 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1195 debug_printf and debug_flush for debug output.
1196 * server.c (handle_general_set): Likewise.
1197 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1198 output.
1199
1200 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1201
1202 * Makefile.in (.c.o): Replace rule with ...
1203 (%.o: %.c): ... this one.
1204
1205 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1206
1207 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1208 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1209 make.
1210 * configure.ac: Remove checks for the make program.
1211 * configure: Re-generate.
1212
1213 2016-10-28 Pedro Alves <palves@redhat.com>
1214
1215 * Makefile.in (CXX_DIALECT): Get from configure.
1216 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1217 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1218 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1219 * config.in: Regenerate.
1220 * configure: Regenerate.
1221
1222 2016-10-27 Yao Qi <yao.qi@linaro.org>
1223
1224 * linux-low.c (linux_supports_range_stepping): Return true if
1225 can_software_single_step return true.
1226
1227 2016-10-27 Yao Qi <yao.qi@linaro.org>
1228
1229 * inferiors.c (find_inferior_in_random): New function.
1230 * inferiors.h (find_inferior_in_random): Declare.
1231 * linux-low.c (linux_wait_for_event_filtered): Call
1232 find_inferior_in_random instead of find_inferior.
1233
1234 2016-10-27 Yao Qi <yao.qi@linaro.org>
1235
1236 * linux-low.c (linux_wait_1): If single-step breakpoints are
1237 inserted, remove them.
1238
1239 2016-10-26 Pedro Alves <palves@redhat.com>
1240
1241 * linux-low.c (handle_extended_wait): Link parent/child fork
1242 threads.
1243 (linux_wait_1): Unlink them.
1244 (linux_set_resume_request): Ignore resume requests for
1245 already-resumed and unhandled fork child threads.
1246 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1247 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1248 New functions.
1249 (handle_v_requests) <vCont>: Don't call require_running.
1250 * server.h (in_queued_stop_replies): New declaration.
1251
1252 2016-10-24 Yao Qi <yao.qi@linaro.org>
1253
1254 PR server/20733
1255 * linux-aarch64-low.c (append_insns): Cast the return value to
1256 'uint32_t *'.
1257
1258 2016-10-10 Yao Qi <yao.qi@linaro.org>
1259
1260 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1261
1262 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1263
1264 * target.c (target_supports_multi_process): New function, moved
1265 from...
1266 * target.h (target_supports_multi_process): ... here. Remove
1267 macro.
1268
1269 2016-10-05 Tom Tromey <tom@tromey.com>
1270
1271 PR remote/20655:
1272 * tracepoint.c (handle_tracepoint_bkpts): Check
1273 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1274
1275 2016-10-05 Yao Qi <yao.qi@linaro.org>
1276
1277 * configure.srv: Update the path of arm-*.xml files.
1278
1279 2016-10-05 Terry Guo <terry.guo@arm.com>
1280 Yao Qi <yao.qi@linaro.org>
1281
1282 * Makefile.in: Adjust the path of rules.
1283 * configure.srv: Update the path of xml files.
1284 * regformats/arm-with-iwmmxt.dat: Regenerated.
1285 * regformats/arm-with-neon.dat: Likewise.
1286 * regformats/arm-with-vfpv2.dat: Likewise.
1287 * regformats/arm-with-vfpv3.dat Likewise.
1288
1289 2016-09-30 Yao Qi <yao.qi@linaro.org>
1290
1291 PR gdbserver/20627
1292 * target.c (target_stop_and_wait): Don't call
1293 target_continue_no_signal, use resume_stop instead.
1294
1295 2016-09-26 Yao Qi <yao.qi@linaro.org>
1296
1297 * linux-low.c (linux_wait_1): Call debug_exit.
1298
1299 2016-09-23 Pedro Alves <palves@redhat.com>
1300
1301 * Makefile.in (SFILES): Add common/new-op.c.
1302 (OBS): Add common/new-op.o.
1303 (new-op.o): New rule.
1304
1305 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1306
1307 * .gitinore: Ignore more files.
1308
1309 2016-09-21 Yao Qi <yao.qi@linaro.org>
1310
1311 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1312 23.
1313
1314 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1315
1316 * server.c (start_inferior): Call target_mourn_inferior instead of
1317 mourn_inferior; pass ptid_t argument to it.
1318 (resume): Likewise.
1319 (handle_target_event): Likewise.
1320 * target.c (target_mourn_inferior): New function.
1321 * target.h (mourn_inferior): Delete macro.
1322
1323 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1324
1325 * linux-low.c (lwp_is_stepping): New function.
1326
1327 2016-09-06 Carl Love <cel@us.ibm.com>
1328
1329 * server.c (start_inferior): Fixed comment, requested comment change
1330 didn't get updated correctly. Removed reference to ptrace () call as
1331 it is only true on Linux systems.
1332
1333 2016-09-06 Carl Love <cel@us.ibm.com>
1334
1335 * server.c (start_inferior): Do not call
1336 function target_post_create_inferior () if the
1337 inferior process has already exited.
1338
1339 2016-09-05 Pedro Alves <palves@redhat.com>
1340
1341 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1342 (COMPILE.pre, CC_LD): Use CXX directly.
1343 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1344 * acinclude.m4: Don't include build-with-cxx.m4.
1345 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1346 * configure: Regenerate.
1347
1348 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1349
1350 PR gdb/19495
1351 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1352 call writing data to own_buf.
1353
1354 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1355
1356 * target.c (mywait): Call target_wait instead of
1357 the_target->wait.
1358 (target_wait): New function.
1359
1360 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1361
1362 * server.c (start_inferior): New variable 'ptid'. Replace calls
1363 to the_target->resume by target_continue{,_no_signal}, depending
1364 on the case.
1365 * target.c (target_stop_and_wait): Call target_continue_no_signal
1366 instead of the_target->resume.
1367 (target_continue): New function.
1368
1369 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1370
1371 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1372
1373 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1374
1375 PR server/20491
1376 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1377 ps_prochandle.
1378 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1379 * linux-arm-low.c (ps_get_thread_area): Likewise.
1380 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1381 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1382 * linux-mips-low.c (ps_get_thread_area): Likewise.
1383 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1384 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1385 * linux-x86-low.c (ps_get_thread_area): Likewise.
1386 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1387
1388 2016-08-19 Pedro Alves <palves@redhat.com>
1389
1390 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1391
1392 2016-08-19 Pedro Alves <palves@redhat.com>
1393
1394 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1395 comment. Use memcpy instead of casting through unsigned long.
1396
1397 2016-08-19 Pedro Alves <palves@redhat.com>
1398
1399 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1400 allocating around 0x80000000.
1401
1402 2016-08-19 Pedro Alves <palves@redhat.com>
1403
1404 PR gdb/20415
1405 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1406 (x32-avx512-linux-ipa.o): New rules.
1407 * configure.ac (x86_64-*-linux*): New x32 check.
1408 * configure.srv (ipa_x32_linux_regobj): New.
1409 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1410 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1411 descriptions.
1412 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1413 descriptions.
1414 * configure: Regenerate.
1415
1416 2016-08-09 Pedro Alves <palves@redhat.com>
1417
1418 PR gdb/18653
1419 * Makefile.in (OBS): Add signals-state-save-restore.o.
1420 (signals-state-save-restore.o): New rule.
1421 * config.in: Regenerate.
1422 * configure: Regenerate.
1423 * linux-low.c: Include "signals-state-save-restore.h".
1424 (linux_create_inferior): Call
1425 restore_original_signals_state.
1426 * server.c: Include "dispositions-save-restore.h".
1427 (captured_main): Call save_original_signals_state.
1428
1429 2016-08-05 Pedro Alves <palves@redhat.com>
1430
1431 * configure: Regenerate.
1432
1433 2016-08-04 Yao Qi <yao.qi@linaro.org>
1434
1435 * linux-low.c (regsets_fetch_inferior_registers): Check
1436 errno is ESRCH or not.
1437
1438 2016-08-02 Yao Qi <yao.qi@linaro.org>
1439
1440 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1441 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1442 (thread_db_load_search): Update.
1443 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1444 td_ta_set_event and td_ta_event_getmsg.
1445
1446 2016-07-26 Pedro Alves <palves@redhat.com>
1447
1448 PR server/20414
1449 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1450 of unsigned long for 64-bit registers and use uint32_t instead of
1451 unsigned int for 32-bit registers.
1452
1453 2016-07-26 Pedro Alves <palves@redhat.com>
1454
1455 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1456 to 'ptrace'.
1457
1458 2016-07-21 Tom Tromey <tom@tromey.com>
1459
1460 * configure: Rebuild.
1461
1462 2016-07-21 Yao Qi <yao.qi@linaro.org>
1463
1464 * mem-break.c (find_gdb_breakpoint): Cast bp to
1465 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1466
1467 2016-07-21 Yao Qi <yao.qi@linaro.org>
1468
1469 * server.c (handle_v_requests): Support s and S actions
1470 if target_supports_software_single_step return true.
1471
1472 2016-07-21 Yao Qi <yao.qi@linaro.org>
1473
1474 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1475 is resume_step, call maybe_hw_step.
1476 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1477 and unstop them.
1478 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1479 breakpoints or not.
1480 (proceed_one_lwp): If resume request is resume_step, install
1481 reinsert breakpoints and call maybe_hw_step.
1482
1483 2016-07-21 Yao Qi <yao.qi@linaro.org>
1484
1485 * linux-low.c (proceed_one_lwp): Declare.
1486 (linux_resume_one_thread): Remove local variable 'step'.
1487 Lift code enqueue signal. Call proceed_one_lwp instead of
1488 linux_resume_one_lwp.
1489
1490 2016-07-21 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-low.c (linux_resume_one_thread): Call
1493 enqueue_pending_signal.
1494
1495 2016-07-21 Yao Qi <yao.qi@linaro.org>
1496
1497 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1498 * inferiors.c (do_restore_current_thread_cleanup): New function.
1499 (make_cleanup_restore_current_thread): Likewise.
1500 * linux-low.c (install_software_single_step_breakpoints): Call
1501 make_cleanup_restore_current_thread. Switch current_thread to
1502 thread.
1503
1504 2016-07-21 Yao Qi <yao.qi@linaro.org>
1505
1506 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1507 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1508 (clone_one_breakpoint): Likewise.
1509 (delete_reinsert_breakpoints): Change parameter to thread.
1510 Callers updated.
1511 (has_reinsert_breakpoints): Likewise.
1512 (uninsert_reinsert_breakpoints): Likewise.
1513 (reinsert_reinsert_breakpoints): Likewise.
1514 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1515 (delete_reinsert_breakpoints): Likewise.
1516 (reinsert_reinsert_breakpoints): Likewise.
1517 (uninsert_reinsert_breakpoints): Likewise.
1518 (has_reinsert_breakpoints): Likewise.
1519
1520 2016-07-21 Yao Qi <yao.qi@linaro.org>
1521
1522 * inferiors.c (get_thread_process): Make parameter const.
1523 * inferiors.h (get_thread_process): Update declaration.
1524 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1525 Add new parameters child_thread and parent_thread. Callers
1526 updated.
1527 * mem-break.h (clone_all_breakpoints): Update declaration.
1528
1529 2016-07-21 Yao Qi <yao.qi@linaro.org>
1530
1531 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1532 <command_list, handler>: Remove.
1533 (struct gdb_breakpoint): New.
1534 (struct other_breakpoint): New.
1535 (struct reinsert_breakpoint): New.
1536 (is_gdb_breakpoint): New function.
1537 (any_persistent_commands): Update command_list if
1538 is_gdb_breakpoint returns true.
1539 (set_breakpoint): Create breakpoints according to their types.
1540 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1541 (set_gdb_breakpoint_1): Likewise.
1542 (set_gdb_breakpoint): Likewise.
1543 (clear_breakpoint_conditions): Change parameter type to
1544 'struct gdb_breakpoint *'.
1545 (clear_breakpoint_commands): Likewise.
1546 (clear_breakpoint_conditions_and_commands): Likewise.
1547 (add_condition_to_breakpoint): Likewise.
1548 (add_breakpoint_condition): Likewise.
1549 (add_commands_to_breakpoint): Likewise.
1550 (check_breakpoints): Check other_breakpoint.
1551 (clone_one_breakpoint): Clone breakpopint according to its type.
1552 * mem-break.h (struct gdb_breakpoint): Declare.
1553 (set_gdb_breakpoint): Update declaration.
1554 (clear_breakpoint_conditions_and_commands): Likewise.
1555 (add_breakpoint_condition): Likewise.
1556 (add_breakpoint_commands): Likewise.
1557 * server.c (process_point_options): Change parameter type to
1558 'struct gdb_breakpoint *'.
1559
1560 2016-07-21 Yao Qi <yao.qi@linaro.org>
1561
1562 * mem-break.c (set_breakpoint_at): Rename it to ...
1563 (set_breakpoint_type_at): ... it.
1564 (set_breakpoint_at): Call set_breakpoint_type_at.
1565 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1566 * mem-break.h (set_breakpoint_at): Update comments.
1567
1568 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1569
1570 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1571 to buf parameter.
1572 (nios2_store_gregset): Likewise.
1573
1574 2016-07-01 Pedro Alves <palves@redhat.com>
1575 Antoine Tremblay <antoine.tremblay@ericsson.com>
1576
1577 * linux-low.c: Change interface to take the target lwp_info
1578 pointer directly and return void. Handle detaching from a zombie
1579 thread.
1580 (linux_detach_lwp_callback): New function.
1581 (linux_detach): Detach from the leader thread after detaching from
1582 the clone threads.
1583
1584 2016-06-28 Yao Qi <yao.qi@linaro.org>
1585
1586 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1587 for variable new_offset.
1588 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1589 (aarch64_ftrace_insn_reloc_cb): Likewise.
1590 (aarch64_ftrace_insn_reloc_tb): Likewise.
1591 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1592 PRIx64 instead of PRIx32.
1593
1594 2016-06-28 Yao Qi <yao.qi@linaro.org>
1595
1596 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1597 (the_low_target): Install arm_get_syscall_trapinfo.
1598
1599 2016-06-28 Yao Qi <yao.qi@linaro.org>
1600
1601 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1602 function.
1603 (the_low_target): Install aarch64_get_syscall_trapinfo.
1604
1605 2016-06-28 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1608 Callers updated.
1609 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1610 Remove parameter sysno.
1611 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1612 sysret.
1613
1614 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1615
1616 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1617 (s390_emit_ne_goto): Likewise.
1618 (s390_emit_lt_goto): Likewise.
1619 (s390_emit_le_goto): Likewise.
1620 (s390_emit_gt_goto): Likewise.
1621 (s390_emit_ge_goto): Likewise.
1622 (s390x_emit_eq_goto): Likewise.
1623 (s390x_emit_ne_goto): Likewise.
1624 (s390x_emit_lt_goto): Likewise.
1625 (s390x_emit_le_goto): Likewise.
1626 (s390x_emit_gt_goto): Likewise.
1627 (s390x_emit_ge_goto): Likewise.
1628 (s390_emit_ops_impl): Mark variable static.
1629 (s390x_emit_ops): Likewise.
1630
1631 2016-06-17 Yao Qi <yao.qi@linaro.org>
1632
1633 * linux-low.c (handle_extended_wait): Call
1634 uninsert_reinsert_breakpoints for the parent process. Remove
1635 reinsert breakpoints from the child process. Reinsert them to
1636 the parent process when vfork is done.
1637 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1638 (reinsert_reinsert_breakpoints): New function.
1639 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1640 (reinsert_reinsert_breakpoints): Declare.
1641
1642 2016-06-17 Yao Qi <yao.qi@linaro.org>
1643
1644 * linux-low.c (handle_extended_wait): If the parent is doing
1645 step-over, remove the reinsert breakpoints from the forked child.
1646
1647 2016-06-17 Yao Qi <yao.qi@linaro.org>
1648
1649 * linux-low.c (unsuspend_all_lwps): Declare.
1650 (linux_low_filter_event): If thread exited, call finish_step_over.
1651 If step-over is finished, unsuspend other threads.
1652
1653 2016-06-17 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-low.c (linux_resume_one_lwp_throw): Assert
1656 has_reinsert_breakpoints returns false.
1657 * mem-break.c (delete_disabled_breakpoints): Assert
1658 bp type isn't reinsert_breakpoint.
1659
1660 2016-06-17 Yao Qi <yao.qi@linaro.org>
1661
1662 * linux-low.c (maybe_hw_step): New function.
1663 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1664 (finish_step_over): Switch current_thread to lwp temporarily,
1665 and assert has_reinsert_breakpoints returns true.
1666 (proceed_one_lwp): Call maybe_hw_step.
1667 * mem-break.c (has_reinsert_breakpoints): New function.
1668 * mem-break.h (has_reinsert_breakpoints): Declare.
1669
1670 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1671
1672 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1673
1674 2016-05-17 Yao Qi <yao.qi@linaro.org>
1675
1676 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1677 instead of find_inferior.
1678
1679 2016-05-05 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1682 Initialize res to zero.
1683
1684 2016-05-05 Yao Qi <yao.qi@linaro.org>
1685
1686 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1687 to uint32_t.
1688
1689 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1690
1691 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1692 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1693 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1694
1695 2016-04-28 Par Olsson <par.olsson@windriver.com>
1696 Simon Marchi <simon.marchi@ericsson.com>
1697
1698 * tracepoint.c (write_inferior_int8): New function.
1699 (cmd_qtenable_disable): Write enable flag using
1700 write_inferior_int8.
1701
1702 2016-04-25 Yao Qi <yao.qi@linaro.org>
1703
1704 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1705 (need_step_over_p): Return zero if the LWP has pending signals
1706 can be delivered on software single step target.
1707
1708 2016-04-25 Yao Qi <yao.qi@linaro.org>
1709
1710 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1711 return instead of error.
1712
1713 2016-04-22 Yao Qi <yao.qi@linaro.org>
1714
1715 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1716 to 23.
1717
1718 2016-04-22 Yao Qi <yao.qi@linaro.org>
1719
1720 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1721 signal when stepping over breakpoint with software single
1722 step.
1723
1724 2016-04-21 Pedro Alves <palves@redhat.com>
1725
1726 * linux-s390-low.c (s390_collect_ptrace_register)
1727 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1728 add casts.
1729 (s390_check_regset): Use void * instead of gdb_byte *.
1730
1731 2016-04-20 Pedro Alves <palves@redhat.com>
1732
1733 * configure: Renegerate.
1734
1735 2016-04-20 Yao Qi <yao.qi@linaro.org>
1736
1737 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1738 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1739 number 16.
1740 (arm_store_gregset): Likewise.
1741
1742 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1743
1744 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1745 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1746 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1747 (amd64-avx-mpx-linux.c): New rules.
1748 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1749 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1750 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1751 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1752 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1753 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1754 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1755 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1756 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1757 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1758 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1759 * linux-x86-low.c (x86_linux_read_description): Add case for
1760 X86_XSTATE_AVX_MPX_MASK.
1761 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1762 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1763 init_registers_i386_avx_mpx_linux.
1764 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1765 (initialize_low_tracepoint): Call
1766 init_registers_i386_avx_mpx_linux.
1767 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1768 (initialize_low_tracepoint): Call
1769 init_registers_amd64_avx_mpx_linux.
1770 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1771 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1772 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1773 declarations.
1774
1775 2016-04-18 Pedro Alves <palves@redhat.com>
1776
1777 * configure: Regenerate.
1778
1779 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1780
1781 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1782 (aarch64_emit_sub): Likewise.
1783
1784 2016-04-12 Pedro Alves <palves@redhat.com>
1785
1786 * utils.c (prepare_to_throw_exception): Delete.
1787
1788 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1789
1790 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1791
1792 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1793
1794 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1795
1796 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1797
1798 * linux-aarch64-ipa.c: Add <elf.h> include.
1799 * linux-ppc-ipa.c: Add <elf.h> include.
1800 * linux-s390-ipa.c: Add <elf.h> include.
1801
1802 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1803
1804 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1805 (get_raw_reg_ptr): Likewise.
1806 (get_trace_state_variable_value_ptr): Likewise.
1807 (set_trace_state_variable_value_ptr): Likewise.
1808 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1809 char *.
1810
1811 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1812 Marcin Kościelnicki <koriakin@0x04.net>
1813
1814 PR/17221
1815 * linux-ppc-low.c (emit_insns): New function.
1816 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1817 (ppc_emit_prologue): New function.
1818 (ppc_emit_epilogue): New function.
1819 (ppc_emit_add): New function.
1820 (ppc_emit_sub): New function.
1821 (ppc_emit_mul): New function.
1822 (ppc_emit_lsh): New function.
1823 (ppc_emit_rsh_signed): New function.
1824 (ppc_emit_rsh_unsigned): New function.
1825 (ppc_emit_ext): New function.
1826 (ppc_emit_zero_ext): New function.
1827 (ppc_emit_log_not): New function.
1828 (ppc_emit_bit_and): New function.
1829 (ppc_emit_bit_or): New function.
1830 (ppc_emit_bit_xor): New function.
1831 (ppc_emit_bit_not): New function.
1832 (ppc_emit_equal): New function.
1833 (ppc_emit_less_signed): New function.
1834 (ppc_emit_less_unsigned): New function.
1835 (ppc_emit_ref): New function.
1836 (ppc_emit_const): New function.
1837 (ppc_emit_reg): New function.
1838 (ppc_emit_pop): New function.
1839 (ppc_emit_stack_flush): New function.
1840 (ppc_emit_swap): New function.
1841 (ppc_emit_stack_adjust): New function.
1842 (ppc_emit_call): New function.
1843 (ppc_emit_int_call_1): New function.
1844 (ppc_emit_void_call_2): New function.
1845 (ppc_emit_if_goto): New function.
1846 (ppc_emit_goto): New function.
1847 (ppc_emit_eq_goto): New function.
1848 (ppc_emit_ne_goto): New function.
1849 (ppc_emit_lt_goto): New function.
1850 (ppc_emit_le_goto): New function.
1851 (ppc_emit_gt_goto): New function.
1852 (ppc_emit_ge_goto): New function.
1853 (ppc_write_goto_address): New function.
1854 (ppc_emit_ops_impl): New static variable.
1855 (ppc64v1_emit_prologue): New function.
1856 (ppc64v2_emit_prologue): New function.
1857 (ppc64_emit_epilogue): New function.
1858 (ppc64_emit_add): New function.
1859 (ppc64_emit_sub): New function.
1860 (ppc64_emit_mul): New function.
1861 (ppc64_emit_lsh): New function.
1862 (ppc64_emit_rsh_signed): New function.
1863 (ppc64_emit_rsh_unsigned): New function.
1864 (ppc64_emit_ext): New function.
1865 (ppc64_emit_zero_ext): New function.
1866 (ppc64_emit_log_not): New function.
1867 (ppc64_emit_bit_and): New function.
1868 (ppc64_emit_bit_or): New function.
1869 (ppc64_emit_bit_xor): New function.
1870 (ppc64_emit_bit_not): New function.
1871 (ppc64_emit_equal): New function.
1872 (ppc64_emit_less_signed): New function.
1873 (ppc64_emit_less_unsigned): New function.
1874 (ppc64_emit_ref): New function.
1875 (ppc64_emit_const): New function.
1876 (ppc64v1_emit_reg): New function.
1877 (ppc64v2_emit_reg): New function.
1878 (ppc64_emit_pop): New function.
1879 (ppc64_emit_stack_flush): New function.
1880 (ppc64_emit_swap): New function.
1881 (ppc64v1_emit_call): New function.
1882 (ppc64v2_emit_call): New function.
1883 (ppc64v1_emit_int_call_1): New function.
1884 (ppc64v2_emit_int_call_1): New function.
1885 (ppc64v1_emit_void_call_2): New function.
1886 (ppc64v2_emit_void_call_2): New function.
1887 (ppc64_emit_if_goto): New function.
1888 (ppc64_emit_eq_goto): New function.
1889 (ppc64_emit_ne_goto): New function.
1890 (ppc64_emit_lt_goto): New function.
1891 (ppc64_emit_le_goto): New function.
1892 (ppc64_emit_gt_goto): New function.
1893 (ppc64_emit_ge_goto): New function.
1894 (ppc64v1_emit_ops_impl): New static variable.
1895 (ppc64v2_emit_ops_impl): New static variable.
1896 (ppc_emit_ops): New function.
1897 (linux_low_target): Wire in ppc_emit_ops.
1898
1899 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1900 Marcin Kościelnicki <koriakin@0x04.net>
1901
1902 PR/17221
1903 * Makefile.in: Add powerpc-*-ipa.o
1904 * configure.srv: Add ipa_obj for powerpc*-linux.
1905 * linux-ppc-ipa.c: New file.
1906 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1907 includes.
1908 (PPC_FIELD): New macro.
1909 (PPC_SEXT): New macro.
1910 (PPC_OP6): New macro.
1911 (PPC_BO): New macro.
1912 (PPC_LI): New macro.
1913 (PPC_BD): New macro.
1914 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1915 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1916 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1917 (ppc_get_thread_area): New function.
1918 (is_elfv2_inferior): New function.
1919 (gen_ds_form): New function.
1920 (GEN_STD): New macro.
1921 (GEN_STDU): New macro.
1922 (GEN_LD): New macro.
1923 (GEN_LDU): New macro.
1924 (gen_d_form): New function.
1925 (GEN_ADDI): New macro.
1926 (GEN_ADDIS): New macro.
1927 (GEN_LI): New macro.
1928 (GEN_LIS): New macro.
1929 (GEN_ORI): New macro.
1930 (GEN_ORIS): New macro.
1931 (GEN_LWZ): New macro.
1932 (GEN_STW): New macro.
1933 (GEN_STWU): New macro.
1934 (gen_xfx_form): New function.
1935 (GEN_MFSPR): New macro.
1936 (GEN_MTSPR): New macro.
1937 (GEN_MFCR): New macro.
1938 (GEN_MTCR): New macro.
1939 (GEN_SYNC): New macro.
1940 (GEN_LWSYNC): New macro.
1941 (gen_x_form): New function.
1942 (GEN_OR): New macro.
1943 (GEN_MR): New macro.
1944 (GEN_LWARX): New macro.
1945 (GEN_STWCX): New macro.
1946 (GEN_CMPW): New macro.
1947 (gen_md_form): New function.
1948 (GEN_RLDICL): New macro.
1949 (GEN_RLDICR): New macro.
1950 (gen_i_form): New function.
1951 (GEN_B): New macro.
1952 (GEN_BL): New macro.
1953 (gen_b_form): New function.
1954 (GEN_BNE): New macro.
1955 (GEN_LOAD): New macro.
1956 (GEN_STORE): New macro.
1957 (gen_limm): New function.
1958 (gen_atomic_xchg): New function.
1959 (gen_call): New function.
1960 (ppc_relocate_instruction): New function.
1961 (ppc_install_fast_tracepoint_jump_pad): New function.
1962 (ppc_get_min_fast_tracepoint_insn_len): New function.
1963 (ppc_get_ipa_tdesc_idx): New function.
1964 (the_low_target): Wire in the new functions.
1965 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1966 tdescs.
1967 * linux-ppc-tdesc.h: New file.
1968
1969 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1970
1971 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1972 (alloc_jump_pad_buffer): New function.
1973 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1974 (alloc_jump_pad_buffer): New function.
1975 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1976 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1977 (alloc_jump_pad_buffer): New function.
1978 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1979 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1980 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1981 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1982
1983 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1984
1985 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1986 * linux-amd64-ipa.c: Likewise.
1987 * linux-i386-ipa.c: Likewise.
1988 * linux-s390-ipa.c: Likewise.
1989 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1990 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1991 set_trace_state_variable_value_ptr.
1992 (struct ipa_sym_addresses): Likewise.
1993 (symbol_list): Likewise.
1994 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1995 accessing gdb_collect directly.
1996 (gdb_collect_ptr_type): New typedef.
1997 (get_raw_reg_ptr_type): New typedef.
1998 (get_trace_state_variable_value_ptr_type): New typedef.
1999 (set_trace_state_variable_value_ptr_type): New typedef.
2000 (gdb_collect_ptr): New global.
2001 (get_raw_reg_ptr): New global.
2002 (get_trace_state_variable_value_ptr): New global.
2003 (set_trace_state_variable_value_ptr): New global.
2004 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2005 accessing get_raw_reg directly.
2006 (get_get_tsv_func_addr): Likewise for
2007 get_trace_state_variable_value_ptr.
2008 (get_set_tsv_func_addr): Likewise for
2009 set_trace_state_variable_value_ptr.
2010 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2011
2012 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2015
2016 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2017
2018 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2019 packets.
2020 (relocate_instruction): Remove own_buf.
2021 * server.c (own_buf): Make global.
2022 (handle_v_requests): Make global.
2023 * server.h (own_buf): New declaration.
2024 (handle_v_requests): New prototype.
2025
2026 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2027
2028 PR 18377
2029 * linux-s390-low.c (add_insns): New function.
2030 (s390_emit_prologue): New function.
2031 (s390_emit_epilogue): New function.
2032 (s390_emit_add): New function.
2033 (s390_emit_sub): New function.
2034 (s390_emit_mul): New function.
2035 (s390_emit_lsh): New function.
2036 (s390_emit_rsh_signed): New function.
2037 (s390_emit_rsh_unsigned): New function.
2038 (s390_emit_ext): New function.
2039 (s390_emit_log_not): New function.
2040 (s390_emit_bit_and): New function.
2041 (s390_emit_bit_or): New function.
2042 (s390_emit_bit_xor): New function.
2043 (s390_emit_bit_not): New function.
2044 (s390_emit_equal): New function.
2045 (s390_emit_less_signed): New function.
2046 (s390_emit_less_unsigned): New function.
2047 (s390_emit_ref): New function.
2048 (s390_emit_if_goto): New function.
2049 (s390_emit_goto): New function.
2050 (s390_write_goto_address): New function.
2051 (s390_emit_litpool): New function.
2052 (s390_emit_const): New function.
2053 (s390_emit_call): New function.
2054 (s390_emit_reg): New function.
2055 (s390_emit_pop): New function.
2056 (s390_emit_stack_flush): New function.
2057 (s390_emit_zero_ext): New function.
2058 (s390_emit_swap): New function.
2059 (s390_emit_stack_adjust): New function.
2060 (s390_emit_set_r2): New function.
2061 (s390_emit_int_call_1): New function.
2062 (s390_emit_void_call_2): New function.
2063 (s390_emit_eq_goto): New function.
2064 (s390_emit_ne_goto): New function.
2065 (s390_emit_lt_goto): New function.
2066 (s390_emit_le_goto): New function.
2067 (s390_emit_gt_goto): New function.
2068 (s390_emit_ge_goto): New function.
2069 (s390x_emit_prologue): New function.
2070 (s390x_emit_epilogue): New function.
2071 (s390x_emit_add): New function.
2072 (s390x_emit_sub): New function.
2073 (s390x_emit_mul): New function.
2074 (s390x_emit_lsh): New function.
2075 (s390x_emit_rsh_signed): New function.
2076 (s390x_emit_rsh_unsigned): New function.
2077 (s390x_emit_ext): New function.
2078 (s390x_emit_log_not): New function.
2079 (s390x_emit_bit_and): New function.
2080 (s390x_emit_bit_or): New function.
2081 (s390x_emit_bit_xor): New function.
2082 (s390x_emit_bit_not): New function.
2083 (s390x_emit_equal): New function.
2084 (s390x_emit_less_signed): New function.
2085 (s390x_emit_less_unsigned): New function.
2086 (s390x_emit_ref): New function.
2087 (s390x_emit_if_goto): New function.
2088 (s390x_emit_const): New function.
2089 (s390x_emit_call): New function.
2090 (s390x_emit_reg): New function.
2091 (s390x_emit_pop): New function.
2092 (s390x_emit_stack_flush): New function.
2093 (s390x_emit_zero_ext): New function.
2094 (s390x_emit_swap): New function.
2095 (s390x_emit_stack_adjust): New function.
2096 (s390x_emit_int_call_1): New function.
2097 (s390x_emit_void_call_2): New function.
2098 (s390x_emit_eq_goto): New function.
2099 (s390x_emit_ne_goto): New function.
2100 (s390x_emit_lt_goto): New function.
2101 (s390x_emit_le_goto): New function.
2102 (s390x_emit_gt_goto): New function.
2103 (s390x_emit_ge_goto): New function.
2104 (s390_emit_ops): New function.
2105 (struct linux_target_ops): Fill in emit_ops hook.
2106
2107 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2108
2109 PR 18377
2110 * Makefile.in: Add s390 IPA files.
2111 * configure.srv: Build IPA for s390.
2112 * linux-s390-ipa.c: New file.
2113 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2114 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2115 (tdesc_s390_linux32): Likewise.
2116 (init_registers_s390_linux32v1): Likewise.
2117 (tdesc_s390_linux32v1): Likewise.
2118 (init_registers_s390_linux32v2): Likewise.
2119 (tdesc_s390_linux32v2): Likewise.
2120 (init_registers_s390_linux64): Likewise.
2121 (tdesc_s390_linux64): Likewise.
2122 (init_registers_s390_linux64v1): Likewise.
2123 (tdesc_s390_linux64v1): Likewise.
2124 (init_registers_s390_linux64v2): Likewise.
2125 (tdesc_s390_linux64v2): Likewise.
2126 (init_registers_s390_te_linux64): Likewise.
2127 (tdesc_s390_te_linux64): Likewise.
2128 (init_registers_s390_vx_linux64): Likewise.
2129 (tdesc_s390_vx_linux64): Likewise.
2130 (init_registers_s390_tevx_linux64): Likewise.
2131 (tdesc_s390_tevx_linux64): Likewise.
2132 (init_registers_s390x_linux64): Likewise.
2133 (tdesc_s390x_linux64): Likewise.
2134 (init_registers_s390x_linux64v1): Likewise.
2135 (tdesc_s390x_linux64v1): Likewise.
2136 (init_registers_s390x_linux64v2): Likewise.
2137 (tdesc_s390x_linux64v2): Likewise.
2138 (init_registers_s390x_te_linux64): Likewise.
2139 (tdesc_s390x_te_linux64): Likewise.
2140 (init_registers_s390x_vx_linux64): Likewise.
2141 (tdesc_s390x_vx_linux64): Likewise.
2142 (init_registers_s390x_tevx_linux64): Likewise.
2143 (tdesc_s390x_tevx_linux64): Likewise.
2144 (have_hwcap_s390_vx): New static variable.
2145 (s390_arch_setup): Fill have_hwcap_s390_vx.
2146 (s390_get_thread_area): New function.
2147 (s390_ft_entry_gpr_esa): New const.
2148 (s390_ft_entry_gpr_zarch): New const.
2149 (s390_ft_entry_misc): New const.
2150 (s390_ft_entry_fr): New const.
2151 (s390_ft_entry_vr): New const.
2152 (s390_ft_main_31): New const.
2153 (s390_ft_main_64): New const.
2154 (s390_ft_exit_fr): New const.
2155 (s390_ft_exit_vr): New const.
2156 (s390_ft_exit_misc): New const.
2157 (s390_ft_exit_gpr_esa): New const.
2158 (s390_ft_exit_gpr_zarch): New const.
2159 (append_insns): New function.
2160 (s390_relocate_instruction): New function.
2161 (s390_install_fast_tracepoint_jump_pad): New function.
2162 (s390_get_min_fast_tracepoint_insn_len): New function.
2163 (s390_get_ipa_tdesc_idx): New function.
2164 (struct linux_target_ops): Wire in the above functions.
2165 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2166 * linux-s390-tdesc.h: New file.
2167
2168 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2169
2170 * linux-s390-low.c (s390_supports_tracepoints): New function.
2171 (struct linux_target_ops): Fill supports_tracepoints hook.
2172
2173 2016-03-18 Yao Qi <yao.qi@linaro.org>
2174
2175 * linux-low.c (lwp_signal_can_be_delivered): New function.
2176 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2177
2178 2016-03-18 Yao Qi <yao.qi@linaro.org>
2179
2180 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2181 0 if signal is enqueued. Remove 'signal' from one debugging
2182 message. Move one debugging message to some lines below.
2183 Remove code setting 'signal' to 0.
2184
2185 2016-03-18 Yao Qi <yao.qi@linaro.org>
2186
2187 * linux-low.c (linux_low_filter_event): Remove redundant
2188 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2189
2190 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2191
2192 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2193 (struct linux_target_ops): Wire in the above.
2194
2195 2016-03-03 Yao Qi <yao.qi@linaro.org>
2196
2197 * linux-low.c: Update comments to start_step_over.
2198
2199 2016-03-03 Yao Qi <yao.qi@linaro.org>
2200
2201 PR server/19736
2202 * linux-low.c (handle_extended_wait): Set child suspended
2203 if event_lwp->bp_reinsert isn't zero.
2204
2205 2016-03-02 Yao Qi <yao.qi@linaro.org>
2206
2207 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2208 enqueue_pending_signal.
2209
2210 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2211
2212 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2213 is actually loaded.
2214
2215 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2216
2217 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2218 (s390_regmap_3264) [!__s390x__]: New global.
2219 (s390_collect_ptrace_register): Skip map entries containing -1.
2220 (s390_supply_ptrace_register): Ditto.
2221 (s390_fill_gprs_high): New function.
2222 (s390_store_gprs_high): New function.
2223 (s390_regsets): Add NT_S390_HIGH_GPRS.
2224 (s390_get_hwcap): Enable on 31-bit.
2225 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2226 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2227 Detect NT_S390_HIGH_GPRS.
2228 (s390_usrregs_info_3264): Enable on 31-bit.
2229 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2230 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2231
2232 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2233
2234 PR gdb/13808
2235 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2236 * configure.srv: Ditto.
2237 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2238 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2239 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2240 (init_registers_amd64_linux): Remove prototype.
2241 (tdesc_amd64_linux): Remove declaration.
2242 (get_ipa_tdesc): New function.
2243 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2244 initialize remaining tdescs.
2245 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2246 (init_registers_i386_linux): Remove prototype.
2247 (tdesc_i386_linux): Remove declaration.
2248 (get_ipa_tdesc): New function.
2249 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2250 initialize remaining tdescs.
2251 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2252 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2253 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2254 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2255 (x86_get_ipa_tdesc_idx): New function.
2256 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2257 * linux-x86-tdesc.h: New file.
2258 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2259 (target_get_ipa_tdesc_idx): New macro.
2260 * tracepoint.c (ipa_tdesc_idx): New macro.
2261 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2262 (symbol_list): Add ipa_tdesc_idx.
2263 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2264 (ipa_tdesc): Remove.
2265 (ipa_tdesc_idx): New variable.
2266 (get_context_regcache): Use get_ipa_tdesc.
2267 (gdb_collect): Ditto.
2268 (gdb_probe): Ditto.
2269 * tracepoint.h (get_ipa_tdesc): New prototype.
2270 (ipa_tdesc): Remove.
2271
2272 2016-02-24 Pedro Alves <palves@redhat.com>
2273
2274 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2275 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2276 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2277 Factor out common code between the USE_SIGTRAP_SIGINFO and
2278 !USE_SIGTRAP_SIGINFO blocks.
2279 (linux_low_filter_event): Call save_stop_reason instead of
2280 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2281 Update comments.
2282 (linux_wait_1): Update comments.
2283
2284 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2285
2286 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2287 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2288 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2289 ppc_insert_point, ppc_remove_point.
2290
2291 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2292
2293 * linux-s390-low.c (s390_supports_z_point_type): New function.
2294 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2295
2296 2016-02-16 Yao Qi <yao.qi@linaro.org>
2297
2298 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2299 PC. Get pc from regcache_read_pc.
2300
2301 2016-02-12 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2304 or linux_get_pc_32bit.
2305 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2306
2307 2016-02-12 Yao Qi <yao.qi@linaro.org>
2308
2309 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2310 arm_linux_get_next_pcs_fixup.
2311
2312 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2313
2314 * tracepoint.c (x_tracepoint_action_download): Change
2315 write_inferior_data_ptr to write_inferior_data_pointer.
2316 (cmd_qtstart): Likewise.
2317 (write_inferior_data_ptr): Remove.
2318 (download_agent_expr): Change write_inferior_data_ptr to
2319 write_inferior_data_pointer.
2320 (download_tracepoint_1): Likewise.
2321 (download_tracepoint): Likewise.
2322 (download_trace_state_variables): Likewise.
2323
2324 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2325 Marcin Kościelnicki <koriakin@0x04.net>
2326
2327 * tracepoint.c (struct tracepoint_action_ops): Remove.
2328 (struct tracepoint_action): Remove ops.
2329 (m_tracepoint_action_download, r_tracepoint_action_download)
2330 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2331 size and offset accordingly.
2332 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2333 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2334 (tracepoint_action_send, tracepoint_action_download): New functions.
2335 Helpers for trace action handlers.
2336 (add_tracepoint_action): Remove setup actions ops.
2337 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2338
2339 2016-02-10 Yao Qi <yao.qi@linaro.org>
2340
2341 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2342
2343 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2346 to AC_OUTPUT.
2347 * configure: Regenerate.
2348
2349 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2350
2351 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2352 void * to gdb_byte *.
2353 * linux-low.c (siginfo_fixup): Likewise.
2354 (linux_xfer_siginfo): Likewise.
2355 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2356 Likewise.
2357 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2358
2359 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2360
2361 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2362 to srv_tgtobj.
2363 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2364 to srv_tgtobj.
2365 * linux-x86-low.c [__x86_64__]: Include
2366 "nat/amd64-linux-siginfo.h".
2367 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2368 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2369 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2370 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2371 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2372 (cpt_si_fd, si_timerid, si_overrun): Move from
2373 nat/amd64-linux-siginfo.c.
2374 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2375
2376 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2377
2378 * server.c (skip_to_semicolon): Remove.
2379 (process_point_options): Use strchrnul instead of
2380 skip_to_semicolon.
2381
2382 2016-01-26 Yao Qi <yao.qi@linaro.org>
2383
2384 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2385 * linux-low.c (install_software_single_step_breakpoints): Don't
2386 call regcache_read_pc.
2387 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2388 argument pc.
2389
2390 2016-01-26 Yao Qi <yao.qi@linaro.org>
2391
2392 * linux-low.c (install_software_single_step_breakpoints): Call
2393 regcache_read_pc instead of get_pc.
2394
2395 2016-01-26 Yao Qi <yao.qi@linaro.org>
2396
2397 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2398 (unblock_async_io): Rename to ...
2399 (block_unblock_async_io): ... it. New function.
2400 (enable_async_io): Don't install SIGIO handler. Unblock it
2401 instead.
2402 (disable_async_io): Don't ignore SIGIO. Block it instead.
2403 (initialize_async_io): Install SIGIO handler. Don't call
2404 unblock_async_io.
2405
2406 2016-01-26 Yao Qi <yao.qi@linaro.org>
2407
2408 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2409 first character is '\003', call *the_target->request_interrupt.
2410
2411 2016-01-25 Yao Qi <yao.qi@linaro.org>
2412
2413 * remote-utils.c (new_thread_notify): Remove.
2414 (dead_thread_notify): Likewise.
2415 * remote-utils.h (new_thread_notify): Remove declaration.
2416 (dead_thread_notify): Likewise.
2417
2418 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2419
2420 * gdb.trace/pending.exp: Fix expected message on continue.
2421
2422 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2423
2424 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2425 it works properly on big-endian machines where sizeof (CORE_ADDR)
2426 != sizeof (void *).
2427
2428 2016-01-21 Pedro Alves <palves@redhat.com>
2429
2430 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2431 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2432 * configure: Regenerate.
2433
2434 2016-01-21 Yao Qi <yao.qi@linaro.org>
2435
2436 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2437 is_thumb and set it according to CPSR saved on the stack.
2438 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2439 arm_sigreturn_next_pc.
2440
2441 2016-01-18 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-low.c (linux_set_pc_64bit): New function.
2444 (linux_get_pc_64bit): New function.
2445 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2446 Declare.
2447 * linux-sparc-low.c (debug_threads): Remove declaration.
2448 (sparc_get_pc): Remove.
2449 (the_low_target): Use linux_get_pc_64bit instead of
2450 sparc_get_pc.
2451 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2452 (the_low_target): Use linux_get_pc_64bit and
2453 linux_set_pc_64bit.
2454
2455 2016-01-18 Yao Qi <yao.qi@linaro.org>
2456
2457 * linux-arm-low.c (debug_threads): Remove declaration.
2458 (arm_get_pc, arm_set_pc): Remove.
2459 (the_low_target): Use linux_get_pc_32bit and
2460 linux_set_pc_32bit.
2461 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2462 (the_low_target): Use linux_get_pc_32bit and
2463 linux_set_pc_32bit.
2464 * linux-cris-low.c (debug_threads): Remove declaration.
2465 (cris_get_pc, cris_set_pc,): Remove.
2466 (the_low_target): Use linux_get_pc_32bit and
2467 linux_set_pc_32bit.
2468 * linux-crisv32-low.c (debug_threads): Remove declaration.
2469 (cris_get_pc, cris_set_pc): Remove.
2470 (the_low_target): Use linux_get_pc_32bit and
2471 linux_set_pc_32bit.
2472 * linux-low.c: Include inttypes.h.
2473 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2474 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2475 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2476 (the_low_target): Use linux_get_pc_32bit and
2477 linux_set_pc_32bit.
2478 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2479 (the_low_target): Use linux_get_pc_32bit and
2480 linux_set_pc_32bit.
2481 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2482 (the_low_target): Use linux_get_pc_32bit and
2483 linux_set_pc_32bit.
2484 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2485 (the_low_target): Use linux_get_pc_32bit and
2486 linux_set_pc_32bit.
2487 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2488 (the_low_target): Use linux_get_pc_32bit and
2489 linux_set_pc_32bit.
2490
2491 2016-01-18 Gary Benson <gbenson@redhat.com>
2492
2493 * configure.ac (AC_FUNC_FORK): New check.
2494 * config.in: Regenerate.
2495 * configure: Likewise.
2496
2497 2016-01-14 Yao Qi <yao.qi@linaro.org>
2498
2499 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2500 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2501 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2502 arm_get_next_pcs_ctor.
2503
2504 2016-01-12 Josh Stone <jistone@redhat.com>
2505 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2506
2507 * inferiors.h: Include "gdb_vecs.h".
2508 (struct process_info): Add syscalls_to_catch.
2509 * inferiors.c (remove_process): Free syscalls_to_catch.
2510 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2511 syscall_return stops.
2512 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2513 * server.c (handle_general_set): Handle QCatchSyscalls.
2514 (handle_query): Report support for QCatchSyscalls.
2515 * target.h (struct target_ops): Add supports_catch_syscall.
2516 (target_supports_catch_syscall): New macro.
2517 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2518 (struct lwp_info): Add syscall_state.
2519 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2520 Maintain syscall_state and syscalls_to_catch across exec.
2521 (get_syscall_trapinfo): New function, proxy to the_low_target.
2522 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2523 (linux_low_filter_event): Toggle syscall_state entry/return for
2524 syscall traps, and set it ignored for all others.
2525 (gdb_catching_syscalls_p): New function.
2526 (gdb_catch_this_syscall_p): New function.
2527 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2528 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2529 (linux_supports_catch_syscall): New function.
2530 (linux_target_ops): Install it.
2531 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2532 (the_low_target): Install it.
2533
2534 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2535
2536 * acinclude.m4: Include new ../warning.m4 file.
2537 * configure: Regenerated.
2538 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2539
2540 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2541
2542 * ax.c (is_goto_target): Mark static.
2543 * linux-low.c (register_addr): Likewise.
2544 (linux_fetch_registers, linux_store_registers): Likewise.
2545 * mem-break.c (any_persistent_commands): Fix old prototype.
2546 (add_commands_to_breakpoint): Mark static.
2547 * regcache.c (find_register_by_name): Delete unused func.
2548 * remote-utils.c (hex_or_minus_one): Mark static.
2549 * server.c (monitor_show_help): Mark static.
2550 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2551 handle_v_requests): Likewise.
2552
2553 2016-01-12 Pedro Alves <palves@redhat.com>
2554
2555 Remove use of the registered trademark symbol throughout.
2556
2557 2016-01-08 Yao Qi <yao.qi@linaro.org>
2558
2559 * remote-utils.c (getpkt): If c is '\003', call target hook
2560 request_interrupt.
2561
2562 2016-01-06 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2565 linux-aarch32-low.c.
2566 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2567 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2568 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2569 (thumb2_breakpoint): Declare.
2570 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2571 linux-aarch32-low.h.
2572 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2573 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2574 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2575
2576 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2577
2578 * gdbreplay.c (gdbreplay_version): Change copyright year in
2579 version message.
2580 * server.c (gdbserver_version): Likewise.
2581
2582 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2583
2584 * server.c (crc32_table): Delete.
2585 (crc32): Use libiberty's xcrc32 function.
2586
2587 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2588
2589 * lynx-low.c (lynx_delete_thread_callback): New function.
2590 (lynx_mourn): Properly delete our process and all of its
2591 threads. Remove call to clear_inferiors.
2592
2593 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2594
2595 * target.c (thread_search_callback): Add check that
2596 the thread_stopped target callback is not NULL before
2597 calling it.
2598
2599 2015-12-21 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2602 arm breakpoint.
2603
2604 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2605
2606 * server.c (handle_query): Call target_supports_software_single_step.
2607
2608 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2609
2610 * linux-low.c (single_step): New function.
2611 (linux_resume_one_lwp_throw): Call single_step.
2612 (start_step_over): Likewise.
2613
2614 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2615
2616 * Makefile.in (SFILES): Append arch/arm-linux.c,
2617 arch/arm-get-next-pcs.c.
2618 (arm-linux.o): New rule.
2619 (arm-get-next-pcs.o): New rule.
2620 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2621 arm-linux.o.
2622 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2623 to linux-aarch32-low.c.
2624 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2625 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2626 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2627 (thumb2_breakpoint_len): Likewise.
2628 (arm_is_thumb_mode): Make non-static.
2629 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2630 from linux-aarch32-low.c.
2631 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2632 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2633 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2634 (thumb2_breakpoint_len): Likewise.
2635 (arm_is_thumb_mode): New declaration.
2636 * linux-arm-low.c: Include arch/arm-linux.h
2637 aarch/arm-get-next-pcs.h, sys/syscall.h.
2638 (get_next_pcs_ops): New struct.
2639 (get_next_pcs_addr_bits_remove): New function.
2640 (get_next_pcs_is_thumb): New function.
2641 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2642 (arm_sigreturn_next_pc): Likewise.
2643 (get_next_pcs_syscall_next_pc): Likewise.
2644 (arm_gdbserver_get_next_pcs): Likewise.
2645 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2646 Initialize.
2647 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2648 * server.h: Include gdb_vecs.h.
2649
2650 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2651
2652 * Makefile.in (SFILES): Append common/common-regcache.c.
2653 (OBS): Append common-regcache.o.
2654 (common-regcache.o): New rule.
2655 * regcache.c (init_register_cache): Initialize cache to
2656 REG_UNAVAILABLE.
2657 (regcache_raw_read_unsigned): New function.
2658 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2659 register_status enum.
2660
2661 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2662
2663 * linux-aarch64-low.c (the_low_targets): Rename
2664 breakpoint_reinsert_addr to get_next_pcs.
2665 * linux-arm-low.c (the_low_targets): Likewise.
2666 * linux-bfin-low.c (the_low_targets): Likewise.
2667 * linux-cris-low.c (the_low_targets): Likewise.
2668 * linux-crisv32-low.c (the_low_targets): Likewise.
2669 * linux-low.c (can_software_single_step): Likewise.
2670 (install_software_single_step_breakpoints): New function.
2671 (start_step_over): Use install_software_single_step_breakpoints.
2672 * linux-low.h: New CORE_ADDR vector.
2673 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2674 get_next_pcs.
2675 * linux-mips-low.c (the_low_targets): Likewise.
2676 * linux-nios2-low.c (the_low_targets): Likewise.
2677 * linux-sparc-low.c (the_low_targets): Likewise.
2678
2679 2015-12-17 Pedro Alves <palves@redhat.com>
2680
2681 * linux-low.c (linux_kill_one_lwp): Remove references to
2682 LinuxThreads.
2683 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2684 to 'kill'.
2685 (linux_init_signals): Delete.
2686 (initialize_low): Adjust.
2687 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2688
2689 2015-12-16 Pedro Alves <palves@redhat.com>
2690
2691 * configure.ac (compiler warning flags): When testing a
2692 -Wno-foo option, check whether -Wfoo works instead.
2693 * configure: Regenerate.
2694
2695 2015-12-11 Don Breazeal <donb@codesourcery.com>
2696
2697 * server.c (process_serial_event): Don't exit from gdbserver
2698 in remote mode if there are still active inferiors.
2699
2700 2015-12-11 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2703 arm_breakpoint_at if the process is 32-bit.
2704
2705 2015-12-11 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2708 arm breakpoint.
2709
2710 2015-12-07 Yao Qi <yao.qi@linaro.org>
2711
2712 * configure.srv: Append arm.o to srv_tgtobj for
2713 aarch64*-*-linux* target.
2714 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2715 from linux-arm-low.c.
2716 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2717 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2718 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2719 (thumb2_breakpoint_len): Likewise.
2720 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2721 (arm_breakpoint_kinds): Likewise.
2722 (arm_breakpoint_kind_from_pc): Likewise.
2723 (arm_sw_breakpoint_from_kind): Likewise.
2724 (arm_breakpoint_kind_from_current_state): Likewise.
2725 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2726 (arm_sw_breakpoint_from_kind): Declare.
2727 (arm_breakpoint_kind_from_current_state): Declare.
2728 (arm_breakpoint_at): Declare.
2729 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2730 arm_sw_breakpoint_from_kind if process is 32-bit.
2731 (aarch64_breakpoint_kind_from_pc): New function.
2732 (aarch64_breakpoint_kind_from_current_state): New function.
2733 (the_low_target): Initialize fields breakpoint_kind_from_pc
2734 and breakpoint_kind_from_current_state.
2735 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2736 linux-aarch32-low.c.
2737 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2738 (arm_breakpoint, arm_breakpoint_len): Likewise.
2739 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2740 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2741 (arm_is_thumb_mode): Likewise.
2742 (arm_breakpoint_at): Likewise.
2743 (arm_breakpoint_kind_from_pc): Likewise.
2744 (arm_sw_breakpoint_from_kind): Likewise.
2745 (arm_breakpoint_kind_from_current_state): Likewise.
2746
2747 Revert:
2748 2015-08-04 Yao Qi <yao.qi@linaro.org>
2749
2750 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2751 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2752 * server.c (extended_protocol): Remove "static".
2753 * server.h (extended_protocol): Declare it.
2754
2755 2015-12-04 Josh Stone <jistone@redhat.com>
2756
2757 * target.h (struct target_ops) <arch_setup>: Rename to ...
2758 (struct target_ops) <post_create_inferior>: ... this.
2759 (target_arch_setup): Rename to ...
2760 (target_post_create_inferior): ... this, calling post_create_inferior.
2761 * server.c (start_inferior): Update target_arch_setup calls to
2762 target_post_create_inferior.
2763 * linux-low.c (linux_low_ptrace_options): Forward declare.
2764 (linux_arch_setup): Update its comment for general use.
2765 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2766 (struct linux_target_ops): Use linux_post_create_inferior.
2767 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2768 to post_create_inferior.
2769 * nto-low.c (struct nto_target_ops): Likewise.
2770 * spu-low.c (struct spu_target_ops): Likewise.
2771 * win32-low.c (struct win32_target_ops): Likewise.
2772
2773 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2774
2775 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2776
2777 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2778
2779 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2780 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2781 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2782 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2783 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2784 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2785 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2786 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2787 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2788 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2789 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2790 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2791
2792 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2793
2794 * linux-low.c (linux_look_up_symbols): Don't call
2795 linux_supports_traceclone.
2796 * linux-low.h (thread_db_init): Remove use_events argument.
2797 * thread-db.c (thread_db_use_event): Remove global variable.
2798 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2799 (struct thread_db) <td_create_bp>: Remove field.
2800 (thread_db_create_event): Remove function.
2801 (thread_db_enable_reporting): Likewise.
2802 (find_one_thread): Don't check for thread_db_use_events.
2803 (attach_thread): Likewise.
2804 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2805 (try_thread_db_load_1): Don't check for thread_db_use_events.
2806 (thread_db_init): Remove use_events argument and thread events
2807 handling.
2808 (remove_thread_event_breakpoints): Remove function.
2809 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2810
2811 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2812
2813 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2814 New function.
2815 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2816 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2817 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2818 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2819 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2820 Initialize.
2821 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2822 New function.
2823 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2824 * linux-low.c (can_hardware_single_step): Use
2825 supports_hardware_single_step.
2826 (can_software_single_step): New function.
2827 (start_step_over): Call can_software_single_step.
2828 (linux_supports_hardware_single_step): New function.
2829 (struct target_ops) <supports_software_single_step>: Initialize.
2830 * linux-low.h (struct linux_target_ops)
2831 <supports_hardware_single_step>: Initialize.
2832 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2833 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2834 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2835 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2836 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2837 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2838 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2839 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2840 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2841 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2842 Initialize.
2843 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2844 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2845 Initialize.
2846 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2847 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2848 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2849 New function.
2850 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2851 * target.h (struct target_ops): <supports_software_single_step>:
2852 New field.
2853 (target_supports_software_single_step): New macro.
2854
2855 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2856
2857 * linux-low.c (linux_wait_1): Fix pc advance condition.
2858 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2859 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2860
2861 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2862
2863 * linux-arm-low.c (arm_is_thumb_mode): New function.
2864 (arm_breakpoint_at): Use arm_is_thumb_mode.
2865 (arm_breakpoint_kind_from_current_state): New function.
2866 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2867 Initialize.
2868 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2869 (linux_breakpoint_kind_from_current_state): New function.
2870 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2871 * linux-low.h (struct linux_target_ops)
2872 <breakpoint_kind_from_current_state>: New field.
2873 * target.h (struct target_ops): Likewise.
2874 (target_breakpoint_kind_from_current_state): New macro.
2875
2876 2015-11-30 Pedro Alves <palves@redhat.com>
2877
2878 * linux-low.c (linux_resume): Wake up the event loop before
2879 returning.
2880
2881 2015-11-30 Pedro Alves <palves@redhat.com>
2882
2883 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2884 check.
2885 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2886 to -1.
2887 * target.c (struct thread_search): New structure.
2888 (thread_search_callback): New function.
2889 (prev_general_thread): New global.
2890 (prepare_to_access_memory, done_accessing_memory): New functions.
2891 * target.h (prepare_to_access_memory, done_accessing_memory):
2892 Replace macros with function declarations.
2893
2894 2015-11-30 Pedro Alves <palves@redhat.com>
2895
2896 PR 14618
2897 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2898 report TARGET_WAITKIND_NO_RESUMED.
2899 * remote-utils.c (prepare_resume_reply): Handle
2900 TARGET_WAITKIND_NO_RESUMED.
2901 * server.c (report_no_resumed): New global.
2902 (handle_query) <qSupported>: Handle "no-resumed+". Report
2903 "no-resumed+" support.
2904 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2905 return error if the client doesn't support no-resumed events.
2906 (push_stop_notification): New function.
2907 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2908 events if the client supports them.
2909
2910 2015-11-30 Pedro Alves <palves@redhat.com>
2911
2912 * linux-low.c (thread_still_has_status_pending_p): Don't check
2913 vCont;t here.
2914 (lwp_resumed): New function.
2915 (status_pending_p_callback): Return early if the LWP is not
2916 supposed to be resumed.
2917
2918 2015-11-30 Pedro Alves <palves@redhat.com>
2919
2920 * linux-low.c (handle_extended_wait): Assert that the LWP's
2921 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2922 thread create events, leave the new child's status pending.
2923 (linux_low_filter_event): If GDB wants to hear about thread exit
2924 events, leave the LWP marked dead and don't delete it.
2925 (linux_wait_for_event_filtered): Don't check for thread exit.
2926 (filter_exit_event): New function.
2927 (linux_wait_1): Use it, when returning an exit event.
2928 (linux_resume_one_lwp_throw): Assert that the LWP's
2929 waitstatus is TARGET_WAITKIND_IGNORE.
2930 * remote-utils.c (prepare_resume_reply): Handle
2931 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2932 * server.c (report_thread_events): New global.
2933 (handle_general_set): Handle QThreadEvents.
2934 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2935 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2936 TARGET_WAITKIND_THREAD_EXITED.
2937 * server.h (report_thread_events): Declare.
2938
2939 2015-11-30 Pedro Alves <palves@redhat.com>
2940
2941 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2942 the thread's last_resume_kind was resume_stop.
2943
2944 2015-11-30 Pedro Alves <palves@redhat.com>
2945
2946 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2947 before returning.
2948
2949 2015-11-30 Pedro Alves <palves@redhat.com>
2950
2951 * server.c (handle_v_requests): Handle vCtrlC.
2952
2953 2015-11-30 Pedro Alves <palves@redhat.com>
2954
2955 * gdbthread.h (find_any_thread_of_pid): Declare.
2956 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2957 functions.
2958 * server.c (handle_query): If current_thread is NULL, look for
2959 another thread of the selected process.
2960
2961 2015-11-26 Daniel Colascione <dancol@dancol.org>
2962 Simon Marchi <simon.marchi@ericsson.com>
2963
2964 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2965 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2966 name in reply.
2967 * target.h (struct target_ops) <thread_name>: New field.
2968 (target_thread_name): New macro.
2969
2970 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2971
2972 * regcache.h (regcache_invalidate_pid): Add declaration.
2973 * regcache.c (regcache_invalidate_pid): New function, extracted
2974 from regcache_invalidate.
2975 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2976 Add trivial documentation comment.
2977 * lynx-low.c: Use regcache_invalidate_pid instead of
2978 regcache_invalidate.
2979
2980 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2981
2982 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2983 and Elf64_auxv_t if the target is Android.
2984
2985 2015-11-22 Doug Evans <xdje42@gmail.com>
2986
2987 * target.h: #include <sys/types.h>.
2988
2989 2015-11-19 Pedro Alves <palves@redhat.com>
2990
2991 * linux-low.c (linux_process_qsupported): Change prototype.
2992 Adjust.
2993 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2994 Change prototype.
2995 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2996 and adjust to loop over all features.
2997 * server.c (handle_query) <qSupported>: Adjust to call
2998 target_process_qsupported once, passing it a vector of unprocessed
2999 features.
3000 * target.h (struct target_ops) <process_qsupported>: Change
3001 prototype.
3002 (target_process_qsupported): Adjust.
3003
3004 2015-11-19 Pedro Alves <palves@redhat.com>
3005
3006 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3007 mode.
3008 * configure: Regenerate.
3009
3010 2015-11-19 Pedro Alves <palves@redhat.com>
3011
3012 * configure: Regenerate.
3013
3014 2015-11-19 Yao Qi <yao.qi@linaro.org>
3015
3016 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3017 type to uint32_t.
3018
3019 2015-11-19 Yao Qi <yao.qi@linaro.org>
3020
3021 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3022 (struct aarch64_operand): Move enum out.
3023
3024 2015-11-19 Yao Qi <yao.qi@linaro.org>
3025
3026 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3027 struct user_fpsimd_state *.
3028 (aarch64_store_fpregset): Likewise.
3029
3030 2015-11-19 Yao Qi <yao.qi@linaro.org>
3031
3032 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3033 struct user_pt_regs *.
3034 (aarch64_store_gregset): Likewise.
3035
3036 2015-11-18 Pedro Alves <palves@redhat.com>
3037
3038 * Makefile.in (all_object_files): Add $IPA_OBJS.
3039
3040 2015-11-17 Pedro Alves <palves@redhat.com>
3041
3042 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3043 GDB_SIGNAL_0 and gdb_signal_to_string.
3044
3045 2015-11-17 Pedro Alves <palves@redhat.com>
3046
3047 * win32-low.c (handle_output_debug_string): Remove parameter.
3048 (win32_kill): Remove our_status local and adjust call to
3049 handle_output_debug_string.
3050 (get_child_debug_event): Adjust call to
3051 handle_output_debug_string.
3052
3053 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * linux-mips-low.c (mips_fill_gregset): Add cast.
3056 (mips_store_gregset): Likewise.
3057 (mips_fill_fpregset): Likewise.
3058 (mips_store_fpregset): Likewise.
3059
3060 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3061
3062 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3063 priv.
3064
3065 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3066
3067 * linux-mips-low.c (mips_linux_new_thread): Change type of
3068 watch_type to enum target_hw_bp_type.
3069
3070 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3071
3072 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3073 Change return type to arm_hwbp_type.
3074
3075 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3076
3077 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3078 (arm_store_gregset): Likewise.
3079 * linux-arm-low.c (arm_get_hwcap): Likewise.
3080 (arm_read_description): Likewise.
3081
3082 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3083
3084 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3085
3086 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3087
3088 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3089 (ppc_fill_vsxregset): Likewise.
3090 (ppc_store_vsxregset): Likewise.
3091 (ppc_fill_vrregset): Likewise.
3092 (ppc_store_vrregset): Likewise.
3093 (ppc_fill_evrregset): Likewise.
3094 (ppc_store_evrregset): Likewise.
3095
3096 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3097
3098 * linux-ppc-low.c (ppc_usrregs_info): Remove
3099 forward-declaration.
3100 (ppc_arch_setup): Move lower in file.
3101
3102 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3103
3104 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3105 (ps_pdwrite): Likewise.
3106
3107 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3108
3109 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3110 to after assert checks.
3111
3112 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3113
3114 * proc-service.c (ps_pdread): Add/adjust casts.
3115 (ps_pdwrite): Add/adjust casts.
3116
3117 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3118
3119 * server.c (handle_search_memory_1): Cast return value of
3120 memmem.
3121
3122 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3123
3124 * server.c (write_qxfer_response): Change type of data to
3125 gdb_byte *.
3126
3127 2015-10-29 Pedro Alves <palves@redhat.com>
3128
3129 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3130
3131 2015-10-29 Pedro Alves <palves@redhat.com>
3132
3133 * tracepoint.c (clear_installed_tracepoints): Add casts.
3134
3135 2015-10-29 Pedro Alves <palves@redhat.com>
3136
3137 * server.c (handle_v_cont, process_serial_event): Add enum
3138 gdb_signal casts to signal parsing code.
3139
3140 2015-10-29 Pedro Alves <palves@redhat.com>
3141
3142 * linux-low.h (NULL_REGSET): Define.
3143 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3144 * linux-arm-low.c (arm_regsets): Likewise.
3145 * linux-crisv32-low.c (cris_regsets): Likewise.
3146 * linux-m68k-low.c (m68k_regsets): Likewise.
3147 * linux-mips-low.c (mips_regsets): Likewise.
3148 * linux-nios2-low.c (nios2_regsets): Likewise.
3149 * linux-ppc-low.c (ppc_regsets): Likewise.
3150 * linux-s390-low.c (s390_regsets): Likewise.
3151 * linux-sh-low.c (sh_regsets): Likewise.
3152 * linux-sparc-low.c (sparc_regsets): Likewise.
3153 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3154 * linux-tile-low.c (tile_regsets): Likewise.
3155 * linux-x86-low.c (x86_regsets): Likewise.
3156 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3157
3158 2015-10-29 Pedro Alves <palves@redhat.com>
3159
3160 * linux-low.h (NULL_REGSET): Define.
3161 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3162 * linux-arm-low.c (arm_regsets): Likewise.
3163 * linux-crisv32-low.c (cris_regsets): Likewise.
3164 * linux-m68k-low.c (m68k_regsets): Likewise.
3165 * linux-mips-low.c (mips_regsets): Likewise.
3166 * linux-nios2-low.c (nios2_regsets): Likewise.
3167 * linux-ppc-low.c (ppc_regsets): Likewise.
3168 * linux-s390-low.c (s390_regsets): Likewise.
3169 * linux-sh-low.c (sh_regsets): Likewise.
3170 * linux-sparc-low.c (sparc_regsets): Likewise.
3171 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3172 * linux-tile-low.c (tile_regsets): Likewise.
3173 * linux-x86-low.c (x86_regsets): Likewise.
3174 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3175
3176 2015-10-26 Doug Evans <dje@google.com>
3177
3178 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3179
3180 2015-10-26 Doug Evans <dje@google.com>
3181
3182 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3183
3184 2015-10-26 Doug Evans <dje@google.com>
3185
3186 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3187 for debug_printf.
3188 (attach_thread, find_new_threads_callback): Ditto.
3189
3190 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3191
3192 * mem-break.h (set_breakpoint_data): Remove.
3193
3194 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3195
3196 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3197 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3198 (initialize_low): Remove set_breakpoint_data call.
3199 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3200 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3201 (initialize_low): Remove set_breakpoint_data call.
3202 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3203 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3204 (initialize_low): Remove set_breakpoint_data call.
3205
3206 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3207
3208 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3209 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3210 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3211 * target.h (target_breakpoint_kind_from_pc): New macro.
3212
3213 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3214
3215 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3216 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3217 the default breakpoint kind.
3218
3219 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3220
3221 * linux-arm-low.c (arm_supports_z_point_type): Add software
3222 breakpoint support.
3223
3224 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3225
3226 * linux-arm-low.c: Refactor breakpoint definitions.
3227 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3228 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3229
3230 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3231
3232 * Makefile.in: Add arm.c/o.
3233 * configure.srv: Likewise.
3234 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3235 (arm_breakpoint_kind_from_pc): New function.
3236 (arm_sw_breakpoint_from_kind): Return proper kind.
3237 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3238
3239 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3240
3241 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3242 removal.
3243 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3244 (struct raw_breakpoint) <size>: Remove.
3245 (struct raw_breakpoint) <kind>: Add.
3246 (bp_size): New function.
3247 (bp_opcode): Likewise.
3248 (find_raw_breakpoint_at): Adjust for kind.
3249 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3250 (remove_memory_breakpoint): Adjust for kind call bp_size.
3251 (set_raw_breakpoint_at): Adjust for kind.
3252 (set_breakpoint): Likewise.
3253 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3254 (delete_raw_breakpoint): Adjust for kind.
3255 (delete_breakpoint): Likewise.
3256 (find_gdb_breakpoint): Likewise.
3257 (set_gdb_breakpoint_1): Likewise.
3258 (set_gdb_breakpoint): Likewise.
3259 (delete_gdb_breakpoint_1): Likewise.
3260 (delete_gdb_breakpoint): Likewise.
3261 (uninsert_raw_breakpoint): Likewise.
3262 (reinsert_raw_breakpoint): Likewise.
3263 (set_breakpoint_data): Remove.
3264 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3265 (check_mem_read): Adjust for kind call bp_size.
3266 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3267 (clone_one_breakpoint): Adjust for kind.
3268 * mem-break.h (set_gdb_breakpoint): Likewise.
3269 (delete_gdb_breakpoint): Likewise.
3270 * server.c (process_serial_event): Likewise.
3271
3272 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3273
3274 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3275 (struct linux_target_ops) <breakpoint>: Remove.
3276 (struct linux_target_ops) <breakpoint_len>: Remove.
3277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3279 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3280 (arm_sw_breakpoint_from_kind): New function.
3281 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3282 (struct linux_target_ops) <breakpoint>: Remove.
3283 (struct linux_target_ops) <breakpoint_len>: Remove.
3284 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3285 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3286 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3287 (struct linux_target_ops) <breakpoint>: Remove.
3288 (struct linux_target_ops) <breakpoint_len>: Remove.
3289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3291 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3292 (struct linux_target_ops) <breakpoint>: Remove.
3293 (struct linux_target_ops) <breakpoint_len>: Remove.
3294 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3295 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3296 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3297 and sw_breakpoint_from_kind to increment the pc.
3298 (linux_breakpoint_kind_from_pc): New function.
3299 (linux_sw_breakpoint_from_kind): New function.
3300 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3301 (initialize_low): Call breakpoint_kind_from_pc and
3302 sw_breakpoint_from_kind to replace breakpoint_data/len.
3303 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3304 New field.
3305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3306 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3307 (struct linux_target_ops) <breakpoint>: Remove.
3308 (struct linux_target_ops) <breakpoint_len>: Remove.
3309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3311 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3312 (struct linux_target_ops) <breakpoint>: Remove.
3313 (struct linux_target_ops) <breakpoint_len>: Remove.
3314 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3315 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3316 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3317 (struct linux_target_ops) <breakpoint>: Remove.
3318 (struct linux_target_ops) <breakpoint_len>: Remove.
3319 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3320 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3321 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3322 (struct linux_target_ops) <breakpoint>: Remove.
3323 (struct linux_target_ops) <breakpoint_len>: Remove.
3324 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3326 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3327 (struct linux_target_ops) <breakpoint>: Remove.
3328 (struct linux_target_ops) <breakpoint_len>: Remove.
3329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3331 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3332 (struct linux_target_ops) <breakpoint>: Remove.
3333 (struct linux_target_ops) <breakpoint_len>: Remove.
3334 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3335 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3336 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3337 (struct linux_target_ops) <breakpoint>: Remove.
3338 (struct linux_target_ops) <breakpoint_len>: Remove.
3339 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3341 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3342 (struct linux_target_ops) <breakpoint>: Remove.
3343 (struct linux_target_ops) <breakpoint_len>: Remove.
3344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3346 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3347 (struct linux_target_ops) <breakpoint>: Remove.
3348 (struct linux_target_ops) <breakpoint_len>: Remove.
3349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3351 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3352 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3353 (struct linux_target_ops) <breakpoint>: Remove.
3354 (struct linux_target_ops) <breakpoint_len>: Remove.
3355 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3356 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3357 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3358 (struct linux_target_ops) <breakpoint>: Remove.
3359 (struct linux_target_ops) <breakpoint_len>: Remove.
3360 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3361 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3362
3363 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3364
3365 * linux-cris-low.c (cris_get_pc): Remove void arg.
3366
3367 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3368
3369 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3370 variable name.
3371
3372 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3373
3374 * inferiors.c (thread_pid_matches_callback): New function.
3375 (find_thread_process): New function.
3376 (remove_thread): Reset current_thread.
3377 (remove_process): Assert threads have been removed first.
3378
3379 2015-10-15 Yao Qi <yao.qi@linaro.org>
3380
3381 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3382 if it is 3.
3383 (aarch64_remove_point): Likewise.
3384 * regcache.c (regcache_register_size): New function.
3385
3386 2015-10-12 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-aarch64-low.c: Update all callers as emit_load_store
3389 is renamed to aarch64_emit_load_store.
3390
3391 2015-10-12 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-aarch64-low.c: Update all callers of function renaming
3394 from emit_insn to aarch64_emit_insn.
3395
3396 2015-10-12 Yao Qi <yao.qi@linaro.org>
3397
3398 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3399 arch/aarch64-insn.h.
3400 (struct aarch64_memory_operand): Likewise.
3401 (ENCODE): Likewise.
3402 (emit_insn): Move to arch/aarch64-insn.c.
3403 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3404 (emit_load_store): Move to arch/aarch64-insn.c.
3405 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3406 (can_encode_int32): Remove.
3407
3408 2015-10-12 Yao Qi <yao.qi@linaro.org>
3409
3410 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3411 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3412 (aarch64_relocate_instruction): Likewise.
3413 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3414 (struct aarch64_insn_visitor): Likewise.
3415
3416 2015-10-12 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3419 (struct aarch64_insn_visitor): New.
3420 (struct aarch64_insn_relocation_data): New.
3421 (aarch64_ftrace_insn_reloc_b): New function.
3422 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3423 (aarch64_ftrace_insn_reloc_cb): Likewise.
3424 (aarch64_ftrace_insn_reloc_tb): Likewise.
3425 (aarch64_ftrace_insn_reloc_adr): Likewise.
3426 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3427 (aarch64_ftrace_insn_reloc_others): Likewise.
3428 (visitor): New.
3429 (aarch64_relocate_instruction): Use visitor.
3430
3431 2015-10-12 Yao Qi <yao.qi@linaro.org>
3432
3433 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3434 int. Add argument buf.
3435 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3436 aarch64_relocate_instruction.
3437
3438 2015-10-12 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3441 argument insn. Remove local variable insn. Don't call
3442 target_read_uint32.
3443 (aarch64_install_fast_tracepoint_jump_pad): Call
3444 target_read_uint32.
3445
3446 2015-09-30 Yao Qi <yao.qi@linaro.org>
3447
3448 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3449 (emit_load_store_pair): Likewise.
3450
3451 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3452
3453 * dll.c (match_dll): Add cast(s).
3454 (unloaded_dll): Likewise.
3455 * linux-low.c (second_thread_of_pid_p): Likewise.
3456 (delete_lwp_callback): Likewise.
3457 (count_events_callback): Likewise.
3458 (select_event_lwp_callback): Likewise.
3459 (linux_set_resume_request): Likewise.
3460 * server.c (accumulate_file_name_length): Likewise.
3461 (emit_dll_description): Likewise.
3462 (handle_qxfer_threads_worker): Likewise.
3463 (visit_actioned_threads): Likewise.
3464 * thread-db.c (any_thread_of): Likewise.
3465 * tracepoint.c (same_process_p): Likewise.
3466 (match_blocktype): Likewise.
3467 (build_traceframe_info_xml): Likewise.
3468
3469 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3470
3471 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3472 assignment.
3473 (gdb_unparse_agent_expr): Likewise.
3474 * hostio.c (require_data): Likewise.
3475 (handle_pread): Likewise.
3476 * linux-low.c (disable_regset): Likewise.
3477 (fetch_register): Likewise.
3478 (store_register): Likewise.
3479 (get_dynamic): Likewise.
3480 (linux_qxfer_libraries_svr4): Likewise.
3481 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3482 (set_fast_tracepoint_jump): Likewise.
3483 (uninsert_fast_tracepoint_jumps_at): Likewise.
3484 (reinsert_fast_tracepoint_jumps_at): Likewise.
3485 (validate_inserted_breakpoint): Likewise.
3486 (clone_agent_expr): Likewise.
3487 * regcache.c (init_register_cache): Likewise.
3488 * remote-utils.c (putpkt_binary_1): Likewise.
3489 (decode_M_packet): Likewise.
3490 (decode_X_packet): Likewise.
3491 (look_up_one_symbol): Likewise.
3492 (relocate_instruction): Likewise.
3493 (monitor_output): Likewise.
3494 * server.c (handle_search_memory): Likewise.
3495 (handle_qxfer_exec_file): Likewise.
3496 (handle_qxfer_libraries): Likewise.
3497 (handle_qxfer): Likewise.
3498 (handle_query): Likewise.
3499 (handle_v_cont): Likewise.
3500 (handle_v_run): Likewise.
3501 (captured_main): Likewise.
3502 * target.c (write_inferior_memory): Likewise.
3503 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3504 * tracepoint.c (init_trace_buffer): Likewise.
3505 (add_tracepoint_action): Likewise.
3506 (add_traceframe): Likewise.
3507 (add_traceframe_block): Likewise.
3508 (cmd_qtdpsrc): Likewise.
3509 (cmd_qtdv): Likewise.
3510 (cmd_qtstatus): Likewise.
3511 (response_source): Likewise.
3512 (response_tsv): Likewise.
3513 (cmd_qtnotes): Likewise.
3514 (gdb_collect): Likewise.
3515 (initialize_tracepoint): Likewise.
3516
3517 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3518
3519 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3520 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3521 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3522 <NOP>: New.
3523 (enum aarch64_condition_codes): New enum.
3524 (w0): New static global.
3525 (fp): Likewise.
3526 (lr): Likewise.
3527 (struct aarch64_memory_operand) <type>: New
3528 MEMORY_OPERAND_POSTINDEX type.
3529 (postindex_memory_operand): New helper function.
3530 (emit_ret): New function.
3531 (emit_load_store_pair): New function, factored out of emit_stp
3532 with support for MEMORY_OPERAND_POSTINDEX.
3533 (emit_stp): Rewrite using emit_load_store_pair.
3534 (emit_ldp): New function.
3535 (emit_load_store): Likewise.
3536 (emit_ldr): Mention post-index instruction in comment.
3537 (emit_ldrh): New function.
3538 (emit_ldrb): New function.
3539 (emit_ldrsw): Mention post-index instruction in comment.
3540 (emit_str): Likewise.
3541 (emit_subs): New function.
3542 (emit_cmp): Likewise.
3543 (emit_and): Likewise.
3544 (emit_orr): Likewise.
3545 (emit_orn): Likewise.
3546 (emit_eor): Likewise.
3547 (emit_mvn): Likewise.
3548 (emit_lslv): Likewise.
3549 (emit_lsrv): Likewise.
3550 (emit_asrv): Likewise.
3551 (emit_mul): Likewise.
3552 (emit_sbfm): Likewise.
3553 (emit_sbfx): Likewise.
3554 (emit_ubfm): Likewise.
3555 (emit_ubfx): Likewise.
3556 (emit_csinc): Likewise.
3557 (emit_cset): Likewise.
3558 (emit_nop): Likewise.
3559 (emit_ops_insns): New helper function.
3560 (emit_pop): Likewise.
3561 (emit_push): Likewise.
3562 (aarch64_emit_prologue): New function.
3563 (aarch64_emit_epilogue): Likewise.
3564 (aarch64_emit_add): Likewise.
3565 (aarch64_emit_sub): Likewise.
3566 (aarch64_emit_mul): Likewise.
3567 (aarch64_emit_lsh): Likewise.
3568 (aarch64_emit_rsh_signed): Likewise.
3569 (aarch64_emit_rsh_unsigned): Likewise.
3570 (aarch64_emit_ext): Likewise.
3571 (aarch64_emit_log_not): Likewise.
3572 (aarch64_emit_bit_and): Likewise.
3573 (aarch64_emit_bit_or): Likewise.
3574 (aarch64_emit_bit_xor): Likewise.
3575 (aarch64_emit_bit_not): Likewise.
3576 (aarch64_emit_equal): Likewise.
3577 (aarch64_emit_less_signed): Likewise.
3578 (aarch64_emit_less_unsigned): Likewise.
3579 (aarch64_emit_ref): Likewise.
3580 (aarch64_emit_if_goto): Likewise.
3581 (aarch64_emit_goto): Likewise.
3582 (aarch64_write_goto_address): Likewise.
3583 (aarch64_emit_const): Likewise.
3584 (aarch64_emit_call): Likewise.
3585 (aarch64_emit_reg): Likewise.
3586 (aarch64_emit_pop): Likewise.
3587 (aarch64_emit_stack_flush): Likewise.
3588 (aarch64_emit_zero_ext): Likewise.
3589 (aarch64_emit_swap): Likewise.
3590 (aarch64_emit_stack_adjust): Likewise.
3591 (aarch64_emit_int_call_1): Likewise.
3592 (aarch64_emit_void_call_2): Likewise.
3593 (aarch64_emit_eq_goto): Likewise.
3594 (aarch64_emit_ne_goto): Likewise.
3595 (aarch64_emit_lt_goto): Likewise.
3596 (aarch64_emit_le_goto): Likewise.
3597 (aarch64_emit_gt_goto): Likewise.
3598 (aarch64_emit_ge_got): Likewise.
3599 (aarch64_emit_ops_impl): New static global variable.
3600 (aarch64_emit_ops): New target function, return
3601 &aarch64_emit_ops_impl.
3602 (struct linux_target_ops): Install it.
3603
3604 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3605
3606 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3607 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3608 aarch64-ipa.o.
3609 * linux-aarch64-ipa.c: New file.
3610 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3611 and endian.h.
3612 (aarch64_get_thread_area): New target method.
3613 (extract_signed_bitfield): New helper function.
3614 (aarch64_decode_ldr_literal): New function.
3615 (enum aarch64_opcodes): New enum.
3616 (struct aarch64_register): New struct.
3617 (struct aarch64_operand): New struct.
3618 (x0): New static global.
3619 (x1): Likewise.
3620 (x2): Likewise.
3621 (x3): Likewise.
3622 (x4): Likewise.
3623 (w2): Likewise.
3624 (ip0): Likewise.
3625 (sp): Likewise.
3626 (xzr): Likewise.
3627 (aarch64_register): New helper function.
3628 (register_operand): Likewise.
3629 (immediate_operand): Likewise.
3630 (struct aarch64_memory_operand): New struct.
3631 (offset_memory_operand): New helper function.
3632 (preindex_memory_operand): Likewise.
3633 (enum aarch64_system_control_registers): New enum.
3634 (ENCODE): New macro.
3635 (emit_insn): New helper function.
3636 (emit_b): New function.
3637 (emit_bcond): Likewise.
3638 (emit_cb): Likewise.
3639 (emit_tb): Likewise.
3640 (emit_blr): Likewise.
3641 (emit_stp): Likewise.
3642 (emit_ldp_q_offset): Likewise.
3643 (emit_stp_q_offset): Likewise.
3644 (emit_load_store): Likewise.
3645 (emit_ldr): Likewise.
3646 (emit_ldrsw): Likewise.
3647 (emit_str): Likewise.
3648 (emit_ldaxr): Likewise.
3649 (emit_stxr): Likewise.
3650 (emit_stlr): Likewise.
3651 (emit_data_processing_reg): Likewise.
3652 (emit_data_processing): Likewise.
3653 (emit_add): Likewise.
3654 (emit_sub): Likewise.
3655 (emit_mov): Likewise.
3656 (emit_movk): Likewise.
3657 (emit_mov_addr): Likewise.
3658 (emit_mrs): Likewise.
3659 (emit_msr): Likewise.
3660 (emit_sevl): Likewise.
3661 (emit_wfe): Likewise.
3662 (append_insns): Likewise.
3663 (can_encode_int32_in): New helper function.
3664 (aarch64_relocate_instruction): New function.
3665 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3666 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3667 (struct linux_target_ops): Install aarch64_get_thread_area,
3668 aarch64_install_fast_tracepoint_jump_pad and
3669 aarch64_get_min_fast_tracepoint_insn_len.
3670
3671 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3672
3673 * Makefile.in (aarch64-insn.o): New rule.
3674 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3675
3676 2015-09-21 Yao Qi <yao.qi@linaro.org>
3677
3678 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3679
3680 2015-09-21 Yao Qi <yao.qi@linaro.org>
3681
3682 * tracepoint.c (max_jump_pad_size): Remove.
3683
3684 2015-09-18 Yao Qi <yao.qi@linaro.org>
3685
3686 * linux-aarch64-low.c: Don't include sys/uio.h.
3687 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3688
3689 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3690
3691 * tracepoint.c (eval_result_type): Change prototype.
3692 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3693
3694 2015-09-15 Pedro Alves <palves@redhat.com>
3695
3696 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3697 Check whether to report exec events instead of checking whether
3698 multiprocess is enabled.
3699
3700 2015-09-15 Pedro Alves <palves@redhat.com>
3701
3702 PR remote/18965
3703 * remote-utils.c (prepare_resume_reply): Merge
3704 TARGET_WAITKIND_VFORK_DONE switch case with the
3705 TARGET_WAITKIND_FORKED case.
3706
3707 2015-09-15 Yao Qi <yao.qi@linaro.org>
3708
3709 * server.c (handle_query): Check string comparison using
3710 "else if" instead of "if".
3711
3712 2015-09-15 Yao Qi <yao.qi@linaro.org>
3713
3714 * server.c (vCont_supported): New global variable.
3715 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3716 matches. Append ";vContSupported+" to own_buf.
3717 (handle_v_requests): Append ";s;S" to own_buf if target supports
3718 hardware single step or vCont_supported is false.
3719 (capture_main): Set vCont_supported to zero.
3720
3721 2015-09-15 Yao Qi <yao.qi@linaro.org>
3722
3723 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3724 it to ...
3725 (linux_supports_hardware_single_step): ... New function.
3726 (linux_target_ops): Update.
3727 * lynx-low.c (lynx_target_ops): Set field
3728 supports_hardware_single_step to target_can_do_hardware_single_step.
3729 * nto-low.c (nto_target_ops): Likewise.
3730 * spu-low.c (spu_target_ops): Likewise.
3731 * win32-low.c (win32_target_ops): Likewise.
3732 * target.c (target_can_do_hardware_single_step): New function.
3733 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3734 Remove. <supports_hardware_single_step>: New field.
3735 (target_supports_conditional_breakpoints): Remove.
3736 (target_supports_hardware_single_step): New macro.
3737 (target_can_do_hardware_single_step): Declare.
3738 * server.c (handle_query): Use target_supports_hardware_single_step
3739 instead of target_supports_conditional_breakpoints.
3740
3741 2015-09-15 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3744 function.
3745 (struct linux_target_ops the_low_target): Install
3746 aarch64_linux_siginfo_fixup.
3747
3748 2015-09-11 Don Breazeal <donb@codesourcery.com>
3749 Luis Machado <lgustavo@codesourcery.com>
3750
3751 * linux-low.c (linux_mourn): Static declaration.
3752 (linux_arch_setup): Move in front of
3753 handle_extended_wait.
3754 (linux_arch_setup_thread): New function.
3755 (handle_extended_wait): Handle exec events. Call
3756 linux_arch_setup_thread. Make event_lwp argument a
3757 pointer-to-a-pointer.
3758 (check_zombie_leaders): Do not check stopped threads.
3759 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3760 (linux_low_filter_event): Add lwp and thread for exec'ing
3761 non-leader thread if leader thread has been deleted.
3762 Refactor code into linux_arch_setup_thread and call it.
3763 Pass child lwp pointer by reference to handle_extended_wait.
3764 (linux_wait_for_event_filtered): Update comment.
3765 (linux_wait_1): Prevent clobbering exec event status.
3766 (linux_supports_exec_events): New function.
3767 (linux_target_ops) <supports_exec_events>: Initialize new member.
3768 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3769 new member.
3770 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3771 * server.c (report_exec_events): New global variable.
3772 (handle_query): Handle qSupported query for exec-events feature.
3773 (captured_main): Initialize report_exec_events.
3774 * server.h (report_exec_events): Declare new global variable.
3775 * target.h (struct target_ops) <supports_exec_events>: New
3776 member.
3777 (target_supports_exec_events): New macro.
3778 * win32-low.c (win32_target_ops) <supports_exec_events>:
3779 Initialize new member.
3780
3781 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3782
3783 * linux-low.c (linux_low_enable_btrace): Remove.
3784 (linux_target_ops): Replace linux_low_enable_btrace with
3785 linux_enable_btrace.
3786
3787 2015-09-03 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-aarch64-low.c (aarch64_insert_point): Call
3790 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3791 returns true.
3792
3793 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3794
3795 * linux-low.c (check_stopped_by_breakpoint): Use
3796 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3797
3798 2015-08-27 Pedro Alves <palves@redhat.com>
3799
3800 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3801
3802 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3803
3804 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3805 the XNEW-family equivalent.
3806 (compile_bytecodes): Likewise.
3807 * dll.c (loaded_dll): Likewise.
3808 * event-loop.c (append_callback_event): Likewise.
3809 (create_file_handler): Likewise.
3810 (create_file_event): Likewise.
3811 * hostio.c (handle_open): Likewise.
3812 * inferiors.c (add_thread): Likewise.
3813 (add_process): Likewise.
3814 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3815 * linux-arm-low.c (arm_new_process): Likewise.
3816 (arm_new_thread): Likewise.
3817 * linux-low.c (add_to_pid_list): Likewise.
3818 (linux_add_process): Likewise.
3819 (handle_extended_wait): Likewise.
3820 (add_lwp): Likewise.
3821 (enqueue_one_deferred_signal): Likewise.
3822 (enqueue_pending_signal): Likewise.
3823 (linux_resume_one_lwp_throw): Likewise.
3824 (linux_resume_one_thread): Likewise.
3825 (linux_read_memory): Likewise.
3826 (linux_write_memory): Likewise.
3827 * linux-mips-low.c (mips_linux_new_process): Likewise.
3828 (mips_linux_new_thread): Likewise.
3829 (mips_add_watchpoint): Likewise.
3830 * linux-x86-low.c (initialize_low_arch): Likewise.
3831 * lynx-low.c (lynx_add_process): Likewise.
3832 * mem-break.c (set_raw_breakpoint_at): Likewise.
3833 (set_breakpoint): Likewise.
3834 (add_condition_to_breakpoint): Likewise.
3835 (add_commands_to_breakpoint): Likewise.
3836 (clone_agent_expr): Likewise.
3837 (clone_one_breakpoint): Likewise.
3838 * regcache.c (new_register_cache): Likewise.
3839 * remote-utils.c (look_up_one_symbol): Likewise.
3840 * server.c (queue_stop_reply): Likewise.
3841 (start_inferior): Likewise.
3842 (queue_stop_reply_callback): Likewise.
3843 (handle_target_event): Likewise.
3844 * spu-low.c (fetch_ppc_memory): Likewise.
3845 (store_ppc_memory): Likewise.
3846 * target.c (set_target_ops): Likewise.
3847 * thread-db.c (thread_db_load_search): Likewise.
3848 (try_thread_db_load_1): Likewise.
3849 * tracepoint.c (add_tracepoint): Likewise.
3850 (add_tracepoint_action): Likewise.
3851 (create_trace_state_variable): Likewise.
3852 (cmd_qtdpsrc): Likewise.
3853 (cmd_qtro): Likewise.
3854 (add_while_stepping_state): Likewise.
3855 * win32-low.c (child_add_thread): Likewise.
3856 (get_image_name): Likewise.
3857
3858 2015-08-25 Yao Qi <yao.qi@linaro.org>
3859
3860 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3861
3862 2015-08-25 Yao Qi <yao.qi@linaro.org>
3863
3864 * Makefile.in (aarch64-linux.o): New rule.
3865 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3866 srv_tgtobj.
3867 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3868 (aarch64_init_debug_reg_state): Make it extern.
3869 (aarch64_linux_prepare_to_resume): Remove.
3870
3871 2015-08-25 Yao Qi <yao.qi@linaro.org>
3872
3873 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3874 lwp_arch_private_info and ptid_of_lwp.
3875
3876 2015-08-25 Yao Qi <yao.qi@linaro.org>
3877
3878 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3879 Find proc_info by find_process_pid. All callers updated.
3880
3881 2015-08-25 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3884 Remove.
3885 (debug_reg_change_callback): Remove.
3886 (aarch64_notify_debug_reg_change): Remove.
3887
3888 2015-08-25 Yao Qi <yao.qi@linaro.org>
3889
3890 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3891 Call current_lwp_ptid.
3892
3893 2015-08-25 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (debug_reg_change_callback): Use
3896 debug_printf.
3897
3898 2015-08-25 Yao Qi <yao.qi@linaro.org>
3899
3900 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3901
3902 2015-08-25 Yao Qi <yao.qi@linaro.org>
3903
3904 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3905
3906 2015-08-25 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3909 the code.
3910
3911 2015-08-25 Yao Qi <yao.qi@linaro.org>
3912
3913 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3914 Remove.
3915 (debug_reg_change_callback): Remove argument entry and add argument
3916 lwp. Remove local variable thread. Don't print thread id in the
3917 debugging output. Don't check whether pid of thread equals to pid.
3918 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3919 iterate_over_lwps instead find_inferior.
3920
3921 2015-08-24 Pedro Alves <palves@redhat.com>
3922
3923 * inferiors.c (get_first_process): New function.
3924 * inferiors.h (get_first_process): New declaration.
3925 * remote-utils.c (read_ptid): Default to the first process in the
3926 list, instead of to the current thread's process.
3927
3928 2015-08-24 Pedro Alves <palves@redhat.com>
3929
3930 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3931 * event-loop.c: Likewise.
3932 * remote-utils.c: Likewise.
3933 * tracepoint.c: Likewise.
3934
3935 2015-08-24 Pedro Alves <palves@redhat.com>
3936
3937 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3938 ptid_get_lwp.
3939
3940 2015-08-21 Pedro Alves <palves@redhat.com>
3941
3942 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3943 instead of literal 1.
3944
3945 2015-08-21 Pedro Alves <palves@redhat.com>
3946
3947 * tdesc.c (default_description): Explicitly zero-initialize.
3948
3949 2015-08-21 Pedro Alves <palves@redhat.com>
3950
3951 PR gdb/18749
3952 * inferiors.c (remove_thread): Discard any pending stop reply for
3953 this thread.
3954 * server.c (remove_all_on_match_pid): Rename to ...
3955 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3956 instead of a pid.
3957 (discard_queued_stop_replies): Change parameter to a ptid. Now
3958 extern.
3959 (handle_v_kill, kill_inferior_callback, captured_main)
3960 (process_serial_event): Adjust.
3961 * server.h (discard_queued_stop_replies): Declare.
3962
3963 2015-08-21 Pedro Alves <palves@redhat.com>
3964
3965 * linux-low.c (wait_for_sigstop): Always switch to no thread
3966 selected if the previously current thread dies.
3967 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3968 process instead of the current thread's.
3969 * remote-utils.c (input_interrupt): Don't check if there's no
3970 current thread.
3971 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3972 current thread to the general thread fails, error out.
3973 (handle_qxfer_auxv, handle_qxfer_libraries)
3974 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3975 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3976 (handle_query): Check if there's a thread selected instead of
3977 checking whether there's any thread in the thread list.
3978 (handle_qxfer_threads, handle_qxfer_btrace)
3979 (handle_qxfer_btrace_conf): Don't error out early if there's no
3980 thread in the thread list.
3981 (handle_v_cont, myresume): Don't set the current thread to the
3982 continue thread.
3983 (process_serial_event) <Hg handling>: Also set thread_id if the
3984 previous general thread is still alive.
3985 (process_serial_event) <g/G handling>: If setting the current
3986 thread to the general thread fails, error out.
3987 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3988 thread's lwp instead of the current thread's.
3989 * target.c (set_desired_thread): If the desired thread was not
3990 found, leave the current thread pointing to NULL. Return an int
3991 (boolean) indicating success.
3992 * target.h (set_desired_thread): Change return type to int.
3993
3994 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3995
3996 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3997 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3998 #includes.
3999 (ps_get_thread_area): New function.
4000
4001 2015-08-19 Gary Benson <gbenson@redhat.com>
4002
4003 * hostio.c (handle_pread): Do not attempt to read more data
4004 than hostio_reply_with_data can fit in a packet.
4005
4006 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4007
4008 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4009
4010 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4011
4012 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4013
4014 2015-08-06 Pedro Alves <palves@redhat.com>
4015
4016 * tracepoint.c (expr_eval_result): Now an int.
4017
4018 2015-08-06 Pedro Alves <palves@redhat.com>
4019
4020 * gdbthread.h (struct regcache): Forward declare.
4021 (struct thread_info) <regcache_data>: Now a struct regcache
4022 pointer.
4023 * inferiors.c (inferior_regcache_data)
4024 (set_inferior_regcache_data): Now work with struct regcache
4025 pointers.
4026 * inferiors.h (struct regcache): Forward declare.
4027 (inferior_regcache_data, set_inferior_regcache_data): Now work
4028 with struct regcache pointers.
4029 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4030 (free_register_cache_thread): Remove struct regcache pointer
4031 casts.
4032
4033 2015-08-06 Pedro Alves <palves@redhat.com>
4034
4035 * server.c (captured_main): On error, print the exception message
4036 to stderr, and if run_once is set, throw a quit.
4037
4038 2015-08-06 Pedro Alves <palves@redhat.com>
4039
4040 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4041 the current thread.
4042
4043 2015-08-06 Pedro Alves <palves@redhat.com>
4044
4045 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4046 reading beyond the passed in buffer length.
4047
4048 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4049
4050 * tracepoint.c (symbol_list) <required>: Remove.
4051
4052 2015-08-06 Pedro Alves <palves@redhat.com>
4053
4054 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4055 count if stopping and suspending threads.
4056 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4057 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4058 (linux_detach): Complete an ongoing step-over.
4059 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4060 throughout.
4061 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4062 (linux_wait_1): If passing a signal to the inferior after
4063 finishing a step-over, unsuspend and re-resume all lwps. If we
4064 see a single-step event but the thread should be continuing, don't
4065 pass the trap to gdb.
4066 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4067 internal_error instead of gdb_assert.
4068 (enqueue_pending_signal): New function.
4069 (check_ptrace_stopped_lwp_gone): Add debug output.
4070 (start_step_over): Use internal_error instead of gdb_assert.
4071 (complete_ongoing_step_over): New function.
4072 (linux_resume_one_thread): Don't resume a suspended thread.
4073 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4074 it stepping.
4075
4076 2015-08-06 Pedro Alves <palves@redhat.com>
4077
4078 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4079 (linux_thread_alive): Use lwp_is_marked_dead.
4080 (extended_event_reported): Delete.
4081 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4082 instead of extended_event_reported.
4083 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4084 as well.
4085 (lwp_is_marked_dead): New function.
4086 (lwp_running): Use lwp_is_marked_dead.
4087 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4088 comment.
4089
4090 2015-08-06 Pedro Alves <palves@redhat.com>
4091
4092 * linux-low.c (linux_wait_1): Move fork event output out of the
4093 !report_to_gdb check. Pass event_child->waitstatus to
4094 target_waitstatus_to_string instead of ourstatus.
4095
4096 2015-08-04 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4099 if current_thread is 32 bit.
4100
4101 2015-08-04 Yao Qi <yao.qi@linaro.org>
4102
4103 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4104 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4105 * server.c (extended_protocol): Remove "static".
4106 * server.h (extended_protocol): Declare it.
4107
4108 2015-08-04 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4111 both aarch64 and aarch32.
4112 (aarch64_set_pc): Likewise.
4113
4114 2015-08-04 Yao Qi <yao.qi@linaro.org>
4115
4116 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4117 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4118 arm-with-neon.xml to srv_xmlfiles.
4119 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4120 (is_64bit_tdesc): New function.
4121 (aarch64_linux_read_description): New function.
4122 (aarch64_arch_setup): Call aarch64_linux_read_description.
4123 (regs_info): Rename to regs_info_aarch64.
4124 (aarch64_regs_info): Return right regs_info.
4125 (initialize_low_arch): Call initialize_low_arch_aarch32.
4126
4127 2015-08-04 Yao Qi <yao.qi@linaro.org>
4128
4129 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4130 * linux-aarch32-low.c: New file.
4131 * linux-aarch32-low.h: New file.
4132 * linux-arm-low.c (arm_fill_gregset): Move it to
4133 linux-aarch32-low.c.
4134 (arm_store_gregset): Likewise.
4135 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4136 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4137 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4138 (regs_info): Rename to regs_info_arm.
4139 (arm_regs_info): Return regs_info_aarch32 if
4140 have_ptrace_getregset is 1 and target description is
4141 arm_with_neon or arm_with_vfpv3.
4142 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4143 Call initialize_low_arch_aarch32 instead.
4144
4145 2015-08-04 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4148 * linux-low.c: ... here.
4149 * linux-low.h (have_ptrace_getregset): Declare it.
4150
4151 2015-08-04 Pedro Alves <palves@redhat.com>
4152
4153 * thread-db.c (struct thread_db): Use new typedefs.
4154 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4155 CHK calls.
4156 (disable_thread_event_reporting): Cast result of dlsym to
4157 destination function pointer type.
4158 (thread_db_mourn): Use td_ta_delete_ftype.
4159
4160 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4161
4162 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4163 arch variant.
4164 (CDX_BREAKPOINT): Define for R2.
4165 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4166 (the_low_target): Add comments.
4167
4168 2015-07-30 Yao Qi <yao.qi@linaro.org>
4169
4170 * linux-arm-low.c (arm_hwcap): Remove it.
4171 (arm_read_description): New local variable arm_hwcap. Don't
4172 set arm_hwcap to zero.
4173
4174 2015-07-30 Yao Qi <yao.qi@linaro.org>
4175
4176 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4177 Use regcache->tdesc instead.
4178 (arm_store_wmmxregset): Likewise.
4179 (arm_fill_vfpregset): Likewise.
4180 (arm_store_vfpregset): Likewise.
4181
4182 2015-07-30 Yao Qi <yao.qi@linaro.org>
4183
4184 * linux-arm-low.c: Include arch/arm.h.
4185 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4186 (arm_store_gregset): Likewise.
4187
4188 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4189
4190 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4191 ptrace's 4th parameter.
4192
4193 2015-07-27 Yao Qi <yao.qi@linaro.org>
4194
4195 * configure.srv (case aarch64*-*-linux*): Don't set
4196 srv_linux_usrregs.
4197
4198 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4199
4200 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4201 sys/ptrace.h.
4202 * linux-arm-low.c: Likewise.
4203 * linux-cris-low.c: Likewise.
4204 * linux-crisv32-low.c: Likewise.
4205 * linux-low.c: Likewise.
4206 * linux-m68k-low.c: Likewise.
4207 * linux-mips-low.c: Likewise.
4208 * linux-nios2-low.c: Likewise.
4209 * linux-s390-low.c: Likewise.
4210 * linux-sparc-low.c: Likewise.
4211 * linux-tic6x-low.c: Likewise.
4212 * linux-tile-low.c: Likewise.
4213 * linux-x86-low.c: Likewise.
4214
4215 2015-07-24 Pedro Alves <palves@redhat.com>
4216
4217 * config.in: Regenerate.
4218 * configure: Regenerate.
4219
4220 2015-07-24 Pedro Alves <palves@redhat.com>
4221
4222 * acinclude.m4: Include ../ptrace.m4.
4223 * configure.ac: Call GDB_AC_PTRACE.
4224 * config.in, configure: Regenerate.
4225
4226 2015-07-24 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-low.c (linux_create_inferior): Remove setting to
4229 proc->priv->new_inferior.
4230 (linux_attach): Likewise.
4231 (linux_low_filter_event): Likewise.
4232 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4233
4234 2015-07-24 Yao Qi <yao.qi@linaro.org>
4235
4236 * linux-low.c (linux_arch_setup): New function.
4237 (linux_low_filter_event): If proc->tdesc is NULL and
4238 proc->attached is true, call the_low_target.arch_setup.
4239 Otherwise, keep status pending, and return.
4240 (linux_resume_one_lwp_throw): Don't call get_pc if
4241 thread->while_stepping isn't NULL. Don't call
4242 get_thread_regcache if proc->tdesc is NULL.
4243 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4244 (linux_target_ops): Install arch_setup.
4245 * server.c (start_inferior): Call the_target->arch_setup.
4246 * target.h (struct target_ops) <arch_setup>: New field.
4247 (target_arch_setup): New marco.
4248 * lynx-low.c (lynx_target_ops): Update.
4249 * nto-low.c (nto_target_ops): Update.
4250 * spu-low.c (spu_target_ops): Update.
4251 * win32-low.c (win32_target_ops): Update.
4252
4253 2015-07-24 Yao Qi <yao.qi@linaro.org>
4254
4255 * linux-low.c (linux_add_process): Don't set
4256 proc->priv->new_inferior.
4257 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4258 (linux_attach): Likewise.
4259
4260 2015-07-24 Yao Qi <yao.qi@linaro.org>
4261
4262 * server.c (start_inferior): Code refactor.
4263
4264 2015-07-24 Yao Qi <yao.qi@linaro.org>
4265
4266 * server.c (process_serial_event): Set general_thread.
4267
4268 2015-07-21 Yao Qi <yao.qi@linaro.org>
4269
4270 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4271 aarch64_linux_get_debug_reg_capacity.
4272
4273 2015-07-17 Yao Qi <yao.qi@linaro.org>
4274
4275 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4276 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4277 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4278 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4279 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4280 (AARCH64_HWP_ALIGNMENT): Likewise.
4281 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4282 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4283 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4284 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4285 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4286 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4287 (struct aarch64_debug_reg_state): Likewise.
4288 (struct arch_lwp_info): Likewise.
4289 (aarch64_align_watchpoint): Likewise.
4290 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4291 (aarch64_watchpoint_length): Likewise.
4292 (aarch64_point_encode_ctrl_reg): Likewise
4293 (aarch64_point_is_aligned): Likewise.
4294 (aarch64_align_watchpoint): Likewise.
4295 (aarch64_linux_set_debug_regs):
4296 (aarch64_dr_state_insert_one_point): Likewise.
4297 (aarch64_dr_state_remove_one_point): Likewise.
4298 (aarch64_handle_breakpoint): Likewise.
4299 (aarch64_handle_aligned_watchpoint): Likewise.
4300 (aarch64_handle_unaligned_watchpoint): Likewise.
4301 (aarch64_handle_watchpoint): Likewise.
4302
4303 2015-07-17 Yao Qi <yao.qi@linaro.org>
4304
4305 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4306 and don't aarch64_get_debug_reg_state. All callers update.
4307 (aarch64_handle_aligned_watchpoint): Likewise.
4308 (aarch64_handle_unaligned_watchpoint): Likewise.
4309 (aarch64_handle_watchpoint): Likewise.
4310 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4311 (aarch64_remove_point): Likewise.
4312
4313 2015-07-17 Yao Qi <yao.qi@linaro.org>
4314
4315 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4316 debug_printf.
4317 (aarch64_handle_unaligned_watchpoint): Likewise.
4318
4319 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4320
4321 Revert the previous 3 commits:
4322 Move gdb_regex* to common/
4323 Move linux_find_memory_regions_full & co.
4324 gdbserver build-id attribute generator
4325
4326 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4327 Jan Kratochvil <jan.kratochvil@redhat.com>
4328
4329 gdbserver build-id attribute generator.
4330 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4331 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4332 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4333 (find_phdr): New.
4334 (get_dynamic): Use find_pdhr to traverse program headers.
4335 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4336 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4337 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4338 (get_hex_build_id): New.
4339 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4340 to reply XML document.
4341
4342 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4343 Jan Kratochvil <jan.kratochvil@redhat.com>
4344
4345 * target.c: Include target/target-utils.h and fcntl.h.
4346 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4347 (target_fileio_read_stralloc): New functions.
4348
4349 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4350
4351 * Makefile.in (OBS): Add gdb_regex.o.
4352 (gdb_regex.o): New.
4353 * config.in: Rebuilt.
4354 * configure: Rebuilt.
4355
4356 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4357 Jan Kratochvil <jan.kratochvil@redhat.com>
4358
4359 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4360 * Makefile.in (OBS): Add target-utils.o.
4361 (linux-maps.o, target-utils.o): New.
4362 * configure.srv (srv_linux_obj): Add linux-maps.o.
4363
4364 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4365
4366 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4367 function, return 1.
4368 (the_low_target): Install it.
4369
4370 2015-07-14 Pedro Alves <palves@redhat.com>
4371
4372 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4373 Instead, ignore ECHILD, and throw an error for other errnos.
4374
4375 2015-07-10 Pedro Alves <palves@redhat.com>
4376
4377 * event-loop.c (struct callback_event) <data>: Change type to
4378 gdb_client_data instance instead of gdb_client_data pointer.
4379 (append_callback_event): Adjust.
4380
4381 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4382
4383 * linux-aarch64-low.c: Add comments for each linux_target_ops
4384 method. Remove comments already covered in target_ops and
4385 linux_target_ops definitions.
4386 (the_low_target): Add comments for each unimplemented method.
4387
4388 2015-07-09 Yao Qi <yao.qi@linaro.org>
4389
4390 * linux-aarch64-low.c (aarch64_regmap): Remove.
4391 (aarch64_usrregs_info): Remove.
4392 (regs_info): Set field usrregs to NULL.
4393
4394 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4395
4396 * linux-low.c: Include "rsp-low.h"
4397 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4398 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4399 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4400 (handle_btrace_enable_pt): New.
4401 (handle_btrace_general_set): Support "pt".
4402 (handle_btrace_conf_general_set): Support "pt:size".
4403
4404 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4405
4406 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4407 Z_PACKET_SW_BP.
4408
4409 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4410
4411 * linux-aarch64-low.c: Remove comment about endianness.
4412 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4413 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4414 memcmp.
4415
4416 2015-06-24 Gary Benson <gbenson@redhat.com>
4417
4418 * linux-i386-ipa.c (stdint.h): Do not include.
4419 * lynx-i386-low.c (stdint.h): Likewise.
4420 * lynx-ppc-low.c (stdint.h): Likewise.
4421 * mem-break.c (stdint.h): Likewise.
4422 * thread-db.c (stdint.h): Likewise.
4423 * tracepoint.c (stdint.h): Likewise.
4424 * win32-low.c (stdint.h): Likewise.
4425
4426 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4427
4428 * server.c (write_qxfer_response): Update call to
4429 remote_escape_output.
4430
4431 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4432 Jan Kratochvil <jan.kratochvil@redhat.com>
4433
4434 Merge multiple hex conversions.
4435 * gdbreplay.c (tohex): Rename to 'fromhex'.
4436 (logchar): Use fromhex.
4437
4438 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4439
4440 * server.c (handle_qxfer_libraries): Set `version' attribute for
4441 <library-list>.
4442
4443 2015-06-10 Gary Benson <gbenson@redhat.com>
4444
4445 * target.h (struct target_ops) <multifs_open>: New field.
4446 <multifs_unlink>: Likewise.
4447 <multifs_readlink>: Likewise.
4448 * linux-low.c (nat/linux-namespaces.h): New include.
4449 (linux_target_ops): Initialize the_target->multifs_open,
4450 the_target->multifs_unlink and the_target->multifs_readlink.
4451 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4452 * hostio.c (hostio_fs_pid): New static variable.
4453 (hostio_handle_new_gdb_connection): New function.
4454 (handle_setfs): Likewise.
4455 (handle_open): Use the_target->multifs_open as appropriate.
4456 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4457 (handle_readlink): Use the_target->multifs_readlink as
4458 appropriate.
4459 (handle_vFile): Handle vFile:setfs packets.
4460 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4461 after target_handle_new_gdb_connection.
4462
4463 2015-06-10 Gary Benson <gbenson@redhat.com>
4464
4465 * configure.ac (AC_CHECK_FUNCS): Add setns.
4466 * config.in: Regenerate.
4467 * configure: Likewise.
4468 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4469 (linux-namespaces.o): New rule.
4470 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4471
4472 2015-06-09 Gary Benson <gbenson@redhat.com>
4473
4474 * hostio.c (handle_open): Process mode argument with
4475 fileio_to_host_mode.
4476
4477 2015-06-01 Yao Qi <yao.qi@linaro.org>
4478
4479 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4480 * linux-x86-low.c: Likewise.
4481
4482 2015-05-28 Don Breazeal <donb@codesourcery.com>
4483
4484 * linux-low.c (handle_extended_wait): Initialize
4485 thread_info.last_resume_kind for new fork children.
4486
4487 2015-05-15 Pedro Alves <palves@redhat.com>
4488
4489 * target.h (target_handle_new_gdb_connection): Rewrite using if
4490 wrapped in do/while.
4491
4492 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4493
4494 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4495 * configure, config.in: Regenerate.
4496 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4497 Declare typedef.
4498
4499 2015-05-12 Don Breazeal <donb@codesourcery.com>
4500
4501 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4502 PTRACE_EVENT_VFORK_DONE.
4503 (linux_low_ptrace_options, extended_event_reported): Add vfork
4504 events.
4505 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4506 and "vforkdone" for RSP 'T' Stop Reply Packet.
4507 * server.h (report_vfork_events): Declare
4508 global variable.
4509
4510 2015-05-12 Don Breazeal <donb@codesourcery.com>
4511
4512 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4513 (the_low_target) <new_fork>: Initialize new member.
4514 * linux-arm-low.c (arm_new_fork): New function.
4515 (the_low_target) <new_fork>: Initialize new member.
4516 * linux-low.c (handle_extended_wait): Call new target function
4517 new_fork.
4518 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4519 * linux-mips-low.c (mips_add_watchpoint): New function
4520 extracted from mips_insert_point.
4521 (the_low_target) <new_fork>: Initialize new member.
4522 (mips_linux_new_fork): New function.
4523 (mips_insert_point): Call mips_add_watchpoint.
4524 * linux-x86-low.c (x86_linux_new_fork): New function.
4525 (the_low_target) <new_fork>: Initialize new member.
4526
4527 2015-05-12 Don Breazeal <donb@codesourcery.com>
4528
4529 * linux-low.c (handle_extended_wait): Implement return value,
4530 rename argument 'event_child' to 'event_lwp', handle
4531 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4532 (linux_low_ptrace_options): New function.
4533 (linux_low_filter_event): Call linux_low_ptrace_options,
4534 use different argument fo linux_enable_event_reporting,
4535 use return value from handle_extended_wait.
4536 (extended_event_reported): New function.
4537 (linux_wait_1): Call extended_event_reported and set
4538 status to report fork events.
4539 (linux_write_memory): Add pid to debug message.
4540 (reset_lwp_ptrace_options_callback): New function.
4541 (linux_handle_new_gdb_connection): New function.
4542 (linux_target_ops): Initialize new structure member.
4543 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4544 * lynx-low.c: Initialize new structure member.
4545 * remote-utils.c (prepare_resume_reply): Implement stop reason
4546 "fork" for "T" stop message.
4547 * server.c (handle_query): Call handle_new_gdb_connection.
4548 * server.h (report_fork_events): Declare global flag.
4549 * target.h (struct target_ops) <handle_new_gdb_connection>:
4550 New member.
4551 (target_handle_new_gdb_connection): New macro.
4552 * win32-low.c: Initialize new structure member.
4553
4554 2015-05-12 Don Breazeal <donb@codesourcery.com>
4555
4556 * mem-break.c (APPEND_TO_LIST): Define macro.
4557 (clone_agent_expr): New function.
4558 (clone_one_breakpoint): New function.
4559 (clone_all_breakpoints): New function.
4560 * mem-break.h: Declare new functions.
4561
4562 2015-05-12 Don Breazeal <donb@codesourcery.com>
4563
4564 * linux-low.c (linux_supports_fork_events): New function.
4565 (linux_supports_vfork_events): New function.
4566 (linux_target_ops): Initialize new structure members.
4567 (initialize_low): Call linux_check_ptrace_features.
4568 * lynx-low.c (lynx_target_ops): Initialize new structure
4569 members.
4570 * server.c (report_fork_events, report_vfork_events):
4571 New global flags.
4572 (handle_query): Add new features to qSupported packet and
4573 response.
4574 (captured_main): Initialize new global variables.
4575 * target.h (struct target_ops) <supports_fork_events>:
4576 New member.
4577 <supports_vfork_events>: New member.
4578 (target_supports_fork_events): New macro.
4579 (target_supports_vfork_events): New macro.
4580 * win32-low.c (win32_target_ops): Initialize new structure
4581 members.
4582
4583 2015-05-12 Gary Benson <gbenson@redhat.com>
4584
4585 * server.c (handle_qxfer_exec_file): Use current process
4586 if annex is empty.
4587
4588 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4589
4590 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4591 Remove HAVE_PTRACE_GETREGS conditionals.
4592 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4593 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4594
4595 2015-05-08 Yao Qi <yao.qi@linaro.org>
4596
4597 * linux-low.c (linux_supports_conditional_breakpoints): New
4598 function.
4599 (linux_target_ops): Install new target method.
4600 * lynx-low.c (lynx_target_ops): Install NULL hook for
4601 supports_conditional_breakpoints.
4602 * nto-low.c (nto_target_ops): Likewise.
4603 * spu-low.c (spu_target_ops): Likewise.
4604 * win32-low.c (win32_target_ops): Likewise.
4605 * server.c (handle_query): Check
4606 target_supports_conditional_breakpoints.
4607 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4608 New field.
4609 (target_supports_conditional_breakpoints): New macro.
4610
4611 2015-05-06 Pedro Alves <palves@redhat.com>
4612
4613 PR server/18081
4614 * server.c (start_inferior): If the process exits, mourn it.
4615
4616 2015-04-21 Gary Benson <gbenson@redhat.com>
4617
4618 * hostio.c (fileio_open_flags_to_host): Factored out to
4619 fileio_to_host_openflags in common/fileio.c. Single use
4620 updated.
4621
4622 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4623
4624 * linux-xtensa-low.c (xtensa_fill_gregset)
4625 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4626 XCHAL_HAVE_LOOP.
4627
4628 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4629
4630 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4631 (regs_info): Replace usrregs pointer with NULL.
4632
4633 2015-04-17 Gary Benson <gbenson@redhat.com>
4634
4635 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4636 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4637 * server.c (handle_qxfer_exec_file): New function.
4638 (qxfer_packets): Add exec-file entry.
4639 (handle_query): Report qXfer:exec-file:read as supported packet.
4640
4641 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4642
4643 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4644
4645 2015-04-09 Gary Benson <gbenson@redhat.com>
4646
4647 * hostio-errno.c (errno_to_fileio_error): Remove function.
4648 Update caller to use remote_fileio_to_fio_error.
4649
4650 2015-04-09 Yao Qi <yao.qi@linaro.org>
4651
4652 * linux-low.c (linux_insert_point): Call
4653 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4654 (linux_remove_point): Call remove_memory_breakpoint if type is
4655 raw_bkpt_type_sw.
4656 * linux-x86-low.c (x86_insert_point): Don't call
4657 insert_memory_breakpoint.
4658 (x86_remove_point): Don't call remove_memory_breakpoint.
4659
4660 2015-04-01 Pedro Alves <palves@redhat.com>
4661 Cleber Rosa <crosa@redhat.com>
4662
4663 * server.c (gdbserver_usage): Reorganize and extend the usage
4664 message.
4665
4666 2015-03-24 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4669 output. Also dump TRAP_TRACE.
4670 (linux_low_filter_event): In debug output, distinguish a
4671 resume_stop SIGSTOP from a delayed SIGSTOP.
4672
4673 2015-03-24 Gary Benson <gbenson@redhat.com>
4674
4675 * linux-x86-low.c (x86_linux_new_thread): Moved to
4676 nat/x86-linux.c.
4677 (x86_linux_prepare_to_resume): Likewise.
4678
4679 2015-03-24 Gary Benson <gbenson@redhat.com>
4680
4681 * Makefile.in (x86-linux-dregs.o): New rule.
4682 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4683 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4684 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4685 (x86_linux_dr_get): Likewise.
4686 (x86_linux_dr_set): Likewise.
4687 (update_debug_registers_callback): Likewise.
4688 (x86_linux_dr_set_addr): Likewise.
4689 (x86_linux_dr_get_addr): Likewise.
4690 (x86_linux_dr_set_control): Likewise.
4691 (x86_linux_dr_get_control): Likewise.
4692 (x86_linux_dr_get_status): Likewise.
4693 (x86_linux_update_debug_registers): Likewise.
4694
4695 2015-03-24 Gary Benson <gbenson@redhat.com>
4696
4697 * linux-x86-low.c (x86_linux_update_debug_registers):
4698 New function, factored out from...
4699 (x86_linux_prepare_to_resume): ...this.
4700
4701 2015-03-24 Gary Benson <gbenson@redhat.com>
4702
4703 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4704 (x86_linux_dr_set): Likewise.
4705 (update_debug_registers_callback): Likewise.
4706 (x86_linux_dr_set_addr): Likewise.
4707 (x86_linux_dr_get_addr): Likewise.
4708 (x86_linux_dr_set_control): Likewise.
4709 (x86_linux_dr_get_control): Likewise.
4710 (x86_linux_dr_get_status): Likewise.
4711 (x86_linux_prepare_to_resume): Likewise.
4712
4713 2015-03-24 Gary Benson <gbenson@redhat.com>
4714
4715 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4716 Use perror_with_name. Pass string through gettext.
4717 (x86_linux_dr_set): Likewise.
4718
4719 2015-03-24 Gary Benson <gbenson@redhat.com>
4720
4721 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4722 (x86_linux_dr_set_addr): ...this.
4723 (x86_dr_low_get_addr): Rename to...
4724 (x86_linux_dr_get_addr): ...this.
4725 (x86_dr_low_set_control): Rename to...
4726 (x86_linux_dr_set_control): ...this.
4727 (x86_dr_low_get_control): Rename to...
4728 (x86_linux_dr_get_control): ...this.
4729 (x86_dr_low_get_status): Rename to...
4730 (x86_linux_dr_get_status): ...this.
4731 (x86_dr_low): Update with new function names.
4732
4733 2015-03-24 Gary Benson <gbenson@redhat.com>
4734
4735 * Makefile.in (x86-linux.o): New rule.
4736 * configure.srv: Add x86-linux.o to relevant targets.
4737 * linux-low.c (lwp_set_arch_private_info): New function.
4738 (lwp_arch_private_info): Likewise.
4739 * linux-x86-low.c: Include nat/x86-linux.h.
4740 (arch_lwp_info): Removed structure.
4741 (update_debug_registers_callback):
4742 Use lwp_set_debug_registers_changed.
4743 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4744 and lwp_set_debug_registers_changed.
4745 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4746
4747 2015-03-24 Gary Benson <gbenson@redhat.com>
4748
4749 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4750 * linux-arm-low.c (arm_new_thread): Likewise.
4751 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4752 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4753 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4754 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4755
4756 2015-03-24 Gary Benson <gbenson@redhat.com>
4757
4758 * linux-low.c (ptid_of_lwp): New function.
4759 (lwp_is_stopped): Likewise.
4760 (lwp_stop_reason): Likewise.
4761 * linux-x86-low.c (update_debug_registers_callback):
4762 Use lwp_is_stopped.
4763 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4764 lwp_stop_reason.
4765
4766 2015-03-24 Gary Benson <gbenson@redhat.com>
4767
4768 * linux-low.h (linux_stop_lwp): Remove declaration.
4769
4770 2015-03-24 Gary Benson <gbenson@redhat.com>
4771
4772 * linux-low.h: Include nat/linux-nat.h.
4773 * linux-low.c (iterate_over_lwps_args): New structure.
4774 (iterate_over_lwps_filter): New function.
4775 (iterate_over_lwps): Likewise.
4776 * linux-x86-low.c (update_debug_registers_callback):
4777 Update signature to what iterate_over_lwps expects.
4778 Remove PID check that iterate_over_lwps now performs.
4779 (x86_dr_low_set_addr): Use iterate_over_lwps.
4780 (x86_dr_low_set_control): Likewise.
4781
4782 2015-03-24 Gary Benson <gbenson@redhat.com>
4783
4784 * linux-x86-low.c (x86_debug_reg_state): New function.
4785 (x86_linux_prepare_to_resume): Use the above.
4786
4787 2015-03-24 Gary Benson <gbenson@redhat.com>
4788
4789 * linux-low.c (current_lwp_ptid): New function.
4790 * linux-x86-low.c: Include nat/linux-nat.h.
4791 (x86_dr_low_get_addr): Use current_lwp_ptid.
4792 (x86_dr_low_get_control): Likewise.
4793 (x86_dr_low_get_status): Likewise.
4794
4795 2015-03-20 Pedro Alves <palves@redhat.com>
4796
4797 * tracepoint.c (cmd_qtstatus): Make "str" const.
4798
4799 2015-03-20 Pedro Alves <palves@redhat.com>
4800
4801 * server.c (handle_general_set): Make "req_str" const.
4802
4803 2015-03-19 Pedro Alves <palves@redhat.com>
4804
4805 * linux-low.c (linux_resume_one_lwp): Rename to ...
4806 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4807 instead call perror_with_name.
4808 (check_ptrace_stopped_lwp_gone): New function.
4809 (linux_resume_one_lwp): Reimplement as wrapper around
4810 linux_resume_one_lwp_throw that swallows errors if the LWP is
4811 gone.
4812
4813 2015-03-19 Pedro Alves <palves@redhat.com>
4814
4815 * linux-low.c (count_events_callback, select_event_lwp_callback):
4816 No longer check whether the thread has resume_stop as last resume
4817 kind.
4818
4819 2015-03-19 Pedro Alves <palves@redhat.com>
4820
4821 * linux-low.c (count_events_callback, select_event_lwp_callback):
4822 Use the lwp's status_pending_p field, not the thread's.
4823
4824 2015-03-19 Pedro Alves <palves@redhat.com>
4825
4826 * linux-low.c (select_event_lwp_callback): Update comments to
4827 no longer mention SIGTRAP.
4828
4829 2015-03-18 Gary Benson <gbenson@redhat.com>
4830
4831 * server.c (handle_query): Do not report vFile:fstat as supported.
4832
4833 2015-03-11 Gary Benson <gbenson@redhat.com>
4834
4835 * hostio.c (sys/types.h): New include.
4836 (sys/stat.h): Likewise.
4837 (common-remote-fileio.h): Likewise.
4838 (handle_fstat): New function.
4839 (handle_vFile): Handle vFile:fstat packets.
4840
4841 2015-03-11 Gary Benson <gbenson@redhat.com>
4842
4843 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4844 struct stat.st_blocks and struct stat.st_blksize.
4845 * configure: Regenerate.
4846 * config.in: Likewise.
4847 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4848 (OBS): Add common-remote-fileio.o.
4849 (common-remote-fileio.o): New rule.
4850
4851 2015-03-09 Pedro Alves <palves@redhat.com>
4852
4853 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4854 'struct sockaddr' pointer in 'accept' call.
4855
4856 2015-03-09 Pedro Alves <palves@redhat.com>
4857
4858 Revert:
4859 2015-03-07 Pedro Alves <palves@redhat.com>
4860 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4861 or <winsock2.h> here. Instead include "gdb_socket.h".
4862 (remote_open): Use union gdb_sockaddr_u.
4863 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4864 or <winsock2.h> here. Instead include "gdb_socket.h".
4865 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4866 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4867 or <sys/un.h>.
4868 (init_named_socket, gdb_agent_helper_thread): Use union
4869 gdb_sockaddr_u.
4870
4871 2015-03-07 Pedro Alves <palves@redhat.com>
4872
4873 * configure.ac (build_warnings): Move
4874 -Wdeclaration-after-statement to the C-specific set.
4875 * configure: Regenerate.
4876
4877 2015-03-07 Pedro Alves <palves@redhat.com>
4878
4879 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4880 or <winsock2.h> here. Instead include "gdb_socket.h".
4881 (remote_open): Use union gdb_sockaddr_u.
4882 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4883 or <winsock2.h> here. Instead include "gdb_socket.h".
4884 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4885 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4886 or <sys/un.h>.
4887 (init_named_socket, gdb_agent_helper_thread): Use union
4888 gdb_sockaddr_u.
4889
4890 2015-03-07 Pedro Alves <palves@redhat.com>
4891
4892 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4893 instead.
4894
4895 2015-03-06 Yao Qi <yao.qi@linaro.org>
4896
4897 * linux-aarch64-low.c (aarch64_insert_point): Use
4898 show_debug_regs as a boolean.
4899 (aarch64_remove_point): Likewise.
4900
4901 2015-03-05 Pedro Alves <palves@redhat.com>
4902
4903 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4904 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4905 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4906 * nto-low.c (nto_target_ops): Likewise.
4907 * spu-low.c (spu_target_ops): Likewise.
4908 * win32-low.c (win32_target_ops): Likewise.
4909
4910 2015-03-04 Pedro Alves <palves@redhat.com>
4911
4912 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4913 Decide whether a breakpoint triggered based on the SIGTRAP's
4914 siginfo.si_code.
4915 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4916 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4917 (linux_low_filter_event): Check for breakpoints before checking
4918 watchpoints.
4919 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4920 siginfo.si_code.
4921 (linux_stopped_by_sw_breakpoint)
4922 (linux_supports_stopped_by_sw_breakpoint)
4923 (linux_stopped_by_hw_breakpoint)
4924 (linux_supports_stopped_by_hw_breakpoint): New functions.
4925 (linux_target_ops): Install new target methods.
4926
4927 2015-03-04 Pedro Alves <palves@redhat.com>
4928
4929 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4930 * server.c (swbreak_feature, hwbreak_feature): New globals.
4931 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4932 (captured_main): Clear swbreak_feature and hwbreak_feature.
4933 * server.h (swbreak_feature, hwbreak_feature): Declare.
4934 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4935 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4936 supports_stopped_by_hw_breakpoint>: New fields.
4937 (target_supports_stopped_by_sw_breakpoint)
4938 (target_stopped_by_sw_breakpoint)
4939 (target_supports_stopped_by_hw_breakpoint)
4940 (target_stopped_by_hw_breakpoint): Declare.
4941
4942 2015-03-04 Pedro Alves <palves@redhat.com>
4943
4944 enum lwp_stop_reason -> enum target_stop_reason
4945 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4946 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4947 (linux_wait_1, stuck_in_jump_pad_callback)
4948 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4949 (linux_stopped_by_watchpoint):
4950 * linux-low.h (enum lwp_stop_reason): Delete.
4951 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4952 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4953
4954 2015-03-04 Yao Qi <yao.qi@linaro.org>
4955
4956 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4957
4958 2015-03-03 Gary Benson <gbenson@redhat.com>
4959
4960 * hostio.c (handle_vFile): Fix prefix lengths.
4961
4962 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4963
4964 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4965 ptr_bits.
4966
4967 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4968
4969 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4970 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4971 (clean): Add "rm -f" for above C files.
4972 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4973 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4974 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4975 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4976 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4977 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4978 (init_registers_s390x_vx_linux64)
4979 (init_registers_s390x_tevx_linux64)
4980 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4981 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4982 declarations.
4983 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4984 (s390_store_vxrs_high): New functions.
4985 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4986 NT_S390_VXRS_HIGH.
4987 (s390_arch_setup): Add logic for selecting one of the new target
4988 descriptions. Activate the new vector regsets if applicable.
4989 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4990 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4991 and init_registers_s390x_tevx_linux64.
4992
4993 2015-03-01 Pedro Alves <palves@redhat.com>
4994
4995 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4996 parameter.
4997
4998 2015-02-27 Pedro Alves <palves@redhat.com>
4999
5000 * linux-x86-low.c (u_debugreg_offset): New function.
5001 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5002
5003 2015-02-27 Pedro Alves <palves@redhat.com>
5004
5005 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5006 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5007 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5008 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5009 (ps_lsetfpregs, ps_getpid)
5010 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5011 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5012 (ps_lsetxregs, ps_plog): Declare.
5013
5014 2015-02-27 Pedro Alves <palves@redhat.com>
5015
5016 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5017 IP_AGENT_EXPORT_FUNC.
5018 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5019 IP_AGENT_EXPORT_FUNC.
5020 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5021 (IP_AGENT_EXPORT): Delete.
5022 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5023 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5024 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5025 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5026 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5027 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5028 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5029 (traceframe_read_count, traceframe_write_count)
5030 (traceframes_created, trace_state_variables, get_raw_reg)
5031 (get_trace_state_variable_value, set_trace_state_variable_value)
5032 (ust_loaded, helper_thread_id, cmd_buf): Use
5033 IPA_SYM_EXPORTED_NAME.
5034 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5035 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5036 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5037 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5038 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5039 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5040 EXTERN_C_PUSH/EXTERN_C_POP.
5041 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5042 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5043 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5044 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5045 (traceframe_write_count, traceframe_read_count)
5046 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5047 (about_to_request_buffer_space, get_trace_state_variable_value)
5048 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5049 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5050 EXTERN_C_PUSH/EXTERN_C_POP.
5051 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5052 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5053 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5054 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5055 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5056 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5057 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5058 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5059 Define.
5060 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5061 (IP_AGENT_EXPORT_VAR_DECL): Define.
5062 (tracing): Declare.
5063 (gdb_agent_get_raw_reg): Declare.
5064
5065 2015-02-27 Tom Tromey <tromey@redhat.com>
5066 Pedro Alves <palves@redhat.com>
5067
5068 Rename symbols whose names are reserved C++ keywords throughout.
5069
5070 2015-02-27 Pedro Alves <palves@redhat.com>
5071
5072 * Makefile.in (COMPILER): New, get it from autoconf.
5073 (CXX): Get from autoconf instead.
5074 (COMPILE.pre): Use COMPILER.
5075 (CC-LD): Rename to ...
5076 (CC_LD): ... this. Use COMPILER.
5077 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5078 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5079 * acinclude.m4: Include build-with-cxx.m4.
5080 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5081 Disable -Werror by default if building in C++ mode.
5082 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5083 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5084 the C++ compiler. Save/restore CXXFLAGS too.
5085 * configure: Regenerate.
5086
5087 2015-02-27 Pedro Alves <palves@redhat.com>
5088
5089 * acinclude.m4: Include libiberty.m4.
5090 * configure.ac: Call libiberty_INIT.
5091 * config.in, configure: Regenerate.
5092
5093 2015-02-26 Pedro Alves <palves@redhat.com>
5094
5095 * linux-low.c (linux_wait_1): When incrementing the PC past a
5096 program breakpoint always use the_low_target.breakpoint_len as
5097 increment, rather than the maximum between that and
5098 the_low_target.decr_pc_after_break.
5099
5100 2015-02-23 Pedro Alves <palves@redhat.com>
5101
5102 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5103 thread was doing a step-over; always adjust the PC if
5104 we stepped over a permanent breakpoint.
5105 (linux_wait_1): If we stepped over breakpoint that was on top of a
5106 permanent breakpoint, manually advance the PC past it.
5107
5108 2015-02-23 Pedro Alves <palves@redhat.com>
5109
5110 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5111 modes.
5112 (x86_fill_gregset, x86_store_gregset): Use it when handling
5113 $orig_eax.
5114
5115 2015-02-20 Pedro Alves <palves@redhat.com>
5116
5117 * thread-db.c: Include "nat/linux-procfs.h".
5118 (thread_db_init): Skip listing new threads if the kernel supports
5119 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5120
5121 2015-02-20 Pedro Alves <palves@redhat.com>
5122
5123 * linux-low.c (status_pending_p_callback): Use ptid_match.
5124
5125 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5126
5127 PR breakpoints/16812
5128 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5129 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5130 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5131
5132 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5133
5134 PR breakpoints/15956
5135 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5136
5137 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5138
5139 * linux-low.c (linux_low_btrace_conf): Print size.
5140 * server.c (handle_btrace_conf_general_set): New.
5141 (hanle_general_set): Call handle_btrace_conf_general_set.
5142 (handle_query): Report Qbtrace-conf:bts:size as supported.
5143
5144 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5145
5146 * linux-low.c (linux_low_enable_btrace): Update parameters.
5147 (linux_low_btrace_conf): New.
5148 (linux_target_ops)<to_btrace_conf>: Initialize.
5149 * server.c (current_btrace_conf): New.
5150 (handle_btrace_enable): Rename to ...
5151 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5152 to target_enable_btrace. Update comment. Update users.
5153 (handle_qxfer_btrace_conf): New.
5154 (qxfer_packets): Add btrace-conf entry.
5155 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5156 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5157 (target_ops)<read_btrace_conf>: New.
5158 (target_enable_btrace): Update parameters.
5159 (target_read_btrace_conf): New.
5160
5161 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5162
5163 * server.c (handle_btrace_general_set): Remove call to
5164 target_supports_btrace.
5165 (supported_btrace_packets): New.
5166 (handle_query): Call supported_btrace_packets.
5167 * target.h: include btrace-common.h.
5168 (btrace_target_info): Removed.
5169 (supports_btrace, target_supports_btrace): Update parameters.
5170
5171 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5172
5173 * Makefile.in (SFILES): Add common/btrace-common.c.
5174 (OBS): Add common/btrace-common.o.
5175 (btrace-common.o): Add build rules.
5176 * linux-low: Include btrace-common.h.
5177 (linux_low_read_btrace): Use struct btrace_data. Call
5178 btrace_data_init and btrace_data_fini.
5179
5180 2015-02-06 Pedro Alves <palves@redhat.com>
5181
5182 * thread-db.c (find_new_threads_callback): Add debug output.
5183
5184 2015-02-04 Pedro Alves <palves@redhat.com>
5185
5186 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5187 (resume_stopped_resumed_lwps): New function.
5188 (linux_wait_for_event_filtered): Use it.
5189
5190 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5191
5192 * Makefile.in (SFILES): Add linux-personality.c.
5193 (linux-personality.o): New rule.
5194 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5195 list of objects to be built.
5196 * linux-low.c: Include nat/linux-personality.h.
5197 (linux_create_inferior): Remove code to disable address space
5198 randomization (moved to ../nat/linux-personality.c). Create
5199 cleanup to disable address space randomization.
5200
5201 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5202
5203 * Makefile.in (posix-strerror.o): New rule.
5204 (mingw-strerror.o): Likewise.
5205 * configure: Regenerated.
5206 * configure.ac: Source file ../common/common.host. Initialize new
5207 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5208
5209 2015-01-14 Yao Qi <yao@codesourcery.com>
5210
5211 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5212 (ppc-linux.o): New rule.
5213 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5214 * configure.ac: AC_CHECK_FUNCS(getauxval).
5215 * config.in: Re-generated.
5216 * configure: Re-generated.
5217 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5218 ppc64_64bit_inferior_p
5219
5220 2015-01-14 Yao Qi <yao@codesourcery.com>
5221
5222 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5223 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5224 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5225 (PT_ORIG_R3, PT_TRAP): Likewise.
5226 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5227 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5228 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5229
5230 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5231
5232 * i387-fp.c (i387_cache_to_xsave): In look over
5233 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5234 zmmh_low_space field by use of zmmh_high_space.
5235
5236 2015-01-09 Pedro Alves <palves@redhat.com>
5237
5238 * linux-low.c (step_over_bkpt): Move higher up in the file.
5239 (handle_extended_wait): Don't store the stop_pc here.
5240 (get_stop_pc): Adjust comments and rename to ...
5241 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5242 stopped for a software breakpoint or hardware breakpoint.
5243 (thread_still_has_status_pending_p): New function.
5244 (status_pending_p_callback): Use
5245 thread_still_has_status_pending_p. If the event is no longer
5246 interesting, resume the LWP.
5247 (handle_tracepoints): Add assert.
5248 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5249 (wstatus_maybe_breakpoint): New function.
5250 (cancel_breakpoint): Delete function.
5251 (check_stopped_by_watchpoint): New function, factored out from
5252 linux_low_filter_event.
5253 (lp_status_maybe_breakpoint): Delete function.
5254 (linux_low_filter_event): Remove filter_ptid argument.
5255 Leave thread group exits pending here. Store the LWP's stop PC.
5256 Always leave events pending.
5257 (linux_wait_for_event_filtered): Pull all events out of the
5258 kernel, and leave them all pending.
5259 (count_events_callback, select_event_lwp_callback): Consider all
5260 events.
5261 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5262 (select_event_lwp): Only give preference to the stepping LWP in
5263 all-stop mode. Adjust comments.
5264 (ignore_event): New function.
5265 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5266 references to cancel_breakpoints. Adjust to renames. Also give
5267 equal priority to all LWPs that have had events in non-stop mode.
5268 If reporting a software breakpoint event, unadjust the LWP's PC.
5269 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5270 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5271 Adjust.
5272 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5273 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5274 (linux_stopped_by_watchpoint): Adjust.
5275 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5276 * linux-low.h (enum lwp_stop_reason): New.
5277 (struct lwp_info) <stop_pc>: Adjust comment.
5278 <stopped_by_watchpoint>: Delete field.
5279 <stop_reason>: New field.
5280 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5281 * mem-break.c (software_breakpoint_inserted_here)
5282 (hardware_breakpoint_inserted_here): New function.
5283 * mem-break.h (software_breakpoint_inserted_here)
5284 (hardware_breakpoint_inserted_here): Declare.
5285 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5286 (cancel_breakpoints): Delete.
5287 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5288 (upload_fast_traceframes): Remove references to
5289 cancel_breakpoints.
5290
5291 2015-01-09 Pedro Alves <palves@redhat.com>
5292
5293 * thread-db.c (find_new_threads_callback): Ignore thread if the
5294 kernel thread ID is -1.
5295
5296 2015-01-09 Pedro Alves <palves@redhat.com>
5297
5298 * linux-low.c (linux_attach_fail_reason_string): Move to
5299 nat/linux-ptrace.c, and rename.
5300 (linux_attach_lwp): Update comment.
5301 (attach_proc_task_lwp_callback): New function.
5302 (linux_attach): Adjust to rename and use
5303 linux_proc_attach_tgid_threads.
5304 (linux_attach_fail_reason_string): Delete declaration.
5305
5306 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5307
5308 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5309 * server.c (gdbserver_version): Likewise.
5310
5311 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5312
5313 * remote-utils.c: Include ctype.h.
5314 (input_interrupt): Explicitly handle the case when the char
5315 received is the NUL byte. Improve the printing of non-ASCII
5316 characters.
5317
5318 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5319
5320 * linux-low.c (linux_low_filter_event): Update call to
5321 linux_enable_event_reporting following the addition of
5322 a new parameter to that function.
5323
5324 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5325
5326 PR server/17457
5327 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5328 (AARCH64_FPCR_REGNO): Likewise.
5329 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5330 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5331 (aarch64_store_fpregset): Likewise.
5332
5333 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5334
5335 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5336 Remove FIXME comment about assumption about N.
5337
5338 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5339
5340 * configure.ac: If large-file support is disabled in GDBserver,
5341 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5342 * configure: Regenerate.
5343
5344 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5345
5346 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5347 warning upon ENODATA from ptrace.
5348 * linux-s390-low.c (s390_store_tdb): New.
5349 (s390_regsets): Add regset for NT_S390_TDB.
5350
5351 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5352
5353 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5354 without a fill_function.
5355 * linux-s390-low.c (s390_fill_last_break): Remove.
5356 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5357 (s390_arch_setup): Use regset's size instead of fill_function for
5358 loop end condition.
5359
5360 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5361
5362 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5363 the regset's store function when ptrace returned an error.
5364 * regcache.c (get_thread_regcache): Invalidate register cache
5365 before fetching inferior's registers.
5366
5367 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5368
5369 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5370 while-loop as for-loop.
5371 (regsets_store_inferior_registers): Likewise.
5372
5373 2014-11-28 Yao Qi <yao@codesourcery.com>
5374
5375 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5376 * config.in, configure: Re-generate.
5377 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5378 is defined.
5379
5380 2014-11-21 Yao Qi <yao@codesourcery.com>
5381
5382 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5383 (AC_CHECK_HEADERS): Remove malloc.h.
5384 * configure: Re-generated.
5385 * config.in: Re-generated.
5386 * server.h: Don't include alloca.h and malloc.h.
5387 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5388 Don't include malloc.h.
5389
5390 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5391
5392 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5393 corresponding ERRNO check in same block.
5394
5395 2014-11-12 Pedro Alves <palves@redhat.com>
5396
5397 * server.c (cont_thread): Update comment.
5398 (start_inferior, attach_inferior): No longer clear cont_thread.
5399 (handle_v_cont): No longer set cont_thread.
5400 (captured_main): Clear cont_thread each time a GDB connects.
5401
5402 2014-11-12 Pedro Alves <palves@redhat.com>
5403
5404 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5405 thread, and don't resume all threads if the Hc thread has exited.
5406
5407 2014-11-12 Pedro Alves <palves@redhat.com>
5408
5409 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5410 the process group instead of to a specific LWP.
5411
5412 2014-10-15 Pedro Alves <palves@redhat.com>
5413
5414 PR server/17487
5415 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5416 parameter.
5417 (arm_set_thread_context): Delete.
5418 (the_low_target): Adjust.
5419 * win32-i386-low.c (debug_registers_changed)
5420 (debug_registers_used): Delete.
5421 (update_debug_registers_callback): New function.
5422 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5423 needing to update their debug registers.
5424 (win32_get_current_dr): New function.
5425 (x86_dr_low_get_addr, x86_dr_low_get_control)
5426 (x86_dr_low_get_status): Fetch the debug register from the thread
5427 record's context.
5428 (i386_initial_stuff): Adjust.
5429 (i386_get_thread_context): Remove current_event parameter. Don't
5430 clear debug_registers_changed nor copy DR values to
5431 debug_reg_state.
5432 (i386_set_thread_context): Delete.
5433 (i386_prepare_to_resume): New function.
5434 (i386_thread_added): Mark the thread as needing to update irs
5435 debug registers.
5436 (the_low_target): Remove i386_set_thread_context and install
5437 i386_prepare_to_resume.
5438 * win32-low.c (win32_get_thread_context): Adjust.
5439 (win32_set_thread_context): Use SetThreadContext
5440 directly.
5441 (win32_prepare_to_resume): New function.
5442 (win32_require_context): New function, factored out from ...
5443 (thread_rec): ... this.
5444 (continue_one_thread): Call win32_prepare_to_resume on each thread
5445 we're about to continue.
5446 (win32_resume): Call win32_prepare_to_resume on the event thread.
5447 * win32-low.h (struct win32_thread_info)
5448 <debug_registers_changed>: New field.
5449 (struct win32_target_ops): Change prototype of set_thread_context,
5450 delete set_thread_context and add prepare_to_resume.
5451 (win32_require_context): New declaration.
5452
5453 2014-10-08 Gary Benson <gbenson@redhat.com>
5454
5455 * server.h: Do not include common-exceptions.h.
5456
5457 2014-10-08 Gary Benson <gbenson@redhat.com>
5458
5459 * server.h: Do not include cleanups.h.
5460
5461 2014-09-30 James Hogan <james.hogan@imgtec.com>
5462
5463 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5464 mips64-dsp-linux.c.
5465
5466 2014-09-23 Yao Qi <yao@codesourcery.com>
5467
5468 * linux-low.c (lp_status_maybe_breakpoint): New function.
5469 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5470 (count_events_callback): Likewise.
5471 (select_event_lwp_callback): Likewise.
5472 (cancel_breakpoints_callback): Likewise.
5473
5474 2014-09-19 Don Breazeal <donb@codesourcery.com>
5475
5476 * linux-low.c (handle_extended_wait): Call
5477 linux_ptrace_get_extended_event.
5478 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5479 linux_is_extended_waitstatus.
5480
5481 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5482
5483 * Makefile.in (CPPFLAGS): Define.
5484 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5485 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5486
5487 2014-09-16 Gary Benson <gbenson@redhat.com>
5488
5489 * inferiors.h (current_inferior): Renamed as...
5490 (current_thread): New variable. All uses updated.
5491 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5492 (maybe_move_out_of_jump_pad): Likewise.
5493 (cancel_breakpoint): Likewise.
5494 (linux_low_filter_event): Likewise.
5495 (wait_for_sigstop): Likewise.
5496 (linux_resume_one_lwp): Likewise.
5497 (need_step_over_p): Likewise.
5498 (start_step_over): Likewise.
5499 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5500 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5501 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5502 and save_inferior as saved_thread.
5503 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5504 saved_thread.
5505 (regcache_invalidate_thread): Likewise.
5506 * remote-utils.c (prepare_resume_reply): Likewise.
5507 * thread-db.c (thread_db_get_tls_address): Likewise.
5508 (disable_thread_event_reporting): Likewise.
5509 (remove_thread_event_breakpoints): Likewise.
5510 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5511 as saved_thread.
5512 * target.h (set_desired_inferior): Renamed as...
5513 (set_desired_thread): New declaration. All uses updated.
5514 * server.c (myresume): Updated comment to reference thread instead
5515 of inferior.
5516 (handle_serial_event): Likewise.
5517 (handle_target_event): Likewise.
5518
5519 2014-09-12 Tom Tromey <tromey@redhat.com>
5520 Gary Benson <gbenson@redhat.com>
5521
5522 * regcache.h: Include common-regcache.h.
5523 (regcache_read_pc): Don't declare.
5524 * regcache.c (get_thread_regcache_for_ptid): New function.
5525
5526 2014-09-11 Tom Tromey <tromey@redhat.com>
5527 Gary Benson <gbenson@redhat.com>
5528
5529 * symbol.c: New file.
5530 * Makefile.in (SFILES): Add symbol.c.
5531 (OBS): Add symbol.o.
5532
5533 2014-09-11 Gary Benson <gbenson@redhat.com>
5534
5535 * target.c (target_stop_ptid, target_continue_ptid): New
5536 functions.
5537
5538 2014-09-11 Tom Tromey <tromey@redhat.com>
5539 Gary Benson <gbenson@redhat.com>
5540
5541 * target.h: Include target/target.h.
5542 * target.c (target_read_memory, target_read_uint32)
5543 (target_write_memory): New functions.
5544
5545 2014-09-11 Gary Benson <gbenson@redhat.com>
5546
5547 * server.h (debug_hw_points): Don't declare.
5548 * server.c (debug_hw_points): Don't define. Replace all uses
5549 with show_debug_regs.
5550 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5551 all uses with show_debug_regs.
5552
5553 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5554
5555 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5556 endianness into account.
5557 (ppc_supply_ptrace_register): Likewise.
5558
5559 2014-09-03 James Hogan <james.hogan@imgtec.com>
5560
5561 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5562 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5563
5564 2014-09-03 Gary Benson <gbenson@redhat.com>
5565
5566 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5567 ALL_DEBUG_ADDRESS_REGISTERS.
5568
5569 2014-09-02 Gary Benson <gbenson@redhat.com>
5570
5571 * i386-low.h: Renamed as...
5572 * x86-low.h: New file. All type, function and variable name
5573 prefixes changed from "i386_" to "x86_". All references updated.
5574 * i386-low.c: Renamed as...
5575 * x86-low.c: New file. All type, function and variable name
5576 prefixes changed from "i386_" to "x86_". All references updated.
5577
5578 2014-09-02 Gary Benson <gbenson@redhat.com>
5579
5580 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5581 (x86_linux_new_thread): Likewise.
5582
5583 2014-08-29 Gary Benson <gbenson@redhat.com>
5584
5585 * server.h (setjmp.h): Do not include.
5586 (toplevel): Do not declare.
5587 (common-exceptions.h): Include.
5588 (cleanups.h): Likewise.
5589 * server.c (toplevel): Do not define.
5590 (exit_code): New static global.
5591 (detach_or_kill_for_exit_cleanup): New function.
5592 (main): New function. Original main renamed to...
5593 (captured_main): New function.
5594 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5595
5596 2014-08-29 Gary Benson <gbenson@redhat.com>
5597
5598 * Makefile.in (SFILES): Add common/common-exceptions.c.
5599 (OBS): Add common-exceptions.o.
5600 (common-exceptions.o): New rule.
5601 * utils.c (prepare_to_throw_exception): New function.
5602
5603 2014-08-29 Gary Benson <gbenson@redhat.com>
5604
5605 * config.in: Regenerate.
5606 * configure: Likewise.
5607
5608 2014-08-29 Gary Benson <gbenson@redhat.com>
5609
5610 * Makefile.in (SFILES): Add common/cleanups.c.
5611 (OBS): cleanups.o.
5612 (cleanups.o): New rule.
5613
5614 2014-08-29 Gary Benson <gbenson@redhat.com>
5615
5616 * utils.c (internal_vwarning): New function.
5617
5618 2014-08-28 Gary Benson <gbenson@redhat.com>
5619
5620 * utils.h (fatal): Remove declaration.
5621 * utils.c (fatal): Remove function.
5622
5623 2014-08-28 Gary Benson <gbenson@redhat.com>
5624
5625 * tracepoint.c (gdb_agent_init): Replace fatal with
5626 perror_with_name.
5627 (initialize_tracepoint): Likewise.
5628
5629 2014-08-28 Gary Benson <gbenson@redhat.com>
5630
5631 * remote-utils.c (remote_prepare): Replace fatal with error.
5632
5633 2014-08-28 Gary Benson <gbenson@redhat.com>
5634
5635 * linux-low.c (linux_async): Replace fatal with warning.
5636 Tidy up and return.
5637 (linux_start_non_stop): Return -1 if linux_async failed.
5638
5639 2014-08-28 Gary Benson <gbenson@redhat.com>
5640
5641 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5642 gdb_assert.
5643 (i386_dr_low_get_addr): Remove vague comment.
5644 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5645 gdb_assert.
5646
5647 2014-08-28 Gary Benson <gbenson@redhat.com>
5648
5649 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5650 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5651 internal_error.
5652 (linux_resume_one_lwp): Likewise.
5653 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5654 gdb_assert.
5655 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5656 with internal_error.
5657 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5658 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5659 (find_register_by_name): Replace fatal with internal_error.
5660 (find_regno): Likewise.
5661 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5662 * thread-db.c (thread_db_create_event): Likewise.
5663 (thread_db_load_search): Likewise.
5664 (try_thread_db_load_1): Likewise.
5665 * tracepoint.c (get_jump_space_head): Replace fatal with
5666 internal_error.
5667 (claim_trampoline_space): Likewise.
5668 (have_fast_tracepoint_trampoline_buffer): Likewise.
5669 (cmd_qtstart): Likewise.
5670 (stop_tracing): Likewise.
5671 (fast_tracepoint_collecting): Likewise.
5672 (target_malloc): Likewise.
5673 (download_tracepoint): Likewise.
5674 (download_trace_state_variables): Replace check with gdb_assert.
5675 (upload_fast_traceframes): Replace fatal with internal_error.
5676
5677 2014-08-19 Tom Tromey <tromey@redhat.com>
5678 Gary Benson <gbenson@redhat.com>
5679
5680 * Makefile.in (SFILES): Add common/common-debug.c.
5681 (OBS): Add common-debug.o.
5682 (common-debug.o): New rule.
5683 * debug.h (debug_printf): Don't declare.
5684 * debug.c (debug_printf): Renamed and rewritten as...
5685 (debug_vprintf): New function.
5686
5687 2014-08-19 Gary Benson <gbenson@redhat.com>
5688
5689 * utils.h: Do not include print-utils.h.
5690
5691 2014-08-19 Tom Tromey <tromey@redhat.com>
5692 Gary Benson <gbenson@redhat.com>
5693
5694 * server.h: Add static assertion.
5695 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5696
5697 2014-08-19 Tom Tromey <tromey@redhat.com>
5698 Gary Benson <gbenson@redhat.com>
5699
5700 * Makefile.in (SFILES): Add common/errors.c.
5701 (OBS): Add errors.o.
5702 (IPA_OBS): Add errors-ipa.o.
5703 (errors.o): New rule.
5704 (errors-ipa.o): Likewise.
5705 * utils.h (perror_with_name, error, warning): Don't declare.
5706 * utils.c (warning): Renamed and rewritten as...
5707 (vwarning): New function.
5708 (error): Renamed and rewritten as...
5709 (verror): New function.
5710 (internal_error): Renamed and rewritten as...
5711 (internal_verror): New function.
5712
5713 2014-08-07 Gary Benson <gbenson@redhat.com>
5714
5715 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5716 * configure: Regenerate.
5717 * config.in: Likewise.
5718 * server.h: Do not include errno.h.
5719 * event-loop.c: Likewise.
5720 * hostio-errno.c: Likewise.
5721 * linux-low.c: Likewise.
5722 * remote-utils.c: Likewise.
5723 * spu-low.c: Likewise.
5724 * utils.c: Likewise.
5725 * gdbreplay.c: Unconditionally include errno.h.
5726
5727 2014-08-07 Gary Benson <gbenson@redhat.com>
5728
5729 * server.h: Do not include string.h.
5730 * event-loop.c: Likewise.
5731 * linux-low.c: Likewise.
5732 * regcache.c: Likewise.
5733 * remote-utils.c: Likewise.
5734 * spu-low.c: Likewise.
5735 * utils.c: Likewise.
5736
5737 2014-08-07 Gary Benson <gbenson@redhat.com>
5738
5739 * server.h: Do not include gdb_assert.h.
5740
5741 2014-08-07 Gary Benson <gbenson@redhat.com>
5742
5743 * server.h: Do not include common-utils.h.
5744
5745 2014-08-07 Gary Benson <gbenson@redhat.com>
5746
5747 * server.h: Do not include ptid.h.
5748 * notif.h: Likewise.
5749
5750 2014-08-07 Gary Benson <gbenson@redhat.com>
5751
5752 * server.h: Do not include gdb_locale.h.
5753
5754 2014-08-07 Gary Benson <gbenson@redhat.com>
5755
5756 * server.h: Do not include gdb/signals.h.
5757 * win32-low.c: Likewise.
5758
5759 2014-08-07 Gary Benson <gbenson@redhat.com>
5760
5761 * server.h: Do not include pathmax.h.
5762
5763 2014-08-07 Gary Benson <gbenson@redhat.com>
5764
5765 * server.h: Do not include libiberty.h.
5766 * linux-bfin-low.c: Likewise.
5767
5768 2014-08-07 Gary Benson <gbenson@redhat.com>
5769
5770 * server.h: Do not include ansidecl.h.
5771
5772 2014-08-07 Gary Benson <gbenson@redhat.com>
5773
5774 * linux-x86-low.c: Do not include stddef.h.
5775 * lynx-ppc-low.c: Likewise.
5776 * tracepoint.c: Likewise.
5777
5778 2014-08-07 Gary Benson <gbenson@redhat.com>
5779
5780 * server.h: Do not include stdarg.h.
5781 * nto-low.c: Likewise.
5782
5783 2014-08-07 Gary Benson <gbenson@redhat.com>
5784
5785 * server.h: Do not include stdlib.h.
5786 * inferiors.c: Likewise.
5787 * linux-low.c: Likewise.
5788 * regcache.c: Likewise.
5789 * spu-low.c: Likewise.
5790 * tracepoint.c: Likewise.
5791 * utils.c: Likewise.
5792
5793 2014-08-07 Gary Benson <gbenson@redhat.com>
5794
5795 * server.h: Do not include stdio.h.
5796 * linux-low.c: Likewise.
5797 * remote-utils.c: Likewise.
5798 * spu-low.c: Likewise.
5799 * utils.c: Likewise.
5800 * wincecompat.c: Likewise.
5801
5802 2014-08-06 Gary Benson <gbenson@redhat.com>
5803
5804 * regcache.c (init_register_cache): Move conditionals inside if.
5805
5806 2014-08-06 Gary Benson <gbenson@redhat.com>
5807
5808 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5809
5810 2014-07-31 Gary Benson <gbenson@redhat.com>
5811
5812 * ax.h: Do not include server.h.
5813 * gdbthread.h: Likewise.
5814 * lynx-low.h: Likewise.
5815 * notif.h: Likewise.
5816
5817 2014-07-30 Gary Benson <gbenson@redhat.com>
5818
5819 * server.h: Include common-defs.h.
5820 Do not include config.h or build-gnulib-gdbserver/config.h.
5821
5822 2014-07-30 Gary Benson <gbenson@redhat.com>
5823
5824 * hostio-errno.c: Move server.h to top of includes list.
5825 * inferiors.c: Likewise.
5826 * linux-x86-low.c: Likewise.
5827 * notif.c: Include server.h.
5828
5829 2014-07-24 Tom Tromey <tromey@redhat.com>
5830 Gary Benson <gbenson@redhat.com>
5831
5832 * server.h (CORE_ADDR): Now unsigned.
5833
5834 2014-07-16 Pedro Alves <palves@redhat.com>
5835
5836 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5837
5838 2014-07-15 Pedro Alves <palves@redhat.com>
5839
5840 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5841 copy.
5842
5843 2014-07-11 Pedro Alves <palves@redhat.com>
5844
5845 * linux-low.c (kill_wait_lwp): New function, based on
5846 kill_one_lwp_callback, but use my_waitpid directly.
5847 (kill_one_lwp_callback, linux_kill): Use it.
5848
5849 2014-06-23 Pedro Alves <palves@redhat.com>
5850
5851 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5852 before setting DR0..DR3.
5853
5854 2014-06-20 Gary Benson <gbenson@redhat.com>
5855
5856 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5857 * configure: Regenerated.
5858 * config.in: Likewise.
5859
5860 2014-06-20 Gary Benson <gbenson@redhat.com>
5861
5862 * Makefile.in (SFILES): Update locations for files moved
5863 from common to nat.
5864 (object file files): Reordered.
5865
5866 2014-06-20 Gary Benson <gbenson@redhat.com>
5867
5868 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5869 (i386_dr_low_set_addr): Likewise.
5870 (i386_dr_low_get_addr): Likewise.
5871 (i386_dr_low_can_set_control): Likewise.
5872 (i386_dr_low_set_control): Likewise.
5873 (i386_dr_low_get_control): Likewise.
5874 (i386_dr_low_get_status): Likewise.
5875 (i386_get_debug_register_length): Likewise.
5876 * linux-x86-low.c (i386_dr_low_set_addr):
5877 Changed signature. Made static.
5878 (i386_dr_low_get_addr): Likewise.
5879 (i386_dr_low_set_control): Likewise.
5880 (i386_dr_low_get_control): Likewise.
5881 (i386_dr_low_get_status): Likewise.
5882 (i386_dr_low): New global variable.
5883 * win32-i386-low.c (i386_dr_low_set_addr):
5884 Changed signature. Made static.
5885 (i386_dr_low_get_addr): Likewise.
5886 (i386_dr_low_set_control): Likewise.
5887 (i386_dr_low_get_control): Likewise.
5888 (i386_dr_low_get_status): Likewise.
5889 (i386_dr_low): New global variable.
5890
5891 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5892
5893 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5894 * Makefile.in (AR, AR_FLAGS): Define.
5895 * configure: Regenerate.
5896
5897 2014-06-19 Gary Benson <gbenson@redhat.com>
5898
5899 * Makefile.in (i386-dregs.o): New rule.
5900 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5901 * i386-low.c (target.h): Remove include.
5902 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5903 (DR_CONTROL_SHIFT): Likewise.
5904 (DR_CONTROL_SIZE): Likewise.
5905 (DR_RW_EXECUTE): Likewise.
5906 (DR_RW_WRITE): Likewise.
5907 (DR_RW_READ): Likewise.
5908 (DR_RW_IORW): Likewise.
5909 (DR_LEN_1): Likewise.
5910 (DR_LEN_2): Likewise.
5911 (DR_LEN_4): Likewise.
5912 (DR_LEN_8): Likewise.
5913 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5914 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5915 (DR_ENABLE_SIZE): Likewise.
5916 (DR_LOCAL_SLOWDOWN): Likewise.
5917 (DR_GLOBAL_SLOWDOWN): Likewise.
5918 (DR_CONTROL_RESERVED): Likewise.
5919 (I386_DR_CONTROL_MASK): Likewise.
5920 (I386_DR_VACANT): Likewise.
5921 (I386_DR_LOCAL_ENABLE): Likewise.
5922 (I386_DR_GLOBAL_ENABLE): Likewise.
5923 (I386_DR_DISABLE): Likewise.
5924 (I386_DR_SET_RW_LEN): Likewise.
5925 (I386_DR_GET_RW_LEN): Likewise.
5926 (I386_DR_WATCH_HIT): Likewise.
5927 (i386_wp_op_t): Likewise.
5928 (i386_show_dr): Likewise.
5929 (i386_length_and_rw_bits): Likewise.
5930 (i386_insert_aligned_watchpoint): Likewise.
5931 (i386_remove_aligned_watchpoint): Likewise.
5932 (i386_handle_nonaligned_watchpoint): Likewise.
5933 i386_update_inferior_debug_regs(): Likewise.
5934 (i386_dr_insert_watchpoint): Likewise.
5935 (i386_dr_remove_watchpoint): Likewise.
5936 (i386_dr_region_ok_for_watchpoint): Likewise.
5937 (i386_dr_stopped_data_address): Likewise.
5938 (i386_dr_stopped_by_watchpoint): Likewise.
5939
5940 2014-06-19 Gary Benson <gbenson@redhat.com>
5941
5942 * i386-low.c (i386_dr_show): Renamed to
5943 i386_show_dr and made static. All uses updated.
5944 (i386_dr_length_and_rw_bits): Renamed to
5945 i386_length_and_rw_bits and made static.
5946 All uses updated.
5947 (i386_dr_insert_aligned_watchpoint): Renamed to
5948 i386_insert_aligned_watchpoint and made static.
5949 All uses updated.
5950 (i386_dr_remove_aligned_watchpoint): Renamed to
5951 i386_remove_aligned_watchpoint and made static.
5952 All uses updated.
5953 (i386_dr_update_inferior_debug_regs): Renamed to
5954 i386_update_inferior_debug_regs and made static.
5955 All uses updated.
5956
5957 2014-06-18 Gary Benson <gbenson@redhat.com>
5958
5959 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5960 (i386_dr_low_can_set_control): Likewise.
5961 (i386_get_debug_register_length): Likewise.
5962 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5963 (i386_dr_low_can_set_control): Likewise.
5964 (i386_get_debug_register_length): Likewise.
5965
5966 2014-06-17 Gary Benson <gbenson@redhat.com>
5967
5968 * i386-low.h (i386-dregs.h): New include.
5969 (DR_FIRSTADDR): Now in i386-dregs.h.
5970 (DR_LASTADDR): Likewise.
5971 (DR_NADDR): Likewise.
5972 (DR_STATUS): Likewise.
5973 (DR_CONTROL): Likewise.
5974 (i386_debug_reg_state): Likewise.
5975 (i386_dr_insert_watchpoint): Likewise.
5976 (i386_dr_remove_watchpoint): Likewise.
5977 (i386_dr_region_ok_for_watchpoint): Likewise.
5978 (i386_dr_stopped_data_address): Likewise.
5979 (i386_dr_stopped_by_watchpoint): Likewise.
5980 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5981
5982 2014-06-18 Gary Benson <gbenson@redhat.com>
5983
5984 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5985 i386_dr_insert_watchpoint.
5986 (i386_low_remove_watchpoint): Renamed to
5987 i386_dr_remove_watchpoint.
5988 (i386_low_region_ok_for_watchpoint): Renamed to
5989 i386_dr_region_ok_for_watchpoint.
5990 (i386_low_stopped_data_address): Renamed to
5991 i386_dr_stopped_data_address.
5992 (i386_low_stopped_by_watchpoint): Renamed to
5993 i386_dr_stopped_by_watchpoint.
5994 * i386-low.c (i386_show_dr): Renamed to
5995 i386_dr_show and made nonstatic. All uses updated.
5996 (i386_length_and_rw_bits): Renamed to
5997 i386_dr_length_and_rw_bits and made nonstatic.
5998 All uses updated.
5999 (i386_insert_aligned_watchpoint): Renamed to
6000 i386_dr_insert_aligned_watchpoint and made nonstatic.
6001 All uses updated.
6002 (i386_remove_aligned_watchpoint): Renamed to
6003 i386_dr_remove_aligned_watchpoint and made nonstatic.
6004 All uses updated.
6005 (i386_update_inferior_debug_regs): Renamed to
6006 i386_dr_update_inferior_debug_regs and made nonstatic.
6007 All uses updated.
6008 (i386_low_insert_watchpoint): Renamed to
6009 i386_dr_insert_watchpoint. All uses updated.
6010 (i386_low_remove_watchpoint): Renamed to
6011 i386_dr_remove_watchpoint. All uses updated.
6012 (i386_low_region_ok_for_watchpoint): Renamed to
6013 i386_dr_region_ok_for_watchpoint. All uses updated.
6014 (i386_low_stopped_data_address): Renamed to
6015 i386_dr_stopped_data_address. All uses updated.
6016 (i386_low_stopped_by_watchpoint): Renamed to
6017 i386_dr_stopped_by_watchpoint. All uses updated.
6018
6019 2014-06-18 Gary Benson <gbenson@redhat.com>
6020
6021 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6022 (i386_dr_low_can_set_control): Likewise.
6023 (i386_insert_aligned_watchpoint): New check.
6024
6025 2014-06-18 Gary Benson <gbenson@redhat.com>
6026
6027 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6028 Renamed to state.
6029
6030 2014-06-18 Gary Benson <gbenson@redhat.com>
6031
6032 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6033 instead of fatal and error.
6034 (i386_handle_nonaligned_watchpoint): Likewise.
6035
6036 2014-06-18 Gary Benson <gbenson@redhat.com>
6037
6038 * i386-low.c (i386_get_debug_register_length): New macro.
6039 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6040 (i386_show_dr): Use debug_printf instead of fprintf. Use
6041 phex to format values.
6042
6043 2014-06-18 Gary Benson <gbenson@redhat.com>
6044
6045 * i386-low.h: Comment changes.
6046 * i386-low.c: Likewise.
6047
6048 2014-06-18 Gary Benson <gbenson@redhat.com>
6049
6050 * i386-low.c: Whitespace changes.
6051
6052 2014-06-12 Tom Tromey <tromey@redhat.com>
6053
6054 * utils.c (freeargv): Remove.
6055
6056 2014-06-12 Tom Tromey <tromey@redhat.com>
6057
6058 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6059 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6060 (parse_debug_format_options): Likewise.
6061 (gdbserver_usage): Likewise.
6062 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6063 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6064 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6065 against libiberty.
6066 ($(LIBGNU)): Depend on libiberty.
6067 (all-lib): Recurse into all subdirs.
6068 (install-only): Invoke "install" target in subdirs.
6069 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6070 targets.
6071 * configure: Rebuild.
6072 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6073 for vasprintf, vsnprintf, or gettimeofday.
6074 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6075 srv_tgtobj.
6076
6077 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6078
6079 * development.sh: Delete.
6080 * Makefile.in (config.status): Adjust dependency on development.sh.
6081 * configure.ac: Adjust development.sh source call.
6082 * configure: Regenerate.
6083
6084 2014-06-02 Pedro Alves <palves@redhat.com>
6085
6086 * ax.c (gdb_free_agent_expr): New function.
6087 * ax.h (gdb_free_agent_expr): New declaration.
6088 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6089 list.
6090 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6091 static.
6092 (clear_breakpoint_conditions_and_commands): New function.
6093 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6094 (clear_breakpoint_conditions_and_commands): New declaration.
6095
6096 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6097
6098 * linux-aarch64-low.c (asm/ptrace.h): Include.
6099
6100 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6101
6102 Fix TLS access for -static -pthread.
6103 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6104 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6105 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6106
6107 2014-05-20 Pedro Alves <palves@redhat.com>
6108
6109 * linux-aarch64-low.c (aarch64_insert_point)
6110 (aarch64_remove_point): No longer check whether the type is
6111 supported here. Adjust to new interface.
6112 (the_low_target): Install aarch64_supports_z_point_type as
6113 supports_z_point_type method.
6114 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6115 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6116 instead of a Z packet char. Adjust.
6117 (arm_supports_z_point_type): New function.
6118 (arm_insert_point, arm_remove_point): Adjust to new interface.
6119 (the_low_target): Install arm_supports_z_point_type.
6120 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6121 (cris_insert_point, cris_remove_point): Adjust to new interface.
6122 Don't check whether the type is supported here.
6123 (the_low_target): Install cris_supports_z_point_type.
6124 * linux-low.c (linux_supports_z_point_type): New function.
6125 (linux_insert_point, linux_remove_point): Adjust to new interface.
6126 * linux-low.h (struct linux_target_ops) <insert_point,
6127 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6128 raw_breakpoint pointer parameter.
6129 <supports_z_point_type>: New method.
6130 * linux-mips-low.c (mips_supports_z_point_type): New function.
6131 (mips_insert_point, mips_remove_point): Adjust to new interface.
6132 Use mips_supports_z_point_type.
6133 (the_low_target): Install mips_supports_z_point_type.
6134 * linux-ppc-low.c (the_low_target): Install NULL as
6135 supports_z_point_type method.
6136 * linux-s390-low.c (the_low_target): Install NULL as
6137 supports_z_point_type method.
6138 * linux-sparc-low.c (the_low_target): Install NULL as
6139 supports_z_point_type method.
6140 * linux-x86-low.c (x86_supports_z_point_type): New function.
6141 (x86_insert_point): Adjust to new insert_point interface. Use
6142 insert_memory_breakpoint. Adjust to new
6143 i386_low_insert_watchpoint interface.
6144 (x86_remove_point): Adjust to remove_point interface. Use
6145 remove_memory_breakpoint. Adjust to new
6146 i386_low_remove_watchpoint interface.
6147 (the_low_target): Install x86_supports_z_point_type.
6148 * lynx-low.c (lynx_target_ops): Install NULL as
6149 supports_z_point_type callback.
6150 * nto-low.c (nto_supports_z_point_type): New.
6151 (nto_insert_point, nto_remove_point): Adjust to new interface.
6152 (nto_target_ops): Install nto_supports_z_point_type.
6153 * mem-break.c: Adjust intro comment.
6154 (struct raw_breakpoint) <raw_type, size>: New fields.
6155 <inserted>: Update comment.
6156 <shlib_disabled>: Delete field.
6157 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6158 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6159 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6160 (raw_bkpt_type_to_target_hw_bp_type): New function.
6161 (find_enabled_raw_code_breakpoint_at): New function.
6162 (find_raw_breakpoint_at): New type and size parameters. Use them.
6163 (insert_memory_breakpoint): New function, based off
6164 set_raw_breakpoint_at.
6165 (remove_memory_breakpoint): New function.
6166 (set_raw_breakpoint_at): Reimplement.
6167 (set_breakpoint): New, based on set_breakpoint_at.
6168 (set_breakpoint_at): Reimplement.
6169 (delete_raw_breakpoint): Go through the_target->remove_point
6170 instead of assuming memory breakpoints.
6171 (find_gdb_breakpoint_at): Delete.
6172 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6173 (find_gdb_breakpoint): New function.
6174 (set_gdb_breakpoint_at): Delete.
6175 (z_type_supported): New function.
6176 (set_gdb_breakpoint_1): New function, loosely based off
6177 set_gdb_breakpoint_at.
6178 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6179 (delete_gdb_breakpoint_at): Delete.
6180 (delete_gdb_breakpoint_1): New function, loosely based off
6181 delete_gdb_breakpoint_at.
6182 (delete_gdb_breakpoint): New function.
6183 (clear_gdb_breakpoint_conditions): Rename to ...
6184 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6185 breakpoint.
6186 (add_condition_to_breakpoint): Make static.
6187 (add_breakpoint_condition): Take a struct breakpoint pointer
6188 instead of an address. Adjust.
6189 (gdb_condition_true_at_breakpoint): Rename to ...
6190 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6191 z_type parameter.
6192 (gdb_condition_true_at_breakpoint): Reimplement.
6193 (add_breakpoint_commands): Take a struct breakpoint pointer
6194 instead of an address. Adjust.
6195 (gdb_no_commands_at_breakpoint): Rename to ...
6196 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6197 parameter. Return true if no breakpoint was found. Change debug
6198 output.
6199 (gdb_no_commands_at_breakpoint): Reimplement.
6200 (run_breakpoint_commands): Rename to ...
6201 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6202 and change return type to boolean.
6203 (run_breakpoint_commands): New function.
6204 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6205 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6206 breakpoint. Go through the_target->remove_point instead of
6207 assuming memory breakpoint.
6208 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6209 software and hardware breakpoints.
6210 (reinsert_raw_breakpoint): Go through the_target->insert_point
6211 instead of assuming memory breakpoint.
6212 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6213 software and hardware breakpoints.
6214 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6215 Check both software and hardware breakpoints.
6216 (validate_inserted_breakpoint): Assert the breakpoint is a
6217 software breakpoint. Set the inserted flag to -1 instead of
6218 setting shlib_disabled.
6219 (delete_disabled_breakpoints): Adjust.
6220 (validate_breakpoints): Only validate software breakpoints.
6221 Adjust to inserted flag change.
6222 (check_mem_read, check_mem_write): Skip breakpoint types other
6223 than software breakpoints. Adjust to inserted flag change.
6224 * mem-break.h (enum raw_bkpt_type): New enum.
6225 (raw_breakpoint, struct process_info): Forward declare.
6226 (Z_packet_to_target_hw_bp_type): Delete declaration.
6227 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6228 (set_gdb_breakpoint, delete_gdb_breakpoint)
6229 (clear_breakpoint_conditions): New declarations.
6230 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6231 (breakpoint_inserted_here): Update comment.
6232 (add_breakpoint_condition, add_breakpoint_commands): Replace
6233 address parameter with a breakpoint pointer parameter.
6234 (gdb_breakpoint_here): Update comment.
6235 (delete_gdb_breakpoint_at): Delete.
6236 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6237 * server.c (process_point_options): Take a struct breakpoint
6238 pointer instead of an address. Adjust.
6239 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6240 delete_gdb_breakpoint.
6241 * spu-low.c (spu_target_ops): Install NULL as
6242 supports_z_point_type method.
6243 * target.h: Include mem-break.h.
6244 (struct target_ops) <prepare_to_access_memory>: Update comment.
6245 <supports_z_point_type>: New field.
6246 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6247 instead of a char. Also take a raw breakpoint pointer.
6248 * win32-arm-low.c (the_low_target): Install NULL as
6249 supports_z_point_type.
6250 * win32-i386-low.c (i386_supports_z_point_type): New function.
6251 (i386_insert_point, i386_remove_point): Adjust to new interface.
6252 (the_low_target): Install i386_supports_z_point_type.
6253 * win32-low.c (win32_supports_z_point_type): New function.
6254 (win32_insert_point, win32_remove_point): Adjust to new interface.
6255 (win32_target_ops): Install win32_supports_z_point_type.
6256 * win32-low.h (struct win32_target_ops):
6257 <supports_z_point_type>: New method.
6258 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6259 instead of a char. Also take a raw breakpoint pointer.
6260
6261 2014-05-20 Pedro Alves <palves@redhat.com>
6262
6263 * mem-break.h: Include break-common.h.
6264 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6265 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6266 (Z_packet_to_target_hw_bp_type): New declaration.
6267 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6268 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6269 (Z_PACKET_ACCESS_WP): Delete macros.
6270 (Z_packet_to_hw_type): Delete function.
6271 * i386-low.h: Don't include break-common.h here.
6272 (Z_packet_to_hw_type): Delete declaration.
6273 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6274 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6275 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6276 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6277 * linux-aarch64-low.c: Don't include break-common.h here.
6278 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6279 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6280 (Z_packet_to_target_hw_bp_type): Delete function.
6281 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6282 function.
6283 (mips_insert_point, mips_remove_point): Use
6284 Z_packet_to_target_hw_bp_type.
6285
6286 2014-05-20 Pedro Alves <palves@redhat.com>
6287
6288 * linux-aarch64-low.c: Include break-common.h.
6289 (enum target_point_type): Delete.
6290 (Z_packet_to_point_type): Rename to ...
6291 (Z_packet_to_target_hw_bp_type): ... this, and return a
6292 target_hw_bp_type instead.
6293 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6294 instead of an enum target_point_type.
6295 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6296 breakpoint type.
6297 (aarch64_dr_state_insert_one_point)
6298 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6299 (aarch64_handle_aligned_watchpoint)
6300 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6301 Take an enum target_hw_bp_type instead of an enum
6302 target_point_type.
6303 (aarch64_supports_z_point_type): New function.
6304 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6305 use Z_packet_to_target_hw_bp_type.
6306
6307 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6308
6309 * configure.ac: Only use -Werror by default when DEVELOPMENT
6310 is true.
6311 * configure: Regenerate.
6312
6313 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6314
6315 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6316 * linux-x86-low.c (X86_64_USER_REGS): New.
6317 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6318
6319 2014-04-28 Yao Qi <yao@codesourcery.com>
6320
6321 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6322 name.
6323
6324 2014-04-25 Pedro Alves <palves@redhat.com>
6325
6326 PR server/16255
6327 * linux-low.c (linux_attach_fail_reason_string): New function.
6328 (linux_attach_lwp): Delete.
6329 (linux_attach_lwp_1): Rename to ...
6330 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6331 argument. Remove "initial" parameter. Return int instead of
6332 void. Don't error or warn here.
6333 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6334 failure to attach to the tgid. Call warning when failing to
6335 attach to an lwp.
6336 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6337 argument. Remove "initial" parameter. Return int instead of
6338 void. Don't error or warn here.
6339 (linux_attach_fail_reason_string): New declaration.
6340 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6341 interface change. Use linux_attach_fail_reason_string.
6342
6343 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6344 Walfred Tedeschi <walfred.tedeschi@intel.com>
6345
6346 * Makefile.in: Added rules to handle new files
6347 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6348 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6349 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6350 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6351 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6352 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6353 x32-avx512-linux.o.
6354 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6355 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6356 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6357 i386/x32-avx512.xml.
6358 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6359 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6360 i386/x32-avx512-linux.xml.
6361 * i387-fp.c (num_avx512_k_registers): New constant for number
6362 of K registers.
6363 (num_avx512_zmmh_low_registers): New constant for number of
6364 lower ZMM registers (0-15).
6365 (num_avx512_zmmh_high_registers): New constant for number of
6366 higher ZMM registers (16-31).
6367 (num_avx512_ymmh_registers): New contant for number of higher
6368 YMM registers (ymm16-31 added by avx521 on x86_64).
6369 (num_avx512_xmm_registers): New constant for number of higher
6370 XMM registers (xmm16-31 added by AVX512 on x86_64).
6371 (struct i387_xsave): Add space for AVX512 registers.
6372 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6373 Add code to handle AVX512 registers.
6374 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6375 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6376 prototypei from generated file.
6377 (tdesc_amd64_avx512_linux): Likewise.
6378 (init_registers_x32_avx512_linux): Likewise.
6379 (tdesc_x32_avx512_linux): Likewise.
6380 (init_registers_i386_avx512_linux): Likewise.
6381 (tdesc_i386_avx512_linux): Likewise.
6382 (x86_64_regmap): Add AVX512 registers.
6383 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6384 mask.
6385 (initialize_low_arch): Add code to initialize AVX512 registers.
6386
6387 2014-04-23 Pedro Alves <palves@redhat.com>
6388
6389 * mem-break.c (find_gdb_breakpoint_at): Make static.
6390 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6391
6392 2014-04-23 Pedro Alves <palves@redhat.com>
6393
6394 * i386-low.c: Don't include break-common.h here.
6395 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6396 prototype to take target_hw_bp_type as argument instead of a Z
6397 packet char.
6398 * i386-low.h: Include break-common.h here.
6399 (Z_packet_to_hw_type): Declare.
6400 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6401 prototypes.
6402 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6403 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6404 (x86_remove_point): Convert the packet number to a
6405 target_hw_bp_type before calling i386_low_remove_watchpoint.
6406 * win32-i386-low.c (i386_insert_point): Convert the packet number
6407 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6408 (i386_remove_point): Convert the packet number to a
6409 target_hw_bp_type before calling i386_low_remove_watchpoint.
6410
6411 2014-04-23 Pedro Alves <palves@redhat.com>
6412
6413 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6414
6415 2014-04-10 Pedro Alves <palves@redhat.com>
6416
6417 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6418 Check if the condition or command is NULL before checking if the
6419 breakpoint is known. On success, return true.
6420 * mem-break.h (add_breakpoint_condition): Document return.
6421 (add_breakpoint_commands): Add describing comment.
6422 * server.c (skip_to_semicolon): New function.
6423 (process_point_options): Use it.
6424
6425 2014-04-09 Pedro Alves <palves@redhat.com>
6426
6427 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6428 to lwpid_of.
6429
6430 2014-02-27 Pedro Alves <palves@redhat.com>
6431
6432 PR 12702
6433 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6434 macros.
6435 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6436 output.
6437 (last_thread_of_process_p): Take a PID argument instead of a
6438 thread pointer.
6439 (linux_wait_for_lwp): Delete.
6440 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6441 functions.
6442 (linux_low_filter_event): New function, party factored out from
6443 linux_wait_for_event.
6444 (linux_wait_for_event): Rename to ...
6445 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6446 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6447 sigsuspend. Check for zombie leaders.
6448 (linux_wait_for_event): Reimplement as wrapper around
6449 linux_wait_for_event_filtered.
6450 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6451 a normal or signal exit is seen, it's the whole process exiting.
6452 (wait_for_sigstop): No longer a for_each_inferior callback.
6453 Rewrite on top of linux_wait_for_event_filtered.
6454 (stop_all_lwps): Call wait_for_sigstop directly.
6455 * server.c (resume, handle_target_event): Handle
6456 TARGET_WAITKIND_NO_RESUMED.
6457
6458 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6459
6460 * win32-low.c (psapi_get_dll_name,
6461 * win32_CreateToolhelp32Snapshot): Delete.
6462 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6463 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6464 Delete.
6465 (handle_load_dll): Add function description.
6466 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6467
6468 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6469
6470 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6471 Add comment.
6472 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6473 base address when calling win32_add_one_solib.
6474 (handle_load_dll): Delete local variable load_addr.
6475 Remove 0x1000 offset applied to DLL base address when calling
6476 win32_add_one_solib.
6477 (handle_unload_dll): Add comment.
6478
6479 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6480
6481 * win32-low.c (win32_add_all_dlls): Renames
6482 win32_ensure_ntdll_loaded. Rewrite function documentation.
6483 Adjust implementation to always load all DLLs.
6484 Add 0x1000 offset to DLL base address when calling
6485 win32_add_one_solib.
6486 (child_initialization_done): New static global.
6487 (do_initial_child_stuff): Set child_initialization_done to
6488 zero during child initialization, and 1 after. Replace call
6489 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6490 Add comment.
6491 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6492 (handle_unload_dll): Add function documentation.
6493 (get_child_debug_event): Ignore load and unload DLL events
6494 during child initialization.
6495
6496 2014-02-20 Doug Evans <dje@google.com>
6497
6498 Remove global all_lwps.
6499 * inferiors.h (ptid_of): Move here from linux-low.h.
6500 (pid_of, lwpid_of): Ditto.
6501 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6502 parameter is a struct thread_info * now.
6503 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6504 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6505 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6506 directly.
6507 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6508 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6509 * linux-arm-low.c (update_registers_callback): Update, "entry"
6510 parameter is a struct thread_info * now.
6511 Fetch lwpid from current_inferior directly.
6512 (arm_insert_point): Pass &all_threads to find_inferior instead of
6513 &all_lwps.
6514 (arm_remove_point): Ditto.
6515 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6516 (arm_prepare_to_resume): Fetch pid from thread.
6517 (arm_read_description): Fetch lwpid from current_inferior directly.
6518 * linux-low.c (all_lwps): Delete.
6519 (delete_lwp): Delete call to remove_inferior.
6520 (handle_extended_wait): Fetch lwpid from thread.
6521 (add_lwp): Don't set lwp->entry.id. Remove call to
6522 add_inferior_to_list.
6523 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6524 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6525 (kill_one_lwp_callback): Ditto.
6526 (linux_kill): Don't dereference NULL pointer.
6527 Fetch ptid,lwpid from thread.
6528 (get_detach_signal): Fetch ptid from thread.
6529 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6530 Simplify call to regcache_invalidate_thread.
6531 (delete_lwp_callback): Update, "entry" parameter is a
6532 struct thread_info * now. Fetch pid from thread.
6533 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6534 (status_pending_p_callback): Update, "entry" parameter is a
6535 struct thread_info * now. Fetch ptid from thread.
6536 (find_lwp_pid): Update, "entry" parameter is a
6537 struct thread_info * now.
6538 (linux_wait_for_lwp): Fetch pid from thread.
6539 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6540 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6541 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6542 (dequeue_one_deferred_signal): Ditto.
6543 (cancel_breakpoint): Fetch ptid from current_inferior.
6544 (linux_wait_for_event): Pass &all_threads to find_inferior,
6545 not &all_lwps. Fetch ptid, lwpid from thread.
6546 (count_events_callback): Update, "entry" parameter is a
6547 struct thread_info * now.
6548 (select_singlestep_lwp_callback): Ditto.
6549 (select_event_lwp_callback): Ditto.
6550 (cancel_breakpoints_callback): Ditto.
6551 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6552 not &all_lwps.
6553 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6554 (unsuspend_one_lwp): Update, "entry" parameter is a
6555 struct thread_info * now.
6556 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6557 not &all_lwps.
6558 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6559 Fetch lwpid from thread, not lwp.
6560 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6561 Pass &all_threads to find_inferior, not &all_lwps.
6562 (send_sigstop): Fetch lwpid from thread, not lwp.
6563 (send_sigstop_callback): Update, "entry" parameter is a
6564 struct thread_info * now.
6565 (suspend_and_send_sigstop_callback): Ditto.
6566 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6567 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6568 struct thread_info * now.
6569 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6570 from thread, lwp.
6571 (lwp_running): Update, "entry" parameter is a
6572 struct thread_info * now.
6573 (stop_all_lwps): Fetch ptid from thread.
6574 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6575 (linux_resume_one_lwp): Fetch lwpid from thread.
6576 (linux_set_resume_request): Update, "entry" parameter is a
6577 struct thread_info * now. Fetch pid, lwpid from thread.
6578 (resume_status_pending_p): Update, "entry" parameter is a
6579 struct thread_info * now.
6580 (need_step_over_p): Ditto. Fetch lwpid from thread.
6581 (start_step_over): Fetch lwpid from thread.
6582 (linux_resume_one_thread): Update, "entry" parameter is a
6583 struct thread_info * now. Fetch lwpid from thread.
6584 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6585 (proceed_one_lwp): Update, "entry" parameter is a
6586 struct thread_info * now. Fetch lwpid from thread.
6587 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6588 struct thread_info * now.
6589 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6590 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6591 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6592 directly.
6593 (regsets_store_inferior_registers): Ditto.
6594 (fetch_register, store_register): Ditto.
6595 (linux_read_memory, linux_write_memory): Ditto.
6596 (linux_request_interrupt): Ditto.
6597 (linux_read_auxv): Ditto.
6598 (linux_xfer_siginfo): Ditto.
6599 (linux_qxfer_spu): Ditto.
6600 (linux_qxfer_libraries_svr4): Ditto.
6601 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6602 moved to inferiors.h.
6603 (get_lwp): Delete.
6604 (get_thread_lwp): Update.
6605 (struct lwp_info): Delete member "entry". Simplify comment for
6606 member "thread".
6607 (all_lwps): Delete.
6608 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6609 current_inferior directly.
6610 (update_watch_registers_callback): Update, "entry" parameter is a
6611 struct thread_info * now. Fetch pid from thread.
6612 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6613 (mips_insert_point): Fetch lwpid from current_inferior.
6614 Pass &all_threads to find_inferior, not &all_lwps.
6615 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6616 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6617 directly.
6618 (mips_stopped_data_address): Ditto.
6619 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6620 directly.
6621 * linux-tile-low.c (tile_arch_setup): Ditto.
6622 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6623 (update_debug_registers_callback): Update, "entry" parameter is a
6624 struct thread_info * now. Fetch pid from thread.
6625 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6626 Pass &all_threads to find_inferior, not &all_lwps.
6627 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6628 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6629 Pass &all_threads to find_inferior, not &all_lwps.
6630 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6631 (i386_dr_low_get_status): Ditto.
6632 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6633 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6634 (x86_linux_read_description): Ditto.
6635 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6636
6637 2014-02-20 Doug Evans <dje@google.com>
6638
6639 * inferiors.c (get_first_inferior): Fix buglet.
6640
6641 2014-02-19 Doug Evans <dje@google.com>
6642
6643 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6644 * inferiors.c (add_thread): Change result type to struct thread_info *.
6645 All callers updated.
6646 (add_lwp): Call add_thread here instead of in callers.
6647 All callers updated.
6648 * linux-low.h (get_lwp_thread): Rewrite.
6649 (struct lwp_info): New member "thread".
6650
6651 2014-02-19 Doug Evans <dje@google.com>
6652
6653 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6654 All callers updated.
6655
6656 2014-02-19 Doug Evans <dje@google.com>
6657
6658 * inferiors.c (add_thread): Fix whitespace.
6659
6660 2014-02-19 Doug Evans <dje@google.com>
6661
6662 * dll.c (clear_dlls): Replace accessing list implemention details
6663 with API function.
6664 * gdbthread.h (get_first_thread): Declare.
6665 * inferiors.c (for_each_inferior_with_data): New function.
6666 (get_first_thread): New function.
6667 (find_thread_ptid): Simplify.
6668 (get_first_inferior): New function.
6669 (clear_list): Delete.
6670 (one_inferior_p): New function.
6671 (clear_inferior_list): New function.
6672 (clear_inferiors): Update.
6673 * inferiors.h (for_each_inferior_with_data): Declare.
6674 (clear_inferior_list): Declare.
6675 (one_inferior_p): Declare.
6676 (get_first_inferior): Declare.
6677 * linux-low.c (linux_wait_for_event): Replace accessing list
6678 implemention details with API function.
6679 * server.c (target_running): Ditto.
6680 (accumulate_file_name_length): New function.
6681 (emit_dll_description): New function.
6682 (handle_qxfer_libraries): Replace accessing list implemention
6683 details with API function.
6684 (handle_qxfer_threads_worker): New function.
6685 (handle_qxfer_threads_proper): Replace accessing list implemention
6686 details with API function.
6687 (handle_query): Ditto.
6688 (visit_actioned_threads_callback_ftype): New typedef.
6689 (visit_actioned_threads_data): New struct.
6690 (visit_actioned_threads): Rewrite to be find_inferior callback.
6691 (resume): Call find_inferior.
6692 (handle_status): Replace accessing list implemention
6693 details with API function.
6694 (process_serial_event): Replace accessing list implemention details
6695 with API function.
6696 * target.c (set_desired_inferior): Replace accessing list implemention
6697 details with API function.
6698 * tracepoint.c (same_process_p): New function.
6699 (gdb_agent_about_to_close): Replace accessing list implemention
6700 details with API function.
6701 * win32-low.c (child_delete_thread): Replace accessing list
6702 implemention details with API function.
6703 (match_dll_by_basename): New function.
6704 (dll_is_loaded_by_basename): New function.
6705 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6706 details call to dll_is_loaded_by_basename.
6707
6708 2014-02-19 Doug Evans <dje@google.com>
6709
6710 * dll.h (struct dll_info): Add comment.
6711 * gdbthread.h (struct thread_info): Add comment.
6712 (current_ptid): Simplify.
6713 * inferiors.c (add_process): Update.
6714 (remove_process): Update.
6715 * inferiors.h (struct process_info): Rename member "head" to "entry".
6716 * linux-low.c (delete_lwp): Update.
6717 (add_lwp): Update.
6718 (last_thread_of_process_p): Update.
6719 (kill_one_lwp_callback, linux_kill): Update.
6720 (status_pending_p_callback): Update.
6721 (wait_for_sigstop): Update. Simplify read of ptid.
6722 (start_step_over): Update.
6723 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6724 (get_lwp_thread): Update.
6725 (struct lwp_info): Rename member "head" to "entry".
6726 * regcache.h (inferior_list_entry): Delete.
6727 * server.c (kill_inferior_callback): Update.
6728 (detach_or_kill_inferior_callback): Update.
6729 (print_started_pid): Update.
6730 (print_attached_pid): Update.
6731 (process_serial_event): Simplify read of ptid.
6732 * thread-db.c (thread_db_create_event): Update.
6733 (thread_db_get_tls_address): Update.
6734 * win32-low.c (current_inferior_ptid): Simplify.
6735
6736 2014-02-19 Tom Tromey <tromey@redhat.com>
6737
6738 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6739 argument.
6740 (target_supports_btrace): Update.
6741
6742 2014-02-14 Yao Qi <yao@codesourcery.com>
6743
6744 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6745 (rsp-low-ipa.o): New target.
6746
6747 2014-02-12 Tom Tromey <tromey@redhat.com>
6748
6749 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6750 convert_ascii_to_int.
6751 * regcache.c (registers_to_string): Likewise.
6752 * remote-utils.c (decode_M_packet): Likewise.
6753 * server.c (process_serial_event): Likewise.
6754
6755 2014-02-12 Tom Tromey <tromey@redhat.com>
6756
6757 * server.c (handle_query, handle_v_run): Use hex2bin, not
6758 unhexify.
6759 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6760
6761 2014-02-12 Tom Tromey <tromey@redhat.com>
6762
6763 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6764 convert_int_to_ascii.
6765 * regcache.c (registers_to_string, collect_register_as_string):
6766 Likewise.
6767 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6768 Likewise.
6769 * server.c (process_serial_event): Likewise.
6770 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6771 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6772
6773 2014-02-12 Tom Tromey <tromey@redhat.com>
6774
6775 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6776 bin2hex, not hexify.
6777 * tracepoint.c (cmd_qtstatus): Likewise.
6778
6779 2014-02-12 Tom Tromey <tromey@redhat.com>
6780
6781 * remote-utils.c (monitor_output): Pass explicit length to
6782 hexify.
6783
6784 2014-02-12 Tom Tromey <tromey@redhat.com>
6785
6786 * tracepoint.c: Include rsp-low.h.
6787 * server.c: Include rsp-low.h.
6788 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6789 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6790 declare.
6791 * remote-utils.c: Include rsp-low.h.
6792 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6793 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6794 (convert_int_to_ascii, convert_ascii_to_int): Move to
6795 common/rsp-low.c.
6796 * regcache.c: Include rsp-low.h.
6797 * ax.c: Include rsp-low.h.
6798 * Makefile.in (SFILES): Add common/rsp-low.c.
6799 (OBS): Add rsp-low.o.
6800 (rsp-low.o): New target.
6801
6802 2014-02-12 Tom Tromey <tromey@redhat.com>
6803
6804 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6805 Include print-utils.h.
6806 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6807 (plongest, thirty_two, phex_nz): Remove.
6808 * Makefile.in (SFILES): Add common/print-utils.c.
6809 (OBS): Add print-utils.o.
6810 (print-utils-ipa.o): New target.
6811 (print-utils.o): New target.
6812 (IPA_OBJS): Add print-utils-ipa.o.
6813
6814 2014-02-06 Tom Tromey <tromey@redhat.com>
6815
6816 * Makefile.in (SFILES): Fix indentation.
6817
6818 2014-02-05 Doug Evans <dje@google.com>
6819
6820 * linux-low.c (linux_wait_for_event): Improve comment.
6821 (linux_wait_1): Keep current_inferior in sync with event_child.
6822
6823 2014-01-22 Doug Evans <dje@google.com>
6824
6825 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6826
6827 2014-01-22 Doug Evans <dje@google.com>
6828
6829 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6830 * configure: Regenerate.
6831 * config.in: Regenerate.
6832 * Makefile.in (SFILES): Add debug.c.
6833 (OBS): Add debug.o.
6834 * debug.c: New file.
6835 * debug.h: New file.
6836 * linux-aarch64-low.c (*): Update all debugging printfs to use
6837 debug_printf instead of fprintf.
6838 * linux-arm-low.c (*): Ditto.
6839 * linux-cris-low.c (*): Ditto.
6840 * linux-crisv32-low.c (*): Ditto.
6841 * linux-m32r-low.c (*): Ditto.
6842 * linux-sparc-low.c (*): Ditto.
6843 * linux-x86.c (*): Ditto.
6844 * linux-low.c (*): Ditto.
6845 (linux_wait_1): Add calls to debug_enter, debug_exit.
6846 (linux_wait): Remove redundant debugging printf.
6847 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6848 (linux_resume, unstop_all_lwps): Ditto.
6849 * mem-break.c (*): Update all debugging printfs to use
6850 debug_printf instead of fprintf.
6851 * remote-utils.c (*): Ditto.
6852 * thread-db.c (*): Ditto.
6853 * server.c #include <ctype.h>, "gdb_vecs.h".
6854 (debug_threads): Moved to debug.c.
6855 (*): Update all debugging printfs to use debug_printf instead of
6856 fprintf.
6857 (start_inferior): Replace call to fflush with call to debug_flush.
6858 (monitor_show_help): Mention set debug-format.
6859 (parse_debug_format_options): New function.
6860 (handle_monitor_command): Handle "monitor set debug-format".
6861 (gdbserver_usage): Mention --debug-format.
6862 (main): Parse --debug-format.
6863 * server.h (debug_threads): Declaration moved to debug.h.
6864 #include "debug.h".
6865 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6866 trace_debug_1 that uses debug_printf.
6867 (tracepoint_look_up_symbols): Update all debugging printfs to use
6868 debug_printf instead of fprintf.
6869
6870 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6871
6872 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6873 sys/ptrace.h.
6874
6875 2014-01-17 Pedro Alves <palves@redhat.com>
6876
6877 PR build/16445
6878 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6879 defined after including gdb_proc_service.h.
6880
6881 2014-01-16 Doug Evans <dje@google.com>
6882
6883 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6884 (match_dll): Use it.
6885
6886 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6887
6888 * target.h (target_ops) <read_btrace>: Change parameters and
6889 return type to allow error reporting.
6890 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6891 trace reading errors on.
6892 * linux-low.c (linux_low_read_btrace): Pass trace reading
6893 errors on.
6894 (linux_low_disable_btrace): New.
6895
6896 2014-01-15 Doug Evans <dje@google.com>
6897
6898 * inferiors.c (thread_id_to_gdb_id): Delete.
6899 * inferiors.h (thread_id_to_gdb_id): Delete.
6900
6901 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6902
6903 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6904 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6905 versions.
6906
6907 2014-01-08 Pedro Alves <palves@redhat.com>
6908
6909 * server.c (handle_status): Don't discard previous queued stop
6910 replies or thread's pending status here.
6911 (main) <disconnection>: Do it here instead.
6912
6913 2014-01-08 Pedro Alves <palves@redhat.com>
6914
6915 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6916 * server.c (visit_actioned_threads, handle_pending_status): New
6917 function.
6918 (handle_v_cont): Factor out parts to ...
6919 (resume): ... this new function. If in all-stop, and a thread
6920 being resumed has a pending status, report it without actually
6921 resuming.
6922 (myresume): Adjust to use the new 'resume' function.
6923 (clear_pending_status_callback, set_pending_status_callback)
6924 (find_status_pending_thread_callback): New functions.
6925 (handle_status): Handle the case of multiple threads having
6926 interesting statuses to report. Report threads' real last signal
6927 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6928 with an interesting thread to report the status for, instead of
6929 always reporting the status of the first thread.
6930
6931 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6932
6933 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6934 * gdbreplay.c (gdbreplay_version): Likewise.
6935
6936 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6937
6938 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6939 iov.iov_len with the real length in use.
6940
6941 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6942
6943 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6944 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6945 for all targets that use win32-low.c.
6946 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6947 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6948
6949 2013-12-13 Pedro Alves <palves@redhat.com>
6950
6951 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6952 if equal to TARGET_WAITKIND_LOADED.
6953 * win32-low.c (cached_status): New static global.
6954 (win32_wait): Add declaration.
6955 (do_initial_child_stuff): Flush all initial pending debug events
6956 up to the initial breakpoint.
6957 (win32_wait): If CACHED_STATUS was set, return that instead
6958 of doing a real wait. Remove the code resuming the execution
6959 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6960 during the initial phase. Also remove the code changing
6961 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6962 TARGET_WAITKIND_STOPPED.
6963
6964 2013-12-11 Yao Qi <yao@codesourcery.com>
6965
6966 * notif.c (handle_notif_ack): Return 0 if no notification
6967 matches.
6968
6969 2013-11-20 Doug Evans <dje@google.com>
6970
6971 * linux-low.c (linux_set_resume_request): Fix comment.
6972
6973 2013-11-20 Doug Evans <dje@google.com>
6974
6975 * linux-low.c (resume_status_pending_p): Tweak comment.
6976
6977 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6978
6979 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6980 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6981 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6982 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6983 (srv_amd64_regobj): Add amd64-mpx.o.
6984 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6985 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6986 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6987 * i387-fp.c (num_pl_bnd_register) Added constant.
6988 (num_pl_bnd_cfg_registers) Added constant.
6989 (struct i387_xsave) Added reserved area and MPX fields.
6990 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6991 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6992 function.
6993 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6994 (init_registers_amd64_mpx_linux): Declare new function.
6995 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6996 (x86_64_regmap): Add MPX registers.
6997 (x86_linux_read_description): Add MPX case.
6998 (initialize_low_arch): Initialize MPX targets.
6999
7000 2013-11-18 Tom Tromey <tromey@redhat.com>
7001
7002 * configure: Rebuild.
7003 * configure.ac: Don't check for stdlib.h.
7004 * gdbreplay.c: Unconditionally include stdlib.h.
7005
7006 2013-11-18 Tom Tromey <tromey@redhat.com>
7007
7008 * config.in: Rebuild.
7009 * configure: Rebuild.
7010 * configure.ac: Don't use AC_HEADER_DIRENT.
7011
7012 2013-11-18 Tom Tromey <tromey@redhat.com>
7013
7014 * server.h: Don't check HAVE_STRING_H.
7015 * gdbreplay.c: Don't check HAVE_STRING_H.
7016 * configure: Rebuild.
7017
7018 2013-11-18 Tom Tromey <tromey@redhat.com>
7019
7020 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7021 LIBGNU.
7022
7023 2013-11-08 Tom Tromey <tromey@redhat.com>
7024
7025 * configure, config.in: Rebuild.
7026 * configure.ac: Remove unused configury.
7027
7028 2013-11-08 Tom Tromey <tromey@redhat.com>
7029
7030 * acinclude.m4: Include common.m4, codeset.m4.
7031 * configure, config.in: Rebuild.
7032 * configure.ac: Use GDB_AC_COMMON.
7033
7034 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7035
7036 * linux-s390-low.c (HWCAP_S390_TE): New define.
7037 (s390_arch_setup): Consider the TE field in the HWCAP for
7038 determining 'have_regset_tdb'.
7039
7040 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7041
7042 PR gdb/16014
7043 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7044 call to sizeof.
7045
7046 2013-10-02 Pedro Alves <palves@redhat.com>
7047
7048 * server.c (process_serial_event): Don't output "GDBserver
7049 exiting" if GDB is connected through stdio.
7050 * target.c (mywait): Likewise, be silent if GDB is connected
7051 through stdio.
7052
7053 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7054
7055 * lynx-low.c (lynx_add_threads_after_attach): New function.
7056 (lynx_attach): Remove call to add_thread. Add call to
7057 lynx_add_threads_after_attach instead.
7058
7059 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7060
7061 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7062 * config.in, configure: Regenerated.
7063
7064 2013-09-18 Yao Qi <yao@codesourcery.com>
7065
7066 PR server/15959
7067 * server.c (start_inferior): Clear 'resume_info'.
7068
7069 2013-09-16 Jiong Wang <jiwang@tilera.com>
7070
7071 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7072 for each register.
7073
7074 2013-09-16 Jiong Wang <jiwang@tilera.com>
7075
7076 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7077 linux-tile-low.o to srv_tgtobj.
7078
7079 2013-09-16 Will Newton <will.newton@linaro.org>
7080
7081 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7082 out regs.
7083
7084 2013-09-06 Pedro Alves <palves@redhat.com>
7085
7086 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7087 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7088 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7089 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7090 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7091 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7092
7093 2013-09-06 Pedro Alves <palves@redhat.com>
7094
7095 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7096 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7097
7098 2013-09-06 Pedro Alves <palves@redhat.com>
7099
7100 * linux-amd64-ipa.c: Include tracepoint.h.
7101 * linux-i386-ipa.c: Include tracepoint.h.
7102
7103 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7104
7105 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7106 (ps_get_thread_area): New function.
7107
7108 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7109
7110 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7111 (initialize_low_arch): Call init_registers_crisv32 rather than
7112 init_register_crisv32.
7113
7114 2013-09-05 Pedro Alves <palves@redhat.com>
7115
7116 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7117 to ...
7118 * hostio.h: ... this new file.
7119 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7120 win32-low.c: Include hostio.h.
7121
7122 2013-09-05 Pedro Alves <palves@redhat.com>
7123
7124 * server.h (gdb_client_data, handler_func, callback_handler_func)
7125 (delete_file_handler, add_file_handler, append_callback_event)
7126 (delete_callback_event, start_event_loop, initialize_event_loop):
7127 Move to event-loop.h and include it.
7128 * event-loop.h: New file.
7129
7130 2013-09-05 Pedro Alves <palves@redhat.com>
7131
7132 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7133 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7134 (loaded_dll, unloaded_dll): Move to ...
7135 * dll.h: ... this new file.
7136 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7137
7138 2013-09-05 Pedro Alves <palves@redhat.com>
7139
7140 * server.h (current_process, get_thread_process, all_processes)
7141 (add_inferior_to_list, for_each_inferior, current_inferior)
7142 (remove_inferior, add_process, remove_process, find_process_pid)
7143 (have_started_inferiors_p, have_attached_inferiors_p)
7144 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7145 (clear_inferiors, find_inferior, find_inferior_id)
7146 (inferior_target_data, set_inferior_target_data)
7147 (inferior_regcache_data, set_inferior_regcache_data): Move to
7148 inferiors.h, and include it.
7149 * inferiors.h: New file.
7150
7151 2013-09-05 Pedro Alves <palves@redhat.com>
7152
7153 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7154 Move ...
7155 * ax.h: ... here.
7156
7157 2013-09-05 Pedro Alves <palves@redhat.com>
7158
7159 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7160 tracepoint.h.
7161 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7162 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7163 (handle_tracepoint_general_set, handle_tracepoint_query)
7164 (tracepoint_finished_step, tracepoint_was_hit)
7165 (release_while_stepping_state_list, current_traceframe)
7166 (in_readonly_region, traceframe_read_mem)
7167 (fetch_traceframe_registers, traceframe_read_sdata)
7168 (traceframe_read_info, struct fast_tpoint_collect_status)
7169 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7170 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7171 (supply_fast_tracepoint_registers)
7172 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7173 (ipa_tdesc, claim_trampoline_space)
7174 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7175 (agent_mem_read, agent_get_trace_state_variable_value)
7176 (agent_set_trace_state_variable_value, agent_tsv_read)
7177 (agent_mem_read_string, get_raw_reg_func_addr)
7178 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7179 * tracepoint.h: ... this new file.
7180
7181 2013-09-05 Pedro Alves <palves@redhat.com>
7182
7183 * server.h (perror_with_name, error, fatal, warning, paddress)
7184 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7185 include it.
7186 * utils.h: New file.
7187
7188 2013-09-05 Pedro Alves <palves@redhat.com>
7189
7190 * server.h (remote_debug, noack_mode, transport_is_reliable)
7191 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7192 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7193 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7194 (write_enn, initialize_async_io, enable_async_io)
7195 (disable_async_io, check_remote_input_interrupt_request)
7196 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7197 (dead_thread_notify, prepare_resume_reply)
7198 (decode_address_to_semicolon, decode_address, decode_m_packet)
7199 (decode_M_packet, decode_X_packet, decode_xfer_write)
7200 (decode_search_memory_packet, unhexify, hexify)
7201 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7202 (look_up_one_symbol, relocate_instruction)
7203 (monitor_output): Move to remote-utils.h, and include it.
7204 * remote-utils.h: New file.
7205
7206 2013-09-05 Pedro Alves <palves@redhat.com>
7207
7208 * server.h (_): Delete.
7209
7210 2013-09-02 Pedro Alves <palves@redhat.com>
7211
7212 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7213 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7214 allocated.
7215 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7216
7217 2013-09-02 Pierre Muller <muller@sourceware.org>
7218
7219 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7220 or WriteProcessMemory complete successfully and handle
7221 ERROR_PARTIAL_COPY error.
7222
7223 2013-09-02 Pedro Alves <palves@redhat.com>
7224
7225 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7226 error instead of EIO.
7227
7228 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7229
7230 PR server/15604
7231 * linux-low.c: Include filestuff.h.
7232 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7233 * lynx-low.c: Include filestuff.h.
7234 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7235 * server.c: Include filestuff.h.
7236 (main): Call notice_open_fds.
7237 * spu-low.c: Include filestuff.h.
7238 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7239
7240 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7241
7242 * Makefile.in: Explain why ../target and ../nat are not
7243 listed as include file search paths.
7244 (linux-waitpid.o): New object file rule.
7245 * configure.srv (srv_native_linux_obj): New variable.
7246 Replace all occurrences of linux native object files with
7247 $srv_native_linux_obj.
7248 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7249 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7250 (linux_enable_event_reporting): Remove declaration.
7251 (my_waitpid): Moved to common/linux-waitpid.c.
7252 (linux_wait_for_event): Pass ptid when calling
7253 linux_enable_event_reporting.
7254 (linux_supports_tracefork_flag): Remove.
7255 (linux_enable_event_reporting): Likewise.
7256 (linux_tracefork_grandchild): Remove.
7257 (STACK_SIZE): Moved to common/linux-ptrace.c.
7258 (linux_tracefork_child): Remove.
7259 (linux_test_for_tracefork): Remove.
7260 (linux_look_up_symbols): Call linux_supports_traceclone.
7261 (initialize_low): Remove call to linux_test_for_tracefork.
7262 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7263 common/linux-ptrace.h.
7264 (PTRACE_TYPE_ARG4): Likewise.
7265 Include linux-ptrace.h.
7266
7267 2013-08-21 Pedro Alves <palves@redhat.com>
7268
7269 * config.in: Renegerate.
7270
7271 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7272
7273 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7274 (SFILES): Remove $(srcdir)/common/target-common.c and
7275 add $(srcdir)/target/waitstatus.c.
7276 (OBS): Remove target-common.o and add waitstatus.o.
7277 (server_h): Remove $(srcdir)/../common/target-common.h and
7278 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7279 and $(srcdir)/../target/waitstatus.h.
7280 (target-common.o): Remove.
7281 (waitstatus.o): New target object file.
7282 * target.h: Do not include target-common.h and
7283 include target/resume.h, target/wait.h and
7284 target/waitstatus.h.
7285
7286 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7287
7288 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7289 to PTRACE_TYPE_ARG3.
7290 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7291 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7292 PTRACE_TYPE_ARG4.
7293 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7294 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7295
7296 2013-07-27 Jie Zhang <jie@codesourcery.com>
7297 Daniel Jacobowitz <dan@codesourcery.com>
7298 Yao Qi <yao@codesourcery.com>
7299
7300 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7301 (mips-linux-watch.o): New rule.
7302 (mips_linux_watch_h): New variable.
7303 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7304 srv_tgtobj.
7305 * linux-mips-low.c: Include mips-linux-watch.h.
7306 (struct arch_process_info, struct arch_lwp_info): New.
7307 (update_watch_registers_callback): New function.
7308 (mips_linux_new_process, mips_linux_new_thread) New functions.
7309 (mips_linux_prepare_to_resume, mips_insert_point): New
7310 functions.
7311 (mips_remove_point, mips_stopped_by_watchpoint): New
7312 functions.
7313 (rsp_bp_type_to_target_hw_bp_type): New function.
7314 (mips_stopped_data_address): New function.
7315 (the_low_target): Add watchpoint support functions.
7316
7317 2013-07-27 Yao Qi <yao@codesourcery.com>
7318
7319 * i386-low.c: Include break-common.h.
7320 (enum target_hw_bp_type): Remove.
7321
7322 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7323
7324 * Makefile.in (SFILES): /common/target-common.c.
7325 (OBS): Add target-common.o.
7326 (server_h): Add $(srcdir)/../common/target-common.h.
7327 (target-common.o): New target.
7328 * server.c (queue_stop_reply_callback): Free
7329 status string after use.
7330 * target.c (target_waitstatus_to_string): Remove.
7331 * target.h: Include target-common.h.
7332 (resume_kind): Likewise.
7333 (target_waitkind): Likewise.
7334 (target_waitstatus): Likewise.
7335 (TARGET_WNOHANG): Likewise.
7336
7337 2013-07-04 Yao Qi <yao@codesourcery.com>
7338
7339 * Makefile.in (host_alias): Use @host_noncanonical@.
7340 (target_alias): Use @target_noncanonical@.
7341 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7342 ACX_NONCANONICAL_HOST.
7343 * configure: Regenerated.
7344
7345 Revert:
7346 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7347
7348 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7349 * configure: Rebuild.
7350 * Makefile.in (version_host, version_target): Get from configure.
7351 (version.c): Use $(version_host) and $(version_target).
7352
7353 2013-07-03 Pedro Alves <palves@redhat.com>
7354
7355 * Makefile.in (config.status): Depend on development.sh.
7356 * acinclude.m4: Include libmcheck.m4.
7357 * configure: Regenerate.
7358
7359 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7360
7361 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7362 attribute inside the parentheses.
7363 (winapi_DebugSetProcessKillOnExit): Ditto.
7364 (winapi_DebugBreakProcess): Ditto.
7365 (winapi_GenerateConsoleCtrlEvent): Ditto.
7366
7367 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7368
7369 * notif.h (notif_event): Add a dummy member to avoid compiler
7370 errors.
7371
7372 2013-07-01 Pedro Alves <palves@redhat.com>
7373
7374 * hostio.c (HOSTIO_PATH_MAX): Define.
7375 (require_filename, handle_open, handle_unlink, handle_readlink):
7376 Use it.
7377
7378 2013-07-01 Pedro Alves <palves@redhat.com>
7379
7380 * server.h: Include "pathmax.h".
7381 * linux-low.c: Don't include sys/param.h.
7382 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7383 MAXPATHLEN.
7384 * win32-low.c: Don't include sys/param.h.
7385 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7386
7387 2013-07-01 Pedro Alves <palves@redhat.com>
7388
7389 * event-loop.c: Don't check HAVE_UNISTD_H before including
7390 <unistd.h>.
7391 * gdbreplay.c: Likewise.
7392 * remote-utils.c: Likewise.
7393 * server.c: Likewise.
7394 * configure.ac: Don't check for unistd.h.
7395 * configure: Regenerate.
7396
7397 2013-06-28 Tom Tromey <tromey@redhat.com>
7398
7399 * Makefile.in (version.c): Use version.in, not
7400 common/version.in.
7401
7402 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7403
7404 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7405 * configure: Rebuild.
7406 * Makefile.in (version_host, version_target): Get from configure.
7407 (version.c): Use $(version_host) and $(version_target).
7408
7409 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7410
7411 Fix trace-status to output user name without trailing colon.
7412 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7413
7414 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7415
7416 Fix trace-status to output proper start-time and stop-time.
7417 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7418 output start time and stop time in hex as gdb expects.
7419
7420 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7421
7422 * tracepoint.c (build_traceframe_info_xml): Output trace state
7423 variables present in the trace buffer.
7424
7425 2013-06-24 Tom Tromey <tromey@redhat.com>
7426
7427 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7428 create-version.sh.
7429 (version.o): Remove.
7430 * gdbreplay.c: Include version.h.
7431 (version, host_name): Don't declare.
7432 * server.h: Include version.h.
7433 (version, host_name): Don't declare.
7434
7435 2013-06-12 Pedro Alves <palves@redhat.com>
7436
7437 * linux-x86-low.c (linux_is_elf64): Delete global.
7438 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7439 with local linux_pid_exe_is_elf_64_file use.
7440
7441 2013-06-11 Pedro Alves <palves@redhat.com>
7442
7443 * linux-low.c (regset_disabled, disable_regset): New functions.
7444 (regsets_fetch_inferior_registers)
7445 (regsets_store_inferior_registers): Use them.
7446 (initialize_regsets_info); Don't allocate the disabled_regsets
7447 array here.
7448 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7449 comment.
7450
7451 2013-06-11 Pedro Alves <palves@redhat.com>
7452
7453 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7454 xmalloc.
7455
7456 2013-06-11 Pedro Alves <palves@redhat.com>
7457
7458 * linux-x86-low.c (initialize_low_arch): Call
7459 init_registers_x32_avx_linux.
7460
7461 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7462
7463 Fix compatibility with Android Bionic.
7464 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7465 it is not empty.
7466
7467 2013-06-07 Pedro Alves <palves@redhat.com>
7468
7469 PR server/14823
7470 * Makefile.in (OBS): Add tdesc.o.
7471 (IPA_OBJS): Add tdesc-ipa.o.
7472 (tdesc-ipa.o): New rule.
7473 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7474 interface.
7475 * linux-low.c (new_inferior): Delete.
7476 (disabled_regsets, num_regsets): Delete.
7477 (linux_add_process): Adjust to set the new per-process
7478 new_inferior flag.
7479 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7480 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7481 was a stop. When calling arch_setup, switch the current inferior
7482 to the thread that got an event.
7483 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7484 (regsets_fetch_inferior_registers)
7485 (regsets_store_inferior_registers): New regsets_info parameter.
7486 Adjust to use it.
7487 (linux_register_in_regsets): New regs_info parameter. Adjust to
7488 use it.
7489 (register_addr, fetch_register, store_register): New usrregs_info
7490 parameter. Adjust to use it.
7491 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7492 parameter regs_info. Adjust to use it.
7493 (linux_fetch_registers): Get the current inferior's regs_info, and
7494 adjust to use it.
7495 (linux_store_registers): Ditto.
7496 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7497 (initialize_low): Don't initialize the target_regsets here. Call
7498 initialize_low_arch.
7499 * linux-low.h (target_regsets): Delete declaration.
7500 (struct regsets_info): New.
7501 (struct usrregs_info): New.
7502 (struct regs_info): New.
7503 (struct process_info_private) <new_inferior>: New field.
7504 (struct linux_target_ops): Delete the num_regs, regmap, and
7505 regset_bitmap fields. New field regs_info.
7506 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7507 * i387-fp.c (num_xmm_registers): Delete.
7508 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7509 calls to new interface.
7510 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7511 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7512 Infer the number of xmm registers from the regcache's target
7513 description.
7514 * i387-fp.h (num_xmm_registers): Delete.
7515 * inferiors.c (add_thread): Don't install the thread's regcache
7516 here.
7517 * proc-service.c (gregset_info): Fetch the current inferior's
7518 regs_info. Adjust to use it.
7519 * regcache.c: Include tdesc.h.
7520 (register_bytes, reg_defs, num_registers)
7521 (gdbserver_expedite_regs): Delete.
7522 (get_thread_regcache): If the thread doesn't have a regcache yet,
7523 create one, instead of aborting gdbserver.
7524 (regcache_invalidate_one): Rename to ...
7525 (regcache_invalidate_thread): ... this.
7526 (regcache_invalidate_one): New.
7527 (regcache_invalidate): Only invalidate registers of the current
7528 process.
7529 (init_register_cache): Add target_desc parameter, and use it.
7530 (new_register_cache): Ditto. Assert the target description has a
7531 non zero registers_size.
7532 (regcache_cpy): Add assertions. Adjust.
7533 (realloc_register_cache, set_register_cache): Delete.
7534 (registers_to_string, registers_from_string): Adjust.
7535 (find_register_by_name, find_regno, find_register_by_number)
7536 (register_cache_size): Add target_desc parameter, and use it.
7537 (free_register_cache_thread, free_register_cache_thread_one)
7538 (regcache_release, register_cache_size): New.
7539 (register_size): Add target_desc parameter, and use it.
7540 (register_data, supply_register, supply_register_zeroed)
7541 (supply_regblock, supply_register_by_name, collect_register)
7542 (collect_register_as_string, collect_register_by_name): Adjust.
7543 * regcache.h (struct target_desc): Forward declare.
7544 (struct regcache) <tdesc>: New field.
7545 (init_register_cache, new_register_cache): Add target_desc
7546 parameter.
7547 (regcache_invalidate_thread): Declare.
7548 (regcache_invalidate_one): Delete declaration.
7549 (regcache_release): Declare.
7550 (find_register_by_number, register_cache_size, register_size)
7551 (find_regno): Add target_desc parameter.
7552 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7553 declarations.
7554 * remote-utils.c: Include tdesc.h.
7555 (outreg, prepare_resume_reply): Adjust.
7556 * server.c: Include tdesc.h.
7557 (gdbserver_xmltarget): Delete declaration.
7558 (get_features_xml, process_serial_event): Adjust.
7559 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7560 declare.
7561 (struct process_info) <tdesc>: New field.
7562 (ipa_tdesc): Declare.
7563 * tdesc.c: New file.
7564 * tdesc.h: New file.
7565 * tracepoint.c: Include tdesc.h.
7566 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7567 (get_context_regcache): Adjust to pass ipa_tdesc down.
7568 (do_action_at_tracepoint): Adjust to get the register cache size
7569 from the context regcache's description.
7570 (traceframe_walk_blocks): Adjust to get the register cache size
7571 from the current trace frame's description.
7572 (traceframe_get_pc): Adjust to get current trace frame's
7573 description and pass it down.
7574 (gdb_collect): Adjust to get the register cache size from the
7575 IPA's description.
7576 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7577 (gdbserver_xmltarget): Delete.
7578 (initialize_low_tracepoint): Set the ipa's target description.
7579 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7580 (initialize_low_tracepoint): Set the ipa's target description.
7581 * linux-x86-low.c: Include tdesc.h.
7582 [__x86_64__] (is_64bit_tdesc): New.
7583 (ps_get_thread_area, x86_get_thread_area): Use it.
7584 (i386_cannot_store_register): Rename to ...
7585 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7586 (i386_cannot_fetch_register): Rename to ...
7587 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7588 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7589 to new interface.
7590 (target_regsets): Rename to ...
7591 (x86_regsets): ... this.
7592 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7593 interface.
7594 (x86_siginfo_fixup): Use is_64bit_tdesc.
7595 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7596 (tdesc_x32_avx_linux, tdesc_x32_linux)
7597 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7598 Declare.
7599 (x86_linux_update_xmltarget): Delete.
7600 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7601 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7602 (AMD64_LINUX_USER64_CS): New.
7603 (x86_linux_read_description): New, based on
7604 x86_linux_update_xmltarget.
7605 (same_process_callback): New.
7606 (x86_arch_setup_process_callback): New.
7607 (x86_linux_update_xmltarget): New.
7608 (x86_regsets_info): New.
7609 (amd64_linux_regs_info): New.
7610 (i386_linux_usrregs_info): New.
7611 (i386_linux_regs_info): New.
7612 (x86_linux_regs_info): New.
7613 (x86_arch_setup): Reimplement.
7614 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7615 (x86_emit_ops): Ditto.
7616 (the_low_target): Adjust. Install x86_linux_regs_info,
7617 x86_cannot_fetch_register, and x86_cannot_store_register.
7618 (initialize_low_arch): New.
7619 * linux-ia64-low.c (tdesc_ia64): Declare.
7620 (ia64_fetch_register): Adjust.
7621 (ia64_usrregs_info, regs_info): New globals.
7622 (ia64_regs_info): New function.
7623 (the_low_target): Adjust.
7624 (initialize_low_arch): New function.
7625 * linux-sparc-low.c (tdesc_sparc64): Declare.
7626 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7627 Adjust.
7628 (sparc_arch_setup): New function.
7629 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7630 (the_low_target): Adjust.
7631 (initialize_low_arch): New function.
7632 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7633 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7634 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7635 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7636 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7637 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7638 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7639 (tdesc_powerpc_isa205_vsx64l): Declare.
7640 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7641 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7642 (ppc_set_pc, ppc_get_hwcap): Adjust.
7643 (ppc_usrregs_info): Forward declare.
7644 (!__powerpc64__) ppc_regmap_adjusted: New global.
7645 (ppc_arch_setup): Adjust to the current process'es target
7646 description.
7647 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7648 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7649 (ppc_store_evrregset): Adjust.
7650 (target_regsets): Rename to ...
7651 (ppc_regsets): ... this, and make static.
7652 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7653 (ppc_regs_info): New function.
7654 (the_low_target): Adjust.
7655 (initialize_low_arch): New function.
7656 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7657 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7658 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7659 (tdesc_s390x_linux64v2): Declare.
7660 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7661 (s390_fill_gregset, s390_store_last_break): Adjust.
7662 (target_regsets): Rename to ...
7663 (s390_regsets): ... this, and make static.
7664 (s390_get_pc, s390_set_pc): Adjust.
7665 (s390_get_hwcap): New target_desc parameter, and use it.
7666 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7667 (s390_arch_setup): Adjust to set the current process'es target
7668 description. Don't adjust the regmap.
7669 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7670 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7671 (regs_info_3264): New globals.
7672 (s390_regs_info): New function.
7673 (the_low_target): Adjust.
7674 (initialize_low_arch): New function.
7675 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7676 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7677 [__mips64] (init_registers_mips_linux)
7678 (init_registers_mips_dsp_linux): Delete defines.
7679 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7680 (have_dsp): New global.
7681 (mips_read_description): New, based on mips_arch_setup.
7682 (mips_arch_setup): Reimplement.
7683 (get_usrregs_info): New function.
7684 (mips_cannot_fetch_register, mips_cannot_store_register)
7685 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7686 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7687 (target_regsets): Rename to ...
7688 (mips_regsets): ... this, and make static.
7689 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7690 (dsp_regs_info, regs_info): New globals.
7691 (mips_regs_info): New function.
7692 (the_low_target): Adjust.
7693 (initialize_low_arch): New function.
7694 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7695 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7696 Declare.
7697 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7698 (arm_read_description): New, with bits factored from
7699 arm_arch_setup.
7700 (arm_arch_setup): Reimplement.
7701 (target_regsets): Rename to ...
7702 (arm_regsets): ... this, and make static.
7703 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7704 (arm_regs_info): New function.
7705 (the_low_target): Adjust.
7706 (initialize_low_arch): New function.
7707 * linux-m68k-low.c (tdesc_m68k): Declare.
7708 (target_regsets): Rename to ...
7709 (m68k_regsets): ... this, and make static.
7710 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7711 (m68k_regs_info): New function.
7712 (m68k_arch_setup): New function.
7713 (the_low_target): Adjust.
7714 (initialize_low_arch): New function.
7715 * linux-sh-low.c (tdesc_sharch): Declare.
7716 (target_regsets): Rename to ...
7717 (sh_regsets): ... this, and make static.
7718 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7719 (sh_regs_info, sh_arch_setup): New functions.
7720 (the_low_target): Adjust.
7721 (initialize_low_arch): New function.
7722 * linux-bfin-low.c (tdesc_bfin): Declare.
7723 (bfin_arch_setup): New function.
7724 (bfin_usrregs_info, regs_info): New globals.
7725 (bfin_regs_info): New function.
7726 (the_low_target): Adjust.
7727 (initialize_low_arch): New function.
7728 * linux-cris-low.c (tdesc_cris): Declare.
7729 (cris_arch_setup): New function.
7730 (cris_usrregs_info, regs_info): New globals.
7731 (cris_regs_info): New function.
7732 (the_low_target): Adjust.
7733 (initialize_low_arch): New function.
7734 * linux-cris-low.c (tdesc_crisv32): Declare.
7735 (cris_arch_setup): New function.
7736 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7737 (cris_regs_info): New function.
7738 (the_low_target): Adjust.
7739 (initialize_low_arch): New function.
7740 * linux-m32r-low.c (tdesc_m32r): Declare.
7741 (m32r_arch_setup): New function.
7742 (m32r_usrregs_info, regs_info): New globals.
7743 (m32r_regs_info): Adjust.
7744 (initialize_low_arch): New function.
7745 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7746 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7747 (tic6x_usrregs_info): Forward declare.
7748 (tic6x_read_description): New function, based on ...
7749 (tic6x_arch_setup): ... this. Reimplement.
7750 (target_regsets): Rename to ...
7751 (tic6x_regsets): ... this, and make static.
7752 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7753 (tic6x_regs_info): New function.
7754 (the_low_target): Adjust.
7755 (initialize_low_arch): New function.
7756 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7757 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7758 (target_regsets): Rename to ...
7759 (xtensa_regsets): ... this, and make static.
7760 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7761 globals.
7762 (xtensa_arch_setup, xtensa_regs_info): New functions.
7763 (the_low_target): Adjust.
7764 (initialize_low_arch): New function.
7765 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7766 (nios2_arch_setup): Set the current process'es tdesc.
7767 (target_regsets): Rename to ...
7768 (nios2_regsets): ... this.
7769 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7770 (nios2_regs_info): New function.
7771 (the_low_target): Adjust.
7772 (initialize_low_arch): New function.
7773 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7774 (aarch64_arch_setup): Set the current process'es tdesc.
7775 (target_regsets): Rename to ...
7776 (aarch64_regsets): ... this.
7777 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7778 (aarch64_regs_info): New function.
7779 (the_low_target): Adjust.
7780 (initialize_low_arch): New function.
7781 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7782 globals.
7783 (target_regsets): Rename to ...
7784 (tile_regsets): ... this.
7785 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7786 (tile_regs_info): New function.
7787 (tile_arch_setup): Set the current process'es tdesc.
7788 (the_low_target): Adjust.
7789 (initialize_low_arch): New function.
7790 * spu-low.c (tdesc_spu): Declare.
7791 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7792 * win32-arm-low.c (tdesc_arm): Declare.
7793 (arm_arch_setup): New function.
7794 (the_low_target): Install arm_arch_setup instead of
7795 init_registers_arm.
7796 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7797 (init_windows_x86): Rename to ...
7798 (i386_arch_setup): ... this. Set `win32_tdesc'.
7799 (the_low_target): Adjust.
7800 * win32-low.c (win32_tdesc): New global.
7801 (child_add_thread): Don't create the thread cache here.
7802 (do_initial_child_stuff): Set the new process'es tdesc.
7803 * win32-low.h (struct target_desc): Forward declare.
7804 (win32_tdesc): Declare.
7805 * lynx-i386-low.c (tdesc_i386): Declare global.
7806 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7807 * lynx-low.c (lynx_tdesc): New global.
7808 (lynx_add_process): Set the new process'es tdesc.
7809 * lynx-low.h (struct target_desc): Forward declare.
7810 (lynx_tdesc): Declare global.
7811 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7812 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7813 * nto-low.c (nto_tdesc): New global.
7814 (do_attach): Set the new process'es tdesc.
7815 * nto-low.h (struct target_desc): Forward declare.
7816 (nto_tdesc): Declare.
7817 * nto-x86-low.c (tdesc_i386): Declare.
7818 (nto_x86_arch_setup): Set `nto_tdesc'.
7819
7820 2013-06-04 Gary Benson <gbenson@redhat.com>
7821
7822 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7823 to qSupported response when appropriate.
7824 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7825 with nonzero-length annex.
7826 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7827 arguments supplied in annex.
7828
7829 2013-05-31 Doug Evans <dje@google.com>
7830
7831 PR server/15594
7832 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7833 64 bits in 64-cross-32 environment.
7834
7835 2013-05-28 Pedro Alves <palves@redhat.com>
7836
7837 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7838 (aarch64-without-fpu.c): Delete rule.
7839 * configure.srv (aarch64*-*-linux*): Remove references to
7840 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7841 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7842 declaration.
7843
7844 2013-05-24 Pedro Alves <palves@redhat.com>
7845
7846 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7847 instead of strchr/decode_address. Error if the range isn't split
7848 with a ','. Don't assume there's be a ':' in the action.
7849
7850 2013-05-23 Yao Qi <yao@codesourcery.com>
7851 Pedro Alves <palves@redhat.com>
7852
7853 * linux-low.c (lwp_in_step_range): New function.
7854 (linux_wait_1): If the thread was range stepping and stopped
7855 outside the stepping range, report the stop to GDB. Otherwise,
7856 continue stepping. Add range stepping debug output.
7857 (linux_set_resume_request): Copy the step range from the resume
7858 request to the lwp.
7859 (linux_supports_range_stepping): New.
7860 (linux_target_ops) <supports_range_stepping>: Set to
7861 linux_supports_range_stepping.
7862 * linux-low.h (struct linux_target_ops)
7863 <supports_range_stepping>: New field.
7864 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7865 * linux-x86-low.c (x86_supports_range_stepping): New.
7866 (the_low_target) <supports_range_stepping>: Set to
7867 x86_supports_range_stepping.
7868 * server.c (handle_v_cont): Handle 'r' action.
7869 (handle_v_requests): Append ";r" if the target supports range
7870 stepping.
7871 * target.h (struct thread_resume) <step_range_start,
7872 step_range_end>: New fields.
7873 (struct target_ops) <supports_range_stepping>:
7874 New field.
7875 (target_supports_range_stepping): New macro.
7876
7877 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7878
7879 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7880 confusion in comment.
7881
7882 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7883
7884 * lynx-low.c (struct process_info_private): New type.
7885 (lynx_add_process): New function.
7886 (lynx_create_inferior, lynx_attach): Replace calls to
7887 add_process by calls to lynx_add_process.
7888 (lynx_resume): If PTID is null, then try using
7889 current_process()->private->last_wait_event_ptid.
7890 Add comments.
7891 (lynx_clear_inferiors): Delete. The contents of that function
7892 has been inlined in lynx_mourn;
7893 (lynx_wait_1): Save the ptid in the process's private data.
7894 (lynx_mourn): Free the process' private data. Replace call
7895 to lynx_clear_inferiors by call to clear_inferiors.
7896
7897 2013-05-17 Yao Qi <yao@codesourcery.com>
7898
7899 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7900 the right place.
7901
7902 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7903
7904 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7905 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7906 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7907 PT_TEXT_END_ADDR guards. Update comments.
7908 (linux_target_op) <read_offsets>: Conditionally define to
7909 linux_read_offsets if the target is UCLIBC and if it defines
7910 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7911
7912 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7913 Andrew Jenner <andrew@codesourcery.com>
7914
7915 * Makefile.in (SFILES): Add linux-nios2-low.c.
7916 (clean): Add action to delete nios2-linux.c.
7917 (nios2-linux.c): New rule.
7918 * configure.srv: Add nios2*-*-linux*.
7919 * linux-nios2-low.c: New.
7920
7921 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7922
7923 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7924
7925 2013-04-25 Hui Zhu <hui@codesourcery.com>
7926
7927 PR gdb/15186
7928 * ax.c (ax_printf): Add fflush.
7929
7930 2013-04-22 Tom Tromey <tromey@redhat.com>
7931
7932 * Makefile.in (SFILES): Add filestuff.c.
7933 (OBS): Add filestuff.o.
7934 (filestuff.o): New target.
7935 * config.in, configure: Rebuild.
7936 * configure.ac: Check for fdwalk, pipe2.
7937
7938 2013-04-17 Pedro Alves <palves@redhat.com>
7939
7940 * configure.ac (USE_THREAD_DB): Delete variable.
7941 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7942 Don't AC_SUBST USE_THREAD_DB.
7943 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7944 * config.in, configure: Regenerate.
7945
7946 2013-04-16 Pedro Alves <palves@redhat.com>
7947
7948 * linux-low.h (struct lwp_info) <thread_known>: Move under
7949 the USE_THREAD_DB #ifdef.
7950
7951 2013-04-16 Pedro Alves <palves@redhat.com>
7952
7953 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7954 (linux-low.o): Delete rule.
7955 * linux-low.h: Always include "gdb_thread_db.h" instead of
7956 conditionally including thread_db.h.
7957 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7958 HAVE_THREAD_DB_H.
7959
7960 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7961
7962 * Makefile.in (install-only): Fix make install regression.
7963
7964 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7965
7966 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7967 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7968 installation.
7969 * gdbserver.1: Remove.
7970
7971 2013-03-22 Pedro Alves <palves@redhat.com>
7972
7973 * linux-low.c (handle_extended_wait): Don't call
7974 linux_enable_event_reporting.
7975
7976 2013-03-15 Tony Theodore <tonyt@logyst.com>
7977
7978 PR build/9098:
7979 * Makefile.in (SHELL): Use @SHELL@.
7980
7981 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7982
7983 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7984 compiler warning.
7985
7986 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7987
7988 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7989 Remove extraneous NULL element.
7990
7991 2013-03-13 Yao Qi <yao@codesourcery.com>
7992
7993 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7994 'V' block in trace frame.
7995
7996 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7997
7998 * target.h (struct target_ops): Add btrace ops.
7999 (target_supports_btrace): New macro.
8000 (target_enable_btrace): New macro.
8001 (target_disable_btrace): New macro.
8002 (target_read_btrace): New macro.
8003 * gdbthread.h (struct thread_info): Add btrace field.
8004 * server.c: Include btrace-common.h.
8005 (handle_btrace_general_set): New function.
8006 (handle_btrace_enable): New function.
8007 (handle_btrace_disable): New function.
8008 (handle_general_set): Call handle_btrace_general_set.
8009 (handle_qxfer_btrace): New function.
8010 (struct qxfer qxfer_packets[]): Add btrace entry.
8011 * inferiors.c (remove_thread): Disable btrace.
8012 * linux-low: Include linux-btrace.h.
8013 (linux_low_enable_btrace): New function.
8014 (linux_low_read_btrace): New function.
8015 (linux_target_ops): Add btrace ops.
8016 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8017 Add srv_linux_btrace=yes.
8018 (x86_64-*-linux*): Add linux-btrace.o.
8019 Add srv_linux_btrace=yes.
8020 * configure.ac: Define HAVE_LINUX_BTRACE.
8021 * config.in: Regenerated.
8022 * configure: Regenerated.
8023
8024 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8025
8026 * server.c (handle_qxfer): Preserve error message if -3 is
8027 returned.
8028 (qxfer): Document the -3 return value.
8029
8030 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8031
8032 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8033 (linux_btrace_h): New variable.
8034 (linux-btrace.o): New rule.
8035
8036 2013-03-08 Stan Shebs <stan@codesourcery.com>
8037 Hafiz Abid Qadeer <abidh@codesourcery.com>
8038
8039 * tracepoint.c (trace_buffer_size): New global.
8040 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8041 (init_trace_buffer): Change to one-argument function. Allocate
8042 trace buffer memory.
8043 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8044 handle QTBuffer:size packet.
8045 (cmd_bigqtbuffer_size): New function.
8046 (initialize_tracepoint): Call init_trace_buffer with
8047 DEFAULT_TRACE_BUFFER_SIZE.
8048 * server.c (handle_query): Add QTBuffer:size in the
8049 supported packets.
8050
8051 2013-03-07 Yao Qi <yao@codesourcery.com>
8052
8053 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8054 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8055 of -1.
8056 (cmd_qtsp): Adjust condition. Do post increment.
8057 Set cur_action and cur_step_action back to 0.
8058
8059 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8060
8061 PR server/15236
8062 * linux-low.c (linux_write_memory): Return early success if LEN is
8063 zero.
8064
8065 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8066
8067 * configure.srv: Add x86_64-*-cygwin* as target.
8068
8069 2013-02-28 Tom Tromey <tromey@redhat.com>
8070
8071 * configure.ac: Invoke AC_SYS_LARGEFILE.
8072 * configure, config.in: Rebuild.
8073
8074 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8075
8076 * win32-low.c: Throughout, fix format strings and casts of
8077 printf-like functions to avoid type related warnings on all
8078 platforms.
8079 (get_child_debug_event): Print dwDebugEventCode as hex since
8080 that's how it's usually documented.
8081
8082 2013-02-28 Yao Qi <yao@codesourcery.com>
8083
8084 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8085 pulongest.
8086
8087 2013-02-27 Jiong Wang <jiwang@tilera.com>
8088
8089 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8090 (reg-tilegx32.c): New rule.
8091 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8092 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8093 different register info initializer according to elf class.
8094 (init_registers_tilgx32): New function. The tilegx32 register info
8095 initializer.
8096 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8097 (tile_store_gregset): Likewise.
8098
8099 2013-02-27 Yao Qi <yao@codesourcery.com>
8100
8101 * server.c (process_point_options): Print debug message when
8102 debug_threads is true.
8103
8104 2013-02-26 Yao Qi <yao@codesourcery.com>
8105
8106 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8107
8108 2013-02-19 Pedro Alves <palves@redhat.com>
8109 Kai Tietz <ktietz@redhat.com>
8110
8111 PR gdb/15161
8112
8113 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8114 instead of strtoul to extract address from packet.
8115 (process_serial_event) <'z'>: Likewise.
8116
8117 2013-02-18 Yao Qi <yao@codesourcery.com>
8118
8119 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8120
8121 2013-02-14 Pedro Alves <palves@redhat.com>
8122
8123 Plug memory leak.
8124
8125 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8126 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8127
8128 2013-02-14 Pedro Alves <palves@redhat.com>
8129
8130 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8131
8132 2013-02-14 Pedro Alves <palves@redhat.com>
8133
8134 * tracepoint.c (save_string): Delete.
8135 (add_tracepoint_action): Use savestring instead of save_string.
8136
8137 2013-02-12 Pedro Alves <palves@redhat.com>
8138
8139 * linux-xtensa-low.c: Ditto.
8140 * xtensa-xtregs.c: Ditto.
8141
8142 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8143
8144 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8145 thread_db.
8146
8147 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8148
8149 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8150 aarch64_num_wp_regs and aarch64_num_bp_regs to
8151 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8152
8153 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8154
8155 * linux-aarch64-low.c (ps_get_thread_area): Replace
8156 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8157
8158 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8159 Marcus Shawcroft <marcus.shawcroft@arm.com>
8160 Nigel Stephens <nigel.stephens@arm.com>
8161 Yufeng Zhang <yufeng.zhang@arm.com>
8162
8163 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8164 (aarch64.c, aarch64-without-fpu.c): New targets.
8165 * configure.srv (aarch64*-*-linux*): New.
8166 * linux-aarch64-low.c: New file.
8167
8168 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8169
8170 * linux-low.c (handle_extended_wait, linux_create_inferior)
8171 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8172 (dequeue_one_deferred_signal, linux_resume_one_thread)
8173 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8174 (linux_tracefork_grandchild, linux_test_for_tracefork)
8175 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8176 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8177 where the argument is 0.
8178
8179 2013-01-25 Yao Qi <yao@codesourcery.com>
8180
8181 * event-loop.c: Include "queue.h".
8182 (gdb_event_p): New typedef.
8183 (struct gdb_event) <next_event>: Remove.
8184 (event_queue): Change to QUEUE(gdb_event_p).
8185 (async_queue_event): Remove.
8186 (gdb_event_xfree): New.
8187 (initialize_event_loop): New.
8188 (process_event): Use API from QUEUE.
8189 (wait_for_event): Likewise.
8190 * server.c (main): Call initialize_event_loop.
8191 * server.h (initialize_event_loop): Declare.
8192
8193 2013-01-18 Yao Qi <yao@codesourcery.com>
8194
8195 * ax.h (struct eval_agent_expr_context): New.
8196 (gdb_eval_agent_expr): Update declaration.
8197 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8198 TFRAME. Add new argument CTX.
8199 * server.h (struct eval_agent_expr_context): Declare.
8200 (agent_mem_read, agent_tsv_read): Update declaration.
8201 (agent_mem_read_string): Likewise.
8202 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8203 (add_traceframe_block): Add new argument TPOINT.
8204 Increase TPOINT->traceframe_usage.
8205 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8206 eval_tracepoint_agent_expr.
8207 (condition_true_at_tracepoint): Likewise.
8208 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8209 (agent_mem_read_string, agent_tsv_read): Likewise.
8210
8211 2013-01-16 Yao Qi <yao@codesourcery.com>
8212
8213 * linux-low.c (linux_resume_one_lwp): Don't check
8214 'lwp->bp_reinsert != 0'.
8215
8216 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8217 Pedro Alves <palves@redhat.com>
8218
8219 * lynx-low.c (ptrace_request_to_str): Define a temporary
8220 macro and use it to simplify this function's implementation.
8221
8222 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8223
8224 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8225 sets errno.
8226
8227 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8228
8229 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8230
8231 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8232
8233 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8234
8235 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8236
8237 * lynx-low.c (lynx_resume): Use the resume_info parameter
8238 to determine the ptid for the lynx_ptrace call, unless
8239 it is equal to minus_one_ptid, in which case we use the
8240 ptid of the current_inferior.
8241 (lynx_wait_1): After having received a thread create/exit
8242 event, resume the inferior's execution using the signaling
8243 thread's ptid, rather than the old ptid.
8244
8245 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8246
8247 * lynx-low.c (lynx_resume): Delete variable ret.
8248
8249 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8250
8251 * gdbreplay.c (gdbreplay_version): Update copyright year.
8252 * server.c (gdbserver_version): Likewise.
8253
8254 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8255
8256 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8257 new thread.
8258
8259 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8260
8261 * lynx-low.c (ptrace_request_to_str): Add handling for
8262 PTRACE_GETTRACESIG.
8263
8264 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8265
8266 * lynx-low.c (lynx_attach): Delete variable new_process.
8267
8268 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8269
8270 * lynx-low.c (lynx_create_inferior): Delete variable
8271 new_process.
8272
8273 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8274
8275 * lynx-low.c (ptrace_request_to_str): Do not handle
8276 PTRACE_GETTHREADLIST if this macro does not exist.
8277
8278 2012-12-15 Yao Qi <yao@codesourcery.com>
8279
8280 * Makefile.in (OBS): Add notif.o.
8281 * notif.c, notif.h: New.
8282 * server.c: Include "notif.h".
8283 (struct vstop_notif) <next>: Remove.
8284 <base>: New field.
8285 (queue_stop_reply): Update.
8286 (push_event, send_next_stop_reply): Remove.
8287 (discard_queued_stop_replies): Update.
8288 (notif_stop): New variable.
8289 (handle_v_stopped): Remove.
8290 (handle_v_requests): Don't call handle_v_stopped. Call
8291 handle_ack_notif instead.
8292 (queue_stop_reply_callback): Call notif_event_enque instead
8293 of queue_stop_reply.
8294 (handle_status): Don't call send_next_stop_reply, call
8295 notif_write_event instead.
8296 (kill_inferior_callback): Likewise.
8297 (detach_or_kill_inferior_callback): Likewise.
8298 (main): Call initialize_notif.
8299 (process_serial_event): Call QUEUE_is_empty.
8300 (handle_target_event): Call notif_push instead of push event.
8301 * server.h (push_event): Remove declaration.
8302
8303 2012-12-10 Tom Tromey <tromey@redhat.com>
8304
8305 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8306 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8307 macros.
8308 (.c.o): Rewrite.
8309 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8310 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8311 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8312 (amd64-linux-ipa.o, ax.o): Rewrite.
8313 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8314 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8315 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8316 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8317 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8318 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8319 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8320 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8321 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8322 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8323 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8324 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8325 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8326 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8327 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8328 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8329 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8330 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8331 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8332 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8333 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8334 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8335 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8336 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8337 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8338 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8339 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8340 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8341 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8342 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8343 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8344 (reg-tilegx.o): Remove.
8345 (all_object_files): New macro.
8346 Include .deps files.
8347 * aclocal.m4, configure: Rebuild.
8348 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8349 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8350 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8351
8352 2012-12-05 Tom Tromey <tromey@redhat.com>
8353
8354 PR gdb/14917:
8355 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8356
8357 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8358
8359 * configure.ac: Check for linux/perf_event.h.
8360 * config.in: Regenerated.
8361 * configure: Regenerated.
8362
8363 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8364
8365 * hostio.c (handle_readlink): Decrease buffer size
8366 parameter passed to readlink by one byte.
8367
8368 2012-11-26 Yao Qi <yao@codesourcery.com>
8369
8370 * configure.ac (build_warnings): Append '-Wempty-body'.
8371 * configure: Regenerated.
8372 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8373 body.
8374
8375 2012-11-15 Pierre Muller <muller@sourceware.org>
8376
8377 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8378 * config.in: Regenerate.
8379 * configure: Regenerate.
8380 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8381 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8382 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8383 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8384 header.
8385 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8386 instead of <sys/wait.h> header.
8387 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8388
8389 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8390
8391 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8392 (various make rules): Remove -DGDBSERVER
8393
8394 2012-11-09 Yao Qi <yao@codesourcery.com>
8395
8396 * spu-low.c (current_ptid): Move it to ..
8397 * gdbthread.h: ... here. New.
8398 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8399 * server.c (myresume, process_serial_event): Likewise.
8400 * thread-db.c (thread_db_find_new_threads): Likewise.
8401 * tracepoint.c (run_inferior_command): Likewise.
8402
8403 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8404
8405 * server.c (handle_search_memory_1): Include access length in
8406 warning message.
8407
8408 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8409
8410 * linux-crisv32-low.c: Fix compile errors.
8411
8412 2012-09-04 Yao Qi <yao@codesourcery.com>
8413
8414 * tracepoint.c (cmd_qtsv): Adjust debug message.
8415 Don't check CUR_TPOINT.
8416
8417 2012-08-28 Yao Qi <yao@codesourcery.com>
8418
8419 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8420 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8421 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8422 Remove declarations of xmalloc, xreallloc, xstrdup and
8423 freeargv.
8424 * Makefile.in (libiberty_h): New.
8425 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8426 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8427
8428 2012-08-23 Yao Qi <yao@codesourcery.com>
8429
8430 * server.h: Remove declaration of 'xsnprintf'.
8431
8432 2012-08-22 Keith Seitz <keiths@redhat.com>
8433
8434 * server.h: Include build-gnulib-gbserver/config.h.
8435 * gdbreplay.c: Likewise.
8436
8437 2012-08-08 Doug Evans <dje@google.com>
8438
8439 * Makefile.in (SFILES): Add gdb_vecs.c.
8440 (OBS): Add gdb_vecs.o.
8441 (gdb_vecs_h, host_defs_h): New variables.
8442 (thread-db.o): Add $(gdb_vecs_h) dependency.
8443 (gdb_vecs.o): New rule.
8444 * thread-db.c: #include "gdb_vecs.h".
8445 (thread_db_load_search): Use a vector to iterate over path elements.
8446 Handle text appearing after "$pdir".
8447
8448 * configure.ac: Add check for strstr.
8449 * config.in: Regenerate.
8450 * configure: Regenerate.
8451
8452 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8453
8454 * hostio.c (handle_pread): If pread fails, fall back to attempting
8455 lseek/read.
8456 (handle_pwrite): Likewise for pwrite.
8457
8458 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8459
8460 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8461 between unsupported TYPE and unimplementable ADDR/LEN combination.
8462 (arm_insert_point): Act on new return value.
8463
8464 2012-07-31 Pedro Alves <palves@redhat.com>
8465
8466 * server.c (process_point_options): Only skip tokens if we find
8467 one that is unrecognized. Don't treat 'X' specially while
8468 skipping unrecognized tokens.
8469
8470 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8471
8472 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8473 to 4-byte-align HW breakpoint addresses for Thumb.
8474
8475 2012-07-27 Yao Qi <yao@codesourcery.com>
8476
8477 PR remote/14161.
8478
8479 * server.h: Declare gdb_agent_about_to_close.
8480 * target.c (kill_inferior): Include "agent.h".
8481 New. Send command 'kill'.
8482 * target.h (kill_inferior): Removed macro.
8483 * tracepoint.c (gdb_agent_about_to_close): New.
8484 (gdb_agent_helper_thread): Handle command 'close'.
8485 Wait endlessly until the inferior stops.
8486 Install gdb_agent_remove_socket to atexit hook.
8487 (agent_socket_name): New static variable.
8488 (gdb_agent_socket_init): Replace local variable 'name' with
8489 'agent_socket_name'.
8490 (gdb_agent_remove_socket): New.
8491
8492 2012-07-27 Yao Qi <yao@codesourcery.com>
8493
8494 * server.c (process_point_options): Stop at 'X' when parsing.
8495
8496 2012-07-19 Michael Eager <eager@eagercon.com>
8497
8498 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8499 to hw_execute.
8500 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8501 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8502 hardware breakpoint.
8503
8504 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8505
8506 * gdbserver/linux-low.c (initialize_low): Call
8507 linux_ptrace_init_warnings.
8508
8509 2012-07-02 Doug Evans <dje@google.com>
8510
8511 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8512 pointer to int.
8513
8514 2012-07-02 Stan Shebs <stan@codesourcery.com>
8515
8516 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8517 (ax.o): Add it to build rule.
8518 (ax-ipa.o): Ditto.
8519 (OBS): Add format.o.
8520 (IPA_OBS): Add format.o.
8521 * server.c (handle_query): Claim support for breakpoint commands.
8522 (process_point_options): Add command case.
8523 (process_serial_event): Leave running if there are printfs in
8524 effect.
8525 * mem-break.h (any_persistent_commands): Declare.
8526 (add_breakpoint_commands): Declare.
8527 (gdb_no_commands_at_breakpoint): Declare.
8528 (run_breakpoint_commands): Declare.
8529 * mem-break.c (struct point_command_list): New struct.
8530 (struct breakpoint): New field command_list.
8531 (any_persistent_commands): New function.
8532 (add_commands_to_breakpoint): New function.
8533 (add_breakpoint_commands): New function.
8534 (gdb_no_commands_at_breakpoint): New function.
8535 (run_breakpoint_commands): New function.
8536 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8537 locally.
8538 * ax.c: Include format.h.
8539 (ax_printf): New function.
8540 (gdb_eval_agent_expr): Add printf opcode.
8541
8542 2012-06-13 Yao Qi <yao@codesourcery.com>
8543
8544 * server.c (start_inferior): Remove duplicated writes to fields
8545 'last_resume_kind' and 'last_status' of 'current_inferior'.
8546
8547 2012-06-12 Yao Qi <yao@codesourcery.com>
8548 Pedro Alves <palves@redhat.com>
8549
8550 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8551 comment.
8552 * server.c (handle_v_cont): Extend comment.
8553
8554 2012-06-11 Yao Qi <yao@codesourcery.com>
8555
8556 * linux-low.c (linux_attach): Add 'static'.
8557
8558 2012-06-06 Yao Qi <yao@codesourcery.com>
8559
8560 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8561
8562 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8563
8564 Fix gcc -flto compilation warning.
8565 * server.c (main): Make variable multi_mode and attach volatile.
8566
8567 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8568
8569 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8570 if the platform doesn't know about it.
8571
8572 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8573
8574 * Makefile.in (SFILES): Add linux-tile-low.c.
8575 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8576 * configure.srv: Handle tilegx-*-linux*.
8577 * linux-tile-low.c: New file.
8578
8579 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8580
8581 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8582
8583 2012-05-24 Pedro Alves <palves@redhat.com>
8584
8585 PR gdb/7205
8586
8587 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8588
8589 2012-05-24 Pedro Alves <palves@redhat.com>
8590
8591 PR gdb/7205
8592
8593 Replace target_signal with gdb_signal throughout.
8594
8595 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8596
8597 * linux-low.c (linux_store_registers): Avoid the copying sequence
8598 when no data has been retrieved by ptrace.
8599
8600 2012-05-22 Will Deacon <will.deacon@arm.com>
8601
8602 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8603 Include asm/ptrace.h.
8604 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8605 already defined.
8606
8607 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8608
8609 * linux-low.c (linux_store_registers): Don't re-retrieve data
8610 with ptrace that has already been obtained from /proc. Always
8611 copy any data retrieved with ptrace to the buffer supplied.
8612
8613 2012-05-11 Yao Qi <yao@codesourcery.com>
8614 Pedro Alves <palves@redhat.com>
8615
8616 * linux-low.c (enum stopping_threads_kind): New.
8617 (stopping_threads): Change type to `enum stopping_threads_kind'.
8618 (handle_extended_wait): If stopping and suspending threads, leave
8619 the new_lwp suspended too.
8620 (linux_wait_for_event): Adjust.
8621 (stop_all_lwps): Set `stopping_threads' to
8622 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8623 whether we're suspending threads or just stopping them. Assert no
8624 recursion happens.
8625
8626 2012-04-29 Yao Qi <yao@codesourcery.com>
8627
8628 * server.h: Move some code to ...
8629 * gdbthread.h: ... here. New.
8630 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8631 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8632 (nto-low.o, win32-low.o): Likewise.
8633 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8634 * regcache.c, remote-utils.c, server.c: Likewise.
8635 * target.c, tracepoint.c, win32-low.c: Likewise.
8636
8637 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8638
8639 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8640 (PTRACE_ARG4_TYPE): Likewise.
8641 (PTRACE_XFER_TYPE): Likewise.
8642 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8643 ptrace to PTRACE_ARG3_TYPE.
8644 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8645 (PTRACE_ARG4_TYPE): Likewise.
8646 (PTRACE_XFER_TYPE): Likewise.
8647 (linux_detach_one_lwp): Cast fourth argument of
8648 ptrace to long then PTRACE_ARG4_TYPE.
8649 (regsets_fetch_inferior_registers): Cast third argument of
8650 ptrace to long then PTRACE_ARG3_TYPE.
8651 (regsets_store_inferior_registers): Likewise.
8652
8653 2012-04-20 Pedro Alves <palves@redhat.com>
8654
8655 * configure: Regenerate.
8656
8657 2012-04-19 Pedro Alves <palves@redhat.com>
8658
8659 * Makefile.in (GNULIB_BUILDDIR): New.
8660 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8661 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8662 (all, install-only, uninstall, clean-info, all-lib, clean): No
8663 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8664 (maintainer-clean realclean distclean): Use subdir_do.
8665 (subdir_do): New.
8666 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8667 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8668 * acinclude.m4: Include acx_configure_dir.m4.
8669 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8670 calls. Call AC_PROG_RANLIB. Configure gnulib using
8671 ACX_CONFIGURE_DIR.
8672 (GNULIB): New.
8673 (GNULIB_STDINT_H): Adjust.
8674 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8675 * gdbreplay.c: Include build-gnulib/config.h.
8676 * server.h: Likewise.
8677 * aclocal.m4: Regenerate.
8678 * config.in: Regenerate.
8679 * configure: Regenerate.
8680
8681 2012-04-19 Pedro Alves <palves@redhat.com>
8682
8683 * Makefile.in (LIBGNU, INCGNU): Adjust.
8684 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8685 (all, install-only, uninstall, clean-info, all-lib, clean)
8686 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8687 * configure.ac: Adjust AC_OUTPUT output.
8688 * aclocal.m4: Regenerate.
8689 * configure: Regenerate.
8690
8691 2012-04-19 Pedro Alves <palves@redhat.com>
8692
8693 * Makefile.in (generated_files): New.
8694 (server_h): Remove the explicit dependency on config.h, and depend
8695 on $generated_files.
8696
8697 2012-04-19 Pedro Alves <palves@redhat.com>
8698
8699 * Makefile.in (INCGNU): Add -Ignulib.
8700
8701 2012-04-19 Pedro Alves <palves@redhat.com>
8702
8703 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8704 (INCGNU): ... this, and spell out -I here.
8705 (GNULIB_LIB): Rename to ...
8706 (LIBGNU): ... this.
8707 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8708
8709 2012-04-19 Pedro Alves <palves@redhat.com>
8710
8711 * config.in: Regenerate.
8712
8713 2012-04-19 Pedro Alves <palves@redhat.com>
8714
8715 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8716 * server.h (memmem): Remove declaration.
8717 * config.in: Regenerate.
8718 * configure: Regenerate.
8719
8720 2012-04-19 Yao Qi <yao@codesourcery.com>
8721
8722 * Makefile.in (SFILES): Add common/vec.c.
8723 (OBS): Add vec.o.
8724 (vec.o): New rule.
8725
8726 2012-04-19 Yao Qi <yao@codesourcery.com>
8727
8728 * remote-utils.c (prepare_resume_reply): Replace with macro
8729 target_core_of_thread.
8730 * server.c (handle_qxfer_threads_proper): Likewise.
8731 * target.h (traget_core_of_thread): New macro.
8732
8733 2012-04-18 Pedro Alves <palves@redhat.com>
8734
8735 * aclocal.m4: Regenerate.
8736 * configure: Regenerate.
8737
8738 2012-04-16 Yao Qi <yao@codesourcery.com>
8739
8740 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8741 duplicated on address.
8742
8743 2012-04-16 Yao Qi <yao@codesourcery.com>
8744
8745 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8746 (struct tracepoint_action_ops) <send>: New field.
8747 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8748 (agent_expr_send, x_tracepoint_action_send): New.
8749 (l_tracepoint_action_send): New.
8750 (cmd_qtdp): Download and install tracepoint
8751 according to `use_agent'.
8752 (run_inferior_command): Add one more parameter `len'.
8753 Update callers.
8754 (tracepoint_send_agent): New.
8755 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8756
8757 2012-04-16 Yao Qi <yao@codesourcery.com>
8758
8759 * tracepoint.c (download_tracepoints): Moved to ...
8760 (cmd_qtstart): ... here.
8761
8762 2012-04-14 Yao Qi <yao@codesourcery.com>
8763
8764 * tracepoint.c: Include inttypes.h.
8765 (struct collect_memory_action): Use sized types.
8766 (struct tracepoint): Likewise.
8767 (cmd_qtdp, stop_tracing): Update print specifiers.
8768 (cmd_qtp, response_tracepoint): Likewise.
8769 (collect_data_at_tracepoint): Likewise.
8770 (collect_data_at_step): Likewise.
8771
8772 2012-04-14 Yao Qi <yao@codesourcery.com>
8773
8774 Import gnulib module inttypes.
8775 * aclocal.m4, config.in, configure: Regenerated.
8776
8777 2012-04-14 Yao Qi <yao@codesourcery.com>
8778
8779 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8780 Makefile and config.status at last.
8781
8782 2012-04-13 Yao Qi <yao@codesourcery.com>
8783
8784 * tracepoint.c: Include stdint.h unconditionally.
8785
8786 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8787
8788 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8789 on BFD_HAVE_SYS_PROCFS_TYPE.
8790 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8791 * configure: Regenerate.
8792 * config.in: Likewise.
8793
8794 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8795
8796 * Makefile.in (clean): Also remove x32.c x32-linux.c
8797 x32-avx.c x32-avx-linux.c.
8798 (x32.o): New target.
8799 (x32.c): Likewise.
8800 (x32-linux.o): Likewise.
8801 (x32-linux.c): Likewise.
8802 (x32-avx.o): Likewise.
8803 (x32-avx.c): Likewise.
8804 (x32-avx-linux.o): Likewise.
8805 (x32-avx-linux.c): Likewise.
8806
8807 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8808 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8809 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8810 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8811 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8812 i386/x32-avx-linux.xml.
8813
8814 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8815 (init_registers_x32_avx_linux): Likwise.
8816 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8817 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8818
8819 2012-04-13 Pedro Alves <palves@redhat.com>
8820
8821 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8822 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8823 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8824 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8825 the sub-make.
8826
8827 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8828
8829 * linux-x86-low.c (compat_x32_clock_t): New.
8830 (compat_x32_siginfo_t): Likewise.
8831 (compat_x32_siginfo_from_siginfo): Likewise.
8832 (siginfo_from_compat_x32_siginfo): Likewise.
8833 (linux_is_elf64): Likewise.
8834 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8835 and siginfo_from_compat_x32_siginfo for x32.
8836 (x86_arch_setup): Set linux_is_elf64.
8837
8838 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8839
8840 PR gdb/13969
8841 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8842 e_machine field.
8843 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8844 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8845 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8846 compatible with process.
8847
8848 2012-04-12 Yao Qi <yao@codesourcery.com>
8849
8850 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8851 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8852 (install-only, install-info, clean): Handle sub dir gnulib.
8853 (all-lib, am--refresh): New targets.
8854 (memmem.o): Remove target.
8855 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8856 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8857 (AC_REPLACE_FUNCS): Remove memmem.
8858 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8859 (AC_OUTPUT): Generate Makefile in gnulib/.
8860 * aclocal.m4, config.in, configure: Regenerated.
8861
8862 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8863
8864 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8865
8866 2012-04-05 Pedro Alves <palves@redhat.com>
8867
8868 -Werror=strict-aliasing
8869
8870 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8871 pointer.
8872
8873 2012-04-04 Pedro Alves <palves@redhat.com>
8874
8875 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8876 (sparc_store_gregset_from_stack, sparc_store_gregset)
8877 (sparc_breakpoint_at): Fix formatting.
8878
8879 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8880
8881 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8882 are available.
8883 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8884 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8885 * config.in: Regenerate.
8886 * configure: Likewise.
8887
8888 2012-03-29 Pedro Alves <palves@redhat.com>
8889
8890 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8891 Correct ptrace arguments.
8892
8893 2012-03-28 Pedro Alves <palves@redhat.com>
8894
8895 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8896 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8897 (IA64_FR1_REGNUM): New defines.
8898 (ia64_fetch_register): New.
8899 (the_low_target): Install it.
8900 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8901 field.
8902 * linux-low.c (linux_fetch_registers): Try the
8903 the_low_target.fetch_register hook first.
8904
8905 * linux-arm-low.c (the_low_target): Adjust.
8906 * linux-bfin-low.c (the_low_target): Adjust.
8907 * linux-cris-low.c (the_low_target): Adjust.
8908 * linux-crisv32-low.c (the_low_target): Adjust.
8909 * linux-m32r-low.c (the_low_target): Adjust.
8910 * linux-m68k-low.c (the_low_target): Adjust.
8911 * linux-mips-low.c (the_low_target): Adjust.
8912 * linux-ppc-low.c (the_low_target): Adjust.
8913 * linux-s390-low.c (the_low_target): Adjust.
8914 * linux-sh-low.c (the_low_target): Adjust.
8915 * linux-sparc-low.c (the_low_target): Adjust.
8916 * linux-tic6x-low.c (the_low_target): Adjust.
8917 * linux-x86-low.c (the_low_target): Adjust.
8918 * linux-xtensa-low.c (the_low_target): Adjust.
8919
8920 2012-03-26 Pedro Alves <palves@redhat.com>
8921
8922 * server.c (handle_qxfer_libraries): Don't bail early if
8923 the_target->qxfer_libraries_svr4 is not NULL.
8924
8925 2012-03-26 Pedro Alves <palves@redhat.com>
8926
8927 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8928
8929 2012-03-23 Pedro Alves <palves@redhat.com>
8930
8931 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8932 "library-list-svr4" element's start tag when the the DSO list is
8933 empty.
8934
8935 2012-03-23 Pedro Alves <palves@redhat.com>
8936
8937 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8938 a variable whose type size is the same as the inferior's pointer
8939 size.
8940
8941 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8942
8943 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8944 struct siginfo.
8945 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8946 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8947 * linux-low.h: Include <signal.h>.
8948 (struct siginfo): Remove forward declaration.
8949 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8950 struct siginfo.
8951
8952 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8953
8954 * .gitignore: Ignore more files.
8955
8956 2012-03-19 Pedro Alves <palves@redhat.com>
8957 Jan Kratochvil <jan.kratochvil@redhat.com>
8958
8959 * server.c (cont_thread, general_thread): Add describing comments.
8960 (start_inferior): Clear `cont_thread'.
8961 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8962 of a process.
8963
8964 2012-03-15 Yao Qi <yao@codesourcery.com>
8965
8966 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8967 handling to ...
8968 (cmd_qtdp): ... here.
8969
8970 2012-03-15 Yao Qi <yao@codesourcery.com>
8971
8972 * tracepoint.c (struct tracepoint_action_ops): New.
8973 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8974 (m_tracepoint_action_download): New.
8975 (r_tracepoint_action_download): New.
8976 (x_tracepoint_action_download): New.
8977 (l_tracepoint_action_download): New.
8978 (add_tracepoint_action): Install `action->ops' according type.
8979 (download_tracepoint_1): Move code `download' function pointer
8980 of various tracepoint_action_ops.
8981
8982 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8983
8984 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8985 linux_ptrace_attach_warnings.
8986
8987 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8988
8989 * Makefile.in (linux-ptrace.o): New.
8990 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8991 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8992 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8993 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8994 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8995 of these targets.
8996 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8997
8998 2012-03-08 Yao Qi <yao@codesourcery.com>
8999 Pedro Alves <palves@redhat.com>
9000
9001 Fix PR server/13392.
9002 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9003 offset of JMP insn.
9004 * tracepoint.c (remove_tracepoint): New.
9005 (cmd_qtdp): Call remove_tracepoint when failed to install.
9006
9007 2012-03-07 Pedro Alves <palves@redhat.com>
9008
9009 * linux-low.c (get_detach_signal): New.
9010 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9011 Pass on pending signals to PTRACE_DETACH. Check the result of the
9012 ptrace call.
9013 * server.c (program_signals, program_signals_p): New.
9014 (handle_general_set): Handle QProgramSignals.
9015 * server.h (program_signals, program_signals_p): Declare.
9016
9017 2012-03-05 Pedro Alves <palves@redhat.com>
9018 Jan Kratochvil <jan.kratochvil@redhat.com>
9019
9020 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9021 New comment why.
9022
9023 2012-03-03 Yao Qi <yao@codesourcery.com>
9024
9025 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9026 agent_look_up_symbols.
9027
9028 2012-03-03 Yao Qi <yao@codesourcery.com>
9029
9030 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9031 (linux-x86-low.o): Likewise.
9032 * server.h: Remove in_process_agent_loaded.
9033 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9034 common/agent.c.
9035 Update callers.
9036
9037 2012-03-03 Yao Qi <yao@codesourcery.com>
9038
9039 * tracepoint.c (gdb_agent_capability): New global.
9040 (in_process_agent_loaded_ust): Renamed to
9041 `in_process_agent_supports_ust'.
9042 Update callers.
9043 (in_process_agent_supports_ust): Call agent_capability_check.
9044 (clear_installed_tracepoints): Assert that agent supports
9045 agent.
9046
9047 2012-03-03 Yao Qi <yao@codesourcery.com>
9048
9049 * linux-low.c (linux_supports_agent): New.
9050 (linux_target_ops): Initialize field `supports_agent' with
9051 linux_supports_agent.
9052 * target.h (struct target_ops) <supports_agent>: New.
9053 (target_supports_agent): New macro.
9054 * server.c (handle_general_set): Handle packet 'QAgent'.
9055 (handle_query): Send `QAgent+'.
9056 * Makefile.in (server.o): Depends on agent.h.
9057
9058 2012-03-03 Yao Qi <yao@codesourcery.com>
9059
9060 * Makefile.in (OBS): Add agent.o.
9061 Add new rule for agent.o.
9062 Track dependence of tracepoint.c on agent.h.
9063 * tracepoint.c (run_inferior_command_1):
9064 (run_inferior_command): Call agent_run_command.
9065 (gdb_ust_connect_sync_socket): Deleted. Move it to
9066 common/agent.c.
9067 (resume_thread, stop_thread): Likewise.
9068 (gdb_ust_socket_init): Renamed to ...
9069 (gdb_agent_socket_init): ... New.
9070 (gdb_ust_thread): Renamed to ...
9071 (gdb_agent_helper_thread): ... New.
9072 (gdb_ust_init): Move some code to ...
9073 (gdb_agent_init): ... here. New.
9074 [HAVE_UST]: Call gdb_ust_init.
9075 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9076 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9077 * config.in, configure: Regenerated.
9078
9079 2012-03-02 Pedro Alves <palves@redhat.com>
9080
9081 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9082 * linux-low.c (struct simple_pid_list): New.
9083 (stopped_pids): New a struct simple_pid_list pointer.
9084 (add_to_pid_list, pull_pid_from_list): New.
9085 (handle_extended_wait): Don't assume the first signal new children
9086 report is SIGSTOP. Adjust call to pull_pid_from_list.
9087 (linux_wait_for_lwp): Adjust.
9088
9089 2012-03-02 Yao Qi <yao@codesourcery.com>
9090
9091 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9092 debug log.
9093
9094 2012-03-02 Yao Qi <yao@codesourcery.com>
9095
9096 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9097 `stop_pc' and `tpoint'. Update caller.
9098
9099 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9100
9101 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9102 * linux-low.c (use_linux_regsets): New macro.
9103 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9104 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9105 (linux_register_in_regsets): New function.
9106 (usr_fetch_inferior_registers): Skip registers covered by
9107 regsets.
9108 (usr_store_inferior_registers): Likewise.
9109 (usr_fetch_inferior_registers): New macro.
9110 (usr_store_inferior_registers): Likewise.
9111 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9112 (linux_store_registers): Likewise.
9113 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9114 prototype.
9115 (init_registers_mips64_dsp_linux): Likewise.
9116 (init_registers_mips_linux): New macro.
9117 (init_registers_mips_dsp_linux): Likewise.
9118 (mips_dsp_num_regs): Likewise.
9119 (DSP_BASE, DSP_CONTROL): New fallback macros.
9120 (mips_base_regs): New macro.
9121 (mips_regmap): Use it. Fix the size.
9122 (mips_dsp_regmap): New variable.
9123 (mips_dsp_regset_bitmap): Likewise.
9124 (mips_arch_setup): New function.
9125 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9126 than mips_regmap.
9127 (mips_cannot_store_register): Likewise.
9128 (the_low_target): Update .arch_setup, .num_regs and .regmap
9129 initializers. Add .regset_bitmap initializer.
9130 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9131 initializer.
9132 * linux-bfin-low.c (the_low_target): Likewise.
9133 * linux-cris-low.c (the_low_target): Likewise.
9134 * linux-crisv32-low.c (the_low_target): Likewise.
9135 * linux-ia64-low.c (the_low_target): Likewise.
9136 * linux-m32r-low.c (the_low_target): Likewise.
9137 * linux-m68k-low.c (the_low_target): Likewise.
9138 * linux-ppc-low.c (the_low_target): Likewise.
9139 * linux-s390-low.c (the_low_target): Likewise.
9140 * linux-sh-low.c (the_low_target): Likewise.
9141 * linux-sparc-low.c (the_low_target): Likewise.
9142 * linux-tic6x-low.c (the_low_target): Likewise.
9143 * linux-x86-low.c (the_low_target): Likewise.
9144 * linux-xtensa-low.c (the_low_target): Likewise.
9145 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9146 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9147 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9148 srv_xmlfiles.
9149 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9150 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9151
9152 2012-02-29 Yao Qi <yao@codesourcery.com>
9153 Pedro Alves <palves@redhat.com>
9154
9155 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9156 `step_over_finished' is true.
9157
9158 2012-02-27 Pedro Alves <palves@redhat.com>
9159
9160 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9161 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9162
9163 2012-02-27 Pedro Alves <palves@redhat.com>
9164
9165 PR server/9684
9166 * linux-low.c (pid_is_stopped): New.
9167 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9168
9169 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9170
9171 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9172 of conditions.
9173
9174 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9175
9176 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9177
9178 2012-02-24 Luis Machado <lgustavo@codesourcery>
9179
9180 * server.c (handle_query): Advertise support for target-side
9181 breakpoint condition evaluation.
9182 (process_point_options): New function.
9183 (process_serial_event): When inserting a breakpoint, check for
9184 a target-side condition that should be evaluated.
9185
9186 * mem-break.c: Include regcache.h and ax.h.
9187 (point_cond_list_t): New data structure.
9188 (breakpoint) <cond_list>: New field.
9189 (find_gdb_breakpoint_at): Make non-static.
9190 (delete_gdb_breakpoint_at): Clear any target-side
9191 conditions.
9192 (clear_gdb_breakpoint_conditions): New function.
9193 (add_condition_to_breakpoint): Likewise.
9194 (add_breakpoint_condition): Likewise.
9195 (gdb_condition_true_at_breakpoint): Likewise.
9196 (gdb_breakpoint_here): Return result directly instead
9197 of going through a local variable.
9198
9199 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9200 (clear_gdb_breakpoint_conditions): Likewise.
9201 (add_breakpoint_condition): Likewise.
9202 (gdb_condition_true_at_breakpoint): Likewise.
9203
9204 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9205 (need_step_over_p): Take target-side breakpoint condition into
9206 consideration.
9207
9208 2012-02-24 Luis Machado <lgustavo@codesourcery>
9209
9210 * server.h: Include tracepoint.h.
9211 (agent_mem_read, agent_get_trace_state_variable_value,
9212 agent_set_trace_state_variable_value,
9213 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9214 get_set_tsv_func_addr): New prototypes.
9215
9216 * ax.h: New include file.
9217 * ax.c: New source file.
9218
9219 * tracepoint.c: Include ax.h.
9220 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9221 agent_expr, eval_result_type): Move to ax.h.
9222 (parse_agent_expr): Rename to ...
9223 (gdb_parse_agent_expr): ... this, make it non-static and move
9224 to ax.h.
9225 (unparse_agent_expr) Rename to ...
9226 (gdb_unparse_agent_expr): ... this, make it non-static and move
9227 to ax.h.
9228 (eval_agent_expr): Rename to ...
9229 (eval_tracepoint_agent_expr): ... this.
9230 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9231 forward declarations.
9232 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9233 (agent_get_trace_state_variable_value): New function.
9234 (agent_set_trace_state_variable_value): New function.
9235 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9236 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9237 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9238 (condition_true_at_tracepoint): Likewise.
9239 (parse_agent_expr): Rename to ...
9240 (gdb_parse_agent_expr): ... this and move to ax.c.
9241 (unparse_agent_expr): Rename to ...
9242 (gdb_unparse_agent_expr): ... this and move to ax.c.
9243 (gdb_agent_op_name): Move to ax.c.
9244 (eval_agent_expr): Rename to ...
9245 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9246 and move to ax.c.
9247 (eval_tracepoint_agent_expr): New function.
9248 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9249 non-static.
9250 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9251 ax.c.
9252 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9253 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9254 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9255 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9256 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9257 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9258 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9259 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9260 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9261 (compile_bytecodes): Remove forward declaration.
9262 (is_goto_target): Move to ax.c.
9263 (compile_bytecodes): Move to ax.c and call
9264 agent_get_trace_state_variable_value (...) and
9265 agent_set_trace_state_variable_value (...).
9266
9267 * Makefile.in: Update ax.c and IPA dependencies.
9268
9269 2012-02-24 Pedro Alves <palves@redhat.com>
9270
9271 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9272 (cmd_bigqtbuffer_circular): ... this. Only handle
9273 'QTBuffer:circular:'.
9274 (handle_tracepoint_general_set): Adjust.
9275
9276 2012-02-16 Yao Qi <yao@codesourcery.com>
9277
9278 * inferiors.c: Move code to ...
9279 * dll.c: .... here. New.
9280 * server.h: Declare clear_dlls.
9281 * Makefile.in (SFILES): Add dll.c.
9282 (OBS): Add dll.o
9283 (dll.o): New rule.
9284
9285 2012-02-11 Yao Qi <yao@codesourcery.com>
9286
9287 * server.c: (handle_monitor_command): Add a new parameter
9288 `own_buf'.
9289 (handle_query): Update caller.
9290
9291 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9292
9293 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9294 * configure, config.in: Regenerate.
9295 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9296 is not defined.
9297
9298 2012-02-02 Pedro Alves <palves@redhat.com>
9299
9300 Try SIGKILL first, then PTRACE_KILL.
9301 * linux-low.c (linux_kill_one_lwp): New.
9302 (linux_kill_one_lwp): Rename to ...
9303 (kill_one_lwp_callback): ... this. Use the new
9304 linux_kill_one_lwp.
9305
9306 2012-02-02 Pedro Alves <palves@redhat.com>
9307
9308 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9309 inferior.
9310
9311 2012-01-27 Pedro Alves <palves@redhat.com>
9312
9313 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9314 (elf_64_file_p): Make static.
9315 (linux_pid_exe_is_elf_64_file): New.
9316 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9317 Delete declarations.
9318 (linux_pid_exe_is_elf_64_file): Declare.
9319 * linux-x86-low.c (x86_arch_setup): Use
9320 linux_pid_exe_is_elf_64_file.
9321
9322 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9323
9324 * linux-low.c (linux_wait_for_event_1): Rename to ...
9325 (linux_wait_for_event): ... here and merge it with former
9326 linux_wait_for_event - new variable wait_ptid, use it.
9327 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9328
9329 2012-01-23 Pedro Alves <palves@redhat.com>
9330
9331 * server.c (main): Avoid yet another case of infinite loop while
9332 detaching/killing after a longjmp.
9333
9334 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9335
9336 Code cleanup.
9337 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9338
9339 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9340
9341 * hostio.c (handle_readlink): New function.
9342 (handle_vFile): Call it to handle "vFile:readlink" packets.
9343
9344 2012-01-20 Pedro Alves <palves@redhat.com>
9345 Ulrich Weigand <ulrich.weigand@linaro.org>
9346
9347 * server.c (handle_v_requests): Only support vAttach and vRun to
9348 start multiple processes when in extended protocol mode.
9349
9350 2012-01-17 Pedro Alves <palves@redhat.com>
9351
9352 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9353 memalign plus mprotect to allocate the scratch buffer.
9354
9355 2012-01-13 Pedro Alves <palves@redhat.com>
9356
9357 * server.c (attach_inferior): Clear `cont_thread'.
9358
9359 2012-01-13 Pedro Alves <palves@redhat.com>
9360
9361 * server.c (main): Avoid infinite loop while detaching/killing
9362 after a longjmp.
9363
9364 2012-01-09 Doug Evans <dje@google.com>
9365
9366 * server.c (start_inferior): Set last_ptid in --wrapper case.
9367
9368 2012-01-06 Yao Qi <yao@codesourcery.com>
9369
9370 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9371 defined.
9372 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9373
9374 2012-01-04 Yao Qi <yao@codesourcery.com>
9375
9376 * tracepoint.c (cmd_qtdp): Print debug message
9377 for static tracepoint.
9378
9379 2012-01-04 Yao Qi <yao@codesourcery.com>
9380
9381 * tracepoint.c (trace_vdebug): Differentiate debug message
9382 between gdbserver and IPA.
9383
9384 2012-01-03 Yao Qi <yao@codesourcery.com>
9385
9386 * tracepoint.c (tracepoint_was_hit): Don't collect for
9387 static tracepoint.
9388
9389 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9390
9391 * terminal.h: Reformat copyright header.
9392
9393 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9394
9395 * server.c (gdbserver_version): Update copyright year.
9396 * gdbreplay.c (gdbreplay_version): Likewise.
9397
9398 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9399
9400 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9401
9402 Revert:
9403 2011-12-18 Hui Zhu <teawater@gmail.com>
9404 * linux-low.c (linux_create_inferior): Save return value to ret.
9405
9406 2011-12-18 Hui Zhu <teawater@gmail.com>
9407
9408 * linux-low.c (linux_create_inferior): Save return value to ret.
9409
9410 2011-12-16 Doug Evans <dje@google.com>
9411
9412 * linux-low.c (linux_create_inferior): If stdio connection,
9413 redirect stdin from /dev/null, stdout to stderr.
9414 * remote-utils.c (remote_is_stdio): New static global.
9415 (remote_connection_is_stdio): New function.
9416 (remote_prepare): Handle stdio connection.
9417 (remote_open): Ditto.
9418 (remote_close): Don't close stdin for stdio connections.
9419 (read_prim,write_prim): New functions. Replace all calls to
9420 read/write to these.
9421 * server.c (main): Watch for "-" argument. Move call to
9422 remote_prepare before start_inferior.
9423 * server.h (STDIO_CONNECTION_NAME): New macro.
9424 (remote_connection_is_stdio): Declare.
9425
9426 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9427 in debugging output.
9428
9429 2011-12-15 Yao Qi <yao@codesourcery.com>
9430
9431 * tracepoint.c: Include sys/syscall.h.
9432 (gdb_ust_thread): Remove preprocessor conditional.
9433
9434 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9435
9436 * linux-low.c (linux_detach_one_lwp): Call
9437 the_low_target.prepare_to_resume before detaching.
9438
9439 2011-12-14 Yao Qi <yao@codesourcery.com>
9440
9441 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9442 of write.
9443
9444 2011-12-14 Yao Qi <yao@codesourcery.com>
9445
9446 * i386-low.c (i386_low_stopped_data_address): Initialize local
9447 variable `control'.
9448
9449 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9450
9451 PR remote/13492
9452
9453 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9454 DR_CONTROL unless necessary. Extend comments.
9455 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9456 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9457
9458 2011-12-13 Yao Qi <yao@codesourcery.com>
9459
9460 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9461 macros.
9462 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9463
9464 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9465
9466 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9467 Print new debug message for such case.
9468
9469 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9470
9471 Fix overlapping memcpy.
9472 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9473 the read_inferior_memory transfer.
9474 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9475 write_inferior_memory transfer.
9476 (set_fast_tracepoint_jump): New variable buf. Use it for the
9477 read_inferior_memory and write_inferior_memory transfers.
9478 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9479 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9480 Use it for the write_inferior_memory transfer.
9481 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9482 buffers.
9483
9484 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9485
9486 * linux-low.c (fetch_register, store_register): Make code
9487 consistent, fix formatting.
9488
9489 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9490
9491 * linux-low.c (usr_store_inferior_registers): Factor out code
9492 to handle individual registers into...
9493 (store_register): ... this new function.
9494
9495 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9496
9497 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9498 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9499 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9500 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9501 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9502 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9503 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9504 (srv_xmlfiles): Add new XML files.
9505
9506 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9507 and <sys/uio.h>.
9508 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9509 (init_registers_s390_linux32v1): Add prototype.
9510 (init_registers_s390_linux32v2): Likewise.
9511 (init_registers_s390_linux64v1): Likewise.
9512 (init_registers_s390_linux64v2): Likewise.
9513 (init_registers_s390x_linux64v1): Likewise.
9514 (init_registers_s390x_linux64v2): Likewise.
9515 (s390_num_regs): Increment to 52.
9516 (s390_regmap): Add orig_r2 register.
9517 (s390_num_regs_3264): Increment to 68.
9518 (s390_regmap_3264): Add orig_r2 register.
9519 (s390_collect_ptrace_register): Handle orig_r2 register.
9520 (s390_supply_ptrace_register): Likewise.
9521 (s390_fill_last_break): New function.
9522 (s390_store_last_break): Likewise.
9523 (s390_fill_system_call): New function.
9524 (s390_store_system_call): Likewise.
9525 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9526 register sets.
9527 (s390_check_regset): New function.
9528 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9529 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9530 Update target_regsets for available register sets.
9531
9532 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9533 Jan Kratochvil <jan.kratochvil@redhat.com>
9534
9535 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9536 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9537 New.
9538 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9539 * linux-low.h (struct process_info_private): New member r_debug.
9540 * server.c (handle_qxfer_libraries): Call
9541 the_target->qxfer_libraries_svr4.
9542 (handle_qxfer_libraries_svr4): New function.
9543 (qxfer_packets): New entry "libraries-svr4".
9544 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9545 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9546 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9547 PACKET_qXfer_libraries_svr4.
9548
9549 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9550
9551 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9552 PSW address/mask between 8-byte and 16-byte formats.
9553 (s390_supply_ptrace_register): Likewise.
9554 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9555 basic addressing mode bit.
9556
9557 2011-11-24 Stan Shebs <stan@codesourcery.com>
9558
9559 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9560
9561 2011-11-17 Stan Shebs <stan@codesourcery.com>
9562
9563 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9564 (tracing_start_time): New global.
9565 (tracing_stop_time): New global.
9566 (tracing_user_name): New global.
9567 (tracing_notes): New global.
9568 (tracing_stop_note): New global.
9569 (cmd_qtstart): Set traceframe_usage, start_time.
9570 (stop_tracing): Set stop_time.
9571 (cmd_qtstatus): Report additional status.
9572 (cmd_qtp): New function.
9573 (handle_tracepoint_query): Call it.
9574 (cmd_qtnotes): New function.
9575 (handle_tracepoint_general_set): Call it.
9576 (get_timestamp): Rename from tsv_get_timestamp.
9577
9578 2011-11-14 Stan Shebs <stan@codesourcery.com>
9579 Kwok Cheung Yeung <kcy@codesourcery.com>
9580
9581 * linux-x86-low.c (small_jump_insn): New.
9582 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9583 trampoline and error message, build a trampoline and issue a small
9584 jump instruction to it.
9585 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9586 trampoline and error message.
9587 (x86_get_min_fast_tracepoint_insn_len): New.
9588 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9589 * linux-low.h (struct linux_target_ops): Add arguments to
9590 install_fast_tracepoint_jump_pad operation, add new operation.
9591 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9592 arguments.
9593 (linux_get_min_fast_tracepoint_insn_len): New function.
9594 (linux_target_op): Add new operation.
9595 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9596 (gdb_trampoline_buffer_end): Ditto.
9597 (gdb_trampoline_buffer_error): Ditto.
9598 (struct ipa_sym_addresses): Add fields for new IPA variables.
9599 (symbol_list): Add entries for new IPA variables.
9600 (struct tracepoint): Add fields to hold the address range of the
9601 trampoline used by the tracepoint.
9602 (trampoline_buffer_head): New static variable.
9603 (trampoline_buffer_tail): Ditto.
9604 (claim_trampoline_space): New function.
9605 (have_fast_tracepoint_trampoline_buffer): New function.
9606 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9607 structure.
9608 (install_fast_tracepoint): Ditto, also add error buffer argument.
9609 (cmd_qtminftpilen): New function.
9610 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9611 (fast_tracepoint_from_trampoline_address): New function.
9612 (fast_tracepoint_collecting): Handle trampoline as part of jump
9613 pad space.
9614 (set_trampoline_buffer_space): New function.
9615 (initialize_tracepoint): Initialize new IPA variables.
9616 * target.h (struct target_ops): Add arguments to
9617 install_fast_tracepoint_jump_pad operation, add new
9618 get_min_fast_tracepoint_insn_len operation.
9619 (target_get_min_fast_tracepoint_insn_len): New.
9620 (install_fast_tracepoint_jump_pad): Add arguments.
9621 * server.h (IPA_BUFSIZ): Define.
9622 * linux-i386-ipa.c: Include extra header files.
9623 (initialize_fast_tracepoint_trampoline_buffer): New function.
9624 (initialize_low_tracepoint): Call it.
9625 * server.h (set_trampoline_buffer_space): Declare.
9626 (claim_trampoline_space): Ditto.
9627 (have_fast_tracepoint_trampoline_buffer): Ditto.
9628
9629 2011-11-14 Yao Qi <yao@codesourcery.com>
9630
9631 * server.c (handle_query): Handle InstallInTrace for qSupported.
9632 * tracepoint.c (add_tracepoint): Sort list.
9633 (install_tracepoint, download_tracepoint): New.
9634 (cmd_qtdp): Call them to install and download tracepoints.
9635 (sort_tracepoints): Removed.
9636 (cmd_qtstart): Update.
9637
9638 2011-11-14 Yao Qi <yao@codesourcery.com>
9639
9640 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9641 * mem-break.h: Declare.
9642 * tracepoint.c (cmd_qtstart): Move some code to ...
9643 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9644 New.
9645 (download_tracepoints): Move some code to ...
9646 (download_tracepoint_1): ... here. New.
9647
9648 2011-11-08 Yao Qi <yao@codesourcery.com>
9649
9650 * remote-utils.c (relocate_instruction): A comment fix.
9651
9652 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9653
9654 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9655 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9656 dr_status_mirror and dr_control_mirror from debug_reg_state.
9657 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9658 (i386_initial_stuff): Remove use of deleted globals.
9659 (i386_get_thread_context, i386_set_thread_context,
9660 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9661 from debug_reg_state.
9662
9663 2011-11-05 Yao Qi <yao@codesourcery.com>
9664
9665 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9666 address as TPOINT's.
9667
9668 2011-11-02 Stan Shebs <stan@codesourcery.com>
9669
9670 * tracepoint.c (agent_mem_read_string): New function.
9671 (eval_agent_expr): Call it for tracenz.
9672 * server.c (handle_query): Report support for tracenz.
9673
9674 2011-11-02 Yao Qi <yao@codesourcery.com>
9675
9676 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9677
9678 2011-11-02 Yao Qi <yao@codesourcery.com>
9679
9680 * target.h: Fix a typo in comment.
9681
9682 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9683
9684 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9685 clobber the breakpoints' shadows with fast tracepoint jumps.
9686 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9687 * target.c (write_inferior_memory): Also pass MYADDR down to
9688 check_mem_write.
9689
9690 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9691
9692 * configure.ac: Check support for personality routine.
9693 * configure: Regenerate.
9694 * config.in: Likewise.
9695 * linux-low.c: Include <sys/personality.h>.
9696 Define ADDR_NO_RANDOMIZE if necessary.
9697 (linux_create_inferior): Disable address space randomization when
9698 forking inferior, if requested.
9699 (linux_supports_disable_randomization): New function.
9700 (linux_target_ops): Install it.
9701 * server.h (disable_randomization): Declare.
9702 * server.c (disable_randomization): New global variable.
9703 (handle_general_set): Handle QDisableRandomization.
9704 (handle_query): Likewise for qSupported.
9705 (main): Support --disable-randomization and --no-disable-randomization
9706 command line arguments.
9707 * target.h (struct target_ops): Add supports_disable_randomization.
9708 (target_supports_disable_randomization): New macro.
9709
9710 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9711
9712 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9713 ifdef check.
9714 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9715 [!PT_GETDSBT] (target_loadmap): New definition.
9716 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9717 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9718 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9719 and PT_GETDSBT to LINUX_LOADMAP.
9720 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9721 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9722
9723 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9724
9725 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9726 (arm_linux_hwbp_cap): New static variable.
9727 (arm_linux_get_hwbp_cap): Replace by ...
9728 (arm_linux_init_hwbp_cap): ... this new function.
9729 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9730 (arm_linux_get_hw_watchpoint_count): Likewise.
9731 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9732 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9733 (arm_prepare_to_resume): Use perror_with_name instead of error.
9734
9735 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9736
9737 * linux-arm-low.c: Include <signal.h>.
9738 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9739 (struct arm_linux_hwbp_cap): New data type.
9740 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9741 (struct arm_linux_hw_breakpoint): New data type.
9742 (MAX_BPTS, MAX_WPTS): Define.
9743 (struct arch_process_info, struct arch_lwp_info): New data types.
9744 (arm_linux_get_hwbp_cap): New function.
9745 (arm_linux_get_hw_breakpoint_count): Likewise.
9746 (arm_linux_get_hw_watchpoint_count): Likewise.
9747 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9748 (arm_hwbp_control_initialize): Likewise.
9749 (arm_hwbp_control_is_enabled): Likewise.
9750 (arm_hwbp_control_is_initialized): Likewise.
9751 (arm_hwbp_control_disable): Likewise.
9752 (arm_linux_hw_breakpoint_equal): Likewise.
9753 (arm_linux_hw_point_initialize): Likewise.
9754 (struct update_registers_data): New data structure.
9755 (update_registers_callback: New function.
9756 (arm_insert_point): Likewise.
9757 (arm_remove_point): Likewise.
9758 (arm_stopped_by_watchpoint): Likewise.
9759 (arm_stopped_data_address): Likewise.
9760 (arm_new_process): Likewise.
9761 (arm_new_thread): Likewise.
9762 (arm_prepare_to_resume): Likewise.
9763 (the_low_target): Register arm_insert_point, arm_remove_point,
9764 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9765 arm_new_thread, and arm_prepare_to_resume.
9766
9767 2011-09-15 Stan Shebs <stan@codesourcery.com>
9768
9769 * server.h (struct emit_ops): Add compare-goto fields.
9770 * tracepoint.c (gdb_agent_op_sizes): New table.
9771 (emit_eq_goto): New function.
9772 (emit_ne_goto): New function.
9773 (emit_lt_goto): New function.
9774 (emit_le_goto): New function.
9775 (emit_gt_goto): New function.
9776 (emit_ge_goto): New function.
9777 (is_goto_target): New function.
9778 (compile_bytecodes): Recognize special cases of compare-goto
9779 combinations and call specialized emitters for them.
9780 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9781 (amd64_emit_ne_goto): New function.
9782 (amd64_emit_lt_goto): New function.
9783 (amd64_emit_le_goto): New function.
9784 (amd64_emit_gt_goto): New function.
9785 (amd64_emit_ge_goto): New function.
9786 (amd64_emit_ops): Add the new functions.
9787 (i386_emit_eq_goto): New function.
9788 (i386_emit_ne_goto): New function.
9789 (i386_emit_lt_goto): New function.
9790 (i386_emit_le_goto): New function.
9791 (i386_emit_gt_goto): New function.
9792 (i386_emit_ge_goto): New function.
9793 (i386_emit_ops): Add the new functions.
9794
9795 2011-09-08 Stan Shebs <stan@codesourcery.com>
9796
9797 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9798 (i386_emit_epilogue): Restore %ebx.
9799
9800 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9801
9802 * server.c (step_thread): Remove definition.
9803 (process_serial_event): Don't handle Hs.
9804 * server.h (step_thread): Remove declaration.
9805 * target.c (set_desired_inferior): Remove use of step_thread.
9806
9807 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9808
9809 * linux-low.c: Include linux-procfs.h.
9810 (linux_attach_lwp_1): Update comments.
9811 (linux_attach): Scan for existing threads when attaching to a
9812 process that is the tgid.
9813 * Makefile.in: Update dependencies.
9814
9815 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9816
9817 * configure.srv: Add linux-procfs.o dependencies.
9818
9819 2011-08-14 Yao Qi <yao@codesourcery.com>
9820
9821 * target.h (struct target_ops): Fix indent.
9822 * win32-low.c (win32_target_ops): Fix comment.
9823
9824 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9825 Yao Qi <yao@codesourcery.com>
9826
9827 * Makefile.in (clean): Remove tic6x-*.c files.
9828 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9829 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9830 (tic6x-c64xp-linux.c): Likewise.
9831 * configure.srv: Add support for tic6x-*-uclinux.
9832 * linux-tic6x-low.c: New.
9833 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9834
9835 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9836 Yao Qi <yao@codesourcery.com>
9837
9838 * target.h (struct target_ops): Add read_loadmap.
9839 * linux-low.c (struct target_loadseg): New type.
9840 (struct target_loadmap): New type.
9841 (linux_read_loadmap): New function.
9842 (linux_target_ops): Add linux_read_loadmap.
9843 * server.c (handle_query): Support qXfer:fdpic:read packet.
9844 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9845 to NULL.
9846
9847 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9848
9849 * win32-low.c: Include <stdint.h>.
9850
9851 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9852
9853 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9854 to the inferior here.
9855 (i386_remove_aligned_watchpoint): Ditto.
9856 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9857 fit part of the watchpoint in the debug registers.
9858 (i386_update_inferior_debug_regs): New.
9859 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9860 registers, and only update the inferior on success.
9861 (i386_low_remove_watchpoint): Ditto.
9862
9863 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9864
9865 * linux-low.c (compare_ints, unique, list_threads, show_process,
9866 linux_core_of_thread): Delete.
9867 (linux_target_ops): Change linux_core_of_thread to
9868 linux_common_core_of_thread.
9869 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9870 * utils.c (malloc_failure): Change type of argument.
9871 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9872 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9873 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9874 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9875 (IPA_OBJS): Add common-utils-ipa.o.
9876 (ptid_h, linux_osdata_h): New macros.
9877 (server_h): Add common/common-utils.h, common/xml-utils.h,
9878 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9879 common/ptid.h.
9880 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9881 ptid.o, buffer.o): New rules.
9882 (linux-low.o): Add common/linux-osdata.h as a dependency.
9883 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9884 * configure.ac: Add AC_HEADER_DIRENT check.
9885 * config.in: Regenerate.
9886 * configure: Regenerate.
9887 * remote-utils.c (xml_escape_text): Delete.
9888 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9889 buffer_xml_printf): Move to common/buffer.c.
9890 * server.c (main): Remove call to initialize_inferiors.
9891 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9892 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9893 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9894 internal_error, gdb_assert, gdb_assert_fail): Delete.
9895 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9896 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9897 common/buffer.h.
9898 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9899 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9900 initialize_inferiors): Delete.
9901
9902 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9903
9904 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9905 symbol error.
9906
9907 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9908
9909 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9910 assertion.
9911 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9912
9913 2011-05-26 Yao Qi <yao@codesourcery.com>
9914
9915 * Makefile.in (thread-db.o): Track dependence to
9916 common/gdb_thread_db.h.
9917 * thread-db.c: include gdb_thread_db.h from right place.
9918
9919 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9920
9921 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9922 __FILE__ and __LINE__ to internal_error.
9923
9924 2011-05-13 Doug Evans <dje@google.com>
9925
9926 * thread-db.c (try_thread_db_load_from_sdir): New function.
9927 (try_thread_db_load_from_dir): New function.
9928 (thread_db_load_search): Handle $sdir, ignore $pdir.
9929 Remove trying of system directories if search of
9930 libthread-db-search-path fails, that is now done via $sdir.
9931
9932 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9933
9934 * server.c (handle_query): Add EnableDisableTracepoints to the list
9935 of supported features.
9936 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9937 tracepoints.
9938 (cmd_qtenable_disable): New.
9939 (cmd_qtstart): Install tracepoints even if disabled.
9940 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9941 receiving a QTEnable or QTDisable packet.
9942 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9943 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9944 tracepoints.
9945 (gdb_probe): Skip data collection if static tracepoint is disabled.
9946
9947 2011-05-10 Doug Evans <dje@google.com>
9948
9949 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9950
9951 2011-05-04 Doug Evans <dje@google.com>
9952
9953 * linux-low.c (linux_join): Skip process lookup.
9954 * spu-low.c (spu_join): Ditto.
9955 * server.c (join_inferiors_callback): Delete.
9956 (process_serial_event): For 'D' packet (detach) call join_inferior
9957 directly.
9958
9959 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9960
9961 * README: Don't mention xscale*-*-linux*.
9962 * configure.srv (xscale*-*-linux*): Don't handle target.
9963
9964 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9965
9966 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9967 casting pointers.
9968 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9969 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9970 (i386_emit_void_call_2): Likewise.
9971
9972 2011-04-26 Yao Qi <yao@codesourcery.com>
9973
9974 * linux-low.c: Move common macros to linux-ptrace.h.
9975 Include linux-ptrace.h.
9976 * Makefile.in (linux_ptrace_h): New.
9977 (linux-low.o): Depends on linux-ptrace.h.
9978
9979 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9980
9981 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9982 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9983 (remote_prepare): New function with most of the TCP code from ...
9984 (remote_open): ... here. Detect PORT here unconditionally. Move also
9985 setting transport_is_reliable.
9986 * server.c (run_once): New variable.
9987 (gdbserver_usage): Document it.
9988 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9989 the first run if RUN_ONCE.
9990 * server.h (run_once, remote_prepare): New declarations.
9991
9992 2011-04-19 Tom Tromey <tromey@redhat.com>
9993
9994 * win32-low.c (handle_load_dll): Remove duplicate "the".
9995
9996 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9997
9998 Remove support for old Cygwin 1.5 versions.
9999 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10000 function to avoid warning.
10001 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10002 warning.
10003
10004 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10005
10006 * gdbserver/server.h (Macro _): Define it if not available.
10007
10008 2011-03-14 Michael Snyder <msnyder@vmware.com>
10009
10010 * hostio.c (handle_close): Remove unnecessary null test.
10011
10012 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10013
10014 * Makefile.in (maintainer-clean realclean distclean): Remove
10015 "make ... subdir_do" command.
10016
10017 2011-03-10 Michael Snyder <msnyder@vmware.com>
10018
10019 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10020
10021 * server.c (handle_v_run): Free alloced buffer on early return.
10022
10023 2011-03-09 Yao Qi <yao@codesourcery.com>
10024
10025 Revert:
10026 2011-03-04 Yao Qi <yao@codesourcery.com>
10027
10028 * Makefile.in: Remove GNU make feature --directory.
10029
10030 2011-03-05 Yao Qi <yao@codesourcery.com>
10031
10032 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10033 (subdir_do): New make target. Copied from gdb/Makefile.
10034 (maintainer-clean, realclean, distclean, clean): Call corresponding
10035 make targets in common/Makefile.
10036
10037 2011-02-11 Yao Qi <yao@codesourcery.com>
10038
10039 * configure.ac: Call AC_PROG_RANLIB.
10040 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10041 * configure: Regenerate.
10042
10043 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10044
10045 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10046
10047 2011-03-06 Yao Qi <yao@codesourcery.com>
10048
10049 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10050
10051 2011-03-05 Yao Qi <yao@codesourcery.com>
10052
10053 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10054 (subdir_do): New make target. Copied from gdb/Makefile.
10055 (maintainer-clean, realclean, distclean, clean): Call corresponding
10056 make targets in common/Makefile.
10057
10058 2011-03-04 Yao Qi <yao@codesourcery.com>
10059
10060 * Makefile.in: Remove GNU make feature --directory.
10061
10062 2011-03-04 Michael Snyder <msnyder@vmware.com>
10063
10064 * server.c (queue_stop_reply): Call xmalloc not malloc.
10065
10066 2011-03-02 Michael Snyder <msnyder@vmware.com>
10067
10068 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10069
10070 2011-02-28 Michael Snyder <msnyder@vmware.com>
10071
10072 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10073 (cmd_qtframe): Ditto.
10074 (cmd_qtbuffer): Ditto.
10075 (cmd_bigqtbuffer): Ditto.
10076
10077 * utils.c (decimal2str): Initialize 'width' to nine, then
10078 don't mess with it.
10079
10080 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10081
10082 * hostio.c (require_data): Free *data, not data.
10083
10084 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10085
10086 * hostio.c (require_data): Use free, not xfree.
10087
10088 2011-02-27 Michael Snyder <msnyder@vmware.com>
10089
10090 * server.c (handle_query): Discard unused value.
10091
10092 * hostio.c (require_data): Free malloc memory before returning
10093 error.
10094
10095 2011-02-26 Michael Snyder <msnyder@vmware.com>
10096
10097 * linux-low.c (list_threads): Call closedir for dirent.
10098
10099 2011-02-27 Michael Snyder <msnyder@vmware.com>
10100
10101 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10102 a case statement falls through.
10103
10104 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10105
10106 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10107 in comparison.
10108
10109 2011-02-26 Michael Snyder <msnyder@vmware.com>
10110
10111 * utils.c (decimal2str): Eliminate dead code and dead param.
10112 (pulongest): Drop dead param from call to decimal2str.
10113 (plongest): Ditto.
10114
10115 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10116
10117 Revert the following patch (not approved yet):
10118 2011-02-21 Hui Zhu <teawater@gmail.com>
10119 * tracepoint.c (tp_printf): New function.
10120 (eval_agent_expr): Handle gdb_agent_op_printf.
10121
10122 2011-02-21 Hui Zhu <teawater@gmail.com>
10123
10124 * tracepoint.c (tp_printf): New function.
10125 (eval_agent_expr): Handle gdb_agent_op_printf.
10126
10127 2011-02-18 Tom Tromey <tromey@redhat.com>
10128
10129 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10130 (tracepoint.o): Likewise.
10131 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10132 (gdb_agent_op_names): Likewise.
10133
10134 2011-02-18 Tom Tromey <tromey@redhat.com>
10135
10136 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10137 gdb_agent_op_rot>: New constants.
10138 (gdb_agent_op_names): Add pick and roll.
10139 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10140 cases.
10141
10142 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10143
10144 * aclocal.m4: Regenerated with aclocal-1.11.1.
10145
10146 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10147
10148 * server.c (handle_qxfer_traceframe_info): New.
10149 (qxfer_packets): Register "traceframe-info".
10150 (handle_query): Report support for qXfer:traceframe-info:read+.
10151 * tracepoint.c (match_blocktype): New.
10152 (traceframe_find_block_type): Rename to ...
10153 (traceframe_walk_blocks): ... this. Add callback filter argument,
10154 and use it.
10155 (traceframe_find_block_type): New, reimplemented on top of
10156 traceframe_walk_blocks.
10157 (build_traceframe_info_xml): New.
10158 (traceframe_read_info): New.
10159 * server.h (traceframe_read_info): Declare.
10160
10161 2011-02-11 Yao Qi <yao@codesourcery.com>
10162
10163 * configure.ac: Call AC_PROG_RANLIB.
10164 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10165 * configure: Regenerate.
10166
10167 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10168
10169 * server.c (gdb_read_memory): Change return semantics to allow
10170 partial transfers.
10171 (handle_search_memory_1): Adjust.
10172 (process_serial_event) <'m' packet>: Handle partial transfers.
10173 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10174
10175 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10176
10177 * regcache.c (init_register_cache): Initialize
10178 regcache->register_status.
10179 (free_register_cache): Release regcache->register_status.
10180 (regcache_cpy): Copy register_status.
10181 (registers_to_string): Print 'x's for unavailable registers.
10182 (supply_register): Mark the register's status valid or
10183 unavailable, depending on whether a buffer was passed in or not.
10184 (supply_register_zeroed): New.
10185 (supply_regblock): Mark the registers' status valid or
10186 unavailable, depending on whether a buffer was passed in or not.
10187 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10188 (struct regcache): New `register_status' field.
10189 (supply_register_zeroed): Declare.
10190 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10191 supply_register_zeroed, rather than passing a NULL buffer to
10192 supply_register.
10193 * tracepoint.c (fetch_traceframe_registers): Update comment.
10194
10195 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10196
10197 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10198 buffer explicit.
10199
10200 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10201
10202 * server.h (decode_xfer_write): Change prototype.
10203 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10204 and don't extract the annex here.
10205 * server.c (decode_xfer_read): Remove `annex' parameter,
10206 and don't extract the annex here.
10207 (decode_xfer): New.
10208 (struct qxfer): New.
10209 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10210 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10211 (handle_qxfer_statictrace): New functions, abstracted out from
10212 handle_query, and made to use the struct qxfer interface.
10213 (handle_threads_qxfer_proper): Rename to ...
10214 (handle_qxfer_threads_proper): ... this.
10215 (handle_threads_qxfer): Rename to ...
10216 (handle_qxfer_threads): ... this. Adjust.
10217 (qxfer_packets): New array.
10218 (handle_qxfer): New function.
10219 (handle_query): Use handle_qxfer.
10220
10221 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10222
10223 * gdbreplay.c: Shorten lines of >= 80 columns.
10224 * linux-low.c: Ditto.
10225 * linux-ppc-low.c: Ditto.
10226 * linux-s390-low.c: Ditto.
10227 * linux-sparc-low.c: Ditto.
10228 * linux-x86-low.c: Ditto.
10229 * linux-xtensa-low.c: Ditto.
10230 * mem-break.c: Ditto.
10231 * nto-low.c: Ditto.
10232 * regcache.h: Ditto.
10233 * remote-utils.c: Ditto.
10234 * server.c: Ditto.
10235 * server.h: Ditto.
10236 * thread-db.c: Ditto.
10237 * tracepoint.c: Ditto.
10238 * utils.c: Ditto.
10239 * win32-low.h: Ditto.
10240
10241 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10242
10243 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10244 update.
10245
10246 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10247
10248 * server.c (gdbserver_version): Update copyright year in version
10249 output.
10250 * gdbreplay.c (gdbreplay_version): Ditto.
10251
10252 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10253
10254 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10255 * linux-bfin-low.c: New file.
10256 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10257 PT_DATA_ADDR for BFIN targets.
10258 * Makefile.in (SFILES): Add linux-bfin-low.c.
10259 (clean): Remove reg-bfin.c.
10260 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10261 * README: Mention supported Blackfin targets.
10262
10263 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10264
10265 * .gitignore: New file.
10266
10267 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10268
10269 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10270
10271 2010-10-22 Jie Zhang <jie@codesourcery.com>
10272
10273 * Makefile.in: Add FLAGS_TO_PASS variable.
10274 (install): Remove dependency of install-only and recursively
10275 invoke make for install-only.
10276
10277 2010-10-04 Doug Evans <dje@google.com>
10278
10279 * Makefile.in (uninstall): Use $(DESTDIR).
10280
10281 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10282
10283 PR gdb/11842
10284
10285 * linux-x86-low.c (compat_siginfo_from_siginfo)
10286 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10287 si_code is < 0. Check for si_code == SI_TIMER before checking for
10288 si_code < 0.
10289
10290 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10291
10292 * lynx-i386-low.c: New file.
10293 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10294
10295 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10296
10297 * lynx-low.c (ptrace_request_to_str): Remove handling for
10298 request values that have been removed in LynxOS 5.x.
10299
10300 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10301
10302 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10303 <ptrace.h>
10304
10305 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10306
10307 * configure.ac: Add --enable-inprocess-agent option.
10308 * configure: Rebuilt.
10309
10310 2010-09-06 Yao Qi <yao@codesourcery.com>
10311
10312 * linux-low.c (linux_kill): Remove unused variable.
10313 (linux_stabilize_threads): Likewise.
10314 * server.c (start_inferior): Likewise.
10315 (queue_stop_reply_callback): Likewise.
10316 * tracepoint.c (do_action_at_tracepoint): Likewise.
10317
10318 2010-09-06 Yao Qi <yao@codesourcery.com>
10319
10320 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10321 on return.
10322
10323 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10324
10325 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10326
10327 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10328
10329 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10330 "$(IPA_DEPFILES)".
10331
10332 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10333
10334 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10335 gdbserver/lynx-ppc-low.c: New files.
10336 * Makefile.in (lynx_low_h): New variable.
10337 (lynx-low.o, lynx-ppc-low.o): New rules.
10338 * configure.ac: On LynxOS, link with -lnetinet.
10339 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10340 * configure: regenerate.
10341
10342 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10343
10344 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10345 * configure.ac: Add check for vasprintf and vsnprintf.
10346 * configure, config.in: Regenerate.
10347 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10348
10349 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10350
10351 * gdbreplay.c: Move include of alloca.h up, next to include of
10352 malloc.h.
10353 * server.h: Add include of malloc.h.
10354 * mem-break.c: Remove include of malloc.h.
10355 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10356
10357 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10358
10359 * Makefile.in (memmem.o): Build with -Wno-error.
10360
10361 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10362
10363 * utils.c (xsnprintf): Make non-static.
10364 * server.h: Add xsnprintf declaration.
10365 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10366 replace calls to snprintf by calls to xsnprintf throughout.
10367
10368 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10369
10370 * configure.ac: Add configure check for alloca.
10371 * configure, config.in: Regenerate.
10372 * server.h: Include alloca.h if it exists.
10373 * gdbreplay.c: Include alloca.h if it exists.
10374
10375 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10376
10377 * linux-low.c (__SIGRTMIN): Define if not already defined.
10378 (linux_create_inferior): Check for __ANDROID__ rather than
10379 __SIGRTMIN.
10380 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10381 are already deferred.
10382 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10383 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10384 stopped and already has a pending signal to report.
10385 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10386 a pending signal to report or is moving out of a jump pad.
10387 (linux_init_signals): Check for __ANDROID__ rather than
10388 __SIGRTMIN.
10389
10390 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10391
10392 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10393 debug_threads check. Avoid a linear search when not doing debug
10394 output.
10395
10396 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10397
10398 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10399 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10400 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10401 (process_event): Change local fd's type to gdb_fildes_t.
10402 (create_file_handler): Adjust prototype.
10403 (delete_file_handler): Adjust prototype.
10404 (handle_file_event): Adjust prototype. Use pfildes.
10405 (create_file_event): Adjsut prototype.
10406 * remote-utils.c (remote_desc, listen_desc): Change type to
10407 gdb_fildes_t.
10408 * server.h: New gdb_fildes_t typedef.
10409 [USE_WIN32API]: Include winsock2.h.
10410 (delete_file_handler, add_file_handler): Adjust prototypes.
10411 (pfildes): Declare.
10412 * utils.c (pfildes): New.
10413
10414 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10415
10416 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10417 * configure: Regenerate.
10418
10419 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10420
10421 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10422 (linux_done_accessing_memory): ... this.
10423 (linux_target_ops): Adjust.
10424 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10425 * nto-low.c (nto_target_ops): Adjust comment.
10426 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10427 * spu-low.c (spu_target_ops): Adjust comment.
10428 * target.h (target_ops): Rename unprepare_to_access_memory field
10429 to done_accessing_memory.
10430 (unprepare_to_access_memory): Rename to ...
10431 (done_accessing_memory): ... this.
10432
10433 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10434
10435 * linux-low.c (linux_prepare_to_access_memory): New.
10436 (linux_unprepare_to_access_memory): New.
10437 (linux_target_ops): Install them.
10438 * server.c (read_memory): Rename to ...
10439 (gdb_read_memory): ... this. Use
10440 prepare_to_access_memory/prepare_to_access_memory.
10441 (write_memory): Rename to ...
10442 (gdb_write_memory): ... this. Use
10443 prepare_to_access_memory/prepare_to_access_memory.
10444 (handle_search_memory_1): Adjust.
10445 (process_serial_event): Adjust.
10446 * target.h (struct target_ops): New fields
10447 prepare_to_access_memory and unprepare_to_access_memory.
10448 (prepare_to_access_memory, unprepare_to_access_memory): New.
10449 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10450 prepare_to_access_memory/prepare_to_access_memory.
10451 * nto-low.c (nto_target_ops): Adjust.
10452 * spu-low.c (spu_target_ops): Adjust.
10453 * win32-low.c (win32_target_ops): Adjust.
10454
10455 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10456
10457 * Makefile.in (WARN_CFLAGS): Get it from configure.
10458 (WERROR_CFLAGS): New.
10459 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10460 * configure.ac: Introduce --enable-werror, which adds -Werror to
10461 the compiler command line. Enabled by default. Disable with
10462 --disable-werror. Add -Wdeclaration-after-statement
10463 Wpointer-arith and -Wformat-nonliteral to warning flags.
10464 * configure: Regenerate.
10465
10466 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10467
10468 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10469
10470 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10471
10472 * gdbreplay.c (remote_error): New.
10473 (gdbchar): New.
10474 (expect): Use gdbchar. Check for error reading from GDB.
10475 Clarify sync error output.
10476 (play): Check for errors writing to GDB.
10477 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10478 * remote-utils.c (getpkt): Check for errors writing to the remote
10479 descriptor.
10480
10481 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10482
10483 * linux-low.c (linux_wait_1): Move non-debugging code out of
10484 `debug_threads' control.
10485
10486 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10487
10488 * linux-low.c (linux_wait_1): Don't set last_status here.
10489 * server.c (push_event, queue_stop_reply_callback): Assert we're
10490 not pushing a TARGET_WAITKIND_IGNORE event.
10491 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10492 (myresume, handle_target_event): Set the thread's last_resume_kind
10493 and last_status from the target returned status.
10494
10495 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10496
10497 PR threads/10729
10498
10499 * linux-x86-low.c (update_debug_registers_callback): New.
10500 (i386_dr_low_set_addr): Use it.
10501 (i386_dr_low_get_addr): New.
10502 (i386_dr_low_set_control): Use update_debug_registers_callback.
10503 (i386_dr_low_get_control): New.
10504 (i386_dr_low_get_status): Adjust.
10505 * linux-low.c (linux_stop_lwp): New.
10506 * linux-low.h (linux_stop_lwp): Declare.
10507
10508 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10509 argument instead of a i386_debug_reg_state.
10510 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10511 a i386_debug_reg_state.
10512 (i386_insert_aligned_watchpoint): Adjust.
10513 (i386_remove_aligned_watchpoint): Adjust.
10514 (i386_low_stopped_data_address): Read the debug registers from the
10515 inferior instead of from the mirrors.
10516 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10517 (i386_dr_low_get_addr): Declare.
10518 (i386_dr_low_get_control): Declare.
10519 (i386_dr_low_get_status): Change prototype.
10520
10521 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10522 (i386_dr_low_get_addr): New.
10523 (i386_dr_low_get_control): New.
10524 (i386_dr_low_get_status): Adjust prototype. Return
10525 dr_status_mirror.
10526 (i386_initial_stuff): Clear dr_status_mirror and
10527 dr_control_mirror.
10528 (i386_get_thread_context): Adjust.
10529 (i386_set_thread_context): Adjust.
10530 (i386_thread_added): Adjust.
10531
10532 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10533
10534 * linux-low.h (linux_thread_area): Delete declaration.
10535
10536 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10537
10538 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10539 after its termination.
10540
10541 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10542
10543 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10544 (gdb_wants_all_stopped): Delete.
10545 (linux_wait_1): Don't call them.
10546 * server.c (handle_v_cont): Tag all threads as want-stopped.
10547 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10548 stopped as "client-wants-stopped".
10549
10550 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10551
10552 * Makefile.in (signals_h): New.
10553 (server_h): Depend on it.
10554 (server.o): Don't depend on $(signals_def).
10555 (signals.o): Depend on $(signals_def).
10556
10557 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10558
10559 * Makefile.in (signals_def): New.
10560 (server_h): Append include/gdb/signals.h and signals_def.
10561 (server.o): Append signals_def.
10562
10563 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10564
10565 * server.c (handle_target_event): Use target_signal_to_host for
10566 resume_info.sig initialization.
10567 * target.h (struct thread_resume) <sig>: New comment.
10568
10569 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10570
10571 * server.c (handle_query): strcpy() the returned string from paddress()
10572 instead of sprintf().
10573 * utils.c (paddress): Return phex_nz().
10574
10575 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10576
10577 * server.c (handle_v_cont): Call mourn_inferior if process
10578 just exited.
10579 (myresume): Likewise.
10580
10581 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10582
10583 Static tracepoints, and integration with UST.
10584
10585 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10586 * mem-break.c (uninsert_all_breakpoints)
10587 (reinsert_all_breakpoints): New.
10588 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10589 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10590 (gdb_agent_ust_loaded, helper_thread_id)
10591 (gdb_agent_helper_thread_id): New macros.
10592 (struct ipa_sym_addresses): Add addr_ust_loaded,
10593 addr_helper_thread_id, addr_cmd_buf.
10594 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10595 (in_process_agent_loaded_ust): New.
10596 (write_e_ust_not_loaded): New.
10597 (maybe_write_ipa_ust_not_loaded): New.
10598 (struct collect_static_trace_data_action): New.
10599 (enum tracepoint_type) <static_tracepoint>: New.
10600 (struct tracepoint) <handle>: Mention static tracepoints.
10601 (struct static_tracepoint_ctx): New.
10602 (CMD_BUF_SIZE): New.
10603 (add_tracepoint_action): Handle static tracepoint actions.
10604 (unprobe_marker_at): New.
10605 (clear_installed_tracepoints): Handle static tracepoints.
10606 (cmd_qtdp): Handle static tracepoints.
10607 (probe_marker_at): New.
10608 (cmd_qtstart): Handle static tracepoints.
10609 (response_tracepoint): Handle static tracepoints.
10610 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10611 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10612 (get_context_regcache): Handle static tracepoints.
10613 (do_action_at_tracepoint): Handle static tracepoint actions.
10614 (traceframe_find_block_type): Handle static trace data blocks.
10615 (traceframe_read_sdata): New.
10616 (download_tracepoints): Download static tracepoint actions.
10617 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10618 (GDB_PROBE_NAME): New.
10619 (ust_ops): New.
10620 (GET_UST_SYM): New.
10621 (USTF): New.
10622 (dlsym_ust): New.
10623 (ust_marker_to_static_tracepoint): New.
10624 (gdb_probe): New.
10625 (collect_ust_data_at_tracepoint): New.
10626 (gdb_ust_probe): New.
10627 (UNIX_PATH_MAX, SOCK_DIR): New.
10628 (gdb_ust_connect_sync_socket): New.
10629 (resume_thread, stop_thread): New.
10630 (run_inferior_command): New.
10631 (init_named_socket): New.
10632 (gdb_ust_socket_init): New.
10633 (cstr_to_hexstr): New.
10634 (next_st): New.
10635 (first_marker, next_marker): New.
10636 (response_ust_marker): New.
10637 (cmd_qtfstm, cmd_qtsstm): New.
10638 (unprobe_marker_at, probe_marker_at): New.
10639 (cmd_qtstmat, gdb_ust_thread): New.
10640 (gdb_ust_init): New.
10641 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10642 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10643 (ST_REGENTRY): New.
10644 (x86_64_st_collect_regmap): New.
10645 (X86_64_NUM_ST_COLLECT_GREGS): New.
10646 (AMD64_RIP_REGNUM): New.
10647 (supply_static_tracepoint_registers): New.
10648 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10649 (ST_REGENTRY): New.
10650 (i386_st_collect_regmap): New.
10651 (i386_NUM_ST_COLLECT_GREGS): New.
10652 (supply_static_tracepoint_registers): New.
10653 * server.c (handle_query): Handle qXfer:statictrace:read.
10654 <qSupported>: Report support for StaticTracepoints, and
10655 qXfer:statictrace:read features.
10656 * server.h (traceframe_read_sdata)
10657 (supply_static_tracepoint_registers): Declare.
10658 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10659 (unpack_varlen_hex): Include in IPA build.
10660 * Makefile.in (ustlibs, ustinc): New.
10661 (IPA_OBJS): Add remote-utils-ipa.o.
10662 ($(IPA_LIB)): Link -ldl and -lpthread.
10663 (UST_CFLAGS): New.
10664 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10665 * config.in, configure: Regenerate.
10666
10667 2010-06-20 Ian Lance Taylor <iant@google.com>
10668 Pedro Alves <pedro@codesourcery.com>
10669
10670 * linux-x86-low.c (always_true): Delete.
10671 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10672 trying to fool the compiler with always_true.
10673
10674 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10675
10676 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10677 conditions in gdbserver.
10678
10679 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10680
10681 * spu-low.c (spu_read_memory): Wrap around local store limit.
10682 (spu_write_memory): Likewise.
10683
10684 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10685
10686 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10687 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10688 LONGEST uses.
10689 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10690 uses.
10691 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10692 uses with LONGEST uses.
10693
10694 2010-06-14 Stan Shebs <stan@codesourcery.com>
10695 Pedro Alves <pedro@codesourcery.com>
10696
10697 Bytecode compiler.
10698
10699 * linux-x86-low.c: Include limits.h.
10700 (add_insns): New.
10701 (always_true): New.
10702 (EMIT_ASM): New.
10703 (EMIT_ASM32): New.
10704 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10705 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10706 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10707 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10708 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10709 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10710 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10711 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10712 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10713 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10714 (amd64_emit_void_call_2): New.
10715 (amd64_emit_ops): New.
10716 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10717 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10718 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10719 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10720 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10721 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10722 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10723 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10724 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10725 (i386_emit_stack_adjust, i386_emit_int_call_1)
10726 (i386_emit_void_call_2): New.
10727 (i386_emit_ops): New.
10728 (x86_emit_ops): New.
10729 (the_low_target): Install x86_emit_ops.
10730 * server.h (struct emit_ops): New.
10731 (get_raw_reg_func_addr): Declare.
10732 (current_insn_ptr, emit_error): Declare.
10733 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10734 (set_trace_state_variable_value): New defines.
10735 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10736 addr_get_trace_state_variable_value and
10737 addr_set_trace_state_variable_value.
10738 (symbol_list): New fields for get_raw_reg,
10739 get_trace_state_variable_value and set_trace_state_variable_value.
10740 (condfn): New typedef.
10741 (struct tracepoint): New field `compiled_cond'.
10742 (do_action_at_tracepoint): Clear compiled_cond.
10743 (get_trace_state_variable_value, set_trace_state_variable_value):
10744 Export in the IPA.
10745 (condition_true_at_tracepoint): If there's a compiled condition,
10746 run that.
10747 (current_insn_ptr, emit_error): New globals.
10748 (struct bytecode_address): New.
10749 (get_raw_reg_func_addr): New.
10750 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10751 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10752 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10753 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10754 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10755 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10756 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10757 (compile_tracepoint_condition, compile_bytecodes): New.
10758 * target.h (emit_ops): Forward declare.
10759 (struct target_ops): New field emit_ops.
10760 (target_emit_ops): New.
10761 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10762 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10763 * linux-low.c (linux_emit_ops): New.
10764 (linux_target_ops): Install it.
10765 * linux-low.h (struct linux_target_ops): New field emit_ops.
10766
10767 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10768
10769 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10770 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10771
10772 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10773 Stan Shebs <stan@codesourcery.com>
10774
10775 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10776 (all): Depend on $(extra_libraries).
10777 (install-only): Install the IPA.
10778 (IPA_OBJS, IPA_LIB): New.
10779 (clean): Remove the IPA lib.
10780 (IPAGENT_CFLAGS): New.
10781 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10782 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10783 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10784 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10785 * configure.ac: Check for atomic builtins support in the compiler.
10786 (IPA_DEPFILES, extra_libraries): Define.
10787 * configure.srv (ipa_obj): Add description.
10788 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10789 (i[34567]86-*-linux*): Set ipa_obj.
10790 (x86_64-*-linux*): Set ipa_obj.
10791 * linux-low.c (stabilizing_threads): New.
10792 (supports_fast_tracepoints): New.
10793 (linux_detach): Stabilize threads before detaching.
10794 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10795 the lwp is either not stabilizing, or is moving out of a jump pad.
10796 (linux_fast_tracepoint_collecting): New.
10797 (maybe_move_out_of_jump_pad): New.
10798 (enqueue_one_deferred_signal): New.
10799 (dequeue_one_deferred_signal): New.
10800 (linux_wait_for_event_1): If moving out of a jump pad, defer
10801 pending signals to later.
10802 (linux_stabilize_threads): New.
10803 (linux_wait_1): Check if threads need moving out of jump pads, and
10804 do it if so.
10805 (stuck_in_jump_pad_callback): New.
10806 (move_out_of_jump_pad_callback): New.
10807 (lwp_running): New.
10808 (linux_resume_one_lwp): Handle moving out of jump pads.
10809 (linux_set_resume_request): Dequeue deferred signals.
10810 (need_step_over_p): Also step over fast tracepoint jumps.
10811 (start_step_over): Also uninsert fast tracepoint jumps.
10812 (finish_step_over): Also reinsert fast tracepoint jumps.
10813 (linux_install_fast_tracepoint_jump): New.
10814 (linux_target_ops): Install linux_stabilize_threads and
10815 linux_install_fast_tracepoint_jump_pad.
10816 * linux-low.h (linux_target_ops) <get_thread_area,
10817 install_fast_tracepoint_jump_pad>: New fields.
10818 (struct lwp_info) <collecting_fast_tracepoint,
10819 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10820 (linux_get_thread_area): Declare.
10821 * linux-x86-low.c (jump_insn): New.
10822 (x86_get_thread_area): New.
10823 (append_insns): New.
10824 (push_opcode): New.
10825 (amd64_install_fast_tracepoint_jump_pad): New.
10826 (i386_install_fast_tracepoint_jump_pad): New.
10827 (x86_install_fast_tracepoint_jump_pad): New.
10828 (the_low_target): Install x86_get_thread_area and
10829 x86_install_fast_tracepoint_jump_pad.
10830 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10831 (struct fast_tracepoint_jump): New.
10832 (fast_tracepoint_jump_insn): New.
10833 (fast_tracepoint_jump_shadow): New.
10834 (find_fast_tracepoint_jump_at): New.
10835 (fast_tracepoint_jump_here): New.
10836 (delete_fast_tracepoint_jump): New.
10837 (set_fast_tracepoint_jump): New.
10838 (uninsert_fast_tracepoint_jumps_at): New.
10839 (reinsert_fast_tracepoint_jumps_at): New.
10840 (set_breakpoint_at): Use write_inferior_memory.
10841 (uninsert_raw_breakpoint): Use write_inferior_memory.
10842 (check_mem_read): Mask out fast tracepoint jumps.
10843 (check_mem_write): Mask out fast tracepoint jumps.
10844 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10845 (set_fast_tracepoint_jump): Declare.
10846 (delete_fast_tracepoint_jump)
10847 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10848 (reinsert_fast_tracepoint_jumps_at): Declare.
10849 * regcache.c: Don't compile many functions when building the
10850 in-process agent library.
10851 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10852 the register buffer in the heap.
10853 (free_register_cache): If the register buffer isn't owned by the
10854 regcache, don't free it.
10855 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10856 pre-existing register caches.
10857 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10858 type.
10859 (convert_ascii_to_int): : Constify `from' parameter type.
10860 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10861 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10862 the needed buffer in-place.
10863 (relocate_instruction): New.
10864 * server.c (handle_query) <qSymbols>: If the target supports
10865 tracepoints, give it a chance of looking up symbols. Report
10866 support for fast tracepoints.
10867 (handle_status): Stabilize threads.
10868 (process_serial_event): Adjust.
10869 * server.h (struct fast_tracepoint_jump): Forward declare.
10870 (struct process_info) <fast_tracepoint_jumps>: New field.
10871 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10872 (decode_X_packet, decode_M_packet): Adjust.
10873 (relocate_instruction): Declare.
10874 (in_process_agent_loaded): Declare.
10875 (tracepoint_look_up_symbols): Declare.
10876 (struct fast_tpoint_collect_status): Declare.
10877 (fast_tracepoint_collecting): Declare.
10878 (force_unlock_trace_buffer): Declare.
10879 (handle_tracepoint_bkpts): Declare.
10880 (initialize_low_tracepoint)
10881 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10882 * target.h (struct target_ops) <stabilize_threads,
10883 install_fast_tracepoint_jump_pad>: New fields.
10884 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10885 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10886 [HAVE_STDINT_H]: Include stdint.h.
10887 (trace_debug_1): Rename to ...
10888 (trace_vdebug): ... this.
10889 (trace_debug): Rename to ...
10890 (trace_debug_1): ... this. Add `level' parameter.
10891 (trace_debug): New.
10892 (ATTR_USED, ATTR_NOINLINE): New.
10893 (IP_AGENT_EXPORT): New.
10894 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10895 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10896 (about_to_request_buffer_space, trace_buffer_is_full)
10897 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10898 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10899 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10900 (traceframe_write_count, traceframes_created)
10901 (trace_state_variables)
10902 New renaming defines.
10903 (struct ipa_sym_addresses): New.
10904 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10905 (symbol_list): New.
10906 (ipa_sym_addrs): New.
10907 (all_tracepoint_symbols_looked_up): New.
10908 (in_process_agent_loaded): New.
10909 (write_e_ipa_not_loaded): New.
10910 (maybe_write_ipa_not_loaded): New.
10911 (tracepoint_look_up_symbols): New.
10912 (debug_threads) [IN_PROCESS_AGENT]: New.
10913 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10914 (UNKNOWN_SIDE_EFFECTS): New.
10915 (stop_tracing): New.
10916 (flush_trace_buffer): New.
10917 (stop_tracing_bkpt): New.
10918 (flush_trace_buffer_bkpt): New.
10919 (read_inferior_integer): New.
10920 (read_inferior_uinteger): New.
10921 (read_inferior_data_pointer): New.
10922 (write_inferior_data_pointer): New.
10923 (write_inferior_integer): New.
10924 (write_inferior_uinteger): New.
10925 (struct collect_static_trace_data_action): Delete.
10926 (enum tracepoint_type): New.
10927 (struct tracepoint) <type>: New field `type'.
10928 <actions_str, step_actions, step_actions_str>: Only include in
10929 GDBserver.
10930 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10931 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10932 (tracepoints): Use IP_AGENT_EXPORT.
10933 (last_tracepoint): Don't include in the IPA.
10934 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10935 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10936 (alloced_trace_state_variables): New.
10937 (trace_state_variables): Use IP_AGENT_EXPORT.
10938 (traceframe_t): Delete unused variable.
10939 (circular_trace_buffer): Don't include in the IPA.
10940 (trace_buffer_start): Delete.
10941 (struct trace_buffer_control): New.
10942 (trace_buffer_free): Delete.
10943 (struct ipa_trace_buffer_control): New.
10944 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10945 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10946 New.
10947 (trace_buffer_ctrl): New.
10948 (TRACE_BUFFER_CTRL_CURR): New.
10949 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10950 Reimplement as macros.
10951 (trace_buffer_wrap): Delete.
10952 (traceframe_write_count, traceframe_read_count)
10953 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10954 (struct tracepoint_hit_ctx) <type>: New field.
10955 (struct fast_tracepoint_ctx): New.
10956 (memory_barrier): New.
10957 (cmpxchg): New.
10958 (record_tracepoint_error): Update atomically in the IPA.
10959 (clear_inferior_trace_buffer): New.
10960 (about_to_request_buffer_space): New.
10961 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10962 updating the same buffer.
10963 (add_tracepoint): Default the tracepoint's type to trap
10964 tracepoint, and orig_size to -1.
10965 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10966 internal variables.
10967 (create_trace_state_variable): New parameter `gdb'. Handle it.
10968 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10969 (cmd_qtdp): Handle fast tracepoints.
10970 (cmd_qtdv): Adjust.
10971 (max_jump_pad_size): New.
10972 (gdb_jump_pad_head): New.
10973 (get_jump_space_head): New.
10974 (claim_jump_space): New.
10975 (sort_tracepoints): New.
10976 (MAX_JUMP_SIZE): New.
10977 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10978 IPA.
10979 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10980 support. Upload fast traceframes, and delete internal IPA
10981 breakpoints.
10982 (stop_tracing_handler): New.
10983 (flush_trace_buffer_handler): New.
10984 (cmd_qtstop): Upload fast tracepoints.
10985 (response_tracepoint): Handle fast tracepoints.
10986 (tracepoint_finished_step): Upload fast traceframes. Set the
10987 tracepoint hit context's tracepoint type.
10988 (handle_tracepoint_bkpts): New.
10989 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10990 type. Add comment about fast tracepoints.
10991 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10992 non-existing action_str field.
10993 (get_context_regcache): Handle fast tracepoints.
10994 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10995 to the regcache.
10996 (fast_tracepoint_from_jump_pad_address): New.
10997 (fast_tracepoint_from_ipa_tpoint_address): New.
10998 (collecting_t): New.
10999 (force_unlock_trace_buffer): New.
11000 (fast_tracepoint_collecting): New.
11001 (collecting): New.
11002 (gdb_collect): New.
11003 (write_inferior_data_ptr): New.
11004 (target_tp_heap): New.
11005 (target_malloc): New.
11006 (download_agent_expr): New.
11007 (UALIGN): New.
11008 (download_tracepoints): New.
11009 (download_trace_state_variables): New.
11010 (upload_fast_traceframes): New.
11011 (IPA_FIRST_TRACEFRAME): New.
11012 (IPA_NEXT_TRACEFRAME_1): New.
11013 (IPA_NEXT_TRACEFRAME): New.
11014 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11015 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11016 (gdb_jump_pad_buffer_end): New.
11017 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11018 (initialize_tracepoint): Adjust.
11019 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11020 buffer. Initialize the low module.
11021 * utils.c (PREFIX, TOOLNAME): New.
11022 (malloc_failure): Use PREFIX.
11023 (error): In the IPA, an error causes an exit.
11024 (fatal, warning): Use PREFIX.
11025 (internal_error): Use TOOLNAME.
11026 (NUMCELLS): Increase to 10.
11027 * configure, config.in: Regenerate.
11028
11029 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11030
11031 * server.c (handle_query) <qSupported>: Do two passes over the
11032 qSupported string to avoid nesting strtok.
11033
11034 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11035
11036 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11037 (CDEPS): New.
11038 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11039 -Wl,--dynamic-list.
11040 * configure: Regenerate.
11041 * proc-service.list: New.
11042
11043 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11044
11045 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11046 New comment.
11047
11048 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11049
11050 * gdbreplay.c (remote_open): Check error return from socket() call by
11051 its equality to -1 not by it being negative.
11052 * remote-utils.c (remote_open): Likewise.
11053
11054 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11055
11056 * config.h: Regenerate.
11057
11058 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11059
11060 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11061 doesn't provide PTRACE_GET_THREAD_AREA.
11062
11063 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11064
11065 * linux-m68k-low.c: Include <asm/ptrace.h>
11066 (ps_get_thread_area): Implement.
11067
11068 2010-05-03 Doug Evans <dje@google.com>
11069
11070 * event-loop.c (struct callback_event): New struct.
11071 (callback_list): New global.
11072 (append_callback_event, delete_callback_event): New functions.
11073 (process_callback): New function.
11074 (start_event_loop): Call it.
11075 * remote-utils.c (NOT_SCHEDULED): Define.
11076 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11077 moved out of readchar.
11078 (readchar): Rewrite. Call reschedule before returning.
11079 (reset_readchar): New function.
11080 (remote_close): Call it.
11081 (process_remaining, reschedule): New functions.
11082 * server.h (callback_handler_func): New typedef.
11083 (append_callback_event, delete_callback_event): Declare.
11084
11085 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11086
11087 * proc-service.c (ps_pglobal_lookup): Use
11088 thread_db_look_up_one_symbol.
11089 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11090 parameter. Use it instead of all_symbols_looked_up.
11091 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11092 field.
11093 (all_symbols_looked_up): Don't declare.
11094 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11095 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11096 field.
11097 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11098 Set all_symbols_looked_up here.
11099 (thread_db_look_up_one_symbol): New.
11100 (thread_db_get_tls_address): Adjust.
11101 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11102 thread_db object on the heap, and tentatively set it in the
11103 process structure.
11104 (thread_db_init): Don't set all_symbols_looked_up here.
11105 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11106
11107 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11108
11109 * linux-low.c (linux_kill, linux_detach): Adjust.
11110 (status_pending_p_callback): Remove redundant statement. Check
11111 for !TARGET_WAITIKIND_IGNORE, instead of
11112 TARGET_WAITKIND_STOPPED.
11113 (handle_tracepoints): Make sure LWP is locked. Adjust.
11114 (linux_wait_for_event_1): Adjust.
11115 (linux_cancel_breakpoints): New.
11116 (unsuspend_one_lwp): New.
11117 (unsuspend_all_lwps): New.
11118 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11119 (send_sigstop_callback): Change return type to int, add new
11120 `except' parameter and handle it.
11121 (suspend_and_send_sigstop_callback): New.
11122 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11123 pass them down. If SUSPEND, also increment the lwp's suspend
11124 count.
11125 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11126 (need_step_over_p): Don't consider suspended LWPs.
11127 (start_step_over): Adjust.
11128 (proceed_one_lwp): Change return type to int, add new `except'
11129 parameter and handle it.
11130 (unsuspend_and_proceed_one_lwp): New.
11131 (proceed_all_lwps): Use find_inferior instead of
11132 for_each_inferior.
11133 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11134 also decrement the suspend count of LWPs. Pass `except' down,
11135 instead of hacking its suspend count.
11136 (linux_pause_all): Add `freeze' parameter. Adjust.
11137 (linux_unpause_all): New.
11138 (linux_target_ops): Install linux_unpause_all.
11139 * server.c (handle_status): Adjust.
11140 * target.h (struct target_ops): New fields `unpause_all' and
11141 `cancel_breakpoints'. Add new parameter to `pause_all'.
11142 (pause_all): Add new `freeze' parameter.
11143 (unpause_all): New.
11144 (cancel_breakpoints): New.
11145 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11146 cancel breakpoints.
11147 (cmd_qtstart): Pause threads.
11148 (stop_tracing): Pause threads, and cancel breakpoints.
11149 * win32-low.c (win32_target_ops): Adjust.
11150
11151 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11152
11153 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11154 the inferior right away from here...
11155 (linux_wait_1): ... to here, and adjust to check the thread's
11156 last_resume_kind instead of the lwp's step or stop_expected flags.
11157
11158 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11159
11160 * README: Use consistent `GDB' and `GDBserver' spellings.
11161
11162 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11163
11164 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11165 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11166 (linux_detach_one_lwp): Assume the lwp is stopped.
11167 (any_thread_of): Delete.
11168 (linux_detach): Stop all lwps here. Don't blindly delete all
11169 breakpoints.
11170 (delete_lwp_callback): New.
11171 (linux_mourn): Delete all lwps of the process that is gone.
11172 (linux_wait_1): Don't delete the last lwp of the process here.
11173 * mem-break.h (mark_breakpoints_out): Declare.
11174 * mem-break.c (mark_breakpoints_out): New.
11175 (free_all_breakpoints): Use it.
11176 * server.c (handle_target_event): If the process is gone, mark
11177 breakpoints out.
11178 * thread-db.c (struct thread_db) <create_bp>: New field.
11179 (thread_db_enable_reporting): Fix prototype. Store a thread event
11180 breakpoint reference in the thread_db struct.
11181 (thread_db_load_search): Clear the thread_db object.
11182 (try_thread_db_load_1): Ditto.
11183 (switch_to_process): New.
11184 (disable_thread_event_reporting): Use it.
11185 (remove_thread_event_breakpoints): New.
11186 (thread_db_detach, thread_db_mourn): Use it.
11187
11188 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11189
11190 * linux-low.c (linux_enable_event_reporting): New.
11191 (linux_wait_for_event_1, handle_extended_wait): Use it.
11192
11193 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11194
11195 * linux-low.c (linux_kill_one_lwp, linux_kill)
11196 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11197 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11198 SIGSTOP even if the LWP is stopped.
11199 (send_sigstop_callback): New.
11200 (stop_all_lwps): Use send_sigstop_callback instead.
11201 (linux_resume_one_thread): Adjust.
11202 (proceed_one_lwp): Still proceed an LWP that the client has
11203 requested to stop, if we haven't reported it as stopped yet. Make
11204 sure that LWPs the client want stopped, have a pending SIGSTOP.
11205
11206 2010-04-26 Doug Evans <dje@google.com>
11207
11208 * server.c (handle_general_set): Make static.
11209
11210 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11211 Print received char after testing for error/eof instead of before.
11212 (input_interrupt): Tweak comment.
11213
11214 2010-04-23 Doug Evans <dje@google.com>
11215
11216 * server.c (start_inferior): Print inferior argv if --debug.
11217
11218 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11219
11220 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11221 * nto-x86-low.c: Include server.h
11222
11223 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11224
11225 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11226 be consistent with other sources of this directory.
11227 (init_registers_amd64): Correct name of source file of this function
11228 in the comment.
11229
11230 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11231
11232 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11233 64-bit executables.
11234
11235 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11236
11237 * win32-i386-low.c: Add 64-bit support.
11238 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11239 (init_registers_amd64): Declare.
11240 (mappings): Add 64-bit version of array.
11241 (init_windows_x86): New function.
11242 (the_low_target): Change init_arch field to init_windows_x86.
11243
11244 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11245
11246 * win32-low.c: Adapt to support also 64-bit architecture.
11247 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11248 (get_image_name): Use SIZE_T type for local variable `done'.
11249 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11250 (toolhelp_get_dll_name): Idem.
11251 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11252 Use uintptr_t typecast to avoid warning.
11253 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11254 (handle_exception): Use phex_nz to avoid warning.
11255 (win32_wait): Remove unused local variable `process'.
11256
11257 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11258
11259 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11260 `amd64-avx.o'.
11261
11262 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11263
11264 * configure.ac: Use `ws2_32' library for srv_mingw.
11265 * configure: Regenerate.
11266 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11267 * remote-utils.c: Likewise.
11268
11269 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11270
11271 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11272 if __x86_64__ is defined.
11273
11274 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11275
11276 * configure: Regenerate.
11277
11278 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11279
11280 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11281 * target.h (target_ops): New get_tib_address field.
11282 * win32-low.h (win32_thread_info): Add thread_local_base field.
11283 * win32-low.c (child_add_thread): Add tlb argument.
11284 Set thread_local_base field to TLB.
11285 (get_child_debug_event): Adapt to child_add_thread change.
11286 (win32_get_tib_address): New function.
11287 (win32_target_ops): Set get_tib_address field to
11288 win32_get_tib_address.
11289 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11290
11291 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11292
11293 * linux-low.c (linux_mourn): Also remove the process.
11294 * server.c (handle_target_event): Don't remove the process here.
11295 * nto-low.c (nto_mourn): New.
11296 (nto_target_ops): Install it.
11297 * spu-low.c (spu_mourn): New.
11298 (spu_target_ops): Install it.
11299 * win32-low.c (win32_mourn): New.
11300 (win32_target_ops): Install it.
11301
11302 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11303
11304 * server.h (buffer_xml_printf): Remove redundant `;'.
11305
11306 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11307
11308 * regcache.c (set_register_cache): Invalidate regcaches before
11309 changing the register cache layout.
11310 (regcache_invalidate_one): Allow a NULL regcache.
11311 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11312 regcaches before changing the register cache layout or the target
11313 regsets.
11314
11315 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11316
11317 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11318 variable warning on Linux/x86-64.
11319
11320 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11321
11322 GDBserver disconnected tracing support.
11323
11324 * linux-low.c (linux_remove_process): Delete.
11325 (add_lwp): Don't set last_resume_kind here.
11326 (linux_kill): Use `mourn'.
11327 (linux_detach): Use `thread_db_detach', and `mourn'.
11328 (linux_mourn): New.
11329 (linux_attach_lwp_1): Adjust comment.
11330 (linux_attach): last_resume_kind moved the thread_info; adjust.
11331 (status_pending_p_callback): Adjust.
11332 (linux_wait_for_event_1): Adjust.
11333 (count_events_callback, select_singlestep_lwp_callback)
11334 (select_event_lwp_callback, cancel_breakpoints_callback)
11335 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11336 (proceed_one_lwp): Adjust.
11337 (linux_async): Add debug output.
11338 (linux_thread_stopped): New.
11339 (linux_pause_all): New.
11340 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11341 linux_pause_all.
11342 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11343 (thread_db_free): Delete declaration.
11344 (thread_db_detach, thread_db_mourn): Declare.
11345 * thread-db.c (thread_db_init): Use thread_db_mourn.
11346 (thread_db_free): Delete, split in two.
11347 (disable_thread_event_reporting): New.
11348 (thread_db_detach): New.
11349 (thread_db_mourn): New.
11350
11351 * server.h (struct thread_info) <last_resume_kind>: New field.
11352 <attached>: Add comment.
11353 <gdb_detached>: New field.
11354 (handler_func): Change return type to int.
11355 (handle_serial_event, handle_target_event): Ditto.
11356 (gdb_connected): Declare.
11357 (tracing): Delete.
11358 (disconnected_tracing): Declare.
11359 (stop_tracing): Declare.
11360
11361 * server.c (handle_query) <qSupported>: Report support for
11362 disconnected tracing.
11363 (queue_stop_reply_callback): Account for running threads.
11364 (gdb_wants_thread_stopped): New.
11365 (gdb_wants_all_threads_stopped): New.
11366 (gdb_reattached_process): New.
11367 (handle_status): Clear the `gdb_detached' flag of all processes.
11368 In all-stop, stop all threads.
11369 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11370 (process_serial_event): If the remote connection breaks, or if an
11371 exit was forced with "monitor exit", force an event loop exit.
11372 Handle disconnected tracing on detach.
11373 (handle_serial_event): Adjust.
11374 (handle_target_event): If GDB isn't connected, forward events back
11375 to the inferior, unless the last process exited, in which case,
11376 exit gdbserver. Adjust interface.
11377
11378 * remote-utils.c (remote_open): Don't block in accept. Instead
11379 register an event loop source on the listen socket file
11380 descriptor. Refactor bits into ...
11381 (listen_desc): ... this new global.
11382 (gdb_connected): ... this new function.
11383 (enable_async_notification): ... this new function.
11384 (handle_accept_event): ... this new function.
11385 (remote_close): Clear remote_desc.
11386
11387 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11388
11389 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11390 New fields.
11391 (mourn_inferior): Define.
11392 (target_process_qsupported): Avoid the dangling else problem.
11393 (thread_stopped): Define.
11394 (pause_all): Define.
11395 (target_waitstatus_to_string): Declare.
11396 * target.c (target_waitstatus_to_string): New.
11397
11398 * tracepoint.c (tracing): Make extern.
11399 (disconnected_tracing): New.
11400 (stop_tracing): Make extern. Handle tracing stops due to GDB
11401 disconnecting.
11402 (cmd_qtdisconnected): New.
11403 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11404 (handle_tracepoint_general_set): Handle QTDisconnected.
11405
11406 * event-loop.c (event_handler_func): Change return type to int.
11407 (process_event): Bail out if the event handler wants the event
11408 loop to stop.
11409 (handle_file_event): Ditto.
11410 (start_event_loop): Bail out if the event handler wants the event
11411 loop to stop.
11412
11413 * nto-low.c (nto_target_ops): Adjust.
11414 * spu-low.c (spu_wait): Don't remove the process here.
11415 (spu_target_ops): Adjust.
11416 * win32-low.c (win32_wait): Don't remove the process here.
11417 (win32_target_ops): Adjust.
11418
11419 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11420
11421 * regcache.c (realloc_register_cache): Invalidate inferior's
11422 regcache before recreating it.
11423
11424 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11425
11426 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11427
11428 2010-04-09 Stan Shebs <stan@codesourcery.com>
11429 Pedro Alves <pedro@codesourcery.com>
11430
11431 * server.h (LONGEST): New.
11432 (struct thread_info) <while_stepping>: New field.
11433 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11434 Declare.
11435 (initialize_tracepoint, handle_tracepoint_general_set)
11436 (handle_tracepoint_query, tracepoint_finished_step)
11437 (tracepoint_was_hit, release_while_stepping_state_list):
11438 (current_traceframe): Declare.
11439 * server.c (handle_general_set): Handle tracepoint packets.
11440 (read_memory): New.
11441 (write_memory): New.
11442 (handle_search_memory_1): Use read_memory.
11443 (handle_query): Report support for conditional tracepoints, trace
11444 state variables, and tracepoint sources. Handle tracepoint
11445 queries.
11446 (main): Initialize the tracepoints module.
11447 (process_serial_event): Handle traceframe reads/writes.
11448
11449 * linux-low.c (handle_tracepoints): New.
11450 (linux_wait_1): Call it.
11451 (linux_resume_one_lwp): Handle while-stepping.
11452 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11453 (linux_target_ops): Install them.
11454 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11455 New field.
11456 * linux-x86-low.c (x86_supports_tracepoints): New.
11457 (the_low_target). Install it.
11458
11459 * mem-break.h (delete_breakpoint): Declare.
11460 * mem-break.c (delete_breakpoint): Make external.
11461
11462 * target.h (struct target_ops): Add `supports_tracepoints',
11463 `read_pc', and `write_pc' fields.
11464 (target_supports_tracepoints): Define.
11465 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11466 (phex_nz): New.
11467
11468 * regcache.h (struct regcache) <registers_owned>: New field.
11469 (init_register_cache, regcache_cpy): Declare.
11470 (regcache_read_pc, regcache_write_pc): Declare.
11471 (register_cache_size): Declare.
11472 (supply_regblock): Declare.
11473 * regcache.c (init_register_cache): New.
11474 (new_register_cache): Use it.
11475 (regcache_cpy): New.
11476 (register_cache_size): New.
11477 (supply_regblock): New.
11478 (regcache_read_pc, regcache_write_pc): New.
11479
11480 * tracepoint.c: New.
11481
11482 * Makefile.in (OBS): Add tracepoint.o.
11483 (tracepoint.o): New rule.
11484
11485 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11486
11487 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11488 (i386-mmx.o): New.
11489 (i386-mmx.c): Likewise.
11490 (i386-mmx-linux.o): Likewise.
11491 (i386-mmx-linux.c): Likewise.
11492
11493 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11494 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11495 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11496 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11497
11498 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11499 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11500 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11501
11502 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11503
11504 * Makefile.in (clean): Updated.
11505 (i386-avx.o): New.
11506 (i386-avx.c): Likewise.
11507 (i386-avx-linux.o): Likewise.
11508 (i386-avx-linux.c): Likewise.
11509 (amd64-avx.o): Likewise.
11510 (amd64-avx.c): Likewise.
11511 (amd64-avx-linux.o): Likewise.
11512 (amd64-avx-linux.c): Likewise.
11513
11514 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11515 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11516 (srv_amd64_regobj): Add amd64-avx.o.
11517 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11518 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11519 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11520 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11521 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11522 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11523 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11524
11525 * i387-fp.c: Include "i386-xstate.h".
11526 (i387_xsave): New.
11527 (i387_cache_to_xsave): Likewise.
11528 (i387_xsave_to_cache): Likewise.
11529 (x86_xcr0): Likewise.
11530
11531 * i387-fp.h (i387_cache_to_xsave): Likewise.
11532 (i387_xsave_to_cache): Likewise.
11533 (x86_xcr0): Likewise.
11534
11535 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11536 * linux-crisv32-low.c (target_regsets): Likewise.
11537 * linux-m68k-low.c (target_regsets): Likewise.
11538 * linux-mips-low.c (target_regsets): Likewise.
11539 * linux-ppc-low.c (target_regsets): Likewise.
11540 * linux-s390-low.c (target_regsets): Likewise.
11541 * linux-sh-low.c (target_regsets): Likewise.
11542 * linux-sparc-low.c (target_regsets): Likewise.
11543 * linux-xtensa-low.c (target_regsets): Likewise.
11544
11545 * linux-low.c: Include <sys/uio.h>.
11546 (regsets_fetch_inferior_registers): Support nt_type.
11547 (regsets_store_inferior_registers): Likewise.
11548 (linux_process_qsupported): New.
11549 (linux_target_ops): Add linux_process_qsupported.
11550
11551 * linux-low.h (regset_info): Add nt_type.
11552 (linux_target_ops): Add process_qsupported.
11553
11554 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11555 and <sys/uio.h>.
11556 (init_registers_i386_avx_linux): New.
11557 (init_registers_amd64_avx_linux): Likewise.
11558 (xmltarget_i386_linux_no_xml): Likewise.
11559 (xmltarget_amd64_linux_no_xml): Likewise.
11560 (PTRACE_GETREGSET): Likewise.
11561 (PTRACE_SETREGSET): Likewise.
11562 (x86_fill_xstateregset): Likewise.
11563 (x86_store_xstateregset): Likewise.
11564 (use_xml): Likewise.
11565 (x86_linux_update_xmltarget): Likewise.
11566 (x86_linux_process_qsupported): Likewise.
11567 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11568 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11569 init_registers_i386_linux here. Call
11570 x86_linux_update_xmltarget.
11571 (the_low_target): Add x86_linux_process_qsupported.
11572
11573 * server.c (handle_query): Call target_process_qsupported.
11574
11575 * target.h (target_ops): Add process_qsupported.
11576 (target_process_qsupported): New.
11577
11578 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11579
11580 * inferiors.c (add_thread): Set last_status kind to
11581 TARGET_WAITKIND_IGNORE.
11582 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11583 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11584 (linux_wait_1): Move `thread' local definition to block that uses
11585 it. Don't NULL initialize `event_child'.
11586 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11587 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11588 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11589
11590 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11591
11592 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11593 an extended waitstatus, or by a watchpoint.
11594 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11595 thread was stepping or has been stopped by a watchpoint.
11596
11597 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11598
11599 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11600 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11601 of another, then delete the previous, and validate all
11602 breakpoints.
11603 (validate_inserted_breakpoint): New.
11604 (delete_disabled_breakpoints): New.
11605 (validate_breakpoints): New.
11606 (check_mem_read): Validate breakpoints before trusting their
11607 shadow. Delete disabled breakpoints.
11608 (check_mem_write): Validate breakpoints before trusting they
11609 should be inserted. Delete disabled breakpoints.
11610 * mem-break.h (validate_breakpoints):
11611 * server.c (handle_query): Validate breakpoints when we see a
11612 qSymbol query.
11613
11614 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11615
11616 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11617 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11618 if we could tell there's a GDB breakpoint at stop_pc.
11619 (need_step_over_p): Don't do a step over if we find a GDB
11620 breakpoint at the resume PC.
11621
11622 * mem-break.c (struct raw_breakpoint): New.
11623 (enum bkpt_type): New type `gdb_breakpoint'.
11624 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11625 fields. New field `raw'.
11626 (find_raw_breakpoint_at): New.
11627 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11628 breakpoint instead.
11629 (set_breakpoint_at): Adjust.
11630 (delete_raw_breakpoint): New.
11631 (release_breakpoint): New.
11632 (delete_breakpoint): Rename to...
11633 (delete_breakpoint_1): ... this. Add proc parameter. Use
11634 release_breakpoint. Return ENOENT.
11635 (delete_breakpoint): Reimplement.
11636 (find_breakpoint_at): Delete.
11637 (find_gdb_breakpoint_at): New.
11638 (delete_breakpoint_at): Delete.
11639 (set_gdb_breakpoint_at): New.
11640 (delete_gdb_breakpoint_at): New.
11641 (gdb_breakpoint_here): New.
11642 (set_reinsert_breakpoint): Use release_breakpoint.
11643 (uninsert_breakpoint): Rename to ...
11644 (uninsert_raw_breakpoint): ... this.
11645 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11646 (reinsert_raw_breakpoint): Change parameter type to
11647 raw_breakpoint.
11648 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11649 instead.
11650 (check_breakpoints): Adjust. Use release_breakpoint.
11651 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11652 (breakpoint_inserted_here): Ditto.
11653 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11654 Don't trust the breakpoint's shadow if it is not inserted.
11655 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11656 (delete_all_breakpoints): Adjust.
11657 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11658 use delete_breakpoint_1.
11659
11660 * mem-break.h (breakpoints_supported): Delete declaration.
11661 (set_gdb_breakpoint_at): Declare.
11662 (gdb_breakpoint_here): Declare.
11663 (delete_breakpoint_at): Delete.
11664 (delete_gdb_breakpoint_at): Declare.
11665
11666 * server.h (struct raw_breakpoint): Forward declare.
11667 (struct process_info): New field `raw_breakpoints'.
11668
11669 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11670 breakpoints.
11671
11672 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11673
11674 * linux-low.c (status_pending_p_callback): Fix comment.
11675 (linux_wait_for_event_1): Move most of the internal breakpoint
11676 handling from here...
11677 (linux_wait_1): ... to here.
11678 (count_events_callback): New.
11679 (select_singlestep_lwp_callback): New.
11680 (select_event_lwp_callback): New.
11681 (cancel_breakpoints_callback): New.
11682 (select_event_lwp): New.
11683 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11684 priority to all LWPs that have had events that should be reported
11685 to the client. Cancel breakpoints when about to reporting the
11686 event to the client, not while stopping lwps. No longer cancel
11687 finished single-steps here.
11688 (cancel_finished_single_step): Delete.
11689 (cancel_finished_single_steps): Delete.
11690
11691 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11692
11693 * mem-break.c (enum bkpt_type): New.
11694 (struct breakpoint): New field `type'.
11695 (set_breakpoint_at): Change return type to struct breakpoint
11696 pointer. Set type to `other_breakpoint' by default.
11697 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11698 in the breakpoint list.
11699 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11700 (reinsert_breakpoint): Rename to ...
11701 (reinsert_raw_breakpoint): ... this.
11702 (reinsert_breakpoints_at): Adjust.
11703 * mem-break.h (struct breakpoint): Declare.
11704 (set_breakpoint_at): Change return type to struct breakpoint
11705 pointer.
11706
11707 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11708
11709 * server.c (handle_query): Assign, not compare.
11710
11711 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11712
11713 Teach linux gdbserver to step-over-breakpoints.
11714
11715 * linux-low.c (can_hardware_single_step): New.
11716 (supports_breakpoints): New.
11717 (handle_extended_wait): If stopping threads, read the stop pc of
11718 the new cloned LWP.
11719 (get_pc): New.
11720 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11721 low target doesn't support retrieving the PC.
11722 (add_lwp): Set last_resume_kind to resume_continue.
11723 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11724 (linux_attach): Don't clear stop_expected. Set the lwp's
11725 last_resume_kind to resume_stop.
11726 (linux_detach_one_lwp): Don't check for removed breakpoints.
11727 (check_removed_breakpoint): Delete.
11728 (status_pending_p): Rename to ...
11729 (status_pending_p_callback): ... this. Don't check for removed
11730 breakpoints. Don't consider threads that are stopped from GDB's
11731 perspective.
11732 (linux_wait_for_lwp): Always read the stop_pc here.
11733 (cancel_breakpoint): New.
11734 (step_over_bkpt): New global.
11735 (linux_wait_for_event_1): Implement stepping over breakpoints.
11736 (gdb_wants_lwp_stopped): New.
11737 (gdb_wants_all_stopped): New.
11738 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11739 single-step traps here. Store the thread's last reported target
11740 wait status.
11741 (send_sigstop): Don't clear stop_expected. Always set it,
11742 instead.
11743 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11744 (cancel_finished_single_step): New.
11745 (cancel_finished_single_steps): New.
11746 (wait_for_sigstop): Don't cancel finished single-step traps here.
11747 (linux_resume_one_lwp): Don't check for removed breakpoints.
11748 Don't set `step' on non-hardware step archs.
11749 (linux_set_resume_request): Ignore resume_stop requests if already
11750 stopping or stopped. Set the lwp's last_resume_kind.
11751 (resume_status_pending_p): Don't check for removed breakpoints.
11752 (need_step_over_p): New.
11753 (start_step_over): New.
11754 (finish_step_over): New.
11755 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11756 requests. Clear the thread's last reported target waitstatus.
11757 Don't use the `suspended' flag. Don't consider pending breakpoints.
11758 (linux_resume): Start a step-over if necessary.
11759 (proceed_one_lwp): New.
11760 (proceed_all_lwps): New.
11761 (unstop_all_lwps): New.
11762 * linux-low.h (struct lwp_info): Rewrite comment for the
11763 `suspended' flag. Add the `stop_pc' field. Delete the
11764 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11765 Add `'last_resume_kind' and `need_step_over' fields.
11766 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11767 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11768 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11769 (set_raw_breakpoint_at): New.
11770 (set_breakpoint_at): Rewrite to use it.
11771 (reinsert_breakpoint_handler): Delete.
11772 (set_reinsert_breakpoint): New.
11773 (reinsert_breakpoint_by_bp): Delete.
11774 (delete_reinsert_breakpoints): New.
11775 (uninsert_breakpoint): Rewrite.
11776 (uninsert_breakpoints_at): New.
11777 (reinsert_breakpoint): Rewrite.
11778 (reinsert_breakpoints_at): New.
11779 (check_breakpoints): Rewrite.
11780 (breakpoint_here): New.
11781 (breakpoint_inserted_here): New.
11782 (check_mem_read): Adjust.
11783 * mem-break.h (breakpoints_supported, breakpoint_here)
11784 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11785 (reinsert_breakpoint_by_bp): Delete declaration.
11786 (delete_reinsert_breakpoints): Declare.
11787 (reinsert_breakpoint): Delete declaration.
11788 (reinsert_breakpoints_at): Declare.
11789 (uninsert_breakpoint): Delete declaration.
11790 (uninsert_breakpoints_at): Declare.
11791 (check_breakpoints): Adjust prototype.
11792 * server.h: Adjust include order.
11793 (struct thread_info): Declare here. Add a `last_status' field.
11794
11795 2010-03-23 Michael Snyder <msnyder@vmware.com>
11796
11797 * server.c (crc32): New function.
11798 (handle_query): Add handling for 'qCRC:' request.
11799
11800 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11801
11802 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11803 lwp had been stopped by a watchpoint.
11804
11805 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11806
11807 * server.h (internal_error): Declare.
11808 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11809 * utils.c (internal_error): New function.
11810
11811 2010-03-15 Andreas Schwab <schwab@redhat.com>
11812
11813 * configure.srv: Fix typo setting srv_regobj.
11814
11815 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11816
11817 * linux-low.c (fetch_register): Avoid passing a non string literal
11818 format to `error'.
11819 (usr_store_inferior_registers): Ditto.
11820
11821 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11822
11823 * linux-low.c (linux_write_memory): Bail out early if peeking
11824 memory failed.
11825
11826 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11827
11828 * linux-low.h (struct lwp_info): New fields
11829 `stopped_by_watchpoint' and `stopped_data_address'.
11830 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11831 here, and cache them in the lwp object.
11832 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11833 directly.
11834 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11835 field.
11836 (linux_stopped_by_watchpoint): Rewrite.
11837 (linux_stopped_data_address): Rewrite.
11838
11839 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11840
11841 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11842 switching the current inferior, not before.
11843
11844 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11845
11846 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11847 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11848 i386-linux.c and amd64-linux.c.
11849 (reg-i386.o): Removed.
11850 (reg-i386.c): Likewise.
11851 (reg-i386-linux.o): Likewise.
11852 (reg-i386-linux.c): Likewise.
11853 (reg-x86-64.o): Likewise.
11854 (reg-x86-64.c): Likewise.
11855 (reg-x86-64-linux.o): Likewise.
11856 (reg-x86-64-linux.c): Likewise.
11857 (i386.o): New.
11858 (i386.c): Likewise.
11859 (i386-linux.o): Likewise.
11860 (i386-linux.c): Likewise.
11861 (amd64.o): Likewise.
11862 (amd64.c): Likewise.
11863 (amd64-linux.o): Likewise.
11864 (amd64-linux.c): Likewise.
11865
11866 * configure.srv (srv_i386_regobj): New.
11867 (srv_i386_linux_regobj): Likewise.
11868 (srv_amd64_regobj): Likewise.
11869 (srv_amd64_linux_regobj): Likewise.
11870 (srv_i386_32bit_xmlfiles): Likewise.
11871 (srv_i386_64bit_xmlfiles): Likewise.
11872 (srv_i386_xmlfiles): Likewise.
11873 (srv_amd64_xmlfiles): Likewise.
11874 (srv_i386_linux_xmlfiles): Likewise.
11875 (srv_amd64_linux_xmlfiles): Likewise.
11876 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11877 srv_xmlfiles to $srv_i386_xmlfiles.
11878 (i[34567]86-*-mingw32ce*): Likewise.
11879 (i[34567]86-*-mingw*): Likewise.
11880 (i[34567]86-*-nto*): Likewise.
11881 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11882 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11883 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11884 (x86_64-*-linux*): Likewise.
11885
11886 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11887 (init_registers_amd64_linux): New.
11888 (x86_arch_setup): Replace init_registers_x86_64_linux with
11889 init_registers_amd64_linux.
11890
11891 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11892
11893 * configure.ac: Check for libdl. If it is not available link against
11894 static libthread_db.
11895 * configure: Regenerate.
11896
11897 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11898
11899 PR9605
11900
11901 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11902 handing a read watchpoint.
11903 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11904
11905 2010-02-12 Doug Evans <dje@google.com>
11906
11907 * linux-low.c (linux_supports_tracefork_flag): Document.
11908 (linux_look_up_symbols): Add comment.
11909
11910 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11911
11912 * regcache.c (supply_register): Clear regcache if buf is NULL.
11913
11914 2010-02-02 Nicolas Roche <roche@sourceware.org>
11915 Joel Brobecker <brobecker@adacore.com>
11916
11917 * inferiors.c (find_inferior): Add function documentation.
11918 (unloaded_dll): Handle the case where the unloaded dll has not
11919 been previously registered in the dll list.
11920
11921 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11922
11923 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11924 (thumb2_breakpoint): New.
11925 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11926
11927 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11928
11929 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11930 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11931 breakpoints.
11932
11933 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11934
11935 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11936
11937 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11938
11939 * linux-s390-low.c (s390_collect_ptrace_register)
11940 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11941
11942 2010-01-21 Doug Evans <dje@google.com>
11943
11944 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11945 (PTRACE_ARG4_TYPE): New macro.
11946 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11947 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11948 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11949 (usr_store_inferior_registers): Ditto.
11950 (linux_read_memory, linux_write_memory): Ditto.
11951 (linux_test_for_tracefork): Ditto.
11952
11953 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11954 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11955
11956 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11957
11958 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11959 target.
11960
11961 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11962
11963 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11964 prototype to take a regcache. Adjust.
11965
11966 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11967
11968 * regcache.h (struct thread_info): Forward declare.
11969 (struct regcache): New.
11970 (new_register_cache): Adjust prototype.
11971 (get_thread_regcache): Declare.
11972 (free_register_cache): Adjust prototype.
11973 (registers_to_string, registers_from_string): Ditto.
11974 (supply_register, supply_register_by_name, collect_register)
11975 (collect_register_as_string, collect_register_by_name): Ditto.
11976 * regcache.c (struct inferior_regcache_data): Delete.
11977 (get_regcache): Rename to ...
11978 (get_thread_regcache): ... this. Adjust. Switch inferior before
11979 fetching registers.
11980 (regcache_invalidate_one): Adjust.
11981 (regcache_invalidate): Fix prototype.
11982 (new_register_cache): Return the new register cache.
11983 (free_register_cache): Change prototype.
11984 (realloc_register_cache): Adjust.
11985 (registers_to_string): Change prototype to take a regcache. Adjust.
11986 (registers_from_string): Ditto.
11987 (register_data): Ditto.
11988 (supply_register): Ditto.
11989 (supply_register_by_name): Ditto.
11990 (collect_register): Ditto.
11991 (collect_register_as_string): Ditto.
11992 (collect_register_by_name): Ditto.
11993 * server.c (process_serial_event): Adjust.
11994 * linux-low.h (regset_fill_func, regset_store_func): Change
11995 prototype.
11996 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11997 Change prototype.
11998 * linux-low.c (get_stop_pc): Adjust.
11999 (check_removed_breakpoint): Adjust.
12000 (linux_wait_for_event): Adjust.
12001 (linux_resume_one_lwp): Adjust.
12002 (fetch_register): Add regcache parameter. Adjust.
12003 (usr_store_inferior_registers): Ditto.
12004 (regsets_fetch_inferior_registers): Ditto.
12005 (regsets_store_inferior_registers): Ditto.
12006 (linux_fetch_registers, linux_store_registers): Ditto.
12007 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12008 regcache. Adjust.
12009 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12010 Ditto.
12011 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12012 prototype to take a regcache.
12013 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12014 * remote-utils.c (convert_ascii_to_int, outreg)
12015 (prepare_resume_reply): Change prototype to take a regcache.
12016 Adjust.
12017 * target.h (struct target_ops) <fetch_registers, store_registers>:
12018 Change prototype to take a regcache.
12019 (fetch_inferior_registers, store_inferior_registers): Change
12020 prototype to take a regcache. Adjust.
12021 * proc-service.c (ps_lgetregs): Adjust.
12022 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12023 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12024 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12025 take a regcache. Adjust.
12026 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12027 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12028 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12029 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12030 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12031 (cris_cannot_fetch_register):
12032 (cris_breakpoint_at): Change prototype to take a regcache.
12033 Adjust.
12034 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12035 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12036 to take a regcache. Adjust.
12037 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12038 Adjust.
12039 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12040 take a regcache. Adjust.
12041 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12042 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12043 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12044 * linux-mips-low.c (mips_get_pc):
12045 (mips_set_pc): Change prototype to take a regcache. Adjust.
12046 (mips_reinsert_addr): Adjust.
12047 (mips_collect_register): Change prototype to take a regcache.
12048 Adjust.
12049 (mips_supply_register):
12050 (mips_collect_register_32bit, mips_supply_register_32bit)
12051 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12052 (mips_store_fpregset): Ditto.
12053 * linux-ppc-low.c (ppc_supply_ptrace_register)
12054 (ppc_supply_ptrace_register): Ditto.
12055 (parse_spufs_run): Adjust.
12056 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12057 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12058 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12059 take a regcache. Adjust.
12060 * linux-s390-low.c (s390_collect_ptrace_register)
12061 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12062 (s390_set_pc): Change prototype to take a regcache. Adjust.
12063 (s390_arch_setup): Adjust.
12064 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12065 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12066 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12067 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12068 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12069 regcache. Adjust.
12070 (sparc_breakpoint_at): Adjust.
12071 * linux-xtensa-low.c (xtensa_fill_gregset):
12072 (xtensa_store_gregset):
12073 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12074 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12075 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12076 prototype to take a regcache. Adjust.
12077 * win32-arm-low.c (arm_fetch_inferior_register)
12078 (arm_store_inferior_register): Change prototype to take a
12079 regcache. Adjust.
12080 * win32-i386-low.c (i386_fetch_inferior_register)
12081 (i386_store_inferior_register): Change prototype to take a
12082 regcache. Adjust.
12083 * win32-low.c (child_fetch_inferior_registers)
12084 (child_store_inferior_registers): Change prototype to take a
12085 regcache. Adjust.
12086 (win32_wait): Adjust.
12087 (win32_fetch_inferior_registers): Change prototype to take a
12088 regcache. Adjust.
12089 (win32_store_inferior_registers): Adjust.
12090 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12091 store_inferior_register>: Change prototype to take a regcache.
12092
12093 2010-01-20 Doug Evans <dje@google.com>
12094
12095 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12096 #ifdef.
12097 (linux_wait_for_event1, linux_init_signals): Ditto.
12098 (W_STOPCODE): Provide definition if missing.
12099
12100 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12101
12102 * linux-low.c (linux_core_of_thread): New.
12103 (compare_ints, show_process, list_threads): New.
12104 (linux_qxfer_osdata): Report threads and cores.
12105 (linux_target_op): Register linux_core_of_thread.
12106 * remote-utils.c (prepare_resume_reply): Report the core.
12107 (buffer_xml_printf): Support %d specifier.
12108 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12109 New.
12110 (handle_query): Handle qXfer:threads. Announce availability
12111 thereof.
12112 * target.h (struct target_ops): New field core_of_thread.
12113
12114 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12115
12116 * Makefile.in (clean): Remove new generated files.
12117 (reg-s390.o, reg-s390.c): Remove rules.
12118 (reg-s390x.o, reg-s390x.c): Likewise.
12119 (s390-linux32.o, s390-linux32.c): Add rules.
12120 (s390-linux64.o, s390-linux64.c): Likewise.
12121 (s390x-linux64.o, s390x-linux64.c): Likewise.
12122 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12123 * linux-s390-low.c: Include <elf.h>.
12124 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12125 (init_registers_s390): Remove prototype.
12126 (init_registers_s390x): Likewise.
12127 (init_registers_s390_linux32): Add prototype.
12128 (init_registers_s390_linux64): Likewise.
12129 (init_registers_s390x_linux64): Likewise.
12130 (s390_num_regs_3264): New define.
12131 (s390_regmap_3264): New global variable.
12132 (s390_cannot_fetch_register): Remove obsolete check.
12133 (s390_cannot_store_register): Likewise.
12134 (s390_collect_ptrace_register): Handle upper/lower register halves.
12135 (s390_supply_ptrace_register): Likewise.
12136 (s390_fill_gregset): Update to register number changes.
12137 (s390_get_hwcap): New routine.
12138 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12139 Install appropriate regmap and register set.
12140
12141 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12142
12143 * server.c (gdbserver_version): Update copyright year to 2010.
12144 * gdbreplay.c (gdbreplay_version): Likewise.
12145
12146 2009-12-28 Doug Evans <dje@google.com>
12147
12148 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12149 elf/external.h. Include <elf.h> instead but only if necessary.
12150
12151 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12152
12153 * linux-low.c (linux_remove_process): Remove `detaching'
12154 parameter. Don't release/detach from thread_db here.
12155 (linux_kill): Release/detach from thread_db here, ...
12156 (linux_detach): ... and here, before actually detaching.
12157 (linux_wait_1): ... and here, when a process exits.
12158 * thread-db.c (any_thread_of): New.
12159 (thread_db_free): Switch the current inferior to a thread of the
12160 passed in process.
12161
12162 2009-12-21 Doug Evans <dje@google.com>
12163
12164 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12165
12166 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12167 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12168 warning ifndef __NR_tkill. Move setting of errno there too.
12169 Delete unnecessary resetting of errno after syscall.
12170 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12171
12172 * configure.ac: Check for dladdr.
12173 * config.in: Regenerate.
12174 * configure: Regenerate.
12175 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12176 (try_thread_db_load): Update.
12177
12178 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12179
12180 2009-12-18 Doug Evans <dje@google.com>
12181
12182 * event-loop.c: Include unistd.h if it exists.
12183
12184 * linux-low.c (my_waitpid): Move definition away from being in
12185 between linux_tracefork_child/linux_test_for_tracefork.
12186
12187 * gdb_proc_service.h (psaddr_t): Fix type.
12188 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12189 signature to match glibc.
12190
12191 2009-12-16 Doug Evans <dje@google.com>
12192
12193 * linux-low.c (linux_read_memory): Fix argument to read.
12194
12195 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12196
12197 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12198 events, don't leave current_inferior pointing at null.
12199
12200 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12201
12202 * win32-low.c (LOG): Delete.
12203 (OUTMSG): Output to stderr.
12204 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12205 on compile time LOG macro.
12206 (win32_wait): Fix debug output.
12207
12208 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12209
12210 * win32-low.c (win32_add_one_solib): If the dll name is
12211 "ntdll.dll", prepend the system directory to the dll path.
12212
12213 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12214
12215 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12216
12217 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12218 Vladimir Prus <vladimir@codesourcery.com>
12219
12220 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12221 * configure.ac: Check for __mcoldfire__ and set
12222 gdb_cv_m68k_is_coldfire.
12223 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12224 reg-cf.o and reg-m68k.o.
12225 * configure: Regenerated.
12226
12227 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12228
12229 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12230 Pass it to thread_db_free.
12231 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12232 proper `detaching' argument to linux_remove_process.
12233 * linux-low.h (thread_db_free): Add `detaching' parameter.
12234 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12235 to thread_db_free.
12236 (thread_db_free): Add `detaching' parameter. Only
12237 call td_ta_clear_event if detaching from process.
12238
12239 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12240
12241 * thread-db.c (thread_db_free): Fix typo.
12242
12243 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12244
12245 PR gdb/10838
12246 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12247
12248 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12249
12250 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12251 with an i686 compiler.
12252 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12253 needed.
12254 * configure: Rebuilt.
12255
12256 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12257
12258 PR gdb/10783
12259
12260 * server.c (handle_search_memory_1): Correct read_addr initialization
12261 in loop for searching subsequent chunks.
12262
12263 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12264
12265 * configure.ac: New --with-libthread-db option.
12266 * thread-db.c: Allow direct dependence on libthread_db.
12267 (thread_db_free): Adjust.
12268 * config.in: Regenerate.
12269 * configure: Likewise.
12270
12271 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12272
12273 PR gdb/10757
12274 * thread-db.c (attach_thread): New function.
12275 (maybe_attach_thread): Return success/failure.
12276 (find_new_threads_callback): Adjust.
12277 (thread_db_find_new_threads): Loop until no new threads.
12278
12279 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12280
12281 * proc-service.c (ps_lgetregs): Formatting.
12282
12283 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12284
12285 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12286 * configure.ac: Adjust.
12287 * linux-low.h (struct process_info_private): Move members to struct
12288 thread_db.
12289 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12290 * linux-low.c (linux_remove_process): Adjust.
12291 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12292 * server.c (handle_query): Move code ...
12293 (handle_monitor_command): ... here. New function.
12294 * target.h (struct target_ops): New member.
12295 * thread-db.c (struct thread_db): New.
12296 (libthread_db_search_path): New variable.
12297 (thread_db_create_event, thread_db_enable_reporting)
12298 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12299 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12300 (try_thread_db_load_1, dladdr_to_soname): New functions.
12301 (try_thread_db_load, thread_db_load_search): New functions.
12302 (thread_db_init): Search for libthread_db.
12303 (thread_db_free): New function.
12304 (thread_db_handle_monitor_command): Likewise.
12305 * config.in: Regenerate.
12306 * configure: Regenerate.
12307
12308 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12309
12310 * spu-low.c (spu_kill): Wait for inferior to terminate.
12311 Call clear_inferiors.
12312 (spu_detach): Call clear_inferiors.
12313
12314 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12315
12316 * aclocal.m4: Regenerate.
12317 * config.in: Likewise.
12318 * configure: Likewise.
12319
12320 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12321
12322 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12323 (parse_spufs_run): New function.
12324 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12325 (ppc_breakpoint_at): Handle SPU breakpoints.
12326
12327 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12328
12329 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12330 (SPUFS_MAGIC): Define.
12331 (spu_enumerate_spu_ids): New function.
12332 (linux_qxfer_spu): New function.
12333 (linux_target_ops): Install linux_qxfer_spu.
12334
12335 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12336
12337 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12338 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12339 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12340 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12341 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12342 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12343 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12344 (init_registers_powerpc_cell32l): Add prototype.
12345 (init_registers_powerpc_cell64l): Likewise.
12346 (ppc_arch_setup): Detect Cell/B.E. architecture.
12347
12348 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12349
12350 * Makefile.in (datarootdir): New variable.
12351
12352 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12353
12354 * linux-low.c (linux_write_memory): Update debugging output.
12355 * Makefile.in (clean): Add new descriptions.
12356 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12357 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12358 * configure.srv: Add new files for arm*-*-linux*.
12359 * linux-arm-low.c: Add new declarations.
12360 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12361 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12362 (HWCAP_VFPv3D16): New.
12363 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12364 instead of __IWMMXT__.
12365 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12366 (arm_arch_setup): New.
12367 (target_regsets): Remove #ifdef. Add VFP regset.
12368 (the_low_target): Use arm_arch_setup.
12369
12370 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12371
12372 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12373 the main thread again.
12374
12375 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12376
12377 Adding Neutrino gdbserver.
12378 * configure: Regenerated.
12379 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12380 * configure.srv (i[34567]86-*-nto*): New target.
12381 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12382 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12383 (nto_comctrl) [__QNX__]: New function.
12384 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12385
12386 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12387
12388 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12389 srv_tgtobj.
12390
12391 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12392 Pedro Alves <pedro@codesourcery.com>
12393
12394 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12395 don't support CONTEXT_EXTENDED_REGISTERS.
12396 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12397 (the_low_target): Install them.
12398 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12399 failing with ERROR_PIPE_NOT_CONNECTED.
12400
12401 2009-06-30 Doug Evans <dje@google.com>
12402 Pierre Muller <muller@ics.u-strasbg.fr>
12403
12404 Add h/w watchpoint support to x86-linux, win32-i386.
12405 * Makefile.in (SFILES): Add i386-low.c
12406 (i386_low_h): Define.
12407 (i386-low.o): Add dependencies.
12408 (linux-x86-low.o): Add i386-low.h dependency.
12409 (win32-i386-low.o): Ditto.
12410 * i386-low.c: New file.
12411 * i386-low.h: New file.
12412 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12413 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12414 * linux-low.c (linux_add_process): Initialize arch_private.
12415 (linux_remove_process): Free arch_private.
12416 (add_lwp): Initialize arch_private.
12417 (delete_lwp): Free arch_private.
12418 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12419 provided.
12420 * linux-low.h (process_info_private): New member arch_private.
12421 (lwp_info): New member arch_private.
12422 (linux_target_ops): New members new_process, new_thread,
12423 prepare_to_resume.
12424 (ptid_of): New macro.
12425 * linux-x86-low.c: Include stddef.h, i386-low.h.
12426 (arch_process_info): New struct.
12427 (arch_lwp_info): New struct.
12428 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12429 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12430 (i386_dr_low_get_status): New function.
12431 (x86_insert_point, x86_remove_point): New functions.
12432 (x86_stopped_by_watchpoint): New function.
12433 (x86_stopped_data_address): New function.
12434 (x86_linux_new_process, x86_linux_new_thread): New functions.
12435 (x86_linux_prepare_to_resume): New function.
12436 (the_low_target): Add entries for insert_point, remove_point,
12437 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12438 prepare_to_resume.
12439 * server.c (debug_hw_points): New global.
12440 (monitor_show_help): Document set debug-hw-points.
12441 (handle_query): Process "set debug-hw-points".
12442 * server.h (debug_hw_points): Declare.
12443 (paddress): Declare.
12444 * utils.c (NUMCELLS, CELLSIZE): New macros.
12445 (get_sell, xsnprintf, paddress): New functions.
12446 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12447 remove_point, stopped_by_watchpoint, stopped_data_address.
12448 * win32-i386-low.c: Include i386-low.h.
12449 (debug_reg_state): Replaces dr.
12450 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12451 (i386_dr_low_get_status): New function.
12452 (i386_insert_point, i386_remove_point): New functions.
12453 (i386_stopped_by_watchpoint): New function.
12454 (i386_stopped_data_address): New function.
12455 (i386_initial_stuff): Update.
12456 (get_thread_context,set_thread_context,i386_thread_added): Update.
12457 (the_low_target): Add entries for insert_point,
12458 remove_point, stopped_by_watchpoint, stopped_data_address.
12459 * win32-low.c (win32_insert_watchpoint): New function.
12460 (win32_remove_watchpoint): New function.
12461 (win32_stopped_by_watchpoint): New function.
12462 (win32_stopped_data_address): New function.
12463 (win32_target_ops): Add entries for insert_watchpoint,
12464 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12465 * win32-low.h (win32_target_ops): New members insert_point,
12466 remove_point, stopped_by_watchpoint, stopped_data_address.
12467
12468 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12469
12470 * server.c (process_serial_event): Re-return unsupported, not
12471 error, if the type isn't recognized. Re-allow supporting only
12472 insert or remove packets. Also call require_running for
12473 breakpoints. Add missing break statement to default case. Tidy.
12474 * target.h (struct target_ops): Rename insert_watchpoint to
12475 insert_point, and remove_watchpoint to remove_point.
12476
12477 * linux-low.h (struct linux_target_ops): Likewise.
12478 * linux-low.c (linux_insert_watchpoint): Rename to ...
12479 (linux_insert_point): ... this. Adjust.
12480 (linux_remove_watchpoint): Rename to ...
12481 (linux_remove_point): ... this. Adjust.
12482 (linux_target_ops): Adjust.
12483 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12484 (cris_insert_point): ... this.
12485 (cris_remove_watchpoint): Rename to ...
12486 (cris_remove_point): ... this.
12487 (the_low_target): Adjust.
12488
12489 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12490
12491 * server.c (handle_v_kill): Pass signal_pid to
12492 kill_inferior if multi_process is zero.
12493
12494 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12495
12496 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12497 * target.h (target_ops): Comment for *_watchpoint to make it clear
12498 the functions can get types '0' and '1'.
12499
12500 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12501
12502 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12503 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12504 * regcache.c (get_regcache): Likewise.
12505 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12506 * win32-low.c (child_fetch_inferior_registers): Remove check for
12507 regno 0.
12508
12509 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12510 Pedro Alves <pedro@codesourcery.com>
12511
12512 * target.h (struct target_ops) <supports_multi_process>: New
12513 callback.
12514 (target_supports_multi_process): New.
12515 * server.c (handle_query): Even if GDB reports support, only
12516 enable multi-process if the target also supports it. Report
12517 multi-process support only if the target backend supports it.
12518 * linux-low.c (linux_supports_multi_process): New function.
12519 (linux_target_ops): Install it as target_supports_multi_process
12520 callback.
12521
12522 2009-05-24 Doug Evans <dje@google.com>
12523
12524 Global renaming of find_thread_pid to find_thread_ptid.
12525 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12526 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12527 All callers updated.
12528
12529 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12530 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12531 directly.
12532
12533 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12534 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12535 (linux_resume_one_lwp): Ditto.
12536
12537 2009-05-23 Doug Evans <dje@google.com>
12538
12539 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12540 from struct inferior_list_entry * to struct lwp_info *.
12541 All callers updated.
12542
12543 2009-05-13 Doug Evans <dje@google.com>
12544
12545 * linux-x86-low.c: Don't include assert.h.
12546 (x86_siginfo_fixup): Use fatal, not assert.
12547 (x86_arch_setup): Fix comment.
12548
12549 2009-05-12 Doug Evans <dje@google.com>
12550
12551 Biarch support for i386/amd64 gdbserver.
12552 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12553 Add linux-x86-low.c.
12554 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12555 (linux-x86-low.o): Add.
12556 * linux-x86-64-low.c: Delete.
12557 * linux-i386-low.c: Delete.
12558 * linux-x86-low.c: New file.
12559 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12560 linux-x86-low.o.
12561 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12562 linux-x86-low.o.
12563 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12564 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12565 (linux_child_pid_to_exec_file): New function.
12566 (elf_64_header_p, elf_64_file_p): New functions.
12567 (siginfo_fixup): New function.
12568 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12569 give target a chance to convert layout.
12570 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12571 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12572
12573 2009-05-07 Doug Evans <dje@google.com>
12574
12575 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12576 (regsets_store_inferior_registers): Ditto.
12577
12578 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12579
12580 PR server/10048
12581
12582 * linux-low.c (must_set_ptrace_flags): Delete.
12583 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12584 of the global.
12585 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12586 `lwp->must_set_ptrace_flags' instead.
12587 (linux_wait_for_event_1): Set ptrace options here.
12588 (linux_wait_1): ... not here.
12589
12590 2009-04-30 Doug Evans <dje@google.com>
12591
12592 * inferiors.c (started_inferior_callback): New function.
12593 (attached_inferior_callback): New function.
12594 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12595 * server.c (print_started_pid, print_attached_pid): New functions.
12596 (detach_or_kill_for_exit): New function.
12597 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12598 * server.h (have_started_inferiors_p): Declare.
12599 (have_attached_inferiors_p): Declare.
12600
12601 * inferiors.c (remove_process): Fix memory leak, free process.
12602 * linux-low.c (linux_remove_process): New function.
12603 (linux_kill): Call it instead of remove_process.
12604 (linux_detach, linux_wait_1): Ditto.
12605
12606 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12607
12608 * configure.srv: Add x86 Windows CE target.
12609
12610 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12611
12612 * inferiors.c (get_thread_process): Make global.
12613 * server.h (get_thread_process): Add prototype.
12614 * thread-db.c (find_one_thread): Use get_thread_process
12615 instead of current_process.
12616 (thread_db_get_tls_address): Do not crash if called when
12617 thread layer is not yet initialized.
12618
12619 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12620
12621 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12622 * spu-low.c (current_tid): Rename to ...
12623 (current_ptid): ... this.
12624 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12625 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12626 ptid_get_lwp (current_ptid) instead of current_tid.
12627 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12628 instead of current_tid. Use find_process_pid to verify pid
12629 argument is valid. Pass proper argument to remove_process.
12630 (spu_thread_alive): Compare current_ptid instead of current_tid.
12631 (spu_resume): Likewise.
12632
12633 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12634
12635 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12636 variable.
12637
12638 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12639
12640 Implement the multiprocess extensions, and add linux multiprocess
12641 support.
12642
12643 * server.h (ULONGEST): Declare.
12644 (struct ptid, ptid_t): New.
12645 (minus_one_ptid, null_ptid): Declare.
12646 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12647 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12648 (struct inferior_list_entry): Change `id' type from unsigned from
12649 to ptid_t.
12650 (struct sym_cache, struct breakpoint, struct
12651 process_info_private): Forward declare.
12652 (struct process_info): Declare.
12653 (current_process): Declare.
12654 (all_processes): Declare.
12655 (initialize_inferiors): Declare.
12656 (add_thread): Adjust to use ptid_t.
12657 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12658 (add_process, remove_process, find_thread_pid): Declare.
12659 (find_inferior_id): Adjust to use ptid_t.
12660 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12661 (multi_process): Declare.
12662 (push_event): Adjust to use ptid_t.
12663 (read_ptid, write_ptid): Declare.
12664 (prepare_resume_reply): Adjust to use ptid_t.
12665 (clear_symbol_cache): Declare.
12666 * inferiors.c (all_processes): New.
12667 (null_ptid, minus_one_ptid): New.
12668 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12669 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12670 (add_thread): Change unsigned long to ptid. Remove gdb_id
12671 parameter. Adjust.
12672 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12673 (gdb_id_to_thread): Rename to ...
12674 (find_thread_pid): ... this. Change unsigned long to ptid.
12675 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12676 (loaded_dll, pull_pid_from_list): Adjust.
12677 (add_process, remove_process, find_process_pid)
12678 (get_thread_process, current_process, initialize_inferiors): New.
12679 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12680 (struct target_waitstatus) <related_pid>: Ditto.
12681 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12682 return type to int.
12683 (struct target_ops) <join>: Add `pid' argument.
12684 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12685 (struct target_ops) <wait>: Add `ptid' field. Change return type
12686 to ptid.
12687 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12688 (mywait): Add `ptid' argument. Change return type to ptid_t.
12689 (target_pid_to_str): Declare.
12690 * target.c (set_desired_inferior): Adjust to use ptids.
12691 (mywait): Add new `ptid' argument. Adjust.
12692 (target_pid_to_str): New.
12693 * mem-break.h (free_all_breakpoints): Declare.
12694 * mem-break.c (breakpoints): Delelete.
12695 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12696 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12697 to use per-process breakpoint list.
12698 (free_all_breakpoints): New.
12699 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12700 (symbol_cache, all_symbols_looked_up): Delete.
12701 (hexchars): New.
12702 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12703 read_ptid): New.
12704 (prepare_resume_reply): Change ptid argument's type from unsigned
12705 long to ptid_t. Adjust. Implement W;process and X;process.
12706 (free_sym_cache, clear_symbol_cache): New.
12707 (look_up_one_symbol): Adjust to per-process symbol cache. *
12708 * server.c (cont_thread, general_thread, step_thread): Change type
12709 to ptid_t.
12710 (attached): Delete.
12711 (multi_process): New.
12712 (last_ptid): Change type to ptid_t.
12713 (struct vstop_notif) <ptid>: Change type to ptid_t.
12714 (queue_stop_reply, push_event): Change `ptid' argument's type to
12715 ptid_t.
12716 (discard_queued_stop_replies): Add `pid' argument.
12717 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12718 changes. Don't reference the `attached' global.
12719 (attach_inferior): Adjust to mywait interface changes.
12720 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12721 features. Handle and report "multiprocess+". Handle
12722 "qAttached:PID".
12723 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12724 changes.
12725 (handle_v_kill): New.
12726 (handle_v_stopped): Adjust to use target_pid_to_str.
12727 (handle_v_requests): Allow multiple attaches and runs when
12728 multiprocess extensions are in effect. Handle "vKill".
12729 (myresume): Adjust to use ptids.
12730 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12731 (handle_status): Adjust to discard_queued_stop_replies interface
12732 change.
12733 (first_thread_of, kill_inferior_callback)
12734 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12735 (main): Call initialize_inferiors. Adjust to use ptids, killing
12736 and detaching from all inferiors. Handle multiprocess packet
12737 variants.
12738 * linux-low.h: Include gdb_proc_service.h.
12739 (struct process_info_private): New.
12740 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12741 <lwpid_of>: Use ptid_get_lwp.
12742 (get_lwp_thread): Adjust.
12743 (struct lwp_info): Add `dead' member.
12744 (find_lwp_pid): Declare.
12745 * linux-low.c (thread_db_active): Delete.
12746 (new_inferior): Adjust comment.
12747 (inferior_pid): Delete.
12748 (linux_add_process): New.
12749 (handle_extended_wait): Adjust.
12750 (add_lwp): Change unsigned long to ptid.
12751 (linux_create_inferior): Add process to processes table. Adjust
12752 to use ptids. Don't set new_inferior here.
12753 (linux_attach_lwp): Rename to ...
12754 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12755 it. Adjust to use ptids.
12756 (linux_attach_lwp): New.
12757 (linux_attach): Add process to processes table. Don't set
12758 new_inferior here.
12759 (struct counter): New.
12760 (second_thread_of_pid_p, last_thread_of_process_p): New.
12761 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12762 multiple processes.
12763 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12764 processes. Remove process from process table.
12765 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12766 to multiple processes.
12767 (any_thread_of): New.
12768 (linux_detach): Add `pid' argument, and handle it. Remove process
12769 from processes table.
12770 (linux_join): Add `pid' argument. Handle it.
12771 (linux_thread_alive): Change unsighed long argument to ptid_t.
12772 Consider dead lwps as not being alive.
12773 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12774 threads we're not interested in.
12775 (same_lwp, find_lwp_pid): New.
12776 (linux_wait_for_lwp): Change `pid' argument's type from int to
12777 ptid_t. Adjust.
12778 (linux_wait_for_event): Rename to ...
12779 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12780 from int to ptid_t. Adjust.
12781 (linux_wait_for_event): New.
12782 (linux_wait_1): Add `ptid' argument. Change return type to
12783 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12784 that exit from the process table.
12785 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12786 Adjust.
12787 (mark_lwp_dead): New.
12788 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12789 stopping all threads, mark its main lwp as dead.
12790 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12791 ptids.
12792 (fetch_register, usr_store_inferior_registers)
12793 (regsets_fetch_inferior_registers)
12794 (regsets_store_inferior_registers, linux_read_memory)
12795 (linux_write_memory): Inline `inferior_pid'.
12796 (linux_look_up_symbols): Adjust to use per-process
12797 `thread_db_active'.
12798 (linux_request_interrupt): Adjust to use ptids.
12799 (linux_read_auxv): Inline `inferior_pid'.
12800 (initialize_low): Don't reference thread_db_active.
12801 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12802 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12803 (ps_getpid): Return the pid of the current inferior.
12804 * thread-db.c (proc_handle, thread_agent): Delete.
12805 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12806 per-process data.
12807 (find_one_thread): Change argument type to ptid_t. Adjust to
12808 per-process data.
12809 (maybe_attach_thread): Adjust to per-process data and ptids.
12810 (thread_db_find_new_threads): Ditto.
12811 (thread_db_init): Ditto.
12812 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12813 processes table. Adjust to use ptids.
12814 (spu_kill, spu_detach): Adjust interface. Remove process from
12815 processes table.
12816 (spu_join, spu_thread_alive): Adjust interface.
12817 (spu_wait): Adjust interface. Remove process from processes
12818 table. Adjust to use ptids.
12819 * win32-low.c (current_inferior_tid): Delete.
12820 (current_inferior_ptid): New.
12821 (debug_event_ptid): New.
12822 (thread_rec): Take a ptid. Adjust.
12823 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12824 (child_delete_thread): Ditto.
12825 (do_initial_child_stuff): Add `attached' argument. Add process to
12826 processes table.
12827 (child_fetch_inferior_registers, child_store_inferior_registers):
12828 Adjust.
12829 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12830 (win32_attach): Pass 1 to do_initial_child_stuff.
12831 (win32_kill): Adjust interface. Remove process from processes
12832 table.
12833 (win32_detach): Ditto.
12834 (win32_join): Adjust interface.
12835 (win32_thread_alive): Take a ptid.
12836 (win32_resume): Adjust to use ptids.
12837 (get_child_debug_event): Ditto.
12838 (win32_wait): Adjust interface. Remove exiting process from
12839 processes table.
12840
12841 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12842
12843 Non-stop mode support.
12844
12845 * server.h (non_stop): Declare.
12846 (gdb_client_data, handler_func): Declare.
12847 (delete_file_handler, add_file_handler, start_event_loop):
12848 Declare.
12849 (handle_serial_event, handle_target_event, push_event)
12850 (putpkt_notif): Declare.
12851 * target.h (enum resume_kind): New.
12852 (struct thread_resume): Replace `step' field by `kind' field.
12853 (TARGET_WNOHANG): Define.
12854 (struct target_ops) <wait>: Add `options' argument.
12855 <supports_non_stop, async, start_non_stop>: New fields.
12856 (target_supports_non_stop, target_async): New.
12857 (start_non_stop): Declare.
12858 (mywait): Add `options' argument.
12859 * target.c (mywait): Add `options' argument. Print child exit
12860 notifications here.
12861 (start_non_stop): New.
12862 * server.c (non_stop, own_buf, mem_buf): New globals.
12863 (struct vstop_notif): New.
12864 (notif_queue): New global.
12865 (queue_stop_reply, push_event, discard_queued_stop_replies)
12866 (send_next_stop_reply): New.
12867 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12868 interface changes.
12869 (attach_inferior): In non-stop mode, don't wait for the target
12870 here.
12871 (handle_general_set): Handle QNonStop.
12872 (handle_query): When handling qC, return the current general
12873 thread, instead of the first thread of the list.
12874 (handle_query): If the backend supports non-stop mode, include
12875 QNonStop+ in the qSupported query response.
12876 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12877 and non-stop mode.
12878 (handle_v_attach, handle_v_run): Handle non-stop mode.
12879 (handle_v_stopped): New.
12880 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12881 (myresume): Adjust to use resume_kind. Handle non-stop.
12882 (queue_stop_reply_callback): New.
12883 (handle_status): Handle non-stop mode.
12884 (main): Clear non_stop flag on reconnection. Use the event-loop.
12885 Refactor serial protocol handling from here ...
12886 (process_serial_event): ... to this new function. When GDB
12887 selects any thread, select one here. In non-stop mode, wait until
12888 GDB acks all pending events before exiting.
12889 (handle_serial_event, handle_target_event): New.
12890 * remote-utils.c (remote_open): Install remote_desc in the event
12891 loop.
12892 (remote_close): Remove remote_desc from the event loop.
12893 (putpkt_binary): Rename to...
12894 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12895 (putpkt_binary): New as wrapper around putpkt_binary_1.
12896 (putpkt_notif): New.
12897 (prepare_resume_reply): In non-stop mode, don't change the
12898 general_thread.
12899 * event-loop.c: New.
12900 * Makefile.in (OBJ): Add event-loop.o.
12901 (event-loop.o): New rule.
12902
12903 * linux-low.h (pid_of): Moved here.
12904 (lwpid_of): New.
12905 (get_lwp_thread): Use lwpid_of.
12906 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12907 * linux-low.c (pid_of): Delete.
12908 (inferior_pid): Use lwpid_of.
12909 (linux_event_pipe): New.
12910 (target_is_async_p): New.
12911 (delete_lwp): New.
12912 (handle_extended_wait): Use lwpid_of.
12913 (add_lwp): Don't set lwpid field.
12914 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12915 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12916 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12917 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12918 first. Adjust to linux_wait_for_event interface changes. Use
12919 lwpid_of.
12920 (linux_detach): Don't delete the main lwp here.
12921 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12922 (status_pending_p): Don't consider explicitly suspended lwps.
12923 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12924 pointer. Add OPTIONS argument. Change return type to int. Use
12925 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12926 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12927 pointer. Add status pointer argument. Return a pid instead of a
12928 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12929 changes. In non-stop mode, don't switch to a random thread.
12930 (linux_wait): Rename to...
12931 (linux_wait_1): ... this. Add target_options argument, and handle
12932 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12933 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12934 clean exit and signal exit code. Don't stop all threads in
12935 non-stop mode. In all-stop mode, only stop all threads when
12936 reporting a stop to GDB. Handle explicit thread stop requests.
12937 (async_file_flush, async_file_mark): New.
12938 (linux_wait): New.
12939 (send_sigstop): Use lwpid_of.
12940 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12941 interface changes. In non-stop mode, don't switch to a random
12942 thread.
12943 (linux_resume_one_lwp): Use lwpid_of.
12944 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12945 (linux_resume_one_thread): ... this. Handle resume_stop. In
12946 non-stop mode, don't look for pending flag in all threads.
12947 (resume_status_pending_p): Don't consider explicitly suspended
12948 threads.
12949 (my_waitpid): Reimplement. Emulate __WALL.
12950 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12951 Use lwpid_of.
12952 (sigchld_handler, linux_supports_non_stop, linux_async)
12953 (linux_start_non_stop): New.
12954 (linux_target_ops): Register linux_supports_non_stop, linux_async
12955 and linux_start_non_stop.
12956 (initialize_low): Install SIGCHLD handler.
12957 * thread-db.c (thread_db_create_event, find_one_thread)
12958 (thread_db_get_tls_address): Use lwpid_of.
12959 * win32-low.c (win32_detach): Adjust to use resume_kind.
12960 (win32_wait): Add `options' argument.
12961 * spu-low.c (spu_resume): Adjust to use resume_kind.
12962 (spu_wait): Add `options' argument.
12963
12964 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12965
12966 Decouple target code from remote protocol.
12967
12968 * target.h (enum target_waitkind): New.
12969 (struct target_waitstatus): New.
12970 (struct target_ops) <wait>: Return an unsigned long. Take a
12971 target_waitstatus pointer instead of a char pointer.
12972 (mywait): Likewise.
12973 * target.c (mywait): Change prototype to return an unsigned long.
12974 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12975 * server.h (thread_from_wait, old_thread_from_wait): Delete
12976 declarations.
12977 (prepare_resume_reply): Change prototype to take a
12978 target_waitstatus.
12979 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12980 (last_status, last_ptid): New.
12981 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12982 pid instead of a signal.
12983 (attach_inferior): Remove "status" and "signal" parameters.
12984 Adjust.
12985 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12986 not as an address.
12987 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12988 (handle_v_requests, myresume): Remove "status" and "signal"
12989 parameters. Adjust.
12990 (handle_status): New.
12991 (main): Delete local `status'. Adjust.
12992 * remote-utils.c: Include target.h.
12993 (prepare_resume_reply): Change prototype to take a
12994 target_waitstatus. Adjust.
12995
12996 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12997 interface.
12998 * spu-low.c (spu_wait): Adjust.
12999 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13000 Delete.
13001 (win32_wait): Adjust.
13002
13003 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13004
13005 * target.h (struct thread_resume): Delete leave_stopped member.
13006 (struct target_ops): Add a `n' argument to the `resume' callback.
13007 * server.c (start_inferior): Adjust.
13008 (handle_v_cont, myresume): Adjust.
13009 * linux-low.c (check_removed_breakpoint): Adjust to resume
13010 interface change, and to removed leave_stopped field.
13011 (resume_ptr): Delete.
13012 (struct thread_resume_array): New.
13013 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13014 resume interface change.
13015 (linux_continue_one_thread, linux_queue_one_thread)
13016 (resume_status_pending_p): Check if the resume field is NULL
13017 instead of checking the leave_stopped member.
13018 (linux_resume): Adjust to the target resume interface change.
13019 * spu-low.c (spu_resume): Adjust to the target resume interface
13020 change.
13021 * win32-low.c (win32_detach, win32_resume): Ditto.
13022
13023 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13024
13025 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13026 flag.
13027 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13028 pending.
13029 (linux_continue_one_thread): Only preserve the stepping flag if
13030 there's a pending breakpoint.
13031
13032 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13033
13034 * server.c (main): After the inferior having exited, call
13035 remote_close before exiting gdbserver.
13036
13037 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13038
13039 Fix size of FPSCR in Power 7 processors.
13040 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13041 (PPC_FEATURE_HAS_DFP): New #define.
13042 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13043 size of the FPSCR.
13044
13045 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13046
13047 * server.c (handle_query) Whitespace and formatting.
13048
13049 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13050
13051 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13052 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13053 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13054 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13055 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13056 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13057 Makefile.in, configure.ac: Fix whitespace throughout.
13058 * configure: Regenerate.
13059
13060 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13061
13062 * inferiors.c (find_inferior): Make it safe for the callback
13063 function to delete the currently iterated inferior.
13064
13065 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13066
13067 * Makefile.in (linuw_low_h): Move higher.
13068 (thread-db.o): Depend on $(linux_low_h).
13069
13070 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13071
13072 Rename "process" to "lwp" throughout.
13073
13074 * linux-low.c (all_processes): Rename to...
13075 (all_lwps): ... this.
13076 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13077 (add_process): Rename to ...
13078 (add_lwp): ... this. Adjust.
13079 (linux_create_inferior): Adjust.
13080 (linux_attach_lwp): Adjust.
13081 (linux_attach): Adjust.
13082 (linux_kill_one_process): Rename to ...
13083 (linux_kill_one_lwp): ... this. Adjust.
13084 (linux_kill): Adjust.
13085 (linux_detach_one_process): Rename to ...
13086 (linux_detach_one_lwp): ... this. Adjust.
13087 (linux_detach): Adjust.
13088 (check_removed_breakpoint): Adjust.
13089 (status_pending_p): Adjust.
13090 (linux_wait_for_process): Rename to ...
13091 (linux_wait_for_lwp): ... this. Adjust.
13092 (linux_wait_for_event): Adjust.
13093 (send_sigstop): Adjust.
13094 (wait_for_sigstop): Adjust.
13095 (stop_all_processes): Rename to ...
13096 (stop_all_lwps): ... this.
13097 (linux_resume_one_process): Rename to ...
13098 (linux_resume_one_lwp): ... this. Adjust.
13099 (linux_set_resume_request, linux_continue_one_thread)
13100 (linux_queue_one_thread, resume_status_pending_p)
13101 (usr_store_inferior_registers, regsets_store_inferior_registers)
13102 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13103 Adjust.
13104 * linux-low.h (get_process): Rename to ...
13105 (get_lwp): ... this. Adjust.
13106 (get_thread_process): Rename to ...
13107 (get_thread_lwp): ... this. Adjust.
13108 (get_process_thread): Rename to ...
13109 (get_lwp_thread): ... this. Adjust.
13110 (struct process_info): Rename to ...
13111 (struct lwp_info): ... this.
13112 (all_processes): Rename to ...
13113 (all_lwps): ... this.
13114 * proc-service.c (ps_lgetregs): Adjust.
13115 * thread-db.c (thread_db_create_event, find_one_thread)
13116 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13117
13118 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13119
13120 * server.c (handle_query): Handle "qAttached".
13121
13122 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13123
13124 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13125 GPLv3, update license URL.
13126
13127 2009-03-01 Doug Evans <dje@google.com>
13128
13129 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13130 (server_h): Add gdb_signals.h.
13131 (signals.o): Update.
13132 * server.h (target_signal_from_host,target_signal_to_host_p)
13133 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13134
13135 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13136
13137 * remote-utils.c (getpkt): Also generate remote-debug
13138 information if noack_mode is set.
13139
13140 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13141
13142 * server.c (handle_query): Report qXfer:siginfo:read and
13143 qXfer:siginfo:write as supported and handle them.
13144 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13145 * linux-low.c (linux_xfer_siginfo): New.
13146 (linux_target_ops): Set it.
13147
13148 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13149
13150 * server.c (gdbserver_usage): Mention --remote-debug.
13151 (main): Accept '--remote-debug' switch.
13152
13153 2009-01-18 Doug Evans <dje@google.com>
13154
13155 * regcache.c (new_register_cache): No need to check result of xcalloc.
13156 * server.c (handle_search_memory): Back out calls to xmalloc,
13157 result is checked and error is returned to user upon failure.
13158 (handle_query): Ditto. Add more checks for result of malloc.
13159 (handle_v_cont): Check result of malloc, report error back to
13160 user upon failure.
13161 (handle_v_run): Ditto. Call freeargv.
13162 * server.h (freeargv): Declare.
13163 * utils.c (freeargv): New fn.
13164
13165 2009-01-15 Doug Evans <dje@google.com>
13166
13167 * gdbreplay.c (perror_with_name): Make arg const char *.
13168 * server.h (target_signal_to_name): Make return type const char *.
13169 * thread-db.c (thread_db_err_str): Make return type const char *.
13170 * utils.c (perror_with_name): Make arg const char *.
13171
13172 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13173
13174 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13175 when handling a EXIT_PROCESS_DEBUG_EVENT.
13176
13177 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13178
13179 * gdbreplay.c (gdbreplay_version): Update copyright year.
13180 * server.c (gdbserver_version): Likewise.
13181
13182 2009-01-05 Doug Evans <dje@google.com>
13183
13184 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13185 (handle_extended_wait): Improve comment.
13186
13187 2008-12-13 Doug Evans <dje@google.com>
13188
13189 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13190 * server.h (ATTR_MALLOC): New macro.
13191 (xmalloc,xcalloc,xstrdup): Declare.
13192 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13193 * inferiors.c: Ditto.
13194 * linux-low.c: Ditto.
13195 * mem-break.c: Ditto.
13196 * regcache.c: Ditto.
13197 * remote-utils.c: Ditto.
13198 * server.c: Ditto.
13199 * target.c: Ditto.
13200 * win32-low.c: Ditto.
13201
13202 2008-12-12 Doug Evans <dje@google.com>
13203
13204 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13205 in debugging printf.
13206
13207 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13208
13209 2008-12-09 Doug Evans <dje@google.com>
13210
13211 * linux-low.h (struct process_info): Delete member tid, unused.
13212 * thread-db.c (find_one_thread): Update.
13213 (maybe_attach_thread): Update.
13214
13215 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13216
13217 * target.h (struct target_ops): Add qxfer_osdata member.
13218 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13219 and dirent.h.
13220 (linux_qxfer_osdata): New functions.
13221 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13222 callback.
13223 * server.c (handle_query): Handle "qXfer:osdata:read:".
13224 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13225 (buffer_xml_printf): New functions.
13226 * server.h (struct buffer): New.
13227 (buffer_grow_str, buffer_grow_str0): New macros.
13228 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13229 (buffer_xml_printf): Declare.
13230
13231 2008-11-24 Doug Evans <dje@google.com>
13232
13233 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13234
13235 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * server.c (handle_v_run): Always use the supplied argument list.
13238
13239 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13240
13241 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13242 (xtensa_regmap_table): Add entry for scompare1.
13243
13244 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13245
13246 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13247 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13248 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13249 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13250 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13251 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13252 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13253 XML target descriptions.
13254 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13255 when inferior is running on an ISA 2.05 or later processor. Add
13256 special case to return offset for full 64-bit slot of FPSCR when
13257 in 32-bits.
13258
13259 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13260
13261 * Makefile.in (SFILES, clean): Added sparc64 files.
13262 (reg-sparc64.o, reg-sparc64.c): New.
13263 * configure.srv (sparc*-*-linux*): New configuration.
13264 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13265 syscall arguments for SPARC.
13266 (regsets_store_inferior_registers): Likewise.
13267 * linux-sparc-low.c: New file.
13268
13269 2008-10-21 Doug Evans <dje@google.com>
13270
13271 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13272 (READLINE_DIR,READLINE_DEP): Delete.
13273 (INTERNAL_CFLAGS): Update.
13274 (LINTFLAGS): Update.
13275
13276 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13277
13278 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13279 whole argv from the last run, not just argv[0].
13280
13281 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13282
13283 * regcache.c (new_register_cache): Return NULL if the register
13284 cache size isn't known yet.
13285 (free_register_cache): Avoid dereferencing a NULL regcache.
13286
13287 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13288
13289 * configure.srv: Merge MIPS and MIPS64.
13290
13291 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13292
13293 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13294
13295 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13296
13297 * Makefile.in: Add required vsx dependencies.
13298
13299 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13300 Declare init_registers_powerpc_vsx32l.
13301 Declare init_registers_powerpc_vsx64l.
13302 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13303 (ppc_arch_setup): Check for VSX in hwcap.
13304 (ppc_fill_vsxregset): New function.
13305 (ppc_store_vsxregset): New function.
13306 Add new VSX entry in regset_info target_regsets.
13307
13308 * configure.srv: Add new VSX dependencies.
13309
13310 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13311
13312 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13313 (remote_open): Set or clear transport_is_reliable.
13314 (putpkt_binary): Don't expect acks in noack mode.
13315 (getpkt): Don't send ack/nac in noack mode.
13316 * server.c (handle_general_set): Handle QStartNoAckMode.
13317 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13318 qSupported.
13319 (main): Reset noack_mode on every connection.
13320 * server.h (noack_mode): Declare.
13321
13322 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13323
13324 * Makefile.in (GDBREPLAY_OBS): New variable.
13325 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13326
13327 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13328 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13331 (usr_store_inferior_registers): Likewise.
13332 (regsets_store_inferior_registers): Likewise.
13333
13334 2008-07-31 Rolf Jansen <rj@surtec.com>
13335 Pedro Alves <pedro@codesourcery.com>
13336
13337 * configure.ac: Check for memmem declaration.
13338 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13339 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13340 (disable_packet_qfThreadInfo): Unconditionally compile.
13341 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13342 * configure, config.in: Regenerate.
13343
13344 2008-07-28 Doug Kwan <dougkwan@google.com>
13345
13346 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13347 (linux_write_memory): Remove declaration of errno.
13348
13349 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13350
13351 * linux-low.c (handle_extended_wait): Do not use "status"
13352 variable uninitialized.
13353
13354 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13355
13356 * server.c (handle_v_attach): Inhibit reporting dll changes.
13357
13358 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13359
13360 * remote-utils.c (prepare_resume_reply): If requested, don't
13361 output "thread:TID" in the T stop reply.
13362
13363 * server.c (disable_packet_vCont, disable_packet_Tthread)
13364 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13365 (handle_query): If requested, disable support for qC, qfThreadInfo
13366 and qsThreadInfo.
13367 (handle_v_requests): If requested, disable support for vCont.
13368 (gdbserver_show_disableable): New.
13369 (main): Handle --disable-packet and --disable-packet=LIST.
13370
13371 * server.h (disable_packet_vCont, disable_packet_Tthread)
13372 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13373
13374 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13375
13376 * server.c (gdbserver_usage): Mention --version.
13377
13378 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13379
13380 * Makefile.in (gdbreplay.o): New rule.
13381
13382 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13383
13384 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13385 message, not gdbserver.
13386
13387 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13388 Nathan Sidwell <nathan@codesourcery.com>
13389 Joseph Myers <joseph@codesourcery.com>
13390
13391 * acinclude.m4: Include ../../config/acx.m4.
13392 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13393 * configure, config.in: Regenerate.
13394 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13395 * server.c (gdbserver_version): Print PKGVERSION.
13396 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13397 (main): Adjust gdbserver_usage calls.
13398 * gdbreplay.c (version, host_name): Add declarations.
13399 (gdbreplay_version, gdbreplay_usage): New.
13400 (main): Accept --version and --help options.
13401
13402 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13403
13404 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13405 (arm_breakpoint_at): Handle Thumb.
13406 (the_low_target): Add comment.
13407
13408 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13409
13410 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13411
13412 2008-05-09 Doug Evans <dje@google.com>
13413
13414 * server.h (decode_search_memory_packet): Declare.
13415 * remote-utils.c (decode_search_memory_packet): New fn.
13416 * server.c (handle_search_memory_1): New fn.
13417 (handle_search_memory): New fn.
13418 (handle_query): Process qSearch:memory packets.
13419
13420 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13421
13422 * regcache.c (registers_length): Remove.
13423 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13424 full register packet.
13425 * regcache.h (registers_length): Remove prototype.
13426 * server.h (PBUFSIZ): Define to 16384.
13427
13428 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13429
13430 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13431 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13432 powerpc-64l.o, and powerpc-altivec64l.o.
13433 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13434 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13435 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13436 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13437 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13438 to srv_xmlfiles.
13439
13440 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13441 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13442 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13443 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13444 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13445 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13446 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13447 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13448 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13449 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13450 (clean): Update.
13451
13452 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13453 (init_registers_powerpc_32l): ... this new prototype.
13454 (init_registers_powerpc_32): Remove, replace by ...
13455 (init_registers_powerpc_altivec32l): ... this new prototype.
13456 (init_registers_powerpc_e500): Remove, replace by ...
13457 (init_registers_powerpc_e500l): ... this new prototype.
13458 (init_registers_ppc64): Remove, replace by ...
13459 (init_registers_powerpc_64l): ... this new prototype.
13460 (init_registers_powerpc_64): Remove, replace by ...
13461 (init_registers_powerpc_altivec64l): ... this new prototype.
13462 (ppc_num_regs): Set to 73.
13463 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13464 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13465 (ppc_cannot_store_register): Handle orig_r3 and trap.
13466 (ppc_arch_setup): Update init_registers_... calls.
13467 (ppc_fill_gregset): Handle orig_r3 and trap.
13468
13469 * inferiors.c (clear_inferiors): Reset current_inferior.
13470
13471 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13472
13473 * acinclude.m4: Add override.m4.
13474 * configure: Regenerate.
13475
13476 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13477
13478 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13479 initial call to init_register_ppc64.
13480
13481 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13482
13483 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13484 single powerpc*-*-linux* case.
13485 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13486
13487 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13488
13489 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13490 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13491 from reg_xmlfiles.
13492 * linux-ppc-low.c: Include <elf.h>.
13493 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13494 (ppc_hwcap): New global variable.
13495 (ppc_regmap): Remove __SPE__ #ifdef sections.
13496 (ppc_regmap_e500): New global variable.
13497 (ppc_cannot_store_register): Update __SPE__ special case.
13498 (ppc_get_hwcap): New function.
13499 (ppc_arch_setup): Use it to determine whether inferior supports
13500 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13501 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13502 Do not access registers if target does not support AltiVec.
13503 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13504 Do not access registers if target does not support SPE.
13505 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13506
13507 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13508
13509 * linux-low.c (disabled_regsets, num_regsets): New.
13510 (use_regsets_p): Delete.
13511 (linux_wait_for_process): Clear disabled_regsets.
13512 (regsets_fetch_inferior_registers): Check and set it.
13513 (regsets_store_inferior_registers): Likewise.
13514 (linux_fetch_registers, linux_store_registers): Do not use
13515 use_regsets_p.
13516 (initialize_low): Allocate disabled_regsets.
13517
13518 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13519
13520 * Makefile.in (LIBOBJS): New.
13521 (OBS): Use LIBOBJS.
13522 (memmem.o): New rule.
13523 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13524 * configure: Regenerated.
13525
13526 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13527
13528 * server.c (handle_query): Never return "unsupported" for
13529 qXfer:features:read queries.
13530
13531 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13532
13533 * server.c (get_features_xml): Fix inverted condition.
13534 (handle_query): Always support qXfer:feature:read.
13535
13536 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * server.c (wrapper_argv): New.
13539 (start_inferior): Handle wrapper_argv. If set, expect an extra
13540 trap.
13541 (gdbserver_usage): Document --wrapper.
13542 (main): Parse --wrapper.
13543
13544 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13545
13546 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13547 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13548 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13549 (ppc_set_pc): Likewise.
13550 (ppc_arch_setup): New function.
13551 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13552 of collect_register.
13553 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13554
13555 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13556
13557 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13558 instead of linux-ppc64-low.o.
13559 * linux-ppc64-low.c: Remove file.
13560 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13561 (linux-ppc64-low.o): Remove rule.
13562
13563 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13564 (init_registers_powerpc_64): Likewise.
13565 (ppc_regmap): Conditionally define depending on __powerpc64__.
13566 (ppc_cannot_store_register): Do not special-case "fpscr" when
13567 compiled on __powerpc64__.
13568 (ppc_collect_ptrace_register): New function.
13569 (ppc_supply_ptrace_register): New function.
13570 (ppc_breakpoint): Change type to "unsigned int".
13571 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13572 (the_low_target): Conditionally provide initializers for the
13573 arch_setup member depending on __powerpc64__. Install
13574 collect_ptrace_register and supply_ptrace_register members.
13575
13576 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13577
13578 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13579 * server.c (gdbserver_xmltarget): Define.
13580 (get_features_xml): Use it to replace "target.xml" and arch_string.
13581
13582 * configure.srv: Remove srv_xmltarget. Add XML files that were
13583 mentioned there to srv_xmlfiles instead. Remove conditional tests
13584 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13585 srv_xmlfiles and srv_regobj to include all possible choices.
13586 * configure.ac (srv_xmltarget): Remove.
13587 (srv_xmlfiles): Do not add "target.xml".
13588 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13589 checks for supplementary target information.
13590 * configure: Regenerate.
13591 * Makefile.in (XML_TARGET): Remove.
13592 (target.xml): Remove rule.
13593 (clean): Do not clean up target.xml.
13594 (.PRECIOUS): Do not mention target.xml.
13595
13596 * target.h (struct target_ops): Remove arch_string member.
13597 * linux-low.c (linux_arch_string): Remove.
13598 (linux_target_ops): Remove arch_string initializer.
13599 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13600 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13601 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13602 * spu-low.c (spu_arch_string): Remove.
13603 (spu_target_ops): Remove arch_string initializer.
13604 * win32-low.c (win32_arch_string): Remove.
13605 (win32_target_ops): Remove arch_string initializer.
13606 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13607 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13608 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13609
13610 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13611
13612 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13613 by collect_ptrace_register and supply_ptrace_register hooks.
13614 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13615 instead of checking for the_low_target.left_pad_xfer.
13616 (usr_store_inferior_registers): Use collect_ptrace_register callback
13617 instead of checking for the_low_target.left_pad_xfer.
13618
13619 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13620 (s390_supply_ptrace_register): Likewise.
13621 (s390_fill_gregset): Call s390_collect_ptrace_register.
13622 (the_low_target): Update.
13623
13624 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13625 (ppc_supply_ptrace_register): Likewise.
13626 (the_low_target): Update.
13627
13628 * linux-i386-low.c (the_low_target): Update.
13629 * linux-x86-64-low.c (the_low_target): Update.
13630
13631 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13632
13633 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13634 reg-s390.o and reg-s390x.o.
13635
13636 * linux-low.c (new_inferior): New global variable.
13637 (linux_create_inferior, linux_attach): Set it.
13638 (linux_wait_for_process): Call the_low_target.arch_setup after the
13639 target has stopped for the first time.
13640 (initialize_low): Do not call the_low_target.arch_setup.
13641
13642 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13643 (s390_set_pc): Likewise.
13644 (s390_arch_setup): New function.
13645 (the_low_target): Use s390_arch_setup as arch_setup routine.
13646
13647 * regcache.c (realloc_register_cache): New function.
13648 (set_register_cache): Call it for each existing regcache.
13649
13650 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13651
13652 * server.h (init_registers): Remove prototype.
13653
13654 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13655 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13656 instead of init_registers ().
13657 * linux-arm-low.c (init_registers_arm): Add prototype.
13658 (init_registers_arm_with_iwmmxt): Likewise.
13659 (the_low_target): Add initializer for arch_setup field.
13660 * linux-cris-low.c (init_registers_cris): Add prototype.
13661 (the_low_target): Add initializer for arch_setup field.
13662 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13663 (the_low_target): Add initializer for arch_setup field.
13664 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13665 (the_low_target): Add initializer for arch_setup field.
13666 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13667 (the_low_target): Add initializer for arch_setup field.
13668 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13669 (the_low_target): Add initializer for arch_setup field.
13670 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13671 (the_low_target): Add initializer for arch_setup field.
13672 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13673 (init_registers_mips64_linux): Likewise.
13674 (the_low_target): Add initializer for arch_setup field.
13675 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13676 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13677 (the_low_target): Add initializer for arch_setup field.
13678 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13679 (init_registers_powerpc_64): Likewise.
13680 (the_low_target): Add initializer for arch_setup field.
13681 * linux-s390-low.c (init_registers_s390): Add prototype.
13682 (init_registers_s390x): Likewise.
13683 (the_low_target): Add initializer for arch_setup field.
13684 * linux-sh-low.c (init_registers_sh): Add prototype.
13685 (the_low_target): Add initializer for arch_setup field.
13686 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13687 (the_low_target): Add initializer for arch_setup field.
13688 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13689 (the_low_target): Add initializer for arch_setup field.
13690
13691 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13692 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13693 instead of init_registers ().
13694 * win32-arm-low.c (init_registers_arm): Add prototype.
13695 (the_low_target): Add initializer for arch_setup field.
13696 * win32-i386-low.c (init_registers_i386): Add prototype.
13697 (the_low_target): Add initializer for arch_setup field.
13698
13699 * spu-low.c (init_registers_spu): Add prototype.
13700 (initialize_low): Call initialie_registers_spu () instead of
13701 initialize_registers ().
13702
13703 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13704
13705 * server.c (handle_v_requests): When handling the vRun and vAttach
13706 packets, if already debugging a process, don't kill it. Return an
13707 error instead.
13708
13709 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13710
13711 * server.c (handle_query): Correct length check.
13712
13713 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13714
13715 * win32-low.c (do_initial_child_stuff): Add process handle
13716 parameter. Set current_process_handle and current_process_id from the
13717 parameters. Clear globals.
13718 (win32_create_inferior): Don't set current_process_handle and
13719 current_process_id here. Instead pass them on the call to
13720 do_initial_child_stuff.
13721 (win32_attach): Likewise.
13722 (win32_clear_inferiors): New.
13723 (win32_kill): Don't close the current process handle or the
13724 current thread handle here. Instead call win32_clear_inferiors.
13725 (win32_detach): Don't open a new handle to the process. Call
13726 win32_clear_inferiors.
13727 (win32_join): Don't rely on current_process_handle; open a new
13728 handle using the process id.
13729 (win32_wait): Call win32_clear_inferiors when the inferior process
13730 has exited.
13731
13732 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13733
13734 * server.c (monitor_show_help): Add "exit".
13735
13736 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13737
13738 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13739 (clean): Add reg-xtensa.c.
13740 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13741 * configure.srv (xtensa*-*-linux*) New target.
13742 * linux-xtensa-low.c: New.
13743 * xtensa-xtregs.c: New.
13744
13745 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13746
13747 * hostio.c: Don't include errno.h.
13748 (errno_to_fileio_errno): Move to hostio-errno.
13749 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13750 error number outputting to the target->hostio_last_error callback.
13751 (hostio_packet_error): Use FILEIO_EINVAL directly.
13752 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13753 calls to hostio_error.
13754 * hostio-errno.c: New.
13755 * server.h (hostio_last_error_from_errno): Declare.
13756 * target.h (target_ops): Add hostio_last_error member.
13757 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13758 as hostio_last_error handler.
13759 * spu-low.c (spu_target_ops): Likewise.
13760 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13761 (wince_hostio_last_error): New functions.
13762 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13763 as hostio_last_error handler.
13764 (win32_target_ops) [!_WIN32_WCE]: Register
13765 hostio_last_error_from_errno as hostio_last_error handler.
13766 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13767 (hostio-errno.o): New rule.
13768 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13769 * configure.srv (srv_hostio_err_objs): New variable. Default to
13770 hostio-errno.o.
13771 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13772 * configure: Regenerate.
13773
13774 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13775
13776 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13777 (linux_kill, linux_detach): Clean up the process list.
13778 * remote-utils.c (remote_open): Improve port number parsing.
13779 (putpkt_binary, input_interrupt): Only send interrupts if the target
13780 is running.
13781 * server.c (extended_protocol): Make static.
13782 (attached): Define earlier.
13783 (exit_requested, response_needed, program_argv): New variables.
13784 (target_running): New.
13785 (start_inferior): Clear attached here.
13786 (attach_inferior): Set attached here.
13787 (require_running): Define.
13788 (handle_query): Use require_running and target_running. Implement
13789 "monitor exit".
13790 (handle_v_attach, handle_v_run): New.
13791 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13792 (gdbserver_usage): Update.
13793 (main): Redo argument parsing. Handle --debug and --multi. Handle
13794 --attach along with other options or after the port. Save
13795 program_argv. Support no initial program. Resynchronize
13796 communication with GDB after an error. Handle "monitor exit".
13797 Use require_running and target_running. Always allow the extended
13798 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13799 restart in extended mode.
13800 * README: Refer to the GDB manual. Update --attach usage.
13801
13802 2007-12-20 Andreas Schwab <schwab@suse.de>
13803
13804 * linux-low.c (STACK_SIZE): Define.
13805 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13806 (linux_test_for_tracefork): Likewise.
13807
13808 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13809
13810 * linux-low.c (linux_wait_for_event): Update messages. Do not
13811 reinsert auto-delete breakpoints.
13812 * mem-break.c (struct breakpoint): Change return type of handler to
13813 int.
13814 (set_breakpoint_at): Update handler type.
13815 (reinsert_breakpoint_handler): Return 1 instead of calling
13816 delete_breakpoint.
13817 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13818 setting a new one.
13819 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13820 * mem-break.h (set_breakpoint_at): Update handler type.
13821 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13822 * win32-low.c (auto_delete_breakpoint): New.
13823 (get_child_debug_event): Use it.
13824
13825 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13826
13827 * configure.ac: Check for pread and pwrite.
13828 * hostio.c (handle_pread): Fall back to lseek and read.
13829 (handle_pwrite): Fall back to lseek and write.
13830 * config.in, configure: Regenerated.
13831
13832 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13833
13834 * server.c (myresume): Add own_buf argument.
13835 (main): Update calls.
13836
13837 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13840 * remote-utils.c (remote_open): Do not call disable_async_io.
13841 (block_async_io): Delete.
13842 (unblock_async_io): Make static.
13843 (initialize_async_io): New.
13844 * server.c (handle_v_cont): Handle async I/O here.
13845 (myresume): Likewise. Move other common resume tasks here...
13846 (main): ... from here. Call initialize_async_io. Disable async
13847 I/O before the main loop.
13848 * server.h (initialize_async_io): Declare.
13849 (block_async_io, unblock_async_io): Delete prototypes.
13850 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13851
13852 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13853
13854 * remote-utils.c (readchar): Allow binary data in received messages.
13855
13856 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13857
13858 * win32-low.c (attaching): New global.
13859 (win32_create_inferior): Clear the `attaching' global.
13860 (win32_attach): Set the `attaching' global.
13861 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13862 attaching. Only set a breakpoint at the entry point if not
13863 attaching.
13864
13865 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13866
13867 * server.c (main): Don't report dll events on the initial
13868 connection on attaches.
13869
13870 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13871
13872 * server.c (main): Relax numerical bases supported for the pid of
13873 the --attach command line argument.
13874
13875 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13876
13877 * win32-low.c (win32_attach): Call OpenProcess before
13878 DebugActiveProcess, not after. Add last error output to error
13879 call.
13880
13881 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13882
13883 * win32-low.c (win32_get_thread_context)
13884 (win32_set_thread_context): New functions.
13885 (thread_rec): Use win32_get_thread_context.
13886 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13887 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13888 field.
13889
13890 2007-12-03 Leo Zayas
13891 Pedro Alves <pedro_alves@portugalmail.pt>
13892
13893 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13894 global variables.
13895 (child_add_thread): Minor cleanup.
13896 (child_continue): Resume artificially suspended threads before
13897 calling ContinueDebugEvent.
13898 (suspend_one_thread): New.
13899 (fake_breakpoint_event): New.
13900 (get_child_debug_event): Change return type to int. Check here if
13901 gdb sent an interrupt request. If a soft interrupt was requested,
13902 fake a breakpoint event. Return 0 if there is no event to handle,
13903 and 1 otherwise.
13904 (win32_wait): Don't check here if gdb sent an interrupt request.
13905 Ensure there is a valid event to handle.
13906 (win32_request_interrupt): Add soft interruption method as last
13907 resort.
13908
13909 2007-12-03 Leo Zayas
13910 Pedro Alves <pedro_alves@portugalmail.pt>
13911
13912 * win32-low.h (win32_thread_info): Add descriptions to the
13913 structure members. Replace `suspend_count' counter by a
13914 `suspended' flag.
13915 * win32-low.c (thread_rec): Update condition of when to get the
13916 context from the inferior. Rely on ContextFlags being set if it
13917 has already been retrieved. Only suspend the inferior thread if
13918 we haven't already. Warn if that fails.
13919 (continue_one_thread): s/suspend_count/suspended/. Only call
13920 ResumeThread once. Warn if that fails.
13921
13922 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13923
13924 * win32-low.c (win32_wait): Don't read from the inferior when it
13925 has already exited.
13926
13927 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13928
13929 * Makefile.in (win32_low_h): New variable.
13930 (win32-low.o): Add dependency on $(win32_low_h).
13931 (win32-arm-low.o, win32-i386-low.o): New rules.
13932
13933 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13934
13935 * hostio.c: Correct copyright year.
13936
13937 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13938
13939 * Makefile.in (OBS): Add hostio.o.
13940 (hostio.o): New rule.
13941 * server.h (handle_vFile): Declare.
13942 * hostio.c: New file.
13943 * server.c (handle_v_requests): Take packet_len and new_packet_len
13944 for binary packets. Call handle_vFile.
13945 (main): Update call to handle_v_requests.
13946
13947 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13948
13949 * linux-low.c: Include <sched.h>.
13950
13951 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13952
13953 * linux-low.c (linux_tracefork_grandchild): New.
13954 (linux_tracefork_child): Use clone.
13955 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13956
13957 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13958
13959 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13960
13961 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13964
13965 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * inferiors.c (change_inferior_id): Delete.
13968 (add_pid_to_list, pull_pid_from_list): New.
13969 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13970 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13971 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13972 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13973 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13974 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13975 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13976 (using_threads): Always set to 1.
13977 (handle_extended_wait): New.
13978 (add_process): Do not set TID.
13979 (linux_create_inferior): Set must_set_ptrace_flags.
13980 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13981 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13982 (linux_thread_alive): Rename TID argument to LWPID.
13983 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13984 (linux_wait_for_event): Do not use TID or check using_threads. Update
13985 call to dead_thread_notify. Call handle_extended_wait.
13986 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13987 (send_sigstop): Delete sigstop_sent.
13988 (wait_for_sigstop): Avoid TID.
13989 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13990 (linux_test_for_tracefork): New.
13991 (linux_lookup_signals): Use thread_db_active and
13992 linux_supports_tracefork_flag.
13993 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13994 * linux-low.h (get_process_thread): Avoid TID.
13995 (struct process_ifo): Move thread_known and tid to the end. Remove
13996 sigstop_sent.
13997 (linux_attach_lwp, thread_db_init): Update prototypes.
13998 * server.h (change_inferior_id): Delete prototype.
13999 (add_pid_to_list, pull_pid_from_list): New prototypes.
14000 * thread-db.c (thread_db_use_events): New.
14001 (find_first_thread): Rename to...
14002 (find_one_thread): ...this. Update callers and messages. Do not
14003 call fatal. Check thread_db_use_events. Do not call
14004 change_inferior_id or new_thread_notify.
14005 (maybe_attach_thread): Update. Do not call new_thread_notify.
14006 (thread_db_init): Set thread_db_use_events. Check use_events.
14007 * utils.c (fatal, warning): Correct message prefix.
14008
14009 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14010
14011 * Makefile.in (clean): Remove new files.
14012 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14013 (powerpc-64.o, powerpc-64.c): New rules.
14014 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14015 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14016 with SPE.
14017 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14018 SPE targets.
14019 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14020 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14021 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14022 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14023 (target_regsets): Add AltiVec and SPE register sets.
14024 * configure.ac: Check for AltiVec and SPE.
14025 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14026 (ppc_fill_vrregset, ppc_store_vrregset): New.
14027 (target_regsets): Add AltiVec register set.
14028 * configure: Regenerated.
14029
14030 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14031
14032 * linux-low.c (O_LARGEFILE): Define.
14033 (linux_read_memory): Use /proc/PID/mem.
14034 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14035 * configure, config.in: Regenerated.
14036
14037 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14038
14039 * linux-low.c (linux_wait_for_event): Do not pass signals while
14040 single-stepping.
14041
14042 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14043
14044 * win32-low.c (create_process): New.
14045 (win32_create_inferior): Use create_process instead of
14046 CreateProcess. If create_process failed retry appending an ".exe"
14047 suffix. Store the GetLastError result immediatelly after
14048 create_process calls and use it on the call to error.
14049
14050 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14051
14052 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14053
14054 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14055
14056 * configure.ac: Switch license to GPLv3.
14057
14058 2007-08-01 Michael Snyder <msnyder@access-company.com>
14059
14060 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14061
14062 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14063
14064 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14065 typedef.
14066 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14067 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14068 CloseToolhelp32Snapshot.
14069 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14070 CloseToolhelp32Snapshot.
14071
14072 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14073
14074 * server.c (main): Check for inferior exit before main loop.
14075
14076 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14077
14078 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14079 instead of on tmp_desc.
14080
14081 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14082 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14085 (add_thread): Minor cleanups.
14086 (clear_inferiors): Move lower in the file. Clear the DLL
14087 list.
14088 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14089 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14090 (xml_escape_text): New.
14091 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14092 for qSupported.
14093 (handle_v_cont): Report errors.
14094 (gdbserver_version): Update.
14095 (main): Correct size of own_buf. Do not report initial DLL events.
14096 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14097 (unloaded_dll, xml_escape_text): New.
14098 * win32-low.c (enum target_waitkind): Update comments.
14099 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14100 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14101 (win32_EnumProcessModules, win32_GetModuleInformation)
14102 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14103 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14104 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14105 (win32_Module32First, win32_Module32Next, load_toolhelp)
14106 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14107 (get_child_debug_event): Handle DLL events.
14108 (win32_wait): Likewise.
14109
14110 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14111
14112 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14113 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14114
14115 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14116
14117 * win32-low.c (handle_output_debug_string): Ignore event if not
14118 waiting.
14119
14120 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14121
14122 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14123
14124 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14125
14126 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14127
14128 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * inferiors.c (change_inferior_id): Add comment.
14131 * linux-low.c (check_removed_breakpoint): Add an early
14132 prototype. Improve debug output.
14133 (linux_attach): Doc update.
14134 (linux_detach_one_process, linux_detach): Clean up before releasing
14135 each process.
14136 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14137 * linux-low.h (struct process_info): Doc improvement.
14138 * mem-break.c (delete_all_breakpoints): New.
14139 * mem-break.h (delete_all_breakpoints): New prototype.
14140 * thread-db.c (find_first_thread): New.
14141 (thread_db_create_event): Call it instead of
14142 thread_db_find_new_threads. Clean up unused variables.
14143 (maybe_attach_thread): Remove first thread handling.
14144 (thread_db_find_new_threads): Use find_first_thread.
14145 (thread_db_get_tls_address): Likewise.
14146
14147 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * thread-db.c (thread_db_find_new_threads): Add prototype.
14150 (thread_db_create_event): Check for the main thread before adding
14151 a new thread.
14152 (maybe_attach_thread): Only enable event reporting if TID == 0.
14153 (thread_db_get_tls_address): Check for new threads.
14154
14155 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14156
14157 * linux-low.c (linux_create_inferior): Try execv before execvp.
14158 * spu-low.c (spu_create_inferior): Likewise.
14159
14160 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14161
14162 * linux-low.c (linux_create_inferior): Change execv to execvp.
14163 * spu-low.c (spu_create_inferior): Likewies.
14164
14165 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * Makefile.in (clean): Clean new files instead of deleted ones.
14168 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14169 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14170 rules.
14171 * configure.srv: Specify XML files and new regformats for MIPS and
14172 MIPS64 GNU/Linux.
14173 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14174 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14175 an entry for the restart register.
14176 (mips_cannot_fetch_register, mips_cannot_store_register)
14177 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14178 register names to match the XML descriptions.
14179 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14180 restart register instead of $0.
14181
14182 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14183 Markus Deuling <deuling@de.ibm.com>
14184
14185 * remote-utils.c (decode_xfer_write): New function.
14186 * server.h (decode_xfer_write): Add prototype.
14187 * server.c (handle_query): Add PACKET_LEN argument. Support
14188 qXfer:spu:read and qXfer:spu:write packets.
14189 (main): Pass packet_len to handle_query.
14190 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14191 * target.h (target_ops): Add qxfer_spu.
14192
14193 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14194
14195 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14196 accessing non-seekable spufs files.
14197
14198 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14199
14200 * server.c (handle_query): Add reply for qC packet.
14201
14202 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14203 Leo Zayas <lerele@champenstudios@com>
14204
14205 * server.h (check_remote_input_interrupt_request): New function.
14206 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14207 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14208 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14209 (check_remote_input_interrupt_request): New function.
14210 * server.h (check_remote_input_interrupt_request): Declare.
14211 * win32-low.c (winapi_DebugBreakProcess,
14212 winapi_GenerateConsoleCtrlEvent): New typedefs.
14213 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14214 to 250 ms.
14215 (win32_wait): Check for remote interrupt request
14216 with check_remote_input_interrupt_request.
14217 (win32_request_interrupt): New function.
14218 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14219
14220 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14221
14222 * win32-low.c (debug_registers_changed,
14223 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14224 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14225 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14226 (thread_rec): Get context using the low target.
14227 (child_add_thread): Call thread_added on the low target,
14228 which does the same thing.
14229 (regptr): Delete.
14230 (do_initial_child_stuff): Remove debug registers references.
14231 Set context using the low target. Resume threads after
14232 setting the contexts.
14233 (child_continue): Remove dead variable. Remove debug
14234 registers references.
14235 (child_fetch_inferior_registers): Go through the low target.
14236 (do_child_store_inferior_registers): Remove.
14237 (child_store_inferior_registers): Go through the low target.
14238 (win32_resume): Remove debug registers references.
14239 Set context using the low target.
14240 (handle_exception): Change return type to void. Don't record
14241 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14242 first chance exception.
14243 (get_child_debug_event): Change return type to void. Remove
14244 goto loop. Always return after waiting for debug event.
14245 (win32_wait): Convert to switch statement. Handle spurious
14246 events.
14247
14248 * win32-i386-low.c (debug_registers_changed,
14249 debug_registers_used): New.
14250 (initial_stuff): Rename to ...
14251 (i386_initial_stuff): ... this. Clear debug registers
14252 state variables.
14253 (store_debug_registers): Delete.
14254 (i386_get_thread_context): New.
14255 (load_debug_registers): Delete.
14256 (i386_set_thread_context): New.
14257 (i386_thread_added): New.
14258 (single_step): Rename to ...
14259 (i386_single_step): ... this.
14260 (do_fetch_inferior_registers): Rename to ...
14261 (i386_fetch_inferior_register): ... this.
14262 (i386_store_inferior_register): New.
14263 (the_low_target): Adapt to new interface.
14264
14265 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14266 (arm_get_thread_context): New.
14267 (arm_set_thread_context): New.
14268 (regptr): New.
14269 (do_fetch_inferior_registers): Rename to ...
14270 (arm_fetch_inferior_register): ... this.
14271 (arm_store_inferior_register): New.
14272 (arm_wince_breakpoint): Reimplement as unsigned long.
14273 (arm_wince_breakpoint_len): Define.
14274 (the_low_target): Adapt to new interface.
14275
14276 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14277 load_debug_registers. Add get_thread_context, set_thread_context,
14278 thread_added and store_inferior_register. Rename
14279 fetch_inferior_registers to fetch_inferior_register.
14280 (regptr): Remove declaration.
14281
14282 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14283
14284 * linux-low.c (linux_detach): Change return type to int. Return 0.
14285 * spu-low.c (spu_detach): Likewise.
14286
14287 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14288
14289 * target.h (target_ops): Change return type of detach to int.
14290 Add join.
14291 (join_inferior): New.
14292 * server.c (main): Don't skip detach support on mingw32.
14293 If the inferior doesn't support detaching return error.
14294 Call join_inferior instead of using waitpid.
14295 * linux-low.c (linux_join): New.
14296 (linux_target_op): Add linux_join.
14297 * spu-low.c (spu_join): New.
14298 (spu_target_ops): Add spu_join.
14299 * win32-low.c (win32_detach): Adapt to new interface.
14300 Reopen current_process_handle before detaching. Issue a child
14301 resume before detaching.
14302 (win32_join): New.
14303 (win32_target_op): Add win32_join.
14304
14305 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14306
14307 * win32-low.c (win32-attach): Fix return value.
14308 * target.h (target_ops): Describe ATTACH return values.
14309
14310 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14311
14312 * win32-low.c (GETPROCADDRESS): Define.
14313 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14314 (winapi_DebugSetProcessKillOnExit): Likewise.
14315 (win32_create_inferior): Force usage of ansi CreateProcessA.
14316 (win32_attach): Use GETPROCADDRESS.
14317 (win32_detach): Likewise.
14318
14319 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14320
14321 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14322
14323 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14324
14325 * win32-low.c: Commit leftover changes from 2007-03-29.
14326
14327 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14328
14329 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14330 fields short instead of int. Add explicit padding.
14331 (i387_cache_to_fsave): Remove unnecessary casts.
14332 (i387_fsave_to_cache): Doc fix.
14333 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14334
14335 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14336
14337 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14338 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14339
14340 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14341
14342 * configure.srv (arm*-*-mingw32ce*): Move near the other
14343 arm targets.
14344
14345 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14346
14347 * configure.ac: Add errno checking.
14348 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14349 sys/file.h and malloc.h.
14350 (AC_CHECK_DECLS): Add perror.
14351 (srv_mingwce): Handle.
14352 * configure.srv (i[34567]86-*-cygwin*): Add
14353 win32-i386-low.o to srv_tgtobj.
14354 (i[34567]86-*-mingw*): Likewise.
14355 (arm*-*-mingw32ce*): Add case.
14356 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14357 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14358 [__MINGW32CE__] (strerror): New function.
14359 [__MINGW32CE__] (errno): Define to GetLastError.
14360 [__MINGW32CE__] (COUNTOF): New macro.
14361 (remote_open): Remove extra close call.
14362 * mem-break.c (delete_breakpoint_at): New function.
14363 * mem-break.h (delete_breakpoint_at): Declare.
14364 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14365 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14366 [USE_WIN32API] (read, write): Add char* casts.
14367 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14368 * server.h: Include wincecompat.h on Windows CE.
14369 [HAVE_ERRNO_H]: Check.
14370 (perror): Declare if not declared.
14371 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14372 (perror_with_name): Remove errno declaration.
14373 * wincecompat.h: New.
14374 * wincecompat.c: New.
14375 * win32-low.h: New.
14376 * win32-arm-low.c: New.
14377 * win32-i386-low.c: New.
14378 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14379 (OUTMSG2): Make it safe.
14380 (_T): New macro.
14381 (COUNTOF): New macro.
14382 (NUM_REGS): Get it from the low target.
14383 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14384 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14385 (thread_rec): Let low target handle debug registers.
14386 (child_add_thread): Likewise.
14387 (child_init_thread_list): Likewise.
14388 (continue_one_thread): Likewise.
14389 (regptr): New.
14390 (do_child_fetch_inferior_registers): Move to ...
14391 * win32-i386-low.c: ... here, and rename to ...
14392 (do_fetch_inferior_registers): ... this.
14393 * win32-low.c (child_fetch_inferior_registers):
14394 Go through the low target.
14395 (do_child_store_inferior_registers): Use regptr.
14396 (strwinerror): New function.
14397 (win32_create_inferior): Handle Windows CE.
14398 Use strwinerror instead of strerror on Windows error
14399 codes. Add program to the error output.
14400 Don't close the main thread handle on Windows CE.
14401 (win32_attach): Use coredll.dll on Windows CE.
14402 (win32_kill): Close current process and current
14403 thread handles.
14404 (win32_detach): Use coredll.dll on Windows CE.
14405 (win32_resume): Let low target handle debug registers, and
14406 step request.
14407 (handle_exception): Add/Remove initial breakpoint. Avoid
14408 non-existant WSTOPSIG on Windows CE.
14409 (win32_read_inferior_memory): Cast to remove warning.
14410 (win32_arch_string): Go through the low target.
14411 (initialize_low): Call set_breakpoint_data with the low
14412 target's breakpoint.
14413 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14414 FOP_REGNUM, mappings): Move to ...
14415 * win32-i386-low.c: ... here.
14416 * win32-low.c (win32_thread_info): Move to ...
14417 * win32-low.h: ... here.
14418 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14419 win32-arm-low.c and wincecompat.c.
14420 (all:): Add $EXEEXT.
14421 (install-only:): Likewise.
14422 (gdbserver:): Likewise.
14423 (gdbreplay:): Likewise.
14424 * config.in: Regenerate.
14425 * configure: Regenerate.
14426
14427 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14428
14429 * win32-low.c: Rename typedef thread_info to
14430 win32_thread_info throughout.
14431
14432 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14433
14434 * win32-i386-low.c: Rename to ...
14435 * win32-low.c: ... this.
14436 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14437 * Makefile.in: Likewise.
14438
14439 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14440
14441 * remote-utils.c (monitor_output): Constify msg parameter.
14442 * server.h (monitor_output): Likewise.
14443 * win32-i386-low.c (handle_output_debug_string): New.
14444 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14445 handle_output_debug_string.
14446 (get_child_debug_event): Likewise.
14447
14448 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14449
14450 * server.c (main): Correct strtoul check.
14451
14452 2007-03-27 Jon Ringle <jon@ringle.org>
14453
14454 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14455
14456 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14457
14458 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14459
14460 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14461
14462 * terminal.h: Check HAVE_SGTTY_H.
14463
14464 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14465
14466 * remote-utils.c (remote_open): Print out the assigned port number.
14467
14468 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14469
14470 * remote-utils.c (monitor_output): New function.
14471 * server.c (debug_threads): Define here.
14472 (monitor_show_help): New function.
14473 (handle_query): Handle qRcmd.
14474 (main): Do not handle 'd' packet.
14475 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14476 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14477 of debug_threads.
14478
14479 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14480
14481 * Makefile.in (EXEEXT): New.
14482 (clean): Use $(EXEEXT).
14483
14484 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14485
14486 * target.h (target_ops): Rename send_signal to request_interrupt,
14487 and remove enum target_signal parameter.
14488 * linux-low.c (linux_request_interrupt): Rename from
14489 linux_send_signal, and always send SIGINT.
14490 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14491 and always send SIGINT.
14492 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14493 of send_signal.
14494 (input_interrupt): Likewise.
14495
14496 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14497
14498 * server.c (get_features_xml): Check if target implemented
14499 arch_string.
14500 * win32-i386-low.c (win32_arch_string): New.
14501 (win32_target_ops): Add win32_arch_string as arch_string member.
14502
14503 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14504
14505 * spu-low.c (spu_arch_string): New.
14506 (spu_target_ops): Add spu_arch_string.
14507
14508 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14509
14510 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14511 * configure.ac: Do not check for terminal.h.
14512 * configure, config.in: Regenerated.
14513
14514 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * Makefile.in (OBS): Add $(XML_BUILTIN).
14517 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14518 (clean): Update.
14519 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14520 (arm-with-iwmmxt.c): New.
14521 * config.in, configure: Regenerate.
14522 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14523 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14524 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14525 (arm*-*-linux*): Add iWMMXt and regset support.
14526 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14527 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14528 (arm_store_wmmxregset, target_regsets): New.
14529 * server.c (get_features_xml): Take annex argument. Check builtin
14530 XML documents.
14531 (handle_query): Handle multiple annexes.
14532
14533 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * remote-utils.c [USE_WIN32API] (read, write): Define.
14536 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14537 write.
14538
14539 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14540
14541 * linux-i386-low.c (the_low_target): Set arch_string.
14542 * linux-x86-64-low.c (the_low_target): Likewise.
14543 * linux-low.c (linux_arch_string): New.
14544 (linux_target_ops): Add it.
14545 * linux-low.h (struct linux_target_ops): Add arch_string.
14546 * server.c (write_qxfer_response): Use const void * for DATA.
14547 (get_features_xml): New.
14548 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14549 * target.h (struct target_ops): Add arch_string method.
14550
14551 2007-01-03 Denis Pilat <denis.pilat@st.com>
14552 Daniel Jacobowitz <dan@codesourcery.com>
14553
14554 * linux-low.c (linux_kill): Handle being called with no threads.
14555 * win32-i386-low.c (win32_kill): Likewise.
14556 (get_child_debug_event): Clear current_process_handle.
14557
14558 2006-12-30 Denis PILAT <denis.pilat@st.com>
14559 Daniel Jacobowitz <dan@codesourcery.com>
14560
14561 * remote-utils.c (remote_open): Check the type of specified
14562 serial port devices before opening them.
14563 * server.c (main): Kill the inferior if an error occurs during
14564 the first remote_open.
14565
14566 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14567
14568 * README: Update supported targets.
14569
14570 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14571
14572 * Makefile.in (clean): Remove reg-mips64.c.
14573 (reg-mips64.c, reg-mips64.o): New rules.
14574 * configure.srv: Handle mips64. Include regset support for mips.
14575 * linux-mips-low.c (union mips_register): New.
14576 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14577 (mips_breakpoint, mips_breakpoint_at): Use int.
14578 (mips_collect_register, mips_supply_register)
14579 (mips_collect_register_32bit, mips_supply_register_32bit)
14580 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14581 (mips_store_fpregset, target_regsets): New.
14582 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14583
14584 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14585
14586 * configure.srv: Add target "spu*-*-*".
14587 * Makefile.in (clean): Remove reg-spu.c.
14588 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14589 * spu-low.c: New file.
14590
14591 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * configure.ac: Correct td_thr_tls_get_addr test.
14594 * configure: Regenerated.
14595
14596 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * linux-low.c (linux_wait_for_event): Reformat. Use the
14599 pass_signals array.
14600 * remote-utils.c (decode_address_to_semicolon): New.
14601 * server.c (pass_signals, handle_general_set): New.
14602 (handle_query): Mention QPassSignals for qSupported.
14603 (main): Call handle_general_set.
14604 * server.h (pass_signals, decode_address_to_semicolon): New.
14605
14606 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14607
14608 * server.c (handle_query): Correct error handling for read_auxv.
14609
14610 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14611
14612 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14613 and srv_linux_thread_db to yes.
14614 * linux-s390-low.c (s390_fill_gregset): New function.
14615 (target_regsets): Define data structure.
14616
14617 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14618
14619 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14620 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14621 * config.in, configure: Regenerated.
14622 * inferiors.c (gdb_id_to_thread): New function.
14623 (gdb_id_to_thread_id): Use it.
14624 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14625 * linux-low.h (struct process_info): Add th member.
14626 (thread_db_get_tls_address): New prototype.
14627 * remote-utils.c (decode_address): Make non-static.
14628 * server.c (handle_query): Handle qGetTLSAddr.
14629 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14630 * target.h (struct target_ops): Add get_tls_address.
14631 * thread-db.c (maybe_attach_thread): Save the thread handle.
14632 (thread_db_get_tls_address): New.
14633
14634 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14635
14636 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14637 (linux_resume_one_process): Take a siginfo_t *. Update all
14638 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14639 (struct pending_signals): Add a siginfo_t.
14640 (linux_wait_for_process): Always set last_status.
14641 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14642 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14643 * linux-low.h (struct process_info): Add last_status.
14644
14645 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14646
14647 * remote-utils.c (try_rle): New function.
14648 (putpkt_binary): Use it.
14649
14650 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14651
14652 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14653 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14654 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14655 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14656 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14657 point registers.
14658
14659 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14660
14661 * server.c (terminal_fd): New variable.
14662 (old_foreground_pgrp): Likewise.
14663 (restore_old_foreground_pgrp): New function.
14664 (start_inferior): Record the terminal file descriptor in terminal_fd
14665 and its original foreground group in old_foreground_pgrp. Register
14666 restore_old_foreground_pgrp with atexit().
14667
14668 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14669
14670 * server.c (handle_query): Correct qPart to qXfer.
14671
14672 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * configure.ac: Check for more headers which are missing on
14675 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14676 * configure.srv: Add Cygwin and mingw32.
14677 * remote-utils.c: Don't include headers unconditionally which
14678 are missing on mingw32. Include <winsock.h> for mingw32.
14679 (remote_open): Adjust for mingw32 support. Flush
14680 standard error after writing to it.
14681 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14682 (unblock_async_io, enable_async_io, disable_async_io)
14683 (readchar, getpkt): Update for Winsock support.
14684 (prepare_resume_reply): Expect a protocol signal number.
14685 * server.c: Disable <sys/wait.h> on mingw32.
14686 (start_inferior): Adjust for mingw32 support. Flush
14687 standard error after writing to it.
14688 (attach_inferior): Likewise. Use protocol signal
14689 numbers.
14690 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14691 and names.
14692 * win32-i386-low.c: New file.
14693 * Makefile.in (XM_CLIBS): Set.
14694 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14695 (win32-i386-low.o): New dependency rule.
14696 * linux-low.c (linux_wait): Use target signal numbers.
14697 * target.h (struct target_ops): Doc fix.
14698 * server.h (target_signal_to_name): New prototype.
14699 * gdbreplay.c: Don't include headers unconditionally which
14700 are missing on mingw32. Include <winsock.h> for mingw32.
14701 (remote_close, remote_open): Adjust for Winsock support.
14702 * configure, config.in: Regenerated.
14703
14704 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * server.c (decode_xfer_read, write_qxfer_response): New.
14707 (handle_query): Take a packet length argument. Handle
14708 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14709 the qSupported response.
14710 (main): Update call to handle_query.
14711
14712 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14713
14714 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14715 (putpkt_binary): Renamed from putpkt and adjusted for binary
14716 data.
14717 (putpkt): New wrapper for putpkt_binary.
14718 (readchar): Don't mask off the high bit.
14719 (decode_X_packet): New function.
14720 * server.c (main): Call putpkt_binary if a handler sets the packet
14721 length. Save the length of the incoming packet. Handle 'X'.
14722 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14723
14724 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * server.c (handle_query): Handle qSupported.
14727
14728 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * remote-utils.c (all_symbols_looked_up): New variable.
14731 (look_up_one_symbol): Check it.
14732 * server.h (look_up_one_symbol): New declaration.
14733 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14734
14735 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * Makefile.in (linux-arm-low.o): Update dependencies.
14738 * linux-arm-low.c: Include "gdb_proc_service.h".
14739 (PTRACE_GET_THREAD_AREA): Define.
14740 (ps_get_thread_area): New function.
14741
14742 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14743
14744 * configure.srv (m68k*-*-uclinux*): New target.
14745 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14746 (linux_resume_one_process): Remove extraneous cast.
14747 (linux_read_offsets): New.
14748 (linux_target_op): Add linux_read_offsets on mmuless systems.
14749 * server.c (handle_query): Add qOffsets logic.
14750 * target.h (struct target_ops): Add read_offsets.
14751
14752 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14753
14754 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14755 (PTRACE_GET_THREAD_AREA): Define.
14756 (ps_get_thread_area): New function.
14757 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14758 (linux-x86-64-low.o): Update.
14759
14760 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14761
14762 * configure.ac: Remove checks for prfpregset_t.
14763 * gdb_proc_service.h: New file.
14764 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14765 new "gdb_proc_service.h".
14766 * proc-service.c: Likewise.
14767 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14768 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14769 * Makefile.in (gdb_proc_service_h): Updated.
14770 * configure, config.in: Regenerated.
14771
14772 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * remote-utils.c (prepare_resume_reply): Move declaration
14775 of gdb_id_from_wait to the top of the block.
14776
14777 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14778
14779 * linux-low.c (regsets_store_inferior_registers): Read the regset
14780 from the target before filling it.
14781
14782 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14783
14784 * server.c (attach_inferior): Return SIGTRAP for a successful
14785 attach.
14786
14787 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * Makefile.in (OBS): Add version.o.
14790 (STAGESTUFF): Delete.
14791 (version.o): Add dependencies.
14792 (version.c): Replace rule.
14793 (clean): Remove version.c.
14794 * server.c (gdbserver_version): New.
14795 (gdbserver_usage): Use printf.
14796 (main): Handle --version and --help.
14797 * server.h (version, host_name): Add declarations.
14798
14799 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14800
14801 * linux-arm-low.c:
14802 * linux-arm-low.c:
14803 * inferiors.c:
14804 * i387-fp.h:
14805 * i387-fp.c:
14806 * gdbreplay.c:
14807 * regcache.c:
14808 * proc-service.c:
14809 * mem-break.h:
14810 * mem-break.c:
14811 * linux-x86-64-low.c:
14812 * linux-sh-low.c:
14813 * linux-s390-low.c:
14814 * linux-ppc64-low.c:
14815 * linux-ppc-low.c:
14816 * linux-mips-low.c:
14817 * linux-m68k-low.c:
14818 * linux-m32r-low.c:
14819 * linux-low.h:
14820 * linux-low.c:
14821 * linux-ia64-low.c:
14822 * linux-i386-low.c:
14823 * linux-crisv32-low.c:
14824 * thread-db.c:
14825 * terminal.h:
14826 * target.h:
14827 * target.c:
14828 * server.h:
14829 * server.c:
14830 * remote-utils.c:
14831 * regcache.h:
14832 * utils.c:
14833 * Makefile.in:
14834 * configure.ac:
14835 * gdbserver.1: Add (C) after Copyright. Update the FSF
14836 address.
14837
14838 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14839
14840 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14841 (arm_breakpoint_at): Recognize both breakpoints.
14842 (the_low_target): Use the correct breakpoint instruction.
14843
14844 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14845
14846 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14847 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14848 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14849 (the_low_target): Update.
14850
14851 2005-10-25 Andreas Schwab <schwab@suse.de>
14852
14853 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14854
14855 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14856 (ia64_num_regs): Reduce to 462.
14857
14858 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14859
14860 * acinclude.m4: Correct quoting.
14861 * aclocal.m4: Regenerated.
14862
14863 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14864 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14865 (thread_db_init): Call thread_db_err_str.
14866 * configure.ac: Check for TD_VERSION.
14867 * config.in, configure: Regenerated.
14868
14869 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14870
14871 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14872
14873 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14876 is not available. Define HAVE_PTRACE_GETREGS if it is.
14877 * config.in, configure: Regenerated.
14878 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14879 * linux-i386-low.c, linux-m68k-low.c: Update to use
14880 HAVE_PTRACE_GETREGS.
14881 * linux-low.c (regsets_fetch_inferior_registers)
14882 (regsets_store_inferior_registers): Only return 0 if we processed
14883 GENERAL_REGS.
14884 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14885 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14886
14887 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14888
14889 * inferiors.c (struct thread_info): Add gdb_id.
14890 (add_thread): Add gdb_id argument.
14891 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14892 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14893 calls to add_thread.
14894 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14895 * server.c (handle_query): Use thread_to_gdb_id.
14896 (handle_v_cont, main): Use gdb_id_to_thread_id.
14897 * server.h (add_thread): Update prototype.
14898 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14899 prototypes.
14900
14901 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14904 left-padded registers.
14905 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14906 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14907
14908 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14909
14910 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14911 * configure: Regenerate.
14912 * config.in: Regenerate.
14913 * server.h (NEED_DECLARATION_STRERROR):
14914 Replace with !HAVE_DECL_STRERROR.
14915
14916 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * linux-low.c (linux_wait, linux_send_signal): Don't test
14919 an unsigned long variable for > 0 if it could be MAX_ULONG.
14920 * server.c (myresume): Likewise.
14921 * target.c (set_desired_inferior): Likewise.
14922
14923 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14924
14925 * configure.ac: Simplify and improve check for socklen_t.
14926 * configure, config.in: Regenerate.
14927
14928 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * acconfig.h: Remove.
14931 * configure.ac: Add a test for socklen_t. Use three-argument
14932 AC_DEFINE throughout.
14933 * config.in: Regenerated using autoheader 2.59.
14934 * configure: Regenerated.
14935
14936 * gdbreplay.c (socklen_t): Provide a default.
14937 (remote_open): Use socklen_t.
14938 * remote-utils.c (socklen_t): Provide a default.
14939 (remote_open): Use socklen_t.
14940 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14941 unsigned char.
14942
14943 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14944 char for buffers.
14945 * linux-low.c (linux_read_memory, linux_write_memory)
14946 (linux_read_auxv): Likewise.
14947 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14948 (check_mem_write): Likewise.
14949 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14950 Likewise.
14951 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14952 (registers_from_string, register_data): Likewise.
14953 * server.c (handle_query, main): Likewise.
14954 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14955 (decode_M_packet): Likewise.
14956 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14957 * target.h (struct target_ops): Update read_memory, write_memory,
14958 and read_auxv.
14959 (read_inferior_memory, write_inferior_memory): Update.
14960 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14961 to unsigned char *.
14962 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14963 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14964 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14965 linux-s390-low.c, linux-sh-low.c: Update for changes in
14966 read_inferior_memory and the_low_target->breakpoint.
14967
14968 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14971 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14972 * configure.srv: Add powerpc64-*-linux*.
14973 * linux-ppc64-low.c: New file.
14974
14975 2005-05-23 Orjan Friberg <orjanf@axis.com>
14976
14977 * linux-cris-low.c: New file with support for CRIS.
14978 * linux-crisv32-low.c: Ditto for CRISv32.
14979 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14980 (clean): Add reg-cris.c and reg-crisv32.c.
14981 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14982 reg-crisv32.o, and reg-crisv32.c to make rules.
14983 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14984 recognized targets.
14985
14986 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14987
14988 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14989 of sizeof (PTRACE_XFER_TYPE).
14990 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14991
14992 2005-05-12 Orjan Friberg <orjanf@axis.com>
14993
14994 * target.h (struct target_ops): Add insert_watchpoint,
14995 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14996 pointers for hardware watchpoint support.
14997 * linux-low.h (struct linux_target_ops): Ditto.
14998 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14999 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15000 to linux_target_ops.
15001 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15002 reply packet.
15003 * server.c (main): Recognize 'Z' and 'z' packets.
15004
15005 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15006
15007 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15008 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15009 (the_low_target): Add new members.
15010
15011 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15012
15013 * proc-service.c (ps_lgetregs): Search all_processes instead of
15014 all_threads.
15015
15016 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15017
15018 * server.c (start_inferior): Change return type to int.
15019 (attach_inferior): Change sigptr to int *.
15020 (handle_v_cont, handle_v_requests): Change signal to int *.
15021 (main): Change signal to int.
15022
15023 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15024
15025 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15026 * configure.srv: Add m32r*-*-linux*.
15027 * linux-m32r-low.c: New file.
15028
15029 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15030
15031 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15032
15033 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15034
15035 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15036 Take unsigned long arguments for PIDs.
15037 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15038 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15039 (wait_for_sigstop, linux_resume_one_process)
15040 (regsets_fetch_inferior_registers, linux_send_signal)
15041 (linux_read_auxv): Likewise. Update the types of variables holding
15042 PIDs. Update format string specifiers.
15043 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15044 * remote-utils.c (prepare_resume_reply): Likewise.
15045 * server.c (cont_thread, general_thread, step_thread)
15046 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15047 unsigned long.
15048 (handle_query): Update format specifiers.
15049 (handle_v_cont, main): Use strtoul for thread IDs.
15050 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15051 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15052 (general_thread, step_thread, thread_from_wait)
15053 (old_thread_from_wait): Update.
15054 * target.h (struct thread_resume): Use unsigned long for THREAD.
15055 (struct target_ops): Use unsigned long for arguments to attach and
15056 thread_alive.
15057
15058 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15059
15060 * acinclude.m4: Include bfd/bfd.m4 directly.
15061 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15062 <agriffis@toolchain.org>.
15063 * aclocal.m4, configure: Regenerated.
15064
15065 2005-01-07 Andrew Cagney <cagney@gnu.org>
15066
15067 * configure.ac: Rename configure.in, require autoconf 2.59.
15068 * configure: Re-generate.
15069
15070 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15071
15072 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15073 LIBS when finished.
15074 * aclocal.m4: Regenerated.
15075 * configure: Regenerated.
15076
15077 2004-11-21 Andreas Schwab <schwab@suse.de>
15078
15079 * linux-m68k-low.c (m68k_num_gregs): Define.
15080 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15081 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15082 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15083 (m68k_breakpoint_at): New. Add to the_low_target.
15084
15085 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15086 srv_linux_thread_db to yes.
15087
15088 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15089
15090 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15091 (ARCH_SET_FS): Likewise.
15092 (ARCH_GET_FS): Likewise.
15093 (ARCH_GET_GS): Likewise.
15094
15095 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15096
15097 * linux-i386-low.c (ps_get_thread_area): New.
15098 * linux-x86-64-low.c (ps_get_thread_area): New.
15099 * linux-low.c: Include <sys/syscall.h>.
15100 (linux_kill_one_process): Don't kill the first thread here.
15101 (linux_kill): Kill the first thread here.
15102 (kill_lwp): New function.
15103 (send_sigstop, linux_send_signal): Use it.
15104 * proc-service.c: Clean up #ifdefs.
15105 (fpregset_info): Delete.
15106 (ps_lgetregs): Update and enable implementation.
15107 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15108 implementations.
15109 * remote-utils.c (struct sym_cache, symbol_cache): New.
15110 (input_interrupt): Print a clearer message.
15111 (async_io_enabled): New variable.
15112 (enable_async_io, disable_async_io): Use it. Update comments.
15113 (look_up_one_symbol): Use the symbol cache.
15114 * thread-db.c (thread_db_look_up_symbols): New function.
15115 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15116
15117 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15118
15119 * configure.in: Test for -rdynamic.
15120 * configure: Regenerated.
15121 * Makefile (INTERNAL_LDFLAGS): New.
15122 (gdbserver, gdbreplay): Use it.
15123
15124 2004-09-02 Andrew Cagney <cagney@gnu.org>
15125
15126 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15127
15128 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15129
15130 * linux-low.c (linux_wait): Clear all_processes list also.
15131
15132 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15133
15134 * linux-low.c: Include <errno.h>. Remove extern declaration of
15135 errno.
15136
15137 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15138
15139 * gdbreplay.c, server.h, utils.c: Update copyright years.
15140
15141 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15142
15143 * server.c (main): Print child status or termination signal from
15144 variable 'signal', not 'sig'.
15145
15146 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15147
15148 * linux-low.c (linux_read_memory): Change return type to
15149 int. Check for and return error from ptrace().
15150 * target.c (read_inferior_memory): Change return type to int. Pass
15151 back return status from the_target->read_memory().
15152 * target.h (struct target_ops): Adapt *read_memory() prototype.
15153 Update comment.
15154 (read_inferior_memory): Adapt prototype.
15155 * server.c (main): Return an error packet if
15156 read_inferior_memory() returns an error.
15157
15158 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15159
15160 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15161 Unify with other clean targets.
15162
15163 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15164
15165 * server.c (handle_v_cont): Call set_desired_inferior.
15166
15167 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15168
15169 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15170
15171 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15172
15173 * linux-low.c (linux_wait): Unblock async I/O.
15174 (linux_resume): Block and enable async I/O.
15175 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15176 * server.h (block_async_io, unblock_async_io): Add prototypes.
15177
15178 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15179
15180 * remote-utils.c (remote_open): Print a status notice after
15181 opening a TCP port.
15182 * server.c (attach_inferior): Print a status notice after
15183 attaching.
15184
15185 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15186
15187 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15188
15189 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15190
15191 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15192 error packet.
15193 * server.c, target.h: Update copyright years.
15194
15195 2004-02-25 Roland McGrath <roland@redhat.com>
15196
15197 * target.h (struct target_ops): New member `read_auxv'.
15198 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15199 * linux-low.c (linux_read_auxv): New function.
15200 (linux_target_ops): Initialize `read_auxv' member to that.
15201
15202 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15203
15204 Committed by Jim Blandy <jimb@redhat.com>.
15205
15206 * linux-s390-low.c (s390_num_regs): Update.
15207 (s390_regmap): Remove control registers. Use __s390x__ predefine
15208 instead of GPR_SIZE to distiguish s390 and s390x targets.
15209
15210 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15211
15212 * linux-low.c: Update copyright year.
15213 (check_removed_breakpoint): Clear pending_is_breakpoint.
15214 (linux_set_resume_request, linux_queue_one_thread)
15215 (resume_status_pending_p): New functions.
15216 (linux_continue_one_thread): Use process->resume.
15217 (linux_resume): Only resume threads if there are no pending events.
15218 * linux-low.h (struct process_info): Add resume request
15219 pointer.
15220
15221 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15222
15223 * regcache.c (new_register_cache): Clear the allocated register
15224 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15225
15226 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15227
15228 * linux-low.c (linux_resume): Take a struct thread_resume *
15229 argument.
15230 (linux_wait): Update call.
15231 (resume_ptr): New static variable.
15232 (linux_continue_one_thread): Renamed from
15233 linux_continue_one_process. Use resume_ptr.
15234 (linux_resume): Use linux_continue_one_thread.
15235 * server.c (handle_v_cont, handle_v_requests): New functions.
15236 (myresume): New function.
15237 (main): Handle 'v' case.
15238 * target.h (struct thread_resume): New type.
15239 (struct target_ops): Change argument of "resume" to struct
15240 thread_resume *.
15241 (myresume): Delete macro.
15242
15243 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15244
15245 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15246 (uninstall): Support DESTDIR.
15247
15248 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15249
15250 * configure.srv: Add xscale*linux copy of arm*linux entry.
15251
15252 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15253
15254 * linux-arm-low.c (arm_reinsert_addr): New function.
15255 (the_low_target): Add arm_reinsert_addr.
15256
15257 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15258
15259 * mem-break.c: Remove whitespace at end of file.
15260
15261 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15262
15263 * configure.in: Check whether we need to prototype strerror.
15264 * server.h: Optionally prototype strerror.
15265 * gdbreplay.c (perror_with_name): Use strerror.
15266 * linux-low.c (linux_attach_lwp): Use strerror.
15267 * utils.c (perror_with_name): Use strerror.
15268 * config.in, configure: Regenerated.
15269
15270 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15271
15272 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15273 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15274
15275 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15276
15277 * Makefile.in (SFILES): Update.
15278 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15279 low-sun3.c: Remove files.
15280
15281 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15282
15283 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15284 (linux_detach_one_process, linux_detach): New functions.
15285 (linux_target_ops): Add linux_detach.
15286 * server.c (main): Handle 'D' packet.
15287 * target.h (struct target_ops): Add "detach" member.
15288 (detach_inferior): Define.
15289
15290 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15291
15292 From Kelley Cook <kelleycook@wideopenwest.com>:
15293 * configure.srv: Accept i[34567]86 variants.
15294
15295 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15296
15297 * linux-low.c (linux_wait_for_event): Correct comment typos.
15298 (linux_resume_one_process): Call check_removed_breakpoint.
15299 (linux_send_signal): New function.
15300 (linux_target_ops): Add linux_send_signal.
15301 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15302 of kill.
15303 * target.h (struct target_ops): Add send_signal.
15304
15305 2003-05-29 Jim Blandy <jimb@redhat.com>
15306
15307 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15308 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15309 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15310 away part of the register's value.
15311
15312 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15313
15314 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15315 (linux_wait_for_event, linux_init_signals): Likewise.
15316
15317 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15318
15319 * configure.in: Check for stdlib.h.
15320 * configure: Regenerated.
15321 * config.in: Regenerated.
15322
15323 2003-01-04 Andreas Schwab <schwab@suse.de>
15324
15325 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15326
15327 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15328
15329 * Makefile.in: Remove obsolete code.
15330
15331 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15332
15333 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15334 defined(PT_FPR0_HI).
15335
15336 2002-11-17 Stuart Hughes <seh@zee2.com>
15337
15338 * linux-arm-low.c (arm_num_regs): Increase.
15339 (arm_regmap): Include status register.
15340
15341 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15342
15343 * linux-low.c (register_addr): Remove incorrect -1 check.
15344
15345 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15346
15347 * linux-low.c (linux_create_inferior): Call setpgid. Return
15348 the new PID.
15349 (unstopped_p, linux_signal_pid): Remove.
15350 (linux_target_ops): Remove linux_signal_pid.
15351 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15352 global instead of target method.
15353 * target.h (struct target_ops): Remove signal_pid. Update comment
15354 for create_inferior.
15355 * server.c (signal_pid): New variable.
15356 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15357 gdbserver. Set the child to be the foreground process group.
15358 (attach_inferior): Set signal_pid.
15359
15360 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15361
15362 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15363
15364 2002-08-20 Jim Blandy <jimb@redhat.com>
15365
15366 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15367 default for this.
15368
15369 2002-08-01 Andrew Cagney <cagney@redhat.com>
15370
15371 * Makefile.in: Make chill references obsolete.
15372
15373 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15374
15375 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15376 * configure: Regenerate.
15377 * config.in: Regenerate.
15378
15379 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15380
15381 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15382 (perror_with_name, remote_close, remote_open, expect, play): Static.
15383
15384 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15385
15386 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15387 byte offsets instead of an array of indexes.
15388 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15389
15390 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15391
15392 * regcache.c: Add comment.
15393
15394 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15395
15396 * thread-db.c: New file.
15397 * proc-service.c: New file.
15398 * acinclude.m4: New file.
15399 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15400 proc-service.o, and thread-db.o.
15401 (linux-low.o): Add USE_THREAD_DB.
15402 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15403 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15404 * aclocal.m4: Regenerated.
15405 * config.in: Regenerated.
15406 * configure: Regenerated.
15407 * configure.in: Check for proc_service.h, sys/procfs.h,
15408 thread_db.h, and linux/elf.h headrs.
15409 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15410 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15411 Check for -lthread_db and thread support.
15412 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15413 PowerPC, and SuperH.
15414 * i387-fp.c: Constify arguments.
15415 * i387-fp.h: Likewise.
15416 * inferiors.c: (struct thread_info): Renamed from
15417 `struct inferior_info'. Remove PID member. Use generic inferior
15418 list header. All uses updated.
15419 (inferiors, signal_pid): Removed.
15420 (all_threads): New variable.
15421 (get_thread): Define.
15422 (add_inferior_to_list): New function.
15423 (for_each_inferior): New function.
15424 (change_inferior_id): New function.
15425 (add_inferior): Removed.
15426 (remove_inferior): New function.
15427 (add_thread): New function.
15428 (free_one_thread): New function.
15429 (remove_thread): New function.
15430 (clear_inferiors): Use for_each_inferior and free_one_thread.
15431 (find_inferior): New function.
15432 (find_inferior_id): New function.
15433 (inferior_target_data): Update argument type.
15434 (set_inferior_target_data): Likewise.
15435 (inferior_regcache_data): Likewise.
15436 (set_inferior_regcache_data): Likewise.
15437 * linux-low.c (linux_bp_reinsert): Remove.
15438 (all_processes, stopping_threads, using_thrads)
15439 (struct pending_signals, debug_threads, pid_of): New.
15440 (inferior_pid): Replace with macro.
15441 (struct inferior_linux_data): Remove.
15442 (get_stop_pc, add_process): New functions.
15443 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15444 Use add_process and add_thread.
15445 (linux_attach_lwp): New function, based on old linux_attach. Use
15446 add_process and add_thread. Set stop_expected for new threads.
15447 (linux_attach): New function.
15448 (linux_kill_one_process): New function.
15449 (linux_kill): Kill all LWPs.
15450 (linux_thread_alive): Use find_inferior_id.
15451 (check_removed_breakpoints, status_pending_p): New functions.
15452 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15453 Update. Use WNOHANG. Wait for cloned processes also. Update process
15454 struct for the found process.
15455 (linux_wait_for_event): New function.
15456 (linux_wait): Use it. Support LWPs.
15457 (send_sigstop, wait_for_sigstop, stop_all_processes)
15458 (linux_resume_one_process, linux_continue_one_process): New functions.
15459 (linux_resume): Support LWPs.
15460 (REGISTER_RAW_SIZE): Remove.
15461 (fetch_register): Use register_size instead. Call supply_register.
15462 (usr_store_inferior_registers): Likewise. Call collect_register.
15463 Fix recursive case.
15464 (regsets_fetch_inferior_registers): Improve error message.
15465 (regsets_store_inferior_registers): Add debugging.
15466 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15467 (unstopped_p, linux_signal_pid): New functions.
15468 (linux_target_ops): Add linux_signal_pid.
15469 (linux_init_signals): New function.
15470 (initialize_low): Call it. Initialize using_threads.
15471 * regcache.c (inferior_regcache_data): Add valid
15472 flag.
15473 (get_regcache): Fetch registers lazily. Add fetch argument
15474 and update all callers.
15475 (regcache_invalidate_one, regcache_invalidate): New
15476 functions.
15477 (new_register_cache): Renamed from create_register_cache.
15478 Return the new regcache.
15479 (free_register_cache): Change argument to a void *.
15480 (registers_to_string, registers_from_string): Call get_regcache
15481 with fetch flag set.
15482 (register_data): Make static. Pass fetch flag to get_regcache.
15483 (supply_register): Call get_regcache with fetch flag clear.
15484 (collect_register): Call get_regcache with fetch flag set.
15485 (collect_register_as_string): New function.
15486 * regcache.h: Update.
15487 * remote-utils.c (putpkt): Flush after debug output and use
15488 stderr.
15489 Handle input interrupts while waiting for an ACK.
15490 (input_interrupt): Use signal_pid method.
15491 (getpkt): Flush after debug output and use stderr.
15492 (outreg): Use collect_register_as_string.
15493 (new_thread_notify, dead_thread_notify): New functions.
15494 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15495 and general_thread.
15496 (look_up_one_symbol): Flush after debug output.
15497 * server.c (step_thread, server_waiting): New variables.
15498 (start_inferior): Don't use signal_pid. Update call to mywait.
15499 (attach_inferior): Update call to mywait.
15500 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15501 (main): Don't fetch/store registers explicitly. Use
15502 set_desired_inferior. Support proposed ``Hs'' packet. Update
15503 calls to mywait.
15504 * server.h: Update.
15505 (struct inferior_list, struct_inferior_list_entry): New.
15506 * target.c (set_desired_inferior): New.
15507 (write_inferior_memory): Constify.
15508 (mywait): New function.
15509 * target.h: Update.
15510 (struct target_ops): New signal_pid method.
15511 (mywait): Removed macro, added prototype.
15512
15513 * linux-low.h (regset_func): Removed.
15514 (regset_fill_func, regset_store_func): New.
15515 (enum regset_type): New.
15516 (struct regset_info): Add type field. Use new operation types.
15517 (struct linux_target_ops): stop_pc renamed to get_pc.
15518 Add decr_pc_after_break and breakpoint_at.
15519 (get_process, get_thread_proess, get_process_thread)
15520 (strut process_info, all_processes, linux_attach_lwp)
15521 (thread_db_init): New.
15522
15523 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15524 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15525 (the_low_target): Add new members.
15526 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15527 (i386_store_fpxregset): Constify.
15528 (target_regsets): Add new kind identifier.
15529 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15530 (i386_set_pc): Add debugging.
15531 (i386_breakpoint_at): New function.
15532 (the_low_target): Add new members.
15533 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15534 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15535 (mips_breakpoint_at): New.
15536 (the_low_target): Add new members.
15537 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15538 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15539 (the_low_target): Add new members.
15540 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15541 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15542 (the_low_target): Add new members.
15543 * linux-x86-64-low.c (target_regsets): Add new kind
15544 identifier.
15545
15546 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15547
15548 From Martin Pool <mbp@samba.org>:
15549 * server.c (gdbserver_usage): New function.
15550 (main): Call it.
15551
15552 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15553
15554 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15555 stop_at -> stop_pc.
15556
15557 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15558
15559 * Makefile.in: Remove obsolete code.
15560
15561 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15562
15563 * linux-low.c (regsets_fetch_inferior_registers),
15564 (regsets_store_inferior_registers): Removed cast to int from
15565 ptrace() calls.
15566 * regcache.h: Added declaration of struct inferior_info.
15567
15568 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15569
15570 * inferiors.c (struct inferior_info): Add regcache_data.
15571 (add_inferior): Call create_register_cache.
15572 (clear_inferiors): Call free_register_cache.
15573 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15574 * regcache.c (struct inferior_regcache_data): New.
15575 (registers): Remove.
15576 (get_regcache): New function.
15577 (create_register_cache, free_register_cache): New functions.
15578 (set_register_cache): Don't initialize the register cache here.
15579 (registers_to_string, registers_from_string, register_data): Call
15580 get_regcache.
15581 * regcache.h: Add prototypes.
15582 * server.h: Likewise.
15583
15584 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15585
15586 * mem-break.c: New file.
15587 * mem-break.h: New file.
15588 * Makefile.in: Add mem-break.o rule; update server.h
15589 dependencies.
15590 * inferiors.c (struct inferior_info): Add target_data
15591 member.
15592 (clear_inferiors): Free target_data member if set.
15593 (inferior_target_data, set_inferior_target_data): New functions.
15594 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15595 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15596 * linux-low.c (linux_bp_reinsert): New variable.
15597 (struct inferior_linux_data): New.
15598 (linux_create_inferior): Use set_inferior_target_data.
15599 (linux_attach): Likewise. Call add_inferior.
15600 (linux_wait_for_one_inferior): New function.
15601 (linux_wait): Call it.
15602 (linux_write_memory): Add const.
15603 (initialize_low): Call set_breakpoint_data.
15604 * linux-low.h (struct linux_target_ops): Add breakpoint
15605 handling members.
15606 * server.c (attach_inferior): Remove extra add_inferior
15607 call.
15608 * server.h: Include mem-break.h. Update inferior.c
15609 prototypes.
15610 * target.c (read_inferior_memory)
15611 (write_inferior_memory): New functions.
15612 * target.h (read_inferior_memory)
15613 (write_inferior_memory): Change macros to prototypes.
15614 (struct target_ops): Update comments. Add const to write_memory
15615 definition.
15616
15617 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15618
15619 * linux-low.c (usr_store_inferior_registers): Support
15620 registers which are allowed to fail to store.
15621 * linux-low.h (linux_target_ops): Likewise.
15622 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15623 (ppc_cannot_store_register): FPSCR may not be storable.
15624
15625 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15626
15627 * server.h: Include <string.h> if HAVE_STRING_H.
15628 * ChangeLog: Correct paths in last ChangeLog entry.
15629
15630 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15631
15632 * linux-low.h: Remove obsolete prototypes.
15633 (struct linux_target_ops): New.
15634 (extern the_low_target): New.
15635 * linux-low.c (num_regs, regmap): Remove declarations.
15636 (register_addr): Use the_low_target explicitly.
15637 (fetch_register): Likewise.
15638 (usr_fetch_inferior_registers): Likewise.
15639 (usr_store_inferior_registers): Likewise.
15640 * linux-arm-low.c (num_regs): Remove.
15641 (arm_num_regs): Define.
15642 (arm_regmap): Renamed from regmap, made static.
15643 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15644 made static.
15645 (arm_cannot_store_register): Renamed from cannot_store_register,
15646 made static.
15647 (the_low_target): New.
15648 * linux-i386-low.c (num_regs): Remove.
15649 (i386_num_regs): Define.
15650 (i386_regmap): Renamed from regmap, made static.
15651 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15652 made static.
15653 (i386_cannot_store_register): Renamed from cannot_store_register,
15654 made static.
15655 (the_low_target): New.
15656 * linux-ia64-low.c (num_regs): Remove.
15657 (ia64_num_regs): Define.
15658 (ia64_regmap): Renamed from regmap, made static.
15659 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15660 made static.
15661 (ia64_cannot_store_register): Renamed from cannot_store_register,
15662 made static.
15663 (the_low_target): New.
15664 * linux-m68k-low.c (num_regs): Remove.
15665 (m68k_num_regs): Define.
15666 (m68k_regmap): Renamed from regmap, made static.
15667 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15668 made static.
15669 (m68k_cannot_store_register): Renamed from cannot_store_register,
15670 made static.
15671 (the_low_target): New.
15672 * linux-mips-low.c (num_regs): Remove.
15673 (mips_num_regs): Define.
15674 (mips_regmap): Renamed from regmap, made static.
15675 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15676 made static.
15677 (mips_cannot_store_register): Renamed from cannot_store_register,
15678 made static.
15679 (the_low_target): New.
15680 * linux-ppc-low.c (num_regs): Remove.
15681 (ppc_num_regs): Define.
15682 (ppc_regmap): Renamed from regmap, made static.
15683 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15684 made static.
15685 (ppc_cannot_store_register): Renamed from cannot_store_register,
15686 made static.
15687 (the_low_target): New.
15688 * linux-s390-low.c (num_regs): Remove.
15689 (s390_num_regs): Define.
15690 (s390_regmap): Renamed from regmap, made static.
15691 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15692 made static.
15693 (s390_cannot_store_register): Renamed from cannot_store_register,
15694 made static.
15695 (the_low_target): New.
15696 * linux-sh-low.c (num_regs): Remove.
15697 (sh_num_regs): Define.
15698 (sh_regmap): Renamed from regmap, made static.
15699 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15700 made static.
15701 (sh_cannot_store_register): Renamed from cannot_store_register,
15702 made static.
15703 (the_low_target): New.
15704 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15705 (the_low_target): New.
15706
15707 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15708
15709 * Makefile.in: Add stamp-h target.
15710 * configure.in: Create stamp-h.
15711 * configure: Regenerated.
15712
15713 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15714
15715 * inferiors.c: New file.
15716 * target.c: New file.
15717 * target.h: New file.
15718 * Makefile.in: Add target.o and inferiors.o. Update
15719 dependencies.
15720 * linux-low.c (inferior_pid): New static variable,
15721 moved from server.c.
15722 (linux_create_inferior): Renamed from create_inferior.
15723 Call add_inferior. Return 0 on success instead of a PID.
15724 (linux_attach): Renamed from myattach.
15725 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15726 (linux_thread_alive): Renamed from mythread_alive.
15727 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15728 child dies.
15729 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15730 (regsets_store_inferior_registers): Correct error message.
15731 Add missing ``return 0''.
15732 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15733 (linux_store_registers): Renamed from store_inferior_registers.
15734 (linux_read_memory): Renamed from read_inferior_memory.
15735 (linux_write_memory): Renamed from write_inferior_memory.
15736 (linux_target_ops): New structure.
15737 (initialize_low): Call set_target_ops ().
15738 * remote-utils.c (unhexify): New function.
15739 (hexify): New function.
15740 (input_interrupt): Send signals to ``signal_pid''.
15741 * server.c (inferior_pid): Remove.
15742 (start_inferior): Update create_inferior call.
15743 (attach_inferior): Call add_inferior.
15744 (handle_query): New function.
15745 (main): Call handle_query for `q' packets.
15746 * server.h: Include "target.h". Remove obsolete prototypes.
15747 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15748
15749 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15750
15751 * Makefile.in: Add WARN_CFLAGS. Update configury
15752 dependencies.
15753 * configure.in: Check for <string.h>
15754 * configure: Regenerate.
15755 * config.in: Regenerate.
15756 * gdbreplay.c: Include needed system headers.
15757 (remote_open): Remove strchr prototype.
15758 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15759 * regcache.c (supply_register): Change buf argument to const void *.
15760 (supply_register_by_name): Likewise.
15761 (collect_register): Change buf argument to void *.
15762 (collect_register_by_name): Likewise.
15763 * regcache.h: Add missing prototypes.
15764 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15765 * server.c (handle_query): New function.
15766 (attached): New static variable, moved out of main.
15767 (main): Quiet longjmp clobber warnings.
15768 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15769 * utils.c (error): Remove NORETURN.
15770 (fatal): Likewise.
This page took 0.371656 seconds and 4 git commands to generate.