cris: Check UNDEFWEAK_NO_DYNAMIC_RELOC
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * inferiors.h: (struct inferior_list): Remove.
4 (struct inferior_list_entry); Remove.
5 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
7 get_first_inferior): Remove.
8 (for_each_inferior, for_each_inferior_with_data, find_inferior,
9 find_inferior_id, find_inferior_in_random): Change signature.
10 * inferiors.c (all_threads): Change type to
11 std::list<thread_info *>.
12 (get_thread): Remove macro.
13 (find_inferior, find_inferior_id): Change signature, implement
14 using find_thread.
15 (find_inferior_in_random): Change signature, implement using
16 find_thread_in_random.
17 (for_each_inferior, for_each_inferior_with_data): Change
18 signature, implement using for_each_thread.
19 (add_inferior_to_list, remove_inferior): Remove.
20 (add_thread, get_first_thread, thread_of_pid,
21 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
22 (get_first_inferior, one_inferior_p, clear_inferior_list):
23 Remove.
24 (clear_inferiors, get_thread_process): Update.
25 * gdbthread.h: Include <list>.
26 (struct thread_info) <entry>: Remove field.
27 <id>: New field.
28 (all_threads): Change type to std::list<thread_info *>.
29 (get_first_inferior): Add doc.
30 (find_thread, for_each_thread, find_thread_in_random): New
31 functions.
32 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
33 * linux-arm-low.c (update_registers_callback): Update.
34 * linux-low.c (second_thread_of_pid_p): Update.
35 (kill_one_lwp_callback, linux_detach_lwp_callback,
36 delete_lwp_callback, status_pending_p_callback, same_lwp,
37 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
38 iterate_over_lwps, not_stopped_callback,
39 resume_stopped_resumed_lwps, count_events_callback,
40 select_singlestep_lwp_callback, select_event_lwp_callback,
41 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
42 suspend_and_send_sigstop_callback, wait_for_sigstop,
43 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
44 lwp_running, linux_set_resume_request, resume_status_pending_p,
45 need_step_over_p, start_step_over, linux_resume_one_thread,
46 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
47 reset_lwp_ptrace_options_callback): Update.
48 * linux-mips-low.c (update_watch_registers_callback): Update.
49 * regcache.c (regcache_invalidate_one, regcache_invalidate):
50 Update.
51 (free_register_cache_thread_one): Remove.
52 (regcache_release): Update.
53 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
54 handle_qxfer_threads_worker): Update.
55 (handle_query): Update, use list iterator.
56 (visit_actioned_threads, handle_pending_status,
57 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
58 clear_pending_status_callback, set_pending_status_callback,
59 find_status_pending_thread_callback, handle_status,
60 process_serial_event): Update.
61 * target.c (thread_search_callback): Update.
62 * thread-db.c (thread_db_get_tls_address): Update.
63 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
64 Update.
65 * win32-i386-low.c (update_debug_registers_callback): Update.
66 * win32-low.c (delete_thread_info, child_delete_thread,
67 continue_one_thread, suspend_one_thread,
68 get_child_debug_event): Adjust.
69
70 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
71
72 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
73 * inferiors.h: Include <list>.
74 (struct process_info) <entry>: Remove field.
75 <pid>: New field.
76 (pid_of): Change macro to function.
77 (ptid_of, lwpid_of): Remove macro.
78 (all_processes): Change type to std::list<process_info *>.
79 (ALL_PROCESSES): Remove macro.
80 (for_each_process, find_process): New function.
81 * inferiors.c (all_processes): Change type to
82 std::list<process_info *>.
83 (find_thread_process): Adjust.
84 (add_process): Likewise.
85 (remove_process): Likewise.
86 (find_process_pid): Likewise.
87 (get_first_process): Likewise.
88 (started_inferior_callback): Remove.
89 (have_started_inferiors_p): Adjust.
90 (attached_inferior_callback): Remove.
91 (have_attached_inferiors_p): Adjust.
92 * linux-low.c (check_zombie_leaders): Likewise.
93 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
94 (x86_linux_update_xmltarget): Adjust.
95 * server.c (handle_query): Likewise.
96 (gdb_reattached_process): Remove.
97 (handle_status): Adjust.
98 (kill_inferior_callback): Likewise.
99 (detach_or_kill_inferior): Remove.
100 (print_started_pid): Likewise.
101 (print_attached_pid): Likewise.
102 (detach_or_kill_for_exit): Update.
103 (process_serial_event): Likewise.
104 * linux-arm-low.c (arm_new_fork): Likewise.
105
106 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
107
108 * dll.h: Include <list>.
109 (struct dll_info): Add constructor.
110 <entry>: Remove field.
111 (all_dlls): Change type to std::list<dll_info>.
112 * dll.c: Include <algorithm>.
113 (get_dll): Remove macro.
114 (all_dlls): Change type to std::list<dll_info *>.
115 (free_one_dll): Remove.
116 (match_dll): Likewise.
117 (loaded_dll): Adjust.
118 (unloaded_dll): Adjust to all_dlls type change, use
119 std::find_if. Inline code from match_dll.
120 (clear_dlls): Adjust to all_dlls type change.
121 * server.c (emit_dll_description): Remove.
122 (handle_qxfer_libraries): Adjust to all_dlls type change,
123 integrate emit_dll_description's functionality.
124
125 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
126
127 * linux-low.h (struct linux_target_ops) <delete_process>: New
128 field.
129 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
130 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
131 (struct linux_target_ops): Add delete_process callback.
132 * linux-arm-low.c (arm_delete_process): New.
133 (struct linux_target_ops): Add delete_process callback.
134 * linux-bfin-low.c (struct linux_target_ops): Likewise.
135 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
136 * linux-m32r-low.c (struct linux_target_ops): Likewise.
137 * linux-mips-low.c (mips_linux_delete_process): New.
138 (struct linux_target_ops): Add delete_process callback.
139 * linux-ppc-low.c (struct linux_target_ops): Likewise.
140 * linux-s390-low.c (struct linux_target_ops): Likewise.
141 * linux-sh-low.c (struct linux_target_ops): Likewise.
142 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
143 * linux-tile-low.c (struct linux_target_ops): Likewise.
144 * linux-x86-low.c (x86_linux_delete_process): New.
145 (struct linux_target_ops): Add delete_process callback.
146 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
147
148 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
149
150 * linux-aarch64-low.c (the_low_target): Add thread delete
151 callback.
152 * linux-arm-low.c (arm_delete_thread): New function.
153 (the_low_target): Add thread delete callback.
154 * linux-bfin-low.c (the_low_target): Likewise.
155 * linux-crisv32-low.c (the_low_target): Likewise.
156 * linux-low.c (delete_lwp): Invoke delete_thread callback if
157 set.
158 * linux-low.h (struct linux_target_ops) <delete_thread>: New
159 field.
160 * linux-m32r-low.c (the_low_target): Add thread delete callback.
161 * linux-mips-low.c (mips_linux_delete_thread): New function.
162 (the_low_target): Add thread delete callback.
163 * linux-ppc-low.c (the_low_target): Likewise.
164 * linux-s390-low.c (the_low_target): Likewise.
165 * linux-sh-low.c (the_low_target): Likewise.
166 * linux-tic6x-low.c (the_low_target): Likewise.
167 * linux-tile-low.c (the_low_target): Likewise.
168 * linux-x86-low.c (the_low_target): Likewise.
169 * linux-xtensa-low.c (the_low_target): Likewise.
170
171 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
172
173 * win32-low.c: Include "common-inferior.h".
174
175 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
176
177 * inferiors.c (set_inferior_cwd): New function.
178 * server.c (handle_general_set): Handle QSetWorkingDir packet.
179 (handle_query): Inform that QSetWorkingDir is supported.
180 * win32-low.c (create_process): Pass the inferior's cwd to
181 CreateProcess.
182
183 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
184
185 * inferiors.c (current_inferior_cwd): New global variable.
186 (get_inferior_cwd): New function.
187 * inferiors.h (struct process_info) <cwd>: New field.
188
189 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
190
191 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
192 (OBS): Add gdb_tilde_expand.o.
193
194 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
195
196 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
197 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
198
199 2017-09-29 Pedro Alves <palves@redhat.com>
200
201 * ax.c (gdb_parse_agent_expr): Constify.
202 * ax.h (gdb_parse_agent_expr): Constify.
203 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
204 Constify.
205 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
206 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
207 * remote-utils.h (read_ptid): Constify.
208 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
209 (process_point_options, process_serial_event): Constify.
210 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
211 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
212 (cmd_qtbuffer): Constify.
213
214 2017-09-29 Pedro Alves <palves@redhat.com>
215
216 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
217 fails.
218
219 2017-09-29 Pedro Alves <palves@redhat.com>
220
221 * linux-low.c (handle_extended_wait): Pass parent thread instead
222 of process to thread_db_notice_clone.
223 * linux-low.h (thread_db_notice_clone): Replace parent process
224 parameter with parent thread parameter.
225 * thread-db.c (find_one_thread): Add comment.
226 (thread_db_notice_clone): Replace parent process parameter with
227 parent thread parameter. Temporarily switch to the parent thread.
228
229 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
230
231 * gdbthread.h: Include "common-gdbthread.h".
232 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
233 "if" when validating the ptid.
234 * remote-utils.c: Include "gdbthread.h".
235 (prepare_resume_reply): Use "switch_to_thread".
236 * target.c (done_accessing_memory): Likewise.
237
238 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
239
240 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
241 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
242 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
243 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
244 s390x-gs-linux64-ipa.o to ipa_obj.
245 * linux-s390-low.c (HWCAP_S390_GS): New define.
246 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
247 New functions.
248 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
249 (s390_arch_setup): Check for guarded-storage support and choose
250 appropriate tdesc.
251 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
252 init_registers_s390x_gs_linux64.
253 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
254 enum value.
255 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
256 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
257
258 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
259
260 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
261
262 2017-09-21 Kevin Buettner <kevinb@redhat.com>
263
264 * linux-low.h (struct lwp_info): Add new field, thread_handle.
265 (thread_db_thread_handle): Declare.
266 * linux-low.c (linux_target_ops): Initialize thread_handle.
267 * server.c (handle_qxfer_threads_worker): Add support for
268 "handle" attribute.
269 * target.h (struct target_ops): Add new function pointer,
270 thread_handle.
271 (target_thread_handle): Define.
272 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
273 field in lwp.
274 (thread_db_thread_handle): New function.
275
276 2017-09-21 Kevin Buettner <kevinb@redhat.com>
277
278 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
279 * linux-low.h (thread_db_notice_clone): Declare.
280 * thread-db.c (thread_db_notice_clone): New function.
281
282 2017-09-21 Pedro Alves <palves@redhat.com>
283
284 * server.c (gdb_read_memory, handle_status, process_serial_event)
285 (handle_serial_event, handle_target_event): Adjust to
286 set_desired_thread prototype change.
287 * target.c (set_desired_thread): Remove 'use_general' parameter
288 and adjust.
289 * target.h (set_desired_thread): Remove 'use_general' parameter.
290
291 2017-09-20 Tom Tromey <tom@tromey.com>
292
293 * target.c (target_terminal::terminal_state): Define.
294 (target_terminal::init): Rename from target_terminal_init.
295 (target_terminal::inferior): Rename from
296 target_terminal_inferior.
297 (target_terminal::ours): Rename from target_terminal_ours.
298 (target_terminal::ours_for_output, target_terminal::info): New.
299
300 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
301
302 * server.c (accumulate_file_name_length): Remove.
303 (emit_dll_description): Adjust to std::string change.
304 (handle_qxfer_libraries): Use std::string to hold document.
305
306 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
307
308 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
309 return type of xml_escape_text.
310 * server.c (emit_dll_description): Likewise.
311
312 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
313
314 * server.c (captured_main): Accept argument for --selftest.
315 Update run_tests call.
316 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
317 when registering selftests.
318
319 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
320
321 * regcache.c (get_thread_regcache): Update code to use "std::vector"
322 instead of "VEC" for "target_desc.reg_defs".
323 (regcache_cpy): Likewise.
324 (registers_to_string): Likewise.
325 (registers_from_string): Likewise.
326 (find_regno): Likewise.
327 (supply_regblock): Likewise.
328 (regcache_raw_read_unsigned): Likewise.
329 * tdesc.c (init_target_desc): Likewise.
330 (tdesc_create_reg): Likewise.
331 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
332 (struct target_desc) <reg_defs>: Convert to "std::vector".
333 (target_desc): Do not initialize "reg_defs".
334 (~target_desc): Update code to use "std::vector" instead of "VEC"
335 for "target_desc.reg_defs".
336 (operator==): Likewise.
337
338 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
339
340 * inferiors.h (thread_to_gdb_id): Remove.
341 * inferiors.c (thread_to_gdb_id): Remove.
342 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
343 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
344 lynx_store_registers, lynx_read_memory, lynx_write_memory):
345 Likewise.
346 * nto-low.c (nto_fetch_registers, nto_store_registers,
347 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
348
349 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
350
351 * inferiors.h (gdb_id_to_thread_id): Remove.
352 * inferiors.c (gdb_id_to_thread_id): Remove.
353 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
354 removal. Move pid declaration closer to where it's used.
355
356 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
357
358 * server.c (handle_detach): New function.
359 (process_serial_event): Move code out, call handle_detach.
360
361 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
362
363 * server.c (require_running): Rename to ...
364 (require_running_or_return): ... this ...
365 (require_running_or_break): ... and this.
366 (handle_query, process_serial_event): Adjust.
367
368 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
369
370 * linux-low.c (linux_set_resume_request): Remove unused
371 variables.
372
373 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
374
375 * server.c (first_thread_of): Remove.
376 (process_serial_event): Replace usage of first_thread_of with
377 find_any_thread_of_pid.
378 * tracepoint.c (same_process_p): Remove.
379 (gdb_agent_about_to_close): Replace usage of same_process_p with
380 find_any_thread_of_pid.
381 * linux-x86-low.c (same_process_callback): Remove.
382 (x86_arch_setup_process_callback): Replace usage of
383 same_process_callback with find_any_thread_of_pid.
384 * thread-db.c (any_thread_of): Remove.
385 (switch_to_process): Replace usage of any_thread_of with
386 find_any_thread_of_pid.
387 * inferiors.c (thread_pid_matches_callback): Remove.
388 (find_thread_process): Adjust to use find_any_thread_of_pid.
389
390 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
391
392 * regcache.c (get_thread_regcache): Guard calls to "memset"
393 with "!VEC_empty".
394
395 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
396
397 * linux-low.c (handle_extended_wait): Use
398 "allocate_target_description" instead of "XNEW".
399 * linux-x86-low.c (initialize_low_arch): Likewise.
400
401 2017-09-05 Yao Qi <yao.qi@linaro.org>
402
403 * configure.srv (srv_i386_regobj): Remove.
404 (srv_amd64_regobj): Remove.
405 (srv_regobj): Set it to "" for x86 non-linux targets.
406 * linux-x86-tdesc.c (i386_linux_read_description):
407 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
408 (init_registers_i386): Remove the declaration.
409 (tdesc_i386): Remove the declaration.
410 (lynx_i386_arch_setup): Call i386_create_target_description.
411 * nto-x86-low.c: Likewise.
412 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
413 [!__x86_64__]: include arch/i386.h.
414 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
415
416 2017-09-05 Yao Qi <yao.qi@linaro.org>
417
418 * configure.srv (srv_amd64_linux_xmlfiles): Remove
419 i386/amd64-XXX-linux from it.
420
421 2017-09-05 Yao Qi <yao.qi@linaro.org>
422
423 * configure.srv: Empty srv_amd64_linux_regobj if $development is
424 false.
425 (ipa_amd64_linux_regobj): Remove.
426 (ipa_x32_linux_regobj): Remove.
427
428 2017-09-05 Yao Qi <yao.qi@linaro.org>
429
430 * Makefile.in (arch-amd64.o): New rule.
431 * configure.srv: Append arch-amd64.o.
432 * linux-amd64-ipa.c: Include common/x86-xstate.h.
433 (get_ipa_tdesc): Call amd64_linux_read_description.
434 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
435 and init_registers_amd64_XXX.
436 * linux-x86-low.c (x86_linux_read_description): Call
437 amd64_linux_read_description.
438 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
439 (initialize_low_arch): Don't call init_registers_x32_XXX and
440 init_registers_amd64_XXX.
441 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
442 and tdesc_amd64_XXX.
443 [__x86_64__] (amd64_tdesc_test): New function.
444 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
445 and init_registers_amd64_XXX.
446 * linux-x86-tdesc.c: Include arch/amd64.h.
447 (xcr0_to_tdesc_idx): New function.
448 (i386_linux_read_description): New function.
449 (amd64_get_ipa_tdesc_idx): New function.
450 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
451 (amd64_get_ipa_tdesc): Declare.
452
453 2017-09-05 Yao Qi <yao.qi@linaro.org>
454
455 * configure.srv (srv_i386_linux_xmlfiles): Remove
456 i386/i386-XXX-linux.xml from it.
457
458 2017-09-05 Yao Qi <yao.qi@linaro.org>
459
460 * configure.srv: Set srv_i386_linux_regobj empty if $development
461 is false.
462 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
463 initialize_low_tdesc.
464 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
465 with #if initialize_low_tdesc.
466 * linux-x86-tdesc-selftest.c: New file.
467 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
468
469 2017-09-05 Yao Qi <yao.qi@linaro.org>
470
471 * Makefile.in (arch-i386.o): New rule.
472 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
473 (x86_64-*-linux*): Likewise.
474 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
475 include arch/i386.h.
476 (i386_linux_read_description): Remove code and call
477 i386_create_target_description.
478 * tdesc.c (allocate_target_description): New function.
479 * tdesc.h (set_tdesc_architecture): Remove declaration.
480 (set_tdesc_osabi): Likewise.
481
482 2017-09-05 Yao Qi <yao.qi@linaro.org>
483
484 * linux-x86-tdesc.c: Don't include <inttypes.h>.
485 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
486 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
487 .xmltarget.
488 * server.c (get_features_xml): Call tdesc_get_features_xml.
489 * tdesc.c (set_tdesc_architecture): New function.
490 (set_tdesc_osabi): New function.
491 (tdesc_get_features_xml): New function.
492 (tdesc_create_feature): Add an argument.
493 * tdesc.h (struct target_desc) <features>: New field.
494 <arch, osabi>: New field.
495 (~target_desc): xfree features, arch, and osabi.
496 (target_desc::oerator==): Don't compare .xmltarget.
497 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
498 (set_tdesc_osabi): Likewise.
499 (tdesc_get_features_xml): Likewise.
500
501 2017-09-05 Yao Qi <yao.qi@linaro.org>
502
503 * linux-x86-tdesc.c: Include selftest.h.
504 (i386_tdesc_test): New function.
505 (initialize_low_tdesc): Call selftests::register_test.
506 * tdesc.h: Include regdef.h.
507 (target_desc): Override operator == and !=.
508
509 2017-09-05 Yao Qi <yao.qi@linaro.org>
510
511 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
512 (ipa_obj): Likewise.
513 * linux-i386-ipa.c: Include common/x86-xstate.h
514 (get_ipa_tdesc): Call i386_linux_read_description.
515 (initialize_low_tracepoint): Don't call init_registers_XXX
516 functions, call initialize_low_tdesc instead.
517 * linux-x86-low.c (x86_linux_read_description): Call
518 i386_linux_read_description.
519 (initialize_low_arch): Don't call init_registers_i386_XXX
520 functions, call initialize_low_tdesc.
521 * linux-x86-tdesc.c: New file.
522 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
523 (i386_get_ipa_tdesc_idx): Declare.
524 (i386_get_ipa_tdesc): Declare.
525 (initialize_low_tdesc): Declare.
526
527 2017-09-05 Yao Qi <yao.qi@linaro.org>
528
529 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
530 instead of 0.
531
532 2017-09-05 Yao Qi <yao.qi@linaro.org>
533
534 * Makefile.in (IPA_OBJS): Add vec-ipa.o
535 * regcache.c (get_thread_regcache): Use VEC_length.
536 (init_register_cache): Likewise.
537 (regcache_cpy): Likewise.
538 (registers_to_string): Iterate reg_defs via VEC_iterate.
539 (find_regno): Likewise.
540 (find_register_by_number): Use VEC_index.
541 (register_size): Call find_register_by_number.
542 (register_data): Call find_register_by_number.
543 (supply_regblock): Use VEC_length.
544 (regcache_raw_read_unsigned): Likewise.
545 * tdesc.c (init_target_desc): Iterate reg_defs via
546 VEC_iterate.
547 (default_description): Update initializer.
548 (copy_target_description): Don't update field num_registers.
549 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
550 <num_registers>: Remove.
551
552 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
553
554 * Makefile.in (.SECONDARY): Define target.
555
556 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
557
558 * linux-low.c (linux_wait_1): Adjust.
559 * server.c (queue_stop_reply_callback): Adjust.
560
561 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
562
563 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
564 QEnvironmentUnset and QEnvironmentReset packets.
565 (handle_query): Inform remote that QEnvironmentHexEncoded,
566 QEnvironmentUnset and QEnvironmentReset are supported.
567
568 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
569
570 * inferiors.h (inferior_target_data): Rename to ...
571 (thread_target_data): ... this.
572 (inferior_regcache_data): Rename to ...
573 (thread_regcache_data): ... this.
574 (set_inferior_regcache_data): Rename to ...
575 (set_thread_regcache_data): ... this.
576 * inferiors.c (inferior_target_data): Rename to ...
577 (thread_target_data): ... this.
578 (inferior_regcache_data): Rename to ...
579 (thread_regcache_data): ... this.
580 (set_inferior_regcache_data): Rename to ...
581 (set_thread_regcache_data): ... this.
582 (free_one_thread): Update.
583 * linux-low.h (get_thread_lwp): Update.
584 * regcache.c (get_thread_regcache): Update.
585 (regcache_invalidate_thread): Update.
586 (free_register_cache_thread): Update.
587 * win32-i386-low.c (update_debug_registers_callback): Update.
588 (win32_get_current_dr): Update.
589 * win32-low.c (thread_rec): Update.
590 (delete_thread_info): Update.
591 (continue_one_thread): Update.
592 (suspend_one_thread): Update.
593
594 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
595
596 * inferiors.c (set_inferior_target_data): Remove.
597 * inferiors.h (set_inferior_target_data): Remove.
598
599 2017-08-18 Yao Qi <yao.qi@linaro.org>
600
601 * Makefile.in (OBS): Add selftest.o.
602 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
603 * configure, config.in: Re-generated.
604 * server.c: Include common/sefltest.h.
605 (captured_main): Handle option --selftest.
606
607 2017-08-09 Yao Qi <yao.qi@linaro.org>
608
609 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
610 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
611 i386-avx-mpx.o and i386-mmx.o.
612 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
613 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
614 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
615 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
616 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
617 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
618 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
619 i386/amd64-avx-mpx.xml.
620
621 2017-08-09 Yao Qi <yao.qi@linaro.org>
622
623 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
624 and x32-avx-avx512.o.
625 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
626 i386/x32-avx-avx512.xml.
627
628 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
629
630 * tracepoint.h (enum class fast_tpoint_collect_result): New
631 enumeration.
632 (fast_tracepoint_collecting): Change return type to
633 fast_tpoint_collect_result.
634 * tracepoint.c (fast_tracepoint_collecting): Likewise.
635 * linux-low.h: Include tracepoint.h.
636 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
637 fast_tpoint_collect_result.
638 * linux-low.c (handle_tracepoints): Adjust.
639 (linux_fast_tracepoint_collecting): Change return type to
640 fast_tpoint_collect_result.
641 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
642 linux_wait_1, stuck_in_jump_pad_callback,
643 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
644 proceed_one_lwp): Adjust to type change.
645
646 2017-07-10 Yao Qi <yao.qi@linaro.org>
647
648 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
649
650 2017-06-29 Yao Qi <yao.qi@linaro.org>
651
652 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
653 Remove.
654 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
655
656 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
657
658 * Makefile.in (IPA_OBJS): Sort and format one item per line.
659
660 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
661
662 * linux-low.c (linux_create_inferior): Adjust code to access the
663 environment information via 'gdb_environ' class.
664 * lynx-low.c (lynx_create_inferior): Likewise.
665 * server.c (our_environ): Make it an instance of 'gdb_environ'.
666 (get_environ): Return a pointer to 'our_environ'.
667 (captured_main): Initialize 'our_environ'.
668 * server.h (get_environ): Adjust prototype.
669 * spu-low.c (spu_create_inferior): Adjust code to access the
670 environment information via 'gdb_environ' class.
671
672 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
673
674 * linux-low.c (linux_read_memory, linux_write_memory): Remove
675 usage of "register" keyword.
676
677 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
678
679 * configure: Re-generate.
680
681 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
682
683 * configure: Re-generate.
684
685 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
686
687 * Makefile.in (COMPILE.pre): Add "-x c++".
688
689 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
690
691 * fork-child.c: Conditionally include <signal.h>.
692
693 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
694
695 * server.c (handle_general_set): Handle new packet
696 "QStartupWithShell".
697 (handle_query): Add "QStartupWithShell" to the list of supported
698 packets.
699 (gdbserver_usage): Add help text explaining the
700 new "--startup-with-shell" and "--no-startup-with-shell" CLI
701 options.
702 (captured_main): Recognize and act upon the presence of the new
703 CLI options.
704
705 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
706 Pedro Alves <palves@redhat.com>
707
708 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
709 * configure: Regenerate.
710 * configure.srv (srv_linux_obj): Add "fork-child.o" and
711 "fork-inferior.o".
712 (i[34567]86-*-lynxos*): Likewise.
713 (spu*-*-*): Likewise.
714 * fork-child.c: New file.
715 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
716 and "environ.h".
717 (linux_ptrace_fun): New function.
718 (linux_create_inferior): Adjust function prototype to reflect
719 change on "target.h". Adjust function code to use
720 "fork_inferior".
721 (linux_request_interrupt): Delete "signal_pid".
722 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
723 (lynx_ptrace_fun): New function.
724 (lynx_create_inferior): Adjust function prototype to reflect
725 change on "target.h". Adjust function code to use
726 "fork_inferior".
727 * nto-low.c (nto_create_inferior): Adjust function prototype and
728 code to reflect change on "target.h". Update comments.
729 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
730 "common-terminal.h" and "environ.h".
731 (terminal_fd): Moved to fork-child.c.
732 (old_foreground_pgrp): Likewise.
733 (restore_old_foreground_pgrp): Likewise.
734 (last_status): Make it global.
735 (last_ptid): Likewise.
736 (our_environ): New variable.
737 (startup_with_shell): Likewise.
738 (program_name): Likewise.
739 (program_argv): Rename to...
740 (program_args): ...this.
741 (wrapper_argv): New variable.
742 (start_inferior): Delete function.
743 (get_exec_wrapper): New function.
744 (get_exec_file): Likewise.
745 (get_environ): Likewise.
746 (prefork_hook): Likewise.
747 (post_fork_inferior): Likewise.
748 (postfork_hook): Likewise.
749 (postfork_child_hook): Likewise.
750 (handle_v_run): Update code to deal with arguments coming from the
751 remote host. Update calls from "start_inferior" to
752 "create_inferior".
753 (captured_main): Likewise. Initialize environment variable. Call
754 "have_job_control".
755 * server.h (post_fork_inferior): New prototype.
756 (get_environ): Likewise.
757 (last_status): Declare.
758 (last_ptid): Likewise.
759 (signal_pid): Likewise.
760 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
761 (spu_ptrace_fun): New function.
762 (spu_create_inferior): Adjust function prototype to reflect change
763 on "target.h". Adjust function code to use "fork_inferior".
764 * target.c (target_terminal_init): New function.
765 (target_terminal_inferior): Likewise.
766 (target_terminal_ours): Likewise.
767 * target.h: Include <vector>.
768 (struct target_ops) <create_inferior>: Update prototype.
769 (create_inferior): Update macro.
770 * utils.c (gdb_flush_out_err): New function.
771 * win32-low.c (win32_create_inferior): Adjust function prototype
772 and code to reflect change on "target.h".
773
774 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
775
776 * inferiors.c (switch_to_thread): New function.
777
778 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
779
780 * Makefile.in (SFILE): Add "common/job-control.c".
781 (OBS): Add "job-control.o".
782
783 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
784
785 * Makefile: Remove "@host_makefile_frag@".
786
787 2017-05-05 Pedro Alves <palves@redhat.com>
788
789 * configure: Regenerate.
790
791 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
792
793 * configure: Regenerate.
794
795 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
796
797 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
798 software_single_step change of return type to
799 std::vector<CORE_ADDR>.
800 * linux-low.c (install_software_single_step_breakpoints):
801 Likewise.
802 * linux-low.h (install_software_single_step_breakpoints):
803 Likewise.
804
805 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
806
807 * remote-utils.c: Include "gdb_termios.h" instead of
808 "terminal.h".
809 * terminal.h: Delete file.
810
811 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
812
813 * server.c: Include <vector>.
814 <program_argv, wrapper_argv>: Convert to std::vector.
815 (start_inferior): Rewrite function to use C++.
816 (handle_v_run): Likewise. Update code that calculates the argv
817 based on the vRun packet; use C++.
818 (captured_main): Likewise.
819
820 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
821
822 * server.c (handle_v_cont): Initialize thread_resume::thread
823 with null_ptid.
824
825 2017-04-05 Pedro Alves <palves@redhat.com>
826
827 * configure: Regenerate.
828
829 2017-04-05 Pedro Alves <palves@redhat.com>
830
831 * gdbreplay.c (sync_error): Constify.
832 * linux-x86-low.c (push_opcode): Constify.
833
834 2017-04-05 Pedro Alves <palves@redhat.com>
835
836 * win32-low.c (get_child_debug_event)
837 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
838 Report TARGET_WAITKIND_SPURIOUS instead.
839
840 2017-04-05 Pedro Alves <palves@redhat.com>
841
842 * remote-utils.c (remote_prepare, remote_open): Constify.
843 * remote-utils.h (remote_prepare, remote_open): Constify.
844 * server.c (captured_main): Constify 'port' handling.
845
846 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
847
848 * Makefile.in (clean): Clear .deps.
849
850 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
851
852 * .gitignore: Remove generated files, replace with wildcard.
853 * (clean): Replace removal of generated files with wildcard.
854 (version.c): Replace with...
855 (version-generated.c): ...this.
856 (xml-builtin.c): Replace with...
857 (xml-builtin-generated.c): ...this.
858 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
859 (%.c: *regformats*): Replace with...
860 (%-generated.c: *regformats*): ...this.
861
862 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
863
864 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
865 (xtensa_fill_gregset): Call collect_register_by_name for
866 threadptr register.
867 (xtensa_store_gregset): Call supply_register_by_name for
868 threadptr register.
869
870 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
871
872 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
873 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
874 (xtensa_store_gregset): Call supply_register for all registers in
875 a0_regnum..a0_regnum + C0_NREGS range.
876
877 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
878
879 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
880 (ax-ipa.o: ax.c): Remove.
881 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
882 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
883 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
884 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
885 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
886
887 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
888
889 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
890 (print-utils-ipa.o: ../common/print-utils.c): Remove.
891 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
892 (errors-ipa.o: ../common/errors.c): Remove.
893 (format-ipa.o: ../common/format.c): Remove.
894 (common-utils-ipa.o: ../common/common-utils.c): Remove.
895
896 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * Makefile.in (%-ipa.o: %.c): New rule.
899 (tracepoint-ipa.o: tracepoint.c): Remove.
900 (utils-ipa.o: utils.c): Remove.
901 (remote-utils-ipa.o: remote-utils.c): Remove.
902 (regcache-ipa.o: regcache.c): Remove.
903 (i386-linux-ipa.o: i386-linux.c): Remove.
904 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
905 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
906 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
907 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
908 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
909 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
910 (amd64-linux-ipa.o: amd64-linux.c): Remove.
911 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
912 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
913 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
914 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
915 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
916 (aarch64-ipa.o: aarch64.c): Remove.
917 (s390-linux32-ipa.o: s390-linux32.c): Remove.
918 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
919 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
920 (s390-linux64-ipa.o: s390-linux64.c): Remove.
921 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
922 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
923 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
924 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
925 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
926 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
927 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
928 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
929 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
930 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
931 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
932 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
933 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
934 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
935 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
936 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
937 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
938 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
939 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
940 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
941 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
942 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
943 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
944 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
945 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
946 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
947 (tdesc-ipa.o: tdesc.c): Remove.
948 (x32-linux-ipa.o: x32-linux.c): Remove.
949 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
950 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
951
952 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
953
954 * Makefile.in (%.o: ../arch/%.c): New rule.
955 (arm.o: ../arch/arm.c): Remove.
956 (arm-linux.o: ../arch/arm-linux.c): Remove.
957 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
958 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
959
960 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
961
962 * Makefile.in (%.o: ../nat/%.c): New rule.
963 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
964 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
965 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
966 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
967 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
968 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
969 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
970 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
971 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
972 (linux-personality.o: ../nat/linux-personality.c): Remove.
973 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
974 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
975 (x86-linux.o: ../nat/x86-linux.c): Remove.
976 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
977 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
978
979 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * Makefile.in (%.o: ../common/%.c): New rule.
982 (signals.o: ../common/signals.c): Remove.
983 (print-utils.o: ../common/print-utils.c): Remove.
984 (rsp-low.o: ../common/rsp-low.c): Remove.
985 (common-utils.o: ../common/common-utils.c): Remove.
986 (posix-strerror.o: ../common/posix-strerror.c): Remove.
987 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
988 (vec.o: ../common/vec.c): Remove.
989 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
990 (xml-utils.o: ../common/xml-utils.c): Remove.
991 (ptid.o: ../common/ptid.c): Remove.
992 (buffer.o: ../common/buffer.c): Remove.
993 (format.o: ../common/format.c): Remove.
994 (filestuff.o: ../common/filestuff.c): Remove.
995 (agent.o: ../common/agent.c): Remove.
996 (errors.o: ../common/errors.c): Remove.
997 (environ.o: ../common/environ.c): Remove.
998 (common-debug.o: ../common/common-debug.c): Remove.
999 (cleanups.o: ../common/cleanups.c): Remove.
1000 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1001 (fileio.o: ../common/fileio.c): Remove.
1002 (common-regcache.o: ../common/common-regcache.c): Remove.
1003 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1004 (new-op.o: ../common/new-op.c): Remove.
1005 (btrace-common.o: ../common/btrace-common.c): Remove.
1006
1007 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1008
1009 * Makefile.in (%.o: ../target/%.c): New rule.
1010 (waitstatus.o: ../target/waitstatus.c): Remove.
1011
1012 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1013
1014 * Makefile.in
1015 (%.c: ../regformats/%.dat,
1016 (%.c: ../regformats/arm/%.dat,
1017 (%.c: ../regformats/i386/%.dat,
1018 (%.c: ../regformats/rs6000/%.dat): New rules.
1019 (aarch64.c): Remove.
1020 (reg-arm.c): Remove.
1021 (arm-with-iwmmxt.c): Remove.
1022 (arm-with-vfpv2.c): Remove.
1023 (arm-with-vfpv3.c): Remove.
1024 (arm-with-neon.c): Remove.
1025 (reg-bfin.c): Remove.
1026 (reg-cris.c): Remove.
1027 (reg-crisv32.c): Remove.
1028 (i386.c): Remove.
1029 (i386-linux.c): Remove.
1030 (i386-avx.c): Remove.
1031 (i386-avx-linux.c): Remove.
1032 (i386-avx-avx512.c): Remove.
1033 (i386-avx-avx512-linux.c): Remove.
1034 (i386-mpx.c): Remove.
1035 (i386-mpx-linux.c): Remove.
1036 (i386-avx-mpx-avx512-pku.c): Remove.
1037 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1038 (i386-avx-mpx.c): Remove.
1039 (i386-avx-mpx-linux.c): Remove.
1040 (i386-mmx.c): Remove.
1041 (i386-mmx-linux.c): Remove.
1042 (reg-ia64.c): Remove.
1043 (reg-m32r.c): Remove.
1044 (reg-m68k.c): Remove.
1045 (reg-cf.c): Remove.
1046 (mips-linux.c): Remove.
1047 (mips-dsp-linux.c): Remove.
1048 (mips64-linux.c): Remove.
1049 (mips64-dsp-linux.c): Remove.
1050 (nios2-linux.c): Remove.
1051 (powerpc-32.c): Remove.
1052 (powerpc-32l.c): Remove.
1053 (powerpc-altivec32l.c): Remove.
1054 (powerpc-cell32l.c): Remove.
1055 (powerpc-vsx32l.c): Remove.
1056 (powerpc-isa205-32l.c): Remove.
1057 (powerpc-isa205-altivec32l.c): Remove.
1058 (powerpc-isa205-vsx32l.c): Remove.
1059 (powerpc-e500l.c): Remove.
1060 (powerpc-64l.c): Remove.
1061 (powerpc-altivec64l.c): Remove.
1062 (powerpc-cell64l.c): Remove.
1063 (powerpc-vsx64l.c): Remove.
1064 (powerpc-isa205-64l.c): Remove.
1065 (powerpc-isa205-altivec64l.c): Remove.
1066 (powerpc-isa205-vsx64l.c): Remove.
1067 (s390-linux32.c): Remove.
1068 (s390-linux32v1.c): Remove.
1069 (s390-linux32v2.c): Remove.
1070 (s390-linux64.c): Remove.
1071 (s390-linux64v1.c): Remove.
1072 (s390-linux64v2.c): Remove.
1073 (s390-te-linux64.c): Remove.
1074 (s390-vx-linux64.c): Remove.
1075 (s390-tevx-linux64.c): Remove.
1076 (s390x-linux64.c): Remove.
1077 (s390x-linux64v1.c): Remove.
1078 (s390x-linux64v2.c): Remove.
1079 (s390x-te-linux64.c): Remove.
1080 (s390x-vx-linux64.c): Remove.
1081 (s390x-tevx-linux64.c): Remove.
1082 (tic6x-c64xp-linux.c): Remove.
1083 (tic6x-c64x-linux.c): Remove.
1084 (tic6x-c62x-linux.c): Remove.
1085 (reg-sh.c): Remove.
1086 (reg-sparc64.c): Remove.
1087 (reg-spu.c): Remove.
1088 (amd64.c): Remove.
1089 (amd64-linux.c): Remove.
1090 (amd64-avx.c): Remove.
1091 (amd64-avx-linux.c): Remove.
1092 (amd64-avx-avx512.c): Remove.
1093 (amd64-avx-avx512-linux.c): Remove.
1094 (amd64-mpx.c): Remove.
1095 (amd64-mpx-linux.c): Remove.
1096 (amd64-avx-mpx-avx512-pku.c): Remove.
1097 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1098 (amd64-avx-mpx.c): Remove.
1099 (amd64-avx-mpx-linux.c): Remove.
1100 (x32.c): Remove.
1101 (x32-linux.c): Remove.
1102 (x32-avx.c): Remove.
1103 (x32-avx-linux.c): Remove.
1104 (x32-avx-avx512.c): Remove.
1105 (x32-avx-avx512-linux.c): Remove.
1106 (reg-xtensa.c): Remove.
1107 (reg-tilegx.c): Remove.
1108 (reg-tilegx32.c): Remove.
1109
1110 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1111
1112 * Makefile.in (SFILES): Add "common/environ.c".
1113 (OBJS): Add "common/environ.h".
1114
1115 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1116
1117 * configure.ac: Check if the fs_base and gs_base members of
1118 `struct user_regs_struct' exist.
1119 * config.in: Regenerated.
1120 * configure: Likewise.
1121
1122 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1123
1124 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1125 target_read_memory.
1126 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1127 (get_next_pcs_syscall_next_pc): Likewise.
1128
1129 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1130
1131 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1132 * nto-x86-low.c: Likewise.
1133
1134 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1135
1136 * Makefile.in: Include disable-implicit-rules.mk.
1137
1138 2016-11-23 Pedro Alves <palves@redhat.com>
1139
1140 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1141 (debug_vprintf): Use std::chrono::steady_clock instead of
1142 gettimeofday. Use '.' instead of ':'.
1143 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1144 (get_timestamp): Use std::chrono::steady_clock instead of
1145 gettimeofday.
1146
1147 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1148
1149 * Makefile.in: Fix whitespace formatting.
1150
1151 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1152
1153 * Makefile.in (SFILES, OBS): Flatten list and order
1154 alphabetically.
1155
1156 2016-11-23 Pedro Alves <palves@redhat.com>
1157
1158 * event-loop.c (handle_file_event): Use warning.
1159 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1160 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1161 Use warning.
1162
1163 2016-11-23 Pedro Alves <palves@redhat.com>
1164
1165 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1166 output.
1167 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1168 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1169 debug_printf and debug_flush for debug output.
1170 * server.c (handle_general_set): Likewise.
1171 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1172 output.
1173
1174 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1175
1176 * Makefile.in (.c.o): Replace rule with ...
1177 (%.o: %.c): ... this one.
1178
1179 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1180
1181 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1182 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1183 make.
1184 * configure.ac: Remove checks for the make program.
1185 * configure: Re-generate.
1186
1187 2016-10-28 Pedro Alves <palves@redhat.com>
1188
1189 * Makefile.in (CXX_DIALECT): Get from configure.
1190 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1191 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1192 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1193 * config.in: Regenerate.
1194 * configure: Regenerate.
1195
1196 2016-10-27 Yao Qi <yao.qi@linaro.org>
1197
1198 * linux-low.c (linux_supports_range_stepping): Return true if
1199 can_software_single_step return true.
1200
1201 2016-10-27 Yao Qi <yao.qi@linaro.org>
1202
1203 * inferiors.c (find_inferior_in_random): New function.
1204 * inferiors.h (find_inferior_in_random): Declare.
1205 * linux-low.c (linux_wait_for_event_filtered): Call
1206 find_inferior_in_random instead of find_inferior.
1207
1208 2016-10-27 Yao Qi <yao.qi@linaro.org>
1209
1210 * linux-low.c (linux_wait_1): If single-step breakpoints are
1211 inserted, remove them.
1212
1213 2016-10-26 Pedro Alves <palves@redhat.com>
1214
1215 * linux-low.c (handle_extended_wait): Link parent/child fork
1216 threads.
1217 (linux_wait_1): Unlink them.
1218 (linux_set_resume_request): Ignore resume requests for
1219 already-resumed and unhandled fork child threads.
1220 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1221 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1222 New functions.
1223 (handle_v_requests) <vCont>: Don't call require_running.
1224 * server.h (in_queued_stop_replies): New declaration.
1225
1226 2016-10-24 Yao Qi <yao.qi@linaro.org>
1227
1228 PR server/20733
1229 * linux-aarch64-low.c (append_insns): Cast the return value to
1230 'uint32_t *'.
1231
1232 2016-10-10 Yao Qi <yao.qi@linaro.org>
1233
1234 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1235
1236 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1237
1238 * target.c (target_supports_multi_process): New function, moved
1239 from...
1240 * target.h (target_supports_multi_process): ... here. Remove
1241 macro.
1242
1243 2016-10-05 Tom Tromey <tom@tromey.com>
1244
1245 PR remote/20655:
1246 * tracepoint.c (handle_tracepoint_bkpts): Check
1247 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1248
1249 2016-10-05 Yao Qi <yao.qi@linaro.org>
1250
1251 * configure.srv: Update the path of arm-*.xml files.
1252
1253 2016-10-05 Terry Guo <terry.guo@arm.com>
1254 Yao Qi <yao.qi@linaro.org>
1255
1256 * Makefile.in: Adjust the path of rules.
1257 * configure.srv: Update the path of xml files.
1258 * regformats/arm-with-iwmmxt.dat: Regenerated.
1259 * regformats/arm-with-neon.dat: Likewise.
1260 * regformats/arm-with-vfpv2.dat: Likewise.
1261 * regformats/arm-with-vfpv3.dat Likewise.
1262
1263 2016-09-30 Yao Qi <yao.qi@linaro.org>
1264
1265 PR gdbserver/20627
1266 * target.c (target_stop_and_wait): Don't call
1267 target_continue_no_signal, use resume_stop instead.
1268
1269 2016-09-26 Yao Qi <yao.qi@linaro.org>
1270
1271 * linux-low.c (linux_wait_1): Call debug_exit.
1272
1273 2016-09-23 Pedro Alves <palves@redhat.com>
1274
1275 * Makefile.in (SFILES): Add common/new-op.c.
1276 (OBS): Add common/new-op.o.
1277 (new-op.o): New rule.
1278
1279 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1280
1281 * .gitinore: Ignore more files.
1282
1283 2016-09-21 Yao Qi <yao.qi@linaro.org>
1284
1285 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1286 23.
1287
1288 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1289
1290 * server.c (start_inferior): Call target_mourn_inferior instead of
1291 mourn_inferior; pass ptid_t argument to it.
1292 (resume): Likewise.
1293 (handle_target_event): Likewise.
1294 * target.c (target_mourn_inferior): New function.
1295 * target.h (mourn_inferior): Delete macro.
1296
1297 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1298
1299 * linux-low.c (lwp_is_stepping): New function.
1300
1301 2016-09-06 Carl Love <cel@us.ibm.com>
1302
1303 * server.c (start_inferior): Fixed comment, requested comment change
1304 didn't get updated correctly. Removed reference to ptrace () call as
1305 it is only true on Linux systems.
1306
1307 2016-09-06 Carl Love <cel@us.ibm.com>
1308
1309 * server.c (start_inferior): Do not call
1310 function target_post_create_inferior () if the
1311 inferior process has already exited.
1312
1313 2016-09-05 Pedro Alves <palves@redhat.com>
1314
1315 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1316 (COMPILE.pre, CC_LD): Use CXX directly.
1317 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1318 * acinclude.m4: Don't include build-with-cxx.m4.
1319 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1320 * configure: Regenerate.
1321
1322 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1323
1324 PR gdb/19495
1325 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1326 call writing data to own_buf.
1327
1328 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1329
1330 * target.c (mywait): Call target_wait instead of
1331 the_target->wait.
1332 (target_wait): New function.
1333
1334 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1335
1336 * server.c (start_inferior): New variable 'ptid'. Replace calls
1337 to the_target->resume by target_continue{,_no_signal}, depending
1338 on the case.
1339 * target.c (target_stop_and_wait): Call target_continue_no_signal
1340 instead of the_target->resume.
1341 (target_continue): New function.
1342
1343 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1344
1345 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1346
1347 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1348
1349 PR server/20491
1350 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1351 ps_prochandle.
1352 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1353 * linux-arm-low.c (ps_get_thread_area): Likewise.
1354 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1355 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1356 * linux-mips-low.c (ps_get_thread_area): Likewise.
1357 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1358 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1359 * linux-x86-low.c (ps_get_thread_area): Likewise.
1360 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1361
1362 2016-08-19 Pedro Alves <palves@redhat.com>
1363
1364 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1365
1366 2016-08-19 Pedro Alves <palves@redhat.com>
1367
1368 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1369 comment. Use memcpy instead of casting through unsigned long.
1370
1371 2016-08-19 Pedro Alves <palves@redhat.com>
1372
1373 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1374 allocating around 0x80000000.
1375
1376 2016-08-19 Pedro Alves <palves@redhat.com>
1377
1378 PR gdb/20415
1379 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1380 (x32-avx512-linux-ipa.o): New rules.
1381 * configure.ac (x86_64-*-linux*): New x32 check.
1382 * configure.srv (ipa_x32_linux_regobj): New.
1383 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1384 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1385 descriptions.
1386 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1387 descriptions.
1388 * configure: Regenerate.
1389
1390 2016-08-09 Pedro Alves <palves@redhat.com>
1391
1392 PR gdb/18653
1393 * Makefile.in (OBS): Add signals-state-save-restore.o.
1394 (signals-state-save-restore.o): New rule.
1395 * config.in: Regenerate.
1396 * configure: Regenerate.
1397 * linux-low.c: Include "signals-state-save-restore.h".
1398 (linux_create_inferior): Call
1399 restore_original_signals_state.
1400 * server.c: Include "dispositions-save-restore.h".
1401 (captured_main): Call save_original_signals_state.
1402
1403 2016-08-05 Pedro Alves <palves@redhat.com>
1404
1405 * configure: Regenerate.
1406
1407 2016-08-04 Yao Qi <yao.qi@linaro.org>
1408
1409 * linux-low.c (regsets_fetch_inferior_registers): Check
1410 errno is ESRCH or not.
1411
1412 2016-08-02 Yao Qi <yao.qi@linaro.org>
1413
1414 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1415 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1416 (thread_db_load_search): Update.
1417 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1418 td_ta_set_event and td_ta_event_getmsg.
1419
1420 2016-07-26 Pedro Alves <palves@redhat.com>
1421
1422 PR server/20414
1423 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1424 of unsigned long for 64-bit registers and use uint32_t instead of
1425 unsigned int for 32-bit registers.
1426
1427 2016-07-26 Pedro Alves <palves@redhat.com>
1428
1429 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1430 to 'ptrace'.
1431
1432 2016-07-21 Tom Tromey <tom@tromey.com>
1433
1434 * configure: Rebuild.
1435
1436 2016-07-21 Yao Qi <yao.qi@linaro.org>
1437
1438 * mem-break.c (find_gdb_breakpoint): Cast bp to
1439 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1440
1441 2016-07-21 Yao Qi <yao.qi@linaro.org>
1442
1443 * server.c (handle_v_requests): Support s and S actions
1444 if target_supports_software_single_step return true.
1445
1446 2016-07-21 Yao Qi <yao.qi@linaro.org>
1447
1448 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1449 is resume_step, call maybe_hw_step.
1450 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1451 and unstop them.
1452 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1453 breakpoints or not.
1454 (proceed_one_lwp): If resume request is resume_step, install
1455 reinsert breakpoints and call maybe_hw_step.
1456
1457 2016-07-21 Yao Qi <yao.qi@linaro.org>
1458
1459 * linux-low.c (proceed_one_lwp): Declare.
1460 (linux_resume_one_thread): Remove local variable 'step'.
1461 Lift code enqueue signal. Call proceed_one_lwp instead of
1462 linux_resume_one_lwp.
1463
1464 2016-07-21 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-low.c (linux_resume_one_thread): Call
1467 enqueue_pending_signal.
1468
1469 2016-07-21 Yao Qi <yao.qi@linaro.org>
1470
1471 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1472 * inferiors.c (do_restore_current_thread_cleanup): New function.
1473 (make_cleanup_restore_current_thread): Likewise.
1474 * linux-low.c (install_software_single_step_breakpoints): Call
1475 make_cleanup_restore_current_thread. Switch current_thread to
1476 thread.
1477
1478 2016-07-21 Yao Qi <yao.qi@linaro.org>
1479
1480 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1481 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1482 (clone_one_breakpoint): Likewise.
1483 (delete_reinsert_breakpoints): Change parameter to thread.
1484 Callers updated.
1485 (has_reinsert_breakpoints): Likewise.
1486 (uninsert_reinsert_breakpoints): Likewise.
1487 (reinsert_reinsert_breakpoints): Likewise.
1488 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1489 (delete_reinsert_breakpoints): Likewise.
1490 (reinsert_reinsert_breakpoints): Likewise.
1491 (uninsert_reinsert_breakpoints): Likewise.
1492 (has_reinsert_breakpoints): Likewise.
1493
1494 2016-07-21 Yao Qi <yao.qi@linaro.org>
1495
1496 * inferiors.c (get_thread_process): Make parameter const.
1497 * inferiors.h (get_thread_process): Update declaration.
1498 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1499 Add new parameters child_thread and parent_thread. Callers
1500 updated.
1501 * mem-break.h (clone_all_breakpoints): Update declaration.
1502
1503 2016-07-21 Yao Qi <yao.qi@linaro.org>
1504
1505 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1506 <command_list, handler>: Remove.
1507 (struct gdb_breakpoint): New.
1508 (struct other_breakpoint): New.
1509 (struct reinsert_breakpoint): New.
1510 (is_gdb_breakpoint): New function.
1511 (any_persistent_commands): Update command_list if
1512 is_gdb_breakpoint returns true.
1513 (set_breakpoint): Create breakpoints according to their types.
1514 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1515 (set_gdb_breakpoint_1): Likewise.
1516 (set_gdb_breakpoint): Likewise.
1517 (clear_breakpoint_conditions): Change parameter type to
1518 'struct gdb_breakpoint *'.
1519 (clear_breakpoint_commands): Likewise.
1520 (clear_breakpoint_conditions_and_commands): Likewise.
1521 (add_condition_to_breakpoint): Likewise.
1522 (add_breakpoint_condition): Likewise.
1523 (add_commands_to_breakpoint): Likewise.
1524 (check_breakpoints): Check other_breakpoint.
1525 (clone_one_breakpoint): Clone breakpopint according to its type.
1526 * mem-break.h (struct gdb_breakpoint): Declare.
1527 (set_gdb_breakpoint): Update declaration.
1528 (clear_breakpoint_conditions_and_commands): Likewise.
1529 (add_breakpoint_condition): Likewise.
1530 (add_breakpoint_commands): Likewise.
1531 * server.c (process_point_options): Change parameter type to
1532 'struct gdb_breakpoint *'.
1533
1534 2016-07-21 Yao Qi <yao.qi@linaro.org>
1535
1536 * mem-break.c (set_breakpoint_at): Rename it to ...
1537 (set_breakpoint_type_at): ... it.
1538 (set_breakpoint_at): Call set_breakpoint_type_at.
1539 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1540 * mem-break.h (set_breakpoint_at): Update comments.
1541
1542 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1543
1544 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1545 to buf parameter.
1546 (nios2_store_gregset): Likewise.
1547
1548 2016-07-01 Pedro Alves <palves@redhat.com>
1549 Antoine Tremblay <antoine.tremblay@ericsson.com>
1550
1551 * linux-low.c: Change interface to take the target lwp_info
1552 pointer directly and return void. Handle detaching from a zombie
1553 thread.
1554 (linux_detach_lwp_callback): New function.
1555 (linux_detach): Detach from the leader thread after detaching from
1556 the clone threads.
1557
1558 2016-06-28 Yao Qi <yao.qi@linaro.org>
1559
1560 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1561 for variable new_offset.
1562 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1563 (aarch64_ftrace_insn_reloc_cb): Likewise.
1564 (aarch64_ftrace_insn_reloc_tb): Likewise.
1565 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1566 PRIx64 instead of PRIx32.
1567
1568 2016-06-28 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1571 (the_low_target): Install arm_get_syscall_trapinfo.
1572
1573 2016-06-28 Yao Qi <yao.qi@linaro.org>
1574
1575 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1576 function.
1577 (the_low_target): Install aarch64_get_syscall_trapinfo.
1578
1579 2016-06-28 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1582 Callers updated.
1583 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1584 Remove parameter sysno.
1585 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1586 sysret.
1587
1588 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1589
1590 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1591 (s390_emit_ne_goto): Likewise.
1592 (s390_emit_lt_goto): Likewise.
1593 (s390_emit_le_goto): Likewise.
1594 (s390_emit_gt_goto): Likewise.
1595 (s390_emit_ge_goto): Likewise.
1596 (s390x_emit_eq_goto): Likewise.
1597 (s390x_emit_ne_goto): Likewise.
1598 (s390x_emit_lt_goto): Likewise.
1599 (s390x_emit_le_goto): Likewise.
1600 (s390x_emit_gt_goto): Likewise.
1601 (s390x_emit_ge_goto): Likewise.
1602 (s390_emit_ops_impl): Mark variable static.
1603 (s390x_emit_ops): Likewise.
1604
1605 2016-06-17 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-low.c (handle_extended_wait): Call
1608 uninsert_reinsert_breakpoints for the parent process. Remove
1609 reinsert breakpoints from the child process. Reinsert them to
1610 the parent process when vfork is done.
1611 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1612 (reinsert_reinsert_breakpoints): New function.
1613 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1614 (reinsert_reinsert_breakpoints): Declare.
1615
1616 2016-06-17 Yao Qi <yao.qi@linaro.org>
1617
1618 * linux-low.c (handle_extended_wait): If the parent is doing
1619 step-over, remove the reinsert breakpoints from the forked child.
1620
1621 2016-06-17 Yao Qi <yao.qi@linaro.org>
1622
1623 * linux-low.c (unsuspend_all_lwps): Declare.
1624 (linux_low_filter_event): If thread exited, call finish_step_over.
1625 If step-over is finished, unsuspend other threads.
1626
1627 2016-06-17 Yao Qi <yao.qi@linaro.org>
1628
1629 * linux-low.c (linux_resume_one_lwp_throw): Assert
1630 has_reinsert_breakpoints returns false.
1631 * mem-break.c (delete_disabled_breakpoints): Assert
1632 bp type isn't reinsert_breakpoint.
1633
1634 2016-06-17 Yao Qi <yao.qi@linaro.org>
1635
1636 * linux-low.c (maybe_hw_step): New function.
1637 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1638 (finish_step_over): Switch current_thread to lwp temporarily,
1639 and assert has_reinsert_breakpoints returns true.
1640 (proceed_one_lwp): Call maybe_hw_step.
1641 * mem-break.c (has_reinsert_breakpoints): New function.
1642 * mem-break.h (has_reinsert_breakpoints): Declare.
1643
1644 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1645
1646 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1647
1648 2016-05-17 Yao Qi <yao.qi@linaro.org>
1649
1650 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1651 instead of find_inferior.
1652
1653 2016-05-05 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1656 Initialize res to zero.
1657
1658 2016-05-05 Yao Qi <yao.qi@linaro.org>
1659
1660 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1661 to uint32_t.
1662
1663 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1664
1665 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1666 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1667 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1668
1669 2016-04-28 Par Olsson <par.olsson@windriver.com>
1670 Simon Marchi <simon.marchi@ericsson.com>
1671
1672 * tracepoint.c (write_inferior_int8): New function.
1673 (cmd_qtenable_disable): Write enable flag using
1674 write_inferior_int8.
1675
1676 2016-04-25 Yao Qi <yao.qi@linaro.org>
1677
1678 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1679 (need_step_over_p): Return zero if the LWP has pending signals
1680 can be delivered on software single step target.
1681
1682 2016-04-25 Yao Qi <yao.qi@linaro.org>
1683
1684 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1685 return instead of error.
1686
1687 2016-04-22 Yao Qi <yao.qi@linaro.org>
1688
1689 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1690 to 23.
1691
1692 2016-04-22 Yao Qi <yao.qi@linaro.org>
1693
1694 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1695 signal when stepping over breakpoint with software single
1696 step.
1697
1698 2016-04-21 Pedro Alves <palves@redhat.com>
1699
1700 * linux-s390-low.c (s390_collect_ptrace_register)
1701 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1702 add casts.
1703 (s390_check_regset): Use void * instead of gdb_byte *.
1704
1705 2016-04-20 Pedro Alves <palves@redhat.com>
1706
1707 * configure: Renegerate.
1708
1709 2016-04-20 Yao Qi <yao.qi@linaro.org>
1710
1711 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1712 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1713 number 16.
1714 (arm_store_gregset): Likewise.
1715
1716 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1717
1718 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1719 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1720 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1721 (amd64-avx-mpx-linux.c): New rules.
1722 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1723 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1724 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1725 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1726 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1727 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1728 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1729 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1730 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1731 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1732 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1733 * linux-x86-low.c (x86_linux_read_description): Add case for
1734 X86_XSTATE_AVX_MPX_MASK.
1735 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1736 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1737 init_registers_i386_avx_mpx_linux.
1738 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1739 (initialize_low_tracepoint): Call
1740 init_registers_i386_avx_mpx_linux.
1741 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1742 (initialize_low_tracepoint): Call
1743 init_registers_amd64_avx_mpx_linux.
1744 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1745 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1746 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1747 declarations.
1748
1749 2016-04-18 Pedro Alves <palves@redhat.com>
1750
1751 * configure: Regenerate.
1752
1753 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1754
1755 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1756 (aarch64_emit_sub): Likewise.
1757
1758 2016-04-12 Pedro Alves <palves@redhat.com>
1759
1760 * utils.c (prepare_to_throw_exception): Delete.
1761
1762 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1763
1764 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1765
1766 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1767
1768 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1769
1770 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1771
1772 * linux-aarch64-ipa.c: Add <elf.h> include.
1773 * linux-ppc-ipa.c: Add <elf.h> include.
1774 * linux-s390-ipa.c: Add <elf.h> include.
1775
1776 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1777
1778 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1779 (get_raw_reg_ptr): Likewise.
1780 (get_trace_state_variable_value_ptr): Likewise.
1781 (set_trace_state_variable_value_ptr): Likewise.
1782 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1783 char *.
1784
1785 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1786 Marcin Kościelnicki <koriakin@0x04.net>
1787
1788 PR/17221
1789 * linux-ppc-low.c (emit_insns): New function.
1790 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1791 (ppc_emit_prologue): New function.
1792 (ppc_emit_epilogue): New function.
1793 (ppc_emit_add): New function.
1794 (ppc_emit_sub): New function.
1795 (ppc_emit_mul): New function.
1796 (ppc_emit_lsh): New function.
1797 (ppc_emit_rsh_signed): New function.
1798 (ppc_emit_rsh_unsigned): New function.
1799 (ppc_emit_ext): New function.
1800 (ppc_emit_zero_ext): New function.
1801 (ppc_emit_log_not): New function.
1802 (ppc_emit_bit_and): New function.
1803 (ppc_emit_bit_or): New function.
1804 (ppc_emit_bit_xor): New function.
1805 (ppc_emit_bit_not): New function.
1806 (ppc_emit_equal): New function.
1807 (ppc_emit_less_signed): New function.
1808 (ppc_emit_less_unsigned): New function.
1809 (ppc_emit_ref): New function.
1810 (ppc_emit_const): New function.
1811 (ppc_emit_reg): New function.
1812 (ppc_emit_pop): New function.
1813 (ppc_emit_stack_flush): New function.
1814 (ppc_emit_swap): New function.
1815 (ppc_emit_stack_adjust): New function.
1816 (ppc_emit_call): New function.
1817 (ppc_emit_int_call_1): New function.
1818 (ppc_emit_void_call_2): New function.
1819 (ppc_emit_if_goto): New function.
1820 (ppc_emit_goto): New function.
1821 (ppc_emit_eq_goto): New function.
1822 (ppc_emit_ne_goto): New function.
1823 (ppc_emit_lt_goto): New function.
1824 (ppc_emit_le_goto): New function.
1825 (ppc_emit_gt_goto): New function.
1826 (ppc_emit_ge_goto): New function.
1827 (ppc_write_goto_address): New function.
1828 (ppc_emit_ops_impl): New static variable.
1829 (ppc64v1_emit_prologue): New function.
1830 (ppc64v2_emit_prologue): New function.
1831 (ppc64_emit_epilogue): New function.
1832 (ppc64_emit_add): New function.
1833 (ppc64_emit_sub): New function.
1834 (ppc64_emit_mul): New function.
1835 (ppc64_emit_lsh): New function.
1836 (ppc64_emit_rsh_signed): New function.
1837 (ppc64_emit_rsh_unsigned): New function.
1838 (ppc64_emit_ext): New function.
1839 (ppc64_emit_zero_ext): New function.
1840 (ppc64_emit_log_not): New function.
1841 (ppc64_emit_bit_and): New function.
1842 (ppc64_emit_bit_or): New function.
1843 (ppc64_emit_bit_xor): New function.
1844 (ppc64_emit_bit_not): New function.
1845 (ppc64_emit_equal): New function.
1846 (ppc64_emit_less_signed): New function.
1847 (ppc64_emit_less_unsigned): New function.
1848 (ppc64_emit_ref): New function.
1849 (ppc64_emit_const): New function.
1850 (ppc64v1_emit_reg): New function.
1851 (ppc64v2_emit_reg): New function.
1852 (ppc64_emit_pop): New function.
1853 (ppc64_emit_stack_flush): New function.
1854 (ppc64_emit_swap): New function.
1855 (ppc64v1_emit_call): New function.
1856 (ppc64v2_emit_call): New function.
1857 (ppc64v1_emit_int_call_1): New function.
1858 (ppc64v2_emit_int_call_1): New function.
1859 (ppc64v1_emit_void_call_2): New function.
1860 (ppc64v2_emit_void_call_2): New function.
1861 (ppc64_emit_if_goto): New function.
1862 (ppc64_emit_eq_goto): New function.
1863 (ppc64_emit_ne_goto): New function.
1864 (ppc64_emit_lt_goto): New function.
1865 (ppc64_emit_le_goto): New function.
1866 (ppc64_emit_gt_goto): New function.
1867 (ppc64_emit_ge_goto): New function.
1868 (ppc64v1_emit_ops_impl): New static variable.
1869 (ppc64v2_emit_ops_impl): New static variable.
1870 (ppc_emit_ops): New function.
1871 (linux_low_target): Wire in ppc_emit_ops.
1872
1873 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1874 Marcin Kościelnicki <koriakin@0x04.net>
1875
1876 PR/17221
1877 * Makefile.in: Add powerpc-*-ipa.o
1878 * configure.srv: Add ipa_obj for powerpc*-linux.
1879 * linux-ppc-ipa.c: New file.
1880 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1881 includes.
1882 (PPC_FIELD): New macro.
1883 (PPC_SEXT): New macro.
1884 (PPC_OP6): New macro.
1885 (PPC_BO): New macro.
1886 (PPC_LI): New macro.
1887 (PPC_BD): New macro.
1888 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1889 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1890 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1891 (ppc_get_thread_area): New function.
1892 (is_elfv2_inferior): New function.
1893 (gen_ds_form): New function.
1894 (GEN_STD): New macro.
1895 (GEN_STDU): New macro.
1896 (GEN_LD): New macro.
1897 (GEN_LDU): New macro.
1898 (gen_d_form): New function.
1899 (GEN_ADDI): New macro.
1900 (GEN_ADDIS): New macro.
1901 (GEN_LI): New macro.
1902 (GEN_LIS): New macro.
1903 (GEN_ORI): New macro.
1904 (GEN_ORIS): New macro.
1905 (GEN_LWZ): New macro.
1906 (GEN_STW): New macro.
1907 (GEN_STWU): New macro.
1908 (gen_xfx_form): New function.
1909 (GEN_MFSPR): New macro.
1910 (GEN_MTSPR): New macro.
1911 (GEN_MFCR): New macro.
1912 (GEN_MTCR): New macro.
1913 (GEN_SYNC): New macro.
1914 (GEN_LWSYNC): New macro.
1915 (gen_x_form): New function.
1916 (GEN_OR): New macro.
1917 (GEN_MR): New macro.
1918 (GEN_LWARX): New macro.
1919 (GEN_STWCX): New macro.
1920 (GEN_CMPW): New macro.
1921 (gen_md_form): New function.
1922 (GEN_RLDICL): New macro.
1923 (GEN_RLDICR): New macro.
1924 (gen_i_form): New function.
1925 (GEN_B): New macro.
1926 (GEN_BL): New macro.
1927 (gen_b_form): New function.
1928 (GEN_BNE): New macro.
1929 (GEN_LOAD): New macro.
1930 (GEN_STORE): New macro.
1931 (gen_limm): New function.
1932 (gen_atomic_xchg): New function.
1933 (gen_call): New function.
1934 (ppc_relocate_instruction): New function.
1935 (ppc_install_fast_tracepoint_jump_pad): New function.
1936 (ppc_get_min_fast_tracepoint_insn_len): New function.
1937 (ppc_get_ipa_tdesc_idx): New function.
1938 (the_low_target): Wire in the new functions.
1939 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1940 tdescs.
1941 * linux-ppc-tdesc.h: New file.
1942
1943 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1944
1945 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1946 (alloc_jump_pad_buffer): New function.
1947 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1948 (alloc_jump_pad_buffer): New function.
1949 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1950 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1951 (alloc_jump_pad_buffer): New function.
1952 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1953 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1954 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1955 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1956
1957 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1958
1959 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1960 * linux-amd64-ipa.c: Likewise.
1961 * linux-i386-ipa.c: Likewise.
1962 * linux-s390-ipa.c: Likewise.
1963 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1964 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1965 set_trace_state_variable_value_ptr.
1966 (struct ipa_sym_addresses): Likewise.
1967 (symbol_list): Likewise.
1968 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1969 accessing gdb_collect directly.
1970 (gdb_collect_ptr_type): New typedef.
1971 (get_raw_reg_ptr_type): New typedef.
1972 (get_trace_state_variable_value_ptr_type): New typedef.
1973 (set_trace_state_variable_value_ptr_type): New typedef.
1974 (gdb_collect_ptr): New global.
1975 (get_raw_reg_ptr): New global.
1976 (get_trace_state_variable_value_ptr): New global.
1977 (set_trace_state_variable_value_ptr): New global.
1978 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1979 accessing get_raw_reg directly.
1980 (get_get_tsv_func_addr): Likewise for
1981 get_trace_state_variable_value_ptr.
1982 (get_set_tsv_func_addr): Likewise for
1983 set_trace_state_variable_value_ptr.
1984 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1985
1986 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1987
1988 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1989
1990 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1991
1992 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1993 packets.
1994 (relocate_instruction): Remove own_buf.
1995 * server.c (own_buf): Make global.
1996 (handle_v_requests): Make global.
1997 * server.h (own_buf): New declaration.
1998 (handle_v_requests): New prototype.
1999
2000 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2001
2002 PR 18377
2003 * linux-s390-low.c (add_insns): New function.
2004 (s390_emit_prologue): New function.
2005 (s390_emit_epilogue): New function.
2006 (s390_emit_add): New function.
2007 (s390_emit_sub): New function.
2008 (s390_emit_mul): New function.
2009 (s390_emit_lsh): New function.
2010 (s390_emit_rsh_signed): New function.
2011 (s390_emit_rsh_unsigned): New function.
2012 (s390_emit_ext): New function.
2013 (s390_emit_log_not): New function.
2014 (s390_emit_bit_and): New function.
2015 (s390_emit_bit_or): New function.
2016 (s390_emit_bit_xor): New function.
2017 (s390_emit_bit_not): New function.
2018 (s390_emit_equal): New function.
2019 (s390_emit_less_signed): New function.
2020 (s390_emit_less_unsigned): New function.
2021 (s390_emit_ref): New function.
2022 (s390_emit_if_goto): New function.
2023 (s390_emit_goto): New function.
2024 (s390_write_goto_address): New function.
2025 (s390_emit_litpool): New function.
2026 (s390_emit_const): New function.
2027 (s390_emit_call): New function.
2028 (s390_emit_reg): New function.
2029 (s390_emit_pop): New function.
2030 (s390_emit_stack_flush): New function.
2031 (s390_emit_zero_ext): New function.
2032 (s390_emit_swap): New function.
2033 (s390_emit_stack_adjust): New function.
2034 (s390_emit_set_r2): New function.
2035 (s390_emit_int_call_1): New function.
2036 (s390_emit_void_call_2): New function.
2037 (s390_emit_eq_goto): New function.
2038 (s390_emit_ne_goto): New function.
2039 (s390_emit_lt_goto): New function.
2040 (s390_emit_le_goto): New function.
2041 (s390_emit_gt_goto): New function.
2042 (s390_emit_ge_goto): New function.
2043 (s390x_emit_prologue): New function.
2044 (s390x_emit_epilogue): New function.
2045 (s390x_emit_add): New function.
2046 (s390x_emit_sub): New function.
2047 (s390x_emit_mul): New function.
2048 (s390x_emit_lsh): New function.
2049 (s390x_emit_rsh_signed): New function.
2050 (s390x_emit_rsh_unsigned): New function.
2051 (s390x_emit_ext): New function.
2052 (s390x_emit_log_not): New function.
2053 (s390x_emit_bit_and): New function.
2054 (s390x_emit_bit_or): New function.
2055 (s390x_emit_bit_xor): New function.
2056 (s390x_emit_bit_not): New function.
2057 (s390x_emit_equal): New function.
2058 (s390x_emit_less_signed): New function.
2059 (s390x_emit_less_unsigned): New function.
2060 (s390x_emit_ref): New function.
2061 (s390x_emit_if_goto): New function.
2062 (s390x_emit_const): New function.
2063 (s390x_emit_call): New function.
2064 (s390x_emit_reg): New function.
2065 (s390x_emit_pop): New function.
2066 (s390x_emit_stack_flush): New function.
2067 (s390x_emit_zero_ext): New function.
2068 (s390x_emit_swap): New function.
2069 (s390x_emit_stack_adjust): New function.
2070 (s390x_emit_int_call_1): New function.
2071 (s390x_emit_void_call_2): New function.
2072 (s390x_emit_eq_goto): New function.
2073 (s390x_emit_ne_goto): New function.
2074 (s390x_emit_lt_goto): New function.
2075 (s390x_emit_le_goto): New function.
2076 (s390x_emit_gt_goto): New function.
2077 (s390x_emit_ge_goto): New function.
2078 (s390_emit_ops): New function.
2079 (struct linux_target_ops): Fill in emit_ops hook.
2080
2081 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2082
2083 PR 18377
2084 * Makefile.in: Add s390 IPA files.
2085 * configure.srv: Build IPA for s390.
2086 * linux-s390-ipa.c: New file.
2087 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2088 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2089 (tdesc_s390_linux32): Likewise.
2090 (init_registers_s390_linux32v1): Likewise.
2091 (tdesc_s390_linux32v1): Likewise.
2092 (init_registers_s390_linux32v2): Likewise.
2093 (tdesc_s390_linux32v2): Likewise.
2094 (init_registers_s390_linux64): Likewise.
2095 (tdesc_s390_linux64): Likewise.
2096 (init_registers_s390_linux64v1): Likewise.
2097 (tdesc_s390_linux64v1): Likewise.
2098 (init_registers_s390_linux64v2): Likewise.
2099 (tdesc_s390_linux64v2): Likewise.
2100 (init_registers_s390_te_linux64): Likewise.
2101 (tdesc_s390_te_linux64): Likewise.
2102 (init_registers_s390_vx_linux64): Likewise.
2103 (tdesc_s390_vx_linux64): Likewise.
2104 (init_registers_s390_tevx_linux64): Likewise.
2105 (tdesc_s390_tevx_linux64): Likewise.
2106 (init_registers_s390x_linux64): Likewise.
2107 (tdesc_s390x_linux64): Likewise.
2108 (init_registers_s390x_linux64v1): Likewise.
2109 (tdesc_s390x_linux64v1): Likewise.
2110 (init_registers_s390x_linux64v2): Likewise.
2111 (tdesc_s390x_linux64v2): Likewise.
2112 (init_registers_s390x_te_linux64): Likewise.
2113 (tdesc_s390x_te_linux64): Likewise.
2114 (init_registers_s390x_vx_linux64): Likewise.
2115 (tdesc_s390x_vx_linux64): Likewise.
2116 (init_registers_s390x_tevx_linux64): Likewise.
2117 (tdesc_s390x_tevx_linux64): Likewise.
2118 (have_hwcap_s390_vx): New static variable.
2119 (s390_arch_setup): Fill have_hwcap_s390_vx.
2120 (s390_get_thread_area): New function.
2121 (s390_ft_entry_gpr_esa): New const.
2122 (s390_ft_entry_gpr_zarch): New const.
2123 (s390_ft_entry_misc): New const.
2124 (s390_ft_entry_fr): New const.
2125 (s390_ft_entry_vr): New const.
2126 (s390_ft_main_31): New const.
2127 (s390_ft_main_64): New const.
2128 (s390_ft_exit_fr): New const.
2129 (s390_ft_exit_vr): New const.
2130 (s390_ft_exit_misc): New const.
2131 (s390_ft_exit_gpr_esa): New const.
2132 (s390_ft_exit_gpr_zarch): New const.
2133 (append_insns): New function.
2134 (s390_relocate_instruction): New function.
2135 (s390_install_fast_tracepoint_jump_pad): New function.
2136 (s390_get_min_fast_tracepoint_insn_len): New function.
2137 (s390_get_ipa_tdesc_idx): New function.
2138 (struct linux_target_ops): Wire in the above functions.
2139 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2140 * linux-s390-tdesc.h: New file.
2141
2142 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2143
2144 * linux-s390-low.c (s390_supports_tracepoints): New function.
2145 (struct linux_target_ops): Fill supports_tracepoints hook.
2146
2147 2016-03-18 Yao Qi <yao.qi@linaro.org>
2148
2149 * linux-low.c (lwp_signal_can_be_delivered): New function.
2150 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2151
2152 2016-03-18 Yao Qi <yao.qi@linaro.org>
2153
2154 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2155 0 if signal is enqueued. Remove 'signal' from one debugging
2156 message. Move one debugging message to some lines below.
2157 Remove code setting 'signal' to 0.
2158
2159 2016-03-18 Yao Qi <yao.qi@linaro.org>
2160
2161 * linux-low.c (linux_low_filter_event): Remove redundant
2162 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2163
2164 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2165
2166 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2167 (struct linux_target_ops): Wire in the above.
2168
2169 2016-03-03 Yao Qi <yao.qi@linaro.org>
2170
2171 * linux-low.c: Update comments to start_step_over.
2172
2173 2016-03-03 Yao Qi <yao.qi@linaro.org>
2174
2175 PR server/19736
2176 * linux-low.c (handle_extended_wait): Set child suspended
2177 if event_lwp->bp_reinsert isn't zero.
2178
2179 2016-03-02 Yao Qi <yao.qi@linaro.org>
2180
2181 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2182 enqueue_pending_signal.
2183
2184 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2185
2186 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2187 is actually loaded.
2188
2189 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2190
2191 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2192 (s390_regmap_3264) [!__s390x__]: New global.
2193 (s390_collect_ptrace_register): Skip map entries containing -1.
2194 (s390_supply_ptrace_register): Ditto.
2195 (s390_fill_gprs_high): New function.
2196 (s390_store_gprs_high): New function.
2197 (s390_regsets): Add NT_S390_HIGH_GPRS.
2198 (s390_get_hwcap): Enable on 31-bit.
2199 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2200 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2201 Detect NT_S390_HIGH_GPRS.
2202 (s390_usrregs_info_3264): Enable on 31-bit.
2203 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2204 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2205
2206 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2207
2208 PR gdb/13808
2209 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2210 * configure.srv: Ditto.
2211 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2212 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2213 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2214 (init_registers_amd64_linux): Remove prototype.
2215 (tdesc_amd64_linux): Remove declaration.
2216 (get_ipa_tdesc): New function.
2217 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2218 initialize remaining tdescs.
2219 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2220 (init_registers_i386_linux): Remove prototype.
2221 (tdesc_i386_linux): Remove declaration.
2222 (get_ipa_tdesc): New function.
2223 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2224 initialize remaining tdescs.
2225 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2226 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2227 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2228 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2229 (x86_get_ipa_tdesc_idx): New function.
2230 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2231 * linux-x86-tdesc.h: New file.
2232 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2233 (target_get_ipa_tdesc_idx): New macro.
2234 * tracepoint.c (ipa_tdesc_idx): New macro.
2235 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2236 (symbol_list): Add ipa_tdesc_idx.
2237 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2238 (ipa_tdesc): Remove.
2239 (ipa_tdesc_idx): New variable.
2240 (get_context_regcache): Use get_ipa_tdesc.
2241 (gdb_collect): Ditto.
2242 (gdb_probe): Ditto.
2243 * tracepoint.h (get_ipa_tdesc): New prototype.
2244 (ipa_tdesc): Remove.
2245
2246 2016-02-24 Pedro Alves <palves@redhat.com>
2247
2248 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2249 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2250 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2251 Factor out common code between the USE_SIGTRAP_SIGINFO and
2252 !USE_SIGTRAP_SIGINFO blocks.
2253 (linux_low_filter_event): Call save_stop_reason instead of
2254 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2255 Update comments.
2256 (linux_wait_1): Update comments.
2257
2258 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2259
2260 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2261 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2262 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2263 ppc_insert_point, ppc_remove_point.
2264
2265 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2266
2267 * linux-s390-low.c (s390_supports_z_point_type): New function.
2268 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2269
2270 2016-02-16 Yao Qi <yao.qi@linaro.org>
2271
2272 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2273 PC. Get pc from regcache_read_pc.
2274
2275 2016-02-12 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2278 or linux_get_pc_32bit.
2279 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2280
2281 2016-02-12 Yao Qi <yao.qi@linaro.org>
2282
2283 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2284 arm_linux_get_next_pcs_fixup.
2285
2286 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2287
2288 * tracepoint.c (x_tracepoint_action_download): Change
2289 write_inferior_data_ptr to write_inferior_data_pointer.
2290 (cmd_qtstart): Likewise.
2291 (write_inferior_data_ptr): Remove.
2292 (download_agent_expr): Change write_inferior_data_ptr to
2293 write_inferior_data_pointer.
2294 (download_tracepoint_1): Likewise.
2295 (download_tracepoint): Likewise.
2296 (download_trace_state_variables): Likewise.
2297
2298 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2299 Marcin Kościelnicki <koriakin@0x04.net>
2300
2301 * tracepoint.c (struct tracepoint_action_ops): Remove.
2302 (struct tracepoint_action): Remove ops.
2303 (m_tracepoint_action_download, r_tracepoint_action_download)
2304 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2305 size and offset accordingly.
2306 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2307 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2308 (tracepoint_action_send, tracepoint_action_download): New functions.
2309 Helpers for trace action handlers.
2310 (add_tracepoint_action): Remove setup actions ops.
2311 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2312
2313 2016-02-10 Yao Qi <yao.qi@linaro.org>
2314
2315 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2316
2317 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2318
2319 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2320 to AC_OUTPUT.
2321 * configure: Regenerate.
2322
2323 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2324
2325 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2326 void * to gdb_byte *.
2327 * linux-low.c (siginfo_fixup): Likewise.
2328 (linux_xfer_siginfo): Likewise.
2329 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2330 Likewise.
2331 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2332
2333 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2334
2335 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2336 to srv_tgtobj.
2337 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2338 to srv_tgtobj.
2339 * linux-x86-low.c [__x86_64__]: Include
2340 "nat/amd64-linux-siginfo.h".
2341 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2342 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2343 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2344 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2345 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2346 (cpt_si_fd, si_timerid, si_overrun): Move from
2347 nat/amd64-linux-siginfo.c.
2348 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2349
2350 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * server.c (skip_to_semicolon): Remove.
2353 (process_point_options): Use strchrnul instead of
2354 skip_to_semicolon.
2355
2356 2016-01-26 Yao Qi <yao.qi@linaro.org>
2357
2358 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2359 * linux-low.c (install_software_single_step_breakpoints): Don't
2360 call regcache_read_pc.
2361 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2362 argument pc.
2363
2364 2016-01-26 Yao Qi <yao.qi@linaro.org>
2365
2366 * linux-low.c (install_software_single_step_breakpoints): Call
2367 regcache_read_pc instead of get_pc.
2368
2369 2016-01-26 Yao Qi <yao.qi@linaro.org>
2370
2371 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2372 (unblock_async_io): Rename to ...
2373 (block_unblock_async_io): ... it. New function.
2374 (enable_async_io): Don't install SIGIO handler. Unblock it
2375 instead.
2376 (disable_async_io): Don't ignore SIGIO. Block it instead.
2377 (initialize_async_io): Install SIGIO handler. Don't call
2378 unblock_async_io.
2379
2380 2016-01-26 Yao Qi <yao.qi@linaro.org>
2381
2382 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2383 first character is '\003', call *the_target->request_interrupt.
2384
2385 2016-01-25 Yao Qi <yao.qi@linaro.org>
2386
2387 * remote-utils.c (new_thread_notify): Remove.
2388 (dead_thread_notify): Likewise.
2389 * remote-utils.h (new_thread_notify): Remove declaration.
2390 (dead_thread_notify): Likewise.
2391
2392 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2393
2394 * gdb.trace/pending.exp: Fix expected message on continue.
2395
2396 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2397
2398 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2399 it works properly on big-endian machines where sizeof (CORE_ADDR)
2400 != sizeof (void *).
2401
2402 2016-01-21 Pedro Alves <palves@redhat.com>
2403
2404 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2405 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2406 * configure: Regenerate.
2407
2408 2016-01-21 Yao Qi <yao.qi@linaro.org>
2409
2410 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2411 is_thumb and set it according to CPSR saved on the stack.
2412 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2413 arm_sigreturn_next_pc.
2414
2415 2016-01-18 Yao Qi <yao.qi@linaro.org>
2416
2417 * linux-low.c (linux_set_pc_64bit): New function.
2418 (linux_get_pc_64bit): New function.
2419 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2420 Declare.
2421 * linux-sparc-low.c (debug_threads): Remove declaration.
2422 (sparc_get_pc): Remove.
2423 (the_low_target): Use linux_get_pc_64bit instead of
2424 sparc_get_pc.
2425 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2426 (the_low_target): Use linux_get_pc_64bit and
2427 linux_set_pc_64bit.
2428
2429 2016-01-18 Yao Qi <yao.qi@linaro.org>
2430
2431 * linux-arm-low.c (debug_threads): Remove declaration.
2432 (arm_get_pc, arm_set_pc): Remove.
2433 (the_low_target): Use linux_get_pc_32bit and
2434 linux_set_pc_32bit.
2435 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2436 (the_low_target): Use linux_get_pc_32bit and
2437 linux_set_pc_32bit.
2438 * linux-cris-low.c (debug_threads): Remove declaration.
2439 (cris_get_pc, cris_set_pc,): Remove.
2440 (the_low_target): Use linux_get_pc_32bit and
2441 linux_set_pc_32bit.
2442 * linux-crisv32-low.c (debug_threads): Remove declaration.
2443 (cris_get_pc, cris_set_pc): Remove.
2444 (the_low_target): Use linux_get_pc_32bit and
2445 linux_set_pc_32bit.
2446 * linux-low.c: Include inttypes.h.
2447 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2448 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2449 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2450 (the_low_target): Use linux_get_pc_32bit and
2451 linux_set_pc_32bit.
2452 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2453 (the_low_target): Use linux_get_pc_32bit and
2454 linux_set_pc_32bit.
2455 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2456 (the_low_target): Use linux_get_pc_32bit and
2457 linux_set_pc_32bit.
2458 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2459 (the_low_target): Use linux_get_pc_32bit and
2460 linux_set_pc_32bit.
2461 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2462 (the_low_target): Use linux_get_pc_32bit and
2463 linux_set_pc_32bit.
2464
2465 2016-01-18 Gary Benson <gbenson@redhat.com>
2466
2467 * configure.ac (AC_FUNC_FORK): New check.
2468 * config.in: Regenerate.
2469 * configure: Likewise.
2470
2471 2016-01-14 Yao Qi <yao.qi@linaro.org>
2472
2473 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2474 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2475 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2476 arm_get_next_pcs_ctor.
2477
2478 2016-01-12 Josh Stone <jistone@redhat.com>
2479 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2480
2481 * inferiors.h: Include "gdb_vecs.h".
2482 (struct process_info): Add syscalls_to_catch.
2483 * inferiors.c (remove_process): Free syscalls_to_catch.
2484 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2485 syscall_return stops.
2486 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2487 * server.c (handle_general_set): Handle QCatchSyscalls.
2488 (handle_query): Report support for QCatchSyscalls.
2489 * target.h (struct target_ops): Add supports_catch_syscall.
2490 (target_supports_catch_syscall): New macro.
2491 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2492 (struct lwp_info): Add syscall_state.
2493 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2494 Maintain syscall_state and syscalls_to_catch across exec.
2495 (get_syscall_trapinfo): New function, proxy to the_low_target.
2496 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2497 (linux_low_filter_event): Toggle syscall_state entry/return for
2498 syscall traps, and set it ignored for all others.
2499 (gdb_catching_syscalls_p): New function.
2500 (gdb_catch_this_syscall_p): New function.
2501 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2502 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2503 (linux_supports_catch_syscall): New function.
2504 (linux_target_ops): Install it.
2505 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2506 (the_low_target): Install it.
2507
2508 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2509
2510 * acinclude.m4: Include new ../warning.m4 file.
2511 * configure: Regenerated.
2512 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2513
2514 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2515
2516 * ax.c (is_goto_target): Mark static.
2517 * linux-low.c (register_addr): Likewise.
2518 (linux_fetch_registers, linux_store_registers): Likewise.
2519 * mem-break.c (any_persistent_commands): Fix old prototype.
2520 (add_commands_to_breakpoint): Mark static.
2521 * regcache.c (find_register_by_name): Delete unused func.
2522 * remote-utils.c (hex_or_minus_one): Mark static.
2523 * server.c (monitor_show_help): Mark static.
2524 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2525 handle_v_requests): Likewise.
2526
2527 2016-01-12 Pedro Alves <palves@redhat.com>
2528
2529 Remove use of the registered trademark symbol throughout.
2530
2531 2016-01-08 Yao Qi <yao.qi@linaro.org>
2532
2533 * remote-utils.c (getpkt): If c is '\003', call target hook
2534 request_interrupt.
2535
2536 2016-01-06 Yao Qi <yao.qi@linaro.org>
2537
2538 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2539 linux-aarch32-low.c.
2540 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2541 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2542 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2543 (thumb2_breakpoint): Declare.
2544 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2545 linux-aarch32-low.h.
2546 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2547 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2548 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2549
2550 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2551
2552 * gdbreplay.c (gdbreplay_version): Change copyright year in
2553 version message.
2554 * server.c (gdbserver_version): Likewise.
2555
2556 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2557
2558 * server.c (crc32_table): Delete.
2559 (crc32): Use libiberty's xcrc32 function.
2560
2561 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2562
2563 * lynx-low.c (lynx_delete_thread_callback): New function.
2564 (lynx_mourn): Properly delete our process and all of its
2565 threads. Remove call to clear_inferiors.
2566
2567 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2568
2569 * target.c (thread_search_callback): Add check that
2570 the thread_stopped target callback is not NULL before
2571 calling it.
2572
2573 2015-12-21 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2576 arm breakpoint.
2577
2578 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2579
2580 * server.c (handle_query): Call target_supports_software_single_step.
2581
2582 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2583
2584 * linux-low.c (single_step): New function.
2585 (linux_resume_one_lwp_throw): Call single_step.
2586 (start_step_over): Likewise.
2587
2588 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2589
2590 * Makefile.in (SFILES): Append arch/arm-linux.c,
2591 arch/arm-get-next-pcs.c.
2592 (arm-linux.o): New rule.
2593 (arm-get-next-pcs.o): New rule.
2594 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2595 arm-linux.o.
2596 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2597 to linux-aarch32-low.c.
2598 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2599 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2600 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2601 (thumb2_breakpoint_len): Likewise.
2602 (arm_is_thumb_mode): Make non-static.
2603 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2604 from linux-aarch32-low.c.
2605 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2606 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2607 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2608 (thumb2_breakpoint_len): Likewise.
2609 (arm_is_thumb_mode): New declaration.
2610 * linux-arm-low.c: Include arch/arm-linux.h
2611 aarch/arm-get-next-pcs.h, sys/syscall.h.
2612 (get_next_pcs_ops): New struct.
2613 (get_next_pcs_addr_bits_remove): New function.
2614 (get_next_pcs_is_thumb): New function.
2615 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2616 (arm_sigreturn_next_pc): Likewise.
2617 (get_next_pcs_syscall_next_pc): Likewise.
2618 (arm_gdbserver_get_next_pcs): Likewise.
2619 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2620 Initialize.
2621 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2622 * server.h: Include gdb_vecs.h.
2623
2624 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2625
2626 * Makefile.in (SFILES): Append common/common-regcache.c.
2627 (OBS): Append common-regcache.o.
2628 (common-regcache.o): New rule.
2629 * regcache.c (init_register_cache): Initialize cache to
2630 REG_UNAVAILABLE.
2631 (regcache_raw_read_unsigned): New function.
2632 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2633 register_status enum.
2634
2635 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2636
2637 * linux-aarch64-low.c (the_low_targets): Rename
2638 breakpoint_reinsert_addr to get_next_pcs.
2639 * linux-arm-low.c (the_low_targets): Likewise.
2640 * linux-bfin-low.c (the_low_targets): Likewise.
2641 * linux-cris-low.c (the_low_targets): Likewise.
2642 * linux-crisv32-low.c (the_low_targets): Likewise.
2643 * linux-low.c (can_software_single_step): Likewise.
2644 (install_software_single_step_breakpoints): New function.
2645 (start_step_over): Use install_software_single_step_breakpoints.
2646 * linux-low.h: New CORE_ADDR vector.
2647 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2648 get_next_pcs.
2649 * linux-mips-low.c (the_low_targets): Likewise.
2650 * linux-nios2-low.c (the_low_targets): Likewise.
2651 * linux-sparc-low.c (the_low_targets): Likewise.
2652
2653 2015-12-17 Pedro Alves <palves@redhat.com>
2654
2655 * linux-low.c (linux_kill_one_lwp): Remove references to
2656 LinuxThreads.
2657 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2658 to 'kill'.
2659 (linux_init_signals): Delete.
2660 (initialize_low): Adjust.
2661 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2662
2663 2015-12-16 Pedro Alves <palves@redhat.com>
2664
2665 * configure.ac (compiler warning flags): When testing a
2666 -Wno-foo option, check whether -Wfoo works instead.
2667 * configure: Regenerate.
2668
2669 2015-12-11 Don Breazeal <donb@codesourcery.com>
2670
2671 * server.c (process_serial_event): Don't exit from gdbserver
2672 in remote mode if there are still active inferiors.
2673
2674 2015-12-11 Yao Qi <yao.qi@linaro.org>
2675
2676 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2677 arm_breakpoint_at if the process is 32-bit.
2678
2679 2015-12-11 Yao Qi <yao.qi@linaro.org>
2680
2681 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2682 arm breakpoint.
2683
2684 2015-12-07 Yao Qi <yao.qi@linaro.org>
2685
2686 * configure.srv: Append arm.o to srv_tgtobj for
2687 aarch64*-*-linux* target.
2688 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2689 from linux-arm-low.c.
2690 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2691 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2692 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2693 (thumb2_breakpoint_len): Likewise.
2694 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2695 (arm_breakpoint_kinds): Likewise.
2696 (arm_breakpoint_kind_from_pc): Likewise.
2697 (arm_sw_breakpoint_from_kind): Likewise.
2698 (arm_breakpoint_kind_from_current_state): Likewise.
2699 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2700 (arm_sw_breakpoint_from_kind): Declare.
2701 (arm_breakpoint_kind_from_current_state): Declare.
2702 (arm_breakpoint_at): Declare.
2703 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2704 arm_sw_breakpoint_from_kind if process is 32-bit.
2705 (aarch64_breakpoint_kind_from_pc): New function.
2706 (aarch64_breakpoint_kind_from_current_state): New function.
2707 (the_low_target): Initialize fields breakpoint_kind_from_pc
2708 and breakpoint_kind_from_current_state.
2709 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2710 linux-aarch32-low.c.
2711 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2712 (arm_breakpoint, arm_breakpoint_len): Likewise.
2713 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2714 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2715 (arm_is_thumb_mode): Likewise.
2716 (arm_breakpoint_at): Likewise.
2717 (arm_breakpoint_kind_from_pc): Likewise.
2718 (arm_sw_breakpoint_from_kind): Likewise.
2719 (arm_breakpoint_kind_from_current_state): Likewise.
2720
2721 Revert:
2722 2015-08-04 Yao Qi <yao.qi@linaro.org>
2723
2724 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2725 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2726 * server.c (extended_protocol): Remove "static".
2727 * server.h (extended_protocol): Declare it.
2728
2729 2015-12-04 Josh Stone <jistone@redhat.com>
2730
2731 * target.h (struct target_ops) <arch_setup>: Rename to ...
2732 (struct target_ops) <post_create_inferior>: ... this.
2733 (target_arch_setup): Rename to ...
2734 (target_post_create_inferior): ... this, calling post_create_inferior.
2735 * server.c (start_inferior): Update target_arch_setup calls to
2736 target_post_create_inferior.
2737 * linux-low.c (linux_low_ptrace_options): Forward declare.
2738 (linux_arch_setup): Update its comment for general use.
2739 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2740 (struct linux_target_ops): Use linux_post_create_inferior.
2741 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2742 to post_create_inferior.
2743 * nto-low.c (struct nto_target_ops): Likewise.
2744 * spu-low.c (struct spu_target_ops): Likewise.
2745 * win32-low.c (struct win32_target_ops): Likewise.
2746
2747 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2748
2749 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2750
2751 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2752
2753 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2754 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2755 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2756 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2757 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2758 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2759 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2760 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2761 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2762 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2763 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2764 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2765
2766 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2767
2768 * linux-low.c (linux_look_up_symbols): Don't call
2769 linux_supports_traceclone.
2770 * linux-low.h (thread_db_init): Remove use_events argument.
2771 * thread-db.c (thread_db_use_event): Remove global variable.
2772 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2773 (struct thread_db) <td_create_bp>: Remove field.
2774 (thread_db_create_event): Remove function.
2775 (thread_db_enable_reporting): Likewise.
2776 (find_one_thread): Don't check for thread_db_use_events.
2777 (attach_thread): Likewise.
2778 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2779 (try_thread_db_load_1): Don't check for thread_db_use_events.
2780 (thread_db_init): Remove use_events argument and thread events
2781 handling.
2782 (remove_thread_event_breakpoints): Remove function.
2783 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2784
2785 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2786
2787 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2788 New function.
2789 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2790 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2791 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2792 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2793 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2794 Initialize.
2795 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2796 New function.
2797 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2798 * linux-low.c (can_hardware_single_step): Use
2799 supports_hardware_single_step.
2800 (can_software_single_step): New function.
2801 (start_step_over): Call can_software_single_step.
2802 (linux_supports_hardware_single_step): New function.
2803 (struct target_ops) <supports_software_single_step>: Initialize.
2804 * linux-low.h (struct linux_target_ops)
2805 <supports_hardware_single_step>: Initialize.
2806 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2807 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2808 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2809 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2810 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2811 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2812 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2813 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2814 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2815 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2816 Initialize.
2817 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2818 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2819 Initialize.
2820 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2821 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2822 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2823 New function.
2824 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2825 * target.h (struct target_ops): <supports_software_single_step>:
2826 New field.
2827 (target_supports_software_single_step): New macro.
2828
2829 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2830
2831 * linux-low.c (linux_wait_1): Fix pc advance condition.
2832 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2833 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2834
2835 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2836
2837 * linux-arm-low.c (arm_is_thumb_mode): New function.
2838 (arm_breakpoint_at): Use arm_is_thumb_mode.
2839 (arm_breakpoint_kind_from_current_state): New function.
2840 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2841 Initialize.
2842 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2843 (linux_breakpoint_kind_from_current_state): New function.
2844 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2845 * linux-low.h (struct linux_target_ops)
2846 <breakpoint_kind_from_current_state>: New field.
2847 * target.h (struct target_ops): Likewise.
2848 (target_breakpoint_kind_from_current_state): New macro.
2849
2850 2015-11-30 Pedro Alves <palves@redhat.com>
2851
2852 * linux-low.c (linux_resume): Wake up the event loop before
2853 returning.
2854
2855 2015-11-30 Pedro Alves <palves@redhat.com>
2856
2857 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2858 check.
2859 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2860 to -1.
2861 * target.c (struct thread_search): New structure.
2862 (thread_search_callback): New function.
2863 (prev_general_thread): New global.
2864 (prepare_to_access_memory, done_accessing_memory): New functions.
2865 * target.h (prepare_to_access_memory, done_accessing_memory):
2866 Replace macros with function declarations.
2867
2868 2015-11-30 Pedro Alves <palves@redhat.com>
2869
2870 PR 14618
2871 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2872 report TARGET_WAITKIND_NO_RESUMED.
2873 * remote-utils.c (prepare_resume_reply): Handle
2874 TARGET_WAITKIND_NO_RESUMED.
2875 * server.c (report_no_resumed): New global.
2876 (handle_query) <qSupported>: Handle "no-resumed+". Report
2877 "no-resumed+" support.
2878 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2879 return error if the client doesn't support no-resumed events.
2880 (push_stop_notification): New function.
2881 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2882 events if the client supports them.
2883
2884 2015-11-30 Pedro Alves <palves@redhat.com>
2885
2886 * linux-low.c (thread_still_has_status_pending_p): Don't check
2887 vCont;t here.
2888 (lwp_resumed): New function.
2889 (status_pending_p_callback): Return early if the LWP is not
2890 supposed to be resumed.
2891
2892 2015-11-30 Pedro Alves <palves@redhat.com>
2893
2894 * linux-low.c (handle_extended_wait): Assert that the LWP's
2895 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2896 thread create events, leave the new child's status pending.
2897 (linux_low_filter_event): If GDB wants to hear about thread exit
2898 events, leave the LWP marked dead and don't delete it.
2899 (linux_wait_for_event_filtered): Don't check for thread exit.
2900 (filter_exit_event): New function.
2901 (linux_wait_1): Use it, when returning an exit event.
2902 (linux_resume_one_lwp_throw): Assert that the LWP's
2903 waitstatus is TARGET_WAITKIND_IGNORE.
2904 * remote-utils.c (prepare_resume_reply): Handle
2905 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2906 * server.c (report_thread_events): New global.
2907 (handle_general_set): Handle QThreadEvents.
2908 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2909 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2910 TARGET_WAITKIND_THREAD_EXITED.
2911 * server.h (report_thread_events): Declare.
2912
2913 2015-11-30 Pedro Alves <palves@redhat.com>
2914
2915 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2916 the thread's last_resume_kind was resume_stop.
2917
2918 2015-11-30 Pedro Alves <palves@redhat.com>
2919
2920 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2921 before returning.
2922
2923 2015-11-30 Pedro Alves <palves@redhat.com>
2924
2925 * server.c (handle_v_requests): Handle vCtrlC.
2926
2927 2015-11-30 Pedro Alves <palves@redhat.com>
2928
2929 * gdbthread.h (find_any_thread_of_pid): Declare.
2930 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2931 functions.
2932 * server.c (handle_query): If current_thread is NULL, look for
2933 another thread of the selected process.
2934
2935 2015-11-26 Daniel Colascione <dancol@dancol.org>
2936 Simon Marchi <simon.marchi@ericsson.com>
2937
2938 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2939 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2940 name in reply.
2941 * target.h (struct target_ops) <thread_name>: New field.
2942 (target_thread_name): New macro.
2943
2944 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2945
2946 * regcache.h (regcache_invalidate_pid): Add declaration.
2947 * regcache.c (regcache_invalidate_pid): New function, extracted
2948 from regcache_invalidate.
2949 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2950 Add trivial documentation comment.
2951 * lynx-low.c: Use regcache_invalidate_pid instead of
2952 regcache_invalidate.
2953
2954 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2955
2956 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2957 and Elf64_auxv_t if the target is Android.
2958
2959 2015-11-22 Doug Evans <xdje42@gmail.com>
2960
2961 * target.h: #include <sys/types.h>.
2962
2963 2015-11-19 Pedro Alves <palves@redhat.com>
2964
2965 * linux-low.c (linux_process_qsupported): Change prototype.
2966 Adjust.
2967 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2968 Change prototype.
2969 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2970 and adjust to loop over all features.
2971 * server.c (handle_query) <qSupported>: Adjust to call
2972 target_process_qsupported once, passing it a vector of unprocessed
2973 features.
2974 * target.h (struct target_ops) <process_qsupported>: Change
2975 prototype.
2976 (target_process_qsupported): Adjust.
2977
2978 2015-11-19 Pedro Alves <palves@redhat.com>
2979
2980 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2981 mode.
2982 * configure: Regenerate.
2983
2984 2015-11-19 Pedro Alves <palves@redhat.com>
2985
2986 * configure: Regenerate.
2987
2988 2015-11-19 Yao Qi <yao.qi@linaro.org>
2989
2990 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2991 type to uint32_t.
2992
2993 2015-11-19 Yao Qi <yao.qi@linaro.org>
2994
2995 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2996 (struct aarch64_operand): Move enum out.
2997
2998 2015-11-19 Yao Qi <yao.qi@linaro.org>
2999
3000 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3001 struct user_fpsimd_state *.
3002 (aarch64_store_fpregset): Likewise.
3003
3004 2015-11-19 Yao Qi <yao.qi@linaro.org>
3005
3006 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3007 struct user_pt_regs *.
3008 (aarch64_store_gregset): Likewise.
3009
3010 2015-11-18 Pedro Alves <palves@redhat.com>
3011
3012 * Makefile.in (all_object_files): Add $IPA_OBJS.
3013
3014 2015-11-17 Pedro Alves <palves@redhat.com>
3015
3016 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3017 GDB_SIGNAL_0 and gdb_signal_to_string.
3018
3019 2015-11-17 Pedro Alves <palves@redhat.com>
3020
3021 * win32-low.c (handle_output_debug_string): Remove parameter.
3022 (win32_kill): Remove our_status local and adjust call to
3023 handle_output_debug_string.
3024 (get_child_debug_event): Adjust call to
3025 handle_output_debug_string.
3026
3027 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3028
3029 * linux-mips-low.c (mips_fill_gregset): Add cast.
3030 (mips_store_gregset): Likewise.
3031 (mips_fill_fpregset): Likewise.
3032 (mips_store_fpregset): Likewise.
3033
3034 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3035
3036 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3037 priv.
3038
3039 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3040
3041 * linux-mips-low.c (mips_linux_new_thread): Change type of
3042 watch_type to enum target_hw_bp_type.
3043
3044 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3045
3046 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3047 Change return type to arm_hwbp_type.
3048
3049 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3050
3051 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3052 (arm_store_gregset): Likewise.
3053 * linux-arm-low.c (arm_get_hwcap): Likewise.
3054 (arm_read_description): Likewise.
3055
3056 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3057
3058 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3059
3060 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3061
3062 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3063 (ppc_fill_vsxregset): Likewise.
3064 (ppc_store_vsxregset): Likewise.
3065 (ppc_fill_vrregset): Likewise.
3066 (ppc_store_vrregset): Likewise.
3067 (ppc_fill_evrregset): Likewise.
3068 (ppc_store_evrregset): Likewise.
3069
3070 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3071
3072 * linux-ppc-low.c (ppc_usrregs_info): Remove
3073 forward-declaration.
3074 (ppc_arch_setup): Move lower in file.
3075
3076 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3077
3078 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3079 (ps_pdwrite): Likewise.
3080
3081 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3082
3083 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3084 to after assert checks.
3085
3086 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3087
3088 * proc-service.c (ps_pdread): Add/adjust casts.
3089 (ps_pdwrite): Add/adjust casts.
3090
3091 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3092
3093 * server.c (handle_search_memory_1): Cast return value of
3094 memmem.
3095
3096 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3097
3098 * server.c (write_qxfer_response): Change type of data to
3099 gdb_byte *.
3100
3101 2015-10-29 Pedro Alves <palves@redhat.com>
3102
3103 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3104
3105 2015-10-29 Pedro Alves <palves@redhat.com>
3106
3107 * tracepoint.c (clear_installed_tracepoints): Add casts.
3108
3109 2015-10-29 Pedro Alves <palves@redhat.com>
3110
3111 * server.c (handle_v_cont, process_serial_event): Add enum
3112 gdb_signal casts to signal parsing code.
3113
3114 2015-10-29 Pedro Alves <palves@redhat.com>
3115
3116 * linux-low.h (NULL_REGSET): Define.
3117 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3118 * linux-arm-low.c (arm_regsets): Likewise.
3119 * linux-crisv32-low.c (cris_regsets): Likewise.
3120 * linux-m68k-low.c (m68k_regsets): Likewise.
3121 * linux-mips-low.c (mips_regsets): Likewise.
3122 * linux-nios2-low.c (nios2_regsets): Likewise.
3123 * linux-ppc-low.c (ppc_regsets): Likewise.
3124 * linux-s390-low.c (s390_regsets): Likewise.
3125 * linux-sh-low.c (sh_regsets): Likewise.
3126 * linux-sparc-low.c (sparc_regsets): Likewise.
3127 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3128 * linux-tile-low.c (tile_regsets): Likewise.
3129 * linux-x86-low.c (x86_regsets): Likewise.
3130 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3131
3132 2015-10-29 Pedro Alves <palves@redhat.com>
3133
3134 * linux-low.h (NULL_REGSET): Define.
3135 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3136 * linux-arm-low.c (arm_regsets): Likewise.
3137 * linux-crisv32-low.c (cris_regsets): Likewise.
3138 * linux-m68k-low.c (m68k_regsets): Likewise.
3139 * linux-mips-low.c (mips_regsets): Likewise.
3140 * linux-nios2-low.c (nios2_regsets): Likewise.
3141 * linux-ppc-low.c (ppc_regsets): Likewise.
3142 * linux-s390-low.c (s390_regsets): Likewise.
3143 * linux-sh-low.c (sh_regsets): Likewise.
3144 * linux-sparc-low.c (sparc_regsets): Likewise.
3145 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3146 * linux-tile-low.c (tile_regsets): Likewise.
3147 * linux-x86-low.c (x86_regsets): Likewise.
3148 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3149
3150 2015-10-26 Doug Evans <dje@google.com>
3151
3152 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3153
3154 2015-10-26 Doug Evans <dje@google.com>
3155
3156 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3157
3158 2015-10-26 Doug Evans <dje@google.com>
3159
3160 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3161 for debug_printf.
3162 (attach_thread, find_new_threads_callback): Ditto.
3163
3164 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3165
3166 * mem-break.h (set_breakpoint_data): Remove.
3167
3168 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3169
3170 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3171 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3172 (initialize_low): Remove set_breakpoint_data call.
3173 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3174 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3175 (initialize_low): Remove set_breakpoint_data call.
3176 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3177 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3178 (initialize_low): Remove set_breakpoint_data call.
3179
3180 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3181
3182 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3183 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3184 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3185 * target.h (target_breakpoint_kind_from_pc): New macro.
3186
3187 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3188
3189 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3190 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3191 the default breakpoint kind.
3192
3193 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3194
3195 * linux-arm-low.c (arm_supports_z_point_type): Add software
3196 breakpoint support.
3197
3198 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3199
3200 * linux-arm-low.c: Refactor breakpoint definitions.
3201 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3202 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3203
3204 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3205
3206 * Makefile.in: Add arm.c/o.
3207 * configure.srv: Likewise.
3208 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3209 (arm_breakpoint_kind_from_pc): New function.
3210 (arm_sw_breakpoint_from_kind): Return proper kind.
3211 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3212
3213 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3214
3215 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3216 removal.
3217 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3218 (struct raw_breakpoint) <size>: Remove.
3219 (struct raw_breakpoint) <kind>: Add.
3220 (bp_size): New function.
3221 (bp_opcode): Likewise.
3222 (find_raw_breakpoint_at): Adjust for kind.
3223 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3224 (remove_memory_breakpoint): Adjust for kind call bp_size.
3225 (set_raw_breakpoint_at): Adjust for kind.
3226 (set_breakpoint): Likewise.
3227 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3228 (delete_raw_breakpoint): Adjust for kind.
3229 (delete_breakpoint): Likewise.
3230 (find_gdb_breakpoint): Likewise.
3231 (set_gdb_breakpoint_1): Likewise.
3232 (set_gdb_breakpoint): Likewise.
3233 (delete_gdb_breakpoint_1): Likewise.
3234 (delete_gdb_breakpoint): Likewise.
3235 (uninsert_raw_breakpoint): Likewise.
3236 (reinsert_raw_breakpoint): Likewise.
3237 (set_breakpoint_data): Remove.
3238 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3239 (check_mem_read): Adjust for kind call bp_size.
3240 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3241 (clone_one_breakpoint): Adjust for kind.
3242 * mem-break.h (set_gdb_breakpoint): Likewise.
3243 (delete_gdb_breakpoint): Likewise.
3244 * server.c (process_serial_event): Likewise.
3245
3246 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3247
3248 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3249 (struct linux_target_ops) <breakpoint>: Remove.
3250 (struct linux_target_ops) <breakpoint_len>: Remove.
3251 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3252 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3253 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3254 (arm_sw_breakpoint_from_kind): New function.
3255 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3256 (struct linux_target_ops) <breakpoint>: Remove.
3257 (struct linux_target_ops) <breakpoint_len>: Remove.
3258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3260 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3261 (struct linux_target_ops) <breakpoint>: Remove.
3262 (struct linux_target_ops) <breakpoint_len>: Remove.
3263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3264 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3265 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3266 (struct linux_target_ops) <breakpoint>: Remove.
3267 (struct linux_target_ops) <breakpoint_len>: Remove.
3268 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3269 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3270 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3271 and sw_breakpoint_from_kind to increment the pc.
3272 (linux_breakpoint_kind_from_pc): New function.
3273 (linux_sw_breakpoint_from_kind): New function.
3274 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3275 (initialize_low): Call breakpoint_kind_from_pc and
3276 sw_breakpoint_from_kind to replace breakpoint_data/len.
3277 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3278 New field.
3279 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3280 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3281 (struct linux_target_ops) <breakpoint>: Remove.
3282 (struct linux_target_ops) <breakpoint_len>: Remove.
3283 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3284 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3285 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3286 (struct linux_target_ops) <breakpoint>: Remove.
3287 (struct linux_target_ops) <breakpoint_len>: Remove.
3288 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3289 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3290 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3291 (struct linux_target_ops) <breakpoint>: Remove.
3292 (struct linux_target_ops) <breakpoint_len>: Remove.
3293 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3294 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3295 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3296 (struct linux_target_ops) <breakpoint>: Remove.
3297 (struct linux_target_ops) <breakpoint_len>: Remove.
3298 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3299 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3300 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3301 (struct linux_target_ops) <breakpoint>: Remove.
3302 (struct linux_target_ops) <breakpoint_len>: Remove.
3303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3305 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3306 (struct linux_target_ops) <breakpoint>: Remove.
3307 (struct linux_target_ops) <breakpoint_len>: Remove.
3308 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3310 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3311 (struct linux_target_ops) <breakpoint>: Remove.
3312 (struct linux_target_ops) <breakpoint_len>: Remove.
3313 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3314 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3315 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3316 (struct linux_target_ops) <breakpoint>: Remove.
3317 (struct linux_target_ops) <breakpoint_len>: Remove.
3318 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3320 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3321 (struct linux_target_ops) <breakpoint>: Remove.
3322 (struct linux_target_ops) <breakpoint_len>: Remove.
3323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3325 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3326 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
3337 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3338
3339 * linux-cris-low.c (cris_get_pc): Remove void arg.
3340
3341 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3342
3343 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3344 variable name.
3345
3346 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3347
3348 * inferiors.c (thread_pid_matches_callback): New function.
3349 (find_thread_process): New function.
3350 (remove_thread): Reset current_thread.
3351 (remove_process): Assert threads have been removed first.
3352
3353 2015-10-15 Yao Qi <yao.qi@linaro.org>
3354
3355 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3356 if it is 3.
3357 (aarch64_remove_point): Likewise.
3358 * regcache.c (regcache_register_size): New function.
3359
3360 2015-10-12 Yao Qi <yao.qi@linaro.org>
3361
3362 * linux-aarch64-low.c: Update all callers as emit_load_store
3363 is renamed to aarch64_emit_load_store.
3364
3365 2015-10-12 Yao Qi <yao.qi@linaro.org>
3366
3367 * linux-aarch64-low.c: Update all callers of function renaming
3368 from emit_insn to aarch64_emit_insn.
3369
3370 2015-10-12 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3373 arch/aarch64-insn.h.
3374 (struct aarch64_memory_operand): Likewise.
3375 (ENCODE): Likewise.
3376 (emit_insn): Move to arch/aarch64-insn.c.
3377 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3378 (emit_load_store): Move to arch/aarch64-insn.c.
3379 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3380 (can_encode_int32): Remove.
3381
3382 2015-10-12 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3385 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3386 (aarch64_relocate_instruction): Likewise.
3387 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3388 (struct aarch64_insn_visitor): Likewise.
3389
3390 2015-10-12 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3393 (struct aarch64_insn_visitor): New.
3394 (struct aarch64_insn_relocation_data): New.
3395 (aarch64_ftrace_insn_reloc_b): New function.
3396 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3397 (aarch64_ftrace_insn_reloc_cb): Likewise.
3398 (aarch64_ftrace_insn_reloc_tb): Likewise.
3399 (aarch64_ftrace_insn_reloc_adr): Likewise.
3400 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3401 (aarch64_ftrace_insn_reloc_others): Likewise.
3402 (visitor): New.
3403 (aarch64_relocate_instruction): Use visitor.
3404
3405 2015-10-12 Yao Qi <yao.qi@linaro.org>
3406
3407 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3408 int. Add argument buf.
3409 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3410 aarch64_relocate_instruction.
3411
3412 2015-10-12 Yao Qi <yao.qi@linaro.org>
3413
3414 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3415 argument insn. Remove local variable insn. Don't call
3416 target_read_uint32.
3417 (aarch64_install_fast_tracepoint_jump_pad): Call
3418 target_read_uint32.
3419
3420 2015-09-30 Yao Qi <yao.qi@linaro.org>
3421
3422 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3423 (emit_load_store_pair): Likewise.
3424
3425 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3426
3427 * dll.c (match_dll): Add cast(s).
3428 (unloaded_dll): Likewise.
3429 * linux-low.c (second_thread_of_pid_p): Likewise.
3430 (delete_lwp_callback): Likewise.
3431 (count_events_callback): Likewise.
3432 (select_event_lwp_callback): Likewise.
3433 (linux_set_resume_request): Likewise.
3434 * server.c (accumulate_file_name_length): Likewise.
3435 (emit_dll_description): Likewise.
3436 (handle_qxfer_threads_worker): Likewise.
3437 (visit_actioned_threads): Likewise.
3438 * thread-db.c (any_thread_of): Likewise.
3439 * tracepoint.c (same_process_p): Likewise.
3440 (match_blocktype): Likewise.
3441 (build_traceframe_info_xml): Likewise.
3442
3443 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3444
3445 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3446 assignment.
3447 (gdb_unparse_agent_expr): Likewise.
3448 * hostio.c (require_data): Likewise.
3449 (handle_pread): Likewise.
3450 * linux-low.c (disable_regset): Likewise.
3451 (fetch_register): Likewise.
3452 (store_register): Likewise.
3453 (get_dynamic): Likewise.
3454 (linux_qxfer_libraries_svr4): Likewise.
3455 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3456 (set_fast_tracepoint_jump): Likewise.
3457 (uninsert_fast_tracepoint_jumps_at): Likewise.
3458 (reinsert_fast_tracepoint_jumps_at): Likewise.
3459 (validate_inserted_breakpoint): Likewise.
3460 (clone_agent_expr): Likewise.
3461 * regcache.c (init_register_cache): Likewise.
3462 * remote-utils.c (putpkt_binary_1): Likewise.
3463 (decode_M_packet): Likewise.
3464 (decode_X_packet): Likewise.
3465 (look_up_one_symbol): Likewise.
3466 (relocate_instruction): Likewise.
3467 (monitor_output): Likewise.
3468 * server.c (handle_search_memory): Likewise.
3469 (handle_qxfer_exec_file): Likewise.
3470 (handle_qxfer_libraries): Likewise.
3471 (handle_qxfer): Likewise.
3472 (handle_query): Likewise.
3473 (handle_v_cont): Likewise.
3474 (handle_v_run): Likewise.
3475 (captured_main): Likewise.
3476 * target.c (write_inferior_memory): Likewise.
3477 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3478 * tracepoint.c (init_trace_buffer): Likewise.
3479 (add_tracepoint_action): Likewise.
3480 (add_traceframe): Likewise.
3481 (add_traceframe_block): Likewise.
3482 (cmd_qtdpsrc): Likewise.
3483 (cmd_qtdv): Likewise.
3484 (cmd_qtstatus): Likewise.
3485 (response_source): Likewise.
3486 (response_tsv): Likewise.
3487 (cmd_qtnotes): Likewise.
3488 (gdb_collect): Likewise.
3489 (initialize_tracepoint): Likewise.
3490
3491 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3492
3493 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3494 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3495 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3496 <NOP>: New.
3497 (enum aarch64_condition_codes): New enum.
3498 (w0): New static global.
3499 (fp): Likewise.
3500 (lr): Likewise.
3501 (struct aarch64_memory_operand) <type>: New
3502 MEMORY_OPERAND_POSTINDEX type.
3503 (postindex_memory_operand): New helper function.
3504 (emit_ret): New function.
3505 (emit_load_store_pair): New function, factored out of emit_stp
3506 with support for MEMORY_OPERAND_POSTINDEX.
3507 (emit_stp): Rewrite using emit_load_store_pair.
3508 (emit_ldp): New function.
3509 (emit_load_store): Likewise.
3510 (emit_ldr): Mention post-index instruction in comment.
3511 (emit_ldrh): New function.
3512 (emit_ldrb): New function.
3513 (emit_ldrsw): Mention post-index instruction in comment.
3514 (emit_str): Likewise.
3515 (emit_subs): New function.
3516 (emit_cmp): Likewise.
3517 (emit_and): Likewise.
3518 (emit_orr): Likewise.
3519 (emit_orn): Likewise.
3520 (emit_eor): Likewise.
3521 (emit_mvn): Likewise.
3522 (emit_lslv): Likewise.
3523 (emit_lsrv): Likewise.
3524 (emit_asrv): Likewise.
3525 (emit_mul): Likewise.
3526 (emit_sbfm): Likewise.
3527 (emit_sbfx): Likewise.
3528 (emit_ubfm): Likewise.
3529 (emit_ubfx): Likewise.
3530 (emit_csinc): Likewise.
3531 (emit_cset): Likewise.
3532 (emit_nop): Likewise.
3533 (emit_ops_insns): New helper function.
3534 (emit_pop): Likewise.
3535 (emit_push): Likewise.
3536 (aarch64_emit_prologue): New function.
3537 (aarch64_emit_epilogue): Likewise.
3538 (aarch64_emit_add): Likewise.
3539 (aarch64_emit_sub): Likewise.
3540 (aarch64_emit_mul): Likewise.
3541 (aarch64_emit_lsh): Likewise.
3542 (aarch64_emit_rsh_signed): Likewise.
3543 (aarch64_emit_rsh_unsigned): Likewise.
3544 (aarch64_emit_ext): Likewise.
3545 (aarch64_emit_log_not): Likewise.
3546 (aarch64_emit_bit_and): Likewise.
3547 (aarch64_emit_bit_or): Likewise.
3548 (aarch64_emit_bit_xor): Likewise.
3549 (aarch64_emit_bit_not): Likewise.
3550 (aarch64_emit_equal): Likewise.
3551 (aarch64_emit_less_signed): Likewise.
3552 (aarch64_emit_less_unsigned): Likewise.
3553 (aarch64_emit_ref): Likewise.
3554 (aarch64_emit_if_goto): Likewise.
3555 (aarch64_emit_goto): Likewise.
3556 (aarch64_write_goto_address): Likewise.
3557 (aarch64_emit_const): Likewise.
3558 (aarch64_emit_call): Likewise.
3559 (aarch64_emit_reg): Likewise.
3560 (aarch64_emit_pop): Likewise.
3561 (aarch64_emit_stack_flush): Likewise.
3562 (aarch64_emit_zero_ext): Likewise.
3563 (aarch64_emit_swap): Likewise.
3564 (aarch64_emit_stack_adjust): Likewise.
3565 (aarch64_emit_int_call_1): Likewise.
3566 (aarch64_emit_void_call_2): Likewise.
3567 (aarch64_emit_eq_goto): Likewise.
3568 (aarch64_emit_ne_goto): Likewise.
3569 (aarch64_emit_lt_goto): Likewise.
3570 (aarch64_emit_le_goto): Likewise.
3571 (aarch64_emit_gt_goto): Likewise.
3572 (aarch64_emit_ge_got): Likewise.
3573 (aarch64_emit_ops_impl): New static global variable.
3574 (aarch64_emit_ops): New target function, return
3575 &aarch64_emit_ops_impl.
3576 (struct linux_target_ops): Install it.
3577
3578 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3579
3580 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3581 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3582 aarch64-ipa.o.
3583 * linux-aarch64-ipa.c: New file.
3584 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3585 and endian.h.
3586 (aarch64_get_thread_area): New target method.
3587 (extract_signed_bitfield): New helper function.
3588 (aarch64_decode_ldr_literal): New function.
3589 (enum aarch64_opcodes): New enum.
3590 (struct aarch64_register): New struct.
3591 (struct aarch64_operand): New struct.
3592 (x0): New static global.
3593 (x1): Likewise.
3594 (x2): Likewise.
3595 (x3): Likewise.
3596 (x4): Likewise.
3597 (w2): Likewise.
3598 (ip0): Likewise.
3599 (sp): Likewise.
3600 (xzr): Likewise.
3601 (aarch64_register): New helper function.
3602 (register_operand): Likewise.
3603 (immediate_operand): Likewise.
3604 (struct aarch64_memory_operand): New struct.
3605 (offset_memory_operand): New helper function.
3606 (preindex_memory_operand): Likewise.
3607 (enum aarch64_system_control_registers): New enum.
3608 (ENCODE): New macro.
3609 (emit_insn): New helper function.
3610 (emit_b): New function.
3611 (emit_bcond): Likewise.
3612 (emit_cb): Likewise.
3613 (emit_tb): Likewise.
3614 (emit_blr): Likewise.
3615 (emit_stp): Likewise.
3616 (emit_ldp_q_offset): Likewise.
3617 (emit_stp_q_offset): Likewise.
3618 (emit_load_store): Likewise.
3619 (emit_ldr): Likewise.
3620 (emit_ldrsw): Likewise.
3621 (emit_str): Likewise.
3622 (emit_ldaxr): Likewise.
3623 (emit_stxr): Likewise.
3624 (emit_stlr): Likewise.
3625 (emit_data_processing_reg): Likewise.
3626 (emit_data_processing): Likewise.
3627 (emit_add): Likewise.
3628 (emit_sub): Likewise.
3629 (emit_mov): Likewise.
3630 (emit_movk): Likewise.
3631 (emit_mov_addr): Likewise.
3632 (emit_mrs): Likewise.
3633 (emit_msr): Likewise.
3634 (emit_sevl): Likewise.
3635 (emit_wfe): Likewise.
3636 (append_insns): Likewise.
3637 (can_encode_int32_in): New helper function.
3638 (aarch64_relocate_instruction): New function.
3639 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3640 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3641 (struct linux_target_ops): Install aarch64_get_thread_area,
3642 aarch64_install_fast_tracepoint_jump_pad and
3643 aarch64_get_min_fast_tracepoint_insn_len.
3644
3645 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3646
3647 * Makefile.in (aarch64-insn.o): New rule.
3648 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3649
3650 2015-09-21 Yao Qi <yao.qi@linaro.org>
3651
3652 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3653
3654 2015-09-21 Yao Qi <yao.qi@linaro.org>
3655
3656 * tracepoint.c (max_jump_pad_size): Remove.
3657
3658 2015-09-18 Yao Qi <yao.qi@linaro.org>
3659
3660 * linux-aarch64-low.c: Don't include sys/uio.h.
3661 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3662
3663 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3664
3665 * tracepoint.c (eval_result_type): Change prototype.
3666 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3667
3668 2015-09-15 Pedro Alves <palves@redhat.com>
3669
3670 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3671 Check whether to report exec events instead of checking whether
3672 multiprocess is enabled.
3673
3674 2015-09-15 Pedro Alves <palves@redhat.com>
3675
3676 PR remote/18965
3677 * remote-utils.c (prepare_resume_reply): Merge
3678 TARGET_WAITKIND_VFORK_DONE switch case with the
3679 TARGET_WAITKIND_FORKED case.
3680
3681 2015-09-15 Yao Qi <yao.qi@linaro.org>
3682
3683 * server.c (handle_query): Check string comparison using
3684 "else if" instead of "if".
3685
3686 2015-09-15 Yao Qi <yao.qi@linaro.org>
3687
3688 * server.c (vCont_supported): New global variable.
3689 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3690 matches. Append ";vContSupported+" to own_buf.
3691 (handle_v_requests): Append ";s;S" to own_buf if target supports
3692 hardware single step or vCont_supported is false.
3693 (capture_main): Set vCont_supported to zero.
3694
3695 2015-09-15 Yao Qi <yao.qi@linaro.org>
3696
3697 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3698 it to ...
3699 (linux_supports_hardware_single_step): ... New function.
3700 (linux_target_ops): Update.
3701 * lynx-low.c (lynx_target_ops): Set field
3702 supports_hardware_single_step to target_can_do_hardware_single_step.
3703 * nto-low.c (nto_target_ops): Likewise.
3704 * spu-low.c (spu_target_ops): Likewise.
3705 * win32-low.c (win32_target_ops): Likewise.
3706 * target.c (target_can_do_hardware_single_step): New function.
3707 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3708 Remove. <supports_hardware_single_step>: New field.
3709 (target_supports_conditional_breakpoints): Remove.
3710 (target_supports_hardware_single_step): New macro.
3711 (target_can_do_hardware_single_step): Declare.
3712 * server.c (handle_query): Use target_supports_hardware_single_step
3713 instead of target_supports_conditional_breakpoints.
3714
3715 2015-09-15 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3718 function.
3719 (struct linux_target_ops the_low_target): Install
3720 aarch64_linux_siginfo_fixup.
3721
3722 2015-09-11 Don Breazeal <donb@codesourcery.com>
3723 Luis Machado <lgustavo@codesourcery.com>
3724
3725 * linux-low.c (linux_mourn): Static declaration.
3726 (linux_arch_setup): Move in front of
3727 handle_extended_wait.
3728 (linux_arch_setup_thread): New function.
3729 (handle_extended_wait): Handle exec events. Call
3730 linux_arch_setup_thread. Make event_lwp argument a
3731 pointer-to-a-pointer.
3732 (check_zombie_leaders): Do not check stopped threads.
3733 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3734 (linux_low_filter_event): Add lwp and thread for exec'ing
3735 non-leader thread if leader thread has been deleted.
3736 Refactor code into linux_arch_setup_thread and call it.
3737 Pass child lwp pointer by reference to handle_extended_wait.
3738 (linux_wait_for_event_filtered): Update comment.
3739 (linux_wait_1): Prevent clobbering exec event status.
3740 (linux_supports_exec_events): New function.
3741 (linux_target_ops) <supports_exec_events>: Initialize new member.
3742 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3743 new member.
3744 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3745 * server.c (report_exec_events): New global variable.
3746 (handle_query): Handle qSupported query for exec-events feature.
3747 (captured_main): Initialize report_exec_events.
3748 * server.h (report_exec_events): Declare new global variable.
3749 * target.h (struct target_ops) <supports_exec_events>: New
3750 member.
3751 (target_supports_exec_events): New macro.
3752 * win32-low.c (win32_target_ops) <supports_exec_events>:
3753 Initialize new member.
3754
3755 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3756
3757 * linux-low.c (linux_low_enable_btrace): Remove.
3758 (linux_target_ops): Replace linux_low_enable_btrace with
3759 linux_enable_btrace.
3760
3761 2015-09-03 Yao Qi <yao.qi@linaro.org>
3762
3763 * linux-aarch64-low.c (aarch64_insert_point): Call
3764 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3765 returns true.
3766
3767 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3768
3769 * linux-low.c (check_stopped_by_breakpoint): Use
3770 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3771
3772 2015-08-27 Pedro Alves <palves@redhat.com>
3773
3774 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3775
3776 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3777
3778 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3779 the XNEW-family equivalent.
3780 (compile_bytecodes): Likewise.
3781 * dll.c (loaded_dll): Likewise.
3782 * event-loop.c (append_callback_event): Likewise.
3783 (create_file_handler): Likewise.
3784 (create_file_event): Likewise.
3785 * hostio.c (handle_open): Likewise.
3786 * inferiors.c (add_thread): Likewise.
3787 (add_process): Likewise.
3788 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3789 * linux-arm-low.c (arm_new_process): Likewise.
3790 (arm_new_thread): Likewise.
3791 * linux-low.c (add_to_pid_list): Likewise.
3792 (linux_add_process): Likewise.
3793 (handle_extended_wait): Likewise.
3794 (add_lwp): Likewise.
3795 (enqueue_one_deferred_signal): Likewise.
3796 (enqueue_pending_signal): Likewise.
3797 (linux_resume_one_lwp_throw): Likewise.
3798 (linux_resume_one_thread): Likewise.
3799 (linux_read_memory): Likewise.
3800 (linux_write_memory): Likewise.
3801 * linux-mips-low.c (mips_linux_new_process): Likewise.
3802 (mips_linux_new_thread): Likewise.
3803 (mips_add_watchpoint): Likewise.
3804 * linux-x86-low.c (initialize_low_arch): Likewise.
3805 * lynx-low.c (lynx_add_process): Likewise.
3806 * mem-break.c (set_raw_breakpoint_at): Likewise.
3807 (set_breakpoint): Likewise.
3808 (add_condition_to_breakpoint): Likewise.
3809 (add_commands_to_breakpoint): Likewise.
3810 (clone_agent_expr): Likewise.
3811 (clone_one_breakpoint): Likewise.
3812 * regcache.c (new_register_cache): Likewise.
3813 * remote-utils.c (look_up_one_symbol): Likewise.
3814 * server.c (queue_stop_reply): Likewise.
3815 (start_inferior): Likewise.
3816 (queue_stop_reply_callback): Likewise.
3817 (handle_target_event): Likewise.
3818 * spu-low.c (fetch_ppc_memory): Likewise.
3819 (store_ppc_memory): Likewise.
3820 * target.c (set_target_ops): Likewise.
3821 * thread-db.c (thread_db_load_search): Likewise.
3822 (try_thread_db_load_1): Likewise.
3823 * tracepoint.c (add_tracepoint): Likewise.
3824 (add_tracepoint_action): Likewise.
3825 (create_trace_state_variable): Likewise.
3826 (cmd_qtdpsrc): Likewise.
3827 (cmd_qtro): Likewise.
3828 (add_while_stepping_state): Likewise.
3829 * win32-low.c (child_add_thread): Likewise.
3830 (get_image_name): Likewise.
3831
3832 2015-08-25 Yao Qi <yao.qi@linaro.org>
3833
3834 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3835
3836 2015-08-25 Yao Qi <yao.qi@linaro.org>
3837
3838 * Makefile.in (aarch64-linux.o): New rule.
3839 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3840 srv_tgtobj.
3841 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3842 (aarch64_init_debug_reg_state): Make it extern.
3843 (aarch64_linux_prepare_to_resume): Remove.
3844
3845 2015-08-25 Yao Qi <yao.qi@linaro.org>
3846
3847 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3848 lwp_arch_private_info and ptid_of_lwp.
3849
3850 2015-08-25 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3853 Find proc_info by find_process_pid. All callers updated.
3854
3855 2015-08-25 Yao Qi <yao.qi@linaro.org>
3856
3857 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3858 Remove.
3859 (debug_reg_change_callback): Remove.
3860 (aarch64_notify_debug_reg_change): Remove.
3861
3862 2015-08-25 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3865 Call current_lwp_ptid.
3866
3867 2015-08-25 Yao Qi <yao.qi@linaro.org>
3868
3869 * linux-aarch64-low.c (debug_reg_change_callback): Use
3870 debug_printf.
3871
3872 2015-08-25 Yao Qi <yao.qi@linaro.org>
3873
3874 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3875
3876 2015-08-25 Yao Qi <yao.qi@linaro.org>
3877
3878 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3879
3880 2015-08-25 Yao Qi <yao.qi@linaro.org>
3881
3882 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3883 the code.
3884
3885 2015-08-25 Yao Qi <yao.qi@linaro.org>
3886
3887 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3888 Remove.
3889 (debug_reg_change_callback): Remove argument entry and add argument
3890 lwp. Remove local variable thread. Don't print thread id in the
3891 debugging output. Don't check whether pid of thread equals to pid.
3892 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3893 iterate_over_lwps instead find_inferior.
3894
3895 2015-08-24 Pedro Alves <palves@redhat.com>
3896
3897 * inferiors.c (get_first_process): New function.
3898 * inferiors.h (get_first_process): New declaration.
3899 * remote-utils.c (read_ptid): Default to the first process in the
3900 list, instead of to the current thread's process.
3901
3902 2015-08-24 Pedro Alves <palves@redhat.com>
3903
3904 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3905 * event-loop.c: Likewise.
3906 * remote-utils.c: Likewise.
3907 * tracepoint.c: Likewise.
3908
3909 2015-08-24 Pedro Alves <palves@redhat.com>
3910
3911 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3912 ptid_get_lwp.
3913
3914 2015-08-21 Pedro Alves <palves@redhat.com>
3915
3916 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3917 instead of literal 1.
3918
3919 2015-08-21 Pedro Alves <palves@redhat.com>
3920
3921 * tdesc.c (default_description): Explicitly zero-initialize.
3922
3923 2015-08-21 Pedro Alves <palves@redhat.com>
3924
3925 PR gdb/18749
3926 * inferiors.c (remove_thread): Discard any pending stop reply for
3927 this thread.
3928 * server.c (remove_all_on_match_pid): Rename to ...
3929 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3930 instead of a pid.
3931 (discard_queued_stop_replies): Change parameter to a ptid. Now
3932 extern.
3933 (handle_v_kill, kill_inferior_callback, captured_main)
3934 (process_serial_event): Adjust.
3935 * server.h (discard_queued_stop_replies): Declare.
3936
3937 2015-08-21 Pedro Alves <palves@redhat.com>
3938
3939 * linux-low.c (wait_for_sigstop): Always switch to no thread
3940 selected if the previously current thread dies.
3941 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3942 process instead of the current thread's.
3943 * remote-utils.c (input_interrupt): Don't check if there's no
3944 current thread.
3945 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3946 current thread to the general thread fails, error out.
3947 (handle_qxfer_auxv, handle_qxfer_libraries)
3948 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3949 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3950 (handle_query): Check if there's a thread selected instead of
3951 checking whether there's any thread in the thread list.
3952 (handle_qxfer_threads, handle_qxfer_btrace)
3953 (handle_qxfer_btrace_conf): Don't error out early if there's no
3954 thread in the thread list.
3955 (handle_v_cont, myresume): Don't set the current thread to the
3956 continue thread.
3957 (process_serial_event) <Hg handling>: Also set thread_id if the
3958 previous general thread is still alive.
3959 (process_serial_event) <g/G handling>: If setting the current
3960 thread to the general thread fails, error out.
3961 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3962 thread's lwp instead of the current thread's.
3963 * target.c (set_desired_thread): If the desired thread was not
3964 found, leave the current thread pointing to NULL. Return an int
3965 (boolean) indicating success.
3966 * target.h (set_desired_thread): Change return type to int.
3967
3968 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3969
3970 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3971 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3972 #includes.
3973 (ps_get_thread_area): New function.
3974
3975 2015-08-19 Gary Benson <gbenson@redhat.com>
3976
3977 * hostio.c (handle_pread): Do not attempt to read more data
3978 than hostio_reply_with_data can fit in a packet.
3979
3980 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3981
3982 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3983
3984 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3985
3986 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3987
3988 2015-08-06 Pedro Alves <palves@redhat.com>
3989
3990 * tracepoint.c (expr_eval_result): Now an int.
3991
3992 2015-08-06 Pedro Alves <palves@redhat.com>
3993
3994 * gdbthread.h (struct regcache): Forward declare.
3995 (struct thread_info) <regcache_data>: Now a struct regcache
3996 pointer.
3997 * inferiors.c (inferior_regcache_data)
3998 (set_inferior_regcache_data): Now work with struct regcache
3999 pointers.
4000 * inferiors.h (struct regcache): Forward declare.
4001 (inferior_regcache_data, set_inferior_regcache_data): Now work
4002 with struct regcache pointers.
4003 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4004 (free_register_cache_thread): Remove struct regcache pointer
4005 casts.
4006
4007 2015-08-06 Pedro Alves <palves@redhat.com>
4008
4009 * server.c (captured_main): On error, print the exception message
4010 to stderr, and if run_once is set, throw a quit.
4011
4012 2015-08-06 Pedro Alves <palves@redhat.com>
4013
4014 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4015 the current thread.
4016
4017 2015-08-06 Pedro Alves <palves@redhat.com>
4018
4019 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4020 reading beyond the passed in buffer length.
4021
4022 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4023
4024 * tracepoint.c (symbol_list) <required>: Remove.
4025
4026 2015-08-06 Pedro Alves <palves@redhat.com>
4027
4028 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4029 count if stopping and suspending threads.
4030 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4031 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4032 (linux_detach): Complete an ongoing step-over.
4033 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4034 throughout.
4035 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4036 (linux_wait_1): If passing a signal to the inferior after
4037 finishing a step-over, unsuspend and re-resume all lwps. If we
4038 see a single-step event but the thread should be continuing, don't
4039 pass the trap to gdb.
4040 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4041 internal_error instead of gdb_assert.
4042 (enqueue_pending_signal): New function.
4043 (check_ptrace_stopped_lwp_gone): Add debug output.
4044 (start_step_over): Use internal_error instead of gdb_assert.
4045 (complete_ongoing_step_over): New function.
4046 (linux_resume_one_thread): Don't resume a suspended thread.
4047 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4048 it stepping.
4049
4050 2015-08-06 Pedro Alves <palves@redhat.com>
4051
4052 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4053 (linux_thread_alive): Use lwp_is_marked_dead.
4054 (extended_event_reported): Delete.
4055 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4056 instead of extended_event_reported.
4057 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4058 as well.
4059 (lwp_is_marked_dead): New function.
4060 (lwp_running): Use lwp_is_marked_dead.
4061 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4062 comment.
4063
4064 2015-08-06 Pedro Alves <palves@redhat.com>
4065
4066 * linux-low.c (linux_wait_1): Move fork event output out of the
4067 !report_to_gdb check. Pass event_child->waitstatus to
4068 target_waitstatus_to_string instead of ourstatus.
4069
4070 2015-08-04 Yao Qi <yao.qi@linaro.org>
4071
4072 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4073 if current_thread is 32 bit.
4074
4075 2015-08-04 Yao Qi <yao.qi@linaro.org>
4076
4077 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4078 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4079 * server.c (extended_protocol): Remove "static".
4080 * server.h (extended_protocol): Declare it.
4081
4082 2015-08-04 Yao Qi <yao.qi@linaro.org>
4083
4084 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4085 both aarch64 and aarch32.
4086 (aarch64_set_pc): Likewise.
4087
4088 2015-08-04 Yao Qi <yao.qi@linaro.org>
4089
4090 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4091 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4092 arm-with-neon.xml to srv_xmlfiles.
4093 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4094 (is_64bit_tdesc): New function.
4095 (aarch64_linux_read_description): New function.
4096 (aarch64_arch_setup): Call aarch64_linux_read_description.
4097 (regs_info): Rename to regs_info_aarch64.
4098 (aarch64_regs_info): Return right regs_info.
4099 (initialize_low_arch): Call initialize_low_arch_aarch32.
4100
4101 2015-08-04 Yao Qi <yao.qi@linaro.org>
4102
4103 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4104 * linux-aarch32-low.c: New file.
4105 * linux-aarch32-low.h: New file.
4106 * linux-arm-low.c (arm_fill_gregset): Move it to
4107 linux-aarch32-low.c.
4108 (arm_store_gregset): Likewise.
4109 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4110 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4111 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4112 (regs_info): Rename to regs_info_arm.
4113 (arm_regs_info): Return regs_info_aarch32 if
4114 have_ptrace_getregset is 1 and target description is
4115 arm_with_neon or arm_with_vfpv3.
4116 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4117 Call initialize_low_arch_aarch32 instead.
4118
4119 2015-08-04 Yao Qi <yao.qi@linaro.org>
4120
4121 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4122 * linux-low.c: ... here.
4123 * linux-low.h (have_ptrace_getregset): Declare it.
4124
4125 2015-08-04 Pedro Alves <palves@redhat.com>
4126
4127 * thread-db.c (struct thread_db): Use new typedefs.
4128 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4129 CHK calls.
4130 (disable_thread_event_reporting): Cast result of dlsym to
4131 destination function pointer type.
4132 (thread_db_mourn): Use td_ta_delete_ftype.
4133
4134 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4135
4136 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4137 arch variant.
4138 (CDX_BREAKPOINT): Define for R2.
4139 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4140 (the_low_target): Add comments.
4141
4142 2015-07-30 Yao Qi <yao.qi@linaro.org>
4143
4144 * linux-arm-low.c (arm_hwcap): Remove it.
4145 (arm_read_description): New local variable arm_hwcap. Don't
4146 set arm_hwcap to zero.
4147
4148 2015-07-30 Yao Qi <yao.qi@linaro.org>
4149
4150 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4151 Use regcache->tdesc instead.
4152 (arm_store_wmmxregset): Likewise.
4153 (arm_fill_vfpregset): Likewise.
4154 (arm_store_vfpregset): Likewise.
4155
4156 2015-07-30 Yao Qi <yao.qi@linaro.org>
4157
4158 * linux-arm-low.c: Include arch/arm.h.
4159 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4160 (arm_store_gregset): Likewise.
4161
4162 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4163
4164 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4165 ptrace's 4th parameter.
4166
4167 2015-07-27 Yao Qi <yao.qi@linaro.org>
4168
4169 * configure.srv (case aarch64*-*-linux*): Don't set
4170 srv_linux_usrregs.
4171
4172 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4173
4174 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4175 sys/ptrace.h.
4176 * linux-arm-low.c: Likewise.
4177 * linux-cris-low.c: Likewise.
4178 * linux-crisv32-low.c: Likewise.
4179 * linux-low.c: Likewise.
4180 * linux-m68k-low.c: Likewise.
4181 * linux-mips-low.c: Likewise.
4182 * linux-nios2-low.c: Likewise.
4183 * linux-s390-low.c: Likewise.
4184 * linux-sparc-low.c: Likewise.
4185 * linux-tic6x-low.c: Likewise.
4186 * linux-tile-low.c: Likewise.
4187 * linux-x86-low.c: Likewise.
4188
4189 2015-07-24 Pedro Alves <palves@redhat.com>
4190
4191 * config.in: Regenerate.
4192 * configure: Regenerate.
4193
4194 2015-07-24 Pedro Alves <palves@redhat.com>
4195
4196 * acinclude.m4: Include ../ptrace.m4.
4197 * configure.ac: Call GDB_AC_PTRACE.
4198 * config.in, configure: Regenerate.
4199
4200 2015-07-24 Yao Qi <yao.qi@linaro.org>
4201
4202 * linux-low.c (linux_create_inferior): Remove setting to
4203 proc->priv->new_inferior.
4204 (linux_attach): Likewise.
4205 (linux_low_filter_event): Likewise.
4206 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4207
4208 2015-07-24 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-low.c (linux_arch_setup): New function.
4211 (linux_low_filter_event): If proc->tdesc is NULL and
4212 proc->attached is true, call the_low_target.arch_setup.
4213 Otherwise, keep status pending, and return.
4214 (linux_resume_one_lwp_throw): Don't call get_pc if
4215 thread->while_stepping isn't NULL. Don't call
4216 get_thread_regcache if proc->tdesc is NULL.
4217 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4218 (linux_target_ops): Install arch_setup.
4219 * server.c (start_inferior): Call the_target->arch_setup.
4220 * target.h (struct target_ops) <arch_setup>: New field.
4221 (target_arch_setup): New marco.
4222 * lynx-low.c (lynx_target_ops): Update.
4223 * nto-low.c (nto_target_ops): Update.
4224 * spu-low.c (spu_target_ops): Update.
4225 * win32-low.c (win32_target_ops): Update.
4226
4227 2015-07-24 Yao Qi <yao.qi@linaro.org>
4228
4229 * linux-low.c (linux_add_process): Don't set
4230 proc->priv->new_inferior.
4231 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4232 (linux_attach): Likewise.
4233
4234 2015-07-24 Yao Qi <yao.qi@linaro.org>
4235
4236 * server.c (start_inferior): Code refactor.
4237
4238 2015-07-24 Yao Qi <yao.qi@linaro.org>
4239
4240 * server.c (process_serial_event): Set general_thread.
4241
4242 2015-07-21 Yao Qi <yao.qi@linaro.org>
4243
4244 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4245 aarch64_linux_get_debug_reg_capacity.
4246
4247 2015-07-17 Yao Qi <yao.qi@linaro.org>
4248
4249 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4250 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4251 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4252 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4253 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4254 (AARCH64_HWP_ALIGNMENT): Likewise.
4255 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4256 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4257 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4258 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4259 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4260 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4261 (struct aarch64_debug_reg_state): Likewise.
4262 (struct arch_lwp_info): Likewise.
4263 (aarch64_align_watchpoint): Likewise.
4264 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4265 (aarch64_watchpoint_length): Likewise.
4266 (aarch64_point_encode_ctrl_reg): Likewise
4267 (aarch64_point_is_aligned): Likewise.
4268 (aarch64_align_watchpoint): Likewise.
4269 (aarch64_linux_set_debug_regs):
4270 (aarch64_dr_state_insert_one_point): Likewise.
4271 (aarch64_dr_state_remove_one_point): Likewise.
4272 (aarch64_handle_breakpoint): Likewise.
4273 (aarch64_handle_aligned_watchpoint): Likewise.
4274 (aarch64_handle_unaligned_watchpoint): Likewise.
4275 (aarch64_handle_watchpoint): Likewise.
4276
4277 2015-07-17 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4280 and don't aarch64_get_debug_reg_state. All callers update.
4281 (aarch64_handle_aligned_watchpoint): Likewise.
4282 (aarch64_handle_unaligned_watchpoint): Likewise.
4283 (aarch64_handle_watchpoint): Likewise.
4284 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4285 (aarch64_remove_point): Likewise.
4286
4287 2015-07-17 Yao Qi <yao.qi@linaro.org>
4288
4289 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4290 debug_printf.
4291 (aarch64_handle_unaligned_watchpoint): Likewise.
4292
4293 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4294
4295 Revert the previous 3 commits:
4296 Move gdb_regex* to common/
4297 Move linux_find_memory_regions_full & co.
4298 gdbserver build-id attribute generator
4299
4300 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4301 Jan Kratochvil <jan.kratochvil@redhat.com>
4302
4303 gdbserver build-id attribute generator.
4304 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4305 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4306 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4307 (find_phdr): New.
4308 (get_dynamic): Use find_pdhr to traverse program headers.
4309 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4310 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4311 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4312 (get_hex_build_id): New.
4313 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4314 to reply XML document.
4315
4316 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4317 Jan Kratochvil <jan.kratochvil@redhat.com>
4318
4319 * target.c: Include target/target-utils.h and fcntl.h.
4320 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4321 (target_fileio_read_stralloc): New functions.
4322
4323 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4324
4325 * Makefile.in (OBS): Add gdb_regex.o.
4326 (gdb_regex.o): New.
4327 * config.in: Rebuilt.
4328 * configure: Rebuilt.
4329
4330 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4331 Jan Kratochvil <jan.kratochvil@redhat.com>
4332
4333 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4334 * Makefile.in (OBS): Add target-utils.o.
4335 (linux-maps.o, target-utils.o): New.
4336 * configure.srv (srv_linux_obj): Add linux-maps.o.
4337
4338 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4339
4340 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4341 function, return 1.
4342 (the_low_target): Install it.
4343
4344 2015-07-14 Pedro Alves <palves@redhat.com>
4345
4346 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4347 Instead, ignore ECHILD, and throw an error for other errnos.
4348
4349 2015-07-10 Pedro Alves <palves@redhat.com>
4350
4351 * event-loop.c (struct callback_event) <data>: Change type to
4352 gdb_client_data instance instead of gdb_client_data pointer.
4353 (append_callback_event): Adjust.
4354
4355 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4356
4357 * linux-aarch64-low.c: Add comments for each linux_target_ops
4358 method. Remove comments already covered in target_ops and
4359 linux_target_ops definitions.
4360 (the_low_target): Add comments for each unimplemented method.
4361
4362 2015-07-09 Yao Qi <yao.qi@linaro.org>
4363
4364 * linux-aarch64-low.c (aarch64_regmap): Remove.
4365 (aarch64_usrregs_info): Remove.
4366 (regs_info): Set field usrregs to NULL.
4367
4368 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4369
4370 * linux-low.c: Include "rsp-low.h"
4371 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4372 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4373 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4374 (handle_btrace_enable_pt): New.
4375 (handle_btrace_general_set): Support "pt".
4376 (handle_btrace_conf_general_set): Support "pt:size".
4377
4378 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4379
4380 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4381 Z_PACKET_SW_BP.
4382
4383 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4384
4385 * linux-aarch64-low.c: Remove comment about endianness.
4386 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4387 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4388 memcmp.
4389
4390 2015-06-24 Gary Benson <gbenson@redhat.com>
4391
4392 * linux-i386-ipa.c (stdint.h): Do not include.
4393 * lynx-i386-low.c (stdint.h): Likewise.
4394 * lynx-ppc-low.c (stdint.h): Likewise.
4395 * mem-break.c (stdint.h): Likewise.
4396 * thread-db.c (stdint.h): Likewise.
4397 * tracepoint.c (stdint.h): Likewise.
4398 * win32-low.c (stdint.h): Likewise.
4399
4400 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4401
4402 * server.c (write_qxfer_response): Update call to
4403 remote_escape_output.
4404
4405 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4406 Jan Kratochvil <jan.kratochvil@redhat.com>
4407
4408 Merge multiple hex conversions.
4409 * gdbreplay.c (tohex): Rename to 'fromhex'.
4410 (logchar): Use fromhex.
4411
4412 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4413
4414 * server.c (handle_qxfer_libraries): Set `version' attribute for
4415 <library-list>.
4416
4417 2015-06-10 Gary Benson <gbenson@redhat.com>
4418
4419 * target.h (struct target_ops) <multifs_open>: New field.
4420 <multifs_unlink>: Likewise.
4421 <multifs_readlink>: Likewise.
4422 * linux-low.c (nat/linux-namespaces.h): New include.
4423 (linux_target_ops): Initialize the_target->multifs_open,
4424 the_target->multifs_unlink and the_target->multifs_readlink.
4425 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4426 * hostio.c (hostio_fs_pid): New static variable.
4427 (hostio_handle_new_gdb_connection): New function.
4428 (handle_setfs): Likewise.
4429 (handle_open): Use the_target->multifs_open as appropriate.
4430 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4431 (handle_readlink): Use the_target->multifs_readlink as
4432 appropriate.
4433 (handle_vFile): Handle vFile:setfs packets.
4434 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4435 after target_handle_new_gdb_connection.
4436
4437 2015-06-10 Gary Benson <gbenson@redhat.com>
4438
4439 * configure.ac (AC_CHECK_FUNCS): Add setns.
4440 * config.in: Regenerate.
4441 * configure: Likewise.
4442 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4443 (linux-namespaces.o): New rule.
4444 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4445
4446 2015-06-09 Gary Benson <gbenson@redhat.com>
4447
4448 * hostio.c (handle_open): Process mode argument with
4449 fileio_to_host_mode.
4450
4451 2015-06-01 Yao Qi <yao.qi@linaro.org>
4452
4453 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4454 * linux-x86-low.c: Likewise.
4455
4456 2015-05-28 Don Breazeal <donb@codesourcery.com>
4457
4458 * linux-low.c (handle_extended_wait): Initialize
4459 thread_info.last_resume_kind for new fork children.
4460
4461 2015-05-15 Pedro Alves <palves@redhat.com>
4462
4463 * target.h (target_handle_new_gdb_connection): Rewrite using if
4464 wrapped in do/while.
4465
4466 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4467
4468 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4469 * configure, config.in: Regenerate.
4470 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4471 Declare typedef.
4472
4473 2015-05-12 Don Breazeal <donb@codesourcery.com>
4474
4475 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4476 PTRACE_EVENT_VFORK_DONE.
4477 (linux_low_ptrace_options, extended_event_reported): Add vfork
4478 events.
4479 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4480 and "vforkdone" for RSP 'T' Stop Reply Packet.
4481 * server.h (report_vfork_events): Declare
4482 global variable.
4483
4484 2015-05-12 Don Breazeal <donb@codesourcery.com>
4485
4486 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4487 (the_low_target) <new_fork>: Initialize new member.
4488 * linux-arm-low.c (arm_new_fork): New function.
4489 (the_low_target) <new_fork>: Initialize new member.
4490 * linux-low.c (handle_extended_wait): Call new target function
4491 new_fork.
4492 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4493 * linux-mips-low.c (mips_add_watchpoint): New function
4494 extracted from mips_insert_point.
4495 (the_low_target) <new_fork>: Initialize new member.
4496 (mips_linux_new_fork): New function.
4497 (mips_insert_point): Call mips_add_watchpoint.
4498 * linux-x86-low.c (x86_linux_new_fork): New function.
4499 (the_low_target) <new_fork>: Initialize new member.
4500
4501 2015-05-12 Don Breazeal <donb@codesourcery.com>
4502
4503 * linux-low.c (handle_extended_wait): Implement return value,
4504 rename argument 'event_child' to 'event_lwp', handle
4505 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4506 (linux_low_ptrace_options): New function.
4507 (linux_low_filter_event): Call linux_low_ptrace_options,
4508 use different argument fo linux_enable_event_reporting,
4509 use return value from handle_extended_wait.
4510 (extended_event_reported): New function.
4511 (linux_wait_1): Call extended_event_reported and set
4512 status to report fork events.
4513 (linux_write_memory): Add pid to debug message.
4514 (reset_lwp_ptrace_options_callback): New function.
4515 (linux_handle_new_gdb_connection): New function.
4516 (linux_target_ops): Initialize new structure member.
4517 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4518 * lynx-low.c: Initialize new structure member.
4519 * remote-utils.c (prepare_resume_reply): Implement stop reason
4520 "fork" for "T" stop message.
4521 * server.c (handle_query): Call handle_new_gdb_connection.
4522 * server.h (report_fork_events): Declare global flag.
4523 * target.h (struct target_ops) <handle_new_gdb_connection>:
4524 New member.
4525 (target_handle_new_gdb_connection): New macro.
4526 * win32-low.c: Initialize new structure member.
4527
4528 2015-05-12 Don Breazeal <donb@codesourcery.com>
4529
4530 * mem-break.c (APPEND_TO_LIST): Define macro.
4531 (clone_agent_expr): New function.
4532 (clone_one_breakpoint): New function.
4533 (clone_all_breakpoints): New function.
4534 * mem-break.h: Declare new functions.
4535
4536 2015-05-12 Don Breazeal <donb@codesourcery.com>
4537
4538 * linux-low.c (linux_supports_fork_events): New function.
4539 (linux_supports_vfork_events): New function.
4540 (linux_target_ops): Initialize new structure members.
4541 (initialize_low): Call linux_check_ptrace_features.
4542 * lynx-low.c (lynx_target_ops): Initialize new structure
4543 members.
4544 * server.c (report_fork_events, report_vfork_events):
4545 New global flags.
4546 (handle_query): Add new features to qSupported packet and
4547 response.
4548 (captured_main): Initialize new global variables.
4549 * target.h (struct target_ops) <supports_fork_events>:
4550 New member.
4551 <supports_vfork_events>: New member.
4552 (target_supports_fork_events): New macro.
4553 (target_supports_vfork_events): New macro.
4554 * win32-low.c (win32_target_ops): Initialize new structure
4555 members.
4556
4557 2015-05-12 Gary Benson <gbenson@redhat.com>
4558
4559 * server.c (handle_qxfer_exec_file): Use current process
4560 if annex is empty.
4561
4562 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4563
4564 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4565 Remove HAVE_PTRACE_GETREGS conditionals.
4566 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4567 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4568
4569 2015-05-08 Yao Qi <yao.qi@linaro.org>
4570
4571 * linux-low.c (linux_supports_conditional_breakpoints): New
4572 function.
4573 (linux_target_ops): Install new target method.
4574 * lynx-low.c (lynx_target_ops): Install NULL hook for
4575 supports_conditional_breakpoints.
4576 * nto-low.c (nto_target_ops): Likewise.
4577 * spu-low.c (spu_target_ops): Likewise.
4578 * win32-low.c (win32_target_ops): Likewise.
4579 * server.c (handle_query): Check
4580 target_supports_conditional_breakpoints.
4581 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4582 New field.
4583 (target_supports_conditional_breakpoints): New macro.
4584
4585 2015-05-06 Pedro Alves <palves@redhat.com>
4586
4587 PR server/18081
4588 * server.c (start_inferior): If the process exits, mourn it.
4589
4590 2015-04-21 Gary Benson <gbenson@redhat.com>
4591
4592 * hostio.c (fileio_open_flags_to_host): Factored out to
4593 fileio_to_host_openflags in common/fileio.c. Single use
4594 updated.
4595
4596 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4597
4598 * linux-xtensa-low.c (xtensa_fill_gregset)
4599 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4600 XCHAL_HAVE_LOOP.
4601
4602 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4603
4604 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4605 (regs_info): Replace usrregs pointer with NULL.
4606
4607 2015-04-17 Gary Benson <gbenson@redhat.com>
4608
4609 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4610 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4611 * server.c (handle_qxfer_exec_file): New function.
4612 (qxfer_packets): Add exec-file entry.
4613 (handle_query): Report qXfer:exec-file:read as supported packet.
4614
4615 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4616
4617 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4618
4619 2015-04-09 Gary Benson <gbenson@redhat.com>
4620
4621 * hostio-errno.c (errno_to_fileio_error): Remove function.
4622 Update caller to use remote_fileio_to_fio_error.
4623
4624 2015-04-09 Yao Qi <yao.qi@linaro.org>
4625
4626 * linux-low.c (linux_insert_point): Call
4627 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4628 (linux_remove_point): Call remove_memory_breakpoint if type is
4629 raw_bkpt_type_sw.
4630 * linux-x86-low.c (x86_insert_point): Don't call
4631 insert_memory_breakpoint.
4632 (x86_remove_point): Don't call remove_memory_breakpoint.
4633
4634 2015-04-01 Pedro Alves <palves@redhat.com>
4635 Cleber Rosa <crosa@redhat.com>
4636
4637 * server.c (gdbserver_usage): Reorganize and extend the usage
4638 message.
4639
4640 2015-03-24 Pedro Alves <palves@redhat.com>
4641
4642 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4643 output. Also dump TRAP_TRACE.
4644 (linux_low_filter_event): In debug output, distinguish a
4645 resume_stop SIGSTOP from a delayed SIGSTOP.
4646
4647 2015-03-24 Gary Benson <gbenson@redhat.com>
4648
4649 * linux-x86-low.c (x86_linux_new_thread): Moved to
4650 nat/x86-linux.c.
4651 (x86_linux_prepare_to_resume): Likewise.
4652
4653 2015-03-24 Gary Benson <gbenson@redhat.com>
4654
4655 * Makefile.in (x86-linux-dregs.o): New rule.
4656 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4657 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4658 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4659 (x86_linux_dr_get): Likewise.
4660 (x86_linux_dr_set): Likewise.
4661 (update_debug_registers_callback): Likewise.
4662 (x86_linux_dr_set_addr): Likewise.
4663 (x86_linux_dr_get_addr): Likewise.
4664 (x86_linux_dr_set_control): Likewise.
4665 (x86_linux_dr_get_control): Likewise.
4666 (x86_linux_dr_get_status): Likewise.
4667 (x86_linux_update_debug_registers): Likewise.
4668
4669 2015-03-24 Gary Benson <gbenson@redhat.com>
4670
4671 * linux-x86-low.c (x86_linux_update_debug_registers):
4672 New function, factored out from...
4673 (x86_linux_prepare_to_resume): ...this.
4674
4675 2015-03-24 Gary Benson <gbenson@redhat.com>
4676
4677 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4678 (x86_linux_dr_set): Likewise.
4679 (update_debug_registers_callback): Likewise.
4680 (x86_linux_dr_set_addr): Likewise.
4681 (x86_linux_dr_get_addr): Likewise.
4682 (x86_linux_dr_set_control): Likewise.
4683 (x86_linux_dr_get_control): Likewise.
4684 (x86_linux_dr_get_status): Likewise.
4685 (x86_linux_prepare_to_resume): Likewise.
4686
4687 2015-03-24 Gary Benson <gbenson@redhat.com>
4688
4689 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4690 Use perror_with_name. Pass string through gettext.
4691 (x86_linux_dr_set): Likewise.
4692
4693 2015-03-24 Gary Benson <gbenson@redhat.com>
4694
4695 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4696 (x86_linux_dr_set_addr): ...this.
4697 (x86_dr_low_get_addr): Rename to...
4698 (x86_linux_dr_get_addr): ...this.
4699 (x86_dr_low_set_control): Rename to...
4700 (x86_linux_dr_set_control): ...this.
4701 (x86_dr_low_get_control): Rename to...
4702 (x86_linux_dr_get_control): ...this.
4703 (x86_dr_low_get_status): Rename to...
4704 (x86_linux_dr_get_status): ...this.
4705 (x86_dr_low): Update with new function names.
4706
4707 2015-03-24 Gary Benson <gbenson@redhat.com>
4708
4709 * Makefile.in (x86-linux.o): New rule.
4710 * configure.srv: Add x86-linux.o to relevant targets.
4711 * linux-low.c (lwp_set_arch_private_info): New function.
4712 (lwp_arch_private_info): Likewise.
4713 * linux-x86-low.c: Include nat/x86-linux.h.
4714 (arch_lwp_info): Removed structure.
4715 (update_debug_registers_callback):
4716 Use lwp_set_debug_registers_changed.
4717 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4718 and lwp_set_debug_registers_changed.
4719 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4720
4721 2015-03-24 Gary Benson <gbenson@redhat.com>
4722
4723 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4724 * linux-arm-low.c (arm_new_thread): Likewise.
4725 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4726 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4727 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4728 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4729
4730 2015-03-24 Gary Benson <gbenson@redhat.com>
4731
4732 * linux-low.c (ptid_of_lwp): New function.
4733 (lwp_is_stopped): Likewise.
4734 (lwp_stop_reason): Likewise.
4735 * linux-x86-low.c (update_debug_registers_callback):
4736 Use lwp_is_stopped.
4737 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4738 lwp_stop_reason.
4739
4740 2015-03-24 Gary Benson <gbenson@redhat.com>
4741
4742 * linux-low.h (linux_stop_lwp): Remove declaration.
4743
4744 2015-03-24 Gary Benson <gbenson@redhat.com>
4745
4746 * linux-low.h: Include nat/linux-nat.h.
4747 * linux-low.c (iterate_over_lwps_args): New structure.
4748 (iterate_over_lwps_filter): New function.
4749 (iterate_over_lwps): Likewise.
4750 * linux-x86-low.c (update_debug_registers_callback):
4751 Update signature to what iterate_over_lwps expects.
4752 Remove PID check that iterate_over_lwps now performs.
4753 (x86_dr_low_set_addr): Use iterate_over_lwps.
4754 (x86_dr_low_set_control): Likewise.
4755
4756 2015-03-24 Gary Benson <gbenson@redhat.com>
4757
4758 * linux-x86-low.c (x86_debug_reg_state): New function.
4759 (x86_linux_prepare_to_resume): Use the above.
4760
4761 2015-03-24 Gary Benson <gbenson@redhat.com>
4762
4763 * linux-low.c (current_lwp_ptid): New function.
4764 * linux-x86-low.c: Include nat/linux-nat.h.
4765 (x86_dr_low_get_addr): Use current_lwp_ptid.
4766 (x86_dr_low_get_control): Likewise.
4767 (x86_dr_low_get_status): Likewise.
4768
4769 2015-03-20 Pedro Alves <palves@redhat.com>
4770
4771 * tracepoint.c (cmd_qtstatus): Make "str" const.
4772
4773 2015-03-20 Pedro Alves <palves@redhat.com>
4774
4775 * server.c (handle_general_set): Make "req_str" const.
4776
4777 2015-03-19 Pedro Alves <palves@redhat.com>
4778
4779 * linux-low.c (linux_resume_one_lwp): Rename to ...
4780 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4781 instead call perror_with_name.
4782 (check_ptrace_stopped_lwp_gone): New function.
4783 (linux_resume_one_lwp): Reimplement as wrapper around
4784 linux_resume_one_lwp_throw that swallows errors if the LWP is
4785 gone.
4786
4787 2015-03-19 Pedro Alves <palves@redhat.com>
4788
4789 * linux-low.c (count_events_callback, select_event_lwp_callback):
4790 No longer check whether the thread has resume_stop as last resume
4791 kind.
4792
4793 2015-03-19 Pedro Alves <palves@redhat.com>
4794
4795 * linux-low.c (count_events_callback, select_event_lwp_callback):
4796 Use the lwp's status_pending_p field, not the thread's.
4797
4798 2015-03-19 Pedro Alves <palves@redhat.com>
4799
4800 * linux-low.c (select_event_lwp_callback): Update comments to
4801 no longer mention SIGTRAP.
4802
4803 2015-03-18 Gary Benson <gbenson@redhat.com>
4804
4805 * server.c (handle_query): Do not report vFile:fstat as supported.
4806
4807 2015-03-11 Gary Benson <gbenson@redhat.com>
4808
4809 * hostio.c (sys/types.h): New include.
4810 (sys/stat.h): Likewise.
4811 (common-remote-fileio.h): Likewise.
4812 (handle_fstat): New function.
4813 (handle_vFile): Handle vFile:fstat packets.
4814
4815 2015-03-11 Gary Benson <gbenson@redhat.com>
4816
4817 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4818 struct stat.st_blocks and struct stat.st_blksize.
4819 * configure: Regenerate.
4820 * config.in: Likewise.
4821 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4822 (OBS): Add common-remote-fileio.o.
4823 (common-remote-fileio.o): New rule.
4824
4825 2015-03-09 Pedro Alves <palves@redhat.com>
4826
4827 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4828 'struct sockaddr' pointer in 'accept' call.
4829
4830 2015-03-09 Pedro Alves <palves@redhat.com>
4831
4832 Revert:
4833 2015-03-07 Pedro Alves <palves@redhat.com>
4834 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4835 or <winsock2.h> here. Instead include "gdb_socket.h".
4836 (remote_open): Use union gdb_sockaddr_u.
4837 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4838 or <winsock2.h> here. Instead include "gdb_socket.h".
4839 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4840 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4841 or <sys/un.h>.
4842 (init_named_socket, gdb_agent_helper_thread): Use union
4843 gdb_sockaddr_u.
4844
4845 2015-03-07 Pedro Alves <palves@redhat.com>
4846
4847 * configure.ac (build_warnings): Move
4848 -Wdeclaration-after-statement to the C-specific set.
4849 * configure: Regenerate.
4850
4851 2015-03-07 Pedro Alves <palves@redhat.com>
4852
4853 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4854 or <winsock2.h> here. Instead include "gdb_socket.h".
4855 (remote_open): Use union gdb_sockaddr_u.
4856 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4857 or <winsock2.h> here. Instead include "gdb_socket.h".
4858 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4859 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4860 or <sys/un.h>.
4861 (init_named_socket, gdb_agent_helper_thread): Use union
4862 gdb_sockaddr_u.
4863
4864 2015-03-07 Pedro Alves <palves@redhat.com>
4865
4866 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4867 instead.
4868
4869 2015-03-06 Yao Qi <yao.qi@linaro.org>
4870
4871 * linux-aarch64-low.c (aarch64_insert_point): Use
4872 show_debug_regs as a boolean.
4873 (aarch64_remove_point): Likewise.
4874
4875 2015-03-05 Pedro Alves <palves@redhat.com>
4876
4877 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4878 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4879 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4880 * nto-low.c (nto_target_ops): Likewise.
4881 * spu-low.c (spu_target_ops): Likewise.
4882 * win32-low.c (win32_target_ops): Likewise.
4883
4884 2015-03-04 Pedro Alves <palves@redhat.com>
4885
4886 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4887 Decide whether a breakpoint triggered based on the SIGTRAP's
4888 siginfo.si_code.
4889 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4890 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4891 (linux_low_filter_event): Check for breakpoints before checking
4892 watchpoints.
4893 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4894 siginfo.si_code.
4895 (linux_stopped_by_sw_breakpoint)
4896 (linux_supports_stopped_by_sw_breakpoint)
4897 (linux_stopped_by_hw_breakpoint)
4898 (linux_supports_stopped_by_hw_breakpoint): New functions.
4899 (linux_target_ops): Install new target methods.
4900
4901 2015-03-04 Pedro Alves <palves@redhat.com>
4902
4903 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4904 * server.c (swbreak_feature, hwbreak_feature): New globals.
4905 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4906 (captured_main): Clear swbreak_feature and hwbreak_feature.
4907 * server.h (swbreak_feature, hwbreak_feature): Declare.
4908 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4909 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4910 supports_stopped_by_hw_breakpoint>: New fields.
4911 (target_supports_stopped_by_sw_breakpoint)
4912 (target_stopped_by_sw_breakpoint)
4913 (target_supports_stopped_by_hw_breakpoint)
4914 (target_stopped_by_hw_breakpoint): Declare.
4915
4916 2015-03-04 Pedro Alves <palves@redhat.com>
4917
4918 enum lwp_stop_reason -> enum target_stop_reason
4919 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4920 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4921 (linux_wait_1, stuck_in_jump_pad_callback)
4922 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4923 (linux_stopped_by_watchpoint):
4924 * linux-low.h (enum lwp_stop_reason): Delete.
4925 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4926 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4927
4928 2015-03-04 Yao Qi <yao.qi@linaro.org>
4929
4930 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4931
4932 2015-03-03 Gary Benson <gbenson@redhat.com>
4933
4934 * hostio.c (handle_vFile): Fix prefix lengths.
4935
4936 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4937
4938 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4939 ptr_bits.
4940
4941 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4942
4943 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4944 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4945 (clean): Add "rm -f" for above C files.
4946 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4947 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4948 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4949 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4950 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4951 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4952 (init_registers_s390x_vx_linux64)
4953 (init_registers_s390x_tevx_linux64)
4954 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4955 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4956 declarations.
4957 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4958 (s390_store_vxrs_high): New functions.
4959 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4960 NT_S390_VXRS_HIGH.
4961 (s390_arch_setup): Add logic for selecting one of the new target
4962 descriptions. Activate the new vector regsets if applicable.
4963 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4964 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4965 and init_registers_s390x_tevx_linux64.
4966
4967 2015-03-01 Pedro Alves <palves@redhat.com>
4968
4969 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4970 parameter.
4971
4972 2015-02-27 Pedro Alves <palves@redhat.com>
4973
4974 * linux-x86-low.c (u_debugreg_offset): New function.
4975 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4976
4977 2015-02-27 Pedro Alves <palves@redhat.com>
4978
4979 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4980 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4981 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4982 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4983 (ps_lsetfpregs, ps_getpid)
4984 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4985 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4986 (ps_lsetxregs, ps_plog): Declare.
4987
4988 2015-02-27 Pedro Alves <palves@redhat.com>
4989
4990 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4991 IP_AGENT_EXPORT_FUNC.
4992 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4993 IP_AGENT_EXPORT_FUNC.
4994 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4995 (IP_AGENT_EXPORT): Delete.
4996 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4997 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4998 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4999 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5000 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5001 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5002 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5003 (traceframe_read_count, traceframe_write_count)
5004 (traceframes_created, trace_state_variables, get_raw_reg)
5005 (get_trace_state_variable_value, set_trace_state_variable_value)
5006 (ust_loaded, helper_thread_id, cmd_buf): Use
5007 IPA_SYM_EXPORTED_NAME.
5008 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5009 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5010 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5011 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5012 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5013 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5014 EXTERN_C_PUSH/EXTERN_C_POP.
5015 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5016 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5017 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5018 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5019 (traceframe_write_count, traceframe_read_count)
5020 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5021 (about_to_request_buffer_space, get_trace_state_variable_value)
5022 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5023 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5024 EXTERN_C_PUSH/EXTERN_C_POP.
5025 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5026 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5027 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5028 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5029 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5030 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5031 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5032 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5033 Define.
5034 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5035 (IP_AGENT_EXPORT_VAR_DECL): Define.
5036 (tracing): Declare.
5037 (gdb_agent_get_raw_reg): Declare.
5038
5039 2015-02-27 Tom Tromey <tromey@redhat.com>
5040 Pedro Alves <palves@redhat.com>
5041
5042 Rename symbols whose names are reserved C++ keywords throughout.
5043
5044 2015-02-27 Pedro Alves <palves@redhat.com>
5045
5046 * Makefile.in (COMPILER): New, get it from autoconf.
5047 (CXX): Get from autoconf instead.
5048 (COMPILE.pre): Use COMPILER.
5049 (CC-LD): Rename to ...
5050 (CC_LD): ... this. Use COMPILER.
5051 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5052 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5053 * acinclude.m4: Include build-with-cxx.m4.
5054 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5055 Disable -Werror by default if building in C++ mode.
5056 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5057 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5058 the C++ compiler. Save/restore CXXFLAGS too.
5059 * configure: Regenerate.
5060
5061 2015-02-27 Pedro Alves <palves@redhat.com>
5062
5063 * acinclude.m4: Include libiberty.m4.
5064 * configure.ac: Call libiberty_INIT.
5065 * config.in, configure: Regenerate.
5066
5067 2015-02-26 Pedro Alves <palves@redhat.com>
5068
5069 * linux-low.c (linux_wait_1): When incrementing the PC past a
5070 program breakpoint always use the_low_target.breakpoint_len as
5071 increment, rather than the maximum between that and
5072 the_low_target.decr_pc_after_break.
5073
5074 2015-02-23 Pedro Alves <palves@redhat.com>
5075
5076 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5077 thread was doing a step-over; always adjust the PC if
5078 we stepped over a permanent breakpoint.
5079 (linux_wait_1): If we stepped over breakpoint that was on top of a
5080 permanent breakpoint, manually advance the PC past it.
5081
5082 2015-02-23 Pedro Alves <palves@redhat.com>
5083
5084 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5085 modes.
5086 (x86_fill_gregset, x86_store_gregset): Use it when handling
5087 $orig_eax.
5088
5089 2015-02-20 Pedro Alves <palves@redhat.com>
5090
5091 * thread-db.c: Include "nat/linux-procfs.h".
5092 (thread_db_init): Skip listing new threads if the kernel supports
5093 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5094
5095 2015-02-20 Pedro Alves <palves@redhat.com>
5096
5097 * linux-low.c (status_pending_p_callback): Use ptid_match.
5098
5099 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5100
5101 PR breakpoints/16812
5102 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5103 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5104 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5105
5106 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5107
5108 PR breakpoints/15956
5109 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5110
5111 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5112
5113 * linux-low.c (linux_low_btrace_conf): Print size.
5114 * server.c (handle_btrace_conf_general_set): New.
5115 (hanle_general_set): Call handle_btrace_conf_general_set.
5116 (handle_query): Report Qbtrace-conf:bts:size as supported.
5117
5118 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5119
5120 * linux-low.c (linux_low_enable_btrace): Update parameters.
5121 (linux_low_btrace_conf): New.
5122 (linux_target_ops)<to_btrace_conf>: Initialize.
5123 * server.c (current_btrace_conf): New.
5124 (handle_btrace_enable): Rename to ...
5125 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5126 to target_enable_btrace. Update comment. Update users.
5127 (handle_qxfer_btrace_conf): New.
5128 (qxfer_packets): Add btrace-conf entry.
5129 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5130 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5131 (target_ops)<read_btrace_conf>: New.
5132 (target_enable_btrace): Update parameters.
5133 (target_read_btrace_conf): New.
5134
5135 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5136
5137 * server.c (handle_btrace_general_set): Remove call to
5138 target_supports_btrace.
5139 (supported_btrace_packets): New.
5140 (handle_query): Call supported_btrace_packets.
5141 * target.h: include btrace-common.h.
5142 (btrace_target_info): Removed.
5143 (supports_btrace, target_supports_btrace): Update parameters.
5144
5145 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5146
5147 * Makefile.in (SFILES): Add common/btrace-common.c.
5148 (OBS): Add common/btrace-common.o.
5149 (btrace-common.o): Add build rules.
5150 * linux-low: Include btrace-common.h.
5151 (linux_low_read_btrace): Use struct btrace_data. Call
5152 btrace_data_init and btrace_data_fini.
5153
5154 2015-02-06 Pedro Alves <palves@redhat.com>
5155
5156 * thread-db.c (find_new_threads_callback): Add debug output.
5157
5158 2015-02-04 Pedro Alves <palves@redhat.com>
5159
5160 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5161 (resume_stopped_resumed_lwps): New function.
5162 (linux_wait_for_event_filtered): Use it.
5163
5164 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5165
5166 * Makefile.in (SFILES): Add linux-personality.c.
5167 (linux-personality.o): New rule.
5168 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5169 list of objects to be built.
5170 * linux-low.c: Include nat/linux-personality.h.
5171 (linux_create_inferior): Remove code to disable address space
5172 randomization (moved to ../nat/linux-personality.c). Create
5173 cleanup to disable address space randomization.
5174
5175 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5176
5177 * Makefile.in (posix-strerror.o): New rule.
5178 (mingw-strerror.o): Likewise.
5179 * configure: Regenerated.
5180 * configure.ac: Source file ../common/common.host. Initialize new
5181 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5182
5183 2015-01-14 Yao Qi <yao@codesourcery.com>
5184
5185 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5186 (ppc-linux.o): New rule.
5187 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5188 * configure.ac: AC_CHECK_FUNCS(getauxval).
5189 * config.in: Re-generated.
5190 * configure: Re-generated.
5191 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5192 ppc64_64bit_inferior_p
5193
5194 2015-01-14 Yao Qi <yao@codesourcery.com>
5195
5196 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5197 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5198 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5199 (PT_ORIG_R3, PT_TRAP): Likewise.
5200 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5201 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5202 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5203
5204 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5205
5206 * i387-fp.c (i387_cache_to_xsave): In look over
5207 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5208 zmmh_low_space field by use of zmmh_high_space.
5209
5210 2015-01-09 Pedro Alves <palves@redhat.com>
5211
5212 * linux-low.c (step_over_bkpt): Move higher up in the file.
5213 (handle_extended_wait): Don't store the stop_pc here.
5214 (get_stop_pc): Adjust comments and rename to ...
5215 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5216 stopped for a software breakpoint or hardware breakpoint.
5217 (thread_still_has_status_pending_p): New function.
5218 (status_pending_p_callback): Use
5219 thread_still_has_status_pending_p. If the event is no longer
5220 interesting, resume the LWP.
5221 (handle_tracepoints): Add assert.
5222 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5223 (wstatus_maybe_breakpoint): New function.
5224 (cancel_breakpoint): Delete function.
5225 (check_stopped_by_watchpoint): New function, factored out from
5226 linux_low_filter_event.
5227 (lp_status_maybe_breakpoint): Delete function.
5228 (linux_low_filter_event): Remove filter_ptid argument.
5229 Leave thread group exits pending here. Store the LWP's stop PC.
5230 Always leave events pending.
5231 (linux_wait_for_event_filtered): Pull all events out of the
5232 kernel, and leave them all pending.
5233 (count_events_callback, select_event_lwp_callback): Consider all
5234 events.
5235 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5236 (select_event_lwp): Only give preference to the stepping LWP in
5237 all-stop mode. Adjust comments.
5238 (ignore_event): New function.
5239 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5240 references to cancel_breakpoints. Adjust to renames. Also give
5241 equal priority to all LWPs that have had events in non-stop mode.
5242 If reporting a software breakpoint event, unadjust the LWP's PC.
5243 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5244 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5245 Adjust.
5246 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5247 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5248 (linux_stopped_by_watchpoint): Adjust.
5249 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5250 * linux-low.h (enum lwp_stop_reason): New.
5251 (struct lwp_info) <stop_pc>: Adjust comment.
5252 <stopped_by_watchpoint>: Delete field.
5253 <stop_reason>: New field.
5254 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5255 * mem-break.c (software_breakpoint_inserted_here)
5256 (hardware_breakpoint_inserted_here): New function.
5257 * mem-break.h (software_breakpoint_inserted_here)
5258 (hardware_breakpoint_inserted_here): Declare.
5259 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5260 (cancel_breakpoints): Delete.
5261 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5262 (upload_fast_traceframes): Remove references to
5263 cancel_breakpoints.
5264
5265 2015-01-09 Pedro Alves <palves@redhat.com>
5266
5267 * thread-db.c (find_new_threads_callback): Ignore thread if the
5268 kernel thread ID is -1.
5269
5270 2015-01-09 Pedro Alves <palves@redhat.com>
5271
5272 * linux-low.c (linux_attach_fail_reason_string): Move to
5273 nat/linux-ptrace.c, and rename.
5274 (linux_attach_lwp): Update comment.
5275 (attach_proc_task_lwp_callback): New function.
5276 (linux_attach): Adjust to rename and use
5277 linux_proc_attach_tgid_threads.
5278 (linux_attach_fail_reason_string): Delete declaration.
5279
5280 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5281
5282 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5283 * server.c (gdbserver_version): Likewise.
5284
5285 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5286
5287 * remote-utils.c: Include ctype.h.
5288 (input_interrupt): Explicitly handle the case when the char
5289 received is the NUL byte. Improve the printing of non-ASCII
5290 characters.
5291
5292 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5293
5294 * linux-low.c (linux_low_filter_event): Update call to
5295 linux_enable_event_reporting following the addition of
5296 a new parameter to that function.
5297
5298 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5299
5300 PR server/17457
5301 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5302 (AARCH64_FPCR_REGNO): Likewise.
5303 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5304 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5305 (aarch64_store_fpregset): Likewise.
5306
5307 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5308
5309 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5310 Remove FIXME comment about assumption about N.
5311
5312 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5313
5314 * configure.ac: If large-file support is disabled in GDBserver,
5315 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5316 * configure: Regenerate.
5317
5318 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5319
5320 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5321 warning upon ENODATA from ptrace.
5322 * linux-s390-low.c (s390_store_tdb): New.
5323 (s390_regsets): Add regset for NT_S390_TDB.
5324
5325 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5326
5327 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5328 without a fill_function.
5329 * linux-s390-low.c (s390_fill_last_break): Remove.
5330 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5331 (s390_arch_setup): Use regset's size instead of fill_function for
5332 loop end condition.
5333
5334 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5335
5336 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5337 the regset's store function when ptrace returned an error.
5338 * regcache.c (get_thread_regcache): Invalidate register cache
5339 before fetching inferior's registers.
5340
5341 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5342
5343 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5344 while-loop as for-loop.
5345 (regsets_store_inferior_registers): Likewise.
5346
5347 2014-11-28 Yao Qi <yao@codesourcery.com>
5348
5349 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5350 * config.in, configure: Re-generate.
5351 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5352 is defined.
5353
5354 2014-11-21 Yao Qi <yao@codesourcery.com>
5355
5356 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5357 (AC_CHECK_HEADERS): Remove malloc.h.
5358 * configure: Re-generated.
5359 * config.in: Re-generated.
5360 * server.h: Don't include alloca.h and malloc.h.
5361 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5362 Don't include malloc.h.
5363
5364 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5365
5366 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5367 corresponding ERRNO check in same block.
5368
5369 2014-11-12 Pedro Alves <palves@redhat.com>
5370
5371 * server.c (cont_thread): Update comment.
5372 (start_inferior, attach_inferior): No longer clear cont_thread.
5373 (handle_v_cont): No longer set cont_thread.
5374 (captured_main): Clear cont_thread each time a GDB connects.
5375
5376 2014-11-12 Pedro Alves <palves@redhat.com>
5377
5378 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5379 thread, and don't resume all threads if the Hc thread has exited.
5380
5381 2014-11-12 Pedro Alves <palves@redhat.com>
5382
5383 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5384 the process group instead of to a specific LWP.
5385
5386 2014-10-15 Pedro Alves <palves@redhat.com>
5387
5388 PR server/17487
5389 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5390 parameter.
5391 (arm_set_thread_context): Delete.
5392 (the_low_target): Adjust.
5393 * win32-i386-low.c (debug_registers_changed)
5394 (debug_registers_used): Delete.
5395 (update_debug_registers_callback): New function.
5396 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5397 needing to update their debug registers.
5398 (win32_get_current_dr): New function.
5399 (x86_dr_low_get_addr, x86_dr_low_get_control)
5400 (x86_dr_low_get_status): Fetch the debug register from the thread
5401 record's context.
5402 (i386_initial_stuff): Adjust.
5403 (i386_get_thread_context): Remove current_event parameter. Don't
5404 clear debug_registers_changed nor copy DR values to
5405 debug_reg_state.
5406 (i386_set_thread_context): Delete.
5407 (i386_prepare_to_resume): New function.
5408 (i386_thread_added): Mark the thread as needing to update irs
5409 debug registers.
5410 (the_low_target): Remove i386_set_thread_context and install
5411 i386_prepare_to_resume.
5412 * win32-low.c (win32_get_thread_context): Adjust.
5413 (win32_set_thread_context): Use SetThreadContext
5414 directly.
5415 (win32_prepare_to_resume): New function.
5416 (win32_require_context): New function, factored out from ...
5417 (thread_rec): ... this.
5418 (continue_one_thread): Call win32_prepare_to_resume on each thread
5419 we're about to continue.
5420 (win32_resume): Call win32_prepare_to_resume on the event thread.
5421 * win32-low.h (struct win32_thread_info)
5422 <debug_registers_changed>: New field.
5423 (struct win32_target_ops): Change prototype of set_thread_context,
5424 delete set_thread_context and add prepare_to_resume.
5425 (win32_require_context): New declaration.
5426
5427 2014-10-08 Gary Benson <gbenson@redhat.com>
5428
5429 * server.h: Do not include common-exceptions.h.
5430
5431 2014-10-08 Gary Benson <gbenson@redhat.com>
5432
5433 * server.h: Do not include cleanups.h.
5434
5435 2014-09-30 James Hogan <james.hogan@imgtec.com>
5436
5437 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5438 mips64-dsp-linux.c.
5439
5440 2014-09-23 Yao Qi <yao@codesourcery.com>
5441
5442 * linux-low.c (lp_status_maybe_breakpoint): New function.
5443 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5444 (count_events_callback): Likewise.
5445 (select_event_lwp_callback): Likewise.
5446 (cancel_breakpoints_callback): Likewise.
5447
5448 2014-09-19 Don Breazeal <donb@codesourcery.com>
5449
5450 * linux-low.c (handle_extended_wait): Call
5451 linux_ptrace_get_extended_event.
5452 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5453 linux_is_extended_waitstatus.
5454
5455 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5456
5457 * Makefile.in (CPPFLAGS): Define.
5458 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5459 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5460
5461 2014-09-16 Gary Benson <gbenson@redhat.com>
5462
5463 * inferiors.h (current_inferior): Renamed as...
5464 (current_thread): New variable. All uses updated.
5465 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5466 (maybe_move_out_of_jump_pad): Likewise.
5467 (cancel_breakpoint): Likewise.
5468 (linux_low_filter_event): Likewise.
5469 (wait_for_sigstop): Likewise.
5470 (linux_resume_one_lwp): Likewise.
5471 (need_step_over_p): Likewise.
5472 (start_step_over): Likewise.
5473 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5474 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5475 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5476 and save_inferior as saved_thread.
5477 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5478 saved_thread.
5479 (regcache_invalidate_thread): Likewise.
5480 * remote-utils.c (prepare_resume_reply): Likewise.
5481 * thread-db.c (thread_db_get_tls_address): Likewise.
5482 (disable_thread_event_reporting): Likewise.
5483 (remove_thread_event_breakpoints): Likewise.
5484 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5485 as saved_thread.
5486 * target.h (set_desired_inferior): Renamed as...
5487 (set_desired_thread): New declaration. All uses updated.
5488 * server.c (myresume): Updated comment to reference thread instead
5489 of inferior.
5490 (handle_serial_event): Likewise.
5491 (handle_target_event): Likewise.
5492
5493 2014-09-12 Tom Tromey <tromey@redhat.com>
5494 Gary Benson <gbenson@redhat.com>
5495
5496 * regcache.h: Include common-regcache.h.
5497 (regcache_read_pc): Don't declare.
5498 * regcache.c (get_thread_regcache_for_ptid): New function.
5499
5500 2014-09-11 Tom Tromey <tromey@redhat.com>
5501 Gary Benson <gbenson@redhat.com>
5502
5503 * symbol.c: New file.
5504 * Makefile.in (SFILES): Add symbol.c.
5505 (OBS): Add symbol.o.
5506
5507 2014-09-11 Gary Benson <gbenson@redhat.com>
5508
5509 * target.c (target_stop_ptid, target_continue_ptid): New
5510 functions.
5511
5512 2014-09-11 Tom Tromey <tromey@redhat.com>
5513 Gary Benson <gbenson@redhat.com>
5514
5515 * target.h: Include target/target.h.
5516 * target.c (target_read_memory, target_read_uint32)
5517 (target_write_memory): New functions.
5518
5519 2014-09-11 Gary Benson <gbenson@redhat.com>
5520
5521 * server.h (debug_hw_points): Don't declare.
5522 * server.c (debug_hw_points): Don't define. Replace all uses
5523 with show_debug_regs.
5524 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5525 all uses with show_debug_regs.
5526
5527 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5528
5529 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5530 endianness into account.
5531 (ppc_supply_ptrace_register): Likewise.
5532
5533 2014-09-03 James Hogan <james.hogan@imgtec.com>
5534
5535 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5536 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5537
5538 2014-09-03 Gary Benson <gbenson@redhat.com>
5539
5540 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5541 ALL_DEBUG_ADDRESS_REGISTERS.
5542
5543 2014-09-02 Gary Benson <gbenson@redhat.com>
5544
5545 * i386-low.h: Renamed as...
5546 * x86-low.h: New file. All type, function and variable name
5547 prefixes changed from "i386_" to "x86_". All references updated.
5548 * i386-low.c: Renamed as...
5549 * x86-low.c: New file. All type, function and variable name
5550 prefixes changed from "i386_" to "x86_". All references updated.
5551
5552 2014-09-02 Gary Benson <gbenson@redhat.com>
5553
5554 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5555 (x86_linux_new_thread): Likewise.
5556
5557 2014-08-29 Gary Benson <gbenson@redhat.com>
5558
5559 * server.h (setjmp.h): Do not include.
5560 (toplevel): Do not declare.
5561 (common-exceptions.h): Include.
5562 (cleanups.h): Likewise.
5563 * server.c (toplevel): Do not define.
5564 (exit_code): New static global.
5565 (detach_or_kill_for_exit_cleanup): New function.
5566 (main): New function. Original main renamed to...
5567 (captured_main): New function.
5568 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5569
5570 2014-08-29 Gary Benson <gbenson@redhat.com>
5571
5572 * Makefile.in (SFILES): Add common/common-exceptions.c.
5573 (OBS): Add common-exceptions.o.
5574 (common-exceptions.o): New rule.
5575 * utils.c (prepare_to_throw_exception): New function.
5576
5577 2014-08-29 Gary Benson <gbenson@redhat.com>
5578
5579 * config.in: Regenerate.
5580 * configure: Likewise.
5581
5582 2014-08-29 Gary Benson <gbenson@redhat.com>
5583
5584 * Makefile.in (SFILES): Add common/cleanups.c.
5585 (OBS): cleanups.o.
5586 (cleanups.o): New rule.
5587
5588 2014-08-29 Gary Benson <gbenson@redhat.com>
5589
5590 * utils.c (internal_vwarning): New function.
5591
5592 2014-08-28 Gary Benson <gbenson@redhat.com>
5593
5594 * utils.h (fatal): Remove declaration.
5595 * utils.c (fatal): Remove function.
5596
5597 2014-08-28 Gary Benson <gbenson@redhat.com>
5598
5599 * tracepoint.c (gdb_agent_init): Replace fatal with
5600 perror_with_name.
5601 (initialize_tracepoint): Likewise.
5602
5603 2014-08-28 Gary Benson <gbenson@redhat.com>
5604
5605 * remote-utils.c (remote_prepare): Replace fatal with error.
5606
5607 2014-08-28 Gary Benson <gbenson@redhat.com>
5608
5609 * linux-low.c (linux_async): Replace fatal with warning.
5610 Tidy up and return.
5611 (linux_start_non_stop): Return -1 if linux_async failed.
5612
5613 2014-08-28 Gary Benson <gbenson@redhat.com>
5614
5615 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5616 gdb_assert.
5617 (i386_dr_low_get_addr): Remove vague comment.
5618 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5619 gdb_assert.
5620
5621 2014-08-28 Gary Benson <gbenson@redhat.com>
5622
5623 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5624 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5625 internal_error.
5626 (linux_resume_one_lwp): Likewise.
5627 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5628 gdb_assert.
5629 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5630 with internal_error.
5631 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5632 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5633 (find_register_by_name): Replace fatal with internal_error.
5634 (find_regno): Likewise.
5635 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5636 * thread-db.c (thread_db_create_event): Likewise.
5637 (thread_db_load_search): Likewise.
5638 (try_thread_db_load_1): Likewise.
5639 * tracepoint.c (get_jump_space_head): Replace fatal with
5640 internal_error.
5641 (claim_trampoline_space): Likewise.
5642 (have_fast_tracepoint_trampoline_buffer): Likewise.
5643 (cmd_qtstart): Likewise.
5644 (stop_tracing): Likewise.
5645 (fast_tracepoint_collecting): Likewise.
5646 (target_malloc): Likewise.
5647 (download_tracepoint): Likewise.
5648 (download_trace_state_variables): Replace check with gdb_assert.
5649 (upload_fast_traceframes): Replace fatal with internal_error.
5650
5651 2014-08-19 Tom Tromey <tromey@redhat.com>
5652 Gary Benson <gbenson@redhat.com>
5653
5654 * Makefile.in (SFILES): Add common/common-debug.c.
5655 (OBS): Add common-debug.o.
5656 (common-debug.o): New rule.
5657 * debug.h (debug_printf): Don't declare.
5658 * debug.c (debug_printf): Renamed and rewritten as...
5659 (debug_vprintf): New function.
5660
5661 2014-08-19 Gary Benson <gbenson@redhat.com>
5662
5663 * utils.h: Do not include print-utils.h.
5664
5665 2014-08-19 Tom Tromey <tromey@redhat.com>
5666 Gary Benson <gbenson@redhat.com>
5667
5668 * server.h: Add static assertion.
5669 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5670
5671 2014-08-19 Tom Tromey <tromey@redhat.com>
5672 Gary Benson <gbenson@redhat.com>
5673
5674 * Makefile.in (SFILES): Add common/errors.c.
5675 (OBS): Add errors.o.
5676 (IPA_OBS): Add errors-ipa.o.
5677 (errors.o): New rule.
5678 (errors-ipa.o): Likewise.
5679 * utils.h (perror_with_name, error, warning): Don't declare.
5680 * utils.c (warning): Renamed and rewritten as...
5681 (vwarning): New function.
5682 (error): Renamed and rewritten as...
5683 (verror): New function.
5684 (internal_error): Renamed and rewritten as...
5685 (internal_verror): New function.
5686
5687 2014-08-07 Gary Benson <gbenson@redhat.com>
5688
5689 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5690 * configure: Regenerate.
5691 * config.in: Likewise.
5692 * server.h: Do not include errno.h.
5693 * event-loop.c: Likewise.
5694 * hostio-errno.c: Likewise.
5695 * linux-low.c: Likewise.
5696 * remote-utils.c: Likewise.
5697 * spu-low.c: Likewise.
5698 * utils.c: Likewise.
5699 * gdbreplay.c: Unconditionally include errno.h.
5700
5701 2014-08-07 Gary Benson <gbenson@redhat.com>
5702
5703 * server.h: Do not include string.h.
5704 * event-loop.c: Likewise.
5705 * linux-low.c: Likewise.
5706 * regcache.c: Likewise.
5707 * remote-utils.c: Likewise.
5708 * spu-low.c: Likewise.
5709 * utils.c: Likewise.
5710
5711 2014-08-07 Gary Benson <gbenson@redhat.com>
5712
5713 * server.h: Do not include gdb_assert.h.
5714
5715 2014-08-07 Gary Benson <gbenson@redhat.com>
5716
5717 * server.h: Do not include common-utils.h.
5718
5719 2014-08-07 Gary Benson <gbenson@redhat.com>
5720
5721 * server.h: Do not include ptid.h.
5722 * notif.h: Likewise.
5723
5724 2014-08-07 Gary Benson <gbenson@redhat.com>
5725
5726 * server.h: Do not include gdb_locale.h.
5727
5728 2014-08-07 Gary Benson <gbenson@redhat.com>
5729
5730 * server.h: Do not include gdb/signals.h.
5731 * win32-low.c: Likewise.
5732
5733 2014-08-07 Gary Benson <gbenson@redhat.com>
5734
5735 * server.h: Do not include pathmax.h.
5736
5737 2014-08-07 Gary Benson <gbenson@redhat.com>
5738
5739 * server.h: Do not include libiberty.h.
5740 * linux-bfin-low.c: Likewise.
5741
5742 2014-08-07 Gary Benson <gbenson@redhat.com>
5743
5744 * server.h: Do not include ansidecl.h.
5745
5746 2014-08-07 Gary Benson <gbenson@redhat.com>
5747
5748 * linux-x86-low.c: Do not include stddef.h.
5749 * lynx-ppc-low.c: Likewise.
5750 * tracepoint.c: Likewise.
5751
5752 2014-08-07 Gary Benson <gbenson@redhat.com>
5753
5754 * server.h: Do not include stdarg.h.
5755 * nto-low.c: Likewise.
5756
5757 2014-08-07 Gary Benson <gbenson@redhat.com>
5758
5759 * server.h: Do not include stdlib.h.
5760 * inferiors.c: Likewise.
5761 * linux-low.c: Likewise.
5762 * regcache.c: Likewise.
5763 * spu-low.c: Likewise.
5764 * tracepoint.c: Likewise.
5765 * utils.c: Likewise.
5766
5767 2014-08-07 Gary Benson <gbenson@redhat.com>
5768
5769 * server.h: Do not include stdio.h.
5770 * linux-low.c: Likewise.
5771 * remote-utils.c: Likewise.
5772 * spu-low.c: Likewise.
5773 * utils.c: Likewise.
5774 * wincecompat.c: Likewise.
5775
5776 2014-08-06 Gary Benson <gbenson@redhat.com>
5777
5778 * regcache.c (init_register_cache): Move conditionals inside if.
5779
5780 2014-08-06 Gary Benson <gbenson@redhat.com>
5781
5782 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5783
5784 2014-07-31 Gary Benson <gbenson@redhat.com>
5785
5786 * ax.h: Do not include server.h.
5787 * gdbthread.h: Likewise.
5788 * lynx-low.h: Likewise.
5789 * notif.h: Likewise.
5790
5791 2014-07-30 Gary Benson <gbenson@redhat.com>
5792
5793 * server.h: Include common-defs.h.
5794 Do not include config.h or build-gnulib-gdbserver/config.h.
5795
5796 2014-07-30 Gary Benson <gbenson@redhat.com>
5797
5798 * hostio-errno.c: Move server.h to top of includes list.
5799 * inferiors.c: Likewise.
5800 * linux-x86-low.c: Likewise.
5801 * notif.c: Include server.h.
5802
5803 2014-07-24 Tom Tromey <tromey@redhat.com>
5804 Gary Benson <gbenson@redhat.com>
5805
5806 * server.h (CORE_ADDR): Now unsigned.
5807
5808 2014-07-16 Pedro Alves <palves@redhat.com>
5809
5810 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5811
5812 2014-07-15 Pedro Alves <palves@redhat.com>
5813
5814 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5815 copy.
5816
5817 2014-07-11 Pedro Alves <palves@redhat.com>
5818
5819 * linux-low.c (kill_wait_lwp): New function, based on
5820 kill_one_lwp_callback, but use my_waitpid directly.
5821 (kill_one_lwp_callback, linux_kill): Use it.
5822
5823 2014-06-23 Pedro Alves <palves@redhat.com>
5824
5825 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5826 before setting DR0..DR3.
5827
5828 2014-06-20 Gary Benson <gbenson@redhat.com>
5829
5830 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5831 * configure: Regenerated.
5832 * config.in: Likewise.
5833
5834 2014-06-20 Gary Benson <gbenson@redhat.com>
5835
5836 * Makefile.in (SFILES): Update locations for files moved
5837 from common to nat.
5838 (object file files): Reordered.
5839
5840 2014-06-20 Gary Benson <gbenson@redhat.com>
5841
5842 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5843 (i386_dr_low_set_addr): Likewise.
5844 (i386_dr_low_get_addr): Likewise.
5845 (i386_dr_low_can_set_control): Likewise.
5846 (i386_dr_low_set_control): Likewise.
5847 (i386_dr_low_get_control): Likewise.
5848 (i386_dr_low_get_status): Likewise.
5849 (i386_get_debug_register_length): Likewise.
5850 * linux-x86-low.c (i386_dr_low_set_addr):
5851 Changed signature. Made static.
5852 (i386_dr_low_get_addr): Likewise.
5853 (i386_dr_low_set_control): Likewise.
5854 (i386_dr_low_get_control): Likewise.
5855 (i386_dr_low_get_status): Likewise.
5856 (i386_dr_low): New global variable.
5857 * win32-i386-low.c (i386_dr_low_set_addr):
5858 Changed signature. Made static.
5859 (i386_dr_low_get_addr): Likewise.
5860 (i386_dr_low_set_control): Likewise.
5861 (i386_dr_low_get_control): Likewise.
5862 (i386_dr_low_get_status): Likewise.
5863 (i386_dr_low): New global variable.
5864
5865 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5866
5867 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5868 * Makefile.in (AR, AR_FLAGS): Define.
5869 * configure: Regenerate.
5870
5871 2014-06-19 Gary Benson <gbenson@redhat.com>
5872
5873 * Makefile.in (i386-dregs.o): New rule.
5874 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5875 * i386-low.c (target.h): Remove include.
5876 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5877 (DR_CONTROL_SHIFT): Likewise.
5878 (DR_CONTROL_SIZE): Likewise.
5879 (DR_RW_EXECUTE): Likewise.
5880 (DR_RW_WRITE): Likewise.
5881 (DR_RW_READ): Likewise.
5882 (DR_RW_IORW): Likewise.
5883 (DR_LEN_1): Likewise.
5884 (DR_LEN_2): Likewise.
5885 (DR_LEN_4): Likewise.
5886 (DR_LEN_8): Likewise.
5887 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5888 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5889 (DR_ENABLE_SIZE): Likewise.
5890 (DR_LOCAL_SLOWDOWN): Likewise.
5891 (DR_GLOBAL_SLOWDOWN): Likewise.
5892 (DR_CONTROL_RESERVED): Likewise.
5893 (I386_DR_CONTROL_MASK): Likewise.
5894 (I386_DR_VACANT): Likewise.
5895 (I386_DR_LOCAL_ENABLE): Likewise.
5896 (I386_DR_GLOBAL_ENABLE): Likewise.
5897 (I386_DR_DISABLE): Likewise.
5898 (I386_DR_SET_RW_LEN): Likewise.
5899 (I386_DR_GET_RW_LEN): Likewise.
5900 (I386_DR_WATCH_HIT): Likewise.
5901 (i386_wp_op_t): Likewise.
5902 (i386_show_dr): Likewise.
5903 (i386_length_and_rw_bits): Likewise.
5904 (i386_insert_aligned_watchpoint): Likewise.
5905 (i386_remove_aligned_watchpoint): Likewise.
5906 (i386_handle_nonaligned_watchpoint): Likewise.
5907 i386_update_inferior_debug_regs(): Likewise.
5908 (i386_dr_insert_watchpoint): Likewise.
5909 (i386_dr_remove_watchpoint): Likewise.
5910 (i386_dr_region_ok_for_watchpoint): Likewise.
5911 (i386_dr_stopped_data_address): Likewise.
5912 (i386_dr_stopped_by_watchpoint): Likewise.
5913
5914 2014-06-19 Gary Benson <gbenson@redhat.com>
5915
5916 * i386-low.c (i386_dr_show): Renamed to
5917 i386_show_dr and made static. All uses updated.
5918 (i386_dr_length_and_rw_bits): Renamed to
5919 i386_length_and_rw_bits and made static.
5920 All uses updated.
5921 (i386_dr_insert_aligned_watchpoint): Renamed to
5922 i386_insert_aligned_watchpoint and made static.
5923 All uses updated.
5924 (i386_dr_remove_aligned_watchpoint): Renamed to
5925 i386_remove_aligned_watchpoint and made static.
5926 All uses updated.
5927 (i386_dr_update_inferior_debug_regs): Renamed to
5928 i386_update_inferior_debug_regs and made static.
5929 All uses updated.
5930
5931 2014-06-18 Gary Benson <gbenson@redhat.com>
5932
5933 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5934 (i386_dr_low_can_set_control): Likewise.
5935 (i386_get_debug_register_length): Likewise.
5936 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5937 (i386_dr_low_can_set_control): Likewise.
5938 (i386_get_debug_register_length): Likewise.
5939
5940 2014-06-17 Gary Benson <gbenson@redhat.com>
5941
5942 * i386-low.h (i386-dregs.h): New include.
5943 (DR_FIRSTADDR): Now in i386-dregs.h.
5944 (DR_LASTADDR): Likewise.
5945 (DR_NADDR): Likewise.
5946 (DR_STATUS): Likewise.
5947 (DR_CONTROL): Likewise.
5948 (i386_debug_reg_state): Likewise.
5949 (i386_dr_insert_watchpoint): Likewise.
5950 (i386_dr_remove_watchpoint): Likewise.
5951 (i386_dr_region_ok_for_watchpoint): Likewise.
5952 (i386_dr_stopped_data_address): Likewise.
5953 (i386_dr_stopped_by_watchpoint): Likewise.
5954 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5955
5956 2014-06-18 Gary Benson <gbenson@redhat.com>
5957
5958 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5959 i386_dr_insert_watchpoint.
5960 (i386_low_remove_watchpoint): Renamed to
5961 i386_dr_remove_watchpoint.
5962 (i386_low_region_ok_for_watchpoint): Renamed to
5963 i386_dr_region_ok_for_watchpoint.
5964 (i386_low_stopped_data_address): Renamed to
5965 i386_dr_stopped_data_address.
5966 (i386_low_stopped_by_watchpoint): Renamed to
5967 i386_dr_stopped_by_watchpoint.
5968 * i386-low.c (i386_show_dr): Renamed to
5969 i386_dr_show and made nonstatic. All uses updated.
5970 (i386_length_and_rw_bits): Renamed to
5971 i386_dr_length_and_rw_bits and made nonstatic.
5972 All uses updated.
5973 (i386_insert_aligned_watchpoint): Renamed to
5974 i386_dr_insert_aligned_watchpoint and made nonstatic.
5975 All uses updated.
5976 (i386_remove_aligned_watchpoint): Renamed to
5977 i386_dr_remove_aligned_watchpoint and made nonstatic.
5978 All uses updated.
5979 (i386_update_inferior_debug_regs): Renamed to
5980 i386_dr_update_inferior_debug_regs and made nonstatic.
5981 All uses updated.
5982 (i386_low_insert_watchpoint): Renamed to
5983 i386_dr_insert_watchpoint. All uses updated.
5984 (i386_low_remove_watchpoint): Renamed to
5985 i386_dr_remove_watchpoint. All uses updated.
5986 (i386_low_region_ok_for_watchpoint): Renamed to
5987 i386_dr_region_ok_for_watchpoint. All uses updated.
5988 (i386_low_stopped_data_address): Renamed to
5989 i386_dr_stopped_data_address. All uses updated.
5990 (i386_low_stopped_by_watchpoint): Renamed to
5991 i386_dr_stopped_by_watchpoint. All uses updated.
5992
5993 2014-06-18 Gary Benson <gbenson@redhat.com>
5994
5995 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5996 (i386_dr_low_can_set_control): Likewise.
5997 (i386_insert_aligned_watchpoint): New check.
5998
5999 2014-06-18 Gary Benson <gbenson@redhat.com>
6000
6001 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6002 Renamed to state.
6003
6004 2014-06-18 Gary Benson <gbenson@redhat.com>
6005
6006 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6007 instead of fatal and error.
6008 (i386_handle_nonaligned_watchpoint): Likewise.
6009
6010 2014-06-18 Gary Benson <gbenson@redhat.com>
6011
6012 * i386-low.c (i386_get_debug_register_length): New macro.
6013 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6014 (i386_show_dr): Use debug_printf instead of fprintf. Use
6015 phex to format values.
6016
6017 2014-06-18 Gary Benson <gbenson@redhat.com>
6018
6019 * i386-low.h: Comment changes.
6020 * i386-low.c: Likewise.
6021
6022 2014-06-18 Gary Benson <gbenson@redhat.com>
6023
6024 * i386-low.c: Whitespace changes.
6025
6026 2014-06-12 Tom Tromey <tromey@redhat.com>
6027
6028 * utils.c (freeargv): Remove.
6029
6030 2014-06-12 Tom Tromey <tromey@redhat.com>
6031
6032 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6033 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6034 (parse_debug_format_options): Likewise.
6035 (gdbserver_usage): Likewise.
6036 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6037 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6038 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6039 against libiberty.
6040 ($(LIBGNU)): Depend on libiberty.
6041 (all-lib): Recurse into all subdirs.
6042 (install-only): Invoke "install" target in subdirs.
6043 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6044 targets.
6045 * configure: Rebuild.
6046 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6047 for vasprintf, vsnprintf, or gettimeofday.
6048 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6049 srv_tgtobj.
6050
6051 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6052
6053 * development.sh: Delete.
6054 * Makefile.in (config.status): Adjust dependency on development.sh.
6055 * configure.ac: Adjust development.sh source call.
6056 * configure: Regenerate.
6057
6058 2014-06-02 Pedro Alves <palves@redhat.com>
6059
6060 * ax.c (gdb_free_agent_expr): New function.
6061 * ax.h (gdb_free_agent_expr): New declaration.
6062 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6063 list.
6064 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6065 static.
6066 (clear_breakpoint_conditions_and_commands): New function.
6067 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6068 (clear_breakpoint_conditions_and_commands): New declaration.
6069
6070 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6071
6072 * linux-aarch64-low.c (asm/ptrace.h): Include.
6073
6074 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6075
6076 Fix TLS access for -static -pthread.
6077 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6078 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6079 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6080
6081 2014-05-20 Pedro Alves <palves@redhat.com>
6082
6083 * linux-aarch64-low.c (aarch64_insert_point)
6084 (aarch64_remove_point): No longer check whether the type is
6085 supported here. Adjust to new interface.
6086 (the_low_target): Install aarch64_supports_z_point_type as
6087 supports_z_point_type method.
6088 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6089 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6090 instead of a Z packet char. Adjust.
6091 (arm_supports_z_point_type): New function.
6092 (arm_insert_point, arm_remove_point): Adjust to new interface.
6093 (the_low_target): Install arm_supports_z_point_type.
6094 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6095 (cris_insert_point, cris_remove_point): Adjust to new interface.
6096 Don't check whether the type is supported here.
6097 (the_low_target): Install cris_supports_z_point_type.
6098 * linux-low.c (linux_supports_z_point_type): New function.
6099 (linux_insert_point, linux_remove_point): Adjust to new interface.
6100 * linux-low.h (struct linux_target_ops) <insert_point,
6101 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6102 raw_breakpoint pointer parameter.
6103 <supports_z_point_type>: New method.
6104 * linux-mips-low.c (mips_supports_z_point_type): New function.
6105 (mips_insert_point, mips_remove_point): Adjust to new interface.
6106 Use mips_supports_z_point_type.
6107 (the_low_target): Install mips_supports_z_point_type.
6108 * linux-ppc-low.c (the_low_target): Install NULL as
6109 supports_z_point_type method.
6110 * linux-s390-low.c (the_low_target): Install NULL as
6111 supports_z_point_type method.
6112 * linux-sparc-low.c (the_low_target): Install NULL as
6113 supports_z_point_type method.
6114 * linux-x86-low.c (x86_supports_z_point_type): New function.
6115 (x86_insert_point): Adjust to new insert_point interface. Use
6116 insert_memory_breakpoint. Adjust to new
6117 i386_low_insert_watchpoint interface.
6118 (x86_remove_point): Adjust to remove_point interface. Use
6119 remove_memory_breakpoint. Adjust to new
6120 i386_low_remove_watchpoint interface.
6121 (the_low_target): Install x86_supports_z_point_type.
6122 * lynx-low.c (lynx_target_ops): Install NULL as
6123 supports_z_point_type callback.
6124 * nto-low.c (nto_supports_z_point_type): New.
6125 (nto_insert_point, nto_remove_point): Adjust to new interface.
6126 (nto_target_ops): Install nto_supports_z_point_type.
6127 * mem-break.c: Adjust intro comment.
6128 (struct raw_breakpoint) <raw_type, size>: New fields.
6129 <inserted>: Update comment.
6130 <shlib_disabled>: Delete field.
6131 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6132 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6133 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6134 (raw_bkpt_type_to_target_hw_bp_type): New function.
6135 (find_enabled_raw_code_breakpoint_at): New function.
6136 (find_raw_breakpoint_at): New type and size parameters. Use them.
6137 (insert_memory_breakpoint): New function, based off
6138 set_raw_breakpoint_at.
6139 (remove_memory_breakpoint): New function.
6140 (set_raw_breakpoint_at): Reimplement.
6141 (set_breakpoint): New, based on set_breakpoint_at.
6142 (set_breakpoint_at): Reimplement.
6143 (delete_raw_breakpoint): Go through the_target->remove_point
6144 instead of assuming memory breakpoints.
6145 (find_gdb_breakpoint_at): Delete.
6146 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6147 (find_gdb_breakpoint): New function.
6148 (set_gdb_breakpoint_at): Delete.
6149 (z_type_supported): New function.
6150 (set_gdb_breakpoint_1): New function, loosely based off
6151 set_gdb_breakpoint_at.
6152 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6153 (delete_gdb_breakpoint_at): Delete.
6154 (delete_gdb_breakpoint_1): New function, loosely based off
6155 delete_gdb_breakpoint_at.
6156 (delete_gdb_breakpoint): New function.
6157 (clear_gdb_breakpoint_conditions): Rename to ...
6158 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6159 breakpoint.
6160 (add_condition_to_breakpoint): Make static.
6161 (add_breakpoint_condition): Take a struct breakpoint pointer
6162 instead of an address. Adjust.
6163 (gdb_condition_true_at_breakpoint): Rename to ...
6164 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6165 z_type parameter.
6166 (gdb_condition_true_at_breakpoint): Reimplement.
6167 (add_breakpoint_commands): Take a struct breakpoint pointer
6168 instead of an address. Adjust.
6169 (gdb_no_commands_at_breakpoint): Rename to ...
6170 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6171 parameter. Return true if no breakpoint was found. Change debug
6172 output.
6173 (gdb_no_commands_at_breakpoint): Reimplement.
6174 (run_breakpoint_commands): Rename to ...
6175 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6176 and change return type to boolean.
6177 (run_breakpoint_commands): New function.
6178 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6179 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6180 breakpoint. Go through the_target->remove_point instead of
6181 assuming memory breakpoint.
6182 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6183 software and hardware breakpoints.
6184 (reinsert_raw_breakpoint): Go through the_target->insert_point
6185 instead of assuming memory breakpoint.
6186 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6187 software and hardware breakpoints.
6188 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6189 Check both software and hardware breakpoints.
6190 (validate_inserted_breakpoint): Assert the breakpoint is a
6191 software breakpoint. Set the inserted flag to -1 instead of
6192 setting shlib_disabled.
6193 (delete_disabled_breakpoints): Adjust.
6194 (validate_breakpoints): Only validate software breakpoints.
6195 Adjust to inserted flag change.
6196 (check_mem_read, check_mem_write): Skip breakpoint types other
6197 than software breakpoints. Adjust to inserted flag change.
6198 * mem-break.h (enum raw_bkpt_type): New enum.
6199 (raw_breakpoint, struct process_info): Forward declare.
6200 (Z_packet_to_target_hw_bp_type): Delete declaration.
6201 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6202 (set_gdb_breakpoint, delete_gdb_breakpoint)
6203 (clear_breakpoint_conditions): New declarations.
6204 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6205 (breakpoint_inserted_here): Update comment.
6206 (add_breakpoint_condition, add_breakpoint_commands): Replace
6207 address parameter with a breakpoint pointer parameter.
6208 (gdb_breakpoint_here): Update comment.
6209 (delete_gdb_breakpoint_at): Delete.
6210 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6211 * server.c (process_point_options): Take a struct breakpoint
6212 pointer instead of an address. Adjust.
6213 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6214 delete_gdb_breakpoint.
6215 * spu-low.c (spu_target_ops): Install NULL as
6216 supports_z_point_type method.
6217 * target.h: Include mem-break.h.
6218 (struct target_ops) <prepare_to_access_memory>: Update comment.
6219 <supports_z_point_type>: New field.
6220 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6221 instead of a char. Also take a raw breakpoint pointer.
6222 * win32-arm-low.c (the_low_target): Install NULL as
6223 supports_z_point_type.
6224 * win32-i386-low.c (i386_supports_z_point_type): New function.
6225 (i386_insert_point, i386_remove_point): Adjust to new interface.
6226 (the_low_target): Install i386_supports_z_point_type.
6227 * win32-low.c (win32_supports_z_point_type): New function.
6228 (win32_insert_point, win32_remove_point): Adjust to new interface.
6229 (win32_target_ops): Install win32_supports_z_point_type.
6230 * win32-low.h (struct win32_target_ops):
6231 <supports_z_point_type>: New method.
6232 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6233 instead of a char. Also take a raw breakpoint pointer.
6234
6235 2014-05-20 Pedro Alves <palves@redhat.com>
6236
6237 * mem-break.h: Include break-common.h.
6238 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6239 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6240 (Z_packet_to_target_hw_bp_type): New declaration.
6241 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6242 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6243 (Z_PACKET_ACCESS_WP): Delete macros.
6244 (Z_packet_to_hw_type): Delete function.
6245 * i386-low.h: Don't include break-common.h here.
6246 (Z_packet_to_hw_type): Delete declaration.
6247 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6248 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6249 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6250 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6251 * linux-aarch64-low.c: Don't include break-common.h here.
6252 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6253 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6254 (Z_packet_to_target_hw_bp_type): Delete function.
6255 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6256 function.
6257 (mips_insert_point, mips_remove_point): Use
6258 Z_packet_to_target_hw_bp_type.
6259
6260 2014-05-20 Pedro Alves <palves@redhat.com>
6261
6262 * linux-aarch64-low.c: Include break-common.h.
6263 (enum target_point_type): Delete.
6264 (Z_packet_to_point_type): Rename to ...
6265 (Z_packet_to_target_hw_bp_type): ... this, and return a
6266 target_hw_bp_type instead.
6267 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6268 instead of an enum target_point_type.
6269 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6270 breakpoint type.
6271 (aarch64_dr_state_insert_one_point)
6272 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6273 (aarch64_handle_aligned_watchpoint)
6274 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6275 Take an enum target_hw_bp_type instead of an enum
6276 target_point_type.
6277 (aarch64_supports_z_point_type): New function.
6278 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6279 use Z_packet_to_target_hw_bp_type.
6280
6281 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6282
6283 * configure.ac: Only use -Werror by default when DEVELOPMENT
6284 is true.
6285 * configure: Regenerate.
6286
6287 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6288
6289 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6290 * linux-x86-low.c (X86_64_USER_REGS): New.
6291 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6292
6293 2014-04-28 Yao Qi <yao@codesourcery.com>
6294
6295 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6296 name.
6297
6298 2014-04-25 Pedro Alves <palves@redhat.com>
6299
6300 PR server/16255
6301 * linux-low.c (linux_attach_fail_reason_string): New function.
6302 (linux_attach_lwp): Delete.
6303 (linux_attach_lwp_1): Rename to ...
6304 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6305 argument. Remove "initial" parameter. Return int instead of
6306 void. Don't error or warn here.
6307 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6308 failure to attach to the tgid. Call warning when failing to
6309 attach to an lwp.
6310 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6311 argument. Remove "initial" parameter. Return int instead of
6312 void. Don't error or warn here.
6313 (linux_attach_fail_reason_string): New declaration.
6314 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6315 interface change. Use linux_attach_fail_reason_string.
6316
6317 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6318 Walfred Tedeschi <walfred.tedeschi@intel.com>
6319
6320 * Makefile.in: Added rules to handle new files
6321 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6322 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6323 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6324 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6325 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6326 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6327 x32-avx512-linux.o.
6328 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6329 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6330 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6331 i386/x32-avx512.xml.
6332 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6333 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6334 i386/x32-avx512-linux.xml.
6335 * i387-fp.c (num_avx512_k_registers): New constant for number
6336 of K registers.
6337 (num_avx512_zmmh_low_registers): New constant for number of
6338 lower ZMM registers (0-15).
6339 (num_avx512_zmmh_high_registers): New constant for number of
6340 higher ZMM registers (16-31).
6341 (num_avx512_ymmh_registers): New contant for number of higher
6342 YMM registers (ymm16-31 added by avx521 on x86_64).
6343 (num_avx512_xmm_registers): New constant for number of higher
6344 XMM registers (xmm16-31 added by AVX512 on x86_64).
6345 (struct i387_xsave): Add space for AVX512 registers.
6346 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6347 Add code to handle AVX512 registers.
6348 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6349 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6350 prototypei from generated file.
6351 (tdesc_amd64_avx512_linux): Likewise.
6352 (init_registers_x32_avx512_linux): Likewise.
6353 (tdesc_x32_avx512_linux): Likewise.
6354 (init_registers_i386_avx512_linux): Likewise.
6355 (tdesc_i386_avx512_linux): Likewise.
6356 (x86_64_regmap): Add AVX512 registers.
6357 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6358 mask.
6359 (initialize_low_arch): Add code to initialize AVX512 registers.
6360
6361 2014-04-23 Pedro Alves <palves@redhat.com>
6362
6363 * mem-break.c (find_gdb_breakpoint_at): Make static.
6364 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6365
6366 2014-04-23 Pedro Alves <palves@redhat.com>
6367
6368 * i386-low.c: Don't include break-common.h here.
6369 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6370 prototype to take target_hw_bp_type as argument instead of a Z
6371 packet char.
6372 * i386-low.h: Include break-common.h here.
6373 (Z_packet_to_hw_type): Declare.
6374 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6375 prototypes.
6376 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6377 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6378 (x86_remove_point): Convert the packet number to a
6379 target_hw_bp_type before calling i386_low_remove_watchpoint.
6380 * win32-i386-low.c (i386_insert_point): Convert the packet number
6381 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6382 (i386_remove_point): Convert the packet number to a
6383 target_hw_bp_type before calling i386_low_remove_watchpoint.
6384
6385 2014-04-23 Pedro Alves <palves@redhat.com>
6386
6387 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6388
6389 2014-04-10 Pedro Alves <palves@redhat.com>
6390
6391 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6392 Check if the condition or command is NULL before checking if the
6393 breakpoint is known. On success, return true.
6394 * mem-break.h (add_breakpoint_condition): Document return.
6395 (add_breakpoint_commands): Add describing comment.
6396 * server.c (skip_to_semicolon): New function.
6397 (process_point_options): Use it.
6398
6399 2014-04-09 Pedro Alves <palves@redhat.com>
6400
6401 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6402 to lwpid_of.
6403
6404 2014-02-27 Pedro Alves <palves@redhat.com>
6405
6406 PR 12702
6407 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6408 macros.
6409 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6410 output.
6411 (last_thread_of_process_p): Take a PID argument instead of a
6412 thread pointer.
6413 (linux_wait_for_lwp): Delete.
6414 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6415 functions.
6416 (linux_low_filter_event): New function, party factored out from
6417 linux_wait_for_event.
6418 (linux_wait_for_event): Rename to ...
6419 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6420 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6421 sigsuspend. Check for zombie leaders.
6422 (linux_wait_for_event): Reimplement as wrapper around
6423 linux_wait_for_event_filtered.
6424 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6425 a normal or signal exit is seen, it's the whole process exiting.
6426 (wait_for_sigstop): No longer a for_each_inferior callback.
6427 Rewrite on top of linux_wait_for_event_filtered.
6428 (stop_all_lwps): Call wait_for_sigstop directly.
6429 * server.c (resume, handle_target_event): Handle
6430 TARGET_WAITKIND_NO_RESUMED.
6431
6432 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6433
6434 * win32-low.c (psapi_get_dll_name,
6435 * win32_CreateToolhelp32Snapshot): Delete.
6436 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6437 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6438 Delete.
6439 (handle_load_dll): Add function description.
6440 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6441
6442 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6443
6444 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6445 Add comment.
6446 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6447 base address when calling win32_add_one_solib.
6448 (handle_load_dll): Delete local variable load_addr.
6449 Remove 0x1000 offset applied to DLL base address when calling
6450 win32_add_one_solib.
6451 (handle_unload_dll): Add comment.
6452
6453 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6454
6455 * win32-low.c (win32_add_all_dlls): Renames
6456 win32_ensure_ntdll_loaded. Rewrite function documentation.
6457 Adjust implementation to always load all DLLs.
6458 Add 0x1000 offset to DLL base address when calling
6459 win32_add_one_solib.
6460 (child_initialization_done): New static global.
6461 (do_initial_child_stuff): Set child_initialization_done to
6462 zero during child initialization, and 1 after. Replace call
6463 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6464 Add comment.
6465 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6466 (handle_unload_dll): Add function documentation.
6467 (get_child_debug_event): Ignore load and unload DLL events
6468 during child initialization.
6469
6470 2014-02-20 Doug Evans <dje@google.com>
6471
6472 Remove global all_lwps.
6473 * inferiors.h (ptid_of): Move here from linux-low.h.
6474 (pid_of, lwpid_of): Ditto.
6475 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6476 parameter is a struct thread_info * now.
6477 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6478 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6479 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6480 directly.
6481 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6482 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6483 * linux-arm-low.c (update_registers_callback): Update, "entry"
6484 parameter is a struct thread_info * now.
6485 Fetch lwpid from current_inferior directly.
6486 (arm_insert_point): Pass &all_threads to find_inferior instead of
6487 &all_lwps.
6488 (arm_remove_point): Ditto.
6489 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6490 (arm_prepare_to_resume): Fetch pid from thread.
6491 (arm_read_description): Fetch lwpid from current_inferior directly.
6492 * linux-low.c (all_lwps): Delete.
6493 (delete_lwp): Delete call to remove_inferior.
6494 (handle_extended_wait): Fetch lwpid from thread.
6495 (add_lwp): Don't set lwp->entry.id. Remove call to
6496 add_inferior_to_list.
6497 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6498 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6499 (kill_one_lwp_callback): Ditto.
6500 (linux_kill): Don't dereference NULL pointer.
6501 Fetch ptid,lwpid from thread.
6502 (get_detach_signal): Fetch ptid from thread.
6503 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6504 Simplify call to regcache_invalidate_thread.
6505 (delete_lwp_callback): Update, "entry" parameter is a
6506 struct thread_info * now. Fetch pid from thread.
6507 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6508 (status_pending_p_callback): Update, "entry" parameter is a
6509 struct thread_info * now. Fetch ptid from thread.
6510 (find_lwp_pid): Update, "entry" parameter is a
6511 struct thread_info * now.
6512 (linux_wait_for_lwp): Fetch pid from thread.
6513 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6514 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6515 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6516 (dequeue_one_deferred_signal): Ditto.
6517 (cancel_breakpoint): Fetch ptid from current_inferior.
6518 (linux_wait_for_event): Pass &all_threads to find_inferior,
6519 not &all_lwps. Fetch ptid, lwpid from thread.
6520 (count_events_callback): Update, "entry" parameter is a
6521 struct thread_info * now.
6522 (select_singlestep_lwp_callback): Ditto.
6523 (select_event_lwp_callback): Ditto.
6524 (cancel_breakpoints_callback): Ditto.
6525 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6526 not &all_lwps.
6527 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6528 (unsuspend_one_lwp): Update, "entry" parameter is a
6529 struct thread_info * now.
6530 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6531 not &all_lwps.
6532 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6533 Fetch lwpid from thread, not lwp.
6534 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6535 Pass &all_threads to find_inferior, not &all_lwps.
6536 (send_sigstop): Fetch lwpid from thread, not lwp.
6537 (send_sigstop_callback): Update, "entry" parameter is a
6538 struct thread_info * now.
6539 (suspend_and_send_sigstop_callback): Ditto.
6540 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6541 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6542 struct thread_info * now.
6543 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6544 from thread, lwp.
6545 (lwp_running): Update, "entry" parameter is a
6546 struct thread_info * now.
6547 (stop_all_lwps): Fetch ptid from thread.
6548 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6549 (linux_resume_one_lwp): Fetch lwpid from thread.
6550 (linux_set_resume_request): Update, "entry" parameter is a
6551 struct thread_info * now. Fetch pid, lwpid from thread.
6552 (resume_status_pending_p): Update, "entry" parameter is a
6553 struct thread_info * now.
6554 (need_step_over_p): Ditto. Fetch lwpid from thread.
6555 (start_step_over): Fetch lwpid from thread.
6556 (linux_resume_one_thread): Update, "entry" parameter is a
6557 struct thread_info * now. Fetch lwpid from thread.
6558 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6559 (proceed_one_lwp): Update, "entry" parameter is a
6560 struct thread_info * now. Fetch lwpid from thread.
6561 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6562 struct thread_info * now.
6563 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6564 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6565 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6566 directly.
6567 (regsets_store_inferior_registers): Ditto.
6568 (fetch_register, store_register): Ditto.
6569 (linux_read_memory, linux_write_memory): Ditto.
6570 (linux_request_interrupt): Ditto.
6571 (linux_read_auxv): Ditto.
6572 (linux_xfer_siginfo): Ditto.
6573 (linux_qxfer_spu): Ditto.
6574 (linux_qxfer_libraries_svr4): Ditto.
6575 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6576 moved to inferiors.h.
6577 (get_lwp): Delete.
6578 (get_thread_lwp): Update.
6579 (struct lwp_info): Delete member "entry". Simplify comment for
6580 member "thread".
6581 (all_lwps): Delete.
6582 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6583 current_inferior directly.
6584 (update_watch_registers_callback): Update, "entry" parameter is a
6585 struct thread_info * now. Fetch pid from thread.
6586 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6587 (mips_insert_point): Fetch lwpid from current_inferior.
6588 Pass &all_threads to find_inferior, not &all_lwps.
6589 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6590 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6591 directly.
6592 (mips_stopped_data_address): Ditto.
6593 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6594 directly.
6595 * linux-tile-low.c (tile_arch_setup): Ditto.
6596 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6597 (update_debug_registers_callback): Update, "entry" parameter is a
6598 struct thread_info * now. Fetch pid from thread.
6599 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6600 Pass &all_threads to find_inferior, not &all_lwps.
6601 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6602 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6603 Pass &all_threads to find_inferior, not &all_lwps.
6604 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6605 (i386_dr_low_get_status): Ditto.
6606 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6607 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6608 (x86_linux_read_description): Ditto.
6609 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6610
6611 2014-02-20 Doug Evans <dje@google.com>
6612
6613 * inferiors.c (get_first_inferior): Fix buglet.
6614
6615 2014-02-19 Doug Evans <dje@google.com>
6616
6617 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6618 * inferiors.c (add_thread): Change result type to struct thread_info *.
6619 All callers updated.
6620 (add_lwp): Call add_thread here instead of in callers.
6621 All callers updated.
6622 * linux-low.h (get_lwp_thread): Rewrite.
6623 (struct lwp_info): New member "thread".
6624
6625 2014-02-19 Doug Evans <dje@google.com>
6626
6627 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6628 All callers updated.
6629
6630 2014-02-19 Doug Evans <dje@google.com>
6631
6632 * inferiors.c (add_thread): Fix whitespace.
6633
6634 2014-02-19 Doug Evans <dje@google.com>
6635
6636 * dll.c (clear_dlls): Replace accessing list implemention details
6637 with API function.
6638 * gdbthread.h (get_first_thread): Declare.
6639 * inferiors.c (for_each_inferior_with_data): New function.
6640 (get_first_thread): New function.
6641 (find_thread_ptid): Simplify.
6642 (get_first_inferior): New function.
6643 (clear_list): Delete.
6644 (one_inferior_p): New function.
6645 (clear_inferior_list): New function.
6646 (clear_inferiors): Update.
6647 * inferiors.h (for_each_inferior_with_data): Declare.
6648 (clear_inferior_list): Declare.
6649 (one_inferior_p): Declare.
6650 (get_first_inferior): Declare.
6651 * linux-low.c (linux_wait_for_event): Replace accessing list
6652 implemention details with API function.
6653 * server.c (target_running): Ditto.
6654 (accumulate_file_name_length): New function.
6655 (emit_dll_description): New function.
6656 (handle_qxfer_libraries): Replace accessing list implemention
6657 details with API function.
6658 (handle_qxfer_threads_worker): New function.
6659 (handle_qxfer_threads_proper): Replace accessing list implemention
6660 details with API function.
6661 (handle_query): Ditto.
6662 (visit_actioned_threads_callback_ftype): New typedef.
6663 (visit_actioned_threads_data): New struct.
6664 (visit_actioned_threads): Rewrite to be find_inferior callback.
6665 (resume): Call find_inferior.
6666 (handle_status): Replace accessing list implemention
6667 details with API function.
6668 (process_serial_event): Replace accessing list implemention details
6669 with API function.
6670 * target.c (set_desired_inferior): Replace accessing list implemention
6671 details with API function.
6672 * tracepoint.c (same_process_p): New function.
6673 (gdb_agent_about_to_close): Replace accessing list implemention
6674 details with API function.
6675 * win32-low.c (child_delete_thread): Replace accessing list
6676 implemention details with API function.
6677 (match_dll_by_basename): New function.
6678 (dll_is_loaded_by_basename): New function.
6679 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6680 details call to dll_is_loaded_by_basename.
6681
6682 2014-02-19 Doug Evans <dje@google.com>
6683
6684 * dll.h (struct dll_info): Add comment.
6685 * gdbthread.h (struct thread_info): Add comment.
6686 (current_ptid): Simplify.
6687 * inferiors.c (add_process): Update.
6688 (remove_process): Update.
6689 * inferiors.h (struct process_info): Rename member "head" to "entry".
6690 * linux-low.c (delete_lwp): Update.
6691 (add_lwp): Update.
6692 (last_thread_of_process_p): Update.
6693 (kill_one_lwp_callback, linux_kill): Update.
6694 (status_pending_p_callback): Update.
6695 (wait_for_sigstop): Update. Simplify read of ptid.
6696 (start_step_over): Update.
6697 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6698 (get_lwp_thread): Update.
6699 (struct lwp_info): Rename member "head" to "entry".
6700 * regcache.h (inferior_list_entry): Delete.
6701 * server.c (kill_inferior_callback): Update.
6702 (detach_or_kill_inferior_callback): Update.
6703 (print_started_pid): Update.
6704 (print_attached_pid): Update.
6705 (process_serial_event): Simplify read of ptid.
6706 * thread-db.c (thread_db_create_event): Update.
6707 (thread_db_get_tls_address): Update.
6708 * win32-low.c (current_inferior_ptid): Simplify.
6709
6710 2014-02-19 Tom Tromey <tromey@redhat.com>
6711
6712 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6713 argument.
6714 (target_supports_btrace): Update.
6715
6716 2014-02-14 Yao Qi <yao@codesourcery.com>
6717
6718 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6719 (rsp-low-ipa.o): New target.
6720
6721 2014-02-12 Tom Tromey <tromey@redhat.com>
6722
6723 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6724 convert_ascii_to_int.
6725 * regcache.c (registers_to_string): Likewise.
6726 * remote-utils.c (decode_M_packet): Likewise.
6727 * server.c (process_serial_event): Likewise.
6728
6729 2014-02-12 Tom Tromey <tromey@redhat.com>
6730
6731 * server.c (handle_query, handle_v_run): Use hex2bin, not
6732 unhexify.
6733 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6734
6735 2014-02-12 Tom Tromey <tromey@redhat.com>
6736
6737 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6738 convert_int_to_ascii.
6739 * regcache.c (registers_to_string, collect_register_as_string):
6740 Likewise.
6741 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6742 Likewise.
6743 * server.c (process_serial_event): Likewise.
6744 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6745 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6746
6747 2014-02-12 Tom Tromey <tromey@redhat.com>
6748
6749 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6750 bin2hex, not hexify.
6751 * tracepoint.c (cmd_qtstatus): Likewise.
6752
6753 2014-02-12 Tom Tromey <tromey@redhat.com>
6754
6755 * remote-utils.c (monitor_output): Pass explicit length to
6756 hexify.
6757
6758 2014-02-12 Tom Tromey <tromey@redhat.com>
6759
6760 * tracepoint.c: Include rsp-low.h.
6761 * server.c: Include rsp-low.h.
6762 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6763 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6764 declare.
6765 * remote-utils.c: Include rsp-low.h.
6766 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6767 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6768 (convert_int_to_ascii, convert_ascii_to_int): Move to
6769 common/rsp-low.c.
6770 * regcache.c: Include rsp-low.h.
6771 * ax.c: Include rsp-low.h.
6772 * Makefile.in (SFILES): Add common/rsp-low.c.
6773 (OBS): Add rsp-low.o.
6774 (rsp-low.o): New target.
6775
6776 2014-02-12 Tom Tromey <tromey@redhat.com>
6777
6778 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6779 Include print-utils.h.
6780 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6781 (plongest, thirty_two, phex_nz): Remove.
6782 * Makefile.in (SFILES): Add common/print-utils.c.
6783 (OBS): Add print-utils.o.
6784 (print-utils-ipa.o): New target.
6785 (print-utils.o): New target.
6786 (IPA_OBJS): Add print-utils-ipa.o.
6787
6788 2014-02-06 Tom Tromey <tromey@redhat.com>
6789
6790 * Makefile.in (SFILES): Fix indentation.
6791
6792 2014-02-05 Doug Evans <dje@google.com>
6793
6794 * linux-low.c (linux_wait_for_event): Improve comment.
6795 (linux_wait_1): Keep current_inferior in sync with event_child.
6796
6797 2014-01-22 Doug Evans <dje@google.com>
6798
6799 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6800
6801 2014-01-22 Doug Evans <dje@google.com>
6802
6803 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6804 * configure: Regenerate.
6805 * config.in: Regenerate.
6806 * Makefile.in (SFILES): Add debug.c.
6807 (OBS): Add debug.o.
6808 * debug.c: New file.
6809 * debug.h: New file.
6810 * linux-aarch64-low.c (*): Update all debugging printfs to use
6811 debug_printf instead of fprintf.
6812 * linux-arm-low.c (*): Ditto.
6813 * linux-cris-low.c (*): Ditto.
6814 * linux-crisv32-low.c (*): Ditto.
6815 * linux-m32r-low.c (*): Ditto.
6816 * linux-sparc-low.c (*): Ditto.
6817 * linux-x86.c (*): Ditto.
6818 * linux-low.c (*): Ditto.
6819 (linux_wait_1): Add calls to debug_enter, debug_exit.
6820 (linux_wait): Remove redundant debugging printf.
6821 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6822 (linux_resume, unstop_all_lwps): Ditto.
6823 * mem-break.c (*): Update all debugging printfs to use
6824 debug_printf instead of fprintf.
6825 * remote-utils.c (*): Ditto.
6826 * thread-db.c (*): Ditto.
6827 * server.c #include <ctype.h>, "gdb_vecs.h".
6828 (debug_threads): Moved to debug.c.
6829 (*): Update all debugging printfs to use debug_printf instead of
6830 fprintf.
6831 (start_inferior): Replace call to fflush with call to debug_flush.
6832 (monitor_show_help): Mention set debug-format.
6833 (parse_debug_format_options): New function.
6834 (handle_monitor_command): Handle "monitor set debug-format".
6835 (gdbserver_usage): Mention --debug-format.
6836 (main): Parse --debug-format.
6837 * server.h (debug_threads): Declaration moved to debug.h.
6838 #include "debug.h".
6839 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6840 trace_debug_1 that uses debug_printf.
6841 (tracepoint_look_up_symbols): Update all debugging printfs to use
6842 debug_printf instead of fprintf.
6843
6844 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6845
6846 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6847 sys/ptrace.h.
6848
6849 2014-01-17 Pedro Alves <palves@redhat.com>
6850
6851 PR build/16445
6852 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6853 defined after including gdb_proc_service.h.
6854
6855 2014-01-16 Doug Evans <dje@google.com>
6856
6857 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6858 (match_dll): Use it.
6859
6860 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6861
6862 * target.h (target_ops) <read_btrace>: Change parameters and
6863 return type to allow error reporting.
6864 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6865 trace reading errors on.
6866 * linux-low.c (linux_low_read_btrace): Pass trace reading
6867 errors on.
6868 (linux_low_disable_btrace): New.
6869
6870 2014-01-15 Doug Evans <dje@google.com>
6871
6872 * inferiors.c (thread_id_to_gdb_id): Delete.
6873 * inferiors.h (thread_id_to_gdb_id): Delete.
6874
6875 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6876
6877 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6878 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6879 versions.
6880
6881 2014-01-08 Pedro Alves <palves@redhat.com>
6882
6883 * server.c (handle_status): Don't discard previous queued stop
6884 replies or thread's pending status here.
6885 (main) <disconnection>: Do it here instead.
6886
6887 2014-01-08 Pedro Alves <palves@redhat.com>
6888
6889 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6890 * server.c (visit_actioned_threads, handle_pending_status): New
6891 function.
6892 (handle_v_cont): Factor out parts to ...
6893 (resume): ... this new function. If in all-stop, and a thread
6894 being resumed has a pending status, report it without actually
6895 resuming.
6896 (myresume): Adjust to use the new 'resume' function.
6897 (clear_pending_status_callback, set_pending_status_callback)
6898 (find_status_pending_thread_callback): New functions.
6899 (handle_status): Handle the case of multiple threads having
6900 interesting statuses to report. Report threads' real last signal
6901 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6902 with an interesting thread to report the status for, instead of
6903 always reporting the status of the first thread.
6904
6905 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6906
6907 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6908 * gdbreplay.c (gdbreplay_version): Likewise.
6909
6910 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6911
6912 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6913 iov.iov_len with the real length in use.
6914
6915 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6916
6917 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6918 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6919 for all targets that use win32-low.c.
6920 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6921 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6922
6923 2013-12-13 Pedro Alves <palves@redhat.com>
6924
6925 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6926 if equal to TARGET_WAITKIND_LOADED.
6927 * win32-low.c (cached_status): New static global.
6928 (win32_wait): Add declaration.
6929 (do_initial_child_stuff): Flush all initial pending debug events
6930 up to the initial breakpoint.
6931 (win32_wait): If CACHED_STATUS was set, return that instead
6932 of doing a real wait. Remove the code resuming the execution
6933 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6934 during the initial phase. Also remove the code changing
6935 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6936 TARGET_WAITKIND_STOPPED.
6937
6938 2013-12-11 Yao Qi <yao@codesourcery.com>
6939
6940 * notif.c (handle_notif_ack): Return 0 if no notification
6941 matches.
6942
6943 2013-11-20 Doug Evans <dje@google.com>
6944
6945 * linux-low.c (linux_set_resume_request): Fix comment.
6946
6947 2013-11-20 Doug Evans <dje@google.com>
6948
6949 * linux-low.c (resume_status_pending_p): Tweak comment.
6950
6951 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6952
6953 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6954 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6955 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6956 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6957 (srv_amd64_regobj): Add amd64-mpx.o.
6958 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6959 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6960 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6961 * i387-fp.c (num_pl_bnd_register) Added constant.
6962 (num_pl_bnd_cfg_registers) Added constant.
6963 (struct i387_xsave) Added reserved area and MPX fields.
6964 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6965 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6966 function.
6967 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6968 (init_registers_amd64_mpx_linux): Declare new function.
6969 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6970 (x86_64_regmap): Add MPX registers.
6971 (x86_linux_read_description): Add MPX case.
6972 (initialize_low_arch): Initialize MPX targets.
6973
6974 2013-11-18 Tom Tromey <tromey@redhat.com>
6975
6976 * configure: Rebuild.
6977 * configure.ac: Don't check for stdlib.h.
6978 * gdbreplay.c: Unconditionally include stdlib.h.
6979
6980 2013-11-18 Tom Tromey <tromey@redhat.com>
6981
6982 * config.in: Rebuild.
6983 * configure: Rebuild.
6984 * configure.ac: Don't use AC_HEADER_DIRENT.
6985
6986 2013-11-18 Tom Tromey <tromey@redhat.com>
6987
6988 * server.h: Don't check HAVE_STRING_H.
6989 * gdbreplay.c: Don't check HAVE_STRING_H.
6990 * configure: Rebuild.
6991
6992 2013-11-18 Tom Tromey <tromey@redhat.com>
6993
6994 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6995 LIBGNU.
6996
6997 2013-11-08 Tom Tromey <tromey@redhat.com>
6998
6999 * configure, config.in: Rebuild.
7000 * configure.ac: Remove unused configury.
7001
7002 2013-11-08 Tom Tromey <tromey@redhat.com>
7003
7004 * acinclude.m4: Include common.m4, codeset.m4.
7005 * configure, config.in: Rebuild.
7006 * configure.ac: Use GDB_AC_COMMON.
7007
7008 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7009
7010 * linux-s390-low.c (HWCAP_S390_TE): New define.
7011 (s390_arch_setup): Consider the TE field in the HWCAP for
7012 determining 'have_regset_tdb'.
7013
7014 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7015
7016 PR gdb/16014
7017 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7018 call to sizeof.
7019
7020 2013-10-02 Pedro Alves <palves@redhat.com>
7021
7022 * server.c (process_serial_event): Don't output "GDBserver
7023 exiting" if GDB is connected through stdio.
7024 * target.c (mywait): Likewise, be silent if GDB is connected
7025 through stdio.
7026
7027 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7028
7029 * lynx-low.c (lynx_add_threads_after_attach): New function.
7030 (lynx_attach): Remove call to add_thread. Add call to
7031 lynx_add_threads_after_attach instead.
7032
7033 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7034
7035 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7036 * config.in, configure: Regenerated.
7037
7038 2013-09-18 Yao Qi <yao@codesourcery.com>
7039
7040 PR server/15959
7041 * server.c (start_inferior): Clear 'resume_info'.
7042
7043 2013-09-16 Jiong Wang <jiwang@tilera.com>
7044
7045 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7046 for each register.
7047
7048 2013-09-16 Jiong Wang <jiwang@tilera.com>
7049
7050 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7051 linux-tile-low.o to srv_tgtobj.
7052
7053 2013-09-16 Will Newton <will.newton@linaro.org>
7054
7055 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7056 out regs.
7057
7058 2013-09-06 Pedro Alves <palves@redhat.com>
7059
7060 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7061 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7062 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7063 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7064 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7065 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7066
7067 2013-09-06 Pedro Alves <palves@redhat.com>
7068
7069 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7070 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7071
7072 2013-09-06 Pedro Alves <palves@redhat.com>
7073
7074 * linux-amd64-ipa.c: Include tracepoint.h.
7075 * linux-i386-ipa.c: Include tracepoint.h.
7076
7077 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7078
7079 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7080 (ps_get_thread_area): New function.
7081
7082 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7083
7084 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7085 (initialize_low_arch): Call init_registers_crisv32 rather than
7086 init_register_crisv32.
7087
7088 2013-09-05 Pedro Alves <palves@redhat.com>
7089
7090 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7091 to ...
7092 * hostio.h: ... this new file.
7093 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7094 win32-low.c: Include hostio.h.
7095
7096 2013-09-05 Pedro Alves <palves@redhat.com>
7097
7098 * server.h (gdb_client_data, handler_func, callback_handler_func)
7099 (delete_file_handler, add_file_handler, append_callback_event)
7100 (delete_callback_event, start_event_loop, initialize_event_loop):
7101 Move to event-loop.h and include it.
7102 * event-loop.h: New file.
7103
7104 2013-09-05 Pedro Alves <palves@redhat.com>
7105
7106 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7107 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7108 (loaded_dll, unloaded_dll): Move to ...
7109 * dll.h: ... this new file.
7110 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7111
7112 2013-09-05 Pedro Alves <palves@redhat.com>
7113
7114 * server.h (current_process, get_thread_process, all_processes)
7115 (add_inferior_to_list, for_each_inferior, current_inferior)
7116 (remove_inferior, add_process, remove_process, find_process_pid)
7117 (have_started_inferiors_p, have_attached_inferiors_p)
7118 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7119 (clear_inferiors, find_inferior, find_inferior_id)
7120 (inferior_target_data, set_inferior_target_data)
7121 (inferior_regcache_data, set_inferior_regcache_data): Move to
7122 inferiors.h, and include it.
7123 * inferiors.h: New file.
7124
7125 2013-09-05 Pedro Alves <palves@redhat.com>
7126
7127 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7128 Move ...
7129 * ax.h: ... here.
7130
7131 2013-09-05 Pedro Alves <palves@redhat.com>
7132
7133 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7134 tracepoint.h.
7135 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7136 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7137 (handle_tracepoint_general_set, handle_tracepoint_query)
7138 (tracepoint_finished_step, tracepoint_was_hit)
7139 (release_while_stepping_state_list, current_traceframe)
7140 (in_readonly_region, traceframe_read_mem)
7141 (fetch_traceframe_registers, traceframe_read_sdata)
7142 (traceframe_read_info, struct fast_tpoint_collect_status)
7143 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7144 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7145 (supply_fast_tracepoint_registers)
7146 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7147 (ipa_tdesc, claim_trampoline_space)
7148 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7149 (agent_mem_read, agent_get_trace_state_variable_value)
7150 (agent_set_trace_state_variable_value, agent_tsv_read)
7151 (agent_mem_read_string, get_raw_reg_func_addr)
7152 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7153 * tracepoint.h: ... this new file.
7154
7155 2013-09-05 Pedro Alves <palves@redhat.com>
7156
7157 * server.h (perror_with_name, error, fatal, warning, paddress)
7158 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7159 include it.
7160 * utils.h: New file.
7161
7162 2013-09-05 Pedro Alves <palves@redhat.com>
7163
7164 * server.h (remote_debug, noack_mode, transport_is_reliable)
7165 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7166 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7167 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7168 (write_enn, initialize_async_io, enable_async_io)
7169 (disable_async_io, check_remote_input_interrupt_request)
7170 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7171 (dead_thread_notify, prepare_resume_reply)
7172 (decode_address_to_semicolon, decode_address, decode_m_packet)
7173 (decode_M_packet, decode_X_packet, decode_xfer_write)
7174 (decode_search_memory_packet, unhexify, hexify)
7175 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7176 (look_up_one_symbol, relocate_instruction)
7177 (monitor_output): Move to remote-utils.h, and include it.
7178 * remote-utils.h: New file.
7179
7180 2013-09-05 Pedro Alves <palves@redhat.com>
7181
7182 * server.h (_): Delete.
7183
7184 2013-09-02 Pedro Alves <palves@redhat.com>
7185
7186 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7187 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7188 allocated.
7189 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7190
7191 2013-09-02 Pierre Muller <muller@sourceware.org>
7192
7193 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7194 or WriteProcessMemory complete successfully and handle
7195 ERROR_PARTIAL_COPY error.
7196
7197 2013-09-02 Pedro Alves <palves@redhat.com>
7198
7199 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7200 error instead of EIO.
7201
7202 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7203
7204 PR server/15604
7205 * linux-low.c: Include filestuff.h.
7206 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7207 * lynx-low.c: Include filestuff.h.
7208 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7209 * server.c: Include filestuff.h.
7210 (main): Call notice_open_fds.
7211 * spu-low.c: Include filestuff.h.
7212 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7213
7214 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7215
7216 * Makefile.in: Explain why ../target and ../nat are not
7217 listed as include file search paths.
7218 (linux-waitpid.o): New object file rule.
7219 * configure.srv (srv_native_linux_obj): New variable.
7220 Replace all occurrences of linux native object files with
7221 $srv_native_linux_obj.
7222 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7223 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7224 (linux_enable_event_reporting): Remove declaration.
7225 (my_waitpid): Moved to common/linux-waitpid.c.
7226 (linux_wait_for_event): Pass ptid when calling
7227 linux_enable_event_reporting.
7228 (linux_supports_tracefork_flag): Remove.
7229 (linux_enable_event_reporting): Likewise.
7230 (linux_tracefork_grandchild): Remove.
7231 (STACK_SIZE): Moved to common/linux-ptrace.c.
7232 (linux_tracefork_child): Remove.
7233 (linux_test_for_tracefork): Remove.
7234 (linux_look_up_symbols): Call linux_supports_traceclone.
7235 (initialize_low): Remove call to linux_test_for_tracefork.
7236 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7237 common/linux-ptrace.h.
7238 (PTRACE_TYPE_ARG4): Likewise.
7239 Include linux-ptrace.h.
7240
7241 2013-08-21 Pedro Alves <palves@redhat.com>
7242
7243 * config.in: Renegerate.
7244
7245 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7246
7247 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7248 (SFILES): Remove $(srcdir)/common/target-common.c and
7249 add $(srcdir)/target/waitstatus.c.
7250 (OBS): Remove target-common.o and add waitstatus.o.
7251 (server_h): Remove $(srcdir)/../common/target-common.h and
7252 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7253 and $(srcdir)/../target/waitstatus.h.
7254 (target-common.o): Remove.
7255 (waitstatus.o): New target object file.
7256 * target.h: Do not include target-common.h and
7257 include target/resume.h, target/wait.h and
7258 target/waitstatus.h.
7259
7260 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7261
7262 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7263 to PTRACE_TYPE_ARG3.
7264 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7265 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7266 PTRACE_TYPE_ARG4.
7267 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7268 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7269
7270 2013-07-27 Jie Zhang <jie@codesourcery.com>
7271 Daniel Jacobowitz <dan@codesourcery.com>
7272 Yao Qi <yao@codesourcery.com>
7273
7274 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7275 (mips-linux-watch.o): New rule.
7276 (mips_linux_watch_h): New variable.
7277 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7278 srv_tgtobj.
7279 * linux-mips-low.c: Include mips-linux-watch.h.
7280 (struct arch_process_info, struct arch_lwp_info): New.
7281 (update_watch_registers_callback): New function.
7282 (mips_linux_new_process, mips_linux_new_thread) New functions.
7283 (mips_linux_prepare_to_resume, mips_insert_point): New
7284 functions.
7285 (mips_remove_point, mips_stopped_by_watchpoint): New
7286 functions.
7287 (rsp_bp_type_to_target_hw_bp_type): New function.
7288 (mips_stopped_data_address): New function.
7289 (the_low_target): Add watchpoint support functions.
7290
7291 2013-07-27 Yao Qi <yao@codesourcery.com>
7292
7293 * i386-low.c: Include break-common.h.
7294 (enum target_hw_bp_type): Remove.
7295
7296 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7297
7298 * Makefile.in (SFILES): /common/target-common.c.
7299 (OBS): Add target-common.o.
7300 (server_h): Add $(srcdir)/../common/target-common.h.
7301 (target-common.o): New target.
7302 * server.c (queue_stop_reply_callback): Free
7303 status string after use.
7304 * target.c (target_waitstatus_to_string): Remove.
7305 * target.h: Include target-common.h.
7306 (resume_kind): Likewise.
7307 (target_waitkind): Likewise.
7308 (target_waitstatus): Likewise.
7309 (TARGET_WNOHANG): Likewise.
7310
7311 2013-07-04 Yao Qi <yao@codesourcery.com>
7312
7313 * Makefile.in (host_alias): Use @host_noncanonical@.
7314 (target_alias): Use @target_noncanonical@.
7315 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7316 ACX_NONCANONICAL_HOST.
7317 * configure: Regenerated.
7318
7319 Revert:
7320 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7321
7322 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7323 * configure: Rebuild.
7324 * Makefile.in (version_host, version_target): Get from configure.
7325 (version.c): Use $(version_host) and $(version_target).
7326
7327 2013-07-03 Pedro Alves <palves@redhat.com>
7328
7329 * Makefile.in (config.status): Depend on development.sh.
7330 * acinclude.m4: Include libmcheck.m4.
7331 * configure: Regenerate.
7332
7333 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7334
7335 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7336 attribute inside the parentheses.
7337 (winapi_DebugSetProcessKillOnExit): Ditto.
7338 (winapi_DebugBreakProcess): Ditto.
7339 (winapi_GenerateConsoleCtrlEvent): Ditto.
7340
7341 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7342
7343 * notif.h (notif_event): Add a dummy member to avoid compiler
7344 errors.
7345
7346 2013-07-01 Pedro Alves <palves@redhat.com>
7347
7348 * hostio.c (HOSTIO_PATH_MAX): Define.
7349 (require_filename, handle_open, handle_unlink, handle_readlink):
7350 Use it.
7351
7352 2013-07-01 Pedro Alves <palves@redhat.com>
7353
7354 * server.h: Include "pathmax.h".
7355 * linux-low.c: Don't include sys/param.h.
7356 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7357 MAXPATHLEN.
7358 * win32-low.c: Don't include sys/param.h.
7359 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7360
7361 2013-07-01 Pedro Alves <palves@redhat.com>
7362
7363 * event-loop.c: Don't check HAVE_UNISTD_H before including
7364 <unistd.h>.
7365 * gdbreplay.c: Likewise.
7366 * remote-utils.c: Likewise.
7367 * server.c: Likewise.
7368 * configure.ac: Don't check for unistd.h.
7369 * configure: Regenerate.
7370
7371 2013-06-28 Tom Tromey <tromey@redhat.com>
7372
7373 * Makefile.in (version.c): Use version.in, not
7374 common/version.in.
7375
7376 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7377
7378 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7379 * configure: Rebuild.
7380 * Makefile.in (version_host, version_target): Get from configure.
7381 (version.c): Use $(version_host) and $(version_target).
7382
7383 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7384
7385 Fix trace-status to output user name without trailing colon.
7386 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7387
7388 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7389
7390 Fix trace-status to output proper start-time and stop-time.
7391 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7392 output start time and stop time in hex as gdb expects.
7393
7394 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7395
7396 * tracepoint.c (build_traceframe_info_xml): Output trace state
7397 variables present in the trace buffer.
7398
7399 2013-06-24 Tom Tromey <tromey@redhat.com>
7400
7401 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7402 create-version.sh.
7403 (version.o): Remove.
7404 * gdbreplay.c: Include version.h.
7405 (version, host_name): Don't declare.
7406 * server.h: Include version.h.
7407 (version, host_name): Don't declare.
7408
7409 2013-06-12 Pedro Alves <palves@redhat.com>
7410
7411 * linux-x86-low.c (linux_is_elf64): Delete global.
7412 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7413 with local linux_pid_exe_is_elf_64_file use.
7414
7415 2013-06-11 Pedro Alves <palves@redhat.com>
7416
7417 * linux-low.c (regset_disabled, disable_regset): New functions.
7418 (regsets_fetch_inferior_registers)
7419 (regsets_store_inferior_registers): Use them.
7420 (initialize_regsets_info); Don't allocate the disabled_regsets
7421 array here.
7422 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7423 comment.
7424
7425 2013-06-11 Pedro Alves <palves@redhat.com>
7426
7427 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7428 xmalloc.
7429
7430 2013-06-11 Pedro Alves <palves@redhat.com>
7431
7432 * linux-x86-low.c (initialize_low_arch): Call
7433 init_registers_x32_avx_linux.
7434
7435 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7436
7437 Fix compatibility with Android Bionic.
7438 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7439 it is not empty.
7440
7441 2013-06-07 Pedro Alves <palves@redhat.com>
7442
7443 PR server/14823
7444 * Makefile.in (OBS): Add tdesc.o.
7445 (IPA_OBJS): Add tdesc-ipa.o.
7446 (tdesc-ipa.o): New rule.
7447 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7448 interface.
7449 * linux-low.c (new_inferior): Delete.
7450 (disabled_regsets, num_regsets): Delete.
7451 (linux_add_process): Adjust to set the new per-process
7452 new_inferior flag.
7453 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7454 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7455 was a stop. When calling arch_setup, switch the current inferior
7456 to the thread that got an event.
7457 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7458 (regsets_fetch_inferior_registers)
7459 (regsets_store_inferior_registers): New regsets_info parameter.
7460 Adjust to use it.
7461 (linux_register_in_regsets): New regs_info parameter. Adjust to
7462 use it.
7463 (register_addr, fetch_register, store_register): New usrregs_info
7464 parameter. Adjust to use it.
7465 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7466 parameter regs_info. Adjust to use it.
7467 (linux_fetch_registers): Get the current inferior's regs_info, and
7468 adjust to use it.
7469 (linux_store_registers): Ditto.
7470 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7471 (initialize_low): Don't initialize the target_regsets here. Call
7472 initialize_low_arch.
7473 * linux-low.h (target_regsets): Delete declaration.
7474 (struct regsets_info): New.
7475 (struct usrregs_info): New.
7476 (struct regs_info): New.
7477 (struct process_info_private) <new_inferior>: New field.
7478 (struct linux_target_ops): Delete the num_regs, regmap, and
7479 regset_bitmap fields. New field regs_info.
7480 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7481 * i387-fp.c (num_xmm_registers): Delete.
7482 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7483 calls to new interface.
7484 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7485 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7486 Infer the number of xmm registers from the regcache's target
7487 description.
7488 * i387-fp.h (num_xmm_registers): Delete.
7489 * inferiors.c (add_thread): Don't install the thread's regcache
7490 here.
7491 * proc-service.c (gregset_info): Fetch the current inferior's
7492 regs_info. Adjust to use it.
7493 * regcache.c: Include tdesc.h.
7494 (register_bytes, reg_defs, num_registers)
7495 (gdbserver_expedite_regs): Delete.
7496 (get_thread_regcache): If the thread doesn't have a regcache yet,
7497 create one, instead of aborting gdbserver.
7498 (regcache_invalidate_one): Rename to ...
7499 (regcache_invalidate_thread): ... this.
7500 (regcache_invalidate_one): New.
7501 (regcache_invalidate): Only invalidate registers of the current
7502 process.
7503 (init_register_cache): Add target_desc parameter, and use it.
7504 (new_register_cache): Ditto. Assert the target description has a
7505 non zero registers_size.
7506 (regcache_cpy): Add assertions. Adjust.
7507 (realloc_register_cache, set_register_cache): Delete.
7508 (registers_to_string, registers_from_string): Adjust.
7509 (find_register_by_name, find_regno, find_register_by_number)
7510 (register_cache_size): Add target_desc parameter, and use it.
7511 (free_register_cache_thread, free_register_cache_thread_one)
7512 (regcache_release, register_cache_size): New.
7513 (register_size): Add target_desc parameter, and use it.
7514 (register_data, supply_register, supply_register_zeroed)
7515 (supply_regblock, supply_register_by_name, collect_register)
7516 (collect_register_as_string, collect_register_by_name): Adjust.
7517 * regcache.h (struct target_desc): Forward declare.
7518 (struct regcache) <tdesc>: New field.
7519 (init_register_cache, new_register_cache): Add target_desc
7520 parameter.
7521 (regcache_invalidate_thread): Declare.
7522 (regcache_invalidate_one): Delete declaration.
7523 (regcache_release): Declare.
7524 (find_register_by_number, register_cache_size, register_size)
7525 (find_regno): Add target_desc parameter.
7526 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7527 declarations.
7528 * remote-utils.c: Include tdesc.h.
7529 (outreg, prepare_resume_reply): Adjust.
7530 * server.c: Include tdesc.h.
7531 (gdbserver_xmltarget): Delete declaration.
7532 (get_features_xml, process_serial_event): Adjust.
7533 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7534 declare.
7535 (struct process_info) <tdesc>: New field.
7536 (ipa_tdesc): Declare.
7537 * tdesc.c: New file.
7538 * tdesc.h: New file.
7539 * tracepoint.c: Include tdesc.h.
7540 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7541 (get_context_regcache): Adjust to pass ipa_tdesc down.
7542 (do_action_at_tracepoint): Adjust to get the register cache size
7543 from the context regcache's description.
7544 (traceframe_walk_blocks): Adjust to get the register cache size
7545 from the current trace frame's description.
7546 (traceframe_get_pc): Adjust to get current trace frame's
7547 description and pass it down.
7548 (gdb_collect): Adjust to get the register cache size from the
7549 IPA's description.
7550 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7551 (gdbserver_xmltarget): Delete.
7552 (initialize_low_tracepoint): Set the ipa's target description.
7553 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7554 (initialize_low_tracepoint): Set the ipa's target description.
7555 * linux-x86-low.c: Include tdesc.h.
7556 [__x86_64__] (is_64bit_tdesc): New.
7557 (ps_get_thread_area, x86_get_thread_area): Use it.
7558 (i386_cannot_store_register): Rename to ...
7559 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7560 (i386_cannot_fetch_register): Rename to ...
7561 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7562 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7563 to new interface.
7564 (target_regsets): Rename to ...
7565 (x86_regsets): ... this.
7566 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7567 interface.
7568 (x86_siginfo_fixup): Use is_64bit_tdesc.
7569 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7570 (tdesc_x32_avx_linux, tdesc_x32_linux)
7571 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7572 Declare.
7573 (x86_linux_update_xmltarget): Delete.
7574 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7575 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7576 (AMD64_LINUX_USER64_CS): New.
7577 (x86_linux_read_description): New, based on
7578 x86_linux_update_xmltarget.
7579 (same_process_callback): New.
7580 (x86_arch_setup_process_callback): New.
7581 (x86_linux_update_xmltarget): New.
7582 (x86_regsets_info): New.
7583 (amd64_linux_regs_info): New.
7584 (i386_linux_usrregs_info): New.
7585 (i386_linux_regs_info): New.
7586 (x86_linux_regs_info): New.
7587 (x86_arch_setup): Reimplement.
7588 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7589 (x86_emit_ops): Ditto.
7590 (the_low_target): Adjust. Install x86_linux_regs_info,
7591 x86_cannot_fetch_register, and x86_cannot_store_register.
7592 (initialize_low_arch): New.
7593 * linux-ia64-low.c (tdesc_ia64): Declare.
7594 (ia64_fetch_register): Adjust.
7595 (ia64_usrregs_info, regs_info): New globals.
7596 (ia64_regs_info): New function.
7597 (the_low_target): Adjust.
7598 (initialize_low_arch): New function.
7599 * linux-sparc-low.c (tdesc_sparc64): Declare.
7600 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7601 Adjust.
7602 (sparc_arch_setup): New function.
7603 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7604 (the_low_target): Adjust.
7605 (initialize_low_arch): New function.
7606 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7607 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7608 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7609 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7610 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7611 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7612 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7613 (tdesc_powerpc_isa205_vsx64l): Declare.
7614 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7615 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7616 (ppc_set_pc, ppc_get_hwcap): Adjust.
7617 (ppc_usrregs_info): Forward declare.
7618 (!__powerpc64__) ppc_regmap_adjusted: New global.
7619 (ppc_arch_setup): Adjust to the current process'es target
7620 description.
7621 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7622 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7623 (ppc_store_evrregset): Adjust.
7624 (target_regsets): Rename to ...
7625 (ppc_regsets): ... this, and make static.
7626 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7627 (ppc_regs_info): New function.
7628 (the_low_target): Adjust.
7629 (initialize_low_arch): New function.
7630 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7631 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7632 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7633 (tdesc_s390x_linux64v2): Declare.
7634 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7635 (s390_fill_gregset, s390_store_last_break): Adjust.
7636 (target_regsets): Rename to ...
7637 (s390_regsets): ... this, and make static.
7638 (s390_get_pc, s390_set_pc): Adjust.
7639 (s390_get_hwcap): New target_desc parameter, and use it.
7640 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7641 (s390_arch_setup): Adjust to set the current process'es target
7642 description. Don't adjust the regmap.
7643 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7644 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7645 (regs_info_3264): New globals.
7646 (s390_regs_info): New function.
7647 (the_low_target): Adjust.
7648 (initialize_low_arch): New function.
7649 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7650 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7651 [__mips64] (init_registers_mips_linux)
7652 (init_registers_mips_dsp_linux): Delete defines.
7653 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7654 (have_dsp): New global.
7655 (mips_read_description): New, based on mips_arch_setup.
7656 (mips_arch_setup): Reimplement.
7657 (get_usrregs_info): New function.
7658 (mips_cannot_fetch_register, mips_cannot_store_register)
7659 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7660 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7661 (target_regsets): Rename to ...
7662 (mips_regsets): ... this, and make static.
7663 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7664 (dsp_regs_info, regs_info): New globals.
7665 (mips_regs_info): New function.
7666 (the_low_target): Adjust.
7667 (initialize_low_arch): New function.
7668 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7669 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7670 Declare.
7671 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7672 (arm_read_description): New, with bits factored from
7673 arm_arch_setup.
7674 (arm_arch_setup): Reimplement.
7675 (target_regsets): Rename to ...
7676 (arm_regsets): ... this, and make static.
7677 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7678 (arm_regs_info): New function.
7679 (the_low_target): Adjust.
7680 (initialize_low_arch): New function.
7681 * linux-m68k-low.c (tdesc_m68k): Declare.
7682 (target_regsets): Rename to ...
7683 (m68k_regsets): ... this, and make static.
7684 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7685 (m68k_regs_info): New function.
7686 (m68k_arch_setup): New function.
7687 (the_low_target): Adjust.
7688 (initialize_low_arch): New function.
7689 * linux-sh-low.c (tdesc_sharch): Declare.
7690 (target_regsets): Rename to ...
7691 (sh_regsets): ... this, and make static.
7692 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7693 (sh_regs_info, sh_arch_setup): New functions.
7694 (the_low_target): Adjust.
7695 (initialize_low_arch): New function.
7696 * linux-bfin-low.c (tdesc_bfin): Declare.
7697 (bfin_arch_setup): New function.
7698 (bfin_usrregs_info, regs_info): New globals.
7699 (bfin_regs_info): New function.
7700 (the_low_target): Adjust.
7701 (initialize_low_arch): New function.
7702 * linux-cris-low.c (tdesc_cris): Declare.
7703 (cris_arch_setup): New function.
7704 (cris_usrregs_info, regs_info): New globals.
7705 (cris_regs_info): New function.
7706 (the_low_target): Adjust.
7707 (initialize_low_arch): New function.
7708 * linux-cris-low.c (tdesc_crisv32): Declare.
7709 (cris_arch_setup): New function.
7710 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7711 (cris_regs_info): New function.
7712 (the_low_target): Adjust.
7713 (initialize_low_arch): New function.
7714 * linux-m32r-low.c (tdesc_m32r): Declare.
7715 (m32r_arch_setup): New function.
7716 (m32r_usrregs_info, regs_info): New globals.
7717 (m32r_regs_info): Adjust.
7718 (initialize_low_arch): New function.
7719 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7720 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7721 (tic6x_usrregs_info): Forward declare.
7722 (tic6x_read_description): New function, based on ...
7723 (tic6x_arch_setup): ... this. Reimplement.
7724 (target_regsets): Rename to ...
7725 (tic6x_regsets): ... this, and make static.
7726 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7727 (tic6x_regs_info): New function.
7728 (the_low_target): Adjust.
7729 (initialize_low_arch): New function.
7730 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7731 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7732 (target_regsets): Rename to ...
7733 (xtensa_regsets): ... this, and make static.
7734 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7735 globals.
7736 (xtensa_arch_setup, xtensa_regs_info): New functions.
7737 (the_low_target): Adjust.
7738 (initialize_low_arch): New function.
7739 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7740 (nios2_arch_setup): Set the current process'es tdesc.
7741 (target_regsets): Rename to ...
7742 (nios2_regsets): ... this.
7743 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7744 (nios2_regs_info): New function.
7745 (the_low_target): Adjust.
7746 (initialize_low_arch): New function.
7747 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7748 (aarch64_arch_setup): Set the current process'es tdesc.
7749 (target_regsets): Rename to ...
7750 (aarch64_regsets): ... this.
7751 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7752 (aarch64_regs_info): New function.
7753 (the_low_target): Adjust.
7754 (initialize_low_arch): New function.
7755 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7756 globals.
7757 (target_regsets): Rename to ...
7758 (tile_regsets): ... this.
7759 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7760 (tile_regs_info): New function.
7761 (tile_arch_setup): Set the current process'es tdesc.
7762 (the_low_target): Adjust.
7763 (initialize_low_arch): New function.
7764 * spu-low.c (tdesc_spu): Declare.
7765 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7766 * win32-arm-low.c (tdesc_arm): Declare.
7767 (arm_arch_setup): New function.
7768 (the_low_target): Install arm_arch_setup instead of
7769 init_registers_arm.
7770 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7771 (init_windows_x86): Rename to ...
7772 (i386_arch_setup): ... this. Set `win32_tdesc'.
7773 (the_low_target): Adjust.
7774 * win32-low.c (win32_tdesc): New global.
7775 (child_add_thread): Don't create the thread cache here.
7776 (do_initial_child_stuff): Set the new process'es tdesc.
7777 * win32-low.h (struct target_desc): Forward declare.
7778 (win32_tdesc): Declare.
7779 * lynx-i386-low.c (tdesc_i386): Declare global.
7780 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7781 * lynx-low.c (lynx_tdesc): New global.
7782 (lynx_add_process): Set the new process'es tdesc.
7783 * lynx-low.h (struct target_desc): Forward declare.
7784 (lynx_tdesc): Declare global.
7785 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7786 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7787 * nto-low.c (nto_tdesc): New global.
7788 (do_attach): Set the new process'es tdesc.
7789 * nto-low.h (struct target_desc): Forward declare.
7790 (nto_tdesc): Declare.
7791 * nto-x86-low.c (tdesc_i386): Declare.
7792 (nto_x86_arch_setup): Set `nto_tdesc'.
7793
7794 2013-06-04 Gary Benson <gbenson@redhat.com>
7795
7796 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7797 to qSupported response when appropriate.
7798 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7799 with nonzero-length annex.
7800 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7801 arguments supplied in annex.
7802
7803 2013-05-31 Doug Evans <dje@google.com>
7804
7805 PR server/15594
7806 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7807 64 bits in 64-cross-32 environment.
7808
7809 2013-05-28 Pedro Alves <palves@redhat.com>
7810
7811 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7812 (aarch64-without-fpu.c): Delete rule.
7813 * configure.srv (aarch64*-*-linux*): Remove references to
7814 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7815 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7816 declaration.
7817
7818 2013-05-24 Pedro Alves <palves@redhat.com>
7819
7820 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7821 instead of strchr/decode_address. Error if the range isn't split
7822 with a ','. Don't assume there's be a ':' in the action.
7823
7824 2013-05-23 Yao Qi <yao@codesourcery.com>
7825 Pedro Alves <palves@redhat.com>
7826
7827 * linux-low.c (lwp_in_step_range): New function.
7828 (linux_wait_1): If the thread was range stepping and stopped
7829 outside the stepping range, report the stop to GDB. Otherwise,
7830 continue stepping. Add range stepping debug output.
7831 (linux_set_resume_request): Copy the step range from the resume
7832 request to the lwp.
7833 (linux_supports_range_stepping): New.
7834 (linux_target_ops) <supports_range_stepping>: Set to
7835 linux_supports_range_stepping.
7836 * linux-low.h (struct linux_target_ops)
7837 <supports_range_stepping>: New field.
7838 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7839 * linux-x86-low.c (x86_supports_range_stepping): New.
7840 (the_low_target) <supports_range_stepping>: Set to
7841 x86_supports_range_stepping.
7842 * server.c (handle_v_cont): Handle 'r' action.
7843 (handle_v_requests): Append ";r" if the target supports range
7844 stepping.
7845 * target.h (struct thread_resume) <step_range_start,
7846 step_range_end>: New fields.
7847 (struct target_ops) <supports_range_stepping>:
7848 New field.
7849 (target_supports_range_stepping): New macro.
7850
7851 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7852
7853 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7854 confusion in comment.
7855
7856 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7857
7858 * lynx-low.c (struct process_info_private): New type.
7859 (lynx_add_process): New function.
7860 (lynx_create_inferior, lynx_attach): Replace calls to
7861 add_process by calls to lynx_add_process.
7862 (lynx_resume): If PTID is null, then try using
7863 current_process()->private->last_wait_event_ptid.
7864 Add comments.
7865 (lynx_clear_inferiors): Delete. The contents of that function
7866 has been inlined in lynx_mourn;
7867 (lynx_wait_1): Save the ptid in the process's private data.
7868 (lynx_mourn): Free the process' private data. Replace call
7869 to lynx_clear_inferiors by call to clear_inferiors.
7870
7871 2013-05-17 Yao Qi <yao@codesourcery.com>
7872
7873 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7874 the right place.
7875
7876 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7877
7878 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7879 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7880 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7881 PT_TEXT_END_ADDR guards. Update comments.
7882 (linux_target_op) <read_offsets>: Conditionally define to
7883 linux_read_offsets if the target is UCLIBC and if it defines
7884 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7885
7886 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7887 Andrew Jenner <andrew@codesourcery.com>
7888
7889 * Makefile.in (SFILES): Add linux-nios2-low.c.
7890 (clean): Add action to delete nios2-linux.c.
7891 (nios2-linux.c): New rule.
7892 * configure.srv: Add nios2*-*-linux*.
7893 * linux-nios2-low.c: New.
7894
7895 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7896
7897 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7898
7899 2013-04-25 Hui Zhu <hui@codesourcery.com>
7900
7901 PR gdb/15186
7902 * ax.c (ax_printf): Add fflush.
7903
7904 2013-04-22 Tom Tromey <tromey@redhat.com>
7905
7906 * Makefile.in (SFILES): Add filestuff.c.
7907 (OBS): Add filestuff.o.
7908 (filestuff.o): New target.
7909 * config.in, configure: Rebuild.
7910 * configure.ac: Check for fdwalk, pipe2.
7911
7912 2013-04-17 Pedro Alves <palves@redhat.com>
7913
7914 * configure.ac (USE_THREAD_DB): Delete variable.
7915 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7916 Don't AC_SUBST USE_THREAD_DB.
7917 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7918 * config.in, configure: Regenerate.
7919
7920 2013-04-16 Pedro Alves <palves@redhat.com>
7921
7922 * linux-low.h (struct lwp_info) <thread_known>: Move under
7923 the USE_THREAD_DB #ifdef.
7924
7925 2013-04-16 Pedro Alves <palves@redhat.com>
7926
7927 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7928 (linux-low.o): Delete rule.
7929 * linux-low.h: Always include "gdb_thread_db.h" instead of
7930 conditionally including thread_db.h.
7931 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7932 HAVE_THREAD_DB_H.
7933
7934 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7935
7936 * Makefile.in (install-only): Fix make install regression.
7937
7938 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7939
7940 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7941 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7942 installation.
7943 * gdbserver.1: Remove.
7944
7945 2013-03-22 Pedro Alves <palves@redhat.com>
7946
7947 * linux-low.c (handle_extended_wait): Don't call
7948 linux_enable_event_reporting.
7949
7950 2013-03-15 Tony Theodore <tonyt@logyst.com>
7951
7952 PR build/9098:
7953 * Makefile.in (SHELL): Use @SHELL@.
7954
7955 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7956
7957 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7958 compiler warning.
7959
7960 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7961
7962 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7963 Remove extraneous NULL element.
7964
7965 2013-03-13 Yao Qi <yao@codesourcery.com>
7966
7967 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7968 'V' block in trace frame.
7969
7970 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7971
7972 * target.h (struct target_ops): Add btrace ops.
7973 (target_supports_btrace): New macro.
7974 (target_enable_btrace): New macro.
7975 (target_disable_btrace): New macro.
7976 (target_read_btrace): New macro.
7977 * gdbthread.h (struct thread_info): Add btrace field.
7978 * server.c: Include btrace-common.h.
7979 (handle_btrace_general_set): New function.
7980 (handle_btrace_enable): New function.
7981 (handle_btrace_disable): New function.
7982 (handle_general_set): Call handle_btrace_general_set.
7983 (handle_qxfer_btrace): New function.
7984 (struct qxfer qxfer_packets[]): Add btrace entry.
7985 * inferiors.c (remove_thread): Disable btrace.
7986 * linux-low: Include linux-btrace.h.
7987 (linux_low_enable_btrace): New function.
7988 (linux_low_read_btrace): New function.
7989 (linux_target_ops): Add btrace ops.
7990 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7991 Add srv_linux_btrace=yes.
7992 (x86_64-*-linux*): Add linux-btrace.o.
7993 Add srv_linux_btrace=yes.
7994 * configure.ac: Define HAVE_LINUX_BTRACE.
7995 * config.in: Regenerated.
7996 * configure: Regenerated.
7997
7998 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7999
8000 * server.c (handle_qxfer): Preserve error message if -3 is
8001 returned.
8002 (qxfer): Document the -3 return value.
8003
8004 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8005
8006 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8007 (linux_btrace_h): New variable.
8008 (linux-btrace.o): New rule.
8009
8010 2013-03-08 Stan Shebs <stan@codesourcery.com>
8011 Hafiz Abid Qadeer <abidh@codesourcery.com>
8012
8013 * tracepoint.c (trace_buffer_size): New global.
8014 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8015 (init_trace_buffer): Change to one-argument function. Allocate
8016 trace buffer memory.
8017 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8018 handle QTBuffer:size packet.
8019 (cmd_bigqtbuffer_size): New function.
8020 (initialize_tracepoint): Call init_trace_buffer with
8021 DEFAULT_TRACE_BUFFER_SIZE.
8022 * server.c (handle_query): Add QTBuffer:size in the
8023 supported packets.
8024
8025 2013-03-07 Yao Qi <yao@codesourcery.com>
8026
8027 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8028 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8029 of -1.
8030 (cmd_qtsp): Adjust condition. Do post increment.
8031 Set cur_action and cur_step_action back to 0.
8032
8033 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8034
8035 PR server/15236
8036 * linux-low.c (linux_write_memory): Return early success if LEN is
8037 zero.
8038
8039 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8040
8041 * configure.srv: Add x86_64-*-cygwin* as target.
8042
8043 2013-02-28 Tom Tromey <tromey@redhat.com>
8044
8045 * configure.ac: Invoke AC_SYS_LARGEFILE.
8046 * configure, config.in: Rebuild.
8047
8048 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8049
8050 * win32-low.c: Throughout, fix format strings and casts of
8051 printf-like functions to avoid type related warnings on all
8052 platforms.
8053 (get_child_debug_event): Print dwDebugEventCode as hex since
8054 that's how it's usually documented.
8055
8056 2013-02-28 Yao Qi <yao@codesourcery.com>
8057
8058 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8059 pulongest.
8060
8061 2013-02-27 Jiong Wang <jiwang@tilera.com>
8062
8063 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8064 (reg-tilegx32.c): New rule.
8065 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8066 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8067 different register info initializer according to elf class.
8068 (init_registers_tilgx32): New function. The tilegx32 register info
8069 initializer.
8070 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8071 (tile_store_gregset): Likewise.
8072
8073 2013-02-27 Yao Qi <yao@codesourcery.com>
8074
8075 * server.c (process_point_options): Print debug message when
8076 debug_threads is true.
8077
8078 2013-02-26 Yao Qi <yao@codesourcery.com>
8079
8080 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8081
8082 2013-02-19 Pedro Alves <palves@redhat.com>
8083 Kai Tietz <ktietz@redhat.com>
8084
8085 PR gdb/15161
8086
8087 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8088 instead of strtoul to extract address from packet.
8089 (process_serial_event) <'z'>: Likewise.
8090
8091 2013-02-18 Yao Qi <yao@codesourcery.com>
8092
8093 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8094
8095 2013-02-14 Pedro Alves <palves@redhat.com>
8096
8097 Plug memory leak.
8098
8099 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8100 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8101
8102 2013-02-14 Pedro Alves <palves@redhat.com>
8103
8104 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8105
8106 2013-02-14 Pedro Alves <palves@redhat.com>
8107
8108 * tracepoint.c (save_string): Delete.
8109 (add_tracepoint_action): Use savestring instead of save_string.
8110
8111 2013-02-12 Pedro Alves <palves@redhat.com>
8112
8113 * linux-xtensa-low.c: Ditto.
8114 * xtensa-xtregs.c: Ditto.
8115
8116 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8117
8118 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8119 thread_db.
8120
8121 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8122
8123 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8124 aarch64_num_wp_regs and aarch64_num_bp_regs to
8125 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8126
8127 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8128
8129 * linux-aarch64-low.c (ps_get_thread_area): Replace
8130 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8131
8132 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8133 Marcus Shawcroft <marcus.shawcroft@arm.com>
8134 Nigel Stephens <nigel.stephens@arm.com>
8135 Yufeng Zhang <yufeng.zhang@arm.com>
8136
8137 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8138 (aarch64.c, aarch64-without-fpu.c): New targets.
8139 * configure.srv (aarch64*-*-linux*): New.
8140 * linux-aarch64-low.c: New file.
8141
8142 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8143
8144 * linux-low.c (handle_extended_wait, linux_create_inferior)
8145 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8146 (dequeue_one_deferred_signal, linux_resume_one_thread)
8147 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8148 (linux_tracefork_grandchild, linux_test_for_tracefork)
8149 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8150 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8151 where the argument is 0.
8152
8153 2013-01-25 Yao Qi <yao@codesourcery.com>
8154
8155 * event-loop.c: Include "queue.h".
8156 (gdb_event_p): New typedef.
8157 (struct gdb_event) <next_event>: Remove.
8158 (event_queue): Change to QUEUE(gdb_event_p).
8159 (async_queue_event): Remove.
8160 (gdb_event_xfree): New.
8161 (initialize_event_loop): New.
8162 (process_event): Use API from QUEUE.
8163 (wait_for_event): Likewise.
8164 * server.c (main): Call initialize_event_loop.
8165 * server.h (initialize_event_loop): Declare.
8166
8167 2013-01-18 Yao Qi <yao@codesourcery.com>
8168
8169 * ax.h (struct eval_agent_expr_context): New.
8170 (gdb_eval_agent_expr): Update declaration.
8171 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8172 TFRAME. Add new argument CTX.
8173 * server.h (struct eval_agent_expr_context): Declare.
8174 (agent_mem_read, agent_tsv_read): Update declaration.
8175 (agent_mem_read_string): Likewise.
8176 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8177 (add_traceframe_block): Add new argument TPOINT.
8178 Increase TPOINT->traceframe_usage.
8179 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8180 eval_tracepoint_agent_expr.
8181 (condition_true_at_tracepoint): Likewise.
8182 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8183 (agent_mem_read_string, agent_tsv_read): Likewise.
8184
8185 2013-01-16 Yao Qi <yao@codesourcery.com>
8186
8187 * linux-low.c (linux_resume_one_lwp): Don't check
8188 'lwp->bp_reinsert != 0'.
8189
8190 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8191 Pedro Alves <palves@redhat.com>
8192
8193 * lynx-low.c (ptrace_request_to_str): Define a temporary
8194 macro and use it to simplify this function's implementation.
8195
8196 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8197
8198 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8199 sets errno.
8200
8201 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8202
8203 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8204
8205 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8206
8207 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8208
8209 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8210
8211 * lynx-low.c (lynx_resume): Use the resume_info parameter
8212 to determine the ptid for the lynx_ptrace call, unless
8213 it is equal to minus_one_ptid, in which case we use the
8214 ptid of the current_inferior.
8215 (lynx_wait_1): After having received a thread create/exit
8216 event, resume the inferior's execution using the signaling
8217 thread's ptid, rather than the old ptid.
8218
8219 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8220
8221 * lynx-low.c (lynx_resume): Delete variable ret.
8222
8223 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8224
8225 * gdbreplay.c (gdbreplay_version): Update copyright year.
8226 * server.c (gdbserver_version): Likewise.
8227
8228 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8229
8230 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8231 new thread.
8232
8233 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8234
8235 * lynx-low.c (ptrace_request_to_str): Add handling for
8236 PTRACE_GETTRACESIG.
8237
8238 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8239
8240 * lynx-low.c (lynx_attach): Delete variable new_process.
8241
8242 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8243
8244 * lynx-low.c (lynx_create_inferior): Delete variable
8245 new_process.
8246
8247 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8248
8249 * lynx-low.c (ptrace_request_to_str): Do not handle
8250 PTRACE_GETTHREADLIST if this macro does not exist.
8251
8252 2012-12-15 Yao Qi <yao@codesourcery.com>
8253
8254 * Makefile.in (OBS): Add notif.o.
8255 * notif.c, notif.h: New.
8256 * server.c: Include "notif.h".
8257 (struct vstop_notif) <next>: Remove.
8258 <base>: New field.
8259 (queue_stop_reply): Update.
8260 (push_event, send_next_stop_reply): Remove.
8261 (discard_queued_stop_replies): Update.
8262 (notif_stop): New variable.
8263 (handle_v_stopped): Remove.
8264 (handle_v_requests): Don't call handle_v_stopped. Call
8265 handle_ack_notif instead.
8266 (queue_stop_reply_callback): Call notif_event_enque instead
8267 of queue_stop_reply.
8268 (handle_status): Don't call send_next_stop_reply, call
8269 notif_write_event instead.
8270 (kill_inferior_callback): Likewise.
8271 (detach_or_kill_inferior_callback): Likewise.
8272 (main): Call initialize_notif.
8273 (process_serial_event): Call QUEUE_is_empty.
8274 (handle_target_event): Call notif_push instead of push event.
8275 * server.h (push_event): Remove declaration.
8276
8277 2012-12-10 Tom Tromey <tromey@redhat.com>
8278
8279 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8280 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8281 macros.
8282 (.c.o): Rewrite.
8283 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8284 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8285 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8286 (amd64-linux-ipa.o, ax.o): Rewrite.
8287 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8288 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8289 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8290 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8291 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8292 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8293 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8294 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8295 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8296 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8297 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8298 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8299 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8300 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8301 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8302 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8303 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8304 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8305 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8306 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8307 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8308 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8309 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8310 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8311 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8312 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8313 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8314 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8315 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8316 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8317 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8318 (reg-tilegx.o): Remove.
8319 (all_object_files): New macro.
8320 Include .deps files.
8321 * aclocal.m4, configure: Rebuild.
8322 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8323 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8324 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8325
8326 2012-12-05 Tom Tromey <tromey@redhat.com>
8327
8328 PR gdb/14917:
8329 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8330
8331 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8332
8333 * configure.ac: Check for linux/perf_event.h.
8334 * config.in: Regenerated.
8335 * configure: Regenerated.
8336
8337 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8338
8339 * hostio.c (handle_readlink): Decrease buffer size
8340 parameter passed to readlink by one byte.
8341
8342 2012-11-26 Yao Qi <yao@codesourcery.com>
8343
8344 * configure.ac (build_warnings): Append '-Wempty-body'.
8345 * configure: Regenerated.
8346 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8347 body.
8348
8349 2012-11-15 Pierre Muller <muller@sourceware.org>
8350
8351 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8352 * config.in: Regenerate.
8353 * configure: Regenerate.
8354 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8355 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8356 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8357 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8358 header.
8359 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8360 instead of <sys/wait.h> header.
8361 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8362
8363 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8364
8365 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8366 (various make rules): Remove -DGDBSERVER
8367
8368 2012-11-09 Yao Qi <yao@codesourcery.com>
8369
8370 * spu-low.c (current_ptid): Move it to ..
8371 * gdbthread.h: ... here. New.
8372 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8373 * server.c (myresume, process_serial_event): Likewise.
8374 * thread-db.c (thread_db_find_new_threads): Likewise.
8375 * tracepoint.c (run_inferior_command): Likewise.
8376
8377 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8378
8379 * server.c (handle_search_memory_1): Include access length in
8380 warning message.
8381
8382 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8383
8384 * linux-crisv32-low.c: Fix compile errors.
8385
8386 2012-09-04 Yao Qi <yao@codesourcery.com>
8387
8388 * tracepoint.c (cmd_qtsv): Adjust debug message.
8389 Don't check CUR_TPOINT.
8390
8391 2012-08-28 Yao Qi <yao@codesourcery.com>
8392
8393 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8394 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8395 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8396 Remove declarations of xmalloc, xreallloc, xstrdup and
8397 freeargv.
8398 * Makefile.in (libiberty_h): New.
8399 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8400 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8401
8402 2012-08-23 Yao Qi <yao@codesourcery.com>
8403
8404 * server.h: Remove declaration of 'xsnprintf'.
8405
8406 2012-08-22 Keith Seitz <keiths@redhat.com>
8407
8408 * server.h: Include build-gnulib-gbserver/config.h.
8409 * gdbreplay.c: Likewise.
8410
8411 2012-08-08 Doug Evans <dje@google.com>
8412
8413 * Makefile.in (SFILES): Add gdb_vecs.c.
8414 (OBS): Add gdb_vecs.o.
8415 (gdb_vecs_h, host_defs_h): New variables.
8416 (thread-db.o): Add $(gdb_vecs_h) dependency.
8417 (gdb_vecs.o): New rule.
8418 * thread-db.c: #include "gdb_vecs.h".
8419 (thread_db_load_search): Use a vector to iterate over path elements.
8420 Handle text appearing after "$pdir".
8421
8422 * configure.ac: Add check for strstr.
8423 * config.in: Regenerate.
8424 * configure: Regenerate.
8425
8426 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8427
8428 * hostio.c (handle_pread): If pread fails, fall back to attempting
8429 lseek/read.
8430 (handle_pwrite): Likewise for pwrite.
8431
8432 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8433
8434 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8435 between unsupported TYPE and unimplementable ADDR/LEN combination.
8436 (arm_insert_point): Act on new return value.
8437
8438 2012-07-31 Pedro Alves <palves@redhat.com>
8439
8440 * server.c (process_point_options): Only skip tokens if we find
8441 one that is unrecognized. Don't treat 'X' specially while
8442 skipping unrecognized tokens.
8443
8444 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8445
8446 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8447 to 4-byte-align HW breakpoint addresses for Thumb.
8448
8449 2012-07-27 Yao Qi <yao@codesourcery.com>
8450
8451 PR remote/14161.
8452
8453 * server.h: Declare gdb_agent_about_to_close.
8454 * target.c (kill_inferior): Include "agent.h".
8455 New. Send command 'kill'.
8456 * target.h (kill_inferior): Removed macro.
8457 * tracepoint.c (gdb_agent_about_to_close): New.
8458 (gdb_agent_helper_thread): Handle command 'close'.
8459 Wait endlessly until the inferior stops.
8460 Install gdb_agent_remove_socket to atexit hook.
8461 (agent_socket_name): New static variable.
8462 (gdb_agent_socket_init): Replace local variable 'name' with
8463 'agent_socket_name'.
8464 (gdb_agent_remove_socket): New.
8465
8466 2012-07-27 Yao Qi <yao@codesourcery.com>
8467
8468 * server.c (process_point_options): Stop at 'X' when parsing.
8469
8470 2012-07-19 Michael Eager <eager@eagercon.com>
8471
8472 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8473 to hw_execute.
8474 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8475 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8476 hardware breakpoint.
8477
8478 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8479
8480 * gdbserver/linux-low.c (initialize_low): Call
8481 linux_ptrace_init_warnings.
8482
8483 2012-07-02 Doug Evans <dje@google.com>
8484
8485 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8486 pointer to int.
8487
8488 2012-07-02 Stan Shebs <stan@codesourcery.com>
8489
8490 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8491 (ax.o): Add it to build rule.
8492 (ax-ipa.o): Ditto.
8493 (OBS): Add format.o.
8494 (IPA_OBS): Add format.o.
8495 * server.c (handle_query): Claim support for breakpoint commands.
8496 (process_point_options): Add command case.
8497 (process_serial_event): Leave running if there are printfs in
8498 effect.
8499 * mem-break.h (any_persistent_commands): Declare.
8500 (add_breakpoint_commands): Declare.
8501 (gdb_no_commands_at_breakpoint): Declare.
8502 (run_breakpoint_commands): Declare.
8503 * mem-break.c (struct point_command_list): New struct.
8504 (struct breakpoint): New field command_list.
8505 (any_persistent_commands): New function.
8506 (add_commands_to_breakpoint): New function.
8507 (add_breakpoint_commands): New function.
8508 (gdb_no_commands_at_breakpoint): New function.
8509 (run_breakpoint_commands): New function.
8510 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8511 locally.
8512 * ax.c: Include format.h.
8513 (ax_printf): New function.
8514 (gdb_eval_agent_expr): Add printf opcode.
8515
8516 2012-06-13 Yao Qi <yao@codesourcery.com>
8517
8518 * server.c (start_inferior): Remove duplicated writes to fields
8519 'last_resume_kind' and 'last_status' of 'current_inferior'.
8520
8521 2012-06-12 Yao Qi <yao@codesourcery.com>
8522 Pedro Alves <palves@redhat.com>
8523
8524 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8525 comment.
8526 * server.c (handle_v_cont): Extend comment.
8527
8528 2012-06-11 Yao Qi <yao@codesourcery.com>
8529
8530 * linux-low.c (linux_attach): Add 'static'.
8531
8532 2012-06-06 Yao Qi <yao@codesourcery.com>
8533
8534 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8535
8536 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8537
8538 Fix gcc -flto compilation warning.
8539 * server.c (main): Make variable multi_mode and attach volatile.
8540
8541 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8542
8543 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8544 if the platform doesn't know about it.
8545
8546 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8547
8548 * Makefile.in (SFILES): Add linux-tile-low.c.
8549 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8550 * configure.srv: Handle tilegx-*-linux*.
8551 * linux-tile-low.c: New file.
8552
8553 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8554
8555 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8556
8557 2012-05-24 Pedro Alves <palves@redhat.com>
8558
8559 PR gdb/7205
8560
8561 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8562
8563 2012-05-24 Pedro Alves <palves@redhat.com>
8564
8565 PR gdb/7205
8566
8567 Replace target_signal with gdb_signal throughout.
8568
8569 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8570
8571 * linux-low.c (linux_store_registers): Avoid the copying sequence
8572 when no data has been retrieved by ptrace.
8573
8574 2012-05-22 Will Deacon <will.deacon@arm.com>
8575
8576 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8577 Include asm/ptrace.h.
8578 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8579 already defined.
8580
8581 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8582
8583 * linux-low.c (linux_store_registers): Don't re-retrieve data
8584 with ptrace that has already been obtained from /proc. Always
8585 copy any data retrieved with ptrace to the buffer supplied.
8586
8587 2012-05-11 Yao Qi <yao@codesourcery.com>
8588 Pedro Alves <palves@redhat.com>
8589
8590 * linux-low.c (enum stopping_threads_kind): New.
8591 (stopping_threads): Change type to `enum stopping_threads_kind'.
8592 (handle_extended_wait): If stopping and suspending threads, leave
8593 the new_lwp suspended too.
8594 (linux_wait_for_event): Adjust.
8595 (stop_all_lwps): Set `stopping_threads' to
8596 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8597 whether we're suspending threads or just stopping them. Assert no
8598 recursion happens.
8599
8600 2012-04-29 Yao Qi <yao@codesourcery.com>
8601
8602 * server.h: Move some code to ...
8603 * gdbthread.h: ... here. New.
8604 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8605 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8606 (nto-low.o, win32-low.o): Likewise.
8607 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8608 * regcache.c, remote-utils.c, server.c: Likewise.
8609 * target.c, tracepoint.c, win32-low.c: Likewise.
8610
8611 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8612
8613 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8614 (PTRACE_ARG4_TYPE): Likewise.
8615 (PTRACE_XFER_TYPE): Likewise.
8616 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8617 ptrace to PTRACE_ARG3_TYPE.
8618 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8619 (PTRACE_ARG4_TYPE): Likewise.
8620 (PTRACE_XFER_TYPE): Likewise.
8621 (linux_detach_one_lwp): Cast fourth argument of
8622 ptrace to long then PTRACE_ARG4_TYPE.
8623 (regsets_fetch_inferior_registers): Cast third argument of
8624 ptrace to long then PTRACE_ARG3_TYPE.
8625 (regsets_store_inferior_registers): Likewise.
8626
8627 2012-04-20 Pedro Alves <palves@redhat.com>
8628
8629 * configure: Regenerate.
8630
8631 2012-04-19 Pedro Alves <palves@redhat.com>
8632
8633 * Makefile.in (GNULIB_BUILDDIR): New.
8634 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8635 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8636 (all, install-only, uninstall, clean-info, all-lib, clean): No
8637 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8638 (maintainer-clean realclean distclean): Use subdir_do.
8639 (subdir_do): New.
8640 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8641 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8642 * acinclude.m4: Include acx_configure_dir.m4.
8643 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8644 calls. Call AC_PROG_RANLIB. Configure gnulib using
8645 ACX_CONFIGURE_DIR.
8646 (GNULIB): New.
8647 (GNULIB_STDINT_H): Adjust.
8648 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8649 * gdbreplay.c: Include build-gnulib/config.h.
8650 * server.h: Likewise.
8651 * aclocal.m4: Regenerate.
8652 * config.in: Regenerate.
8653 * configure: Regenerate.
8654
8655 2012-04-19 Pedro Alves <palves@redhat.com>
8656
8657 * Makefile.in (LIBGNU, INCGNU): Adjust.
8658 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8659 (all, install-only, uninstall, clean-info, all-lib, clean)
8660 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8661 * configure.ac: Adjust AC_OUTPUT output.
8662 * aclocal.m4: Regenerate.
8663 * configure: Regenerate.
8664
8665 2012-04-19 Pedro Alves <palves@redhat.com>
8666
8667 * Makefile.in (generated_files): New.
8668 (server_h): Remove the explicit dependency on config.h, and depend
8669 on $generated_files.
8670
8671 2012-04-19 Pedro Alves <palves@redhat.com>
8672
8673 * Makefile.in (INCGNU): Add -Ignulib.
8674
8675 2012-04-19 Pedro Alves <palves@redhat.com>
8676
8677 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8678 (INCGNU): ... this, and spell out -I here.
8679 (GNULIB_LIB): Rename to ...
8680 (LIBGNU): ... this.
8681 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8682
8683 2012-04-19 Pedro Alves <palves@redhat.com>
8684
8685 * config.in: Regenerate.
8686
8687 2012-04-19 Pedro Alves <palves@redhat.com>
8688
8689 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8690 * server.h (memmem): Remove declaration.
8691 * config.in: Regenerate.
8692 * configure: Regenerate.
8693
8694 2012-04-19 Yao Qi <yao@codesourcery.com>
8695
8696 * Makefile.in (SFILES): Add common/vec.c.
8697 (OBS): Add vec.o.
8698 (vec.o): New rule.
8699
8700 2012-04-19 Yao Qi <yao@codesourcery.com>
8701
8702 * remote-utils.c (prepare_resume_reply): Replace with macro
8703 target_core_of_thread.
8704 * server.c (handle_qxfer_threads_proper): Likewise.
8705 * target.h (traget_core_of_thread): New macro.
8706
8707 2012-04-18 Pedro Alves <palves@redhat.com>
8708
8709 * aclocal.m4: Regenerate.
8710 * configure: Regenerate.
8711
8712 2012-04-16 Yao Qi <yao@codesourcery.com>
8713
8714 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8715 duplicated on address.
8716
8717 2012-04-16 Yao Qi <yao@codesourcery.com>
8718
8719 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8720 (struct tracepoint_action_ops) <send>: New field.
8721 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8722 (agent_expr_send, x_tracepoint_action_send): New.
8723 (l_tracepoint_action_send): New.
8724 (cmd_qtdp): Download and install tracepoint
8725 according to `use_agent'.
8726 (run_inferior_command): Add one more parameter `len'.
8727 Update callers.
8728 (tracepoint_send_agent): New.
8729 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8730
8731 2012-04-16 Yao Qi <yao@codesourcery.com>
8732
8733 * tracepoint.c (download_tracepoints): Moved to ...
8734 (cmd_qtstart): ... here.
8735
8736 2012-04-14 Yao Qi <yao@codesourcery.com>
8737
8738 * tracepoint.c: Include inttypes.h.
8739 (struct collect_memory_action): Use sized types.
8740 (struct tracepoint): Likewise.
8741 (cmd_qtdp, stop_tracing): Update print specifiers.
8742 (cmd_qtp, response_tracepoint): Likewise.
8743 (collect_data_at_tracepoint): Likewise.
8744 (collect_data_at_step): Likewise.
8745
8746 2012-04-14 Yao Qi <yao@codesourcery.com>
8747
8748 Import gnulib module inttypes.
8749 * aclocal.m4, config.in, configure: Regenerated.
8750
8751 2012-04-14 Yao Qi <yao@codesourcery.com>
8752
8753 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8754 Makefile and config.status at last.
8755
8756 2012-04-13 Yao Qi <yao@codesourcery.com>
8757
8758 * tracepoint.c: Include stdint.h unconditionally.
8759
8760 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8761
8762 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8763 on BFD_HAVE_SYS_PROCFS_TYPE.
8764 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8765 * configure: Regenerate.
8766 * config.in: Likewise.
8767
8768 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8769
8770 * Makefile.in (clean): Also remove x32.c x32-linux.c
8771 x32-avx.c x32-avx-linux.c.
8772 (x32.o): New target.
8773 (x32.c): Likewise.
8774 (x32-linux.o): Likewise.
8775 (x32-linux.c): Likewise.
8776 (x32-avx.o): Likewise.
8777 (x32-avx.c): Likewise.
8778 (x32-avx-linux.o): Likewise.
8779 (x32-avx-linux.c): Likewise.
8780
8781 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8782 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8783 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8784 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8785 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8786 i386/x32-avx-linux.xml.
8787
8788 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8789 (init_registers_x32_avx_linux): Likwise.
8790 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8791 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8792
8793 2012-04-13 Pedro Alves <palves@redhat.com>
8794
8795 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8796 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8797 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8798 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8799 the sub-make.
8800
8801 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8802
8803 * linux-x86-low.c (compat_x32_clock_t): New.
8804 (compat_x32_siginfo_t): Likewise.
8805 (compat_x32_siginfo_from_siginfo): Likewise.
8806 (siginfo_from_compat_x32_siginfo): Likewise.
8807 (linux_is_elf64): Likewise.
8808 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8809 and siginfo_from_compat_x32_siginfo for x32.
8810 (x86_arch_setup): Set linux_is_elf64.
8811
8812 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8813
8814 PR gdb/13969
8815 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8816 e_machine field.
8817 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8818 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8819 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8820 compatible with process.
8821
8822 2012-04-12 Yao Qi <yao@codesourcery.com>
8823
8824 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8825 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8826 (install-only, install-info, clean): Handle sub dir gnulib.
8827 (all-lib, am--refresh): New targets.
8828 (memmem.o): Remove target.
8829 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8830 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8831 (AC_REPLACE_FUNCS): Remove memmem.
8832 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8833 (AC_OUTPUT): Generate Makefile in gnulib/.
8834 * aclocal.m4, config.in, configure: Regenerated.
8835
8836 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8837
8838 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8839
8840 2012-04-05 Pedro Alves <palves@redhat.com>
8841
8842 -Werror=strict-aliasing
8843
8844 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8845 pointer.
8846
8847 2012-04-04 Pedro Alves <palves@redhat.com>
8848
8849 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8850 (sparc_store_gregset_from_stack, sparc_store_gregset)
8851 (sparc_breakpoint_at): Fix formatting.
8852
8853 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8854
8855 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8856 are available.
8857 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8858 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8859 * config.in: Regenerate.
8860 * configure: Likewise.
8861
8862 2012-03-29 Pedro Alves <palves@redhat.com>
8863
8864 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8865 Correct ptrace arguments.
8866
8867 2012-03-28 Pedro Alves <palves@redhat.com>
8868
8869 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8870 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8871 (IA64_FR1_REGNUM): New defines.
8872 (ia64_fetch_register): New.
8873 (the_low_target): Install it.
8874 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8875 field.
8876 * linux-low.c (linux_fetch_registers): Try the
8877 the_low_target.fetch_register hook first.
8878
8879 * linux-arm-low.c (the_low_target): Adjust.
8880 * linux-bfin-low.c (the_low_target): Adjust.
8881 * linux-cris-low.c (the_low_target): Adjust.
8882 * linux-crisv32-low.c (the_low_target): Adjust.
8883 * linux-m32r-low.c (the_low_target): Adjust.
8884 * linux-m68k-low.c (the_low_target): Adjust.
8885 * linux-mips-low.c (the_low_target): Adjust.
8886 * linux-ppc-low.c (the_low_target): Adjust.
8887 * linux-s390-low.c (the_low_target): Adjust.
8888 * linux-sh-low.c (the_low_target): Adjust.
8889 * linux-sparc-low.c (the_low_target): Adjust.
8890 * linux-tic6x-low.c (the_low_target): Adjust.
8891 * linux-x86-low.c (the_low_target): Adjust.
8892 * linux-xtensa-low.c (the_low_target): Adjust.
8893
8894 2012-03-26 Pedro Alves <palves@redhat.com>
8895
8896 * server.c (handle_qxfer_libraries): Don't bail early if
8897 the_target->qxfer_libraries_svr4 is not NULL.
8898
8899 2012-03-26 Pedro Alves <palves@redhat.com>
8900
8901 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8902
8903 2012-03-23 Pedro Alves <palves@redhat.com>
8904
8905 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8906 "library-list-svr4" element's start tag when the the DSO list is
8907 empty.
8908
8909 2012-03-23 Pedro Alves <palves@redhat.com>
8910
8911 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8912 a variable whose type size is the same as the inferior's pointer
8913 size.
8914
8915 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8916
8917 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8918 struct siginfo.
8919 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8920 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8921 * linux-low.h: Include <signal.h>.
8922 (struct siginfo): Remove forward declaration.
8923 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8924 struct siginfo.
8925
8926 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8927
8928 * .gitignore: Ignore more files.
8929
8930 2012-03-19 Pedro Alves <palves@redhat.com>
8931 Jan Kratochvil <jan.kratochvil@redhat.com>
8932
8933 * server.c (cont_thread, general_thread): Add describing comments.
8934 (start_inferior): Clear `cont_thread'.
8935 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8936 of a process.
8937
8938 2012-03-15 Yao Qi <yao@codesourcery.com>
8939
8940 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8941 handling to ...
8942 (cmd_qtdp): ... here.
8943
8944 2012-03-15 Yao Qi <yao@codesourcery.com>
8945
8946 * tracepoint.c (struct tracepoint_action_ops): New.
8947 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8948 (m_tracepoint_action_download): New.
8949 (r_tracepoint_action_download): New.
8950 (x_tracepoint_action_download): New.
8951 (l_tracepoint_action_download): New.
8952 (add_tracepoint_action): Install `action->ops' according type.
8953 (download_tracepoint_1): Move code `download' function pointer
8954 of various tracepoint_action_ops.
8955
8956 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8957
8958 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8959 linux_ptrace_attach_warnings.
8960
8961 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8962
8963 * Makefile.in (linux-ptrace.o): New.
8964 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8965 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8966 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8967 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8968 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8969 of these targets.
8970 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8971
8972 2012-03-08 Yao Qi <yao@codesourcery.com>
8973 Pedro Alves <palves@redhat.com>
8974
8975 Fix PR server/13392.
8976 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8977 offset of JMP insn.
8978 * tracepoint.c (remove_tracepoint): New.
8979 (cmd_qtdp): Call remove_tracepoint when failed to install.
8980
8981 2012-03-07 Pedro Alves <palves@redhat.com>
8982
8983 * linux-low.c (get_detach_signal): New.
8984 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8985 Pass on pending signals to PTRACE_DETACH. Check the result of the
8986 ptrace call.
8987 * server.c (program_signals, program_signals_p): New.
8988 (handle_general_set): Handle QProgramSignals.
8989 * server.h (program_signals, program_signals_p): Declare.
8990
8991 2012-03-05 Pedro Alves <palves@redhat.com>
8992 Jan Kratochvil <jan.kratochvil@redhat.com>
8993
8994 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8995 New comment why.
8996
8997 2012-03-03 Yao Qi <yao@codesourcery.com>
8998
8999 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9000 agent_look_up_symbols.
9001
9002 2012-03-03 Yao Qi <yao@codesourcery.com>
9003
9004 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9005 (linux-x86-low.o): Likewise.
9006 * server.h: Remove in_process_agent_loaded.
9007 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9008 common/agent.c.
9009 Update callers.
9010
9011 2012-03-03 Yao Qi <yao@codesourcery.com>
9012
9013 * tracepoint.c (gdb_agent_capability): New global.
9014 (in_process_agent_loaded_ust): Renamed to
9015 `in_process_agent_supports_ust'.
9016 Update callers.
9017 (in_process_agent_supports_ust): Call agent_capability_check.
9018 (clear_installed_tracepoints): Assert that agent supports
9019 agent.
9020
9021 2012-03-03 Yao Qi <yao@codesourcery.com>
9022
9023 * linux-low.c (linux_supports_agent): New.
9024 (linux_target_ops): Initialize field `supports_agent' with
9025 linux_supports_agent.
9026 * target.h (struct target_ops) <supports_agent>: New.
9027 (target_supports_agent): New macro.
9028 * server.c (handle_general_set): Handle packet 'QAgent'.
9029 (handle_query): Send `QAgent+'.
9030 * Makefile.in (server.o): Depends on agent.h.
9031
9032 2012-03-03 Yao Qi <yao@codesourcery.com>
9033
9034 * Makefile.in (OBS): Add agent.o.
9035 Add new rule for agent.o.
9036 Track dependence of tracepoint.c on agent.h.
9037 * tracepoint.c (run_inferior_command_1):
9038 (run_inferior_command): Call agent_run_command.
9039 (gdb_ust_connect_sync_socket): Deleted. Move it to
9040 common/agent.c.
9041 (resume_thread, stop_thread): Likewise.
9042 (gdb_ust_socket_init): Renamed to ...
9043 (gdb_agent_socket_init): ... New.
9044 (gdb_ust_thread): Renamed to ...
9045 (gdb_agent_helper_thread): ... New.
9046 (gdb_ust_init): Move some code to ...
9047 (gdb_agent_init): ... here. New.
9048 [HAVE_UST]: Call gdb_ust_init.
9049 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9050 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9051 * config.in, configure: Regenerated.
9052
9053 2012-03-02 Pedro Alves <palves@redhat.com>
9054
9055 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9056 * linux-low.c (struct simple_pid_list): New.
9057 (stopped_pids): New a struct simple_pid_list pointer.
9058 (add_to_pid_list, pull_pid_from_list): New.
9059 (handle_extended_wait): Don't assume the first signal new children
9060 report is SIGSTOP. Adjust call to pull_pid_from_list.
9061 (linux_wait_for_lwp): Adjust.
9062
9063 2012-03-02 Yao Qi <yao@codesourcery.com>
9064
9065 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9066 debug log.
9067
9068 2012-03-02 Yao Qi <yao@codesourcery.com>
9069
9070 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9071 `stop_pc' and `tpoint'. Update caller.
9072
9073 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9074
9075 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9076 * linux-low.c (use_linux_regsets): New macro.
9077 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9078 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9079 (linux_register_in_regsets): New function.
9080 (usr_fetch_inferior_registers): Skip registers covered by
9081 regsets.
9082 (usr_store_inferior_registers): Likewise.
9083 (usr_fetch_inferior_registers): New macro.
9084 (usr_store_inferior_registers): Likewise.
9085 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9086 (linux_store_registers): Likewise.
9087 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9088 prototype.
9089 (init_registers_mips64_dsp_linux): Likewise.
9090 (init_registers_mips_linux): New macro.
9091 (init_registers_mips_dsp_linux): Likewise.
9092 (mips_dsp_num_regs): Likewise.
9093 (DSP_BASE, DSP_CONTROL): New fallback macros.
9094 (mips_base_regs): New macro.
9095 (mips_regmap): Use it. Fix the size.
9096 (mips_dsp_regmap): New variable.
9097 (mips_dsp_regset_bitmap): Likewise.
9098 (mips_arch_setup): New function.
9099 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9100 than mips_regmap.
9101 (mips_cannot_store_register): Likewise.
9102 (the_low_target): Update .arch_setup, .num_regs and .regmap
9103 initializers. Add .regset_bitmap initializer.
9104 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9105 initializer.
9106 * linux-bfin-low.c (the_low_target): Likewise.
9107 * linux-cris-low.c (the_low_target): Likewise.
9108 * linux-crisv32-low.c (the_low_target): Likewise.
9109 * linux-ia64-low.c (the_low_target): Likewise.
9110 * linux-m32r-low.c (the_low_target): Likewise.
9111 * linux-m68k-low.c (the_low_target): Likewise.
9112 * linux-ppc-low.c (the_low_target): Likewise.
9113 * linux-s390-low.c (the_low_target): Likewise.
9114 * linux-sh-low.c (the_low_target): Likewise.
9115 * linux-sparc-low.c (the_low_target): Likewise.
9116 * linux-tic6x-low.c (the_low_target): Likewise.
9117 * linux-x86-low.c (the_low_target): Likewise.
9118 * linux-xtensa-low.c (the_low_target): Likewise.
9119 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9120 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9121 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9122 srv_xmlfiles.
9123 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9124 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9125
9126 2012-02-29 Yao Qi <yao@codesourcery.com>
9127 Pedro Alves <palves@redhat.com>
9128
9129 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9130 `step_over_finished' is true.
9131
9132 2012-02-27 Pedro Alves <palves@redhat.com>
9133
9134 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9135 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9136
9137 2012-02-27 Pedro Alves <palves@redhat.com>
9138
9139 PR server/9684
9140 * linux-low.c (pid_is_stopped): New.
9141 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9142
9143 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9144
9145 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9146 of conditions.
9147
9148 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9149
9150 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9151
9152 2012-02-24 Luis Machado <lgustavo@codesourcery>
9153
9154 * server.c (handle_query): Advertise support for target-side
9155 breakpoint condition evaluation.
9156 (process_point_options): New function.
9157 (process_serial_event): When inserting a breakpoint, check for
9158 a target-side condition that should be evaluated.
9159
9160 * mem-break.c: Include regcache.h and ax.h.
9161 (point_cond_list_t): New data structure.
9162 (breakpoint) <cond_list>: New field.
9163 (find_gdb_breakpoint_at): Make non-static.
9164 (delete_gdb_breakpoint_at): Clear any target-side
9165 conditions.
9166 (clear_gdb_breakpoint_conditions): New function.
9167 (add_condition_to_breakpoint): Likewise.
9168 (add_breakpoint_condition): Likewise.
9169 (gdb_condition_true_at_breakpoint): Likewise.
9170 (gdb_breakpoint_here): Return result directly instead
9171 of going through a local variable.
9172
9173 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9174 (clear_gdb_breakpoint_conditions): Likewise.
9175 (add_breakpoint_condition): Likewise.
9176 (gdb_condition_true_at_breakpoint): Likewise.
9177
9178 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9179 (need_step_over_p): Take target-side breakpoint condition into
9180 consideration.
9181
9182 2012-02-24 Luis Machado <lgustavo@codesourcery>
9183
9184 * server.h: Include tracepoint.h.
9185 (agent_mem_read, agent_get_trace_state_variable_value,
9186 agent_set_trace_state_variable_value,
9187 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9188 get_set_tsv_func_addr): New prototypes.
9189
9190 * ax.h: New include file.
9191 * ax.c: New source file.
9192
9193 * tracepoint.c: Include ax.h.
9194 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9195 agent_expr, eval_result_type): Move to ax.h.
9196 (parse_agent_expr): Rename to ...
9197 (gdb_parse_agent_expr): ... this, make it non-static and move
9198 to ax.h.
9199 (unparse_agent_expr) Rename to ...
9200 (gdb_unparse_agent_expr): ... this, make it non-static and move
9201 to ax.h.
9202 (eval_agent_expr): Rename to ...
9203 (eval_tracepoint_agent_expr): ... this.
9204 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9205 forward declarations.
9206 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9207 (agent_get_trace_state_variable_value): New function.
9208 (agent_set_trace_state_variable_value): New function.
9209 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9210 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9211 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9212 (condition_true_at_tracepoint): Likewise.
9213 (parse_agent_expr): Rename to ...
9214 (gdb_parse_agent_expr): ... this and move to ax.c.
9215 (unparse_agent_expr): Rename to ...
9216 (gdb_unparse_agent_expr): ... this and move to ax.c.
9217 (gdb_agent_op_name): Move to ax.c.
9218 (eval_agent_expr): Rename to ...
9219 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9220 and move to ax.c.
9221 (eval_tracepoint_agent_expr): New function.
9222 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9223 non-static.
9224 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9225 ax.c.
9226 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9227 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9228 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9229 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9230 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9231 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9232 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9233 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9234 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9235 (compile_bytecodes): Remove forward declaration.
9236 (is_goto_target): Move to ax.c.
9237 (compile_bytecodes): Move to ax.c and call
9238 agent_get_trace_state_variable_value (...) and
9239 agent_set_trace_state_variable_value (...).
9240
9241 * Makefile.in: Update ax.c and IPA dependencies.
9242
9243 2012-02-24 Pedro Alves <palves@redhat.com>
9244
9245 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9246 (cmd_bigqtbuffer_circular): ... this. Only handle
9247 'QTBuffer:circular:'.
9248 (handle_tracepoint_general_set): Adjust.
9249
9250 2012-02-16 Yao Qi <yao@codesourcery.com>
9251
9252 * inferiors.c: Move code to ...
9253 * dll.c: .... here. New.
9254 * server.h: Declare clear_dlls.
9255 * Makefile.in (SFILES): Add dll.c.
9256 (OBS): Add dll.o
9257 (dll.o): New rule.
9258
9259 2012-02-11 Yao Qi <yao@codesourcery.com>
9260
9261 * server.c: (handle_monitor_command): Add a new parameter
9262 `own_buf'.
9263 (handle_query): Update caller.
9264
9265 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9266
9267 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9268 * configure, config.in: Regenerate.
9269 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9270 is not defined.
9271
9272 2012-02-02 Pedro Alves <palves@redhat.com>
9273
9274 Try SIGKILL first, then PTRACE_KILL.
9275 * linux-low.c (linux_kill_one_lwp): New.
9276 (linux_kill_one_lwp): Rename to ...
9277 (kill_one_lwp_callback): ... this. Use the new
9278 linux_kill_one_lwp.
9279
9280 2012-02-02 Pedro Alves <palves@redhat.com>
9281
9282 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9283 inferior.
9284
9285 2012-01-27 Pedro Alves <palves@redhat.com>
9286
9287 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9288 (elf_64_file_p): Make static.
9289 (linux_pid_exe_is_elf_64_file): New.
9290 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9291 Delete declarations.
9292 (linux_pid_exe_is_elf_64_file): Declare.
9293 * linux-x86-low.c (x86_arch_setup): Use
9294 linux_pid_exe_is_elf_64_file.
9295
9296 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9297
9298 * linux-low.c (linux_wait_for_event_1): Rename to ...
9299 (linux_wait_for_event): ... here and merge it with former
9300 linux_wait_for_event - new variable wait_ptid, use it.
9301 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9302
9303 2012-01-23 Pedro Alves <palves@redhat.com>
9304
9305 * server.c (main): Avoid yet another case of infinite loop while
9306 detaching/killing after a longjmp.
9307
9308 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9309
9310 Code cleanup.
9311 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9312
9313 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9314
9315 * hostio.c (handle_readlink): New function.
9316 (handle_vFile): Call it to handle "vFile:readlink" packets.
9317
9318 2012-01-20 Pedro Alves <palves@redhat.com>
9319 Ulrich Weigand <ulrich.weigand@linaro.org>
9320
9321 * server.c (handle_v_requests): Only support vAttach and vRun to
9322 start multiple processes when in extended protocol mode.
9323
9324 2012-01-17 Pedro Alves <palves@redhat.com>
9325
9326 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9327 memalign plus mprotect to allocate the scratch buffer.
9328
9329 2012-01-13 Pedro Alves <palves@redhat.com>
9330
9331 * server.c (attach_inferior): Clear `cont_thread'.
9332
9333 2012-01-13 Pedro Alves <palves@redhat.com>
9334
9335 * server.c (main): Avoid infinite loop while detaching/killing
9336 after a longjmp.
9337
9338 2012-01-09 Doug Evans <dje@google.com>
9339
9340 * server.c (start_inferior): Set last_ptid in --wrapper case.
9341
9342 2012-01-06 Yao Qi <yao@codesourcery.com>
9343
9344 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9345 defined.
9346 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9347
9348 2012-01-04 Yao Qi <yao@codesourcery.com>
9349
9350 * tracepoint.c (cmd_qtdp): Print debug message
9351 for static tracepoint.
9352
9353 2012-01-04 Yao Qi <yao@codesourcery.com>
9354
9355 * tracepoint.c (trace_vdebug): Differentiate debug message
9356 between gdbserver and IPA.
9357
9358 2012-01-03 Yao Qi <yao@codesourcery.com>
9359
9360 * tracepoint.c (tracepoint_was_hit): Don't collect for
9361 static tracepoint.
9362
9363 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9364
9365 * terminal.h: Reformat copyright header.
9366
9367 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9368
9369 * server.c (gdbserver_version): Update copyright year.
9370 * gdbreplay.c (gdbreplay_version): Likewise.
9371
9372 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9373
9374 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9375
9376 Revert:
9377 2011-12-18 Hui Zhu <teawater@gmail.com>
9378 * linux-low.c (linux_create_inferior): Save return value to ret.
9379
9380 2011-12-18 Hui Zhu <teawater@gmail.com>
9381
9382 * linux-low.c (linux_create_inferior): Save return value to ret.
9383
9384 2011-12-16 Doug Evans <dje@google.com>
9385
9386 * linux-low.c (linux_create_inferior): If stdio connection,
9387 redirect stdin from /dev/null, stdout to stderr.
9388 * remote-utils.c (remote_is_stdio): New static global.
9389 (remote_connection_is_stdio): New function.
9390 (remote_prepare): Handle stdio connection.
9391 (remote_open): Ditto.
9392 (remote_close): Don't close stdin for stdio connections.
9393 (read_prim,write_prim): New functions. Replace all calls to
9394 read/write to these.
9395 * server.c (main): Watch for "-" argument. Move call to
9396 remote_prepare before start_inferior.
9397 * server.h (STDIO_CONNECTION_NAME): New macro.
9398 (remote_connection_is_stdio): Declare.
9399
9400 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9401 in debugging output.
9402
9403 2011-12-15 Yao Qi <yao@codesourcery.com>
9404
9405 * tracepoint.c: Include sys/syscall.h.
9406 (gdb_ust_thread): Remove preprocessor conditional.
9407
9408 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9409
9410 * linux-low.c (linux_detach_one_lwp): Call
9411 the_low_target.prepare_to_resume before detaching.
9412
9413 2011-12-14 Yao Qi <yao@codesourcery.com>
9414
9415 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9416 of write.
9417
9418 2011-12-14 Yao Qi <yao@codesourcery.com>
9419
9420 * i386-low.c (i386_low_stopped_data_address): Initialize local
9421 variable `control'.
9422
9423 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9424
9425 PR remote/13492
9426
9427 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9428 DR_CONTROL unless necessary. Extend comments.
9429 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9430 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9431
9432 2011-12-13 Yao Qi <yao@codesourcery.com>
9433
9434 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9435 macros.
9436 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9437
9438 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9439
9440 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9441 Print new debug message for such case.
9442
9443 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9444
9445 Fix overlapping memcpy.
9446 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9447 the read_inferior_memory transfer.
9448 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9449 write_inferior_memory transfer.
9450 (set_fast_tracepoint_jump): New variable buf. Use it for the
9451 read_inferior_memory and write_inferior_memory transfers.
9452 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9453 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9454 Use it for the write_inferior_memory transfer.
9455 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9456 buffers.
9457
9458 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9459
9460 * linux-low.c (fetch_register, store_register): Make code
9461 consistent, fix formatting.
9462
9463 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9464
9465 * linux-low.c (usr_store_inferior_registers): Factor out code
9466 to handle individual registers into...
9467 (store_register): ... this new function.
9468
9469 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9470
9471 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9472 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9473 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9474 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9475 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9476 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9477 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9478 (srv_xmlfiles): Add new XML files.
9479
9480 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9481 and <sys/uio.h>.
9482 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9483 (init_registers_s390_linux32v1): Add prototype.
9484 (init_registers_s390_linux32v2): Likewise.
9485 (init_registers_s390_linux64v1): Likewise.
9486 (init_registers_s390_linux64v2): Likewise.
9487 (init_registers_s390x_linux64v1): Likewise.
9488 (init_registers_s390x_linux64v2): Likewise.
9489 (s390_num_regs): Increment to 52.
9490 (s390_regmap): Add orig_r2 register.
9491 (s390_num_regs_3264): Increment to 68.
9492 (s390_regmap_3264): Add orig_r2 register.
9493 (s390_collect_ptrace_register): Handle orig_r2 register.
9494 (s390_supply_ptrace_register): Likewise.
9495 (s390_fill_last_break): New function.
9496 (s390_store_last_break): Likewise.
9497 (s390_fill_system_call): New function.
9498 (s390_store_system_call): Likewise.
9499 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9500 register sets.
9501 (s390_check_regset): New function.
9502 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9503 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9504 Update target_regsets for available register sets.
9505
9506 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9507 Jan Kratochvil <jan.kratochvil@redhat.com>
9508
9509 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9510 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9511 New.
9512 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9513 * linux-low.h (struct process_info_private): New member r_debug.
9514 * server.c (handle_qxfer_libraries): Call
9515 the_target->qxfer_libraries_svr4.
9516 (handle_qxfer_libraries_svr4): New function.
9517 (qxfer_packets): New entry "libraries-svr4".
9518 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9519 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9520 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9521 PACKET_qXfer_libraries_svr4.
9522
9523 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9524
9525 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9526 PSW address/mask between 8-byte and 16-byte formats.
9527 (s390_supply_ptrace_register): Likewise.
9528 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9529 basic addressing mode bit.
9530
9531 2011-11-24 Stan Shebs <stan@codesourcery.com>
9532
9533 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9534
9535 2011-11-17 Stan Shebs <stan@codesourcery.com>
9536
9537 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9538 (tracing_start_time): New global.
9539 (tracing_stop_time): New global.
9540 (tracing_user_name): New global.
9541 (tracing_notes): New global.
9542 (tracing_stop_note): New global.
9543 (cmd_qtstart): Set traceframe_usage, start_time.
9544 (stop_tracing): Set stop_time.
9545 (cmd_qtstatus): Report additional status.
9546 (cmd_qtp): New function.
9547 (handle_tracepoint_query): Call it.
9548 (cmd_qtnotes): New function.
9549 (handle_tracepoint_general_set): Call it.
9550 (get_timestamp): Rename from tsv_get_timestamp.
9551
9552 2011-11-14 Stan Shebs <stan@codesourcery.com>
9553 Kwok Cheung Yeung <kcy@codesourcery.com>
9554
9555 * linux-x86-low.c (small_jump_insn): New.
9556 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9557 trampoline and error message, build a trampoline and issue a small
9558 jump instruction to it.
9559 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9560 trampoline and error message.
9561 (x86_get_min_fast_tracepoint_insn_len): New.
9562 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9563 * linux-low.h (struct linux_target_ops): Add arguments to
9564 install_fast_tracepoint_jump_pad operation, add new operation.
9565 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9566 arguments.
9567 (linux_get_min_fast_tracepoint_insn_len): New function.
9568 (linux_target_op): Add new operation.
9569 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9570 (gdb_trampoline_buffer_end): Ditto.
9571 (gdb_trampoline_buffer_error): Ditto.
9572 (struct ipa_sym_addresses): Add fields for new IPA variables.
9573 (symbol_list): Add entries for new IPA variables.
9574 (struct tracepoint): Add fields to hold the address range of the
9575 trampoline used by the tracepoint.
9576 (trampoline_buffer_head): New static variable.
9577 (trampoline_buffer_tail): Ditto.
9578 (claim_trampoline_space): New function.
9579 (have_fast_tracepoint_trampoline_buffer): New function.
9580 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9581 structure.
9582 (install_fast_tracepoint): Ditto, also add error buffer argument.
9583 (cmd_qtminftpilen): New function.
9584 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9585 (fast_tracepoint_from_trampoline_address): New function.
9586 (fast_tracepoint_collecting): Handle trampoline as part of jump
9587 pad space.
9588 (set_trampoline_buffer_space): New function.
9589 (initialize_tracepoint): Initialize new IPA variables.
9590 * target.h (struct target_ops): Add arguments to
9591 install_fast_tracepoint_jump_pad operation, add new
9592 get_min_fast_tracepoint_insn_len operation.
9593 (target_get_min_fast_tracepoint_insn_len): New.
9594 (install_fast_tracepoint_jump_pad): Add arguments.
9595 * server.h (IPA_BUFSIZ): Define.
9596 * linux-i386-ipa.c: Include extra header files.
9597 (initialize_fast_tracepoint_trampoline_buffer): New function.
9598 (initialize_low_tracepoint): Call it.
9599 * server.h (set_trampoline_buffer_space): Declare.
9600 (claim_trampoline_space): Ditto.
9601 (have_fast_tracepoint_trampoline_buffer): Ditto.
9602
9603 2011-11-14 Yao Qi <yao@codesourcery.com>
9604
9605 * server.c (handle_query): Handle InstallInTrace for qSupported.
9606 * tracepoint.c (add_tracepoint): Sort list.
9607 (install_tracepoint, download_tracepoint): New.
9608 (cmd_qtdp): Call them to install and download tracepoints.
9609 (sort_tracepoints): Removed.
9610 (cmd_qtstart): Update.
9611
9612 2011-11-14 Yao Qi <yao@codesourcery.com>
9613
9614 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9615 * mem-break.h: Declare.
9616 * tracepoint.c (cmd_qtstart): Move some code to ...
9617 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9618 New.
9619 (download_tracepoints): Move some code to ...
9620 (download_tracepoint_1): ... here. New.
9621
9622 2011-11-08 Yao Qi <yao@codesourcery.com>
9623
9624 * remote-utils.c (relocate_instruction): A comment fix.
9625
9626 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9627
9628 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9629 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9630 dr_status_mirror and dr_control_mirror from debug_reg_state.
9631 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9632 (i386_initial_stuff): Remove use of deleted globals.
9633 (i386_get_thread_context, i386_set_thread_context,
9634 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9635 from debug_reg_state.
9636
9637 2011-11-05 Yao Qi <yao@codesourcery.com>
9638
9639 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9640 address as TPOINT's.
9641
9642 2011-11-02 Stan Shebs <stan@codesourcery.com>
9643
9644 * tracepoint.c (agent_mem_read_string): New function.
9645 (eval_agent_expr): Call it for tracenz.
9646 * server.c (handle_query): Report support for tracenz.
9647
9648 2011-11-02 Yao Qi <yao@codesourcery.com>
9649
9650 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9651
9652 2011-11-02 Yao Qi <yao@codesourcery.com>
9653
9654 * target.h: Fix a typo in comment.
9655
9656 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9657
9658 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9659 clobber the breakpoints' shadows with fast tracepoint jumps.
9660 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9661 * target.c (write_inferior_memory): Also pass MYADDR down to
9662 check_mem_write.
9663
9664 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9665
9666 * configure.ac: Check support for personality routine.
9667 * configure: Regenerate.
9668 * config.in: Likewise.
9669 * linux-low.c: Include <sys/personality.h>.
9670 Define ADDR_NO_RANDOMIZE if necessary.
9671 (linux_create_inferior): Disable address space randomization when
9672 forking inferior, if requested.
9673 (linux_supports_disable_randomization): New function.
9674 (linux_target_ops): Install it.
9675 * server.h (disable_randomization): Declare.
9676 * server.c (disable_randomization): New global variable.
9677 (handle_general_set): Handle QDisableRandomization.
9678 (handle_query): Likewise for qSupported.
9679 (main): Support --disable-randomization and --no-disable-randomization
9680 command line arguments.
9681 * target.h (struct target_ops): Add supports_disable_randomization.
9682 (target_supports_disable_randomization): New macro.
9683
9684 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9685
9686 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9687 ifdef check.
9688 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9689 [!PT_GETDSBT] (target_loadmap): New definition.
9690 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9691 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9692 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9693 and PT_GETDSBT to LINUX_LOADMAP.
9694 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9695 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9696
9697 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9698
9699 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9700 (arm_linux_hwbp_cap): New static variable.
9701 (arm_linux_get_hwbp_cap): Replace by ...
9702 (arm_linux_init_hwbp_cap): ... this new function.
9703 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9704 (arm_linux_get_hw_watchpoint_count): Likewise.
9705 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9706 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9707 (arm_prepare_to_resume): Use perror_with_name instead of error.
9708
9709 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9710
9711 * linux-arm-low.c: Include <signal.h>.
9712 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9713 (struct arm_linux_hwbp_cap): New data type.
9714 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9715 (struct arm_linux_hw_breakpoint): New data type.
9716 (MAX_BPTS, MAX_WPTS): Define.
9717 (struct arch_process_info, struct arch_lwp_info): New data types.
9718 (arm_linux_get_hwbp_cap): New function.
9719 (arm_linux_get_hw_breakpoint_count): Likewise.
9720 (arm_linux_get_hw_watchpoint_count): Likewise.
9721 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9722 (arm_hwbp_control_initialize): Likewise.
9723 (arm_hwbp_control_is_enabled): Likewise.
9724 (arm_hwbp_control_is_initialized): Likewise.
9725 (arm_hwbp_control_disable): Likewise.
9726 (arm_linux_hw_breakpoint_equal): Likewise.
9727 (arm_linux_hw_point_initialize): Likewise.
9728 (struct update_registers_data): New data structure.
9729 (update_registers_callback: New function.
9730 (arm_insert_point): Likewise.
9731 (arm_remove_point): Likewise.
9732 (arm_stopped_by_watchpoint): Likewise.
9733 (arm_stopped_data_address): Likewise.
9734 (arm_new_process): Likewise.
9735 (arm_new_thread): Likewise.
9736 (arm_prepare_to_resume): Likewise.
9737 (the_low_target): Register arm_insert_point, arm_remove_point,
9738 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9739 arm_new_thread, and arm_prepare_to_resume.
9740
9741 2011-09-15 Stan Shebs <stan@codesourcery.com>
9742
9743 * server.h (struct emit_ops): Add compare-goto fields.
9744 * tracepoint.c (gdb_agent_op_sizes): New table.
9745 (emit_eq_goto): New function.
9746 (emit_ne_goto): New function.
9747 (emit_lt_goto): New function.
9748 (emit_le_goto): New function.
9749 (emit_gt_goto): New function.
9750 (emit_ge_goto): New function.
9751 (is_goto_target): New function.
9752 (compile_bytecodes): Recognize special cases of compare-goto
9753 combinations and call specialized emitters for them.
9754 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9755 (amd64_emit_ne_goto): New function.
9756 (amd64_emit_lt_goto): New function.
9757 (amd64_emit_le_goto): New function.
9758 (amd64_emit_gt_goto): New function.
9759 (amd64_emit_ge_goto): New function.
9760 (amd64_emit_ops): Add the new functions.
9761 (i386_emit_eq_goto): New function.
9762 (i386_emit_ne_goto): New function.
9763 (i386_emit_lt_goto): New function.
9764 (i386_emit_le_goto): New function.
9765 (i386_emit_gt_goto): New function.
9766 (i386_emit_ge_goto): New function.
9767 (i386_emit_ops): Add the new functions.
9768
9769 2011-09-08 Stan Shebs <stan@codesourcery.com>
9770
9771 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9772 (i386_emit_epilogue): Restore %ebx.
9773
9774 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9775
9776 * server.c (step_thread): Remove definition.
9777 (process_serial_event): Don't handle Hs.
9778 * server.h (step_thread): Remove declaration.
9779 * target.c (set_desired_inferior): Remove use of step_thread.
9780
9781 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9782
9783 * linux-low.c: Include linux-procfs.h.
9784 (linux_attach_lwp_1): Update comments.
9785 (linux_attach): Scan for existing threads when attaching to a
9786 process that is the tgid.
9787 * Makefile.in: Update dependencies.
9788
9789 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9790
9791 * configure.srv: Add linux-procfs.o dependencies.
9792
9793 2011-08-14 Yao Qi <yao@codesourcery.com>
9794
9795 * target.h (struct target_ops): Fix indent.
9796 * win32-low.c (win32_target_ops): Fix comment.
9797
9798 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9799 Yao Qi <yao@codesourcery.com>
9800
9801 * Makefile.in (clean): Remove tic6x-*.c files.
9802 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9803 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9804 (tic6x-c64xp-linux.c): Likewise.
9805 * configure.srv: Add support for tic6x-*-uclinux.
9806 * linux-tic6x-low.c: New.
9807 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9808
9809 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9810 Yao Qi <yao@codesourcery.com>
9811
9812 * target.h (struct target_ops): Add read_loadmap.
9813 * linux-low.c (struct target_loadseg): New type.
9814 (struct target_loadmap): New type.
9815 (linux_read_loadmap): New function.
9816 (linux_target_ops): Add linux_read_loadmap.
9817 * server.c (handle_query): Support qXfer:fdpic:read packet.
9818 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9819 to NULL.
9820
9821 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9822
9823 * win32-low.c: Include <stdint.h>.
9824
9825 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9826
9827 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9828 to the inferior here.
9829 (i386_remove_aligned_watchpoint): Ditto.
9830 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9831 fit part of the watchpoint in the debug registers.
9832 (i386_update_inferior_debug_regs): New.
9833 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9834 registers, and only update the inferior on success.
9835 (i386_low_remove_watchpoint): Ditto.
9836
9837 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9838
9839 * linux-low.c (compare_ints, unique, list_threads, show_process,
9840 linux_core_of_thread): Delete.
9841 (linux_target_ops): Change linux_core_of_thread to
9842 linux_common_core_of_thread.
9843 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9844 * utils.c (malloc_failure): Change type of argument.
9845 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9846 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9847 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9848 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9849 (IPA_OBJS): Add common-utils-ipa.o.
9850 (ptid_h, linux_osdata_h): New macros.
9851 (server_h): Add common/common-utils.h, common/xml-utils.h,
9852 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9853 common/ptid.h.
9854 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9855 ptid.o, buffer.o): New rules.
9856 (linux-low.o): Add common/linux-osdata.h as a dependency.
9857 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9858 * configure.ac: Add AC_HEADER_DIRENT check.
9859 * config.in: Regenerate.
9860 * configure: Regenerate.
9861 * remote-utils.c (xml_escape_text): Delete.
9862 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9863 buffer_xml_printf): Move to common/buffer.c.
9864 * server.c (main): Remove call to initialize_inferiors.
9865 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9866 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9867 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9868 internal_error, gdb_assert, gdb_assert_fail): Delete.
9869 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9870 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9871 common/buffer.h.
9872 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9873 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9874 initialize_inferiors): Delete.
9875
9876 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9877
9878 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9879 symbol error.
9880
9881 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9882
9883 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9884 assertion.
9885 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9886
9887 2011-05-26 Yao Qi <yao@codesourcery.com>
9888
9889 * Makefile.in (thread-db.o): Track dependence to
9890 common/gdb_thread_db.h.
9891 * thread-db.c: include gdb_thread_db.h from right place.
9892
9893 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9894
9895 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9896 __FILE__ and __LINE__ to internal_error.
9897
9898 2011-05-13 Doug Evans <dje@google.com>
9899
9900 * thread-db.c (try_thread_db_load_from_sdir): New function.
9901 (try_thread_db_load_from_dir): New function.
9902 (thread_db_load_search): Handle $sdir, ignore $pdir.
9903 Remove trying of system directories if search of
9904 libthread-db-search-path fails, that is now done via $sdir.
9905
9906 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9907
9908 * server.c (handle_query): Add EnableDisableTracepoints to the list
9909 of supported features.
9910 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9911 tracepoints.
9912 (cmd_qtenable_disable): New.
9913 (cmd_qtstart): Install tracepoints even if disabled.
9914 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9915 receiving a QTEnable or QTDisable packet.
9916 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9917 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9918 tracepoints.
9919 (gdb_probe): Skip data collection if static tracepoint is disabled.
9920
9921 2011-05-10 Doug Evans <dje@google.com>
9922
9923 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9924
9925 2011-05-04 Doug Evans <dje@google.com>
9926
9927 * linux-low.c (linux_join): Skip process lookup.
9928 * spu-low.c (spu_join): Ditto.
9929 * server.c (join_inferiors_callback): Delete.
9930 (process_serial_event): For 'D' packet (detach) call join_inferior
9931 directly.
9932
9933 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9934
9935 * README: Don't mention xscale*-*-linux*.
9936 * configure.srv (xscale*-*-linux*): Don't handle target.
9937
9938 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9939
9940 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9941 casting pointers.
9942 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9943 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9944 (i386_emit_void_call_2): Likewise.
9945
9946 2011-04-26 Yao Qi <yao@codesourcery.com>
9947
9948 * linux-low.c: Move common macros to linux-ptrace.h.
9949 Include linux-ptrace.h.
9950 * Makefile.in (linux_ptrace_h): New.
9951 (linux-low.o): Depends on linux-ptrace.h.
9952
9953 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9954
9955 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9956 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9957 (remote_prepare): New function with most of the TCP code from ...
9958 (remote_open): ... here. Detect PORT here unconditionally. Move also
9959 setting transport_is_reliable.
9960 * server.c (run_once): New variable.
9961 (gdbserver_usage): Document it.
9962 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9963 the first run if RUN_ONCE.
9964 * server.h (run_once, remote_prepare): New declarations.
9965
9966 2011-04-19 Tom Tromey <tromey@redhat.com>
9967
9968 * win32-low.c (handle_load_dll): Remove duplicate "the".
9969
9970 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9971
9972 Remove support for old Cygwin 1.5 versions.
9973 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9974 function to avoid warning.
9975 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9976 warning.
9977
9978 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9979
9980 * gdbserver/server.h (Macro _): Define it if not available.
9981
9982 2011-03-14 Michael Snyder <msnyder@vmware.com>
9983
9984 * hostio.c (handle_close): Remove unnecessary null test.
9985
9986 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9987
9988 * Makefile.in (maintainer-clean realclean distclean): Remove
9989 "make ... subdir_do" command.
9990
9991 2011-03-10 Michael Snyder <msnyder@vmware.com>
9992
9993 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9994
9995 * server.c (handle_v_run): Free alloced buffer on early return.
9996
9997 2011-03-09 Yao Qi <yao@codesourcery.com>
9998
9999 Revert:
10000 2011-03-04 Yao Qi <yao@codesourcery.com>
10001
10002 * Makefile.in: Remove GNU make feature --directory.
10003
10004 2011-03-05 Yao Qi <yao@codesourcery.com>
10005
10006 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10007 (subdir_do): New make target. Copied from gdb/Makefile.
10008 (maintainer-clean, realclean, distclean, clean): Call corresponding
10009 make targets in common/Makefile.
10010
10011 2011-02-11 Yao Qi <yao@codesourcery.com>
10012
10013 * configure.ac: Call AC_PROG_RANLIB.
10014 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10015 * configure: Regenerate.
10016
10017 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10018
10019 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10020
10021 2011-03-06 Yao Qi <yao@codesourcery.com>
10022
10023 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10024
10025 2011-03-05 Yao Qi <yao@codesourcery.com>
10026
10027 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10028 (subdir_do): New make target. Copied from gdb/Makefile.
10029 (maintainer-clean, realclean, distclean, clean): Call corresponding
10030 make targets in common/Makefile.
10031
10032 2011-03-04 Yao Qi <yao@codesourcery.com>
10033
10034 * Makefile.in: Remove GNU make feature --directory.
10035
10036 2011-03-04 Michael Snyder <msnyder@vmware.com>
10037
10038 * server.c (queue_stop_reply): Call xmalloc not malloc.
10039
10040 2011-03-02 Michael Snyder <msnyder@vmware.com>
10041
10042 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10043
10044 2011-02-28 Michael Snyder <msnyder@vmware.com>
10045
10046 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10047 (cmd_qtframe): Ditto.
10048 (cmd_qtbuffer): Ditto.
10049 (cmd_bigqtbuffer): Ditto.
10050
10051 * utils.c (decimal2str): Initialize 'width' to nine, then
10052 don't mess with it.
10053
10054 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10055
10056 * hostio.c (require_data): Free *data, not data.
10057
10058 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10059
10060 * hostio.c (require_data): Use free, not xfree.
10061
10062 2011-02-27 Michael Snyder <msnyder@vmware.com>
10063
10064 * server.c (handle_query): Discard unused value.
10065
10066 * hostio.c (require_data): Free malloc memory before returning
10067 error.
10068
10069 2011-02-26 Michael Snyder <msnyder@vmware.com>
10070
10071 * linux-low.c (list_threads): Call closedir for dirent.
10072
10073 2011-02-27 Michael Snyder <msnyder@vmware.com>
10074
10075 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10076 a case statement falls through.
10077
10078 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10079
10080 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10081 in comparison.
10082
10083 2011-02-26 Michael Snyder <msnyder@vmware.com>
10084
10085 * utils.c (decimal2str): Eliminate dead code and dead param.
10086 (pulongest): Drop dead param from call to decimal2str.
10087 (plongest): Ditto.
10088
10089 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10090
10091 Revert the following patch (not approved yet):
10092 2011-02-21 Hui Zhu <teawater@gmail.com>
10093 * tracepoint.c (tp_printf): New function.
10094 (eval_agent_expr): Handle gdb_agent_op_printf.
10095
10096 2011-02-21 Hui Zhu <teawater@gmail.com>
10097
10098 * tracepoint.c (tp_printf): New function.
10099 (eval_agent_expr): Handle gdb_agent_op_printf.
10100
10101 2011-02-18 Tom Tromey <tromey@redhat.com>
10102
10103 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10104 (tracepoint.o): Likewise.
10105 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10106 (gdb_agent_op_names): Likewise.
10107
10108 2011-02-18 Tom Tromey <tromey@redhat.com>
10109
10110 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10111 gdb_agent_op_rot>: New constants.
10112 (gdb_agent_op_names): Add pick and roll.
10113 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10114 cases.
10115
10116 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10117
10118 * aclocal.m4: Regenerated with aclocal-1.11.1.
10119
10120 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10121
10122 * server.c (handle_qxfer_traceframe_info): New.
10123 (qxfer_packets): Register "traceframe-info".
10124 (handle_query): Report support for qXfer:traceframe-info:read+.
10125 * tracepoint.c (match_blocktype): New.
10126 (traceframe_find_block_type): Rename to ...
10127 (traceframe_walk_blocks): ... this. Add callback filter argument,
10128 and use it.
10129 (traceframe_find_block_type): New, reimplemented on top of
10130 traceframe_walk_blocks.
10131 (build_traceframe_info_xml): New.
10132 (traceframe_read_info): New.
10133 * server.h (traceframe_read_info): Declare.
10134
10135 2011-02-11 Yao Qi <yao@codesourcery.com>
10136
10137 * configure.ac: Call AC_PROG_RANLIB.
10138 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10139 * configure: Regenerate.
10140
10141 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10142
10143 * server.c (gdb_read_memory): Change return semantics to allow
10144 partial transfers.
10145 (handle_search_memory_1): Adjust.
10146 (process_serial_event) <'m' packet>: Handle partial transfers.
10147 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10148
10149 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10150
10151 * regcache.c (init_register_cache): Initialize
10152 regcache->register_status.
10153 (free_register_cache): Release regcache->register_status.
10154 (regcache_cpy): Copy register_status.
10155 (registers_to_string): Print 'x's for unavailable registers.
10156 (supply_register): Mark the register's status valid or
10157 unavailable, depending on whether a buffer was passed in or not.
10158 (supply_register_zeroed): New.
10159 (supply_regblock): Mark the registers' status valid or
10160 unavailable, depending on whether a buffer was passed in or not.
10161 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10162 (struct regcache): New `register_status' field.
10163 (supply_register_zeroed): Declare.
10164 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10165 supply_register_zeroed, rather than passing a NULL buffer to
10166 supply_register.
10167 * tracepoint.c (fetch_traceframe_registers): Update comment.
10168
10169 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10170
10171 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10172 buffer explicit.
10173
10174 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10175
10176 * server.h (decode_xfer_write): Change prototype.
10177 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10178 and don't extract the annex here.
10179 * server.c (decode_xfer_read): Remove `annex' parameter,
10180 and don't extract the annex here.
10181 (decode_xfer): New.
10182 (struct qxfer): New.
10183 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10184 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10185 (handle_qxfer_statictrace): New functions, abstracted out from
10186 handle_query, and made to use the struct qxfer interface.
10187 (handle_threads_qxfer_proper): Rename to ...
10188 (handle_qxfer_threads_proper): ... this.
10189 (handle_threads_qxfer): Rename to ...
10190 (handle_qxfer_threads): ... this. Adjust.
10191 (qxfer_packets): New array.
10192 (handle_qxfer): New function.
10193 (handle_query): Use handle_qxfer.
10194
10195 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10196
10197 * gdbreplay.c: Shorten lines of >= 80 columns.
10198 * linux-low.c: Ditto.
10199 * linux-ppc-low.c: Ditto.
10200 * linux-s390-low.c: Ditto.
10201 * linux-sparc-low.c: Ditto.
10202 * linux-x86-low.c: Ditto.
10203 * linux-xtensa-low.c: Ditto.
10204 * mem-break.c: Ditto.
10205 * nto-low.c: Ditto.
10206 * regcache.h: Ditto.
10207 * remote-utils.c: Ditto.
10208 * server.c: Ditto.
10209 * server.h: Ditto.
10210 * thread-db.c: Ditto.
10211 * tracepoint.c: Ditto.
10212 * utils.c: Ditto.
10213 * win32-low.h: Ditto.
10214
10215 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10216
10217 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10218 update.
10219
10220 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10221
10222 * server.c (gdbserver_version): Update copyright year in version
10223 output.
10224 * gdbreplay.c (gdbreplay_version): Ditto.
10225
10226 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10227
10228 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10229 * linux-bfin-low.c: New file.
10230 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10231 PT_DATA_ADDR for BFIN targets.
10232 * Makefile.in (SFILES): Add linux-bfin-low.c.
10233 (clean): Remove reg-bfin.c.
10234 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10235 * README: Mention supported Blackfin targets.
10236
10237 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10238
10239 * .gitignore: New file.
10240
10241 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10242
10243 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10244
10245 2010-10-22 Jie Zhang <jie@codesourcery.com>
10246
10247 * Makefile.in: Add FLAGS_TO_PASS variable.
10248 (install): Remove dependency of install-only and recursively
10249 invoke make for install-only.
10250
10251 2010-10-04 Doug Evans <dje@google.com>
10252
10253 * Makefile.in (uninstall): Use $(DESTDIR).
10254
10255 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10256
10257 PR gdb/11842
10258
10259 * linux-x86-low.c (compat_siginfo_from_siginfo)
10260 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10261 si_code is < 0. Check for si_code == SI_TIMER before checking for
10262 si_code < 0.
10263
10264 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10265
10266 * lynx-i386-low.c: New file.
10267 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10268
10269 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10270
10271 * lynx-low.c (ptrace_request_to_str): Remove handling for
10272 request values that have been removed in LynxOS 5.x.
10273
10274 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10275
10276 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10277 <ptrace.h>
10278
10279 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10280
10281 * configure.ac: Add --enable-inprocess-agent option.
10282 * configure: Rebuilt.
10283
10284 2010-09-06 Yao Qi <yao@codesourcery.com>
10285
10286 * linux-low.c (linux_kill): Remove unused variable.
10287 (linux_stabilize_threads): Likewise.
10288 * server.c (start_inferior): Likewise.
10289 (queue_stop_reply_callback): Likewise.
10290 * tracepoint.c (do_action_at_tracepoint): Likewise.
10291
10292 2010-09-06 Yao Qi <yao@codesourcery.com>
10293
10294 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10295 on return.
10296
10297 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10298
10299 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10300
10301 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10302
10303 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10304 "$(IPA_DEPFILES)".
10305
10306 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10307
10308 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10309 gdbserver/lynx-ppc-low.c: New files.
10310 * Makefile.in (lynx_low_h): New variable.
10311 (lynx-low.o, lynx-ppc-low.o): New rules.
10312 * configure.ac: On LynxOS, link with -lnetinet.
10313 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10314 * configure: regenerate.
10315
10316 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10317
10318 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10319 * configure.ac: Add check for vasprintf and vsnprintf.
10320 * configure, config.in: Regenerate.
10321 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10322
10323 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10324
10325 * gdbreplay.c: Move include of alloca.h up, next to include of
10326 malloc.h.
10327 * server.h: Add include of malloc.h.
10328 * mem-break.c: Remove include of malloc.h.
10329 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10330
10331 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10332
10333 * Makefile.in (memmem.o): Build with -Wno-error.
10334
10335 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10336
10337 * utils.c (xsnprintf): Make non-static.
10338 * server.h: Add xsnprintf declaration.
10339 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10340 replace calls to snprintf by calls to xsnprintf throughout.
10341
10342 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10343
10344 * configure.ac: Add configure check for alloca.
10345 * configure, config.in: Regenerate.
10346 * server.h: Include alloca.h if it exists.
10347 * gdbreplay.c: Include alloca.h if it exists.
10348
10349 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10350
10351 * linux-low.c (__SIGRTMIN): Define if not already defined.
10352 (linux_create_inferior): Check for __ANDROID__ rather than
10353 __SIGRTMIN.
10354 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10355 are already deferred.
10356 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10357 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10358 stopped and already has a pending signal to report.
10359 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10360 a pending signal to report or is moving out of a jump pad.
10361 (linux_init_signals): Check for __ANDROID__ rather than
10362 __SIGRTMIN.
10363
10364 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10365
10366 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10367 debug_threads check. Avoid a linear search when not doing debug
10368 output.
10369
10370 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10371
10372 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10373 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10374 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10375 (process_event): Change local fd's type to gdb_fildes_t.
10376 (create_file_handler): Adjust prototype.
10377 (delete_file_handler): Adjust prototype.
10378 (handle_file_event): Adjust prototype. Use pfildes.
10379 (create_file_event): Adjsut prototype.
10380 * remote-utils.c (remote_desc, listen_desc): Change type to
10381 gdb_fildes_t.
10382 * server.h: New gdb_fildes_t typedef.
10383 [USE_WIN32API]: Include winsock2.h.
10384 (delete_file_handler, add_file_handler): Adjust prototypes.
10385 (pfildes): Declare.
10386 * utils.c (pfildes): New.
10387
10388 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10389
10390 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10391 * configure: Regenerate.
10392
10393 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10394
10395 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10396 (linux_done_accessing_memory): ... this.
10397 (linux_target_ops): Adjust.
10398 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10399 * nto-low.c (nto_target_ops): Adjust comment.
10400 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10401 * spu-low.c (spu_target_ops): Adjust comment.
10402 * target.h (target_ops): Rename unprepare_to_access_memory field
10403 to done_accessing_memory.
10404 (unprepare_to_access_memory): Rename to ...
10405 (done_accessing_memory): ... this.
10406
10407 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10408
10409 * linux-low.c (linux_prepare_to_access_memory): New.
10410 (linux_unprepare_to_access_memory): New.
10411 (linux_target_ops): Install them.
10412 * server.c (read_memory): Rename to ...
10413 (gdb_read_memory): ... this. Use
10414 prepare_to_access_memory/prepare_to_access_memory.
10415 (write_memory): Rename to ...
10416 (gdb_write_memory): ... this. Use
10417 prepare_to_access_memory/prepare_to_access_memory.
10418 (handle_search_memory_1): Adjust.
10419 (process_serial_event): Adjust.
10420 * target.h (struct target_ops): New fields
10421 prepare_to_access_memory and unprepare_to_access_memory.
10422 (prepare_to_access_memory, unprepare_to_access_memory): New.
10423 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10424 prepare_to_access_memory/prepare_to_access_memory.
10425 * nto-low.c (nto_target_ops): Adjust.
10426 * spu-low.c (spu_target_ops): Adjust.
10427 * win32-low.c (win32_target_ops): Adjust.
10428
10429 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10430
10431 * Makefile.in (WARN_CFLAGS): Get it from configure.
10432 (WERROR_CFLAGS): New.
10433 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10434 * configure.ac: Introduce --enable-werror, which adds -Werror to
10435 the compiler command line. Enabled by default. Disable with
10436 --disable-werror. Add -Wdeclaration-after-statement
10437 Wpointer-arith and -Wformat-nonliteral to warning flags.
10438 * configure: Regenerate.
10439
10440 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10441
10442 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10443
10444 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10445
10446 * gdbreplay.c (remote_error): New.
10447 (gdbchar): New.
10448 (expect): Use gdbchar. Check for error reading from GDB.
10449 Clarify sync error output.
10450 (play): Check for errors writing to GDB.
10451 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10452 * remote-utils.c (getpkt): Check for errors writing to the remote
10453 descriptor.
10454
10455 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10456
10457 * linux-low.c (linux_wait_1): Move non-debugging code out of
10458 `debug_threads' control.
10459
10460 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10461
10462 * linux-low.c (linux_wait_1): Don't set last_status here.
10463 * server.c (push_event, queue_stop_reply_callback): Assert we're
10464 not pushing a TARGET_WAITKIND_IGNORE event.
10465 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10466 (myresume, handle_target_event): Set the thread's last_resume_kind
10467 and last_status from the target returned status.
10468
10469 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10470
10471 PR threads/10729
10472
10473 * linux-x86-low.c (update_debug_registers_callback): New.
10474 (i386_dr_low_set_addr): Use it.
10475 (i386_dr_low_get_addr): New.
10476 (i386_dr_low_set_control): Use update_debug_registers_callback.
10477 (i386_dr_low_get_control): New.
10478 (i386_dr_low_get_status): Adjust.
10479 * linux-low.c (linux_stop_lwp): New.
10480 * linux-low.h (linux_stop_lwp): Declare.
10481
10482 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10483 argument instead of a i386_debug_reg_state.
10484 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10485 a i386_debug_reg_state.
10486 (i386_insert_aligned_watchpoint): Adjust.
10487 (i386_remove_aligned_watchpoint): Adjust.
10488 (i386_low_stopped_data_address): Read the debug registers from the
10489 inferior instead of from the mirrors.
10490 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10491 (i386_dr_low_get_addr): Declare.
10492 (i386_dr_low_get_control): Declare.
10493 (i386_dr_low_get_status): Change prototype.
10494
10495 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10496 (i386_dr_low_get_addr): New.
10497 (i386_dr_low_get_control): New.
10498 (i386_dr_low_get_status): Adjust prototype. Return
10499 dr_status_mirror.
10500 (i386_initial_stuff): Clear dr_status_mirror and
10501 dr_control_mirror.
10502 (i386_get_thread_context): Adjust.
10503 (i386_set_thread_context): Adjust.
10504 (i386_thread_added): Adjust.
10505
10506 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10507
10508 * linux-low.h (linux_thread_area): Delete declaration.
10509
10510 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10511
10512 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10513 after its termination.
10514
10515 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10516
10517 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10518 (gdb_wants_all_stopped): Delete.
10519 (linux_wait_1): Don't call them.
10520 * server.c (handle_v_cont): Tag all threads as want-stopped.
10521 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10522 stopped as "client-wants-stopped".
10523
10524 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10525
10526 * Makefile.in (signals_h): New.
10527 (server_h): Depend on it.
10528 (server.o): Don't depend on $(signals_def).
10529 (signals.o): Depend on $(signals_def).
10530
10531 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10532
10533 * Makefile.in (signals_def): New.
10534 (server_h): Append include/gdb/signals.h and signals_def.
10535 (server.o): Append signals_def.
10536
10537 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10538
10539 * server.c (handle_target_event): Use target_signal_to_host for
10540 resume_info.sig initialization.
10541 * target.h (struct thread_resume) <sig>: New comment.
10542
10543 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10544
10545 * server.c (handle_query): strcpy() the returned string from paddress()
10546 instead of sprintf().
10547 * utils.c (paddress): Return phex_nz().
10548
10549 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10550
10551 * server.c (handle_v_cont): Call mourn_inferior if process
10552 just exited.
10553 (myresume): Likewise.
10554
10555 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10556
10557 Static tracepoints, and integration with UST.
10558
10559 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10560 * mem-break.c (uninsert_all_breakpoints)
10561 (reinsert_all_breakpoints): New.
10562 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10563 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10564 (gdb_agent_ust_loaded, helper_thread_id)
10565 (gdb_agent_helper_thread_id): New macros.
10566 (struct ipa_sym_addresses): Add addr_ust_loaded,
10567 addr_helper_thread_id, addr_cmd_buf.
10568 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10569 (in_process_agent_loaded_ust): New.
10570 (write_e_ust_not_loaded): New.
10571 (maybe_write_ipa_ust_not_loaded): New.
10572 (struct collect_static_trace_data_action): New.
10573 (enum tracepoint_type) <static_tracepoint>: New.
10574 (struct tracepoint) <handle>: Mention static tracepoints.
10575 (struct static_tracepoint_ctx): New.
10576 (CMD_BUF_SIZE): New.
10577 (add_tracepoint_action): Handle static tracepoint actions.
10578 (unprobe_marker_at): New.
10579 (clear_installed_tracepoints): Handle static tracepoints.
10580 (cmd_qtdp): Handle static tracepoints.
10581 (probe_marker_at): New.
10582 (cmd_qtstart): Handle static tracepoints.
10583 (response_tracepoint): Handle static tracepoints.
10584 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10585 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10586 (get_context_regcache): Handle static tracepoints.
10587 (do_action_at_tracepoint): Handle static tracepoint actions.
10588 (traceframe_find_block_type): Handle static trace data blocks.
10589 (traceframe_read_sdata): New.
10590 (download_tracepoints): Download static tracepoint actions.
10591 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10592 (GDB_PROBE_NAME): New.
10593 (ust_ops): New.
10594 (GET_UST_SYM): New.
10595 (USTF): New.
10596 (dlsym_ust): New.
10597 (ust_marker_to_static_tracepoint): New.
10598 (gdb_probe): New.
10599 (collect_ust_data_at_tracepoint): New.
10600 (gdb_ust_probe): New.
10601 (UNIX_PATH_MAX, SOCK_DIR): New.
10602 (gdb_ust_connect_sync_socket): New.
10603 (resume_thread, stop_thread): New.
10604 (run_inferior_command): New.
10605 (init_named_socket): New.
10606 (gdb_ust_socket_init): New.
10607 (cstr_to_hexstr): New.
10608 (next_st): New.
10609 (first_marker, next_marker): New.
10610 (response_ust_marker): New.
10611 (cmd_qtfstm, cmd_qtsstm): New.
10612 (unprobe_marker_at, probe_marker_at): New.
10613 (cmd_qtstmat, gdb_ust_thread): New.
10614 (gdb_ust_init): New.
10615 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10616 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10617 (ST_REGENTRY): New.
10618 (x86_64_st_collect_regmap): New.
10619 (X86_64_NUM_ST_COLLECT_GREGS): New.
10620 (AMD64_RIP_REGNUM): New.
10621 (supply_static_tracepoint_registers): New.
10622 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10623 (ST_REGENTRY): New.
10624 (i386_st_collect_regmap): New.
10625 (i386_NUM_ST_COLLECT_GREGS): New.
10626 (supply_static_tracepoint_registers): New.
10627 * server.c (handle_query): Handle qXfer:statictrace:read.
10628 <qSupported>: Report support for StaticTracepoints, and
10629 qXfer:statictrace:read features.
10630 * server.h (traceframe_read_sdata)
10631 (supply_static_tracepoint_registers): Declare.
10632 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10633 (unpack_varlen_hex): Include in IPA build.
10634 * Makefile.in (ustlibs, ustinc): New.
10635 (IPA_OBJS): Add remote-utils-ipa.o.
10636 ($(IPA_LIB)): Link -ldl and -lpthread.
10637 (UST_CFLAGS): New.
10638 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10639 * config.in, configure: Regenerate.
10640
10641 2010-06-20 Ian Lance Taylor <iant@google.com>
10642 Pedro Alves <pedro@codesourcery.com>
10643
10644 * linux-x86-low.c (always_true): Delete.
10645 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10646 trying to fool the compiler with always_true.
10647
10648 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10649
10650 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10651 conditions in gdbserver.
10652
10653 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10654
10655 * spu-low.c (spu_read_memory): Wrap around local store limit.
10656 (spu_write_memory): Likewise.
10657
10658 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10659
10660 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10661 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10662 LONGEST uses.
10663 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10664 uses.
10665 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10666 uses with LONGEST uses.
10667
10668 2010-06-14 Stan Shebs <stan@codesourcery.com>
10669 Pedro Alves <pedro@codesourcery.com>
10670
10671 Bytecode compiler.
10672
10673 * linux-x86-low.c: Include limits.h.
10674 (add_insns): New.
10675 (always_true): New.
10676 (EMIT_ASM): New.
10677 (EMIT_ASM32): New.
10678 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10679 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10680 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10681 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10682 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10683 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10684 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10685 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10686 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10687 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10688 (amd64_emit_void_call_2): New.
10689 (amd64_emit_ops): New.
10690 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10691 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10692 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10693 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10694 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10695 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10696 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10697 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10698 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10699 (i386_emit_stack_adjust, i386_emit_int_call_1)
10700 (i386_emit_void_call_2): New.
10701 (i386_emit_ops): New.
10702 (x86_emit_ops): New.
10703 (the_low_target): Install x86_emit_ops.
10704 * server.h (struct emit_ops): New.
10705 (get_raw_reg_func_addr): Declare.
10706 (current_insn_ptr, emit_error): Declare.
10707 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10708 (set_trace_state_variable_value): New defines.
10709 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10710 addr_get_trace_state_variable_value and
10711 addr_set_trace_state_variable_value.
10712 (symbol_list): New fields for get_raw_reg,
10713 get_trace_state_variable_value and set_trace_state_variable_value.
10714 (condfn): New typedef.
10715 (struct tracepoint): New field `compiled_cond'.
10716 (do_action_at_tracepoint): Clear compiled_cond.
10717 (get_trace_state_variable_value, set_trace_state_variable_value):
10718 Export in the IPA.
10719 (condition_true_at_tracepoint): If there's a compiled condition,
10720 run that.
10721 (current_insn_ptr, emit_error): New globals.
10722 (struct bytecode_address): New.
10723 (get_raw_reg_func_addr): New.
10724 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10725 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10726 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10727 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10728 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10729 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10730 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10731 (compile_tracepoint_condition, compile_bytecodes): New.
10732 * target.h (emit_ops): Forward declare.
10733 (struct target_ops): New field emit_ops.
10734 (target_emit_ops): New.
10735 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10736 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10737 * linux-low.c (linux_emit_ops): New.
10738 (linux_target_ops): Install it.
10739 * linux-low.h (struct linux_target_ops): New field emit_ops.
10740
10741 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10742
10743 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10744 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10745
10746 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10747 Stan Shebs <stan@codesourcery.com>
10748
10749 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10750 (all): Depend on $(extra_libraries).
10751 (install-only): Install the IPA.
10752 (IPA_OBJS, IPA_LIB): New.
10753 (clean): Remove the IPA lib.
10754 (IPAGENT_CFLAGS): New.
10755 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10756 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10757 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10758 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10759 * configure.ac: Check for atomic builtins support in the compiler.
10760 (IPA_DEPFILES, extra_libraries): Define.
10761 * configure.srv (ipa_obj): Add description.
10762 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10763 (i[34567]86-*-linux*): Set ipa_obj.
10764 (x86_64-*-linux*): Set ipa_obj.
10765 * linux-low.c (stabilizing_threads): New.
10766 (supports_fast_tracepoints): New.
10767 (linux_detach): Stabilize threads before detaching.
10768 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10769 the lwp is either not stabilizing, or is moving out of a jump pad.
10770 (linux_fast_tracepoint_collecting): New.
10771 (maybe_move_out_of_jump_pad): New.
10772 (enqueue_one_deferred_signal): New.
10773 (dequeue_one_deferred_signal): New.
10774 (linux_wait_for_event_1): If moving out of a jump pad, defer
10775 pending signals to later.
10776 (linux_stabilize_threads): New.
10777 (linux_wait_1): Check if threads need moving out of jump pads, and
10778 do it if so.
10779 (stuck_in_jump_pad_callback): New.
10780 (move_out_of_jump_pad_callback): New.
10781 (lwp_running): New.
10782 (linux_resume_one_lwp): Handle moving out of jump pads.
10783 (linux_set_resume_request): Dequeue deferred signals.
10784 (need_step_over_p): Also step over fast tracepoint jumps.
10785 (start_step_over): Also uninsert fast tracepoint jumps.
10786 (finish_step_over): Also reinsert fast tracepoint jumps.
10787 (linux_install_fast_tracepoint_jump): New.
10788 (linux_target_ops): Install linux_stabilize_threads and
10789 linux_install_fast_tracepoint_jump_pad.
10790 * linux-low.h (linux_target_ops) <get_thread_area,
10791 install_fast_tracepoint_jump_pad>: New fields.
10792 (struct lwp_info) <collecting_fast_tracepoint,
10793 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10794 (linux_get_thread_area): Declare.
10795 * linux-x86-low.c (jump_insn): New.
10796 (x86_get_thread_area): New.
10797 (append_insns): New.
10798 (push_opcode): New.
10799 (amd64_install_fast_tracepoint_jump_pad): New.
10800 (i386_install_fast_tracepoint_jump_pad): New.
10801 (x86_install_fast_tracepoint_jump_pad): New.
10802 (the_low_target): Install x86_get_thread_area and
10803 x86_install_fast_tracepoint_jump_pad.
10804 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10805 (struct fast_tracepoint_jump): New.
10806 (fast_tracepoint_jump_insn): New.
10807 (fast_tracepoint_jump_shadow): New.
10808 (find_fast_tracepoint_jump_at): New.
10809 (fast_tracepoint_jump_here): New.
10810 (delete_fast_tracepoint_jump): New.
10811 (set_fast_tracepoint_jump): New.
10812 (uninsert_fast_tracepoint_jumps_at): New.
10813 (reinsert_fast_tracepoint_jumps_at): New.
10814 (set_breakpoint_at): Use write_inferior_memory.
10815 (uninsert_raw_breakpoint): Use write_inferior_memory.
10816 (check_mem_read): Mask out fast tracepoint jumps.
10817 (check_mem_write): Mask out fast tracepoint jumps.
10818 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10819 (set_fast_tracepoint_jump): Declare.
10820 (delete_fast_tracepoint_jump)
10821 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10822 (reinsert_fast_tracepoint_jumps_at): Declare.
10823 * regcache.c: Don't compile many functions when building the
10824 in-process agent library.
10825 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10826 the register buffer in the heap.
10827 (free_register_cache): If the register buffer isn't owned by the
10828 regcache, don't free it.
10829 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10830 pre-existing register caches.
10831 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10832 type.
10833 (convert_ascii_to_int): : Constify `from' parameter type.
10834 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10835 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10836 the needed buffer in-place.
10837 (relocate_instruction): New.
10838 * server.c (handle_query) <qSymbols>: If the target supports
10839 tracepoints, give it a chance of looking up symbols. Report
10840 support for fast tracepoints.
10841 (handle_status): Stabilize threads.
10842 (process_serial_event): Adjust.
10843 * server.h (struct fast_tracepoint_jump): Forward declare.
10844 (struct process_info) <fast_tracepoint_jumps>: New field.
10845 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10846 (decode_X_packet, decode_M_packet): Adjust.
10847 (relocate_instruction): Declare.
10848 (in_process_agent_loaded): Declare.
10849 (tracepoint_look_up_symbols): Declare.
10850 (struct fast_tpoint_collect_status): Declare.
10851 (fast_tracepoint_collecting): Declare.
10852 (force_unlock_trace_buffer): Declare.
10853 (handle_tracepoint_bkpts): Declare.
10854 (initialize_low_tracepoint)
10855 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10856 * target.h (struct target_ops) <stabilize_threads,
10857 install_fast_tracepoint_jump_pad>: New fields.
10858 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10859 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10860 [HAVE_STDINT_H]: Include stdint.h.
10861 (trace_debug_1): Rename to ...
10862 (trace_vdebug): ... this.
10863 (trace_debug): Rename to ...
10864 (trace_debug_1): ... this. Add `level' parameter.
10865 (trace_debug): New.
10866 (ATTR_USED, ATTR_NOINLINE): New.
10867 (IP_AGENT_EXPORT): New.
10868 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10869 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10870 (about_to_request_buffer_space, trace_buffer_is_full)
10871 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10872 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10873 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10874 (traceframe_write_count, traceframes_created)
10875 (trace_state_variables)
10876 New renaming defines.
10877 (struct ipa_sym_addresses): New.
10878 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10879 (symbol_list): New.
10880 (ipa_sym_addrs): New.
10881 (all_tracepoint_symbols_looked_up): New.
10882 (in_process_agent_loaded): New.
10883 (write_e_ipa_not_loaded): New.
10884 (maybe_write_ipa_not_loaded): New.
10885 (tracepoint_look_up_symbols): New.
10886 (debug_threads) [IN_PROCESS_AGENT]: New.
10887 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10888 (UNKNOWN_SIDE_EFFECTS): New.
10889 (stop_tracing): New.
10890 (flush_trace_buffer): New.
10891 (stop_tracing_bkpt): New.
10892 (flush_trace_buffer_bkpt): New.
10893 (read_inferior_integer): New.
10894 (read_inferior_uinteger): New.
10895 (read_inferior_data_pointer): New.
10896 (write_inferior_data_pointer): New.
10897 (write_inferior_integer): New.
10898 (write_inferior_uinteger): New.
10899 (struct collect_static_trace_data_action): Delete.
10900 (enum tracepoint_type): New.
10901 (struct tracepoint) <type>: New field `type'.
10902 <actions_str, step_actions, step_actions_str>: Only include in
10903 GDBserver.
10904 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10905 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10906 (tracepoints): Use IP_AGENT_EXPORT.
10907 (last_tracepoint): Don't include in the IPA.
10908 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10909 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10910 (alloced_trace_state_variables): New.
10911 (trace_state_variables): Use IP_AGENT_EXPORT.
10912 (traceframe_t): Delete unused variable.
10913 (circular_trace_buffer): Don't include in the IPA.
10914 (trace_buffer_start): Delete.
10915 (struct trace_buffer_control): New.
10916 (trace_buffer_free): Delete.
10917 (struct ipa_trace_buffer_control): New.
10918 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10919 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10920 New.
10921 (trace_buffer_ctrl): New.
10922 (TRACE_BUFFER_CTRL_CURR): New.
10923 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10924 Reimplement as macros.
10925 (trace_buffer_wrap): Delete.
10926 (traceframe_write_count, traceframe_read_count)
10927 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10928 (struct tracepoint_hit_ctx) <type>: New field.
10929 (struct fast_tracepoint_ctx): New.
10930 (memory_barrier): New.
10931 (cmpxchg): New.
10932 (record_tracepoint_error): Update atomically in the IPA.
10933 (clear_inferior_trace_buffer): New.
10934 (about_to_request_buffer_space): New.
10935 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10936 updating the same buffer.
10937 (add_tracepoint): Default the tracepoint's type to trap
10938 tracepoint, and orig_size to -1.
10939 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10940 internal variables.
10941 (create_trace_state_variable): New parameter `gdb'. Handle it.
10942 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10943 (cmd_qtdp): Handle fast tracepoints.
10944 (cmd_qtdv): Adjust.
10945 (max_jump_pad_size): New.
10946 (gdb_jump_pad_head): New.
10947 (get_jump_space_head): New.
10948 (claim_jump_space): New.
10949 (sort_tracepoints): New.
10950 (MAX_JUMP_SIZE): New.
10951 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10952 IPA.
10953 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10954 support. Upload fast traceframes, and delete internal IPA
10955 breakpoints.
10956 (stop_tracing_handler): New.
10957 (flush_trace_buffer_handler): New.
10958 (cmd_qtstop): Upload fast tracepoints.
10959 (response_tracepoint): Handle fast tracepoints.
10960 (tracepoint_finished_step): Upload fast traceframes. Set the
10961 tracepoint hit context's tracepoint type.
10962 (handle_tracepoint_bkpts): New.
10963 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10964 type. Add comment about fast tracepoints.
10965 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10966 non-existing action_str field.
10967 (get_context_regcache): Handle fast tracepoints.
10968 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10969 to the regcache.
10970 (fast_tracepoint_from_jump_pad_address): New.
10971 (fast_tracepoint_from_ipa_tpoint_address): New.
10972 (collecting_t): New.
10973 (force_unlock_trace_buffer): New.
10974 (fast_tracepoint_collecting): New.
10975 (collecting): New.
10976 (gdb_collect): New.
10977 (write_inferior_data_ptr): New.
10978 (target_tp_heap): New.
10979 (target_malloc): New.
10980 (download_agent_expr): New.
10981 (UALIGN): New.
10982 (download_tracepoints): New.
10983 (download_trace_state_variables): New.
10984 (upload_fast_traceframes): New.
10985 (IPA_FIRST_TRACEFRAME): New.
10986 (IPA_NEXT_TRACEFRAME_1): New.
10987 (IPA_NEXT_TRACEFRAME): New.
10988 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10989 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10990 (gdb_jump_pad_buffer_end): New.
10991 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10992 (initialize_tracepoint): Adjust.
10993 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10994 buffer. Initialize the low module.
10995 * utils.c (PREFIX, TOOLNAME): New.
10996 (malloc_failure): Use PREFIX.
10997 (error): In the IPA, an error causes an exit.
10998 (fatal, warning): Use PREFIX.
10999 (internal_error): Use TOOLNAME.
11000 (NUMCELLS): Increase to 10.
11001 * configure, config.in: Regenerate.
11002
11003 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11004
11005 * server.c (handle_query) <qSupported>: Do two passes over the
11006 qSupported string to avoid nesting strtok.
11007
11008 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11009
11010 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11011 (CDEPS): New.
11012 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11013 -Wl,--dynamic-list.
11014 * configure: Regenerate.
11015 * proc-service.list: New.
11016
11017 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11018
11019 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11020 New comment.
11021
11022 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11023
11024 * gdbreplay.c (remote_open): Check error return from socket() call by
11025 its equality to -1 not by it being negative.
11026 * remote-utils.c (remote_open): Likewise.
11027
11028 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11029
11030 * config.h: Regenerate.
11031
11032 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11033
11034 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11035 doesn't provide PTRACE_GET_THREAD_AREA.
11036
11037 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11038
11039 * linux-m68k-low.c: Include <asm/ptrace.h>
11040 (ps_get_thread_area): Implement.
11041
11042 2010-05-03 Doug Evans <dje@google.com>
11043
11044 * event-loop.c (struct callback_event): New struct.
11045 (callback_list): New global.
11046 (append_callback_event, delete_callback_event): New functions.
11047 (process_callback): New function.
11048 (start_event_loop): Call it.
11049 * remote-utils.c (NOT_SCHEDULED): Define.
11050 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11051 moved out of readchar.
11052 (readchar): Rewrite. Call reschedule before returning.
11053 (reset_readchar): New function.
11054 (remote_close): Call it.
11055 (process_remaining, reschedule): New functions.
11056 * server.h (callback_handler_func): New typedef.
11057 (append_callback_event, delete_callback_event): Declare.
11058
11059 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11060
11061 * proc-service.c (ps_pglobal_lookup): Use
11062 thread_db_look_up_one_symbol.
11063 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11064 parameter. Use it instead of all_symbols_looked_up.
11065 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11066 field.
11067 (all_symbols_looked_up): Don't declare.
11068 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11069 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11070 field.
11071 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11072 Set all_symbols_looked_up here.
11073 (thread_db_look_up_one_symbol): New.
11074 (thread_db_get_tls_address): Adjust.
11075 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11076 thread_db object on the heap, and tentatively set it in the
11077 process structure.
11078 (thread_db_init): Don't set all_symbols_looked_up here.
11079 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11080
11081 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11082
11083 * linux-low.c (linux_kill, linux_detach): Adjust.
11084 (status_pending_p_callback): Remove redundant statement. Check
11085 for !TARGET_WAITIKIND_IGNORE, instead of
11086 TARGET_WAITKIND_STOPPED.
11087 (handle_tracepoints): Make sure LWP is locked. Adjust.
11088 (linux_wait_for_event_1): Adjust.
11089 (linux_cancel_breakpoints): New.
11090 (unsuspend_one_lwp): New.
11091 (unsuspend_all_lwps): New.
11092 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11093 (send_sigstop_callback): Change return type to int, add new
11094 `except' parameter and handle it.
11095 (suspend_and_send_sigstop_callback): New.
11096 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11097 pass them down. If SUSPEND, also increment the lwp's suspend
11098 count.
11099 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11100 (need_step_over_p): Don't consider suspended LWPs.
11101 (start_step_over): Adjust.
11102 (proceed_one_lwp): Change return type to int, add new `except'
11103 parameter and handle it.
11104 (unsuspend_and_proceed_one_lwp): New.
11105 (proceed_all_lwps): Use find_inferior instead of
11106 for_each_inferior.
11107 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11108 also decrement the suspend count of LWPs. Pass `except' down,
11109 instead of hacking its suspend count.
11110 (linux_pause_all): Add `freeze' parameter. Adjust.
11111 (linux_unpause_all): New.
11112 (linux_target_ops): Install linux_unpause_all.
11113 * server.c (handle_status): Adjust.
11114 * target.h (struct target_ops): New fields `unpause_all' and
11115 `cancel_breakpoints'. Add new parameter to `pause_all'.
11116 (pause_all): Add new `freeze' parameter.
11117 (unpause_all): New.
11118 (cancel_breakpoints): New.
11119 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11120 cancel breakpoints.
11121 (cmd_qtstart): Pause threads.
11122 (stop_tracing): Pause threads, and cancel breakpoints.
11123 * win32-low.c (win32_target_ops): Adjust.
11124
11125 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11126
11127 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11128 the inferior right away from here...
11129 (linux_wait_1): ... to here, and adjust to check the thread's
11130 last_resume_kind instead of the lwp's step or stop_expected flags.
11131
11132 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11133
11134 * README: Use consistent `GDB' and `GDBserver' spellings.
11135
11136 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11137
11138 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11139 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11140 (linux_detach_one_lwp): Assume the lwp is stopped.
11141 (any_thread_of): Delete.
11142 (linux_detach): Stop all lwps here. Don't blindly delete all
11143 breakpoints.
11144 (delete_lwp_callback): New.
11145 (linux_mourn): Delete all lwps of the process that is gone.
11146 (linux_wait_1): Don't delete the last lwp of the process here.
11147 * mem-break.h (mark_breakpoints_out): Declare.
11148 * mem-break.c (mark_breakpoints_out): New.
11149 (free_all_breakpoints): Use it.
11150 * server.c (handle_target_event): If the process is gone, mark
11151 breakpoints out.
11152 * thread-db.c (struct thread_db) <create_bp>: New field.
11153 (thread_db_enable_reporting): Fix prototype. Store a thread event
11154 breakpoint reference in the thread_db struct.
11155 (thread_db_load_search): Clear the thread_db object.
11156 (try_thread_db_load_1): Ditto.
11157 (switch_to_process): New.
11158 (disable_thread_event_reporting): Use it.
11159 (remove_thread_event_breakpoints): New.
11160 (thread_db_detach, thread_db_mourn): Use it.
11161
11162 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11163
11164 * linux-low.c (linux_enable_event_reporting): New.
11165 (linux_wait_for_event_1, handle_extended_wait): Use it.
11166
11167 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11168
11169 * linux-low.c (linux_kill_one_lwp, linux_kill)
11170 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11171 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11172 SIGSTOP even if the LWP is stopped.
11173 (send_sigstop_callback): New.
11174 (stop_all_lwps): Use send_sigstop_callback instead.
11175 (linux_resume_one_thread): Adjust.
11176 (proceed_one_lwp): Still proceed an LWP that the client has
11177 requested to stop, if we haven't reported it as stopped yet. Make
11178 sure that LWPs the client want stopped, have a pending SIGSTOP.
11179
11180 2010-04-26 Doug Evans <dje@google.com>
11181
11182 * server.c (handle_general_set): Make static.
11183
11184 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11185 Print received char after testing for error/eof instead of before.
11186 (input_interrupt): Tweak comment.
11187
11188 2010-04-23 Doug Evans <dje@google.com>
11189
11190 * server.c (start_inferior): Print inferior argv if --debug.
11191
11192 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11193
11194 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11195 * nto-x86-low.c: Include server.h
11196
11197 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11198
11199 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11200 be consistent with other sources of this directory.
11201 (init_registers_amd64): Correct name of source file of this function
11202 in the comment.
11203
11204 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11205
11206 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11207 64-bit executables.
11208
11209 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11210
11211 * win32-i386-low.c: Add 64-bit support.
11212 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11213 (init_registers_amd64): Declare.
11214 (mappings): Add 64-bit version of array.
11215 (init_windows_x86): New function.
11216 (the_low_target): Change init_arch field to init_windows_x86.
11217
11218 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11219
11220 * win32-low.c: Adapt to support also 64-bit architecture.
11221 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11222 (get_image_name): Use SIZE_T type for local variable `done'.
11223 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11224 (toolhelp_get_dll_name): Idem.
11225 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11226 Use uintptr_t typecast to avoid warning.
11227 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11228 (handle_exception): Use phex_nz to avoid warning.
11229 (win32_wait): Remove unused local variable `process'.
11230
11231 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11232
11233 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11234 `amd64-avx.o'.
11235
11236 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11237
11238 * configure.ac: Use `ws2_32' library for srv_mingw.
11239 * configure: Regenerate.
11240 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11241 * remote-utils.c: Likewise.
11242
11243 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11244
11245 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11246 if __x86_64__ is defined.
11247
11248 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11249
11250 * configure: Regenerate.
11251
11252 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11253
11254 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11255 * target.h (target_ops): New get_tib_address field.
11256 * win32-low.h (win32_thread_info): Add thread_local_base field.
11257 * win32-low.c (child_add_thread): Add tlb argument.
11258 Set thread_local_base field to TLB.
11259 (get_child_debug_event): Adapt to child_add_thread change.
11260 (win32_get_tib_address): New function.
11261 (win32_target_ops): Set get_tib_address field to
11262 win32_get_tib_address.
11263 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11264
11265 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11266
11267 * linux-low.c (linux_mourn): Also remove the process.
11268 * server.c (handle_target_event): Don't remove the process here.
11269 * nto-low.c (nto_mourn): New.
11270 (nto_target_ops): Install it.
11271 * spu-low.c (spu_mourn): New.
11272 (spu_target_ops): Install it.
11273 * win32-low.c (win32_mourn): New.
11274 (win32_target_ops): Install it.
11275
11276 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11277
11278 * server.h (buffer_xml_printf): Remove redundant `;'.
11279
11280 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11281
11282 * regcache.c (set_register_cache): Invalidate regcaches before
11283 changing the register cache layout.
11284 (regcache_invalidate_one): Allow a NULL regcache.
11285 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11286 regcaches before changing the register cache layout or the target
11287 regsets.
11288
11289 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11290
11291 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11292 variable warning on Linux/x86-64.
11293
11294 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11295
11296 GDBserver disconnected tracing support.
11297
11298 * linux-low.c (linux_remove_process): Delete.
11299 (add_lwp): Don't set last_resume_kind here.
11300 (linux_kill): Use `mourn'.
11301 (linux_detach): Use `thread_db_detach', and `mourn'.
11302 (linux_mourn): New.
11303 (linux_attach_lwp_1): Adjust comment.
11304 (linux_attach): last_resume_kind moved the thread_info; adjust.
11305 (status_pending_p_callback): Adjust.
11306 (linux_wait_for_event_1): Adjust.
11307 (count_events_callback, select_singlestep_lwp_callback)
11308 (select_event_lwp_callback, cancel_breakpoints_callback)
11309 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11310 (proceed_one_lwp): Adjust.
11311 (linux_async): Add debug output.
11312 (linux_thread_stopped): New.
11313 (linux_pause_all): New.
11314 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11315 linux_pause_all.
11316 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11317 (thread_db_free): Delete declaration.
11318 (thread_db_detach, thread_db_mourn): Declare.
11319 * thread-db.c (thread_db_init): Use thread_db_mourn.
11320 (thread_db_free): Delete, split in two.
11321 (disable_thread_event_reporting): New.
11322 (thread_db_detach): New.
11323 (thread_db_mourn): New.
11324
11325 * server.h (struct thread_info) <last_resume_kind>: New field.
11326 <attached>: Add comment.
11327 <gdb_detached>: New field.
11328 (handler_func): Change return type to int.
11329 (handle_serial_event, handle_target_event): Ditto.
11330 (gdb_connected): Declare.
11331 (tracing): Delete.
11332 (disconnected_tracing): Declare.
11333 (stop_tracing): Declare.
11334
11335 * server.c (handle_query) <qSupported>: Report support for
11336 disconnected tracing.
11337 (queue_stop_reply_callback): Account for running threads.
11338 (gdb_wants_thread_stopped): New.
11339 (gdb_wants_all_threads_stopped): New.
11340 (gdb_reattached_process): New.
11341 (handle_status): Clear the `gdb_detached' flag of all processes.
11342 In all-stop, stop all threads.
11343 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11344 (process_serial_event): If the remote connection breaks, or if an
11345 exit was forced with "monitor exit", force an event loop exit.
11346 Handle disconnected tracing on detach.
11347 (handle_serial_event): Adjust.
11348 (handle_target_event): If GDB isn't connected, forward events back
11349 to the inferior, unless the last process exited, in which case,
11350 exit gdbserver. Adjust interface.
11351
11352 * remote-utils.c (remote_open): Don't block in accept. Instead
11353 register an event loop source on the listen socket file
11354 descriptor. Refactor bits into ...
11355 (listen_desc): ... this new global.
11356 (gdb_connected): ... this new function.
11357 (enable_async_notification): ... this new function.
11358 (handle_accept_event): ... this new function.
11359 (remote_close): Clear remote_desc.
11360
11361 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11362
11363 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11364 New fields.
11365 (mourn_inferior): Define.
11366 (target_process_qsupported): Avoid the dangling else problem.
11367 (thread_stopped): Define.
11368 (pause_all): Define.
11369 (target_waitstatus_to_string): Declare.
11370 * target.c (target_waitstatus_to_string): New.
11371
11372 * tracepoint.c (tracing): Make extern.
11373 (disconnected_tracing): New.
11374 (stop_tracing): Make extern. Handle tracing stops due to GDB
11375 disconnecting.
11376 (cmd_qtdisconnected): New.
11377 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11378 (handle_tracepoint_general_set): Handle QTDisconnected.
11379
11380 * event-loop.c (event_handler_func): Change return type to int.
11381 (process_event): Bail out if the event handler wants the event
11382 loop to stop.
11383 (handle_file_event): Ditto.
11384 (start_event_loop): Bail out if the event handler wants the event
11385 loop to stop.
11386
11387 * nto-low.c (nto_target_ops): Adjust.
11388 * spu-low.c (spu_wait): Don't remove the process here.
11389 (spu_target_ops): Adjust.
11390 * win32-low.c (win32_wait): Don't remove the process here.
11391 (win32_target_ops): Adjust.
11392
11393 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11394
11395 * regcache.c (realloc_register_cache): Invalidate inferior's
11396 regcache before recreating it.
11397
11398 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11399
11400 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11401
11402 2010-04-09 Stan Shebs <stan@codesourcery.com>
11403 Pedro Alves <pedro@codesourcery.com>
11404
11405 * server.h (LONGEST): New.
11406 (struct thread_info) <while_stepping>: New field.
11407 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11408 Declare.
11409 (initialize_tracepoint, handle_tracepoint_general_set)
11410 (handle_tracepoint_query, tracepoint_finished_step)
11411 (tracepoint_was_hit, release_while_stepping_state_list):
11412 (current_traceframe): Declare.
11413 * server.c (handle_general_set): Handle tracepoint packets.
11414 (read_memory): New.
11415 (write_memory): New.
11416 (handle_search_memory_1): Use read_memory.
11417 (handle_query): Report support for conditional tracepoints, trace
11418 state variables, and tracepoint sources. Handle tracepoint
11419 queries.
11420 (main): Initialize the tracepoints module.
11421 (process_serial_event): Handle traceframe reads/writes.
11422
11423 * linux-low.c (handle_tracepoints): New.
11424 (linux_wait_1): Call it.
11425 (linux_resume_one_lwp): Handle while-stepping.
11426 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11427 (linux_target_ops): Install them.
11428 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11429 New field.
11430 * linux-x86-low.c (x86_supports_tracepoints): New.
11431 (the_low_target). Install it.
11432
11433 * mem-break.h (delete_breakpoint): Declare.
11434 * mem-break.c (delete_breakpoint): Make external.
11435
11436 * target.h (struct target_ops): Add `supports_tracepoints',
11437 `read_pc', and `write_pc' fields.
11438 (target_supports_tracepoints): Define.
11439 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11440 (phex_nz): New.
11441
11442 * regcache.h (struct regcache) <registers_owned>: New field.
11443 (init_register_cache, regcache_cpy): Declare.
11444 (regcache_read_pc, regcache_write_pc): Declare.
11445 (register_cache_size): Declare.
11446 (supply_regblock): Declare.
11447 * regcache.c (init_register_cache): New.
11448 (new_register_cache): Use it.
11449 (regcache_cpy): New.
11450 (register_cache_size): New.
11451 (supply_regblock): New.
11452 (regcache_read_pc, regcache_write_pc): New.
11453
11454 * tracepoint.c: New.
11455
11456 * Makefile.in (OBS): Add tracepoint.o.
11457 (tracepoint.o): New rule.
11458
11459 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11460
11461 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11462 (i386-mmx.o): New.
11463 (i386-mmx.c): Likewise.
11464 (i386-mmx-linux.o): Likewise.
11465 (i386-mmx-linux.c): Likewise.
11466
11467 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11468 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11469 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11470 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11471
11472 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11473 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11474 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11475
11476 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11477
11478 * Makefile.in (clean): Updated.
11479 (i386-avx.o): New.
11480 (i386-avx.c): Likewise.
11481 (i386-avx-linux.o): Likewise.
11482 (i386-avx-linux.c): Likewise.
11483 (amd64-avx.o): Likewise.
11484 (amd64-avx.c): Likewise.
11485 (amd64-avx-linux.o): Likewise.
11486 (amd64-avx-linux.c): Likewise.
11487
11488 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11489 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11490 (srv_amd64_regobj): Add amd64-avx.o.
11491 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11492 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11493 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11494 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11495 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11496 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11497 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11498
11499 * i387-fp.c: Include "i386-xstate.h".
11500 (i387_xsave): New.
11501 (i387_cache_to_xsave): Likewise.
11502 (i387_xsave_to_cache): Likewise.
11503 (x86_xcr0): Likewise.
11504
11505 * i387-fp.h (i387_cache_to_xsave): Likewise.
11506 (i387_xsave_to_cache): Likewise.
11507 (x86_xcr0): Likewise.
11508
11509 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11510 * linux-crisv32-low.c (target_regsets): Likewise.
11511 * linux-m68k-low.c (target_regsets): Likewise.
11512 * linux-mips-low.c (target_regsets): Likewise.
11513 * linux-ppc-low.c (target_regsets): Likewise.
11514 * linux-s390-low.c (target_regsets): Likewise.
11515 * linux-sh-low.c (target_regsets): Likewise.
11516 * linux-sparc-low.c (target_regsets): Likewise.
11517 * linux-xtensa-low.c (target_regsets): Likewise.
11518
11519 * linux-low.c: Include <sys/uio.h>.
11520 (regsets_fetch_inferior_registers): Support nt_type.
11521 (regsets_store_inferior_registers): Likewise.
11522 (linux_process_qsupported): New.
11523 (linux_target_ops): Add linux_process_qsupported.
11524
11525 * linux-low.h (regset_info): Add nt_type.
11526 (linux_target_ops): Add process_qsupported.
11527
11528 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11529 and <sys/uio.h>.
11530 (init_registers_i386_avx_linux): New.
11531 (init_registers_amd64_avx_linux): Likewise.
11532 (xmltarget_i386_linux_no_xml): Likewise.
11533 (xmltarget_amd64_linux_no_xml): Likewise.
11534 (PTRACE_GETREGSET): Likewise.
11535 (PTRACE_SETREGSET): Likewise.
11536 (x86_fill_xstateregset): Likewise.
11537 (x86_store_xstateregset): Likewise.
11538 (use_xml): Likewise.
11539 (x86_linux_update_xmltarget): Likewise.
11540 (x86_linux_process_qsupported): Likewise.
11541 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11542 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11543 init_registers_i386_linux here. Call
11544 x86_linux_update_xmltarget.
11545 (the_low_target): Add x86_linux_process_qsupported.
11546
11547 * server.c (handle_query): Call target_process_qsupported.
11548
11549 * target.h (target_ops): Add process_qsupported.
11550 (target_process_qsupported): New.
11551
11552 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11553
11554 * inferiors.c (add_thread): Set last_status kind to
11555 TARGET_WAITKIND_IGNORE.
11556 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11557 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11558 (linux_wait_1): Move `thread' local definition to block that uses
11559 it. Don't NULL initialize `event_child'.
11560 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11561 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11562 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11563
11564 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11565
11566 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11567 an extended waitstatus, or by a watchpoint.
11568 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11569 thread was stepping or has been stopped by a watchpoint.
11570
11571 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11572
11573 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11574 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11575 of another, then delete the previous, and validate all
11576 breakpoints.
11577 (validate_inserted_breakpoint): New.
11578 (delete_disabled_breakpoints): New.
11579 (validate_breakpoints): New.
11580 (check_mem_read): Validate breakpoints before trusting their
11581 shadow. Delete disabled breakpoints.
11582 (check_mem_write): Validate breakpoints before trusting they
11583 should be inserted. Delete disabled breakpoints.
11584 * mem-break.h (validate_breakpoints):
11585 * server.c (handle_query): Validate breakpoints when we see a
11586 qSymbol query.
11587
11588 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11589
11590 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11591 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11592 if we could tell there's a GDB breakpoint at stop_pc.
11593 (need_step_over_p): Don't do a step over if we find a GDB
11594 breakpoint at the resume PC.
11595
11596 * mem-break.c (struct raw_breakpoint): New.
11597 (enum bkpt_type): New type `gdb_breakpoint'.
11598 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11599 fields. New field `raw'.
11600 (find_raw_breakpoint_at): New.
11601 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11602 breakpoint instead.
11603 (set_breakpoint_at): Adjust.
11604 (delete_raw_breakpoint): New.
11605 (release_breakpoint): New.
11606 (delete_breakpoint): Rename to...
11607 (delete_breakpoint_1): ... this. Add proc parameter. Use
11608 release_breakpoint. Return ENOENT.
11609 (delete_breakpoint): Reimplement.
11610 (find_breakpoint_at): Delete.
11611 (find_gdb_breakpoint_at): New.
11612 (delete_breakpoint_at): Delete.
11613 (set_gdb_breakpoint_at): New.
11614 (delete_gdb_breakpoint_at): New.
11615 (gdb_breakpoint_here): New.
11616 (set_reinsert_breakpoint): Use release_breakpoint.
11617 (uninsert_breakpoint): Rename to ...
11618 (uninsert_raw_breakpoint): ... this.
11619 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11620 (reinsert_raw_breakpoint): Change parameter type to
11621 raw_breakpoint.
11622 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11623 instead.
11624 (check_breakpoints): Adjust. Use release_breakpoint.
11625 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11626 (breakpoint_inserted_here): Ditto.
11627 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11628 Don't trust the breakpoint's shadow if it is not inserted.
11629 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11630 (delete_all_breakpoints): Adjust.
11631 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11632 use delete_breakpoint_1.
11633
11634 * mem-break.h (breakpoints_supported): Delete declaration.
11635 (set_gdb_breakpoint_at): Declare.
11636 (gdb_breakpoint_here): Declare.
11637 (delete_breakpoint_at): Delete.
11638 (delete_gdb_breakpoint_at): Declare.
11639
11640 * server.h (struct raw_breakpoint): Forward declare.
11641 (struct process_info): New field `raw_breakpoints'.
11642
11643 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11644 breakpoints.
11645
11646 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11647
11648 * linux-low.c (status_pending_p_callback): Fix comment.
11649 (linux_wait_for_event_1): Move most of the internal breakpoint
11650 handling from here...
11651 (linux_wait_1): ... to here.
11652 (count_events_callback): New.
11653 (select_singlestep_lwp_callback): New.
11654 (select_event_lwp_callback): New.
11655 (cancel_breakpoints_callback): New.
11656 (select_event_lwp): New.
11657 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11658 priority to all LWPs that have had events that should be reported
11659 to the client. Cancel breakpoints when about to reporting the
11660 event to the client, not while stopping lwps. No longer cancel
11661 finished single-steps here.
11662 (cancel_finished_single_step): Delete.
11663 (cancel_finished_single_steps): Delete.
11664
11665 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11666
11667 * mem-break.c (enum bkpt_type): New.
11668 (struct breakpoint): New field `type'.
11669 (set_breakpoint_at): Change return type to struct breakpoint
11670 pointer. Set type to `other_breakpoint' by default.
11671 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11672 in the breakpoint list.
11673 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11674 (reinsert_breakpoint): Rename to ...
11675 (reinsert_raw_breakpoint): ... this.
11676 (reinsert_breakpoints_at): Adjust.
11677 * mem-break.h (struct breakpoint): Declare.
11678 (set_breakpoint_at): Change return type to struct breakpoint
11679 pointer.
11680
11681 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11682
11683 * server.c (handle_query): Assign, not compare.
11684
11685 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11686
11687 Teach linux gdbserver to step-over-breakpoints.
11688
11689 * linux-low.c (can_hardware_single_step): New.
11690 (supports_breakpoints): New.
11691 (handle_extended_wait): If stopping threads, read the stop pc of
11692 the new cloned LWP.
11693 (get_pc): New.
11694 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11695 low target doesn't support retrieving the PC.
11696 (add_lwp): Set last_resume_kind to resume_continue.
11697 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11698 (linux_attach): Don't clear stop_expected. Set the lwp's
11699 last_resume_kind to resume_stop.
11700 (linux_detach_one_lwp): Don't check for removed breakpoints.
11701 (check_removed_breakpoint): Delete.
11702 (status_pending_p): Rename to ...
11703 (status_pending_p_callback): ... this. Don't check for removed
11704 breakpoints. Don't consider threads that are stopped from GDB's
11705 perspective.
11706 (linux_wait_for_lwp): Always read the stop_pc here.
11707 (cancel_breakpoint): New.
11708 (step_over_bkpt): New global.
11709 (linux_wait_for_event_1): Implement stepping over breakpoints.
11710 (gdb_wants_lwp_stopped): New.
11711 (gdb_wants_all_stopped): New.
11712 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11713 single-step traps here. Store the thread's last reported target
11714 wait status.
11715 (send_sigstop): Don't clear stop_expected. Always set it,
11716 instead.
11717 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11718 (cancel_finished_single_step): New.
11719 (cancel_finished_single_steps): New.
11720 (wait_for_sigstop): Don't cancel finished single-step traps here.
11721 (linux_resume_one_lwp): Don't check for removed breakpoints.
11722 Don't set `step' on non-hardware step archs.
11723 (linux_set_resume_request): Ignore resume_stop requests if already
11724 stopping or stopped. Set the lwp's last_resume_kind.
11725 (resume_status_pending_p): Don't check for removed breakpoints.
11726 (need_step_over_p): New.
11727 (start_step_over): New.
11728 (finish_step_over): New.
11729 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11730 requests. Clear the thread's last reported target waitstatus.
11731 Don't use the `suspended' flag. Don't consider pending breakpoints.
11732 (linux_resume): Start a step-over if necessary.
11733 (proceed_one_lwp): New.
11734 (proceed_all_lwps): New.
11735 (unstop_all_lwps): New.
11736 * linux-low.h (struct lwp_info): Rewrite comment for the
11737 `suspended' flag. Add the `stop_pc' field. Delete the
11738 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11739 Add `'last_resume_kind' and `need_step_over' fields.
11740 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11741 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11742 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11743 (set_raw_breakpoint_at): New.
11744 (set_breakpoint_at): Rewrite to use it.
11745 (reinsert_breakpoint_handler): Delete.
11746 (set_reinsert_breakpoint): New.
11747 (reinsert_breakpoint_by_bp): Delete.
11748 (delete_reinsert_breakpoints): New.
11749 (uninsert_breakpoint): Rewrite.
11750 (uninsert_breakpoints_at): New.
11751 (reinsert_breakpoint): Rewrite.
11752 (reinsert_breakpoints_at): New.
11753 (check_breakpoints): Rewrite.
11754 (breakpoint_here): New.
11755 (breakpoint_inserted_here): New.
11756 (check_mem_read): Adjust.
11757 * mem-break.h (breakpoints_supported, breakpoint_here)
11758 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11759 (reinsert_breakpoint_by_bp): Delete declaration.
11760 (delete_reinsert_breakpoints): Declare.
11761 (reinsert_breakpoint): Delete declaration.
11762 (reinsert_breakpoints_at): Declare.
11763 (uninsert_breakpoint): Delete declaration.
11764 (uninsert_breakpoints_at): Declare.
11765 (check_breakpoints): Adjust prototype.
11766 * server.h: Adjust include order.
11767 (struct thread_info): Declare here. Add a `last_status' field.
11768
11769 2010-03-23 Michael Snyder <msnyder@vmware.com>
11770
11771 * server.c (crc32): New function.
11772 (handle_query): Add handling for 'qCRC:' request.
11773
11774 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11775
11776 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11777 lwp had been stopped by a watchpoint.
11778
11779 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11780
11781 * server.h (internal_error): Declare.
11782 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11783 * utils.c (internal_error): New function.
11784
11785 2010-03-15 Andreas Schwab <schwab@redhat.com>
11786
11787 * configure.srv: Fix typo setting srv_regobj.
11788
11789 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11790
11791 * linux-low.c (fetch_register): Avoid passing a non string literal
11792 format to `error'.
11793 (usr_store_inferior_registers): Ditto.
11794
11795 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11796
11797 * linux-low.c (linux_write_memory): Bail out early if peeking
11798 memory failed.
11799
11800 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11801
11802 * linux-low.h (struct lwp_info): New fields
11803 `stopped_by_watchpoint' and `stopped_data_address'.
11804 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11805 here, and cache them in the lwp object.
11806 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11807 directly.
11808 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11809 field.
11810 (linux_stopped_by_watchpoint): Rewrite.
11811 (linux_stopped_data_address): Rewrite.
11812
11813 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11814
11815 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11816 switching the current inferior, not before.
11817
11818 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11819
11820 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11821 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11822 i386-linux.c and amd64-linux.c.
11823 (reg-i386.o): Removed.
11824 (reg-i386.c): Likewise.
11825 (reg-i386-linux.o): Likewise.
11826 (reg-i386-linux.c): Likewise.
11827 (reg-x86-64.o): Likewise.
11828 (reg-x86-64.c): Likewise.
11829 (reg-x86-64-linux.o): Likewise.
11830 (reg-x86-64-linux.c): Likewise.
11831 (i386.o): New.
11832 (i386.c): Likewise.
11833 (i386-linux.o): Likewise.
11834 (i386-linux.c): Likewise.
11835 (amd64.o): Likewise.
11836 (amd64.c): Likewise.
11837 (amd64-linux.o): Likewise.
11838 (amd64-linux.c): Likewise.
11839
11840 * configure.srv (srv_i386_regobj): New.
11841 (srv_i386_linux_regobj): Likewise.
11842 (srv_amd64_regobj): Likewise.
11843 (srv_amd64_linux_regobj): Likewise.
11844 (srv_i386_32bit_xmlfiles): Likewise.
11845 (srv_i386_64bit_xmlfiles): Likewise.
11846 (srv_i386_xmlfiles): Likewise.
11847 (srv_amd64_xmlfiles): Likewise.
11848 (srv_i386_linux_xmlfiles): Likewise.
11849 (srv_amd64_linux_xmlfiles): Likewise.
11850 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11851 srv_xmlfiles to $srv_i386_xmlfiles.
11852 (i[34567]86-*-mingw32ce*): Likewise.
11853 (i[34567]86-*-mingw*): Likewise.
11854 (i[34567]86-*-nto*): Likewise.
11855 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11856 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11857 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11858 (x86_64-*-linux*): Likewise.
11859
11860 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11861 (init_registers_amd64_linux): New.
11862 (x86_arch_setup): Replace init_registers_x86_64_linux with
11863 init_registers_amd64_linux.
11864
11865 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11866
11867 * configure.ac: Check for libdl. If it is not available link against
11868 static libthread_db.
11869 * configure: Regenerate.
11870
11871 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11872
11873 PR9605
11874
11875 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11876 handing a read watchpoint.
11877 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11878
11879 2010-02-12 Doug Evans <dje@google.com>
11880
11881 * linux-low.c (linux_supports_tracefork_flag): Document.
11882 (linux_look_up_symbols): Add comment.
11883
11884 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11885
11886 * regcache.c (supply_register): Clear regcache if buf is NULL.
11887
11888 2010-02-02 Nicolas Roche <roche@sourceware.org>
11889 Joel Brobecker <brobecker@adacore.com>
11890
11891 * inferiors.c (find_inferior): Add function documentation.
11892 (unloaded_dll): Handle the case where the unloaded dll has not
11893 been previously registered in the dll list.
11894
11895 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11896
11897 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11898 (thumb2_breakpoint): New.
11899 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11900
11901 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11902
11903 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11904 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11905 breakpoints.
11906
11907 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11908
11909 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11910
11911 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11912
11913 * linux-s390-low.c (s390_collect_ptrace_register)
11914 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11915
11916 2010-01-21 Doug Evans <dje@google.com>
11917
11918 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11919 (PTRACE_ARG4_TYPE): New macro.
11920 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11921 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11922 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11923 (usr_store_inferior_registers): Ditto.
11924 (linux_read_memory, linux_write_memory): Ditto.
11925 (linux_test_for_tracefork): Ditto.
11926
11927 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11928 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11929
11930 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11931
11932 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11933 target.
11934
11935 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11936
11937 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11938 prototype to take a regcache. Adjust.
11939
11940 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11941
11942 * regcache.h (struct thread_info): Forward declare.
11943 (struct regcache): New.
11944 (new_register_cache): Adjust prototype.
11945 (get_thread_regcache): Declare.
11946 (free_register_cache): Adjust prototype.
11947 (registers_to_string, registers_from_string): Ditto.
11948 (supply_register, supply_register_by_name, collect_register)
11949 (collect_register_as_string, collect_register_by_name): Ditto.
11950 * regcache.c (struct inferior_regcache_data): Delete.
11951 (get_regcache): Rename to ...
11952 (get_thread_regcache): ... this. Adjust. Switch inferior before
11953 fetching registers.
11954 (regcache_invalidate_one): Adjust.
11955 (regcache_invalidate): Fix prototype.
11956 (new_register_cache): Return the new register cache.
11957 (free_register_cache): Change prototype.
11958 (realloc_register_cache): Adjust.
11959 (registers_to_string): Change prototype to take a regcache. Adjust.
11960 (registers_from_string): Ditto.
11961 (register_data): Ditto.
11962 (supply_register): Ditto.
11963 (supply_register_by_name): Ditto.
11964 (collect_register): Ditto.
11965 (collect_register_as_string): Ditto.
11966 (collect_register_by_name): Ditto.
11967 * server.c (process_serial_event): Adjust.
11968 * linux-low.h (regset_fill_func, regset_store_func): Change
11969 prototype.
11970 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11971 Change prototype.
11972 * linux-low.c (get_stop_pc): Adjust.
11973 (check_removed_breakpoint): Adjust.
11974 (linux_wait_for_event): Adjust.
11975 (linux_resume_one_lwp): Adjust.
11976 (fetch_register): Add regcache parameter. Adjust.
11977 (usr_store_inferior_registers): Ditto.
11978 (regsets_fetch_inferior_registers): Ditto.
11979 (regsets_store_inferior_registers): Ditto.
11980 (linux_fetch_registers, linux_store_registers): Ditto.
11981 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11982 regcache. Adjust.
11983 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11984 Ditto.
11985 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11986 prototype to take a regcache.
11987 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11988 * remote-utils.c (convert_ascii_to_int, outreg)
11989 (prepare_resume_reply): Change prototype to take a regcache.
11990 Adjust.
11991 * target.h (struct target_ops) <fetch_registers, store_registers>:
11992 Change prototype to take a regcache.
11993 (fetch_inferior_registers, store_inferior_registers): Change
11994 prototype to take a regcache. Adjust.
11995 * proc-service.c (ps_lgetregs): Adjust.
11996 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11997 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11998 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11999 take a regcache. Adjust.
12000 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12001 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12002 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12003 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12004 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12005 (cris_cannot_fetch_register):
12006 (cris_breakpoint_at): Change prototype to take a regcache.
12007 Adjust.
12008 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12009 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12010 to take a regcache. Adjust.
12011 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12012 Adjust.
12013 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12014 take a regcache. Adjust.
12015 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12016 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12017 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12018 * linux-mips-low.c (mips_get_pc):
12019 (mips_set_pc): Change prototype to take a regcache. Adjust.
12020 (mips_reinsert_addr): Adjust.
12021 (mips_collect_register): Change prototype to take a regcache.
12022 Adjust.
12023 (mips_supply_register):
12024 (mips_collect_register_32bit, mips_supply_register_32bit)
12025 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12026 (mips_store_fpregset): Ditto.
12027 * linux-ppc-low.c (ppc_supply_ptrace_register)
12028 (ppc_supply_ptrace_register): Ditto.
12029 (parse_spufs_run): Adjust.
12030 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12031 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12032 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12033 take a regcache. Adjust.
12034 * linux-s390-low.c (s390_collect_ptrace_register)
12035 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12036 (s390_set_pc): Change prototype to take a regcache. Adjust.
12037 (s390_arch_setup): Adjust.
12038 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12039 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12040 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12041 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12042 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12043 regcache. Adjust.
12044 (sparc_breakpoint_at): Adjust.
12045 * linux-xtensa-low.c (xtensa_fill_gregset):
12046 (xtensa_store_gregset):
12047 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12048 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12049 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12050 prototype to take a regcache. Adjust.
12051 * win32-arm-low.c (arm_fetch_inferior_register)
12052 (arm_store_inferior_register): Change prototype to take a
12053 regcache. Adjust.
12054 * win32-i386-low.c (i386_fetch_inferior_register)
12055 (i386_store_inferior_register): Change prototype to take a
12056 regcache. Adjust.
12057 * win32-low.c (child_fetch_inferior_registers)
12058 (child_store_inferior_registers): Change prototype to take a
12059 regcache. Adjust.
12060 (win32_wait): Adjust.
12061 (win32_fetch_inferior_registers): Change prototype to take a
12062 regcache. Adjust.
12063 (win32_store_inferior_registers): Adjust.
12064 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12065 store_inferior_register>: Change prototype to take a regcache.
12066
12067 2010-01-20 Doug Evans <dje@google.com>
12068
12069 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12070 #ifdef.
12071 (linux_wait_for_event1, linux_init_signals): Ditto.
12072 (W_STOPCODE): Provide definition if missing.
12073
12074 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12075
12076 * linux-low.c (linux_core_of_thread): New.
12077 (compare_ints, show_process, list_threads): New.
12078 (linux_qxfer_osdata): Report threads and cores.
12079 (linux_target_op): Register linux_core_of_thread.
12080 * remote-utils.c (prepare_resume_reply): Report the core.
12081 (buffer_xml_printf): Support %d specifier.
12082 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12083 New.
12084 (handle_query): Handle qXfer:threads. Announce availability
12085 thereof.
12086 * target.h (struct target_ops): New field core_of_thread.
12087
12088 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12089
12090 * Makefile.in (clean): Remove new generated files.
12091 (reg-s390.o, reg-s390.c): Remove rules.
12092 (reg-s390x.o, reg-s390x.c): Likewise.
12093 (s390-linux32.o, s390-linux32.c): Add rules.
12094 (s390-linux64.o, s390-linux64.c): Likewise.
12095 (s390x-linux64.o, s390x-linux64.c): Likewise.
12096 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12097 * linux-s390-low.c: Include <elf.h>.
12098 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12099 (init_registers_s390): Remove prototype.
12100 (init_registers_s390x): Likewise.
12101 (init_registers_s390_linux32): Add prototype.
12102 (init_registers_s390_linux64): Likewise.
12103 (init_registers_s390x_linux64): Likewise.
12104 (s390_num_regs_3264): New define.
12105 (s390_regmap_3264): New global variable.
12106 (s390_cannot_fetch_register): Remove obsolete check.
12107 (s390_cannot_store_register): Likewise.
12108 (s390_collect_ptrace_register): Handle upper/lower register halves.
12109 (s390_supply_ptrace_register): Likewise.
12110 (s390_fill_gregset): Update to register number changes.
12111 (s390_get_hwcap): New routine.
12112 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12113 Install appropriate regmap and register set.
12114
12115 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12116
12117 * server.c (gdbserver_version): Update copyright year to 2010.
12118 * gdbreplay.c (gdbreplay_version): Likewise.
12119
12120 2009-12-28 Doug Evans <dje@google.com>
12121
12122 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12123 elf/external.h. Include <elf.h> instead but only if necessary.
12124
12125 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12126
12127 * linux-low.c (linux_remove_process): Remove `detaching'
12128 parameter. Don't release/detach from thread_db here.
12129 (linux_kill): Release/detach from thread_db here, ...
12130 (linux_detach): ... and here, before actually detaching.
12131 (linux_wait_1): ... and here, when a process exits.
12132 * thread-db.c (any_thread_of): New.
12133 (thread_db_free): Switch the current inferior to a thread of the
12134 passed in process.
12135
12136 2009-12-21 Doug Evans <dje@google.com>
12137
12138 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12139
12140 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12141 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12142 warning ifndef __NR_tkill. Move setting of errno there too.
12143 Delete unnecessary resetting of errno after syscall.
12144 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12145
12146 * configure.ac: Check for dladdr.
12147 * config.in: Regenerate.
12148 * configure: Regenerate.
12149 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12150 (try_thread_db_load): Update.
12151
12152 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12153
12154 2009-12-18 Doug Evans <dje@google.com>
12155
12156 * event-loop.c: Include unistd.h if it exists.
12157
12158 * linux-low.c (my_waitpid): Move definition away from being in
12159 between linux_tracefork_child/linux_test_for_tracefork.
12160
12161 * gdb_proc_service.h (psaddr_t): Fix type.
12162 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12163 signature to match glibc.
12164
12165 2009-12-16 Doug Evans <dje@google.com>
12166
12167 * linux-low.c (linux_read_memory): Fix argument to read.
12168
12169 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12170
12171 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12172 events, don't leave current_inferior pointing at null.
12173
12174 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12175
12176 * win32-low.c (LOG): Delete.
12177 (OUTMSG): Output to stderr.
12178 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12179 on compile time LOG macro.
12180 (win32_wait): Fix debug output.
12181
12182 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12183
12184 * win32-low.c (win32_add_one_solib): If the dll name is
12185 "ntdll.dll", prepend the system directory to the dll path.
12186
12187 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12188
12189 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12190
12191 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12192 Vladimir Prus <vladimir@codesourcery.com>
12193
12194 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12195 * configure.ac: Check for __mcoldfire__ and set
12196 gdb_cv_m68k_is_coldfire.
12197 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12198 reg-cf.o and reg-m68k.o.
12199 * configure: Regenerated.
12200
12201 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12202
12203 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12204 Pass it to thread_db_free.
12205 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12206 proper `detaching' argument to linux_remove_process.
12207 * linux-low.h (thread_db_free): Add `detaching' parameter.
12208 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12209 to thread_db_free.
12210 (thread_db_free): Add `detaching' parameter. Only
12211 call td_ta_clear_event if detaching from process.
12212
12213 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12214
12215 * thread-db.c (thread_db_free): Fix typo.
12216
12217 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12218
12219 PR gdb/10838
12220 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12221
12222 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12223
12224 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12225 with an i686 compiler.
12226 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12227 needed.
12228 * configure: Rebuilt.
12229
12230 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12231
12232 PR gdb/10783
12233
12234 * server.c (handle_search_memory_1): Correct read_addr initialization
12235 in loop for searching subsequent chunks.
12236
12237 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12238
12239 * configure.ac: New --with-libthread-db option.
12240 * thread-db.c: Allow direct dependence on libthread_db.
12241 (thread_db_free): Adjust.
12242 * config.in: Regenerate.
12243 * configure: Likewise.
12244
12245 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12246
12247 PR gdb/10757
12248 * thread-db.c (attach_thread): New function.
12249 (maybe_attach_thread): Return success/failure.
12250 (find_new_threads_callback): Adjust.
12251 (thread_db_find_new_threads): Loop until no new threads.
12252
12253 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12254
12255 * proc-service.c (ps_lgetregs): Formatting.
12256
12257 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12258
12259 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12260 * configure.ac: Adjust.
12261 * linux-low.h (struct process_info_private): Move members to struct
12262 thread_db.
12263 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12264 * linux-low.c (linux_remove_process): Adjust.
12265 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12266 * server.c (handle_query): Move code ...
12267 (handle_monitor_command): ... here. New function.
12268 * target.h (struct target_ops): New member.
12269 * thread-db.c (struct thread_db): New.
12270 (libthread_db_search_path): New variable.
12271 (thread_db_create_event, thread_db_enable_reporting)
12272 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12273 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12274 (try_thread_db_load_1, dladdr_to_soname): New functions.
12275 (try_thread_db_load, thread_db_load_search): New functions.
12276 (thread_db_init): Search for libthread_db.
12277 (thread_db_free): New function.
12278 (thread_db_handle_monitor_command): Likewise.
12279 * config.in: Regenerate.
12280 * configure: Regenerate.
12281
12282 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12283
12284 * spu-low.c (spu_kill): Wait for inferior to terminate.
12285 Call clear_inferiors.
12286 (spu_detach): Call clear_inferiors.
12287
12288 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12289
12290 * aclocal.m4: Regenerate.
12291 * config.in: Likewise.
12292 * configure: Likewise.
12293
12294 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12295
12296 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12297 (parse_spufs_run): New function.
12298 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12299 (ppc_breakpoint_at): Handle SPU breakpoints.
12300
12301 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12302
12303 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12304 (SPUFS_MAGIC): Define.
12305 (spu_enumerate_spu_ids): New function.
12306 (linux_qxfer_spu): New function.
12307 (linux_target_ops): Install linux_qxfer_spu.
12308
12309 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12310
12311 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12312 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12313 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12314 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12315 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12316 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12317 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12318 (init_registers_powerpc_cell32l): Add prototype.
12319 (init_registers_powerpc_cell64l): Likewise.
12320 (ppc_arch_setup): Detect Cell/B.E. architecture.
12321
12322 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12323
12324 * Makefile.in (datarootdir): New variable.
12325
12326 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12327
12328 * linux-low.c (linux_write_memory): Update debugging output.
12329 * Makefile.in (clean): Add new descriptions.
12330 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12331 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12332 * configure.srv: Add new files for arm*-*-linux*.
12333 * linux-arm-low.c: Add new declarations.
12334 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12335 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12336 (HWCAP_VFPv3D16): New.
12337 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12338 instead of __IWMMXT__.
12339 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12340 (arm_arch_setup): New.
12341 (target_regsets): Remove #ifdef. Add VFP regset.
12342 (the_low_target): Use arm_arch_setup.
12343
12344 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12345
12346 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12347 the main thread again.
12348
12349 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12350
12351 Adding Neutrino gdbserver.
12352 * configure: Regenerated.
12353 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12354 * configure.srv (i[34567]86-*-nto*): New target.
12355 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12356 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12357 (nto_comctrl) [__QNX__]: New function.
12358 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12359
12360 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12361
12362 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12363 srv_tgtobj.
12364
12365 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12366 Pedro Alves <pedro@codesourcery.com>
12367
12368 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12369 don't support CONTEXT_EXTENDED_REGISTERS.
12370 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12371 (the_low_target): Install them.
12372 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12373 failing with ERROR_PIPE_NOT_CONNECTED.
12374
12375 2009-06-30 Doug Evans <dje@google.com>
12376 Pierre Muller <muller@ics.u-strasbg.fr>
12377
12378 Add h/w watchpoint support to x86-linux, win32-i386.
12379 * Makefile.in (SFILES): Add i386-low.c
12380 (i386_low_h): Define.
12381 (i386-low.o): Add dependencies.
12382 (linux-x86-low.o): Add i386-low.h dependency.
12383 (win32-i386-low.o): Ditto.
12384 * i386-low.c: New file.
12385 * i386-low.h: New file.
12386 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12387 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12388 * linux-low.c (linux_add_process): Initialize arch_private.
12389 (linux_remove_process): Free arch_private.
12390 (add_lwp): Initialize arch_private.
12391 (delete_lwp): Free arch_private.
12392 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12393 provided.
12394 * linux-low.h (process_info_private): New member arch_private.
12395 (lwp_info): New member arch_private.
12396 (linux_target_ops): New members new_process, new_thread,
12397 prepare_to_resume.
12398 (ptid_of): New macro.
12399 * linux-x86-low.c: Include stddef.h, i386-low.h.
12400 (arch_process_info): New struct.
12401 (arch_lwp_info): New struct.
12402 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12403 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12404 (i386_dr_low_get_status): New function.
12405 (x86_insert_point, x86_remove_point): New functions.
12406 (x86_stopped_by_watchpoint): New function.
12407 (x86_stopped_data_address): New function.
12408 (x86_linux_new_process, x86_linux_new_thread): New functions.
12409 (x86_linux_prepare_to_resume): New function.
12410 (the_low_target): Add entries for insert_point, remove_point,
12411 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12412 prepare_to_resume.
12413 * server.c (debug_hw_points): New global.
12414 (monitor_show_help): Document set debug-hw-points.
12415 (handle_query): Process "set debug-hw-points".
12416 * server.h (debug_hw_points): Declare.
12417 (paddress): Declare.
12418 * utils.c (NUMCELLS, CELLSIZE): New macros.
12419 (get_sell, xsnprintf, paddress): New functions.
12420 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12421 remove_point, stopped_by_watchpoint, stopped_data_address.
12422 * win32-i386-low.c: Include i386-low.h.
12423 (debug_reg_state): Replaces dr.
12424 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12425 (i386_dr_low_get_status): New function.
12426 (i386_insert_point, i386_remove_point): New functions.
12427 (i386_stopped_by_watchpoint): New function.
12428 (i386_stopped_data_address): New function.
12429 (i386_initial_stuff): Update.
12430 (get_thread_context,set_thread_context,i386_thread_added): Update.
12431 (the_low_target): Add entries for insert_point,
12432 remove_point, stopped_by_watchpoint, stopped_data_address.
12433 * win32-low.c (win32_insert_watchpoint): New function.
12434 (win32_remove_watchpoint): New function.
12435 (win32_stopped_by_watchpoint): New function.
12436 (win32_stopped_data_address): New function.
12437 (win32_target_ops): Add entries for insert_watchpoint,
12438 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12439 * win32-low.h (win32_target_ops): New members insert_point,
12440 remove_point, stopped_by_watchpoint, stopped_data_address.
12441
12442 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12443
12444 * server.c (process_serial_event): Re-return unsupported, not
12445 error, if the type isn't recognized. Re-allow supporting only
12446 insert or remove packets. Also call require_running for
12447 breakpoints. Add missing break statement to default case. Tidy.
12448 * target.h (struct target_ops): Rename insert_watchpoint to
12449 insert_point, and remove_watchpoint to remove_point.
12450
12451 * linux-low.h (struct linux_target_ops): Likewise.
12452 * linux-low.c (linux_insert_watchpoint): Rename to ...
12453 (linux_insert_point): ... this. Adjust.
12454 (linux_remove_watchpoint): Rename to ...
12455 (linux_remove_point): ... this. Adjust.
12456 (linux_target_ops): Adjust.
12457 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12458 (cris_insert_point): ... this.
12459 (cris_remove_watchpoint): Rename to ...
12460 (cris_remove_point): ... this.
12461 (the_low_target): Adjust.
12462
12463 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12464
12465 * server.c (handle_v_kill): Pass signal_pid to
12466 kill_inferior if multi_process is zero.
12467
12468 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12469
12470 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12471 * target.h (target_ops): Comment for *_watchpoint to make it clear
12472 the functions can get types '0' and '1'.
12473
12474 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12475
12476 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12477 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12478 * regcache.c (get_regcache): Likewise.
12479 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12480 * win32-low.c (child_fetch_inferior_registers): Remove check for
12481 regno 0.
12482
12483 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12484 Pedro Alves <pedro@codesourcery.com>
12485
12486 * target.h (struct target_ops) <supports_multi_process>: New
12487 callback.
12488 (target_supports_multi_process): New.
12489 * server.c (handle_query): Even if GDB reports support, only
12490 enable multi-process if the target also supports it. Report
12491 multi-process support only if the target backend supports it.
12492 * linux-low.c (linux_supports_multi_process): New function.
12493 (linux_target_ops): Install it as target_supports_multi_process
12494 callback.
12495
12496 2009-05-24 Doug Evans <dje@google.com>
12497
12498 Global renaming of find_thread_pid to find_thread_ptid.
12499 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12500 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12501 All callers updated.
12502
12503 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12504 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12505 directly.
12506
12507 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12508 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12509 (linux_resume_one_lwp): Ditto.
12510
12511 2009-05-23 Doug Evans <dje@google.com>
12512
12513 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12514 from struct inferior_list_entry * to struct lwp_info *.
12515 All callers updated.
12516
12517 2009-05-13 Doug Evans <dje@google.com>
12518
12519 * linux-x86-low.c: Don't include assert.h.
12520 (x86_siginfo_fixup): Use fatal, not assert.
12521 (x86_arch_setup): Fix comment.
12522
12523 2009-05-12 Doug Evans <dje@google.com>
12524
12525 Biarch support for i386/amd64 gdbserver.
12526 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12527 Add linux-x86-low.c.
12528 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12529 (linux-x86-low.o): Add.
12530 * linux-x86-64-low.c: Delete.
12531 * linux-i386-low.c: Delete.
12532 * linux-x86-low.c: New file.
12533 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12534 linux-x86-low.o.
12535 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12536 linux-x86-low.o.
12537 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12538 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12539 (linux_child_pid_to_exec_file): New function.
12540 (elf_64_header_p, elf_64_file_p): New functions.
12541 (siginfo_fixup): New function.
12542 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12543 give target a chance to convert layout.
12544 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12545 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12546
12547 2009-05-07 Doug Evans <dje@google.com>
12548
12549 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12550 (regsets_store_inferior_registers): Ditto.
12551
12552 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12553
12554 PR server/10048
12555
12556 * linux-low.c (must_set_ptrace_flags): Delete.
12557 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12558 of the global.
12559 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12560 `lwp->must_set_ptrace_flags' instead.
12561 (linux_wait_for_event_1): Set ptrace options here.
12562 (linux_wait_1): ... not here.
12563
12564 2009-04-30 Doug Evans <dje@google.com>
12565
12566 * inferiors.c (started_inferior_callback): New function.
12567 (attached_inferior_callback): New function.
12568 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12569 * server.c (print_started_pid, print_attached_pid): New functions.
12570 (detach_or_kill_for_exit): New function.
12571 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12572 * server.h (have_started_inferiors_p): Declare.
12573 (have_attached_inferiors_p): Declare.
12574
12575 * inferiors.c (remove_process): Fix memory leak, free process.
12576 * linux-low.c (linux_remove_process): New function.
12577 (linux_kill): Call it instead of remove_process.
12578 (linux_detach, linux_wait_1): Ditto.
12579
12580 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12581
12582 * configure.srv: Add x86 Windows CE target.
12583
12584 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12585
12586 * inferiors.c (get_thread_process): Make global.
12587 * server.h (get_thread_process): Add prototype.
12588 * thread-db.c (find_one_thread): Use get_thread_process
12589 instead of current_process.
12590 (thread_db_get_tls_address): Do not crash if called when
12591 thread layer is not yet initialized.
12592
12593 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12594
12595 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12596 * spu-low.c (current_tid): Rename to ...
12597 (current_ptid): ... this.
12598 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12599 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12600 ptid_get_lwp (current_ptid) instead of current_tid.
12601 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12602 instead of current_tid. Use find_process_pid to verify pid
12603 argument is valid. Pass proper argument to remove_process.
12604 (spu_thread_alive): Compare current_ptid instead of current_tid.
12605 (spu_resume): Likewise.
12606
12607 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12608
12609 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12610 variable.
12611
12612 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12613
12614 Implement the multiprocess extensions, and add linux multiprocess
12615 support.
12616
12617 * server.h (ULONGEST): Declare.
12618 (struct ptid, ptid_t): New.
12619 (minus_one_ptid, null_ptid): Declare.
12620 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12621 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12622 (struct inferior_list_entry): Change `id' type from unsigned from
12623 to ptid_t.
12624 (struct sym_cache, struct breakpoint, struct
12625 process_info_private): Forward declare.
12626 (struct process_info): Declare.
12627 (current_process): Declare.
12628 (all_processes): Declare.
12629 (initialize_inferiors): Declare.
12630 (add_thread): Adjust to use ptid_t.
12631 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12632 (add_process, remove_process, find_thread_pid): Declare.
12633 (find_inferior_id): Adjust to use ptid_t.
12634 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12635 (multi_process): Declare.
12636 (push_event): Adjust to use ptid_t.
12637 (read_ptid, write_ptid): Declare.
12638 (prepare_resume_reply): Adjust to use ptid_t.
12639 (clear_symbol_cache): Declare.
12640 * inferiors.c (all_processes): New.
12641 (null_ptid, minus_one_ptid): New.
12642 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12643 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12644 (add_thread): Change unsigned long to ptid. Remove gdb_id
12645 parameter. Adjust.
12646 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12647 (gdb_id_to_thread): Rename to ...
12648 (find_thread_pid): ... this. Change unsigned long to ptid.
12649 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12650 (loaded_dll, pull_pid_from_list): Adjust.
12651 (add_process, remove_process, find_process_pid)
12652 (get_thread_process, current_process, initialize_inferiors): New.
12653 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12654 (struct target_waitstatus) <related_pid>: Ditto.
12655 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12656 return type to int.
12657 (struct target_ops) <join>: Add `pid' argument.
12658 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12659 (struct target_ops) <wait>: Add `ptid' field. Change return type
12660 to ptid.
12661 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12662 (mywait): Add `ptid' argument. Change return type to ptid_t.
12663 (target_pid_to_str): Declare.
12664 * target.c (set_desired_inferior): Adjust to use ptids.
12665 (mywait): Add new `ptid' argument. Adjust.
12666 (target_pid_to_str): New.
12667 * mem-break.h (free_all_breakpoints): Declare.
12668 * mem-break.c (breakpoints): Delelete.
12669 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12670 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12671 to use per-process breakpoint list.
12672 (free_all_breakpoints): New.
12673 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12674 (symbol_cache, all_symbols_looked_up): Delete.
12675 (hexchars): New.
12676 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12677 read_ptid): New.
12678 (prepare_resume_reply): Change ptid argument's type from unsigned
12679 long to ptid_t. Adjust. Implement W;process and X;process.
12680 (free_sym_cache, clear_symbol_cache): New.
12681 (look_up_one_symbol): Adjust to per-process symbol cache. *
12682 * server.c (cont_thread, general_thread, step_thread): Change type
12683 to ptid_t.
12684 (attached): Delete.
12685 (multi_process): New.
12686 (last_ptid): Change type to ptid_t.
12687 (struct vstop_notif) <ptid>: Change type to ptid_t.
12688 (queue_stop_reply, push_event): Change `ptid' argument's type to
12689 ptid_t.
12690 (discard_queued_stop_replies): Add `pid' argument.
12691 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12692 changes. Don't reference the `attached' global.
12693 (attach_inferior): Adjust to mywait interface changes.
12694 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12695 features. Handle and report "multiprocess+". Handle
12696 "qAttached:PID".
12697 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12698 changes.
12699 (handle_v_kill): New.
12700 (handle_v_stopped): Adjust to use target_pid_to_str.
12701 (handle_v_requests): Allow multiple attaches and runs when
12702 multiprocess extensions are in effect. Handle "vKill".
12703 (myresume): Adjust to use ptids.
12704 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12705 (handle_status): Adjust to discard_queued_stop_replies interface
12706 change.
12707 (first_thread_of, kill_inferior_callback)
12708 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12709 (main): Call initialize_inferiors. Adjust to use ptids, killing
12710 and detaching from all inferiors. Handle multiprocess packet
12711 variants.
12712 * linux-low.h: Include gdb_proc_service.h.
12713 (struct process_info_private): New.
12714 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12715 <lwpid_of>: Use ptid_get_lwp.
12716 (get_lwp_thread): Adjust.
12717 (struct lwp_info): Add `dead' member.
12718 (find_lwp_pid): Declare.
12719 * linux-low.c (thread_db_active): Delete.
12720 (new_inferior): Adjust comment.
12721 (inferior_pid): Delete.
12722 (linux_add_process): New.
12723 (handle_extended_wait): Adjust.
12724 (add_lwp): Change unsigned long to ptid.
12725 (linux_create_inferior): Add process to processes table. Adjust
12726 to use ptids. Don't set new_inferior here.
12727 (linux_attach_lwp): Rename to ...
12728 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12729 it. Adjust to use ptids.
12730 (linux_attach_lwp): New.
12731 (linux_attach): Add process to processes table. Don't set
12732 new_inferior here.
12733 (struct counter): New.
12734 (second_thread_of_pid_p, last_thread_of_process_p): New.
12735 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12736 multiple processes.
12737 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12738 processes. Remove process from process table.
12739 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12740 to multiple processes.
12741 (any_thread_of): New.
12742 (linux_detach): Add `pid' argument, and handle it. Remove process
12743 from processes table.
12744 (linux_join): Add `pid' argument. Handle it.
12745 (linux_thread_alive): Change unsighed long argument to ptid_t.
12746 Consider dead lwps as not being alive.
12747 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12748 threads we're not interested in.
12749 (same_lwp, find_lwp_pid): New.
12750 (linux_wait_for_lwp): Change `pid' argument's type from int to
12751 ptid_t. Adjust.
12752 (linux_wait_for_event): Rename to ...
12753 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12754 from int to ptid_t. Adjust.
12755 (linux_wait_for_event): New.
12756 (linux_wait_1): Add `ptid' argument. Change return type to
12757 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12758 that exit from the process table.
12759 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12760 Adjust.
12761 (mark_lwp_dead): New.
12762 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12763 stopping all threads, mark its main lwp as dead.
12764 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12765 ptids.
12766 (fetch_register, usr_store_inferior_registers)
12767 (regsets_fetch_inferior_registers)
12768 (regsets_store_inferior_registers, linux_read_memory)
12769 (linux_write_memory): Inline `inferior_pid'.
12770 (linux_look_up_symbols): Adjust to use per-process
12771 `thread_db_active'.
12772 (linux_request_interrupt): Adjust to use ptids.
12773 (linux_read_auxv): Inline `inferior_pid'.
12774 (initialize_low): Don't reference thread_db_active.
12775 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12776 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12777 (ps_getpid): Return the pid of the current inferior.
12778 * thread-db.c (proc_handle, thread_agent): Delete.
12779 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12780 per-process data.
12781 (find_one_thread): Change argument type to ptid_t. Adjust to
12782 per-process data.
12783 (maybe_attach_thread): Adjust to per-process data and ptids.
12784 (thread_db_find_new_threads): Ditto.
12785 (thread_db_init): Ditto.
12786 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12787 processes table. Adjust to use ptids.
12788 (spu_kill, spu_detach): Adjust interface. Remove process from
12789 processes table.
12790 (spu_join, spu_thread_alive): Adjust interface.
12791 (spu_wait): Adjust interface. Remove process from processes
12792 table. Adjust to use ptids.
12793 * win32-low.c (current_inferior_tid): Delete.
12794 (current_inferior_ptid): New.
12795 (debug_event_ptid): New.
12796 (thread_rec): Take a ptid. Adjust.
12797 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12798 (child_delete_thread): Ditto.
12799 (do_initial_child_stuff): Add `attached' argument. Add process to
12800 processes table.
12801 (child_fetch_inferior_registers, child_store_inferior_registers):
12802 Adjust.
12803 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12804 (win32_attach): Pass 1 to do_initial_child_stuff.
12805 (win32_kill): Adjust interface. Remove process from processes
12806 table.
12807 (win32_detach): Ditto.
12808 (win32_join): Adjust interface.
12809 (win32_thread_alive): Take a ptid.
12810 (win32_resume): Adjust to use ptids.
12811 (get_child_debug_event): Ditto.
12812 (win32_wait): Adjust interface. Remove exiting process from
12813 processes table.
12814
12815 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12816
12817 Non-stop mode support.
12818
12819 * server.h (non_stop): Declare.
12820 (gdb_client_data, handler_func): Declare.
12821 (delete_file_handler, add_file_handler, start_event_loop):
12822 Declare.
12823 (handle_serial_event, handle_target_event, push_event)
12824 (putpkt_notif): Declare.
12825 * target.h (enum resume_kind): New.
12826 (struct thread_resume): Replace `step' field by `kind' field.
12827 (TARGET_WNOHANG): Define.
12828 (struct target_ops) <wait>: Add `options' argument.
12829 <supports_non_stop, async, start_non_stop>: New fields.
12830 (target_supports_non_stop, target_async): New.
12831 (start_non_stop): Declare.
12832 (mywait): Add `options' argument.
12833 * target.c (mywait): Add `options' argument. Print child exit
12834 notifications here.
12835 (start_non_stop): New.
12836 * server.c (non_stop, own_buf, mem_buf): New globals.
12837 (struct vstop_notif): New.
12838 (notif_queue): New global.
12839 (queue_stop_reply, push_event, discard_queued_stop_replies)
12840 (send_next_stop_reply): New.
12841 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12842 interface changes.
12843 (attach_inferior): In non-stop mode, don't wait for the target
12844 here.
12845 (handle_general_set): Handle QNonStop.
12846 (handle_query): When handling qC, return the current general
12847 thread, instead of the first thread of the list.
12848 (handle_query): If the backend supports non-stop mode, include
12849 QNonStop+ in the qSupported query response.
12850 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12851 and non-stop mode.
12852 (handle_v_attach, handle_v_run): Handle non-stop mode.
12853 (handle_v_stopped): New.
12854 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12855 (myresume): Adjust to use resume_kind. Handle non-stop.
12856 (queue_stop_reply_callback): New.
12857 (handle_status): Handle non-stop mode.
12858 (main): Clear non_stop flag on reconnection. Use the event-loop.
12859 Refactor serial protocol handling from here ...
12860 (process_serial_event): ... to this new function. When GDB
12861 selects any thread, select one here. In non-stop mode, wait until
12862 GDB acks all pending events before exiting.
12863 (handle_serial_event, handle_target_event): New.
12864 * remote-utils.c (remote_open): Install remote_desc in the event
12865 loop.
12866 (remote_close): Remove remote_desc from the event loop.
12867 (putpkt_binary): Rename to...
12868 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12869 (putpkt_binary): New as wrapper around putpkt_binary_1.
12870 (putpkt_notif): New.
12871 (prepare_resume_reply): In non-stop mode, don't change the
12872 general_thread.
12873 * event-loop.c: New.
12874 * Makefile.in (OBJ): Add event-loop.o.
12875 (event-loop.o): New rule.
12876
12877 * linux-low.h (pid_of): Moved here.
12878 (lwpid_of): New.
12879 (get_lwp_thread): Use lwpid_of.
12880 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12881 * linux-low.c (pid_of): Delete.
12882 (inferior_pid): Use lwpid_of.
12883 (linux_event_pipe): New.
12884 (target_is_async_p): New.
12885 (delete_lwp): New.
12886 (handle_extended_wait): Use lwpid_of.
12887 (add_lwp): Don't set lwpid field.
12888 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12889 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12890 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12891 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12892 first. Adjust to linux_wait_for_event interface changes. Use
12893 lwpid_of.
12894 (linux_detach): Don't delete the main lwp here.
12895 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12896 (status_pending_p): Don't consider explicitly suspended lwps.
12897 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12898 pointer. Add OPTIONS argument. Change return type to int. Use
12899 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12900 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12901 pointer. Add status pointer argument. Return a pid instead of a
12902 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12903 changes. In non-stop mode, don't switch to a random thread.
12904 (linux_wait): Rename to...
12905 (linux_wait_1): ... this. Add target_options argument, and handle
12906 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12907 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12908 clean exit and signal exit code. Don't stop all threads in
12909 non-stop mode. In all-stop mode, only stop all threads when
12910 reporting a stop to GDB. Handle explicit thread stop requests.
12911 (async_file_flush, async_file_mark): New.
12912 (linux_wait): New.
12913 (send_sigstop): Use lwpid_of.
12914 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12915 interface changes. In non-stop mode, don't switch to a random
12916 thread.
12917 (linux_resume_one_lwp): Use lwpid_of.
12918 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12919 (linux_resume_one_thread): ... this. Handle resume_stop. In
12920 non-stop mode, don't look for pending flag in all threads.
12921 (resume_status_pending_p): Don't consider explicitly suspended
12922 threads.
12923 (my_waitpid): Reimplement. Emulate __WALL.
12924 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12925 Use lwpid_of.
12926 (sigchld_handler, linux_supports_non_stop, linux_async)
12927 (linux_start_non_stop): New.
12928 (linux_target_ops): Register linux_supports_non_stop, linux_async
12929 and linux_start_non_stop.
12930 (initialize_low): Install SIGCHLD handler.
12931 * thread-db.c (thread_db_create_event, find_one_thread)
12932 (thread_db_get_tls_address): Use lwpid_of.
12933 * win32-low.c (win32_detach): Adjust to use resume_kind.
12934 (win32_wait): Add `options' argument.
12935 * spu-low.c (spu_resume): Adjust to use resume_kind.
12936 (spu_wait): Add `options' argument.
12937
12938 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12939
12940 Decouple target code from remote protocol.
12941
12942 * target.h (enum target_waitkind): New.
12943 (struct target_waitstatus): New.
12944 (struct target_ops) <wait>: Return an unsigned long. Take a
12945 target_waitstatus pointer instead of a char pointer.
12946 (mywait): Likewise.
12947 * target.c (mywait): Change prototype to return an unsigned long.
12948 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12949 * server.h (thread_from_wait, old_thread_from_wait): Delete
12950 declarations.
12951 (prepare_resume_reply): Change prototype to take a
12952 target_waitstatus.
12953 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12954 (last_status, last_ptid): New.
12955 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12956 pid instead of a signal.
12957 (attach_inferior): Remove "status" and "signal" parameters.
12958 Adjust.
12959 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12960 not as an address.
12961 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12962 (handle_v_requests, myresume): Remove "status" and "signal"
12963 parameters. Adjust.
12964 (handle_status): New.
12965 (main): Delete local `status'. Adjust.
12966 * remote-utils.c: Include target.h.
12967 (prepare_resume_reply): Change prototype to take a
12968 target_waitstatus. Adjust.
12969
12970 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12971 interface.
12972 * spu-low.c (spu_wait): Adjust.
12973 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12974 Delete.
12975 (win32_wait): Adjust.
12976
12977 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12978
12979 * target.h (struct thread_resume): Delete leave_stopped member.
12980 (struct target_ops): Add a `n' argument to the `resume' callback.
12981 * server.c (start_inferior): Adjust.
12982 (handle_v_cont, myresume): Adjust.
12983 * linux-low.c (check_removed_breakpoint): Adjust to resume
12984 interface change, and to removed leave_stopped field.
12985 (resume_ptr): Delete.
12986 (struct thread_resume_array): New.
12987 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12988 resume interface change.
12989 (linux_continue_one_thread, linux_queue_one_thread)
12990 (resume_status_pending_p): Check if the resume field is NULL
12991 instead of checking the leave_stopped member.
12992 (linux_resume): Adjust to the target resume interface change.
12993 * spu-low.c (spu_resume): Adjust to the target resume interface
12994 change.
12995 * win32-low.c (win32_detach, win32_resume): Ditto.
12996
12997 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12998
12999 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13000 flag.
13001 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13002 pending.
13003 (linux_continue_one_thread): Only preserve the stepping flag if
13004 there's a pending breakpoint.
13005
13006 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13007
13008 * server.c (main): After the inferior having exited, call
13009 remote_close before exiting gdbserver.
13010
13011 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13012
13013 Fix size of FPSCR in Power 7 processors.
13014 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13015 (PPC_FEATURE_HAS_DFP): New #define.
13016 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13017 size of the FPSCR.
13018
13019 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13020
13021 * server.c (handle_query) Whitespace and formatting.
13022
13023 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13024
13025 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13026 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13027 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13028 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13029 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13030 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13031 Makefile.in, configure.ac: Fix whitespace throughout.
13032 * configure: Regenerate.
13033
13034 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13035
13036 * inferiors.c (find_inferior): Make it safe for the callback
13037 function to delete the currently iterated inferior.
13038
13039 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13040
13041 * Makefile.in (linuw_low_h): Move higher.
13042 (thread-db.o): Depend on $(linux_low_h).
13043
13044 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13045
13046 Rename "process" to "lwp" throughout.
13047
13048 * linux-low.c (all_processes): Rename to...
13049 (all_lwps): ... this.
13050 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13051 (add_process): Rename to ...
13052 (add_lwp): ... this. Adjust.
13053 (linux_create_inferior): Adjust.
13054 (linux_attach_lwp): Adjust.
13055 (linux_attach): Adjust.
13056 (linux_kill_one_process): Rename to ...
13057 (linux_kill_one_lwp): ... this. Adjust.
13058 (linux_kill): Adjust.
13059 (linux_detach_one_process): Rename to ...
13060 (linux_detach_one_lwp): ... this. Adjust.
13061 (linux_detach): Adjust.
13062 (check_removed_breakpoint): Adjust.
13063 (status_pending_p): Adjust.
13064 (linux_wait_for_process): Rename to ...
13065 (linux_wait_for_lwp): ... this. Adjust.
13066 (linux_wait_for_event): Adjust.
13067 (send_sigstop): Adjust.
13068 (wait_for_sigstop): Adjust.
13069 (stop_all_processes): Rename to ...
13070 (stop_all_lwps): ... this.
13071 (linux_resume_one_process): Rename to ...
13072 (linux_resume_one_lwp): ... this. Adjust.
13073 (linux_set_resume_request, linux_continue_one_thread)
13074 (linux_queue_one_thread, resume_status_pending_p)
13075 (usr_store_inferior_registers, regsets_store_inferior_registers)
13076 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13077 Adjust.
13078 * linux-low.h (get_process): Rename to ...
13079 (get_lwp): ... this. Adjust.
13080 (get_thread_process): Rename to ...
13081 (get_thread_lwp): ... this. Adjust.
13082 (get_process_thread): Rename to ...
13083 (get_lwp_thread): ... this. Adjust.
13084 (struct process_info): Rename to ...
13085 (struct lwp_info): ... this.
13086 (all_processes): Rename to ...
13087 (all_lwps): ... this.
13088 * proc-service.c (ps_lgetregs): Adjust.
13089 * thread-db.c (thread_db_create_event, find_one_thread)
13090 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13091
13092 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13093
13094 * server.c (handle_query): Handle "qAttached".
13095
13096 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13097
13098 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13099 GPLv3, update license URL.
13100
13101 2009-03-01 Doug Evans <dje@google.com>
13102
13103 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13104 (server_h): Add gdb_signals.h.
13105 (signals.o): Update.
13106 * server.h (target_signal_from_host,target_signal_to_host_p)
13107 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13108
13109 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13110
13111 * remote-utils.c (getpkt): Also generate remote-debug
13112 information if noack_mode is set.
13113
13114 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13115
13116 * server.c (handle_query): Report qXfer:siginfo:read and
13117 qXfer:siginfo:write as supported and handle them.
13118 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13119 * linux-low.c (linux_xfer_siginfo): New.
13120 (linux_target_ops): Set it.
13121
13122 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13123
13124 * server.c (gdbserver_usage): Mention --remote-debug.
13125 (main): Accept '--remote-debug' switch.
13126
13127 2009-01-18 Doug Evans <dje@google.com>
13128
13129 * regcache.c (new_register_cache): No need to check result of xcalloc.
13130 * server.c (handle_search_memory): Back out calls to xmalloc,
13131 result is checked and error is returned to user upon failure.
13132 (handle_query): Ditto. Add more checks for result of malloc.
13133 (handle_v_cont): Check result of malloc, report error back to
13134 user upon failure.
13135 (handle_v_run): Ditto. Call freeargv.
13136 * server.h (freeargv): Declare.
13137 * utils.c (freeargv): New fn.
13138
13139 2009-01-15 Doug Evans <dje@google.com>
13140
13141 * gdbreplay.c (perror_with_name): Make arg const char *.
13142 * server.h (target_signal_to_name): Make return type const char *.
13143 * thread-db.c (thread_db_err_str): Make return type const char *.
13144 * utils.c (perror_with_name): Make arg const char *.
13145
13146 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13147
13148 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13149 when handling a EXIT_PROCESS_DEBUG_EVENT.
13150
13151 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13152
13153 * gdbreplay.c (gdbreplay_version): Update copyright year.
13154 * server.c (gdbserver_version): Likewise.
13155
13156 2009-01-05 Doug Evans <dje@google.com>
13157
13158 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13159 (handle_extended_wait): Improve comment.
13160
13161 2008-12-13 Doug Evans <dje@google.com>
13162
13163 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13164 * server.h (ATTR_MALLOC): New macro.
13165 (xmalloc,xcalloc,xstrdup): Declare.
13166 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13167 * inferiors.c: Ditto.
13168 * linux-low.c: Ditto.
13169 * mem-break.c: Ditto.
13170 * regcache.c: Ditto.
13171 * remote-utils.c: Ditto.
13172 * server.c: Ditto.
13173 * target.c: Ditto.
13174 * win32-low.c: Ditto.
13175
13176 2008-12-12 Doug Evans <dje@google.com>
13177
13178 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13179 in debugging printf.
13180
13181 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13182
13183 2008-12-09 Doug Evans <dje@google.com>
13184
13185 * linux-low.h (struct process_info): Delete member tid, unused.
13186 * thread-db.c (find_one_thread): Update.
13187 (maybe_attach_thread): Update.
13188
13189 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13190
13191 * target.h (struct target_ops): Add qxfer_osdata member.
13192 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13193 and dirent.h.
13194 (linux_qxfer_osdata): New functions.
13195 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13196 callback.
13197 * server.c (handle_query): Handle "qXfer:osdata:read:".
13198 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13199 (buffer_xml_printf): New functions.
13200 * server.h (struct buffer): New.
13201 (buffer_grow_str, buffer_grow_str0): New macros.
13202 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13203 (buffer_xml_printf): Declare.
13204
13205 2008-11-24 Doug Evans <dje@google.com>
13206
13207 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13208
13209 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13210
13211 * server.c (handle_v_run): Always use the supplied argument list.
13212
13213 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13214
13215 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13216 (xtensa_regmap_table): Add entry for scompare1.
13217
13218 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13219
13220 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13221 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13222 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13223 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13224 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13225 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13226 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13227 XML target descriptions.
13228 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13229 when inferior is running on an ISA 2.05 or later processor. Add
13230 special case to return offset for full 64-bit slot of FPSCR when
13231 in 32-bits.
13232
13233 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13234
13235 * Makefile.in (SFILES, clean): Added sparc64 files.
13236 (reg-sparc64.o, reg-sparc64.c): New.
13237 * configure.srv (sparc*-*-linux*): New configuration.
13238 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13239 syscall arguments for SPARC.
13240 (regsets_store_inferior_registers): Likewise.
13241 * linux-sparc-low.c: New file.
13242
13243 2008-10-21 Doug Evans <dje@google.com>
13244
13245 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13246 (READLINE_DIR,READLINE_DEP): Delete.
13247 (INTERNAL_CFLAGS): Update.
13248 (LINTFLAGS): Update.
13249
13250 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13251
13252 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13253 whole argv from the last run, not just argv[0].
13254
13255 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13256
13257 * regcache.c (new_register_cache): Return NULL if the register
13258 cache size isn't known yet.
13259 (free_register_cache): Avoid dereferencing a NULL regcache.
13260
13261 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13262
13263 * configure.srv: Merge MIPS and MIPS64.
13264
13265 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13266
13267 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13268
13269 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13270
13271 * Makefile.in: Add required vsx dependencies.
13272
13273 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13274 Declare init_registers_powerpc_vsx32l.
13275 Declare init_registers_powerpc_vsx64l.
13276 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13277 (ppc_arch_setup): Check for VSX in hwcap.
13278 (ppc_fill_vsxregset): New function.
13279 (ppc_store_vsxregset): New function.
13280 Add new VSX entry in regset_info target_regsets.
13281
13282 * configure.srv: Add new VSX dependencies.
13283
13284 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13285
13286 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13287 (remote_open): Set or clear transport_is_reliable.
13288 (putpkt_binary): Don't expect acks in noack mode.
13289 (getpkt): Don't send ack/nac in noack mode.
13290 * server.c (handle_general_set): Handle QStartNoAckMode.
13291 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13292 qSupported.
13293 (main): Reset noack_mode on every connection.
13294 * server.h (noack_mode): Declare.
13295
13296 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13297
13298 * Makefile.in (GDBREPLAY_OBS): New variable.
13299 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13300
13301 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13302 Daniel Jacobowitz <dan@codesourcery.com>
13303
13304 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13305 (usr_store_inferior_registers): Likewise.
13306 (regsets_store_inferior_registers): Likewise.
13307
13308 2008-07-31 Rolf Jansen <rj@surtec.com>
13309 Pedro Alves <pedro@codesourcery.com>
13310
13311 * configure.ac: Check for memmem declaration.
13312 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13313 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13314 (disable_packet_qfThreadInfo): Unconditionally compile.
13315 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13316 * configure, config.in: Regenerate.
13317
13318 2008-07-28 Doug Kwan <dougkwan@google.com>
13319
13320 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13321 (linux_write_memory): Remove declaration of errno.
13322
13323 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13324
13325 * linux-low.c (handle_extended_wait): Do not use "status"
13326 variable uninitialized.
13327
13328 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13329
13330 * server.c (handle_v_attach): Inhibit reporting dll changes.
13331
13332 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13333
13334 * remote-utils.c (prepare_resume_reply): If requested, don't
13335 output "thread:TID" in the T stop reply.
13336
13337 * server.c (disable_packet_vCont, disable_packet_Tthread)
13338 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13339 (handle_query): If requested, disable support for qC, qfThreadInfo
13340 and qsThreadInfo.
13341 (handle_v_requests): If requested, disable support for vCont.
13342 (gdbserver_show_disableable): New.
13343 (main): Handle --disable-packet and --disable-packet=LIST.
13344
13345 * server.h (disable_packet_vCont, disable_packet_Tthread)
13346 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13347
13348 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13349
13350 * server.c (gdbserver_usage): Mention --version.
13351
13352 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13353
13354 * Makefile.in (gdbreplay.o): New rule.
13355
13356 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13357
13358 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13359 message, not gdbserver.
13360
13361 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13362 Nathan Sidwell <nathan@codesourcery.com>
13363 Joseph Myers <joseph@codesourcery.com>
13364
13365 * acinclude.m4: Include ../../config/acx.m4.
13366 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13367 * configure, config.in: Regenerate.
13368 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13369 * server.c (gdbserver_version): Print PKGVERSION.
13370 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13371 (main): Adjust gdbserver_usage calls.
13372 * gdbreplay.c (version, host_name): Add declarations.
13373 (gdbreplay_version, gdbreplay_usage): New.
13374 (main): Accept --version and --help options.
13375
13376 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13377
13378 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13379 (arm_breakpoint_at): Handle Thumb.
13380 (the_low_target): Add comment.
13381
13382 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13383
13384 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13385
13386 2008-05-09 Doug Evans <dje@google.com>
13387
13388 * server.h (decode_search_memory_packet): Declare.
13389 * remote-utils.c (decode_search_memory_packet): New fn.
13390 * server.c (handle_search_memory_1): New fn.
13391 (handle_search_memory): New fn.
13392 (handle_query): Process qSearch:memory packets.
13393
13394 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13395
13396 * regcache.c (registers_length): Remove.
13397 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13398 full register packet.
13399 * regcache.h (registers_length): Remove prototype.
13400 * server.h (PBUFSIZ): Define to 16384.
13401
13402 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13403
13404 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13405 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13406 powerpc-64l.o, and powerpc-altivec64l.o.
13407 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13408 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13409 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13410 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13411 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13412 to srv_xmlfiles.
13413
13414 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13415 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13416 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13417 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13418 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13419 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13420 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13421 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13422 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13423 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13424 (clean): Update.
13425
13426 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13427 (init_registers_powerpc_32l): ... this new prototype.
13428 (init_registers_powerpc_32): Remove, replace by ...
13429 (init_registers_powerpc_altivec32l): ... this new prototype.
13430 (init_registers_powerpc_e500): Remove, replace by ...
13431 (init_registers_powerpc_e500l): ... this new prototype.
13432 (init_registers_ppc64): Remove, replace by ...
13433 (init_registers_powerpc_64l): ... this new prototype.
13434 (init_registers_powerpc_64): Remove, replace by ...
13435 (init_registers_powerpc_altivec64l): ... this new prototype.
13436 (ppc_num_regs): Set to 73.
13437 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13438 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13439 (ppc_cannot_store_register): Handle orig_r3 and trap.
13440 (ppc_arch_setup): Update init_registers_... calls.
13441 (ppc_fill_gregset): Handle orig_r3 and trap.
13442
13443 * inferiors.c (clear_inferiors): Reset current_inferior.
13444
13445 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13446
13447 * acinclude.m4: Add override.m4.
13448 * configure: Regenerate.
13449
13450 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13451
13452 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13453 initial call to init_register_ppc64.
13454
13455 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13456
13457 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13458 single powerpc*-*-linux* case.
13459 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13460
13461 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13462
13463 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13464 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13465 from reg_xmlfiles.
13466 * linux-ppc-low.c: Include <elf.h>.
13467 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13468 (ppc_hwcap): New global variable.
13469 (ppc_regmap): Remove __SPE__ #ifdef sections.
13470 (ppc_regmap_e500): New global variable.
13471 (ppc_cannot_store_register): Update __SPE__ special case.
13472 (ppc_get_hwcap): New function.
13473 (ppc_arch_setup): Use it to determine whether inferior supports
13474 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13475 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13476 Do not access registers if target does not support AltiVec.
13477 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13478 Do not access registers if target does not support SPE.
13479 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13480
13481 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13482
13483 * linux-low.c (disabled_regsets, num_regsets): New.
13484 (use_regsets_p): Delete.
13485 (linux_wait_for_process): Clear disabled_regsets.
13486 (regsets_fetch_inferior_registers): Check and set it.
13487 (regsets_store_inferior_registers): Likewise.
13488 (linux_fetch_registers, linux_store_registers): Do not use
13489 use_regsets_p.
13490 (initialize_low): Allocate disabled_regsets.
13491
13492 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13493
13494 * Makefile.in (LIBOBJS): New.
13495 (OBS): Use LIBOBJS.
13496 (memmem.o): New rule.
13497 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13498 * configure: Regenerated.
13499
13500 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13501
13502 * server.c (handle_query): Never return "unsupported" for
13503 qXfer:features:read queries.
13504
13505 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13506
13507 * server.c (get_features_xml): Fix inverted condition.
13508 (handle_query): Always support qXfer:feature:read.
13509
13510 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13511
13512 * server.c (wrapper_argv): New.
13513 (start_inferior): Handle wrapper_argv. If set, expect an extra
13514 trap.
13515 (gdbserver_usage): Document --wrapper.
13516 (main): Parse --wrapper.
13517
13518 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13519
13520 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13521 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13522 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13523 (ppc_set_pc): Likewise.
13524 (ppc_arch_setup): New function.
13525 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13526 of collect_register.
13527 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13528
13529 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13530
13531 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13532 instead of linux-ppc64-low.o.
13533 * linux-ppc64-low.c: Remove file.
13534 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13535 (linux-ppc64-low.o): Remove rule.
13536
13537 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13538 (init_registers_powerpc_64): Likewise.
13539 (ppc_regmap): Conditionally define depending on __powerpc64__.
13540 (ppc_cannot_store_register): Do not special-case "fpscr" when
13541 compiled on __powerpc64__.
13542 (ppc_collect_ptrace_register): New function.
13543 (ppc_supply_ptrace_register): New function.
13544 (ppc_breakpoint): Change type to "unsigned int".
13545 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13546 (the_low_target): Conditionally provide initializers for the
13547 arch_setup member depending on __powerpc64__. Install
13548 collect_ptrace_register and supply_ptrace_register members.
13549
13550 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13551
13552 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13553 * server.c (gdbserver_xmltarget): Define.
13554 (get_features_xml): Use it to replace "target.xml" and arch_string.
13555
13556 * configure.srv: Remove srv_xmltarget. Add XML files that were
13557 mentioned there to srv_xmlfiles instead. Remove conditional tests
13558 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13559 srv_xmlfiles and srv_regobj to include all possible choices.
13560 * configure.ac (srv_xmltarget): Remove.
13561 (srv_xmlfiles): Do not add "target.xml".
13562 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13563 checks for supplementary target information.
13564 * configure: Regenerate.
13565 * Makefile.in (XML_TARGET): Remove.
13566 (target.xml): Remove rule.
13567 (clean): Do not clean up target.xml.
13568 (.PRECIOUS): Do not mention target.xml.
13569
13570 * target.h (struct target_ops): Remove arch_string member.
13571 * linux-low.c (linux_arch_string): Remove.
13572 (linux_target_ops): Remove arch_string initializer.
13573 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13574 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13575 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13576 * spu-low.c (spu_arch_string): Remove.
13577 (spu_target_ops): Remove arch_string initializer.
13578 * win32-low.c (win32_arch_string): Remove.
13579 (win32_target_ops): Remove arch_string initializer.
13580 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13581 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13582 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13583
13584 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13585
13586 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13587 by collect_ptrace_register and supply_ptrace_register hooks.
13588 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13589 instead of checking for the_low_target.left_pad_xfer.
13590 (usr_store_inferior_registers): Use collect_ptrace_register callback
13591 instead of checking for the_low_target.left_pad_xfer.
13592
13593 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13594 (s390_supply_ptrace_register): Likewise.
13595 (s390_fill_gregset): Call s390_collect_ptrace_register.
13596 (the_low_target): Update.
13597
13598 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13599 (ppc_supply_ptrace_register): Likewise.
13600 (the_low_target): Update.
13601
13602 * linux-i386-low.c (the_low_target): Update.
13603 * linux-x86-64-low.c (the_low_target): Update.
13604
13605 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13606
13607 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13608 reg-s390.o and reg-s390x.o.
13609
13610 * linux-low.c (new_inferior): New global variable.
13611 (linux_create_inferior, linux_attach): Set it.
13612 (linux_wait_for_process): Call the_low_target.arch_setup after the
13613 target has stopped for the first time.
13614 (initialize_low): Do not call the_low_target.arch_setup.
13615
13616 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13617 (s390_set_pc): Likewise.
13618 (s390_arch_setup): New function.
13619 (the_low_target): Use s390_arch_setup as arch_setup routine.
13620
13621 * regcache.c (realloc_register_cache): New function.
13622 (set_register_cache): Call it for each existing regcache.
13623
13624 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13625
13626 * server.h (init_registers): Remove prototype.
13627
13628 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13629 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13630 instead of init_registers ().
13631 * linux-arm-low.c (init_registers_arm): Add prototype.
13632 (init_registers_arm_with_iwmmxt): Likewise.
13633 (the_low_target): Add initializer for arch_setup field.
13634 * linux-cris-low.c (init_registers_cris): Add prototype.
13635 (the_low_target): Add initializer for arch_setup field.
13636 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13637 (the_low_target): Add initializer for arch_setup field.
13638 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13639 (the_low_target): Add initializer for arch_setup field.
13640 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13641 (the_low_target): Add initializer for arch_setup field.
13642 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13643 (the_low_target): Add initializer for arch_setup field.
13644 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13645 (the_low_target): Add initializer for arch_setup field.
13646 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13647 (init_registers_mips64_linux): Likewise.
13648 (the_low_target): Add initializer for arch_setup field.
13649 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13650 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13651 (the_low_target): Add initializer for arch_setup field.
13652 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13653 (init_registers_powerpc_64): Likewise.
13654 (the_low_target): Add initializer for arch_setup field.
13655 * linux-s390-low.c (init_registers_s390): Add prototype.
13656 (init_registers_s390x): Likewise.
13657 (the_low_target): Add initializer for arch_setup field.
13658 * linux-sh-low.c (init_registers_sh): Add prototype.
13659 (the_low_target): Add initializer for arch_setup field.
13660 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13661 (the_low_target): Add initializer for arch_setup field.
13662 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13663 (the_low_target): Add initializer for arch_setup field.
13664
13665 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13666 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13667 instead of init_registers ().
13668 * win32-arm-low.c (init_registers_arm): Add prototype.
13669 (the_low_target): Add initializer for arch_setup field.
13670 * win32-i386-low.c (init_registers_i386): Add prototype.
13671 (the_low_target): Add initializer for arch_setup field.
13672
13673 * spu-low.c (init_registers_spu): Add prototype.
13674 (initialize_low): Call initialie_registers_spu () instead of
13675 initialize_registers ().
13676
13677 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13678
13679 * server.c (handle_v_requests): When handling the vRun and vAttach
13680 packets, if already debugging a process, don't kill it. Return an
13681 error instead.
13682
13683 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13684
13685 * server.c (handle_query): Correct length check.
13686
13687 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13688
13689 * win32-low.c (do_initial_child_stuff): Add process handle
13690 parameter. Set current_process_handle and current_process_id from the
13691 parameters. Clear globals.
13692 (win32_create_inferior): Don't set current_process_handle and
13693 current_process_id here. Instead pass them on the call to
13694 do_initial_child_stuff.
13695 (win32_attach): Likewise.
13696 (win32_clear_inferiors): New.
13697 (win32_kill): Don't close the current process handle or the
13698 current thread handle here. Instead call win32_clear_inferiors.
13699 (win32_detach): Don't open a new handle to the process. Call
13700 win32_clear_inferiors.
13701 (win32_join): Don't rely on current_process_handle; open a new
13702 handle using the process id.
13703 (win32_wait): Call win32_clear_inferiors when the inferior process
13704 has exited.
13705
13706 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13707
13708 * server.c (monitor_show_help): Add "exit".
13709
13710 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13711
13712 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13713 (clean): Add reg-xtensa.c.
13714 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13715 * configure.srv (xtensa*-*-linux*) New target.
13716 * linux-xtensa-low.c: New.
13717 * xtensa-xtregs.c: New.
13718
13719 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13720
13721 * hostio.c: Don't include errno.h.
13722 (errno_to_fileio_errno): Move to hostio-errno.
13723 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13724 error number outputting to the target->hostio_last_error callback.
13725 (hostio_packet_error): Use FILEIO_EINVAL directly.
13726 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13727 calls to hostio_error.
13728 * hostio-errno.c: New.
13729 * server.h (hostio_last_error_from_errno): Declare.
13730 * target.h (target_ops): Add hostio_last_error member.
13731 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13732 as hostio_last_error handler.
13733 * spu-low.c (spu_target_ops): Likewise.
13734 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13735 (wince_hostio_last_error): New functions.
13736 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13737 as hostio_last_error handler.
13738 (win32_target_ops) [!_WIN32_WCE]: Register
13739 hostio_last_error_from_errno as hostio_last_error handler.
13740 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13741 (hostio-errno.o): New rule.
13742 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13743 * configure.srv (srv_hostio_err_objs): New variable. Default to
13744 hostio-errno.o.
13745 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13746 * configure: Regenerate.
13747
13748 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13749
13750 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13751 (linux_kill, linux_detach): Clean up the process list.
13752 * remote-utils.c (remote_open): Improve port number parsing.
13753 (putpkt_binary, input_interrupt): Only send interrupts if the target
13754 is running.
13755 * server.c (extended_protocol): Make static.
13756 (attached): Define earlier.
13757 (exit_requested, response_needed, program_argv): New variables.
13758 (target_running): New.
13759 (start_inferior): Clear attached here.
13760 (attach_inferior): Set attached here.
13761 (require_running): Define.
13762 (handle_query): Use require_running and target_running. Implement
13763 "monitor exit".
13764 (handle_v_attach, handle_v_run): New.
13765 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13766 (gdbserver_usage): Update.
13767 (main): Redo argument parsing. Handle --debug and --multi. Handle
13768 --attach along with other options or after the port. Save
13769 program_argv. Support no initial program. Resynchronize
13770 communication with GDB after an error. Handle "monitor exit".
13771 Use require_running and target_running. Always allow the extended
13772 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13773 restart in extended mode.
13774 * README: Refer to the GDB manual. Update --attach usage.
13775
13776 2007-12-20 Andreas Schwab <schwab@suse.de>
13777
13778 * linux-low.c (STACK_SIZE): Define.
13779 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13780 (linux_test_for_tracefork): Likewise.
13781
13782 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13783
13784 * linux-low.c (linux_wait_for_event): Update messages. Do not
13785 reinsert auto-delete breakpoints.
13786 * mem-break.c (struct breakpoint): Change return type of handler to
13787 int.
13788 (set_breakpoint_at): Update handler type.
13789 (reinsert_breakpoint_handler): Return 1 instead of calling
13790 delete_breakpoint.
13791 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13792 setting a new one.
13793 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13794 * mem-break.h (set_breakpoint_at): Update handler type.
13795 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13796 * win32-low.c (auto_delete_breakpoint): New.
13797 (get_child_debug_event): Use it.
13798
13799 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * configure.ac: Check for pread and pwrite.
13802 * hostio.c (handle_pread): Fall back to lseek and read.
13803 (handle_pwrite): Fall back to lseek and write.
13804 * config.in, configure: Regenerated.
13805
13806 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13807
13808 * server.c (myresume): Add own_buf argument.
13809 (main): Update calls.
13810
13811 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13812
13813 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13814 * remote-utils.c (remote_open): Do not call disable_async_io.
13815 (block_async_io): Delete.
13816 (unblock_async_io): Make static.
13817 (initialize_async_io): New.
13818 * server.c (handle_v_cont): Handle async I/O here.
13819 (myresume): Likewise. Move other common resume tasks here...
13820 (main): ... from here. Call initialize_async_io. Disable async
13821 I/O before the main loop.
13822 * server.h (initialize_async_io): Declare.
13823 (block_async_io, unblock_async_io): Delete prototypes.
13824 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13825
13826 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13827
13828 * remote-utils.c (readchar): Allow binary data in received messages.
13829
13830 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13831
13832 * win32-low.c (attaching): New global.
13833 (win32_create_inferior): Clear the `attaching' global.
13834 (win32_attach): Set the `attaching' global.
13835 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13836 attaching. Only set a breakpoint at the entry point if not
13837 attaching.
13838
13839 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13840
13841 * server.c (main): Don't report dll events on the initial
13842 connection on attaches.
13843
13844 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13845
13846 * server.c (main): Relax numerical bases supported for the pid of
13847 the --attach command line argument.
13848
13849 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13850
13851 * win32-low.c (win32_attach): Call OpenProcess before
13852 DebugActiveProcess, not after. Add last error output to error
13853 call.
13854
13855 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13856
13857 * win32-low.c (win32_get_thread_context)
13858 (win32_set_thread_context): New functions.
13859 (thread_rec): Use win32_get_thread_context.
13860 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13861 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13862 field.
13863
13864 2007-12-03 Leo Zayas
13865 Pedro Alves <pedro_alves@portugalmail.pt>
13866
13867 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13868 global variables.
13869 (child_add_thread): Minor cleanup.
13870 (child_continue): Resume artificially suspended threads before
13871 calling ContinueDebugEvent.
13872 (suspend_one_thread): New.
13873 (fake_breakpoint_event): New.
13874 (get_child_debug_event): Change return type to int. Check here if
13875 gdb sent an interrupt request. If a soft interrupt was requested,
13876 fake a breakpoint event. Return 0 if there is no event to handle,
13877 and 1 otherwise.
13878 (win32_wait): Don't check here if gdb sent an interrupt request.
13879 Ensure there is a valid event to handle.
13880 (win32_request_interrupt): Add soft interruption method as last
13881 resort.
13882
13883 2007-12-03 Leo Zayas
13884 Pedro Alves <pedro_alves@portugalmail.pt>
13885
13886 * win32-low.h (win32_thread_info): Add descriptions to the
13887 structure members. Replace `suspend_count' counter by a
13888 `suspended' flag.
13889 * win32-low.c (thread_rec): Update condition of when to get the
13890 context from the inferior. Rely on ContextFlags being set if it
13891 has already been retrieved. Only suspend the inferior thread if
13892 we haven't already. Warn if that fails.
13893 (continue_one_thread): s/suspend_count/suspended/. Only call
13894 ResumeThread once. Warn if that fails.
13895
13896 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13897
13898 * win32-low.c (win32_wait): Don't read from the inferior when it
13899 has already exited.
13900
13901 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * Makefile.in (win32_low_h): New variable.
13904 (win32-low.o): Add dependency on $(win32_low_h).
13905 (win32-arm-low.o, win32-i386-low.o): New rules.
13906
13907 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * hostio.c: Correct copyright year.
13910
13911 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * Makefile.in (OBS): Add hostio.o.
13914 (hostio.o): New rule.
13915 * server.h (handle_vFile): Declare.
13916 * hostio.c: New file.
13917 * server.c (handle_v_requests): Take packet_len and new_packet_len
13918 for binary packets. Call handle_vFile.
13919 (main): Update call to handle_v_requests.
13920
13921 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13922
13923 * linux-low.c: Include <sched.h>.
13924
13925 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13926
13927 * linux-low.c (linux_tracefork_grandchild): New.
13928 (linux_tracefork_child): Use clone.
13929 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13930
13931 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13932
13933 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13934
13935 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13936
13937 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13938
13939 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13940
13941 * inferiors.c (change_inferior_id): Delete.
13942 (add_pid_to_list, pull_pid_from_list): New.
13943 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13944 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13945 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13946 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13947 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13948 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13949 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13950 (using_threads): Always set to 1.
13951 (handle_extended_wait): New.
13952 (add_process): Do not set TID.
13953 (linux_create_inferior): Set must_set_ptrace_flags.
13954 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13955 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13956 (linux_thread_alive): Rename TID argument to LWPID.
13957 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13958 (linux_wait_for_event): Do not use TID or check using_threads. Update
13959 call to dead_thread_notify. Call handle_extended_wait.
13960 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13961 (send_sigstop): Delete sigstop_sent.
13962 (wait_for_sigstop): Avoid TID.
13963 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13964 (linux_test_for_tracefork): New.
13965 (linux_lookup_signals): Use thread_db_active and
13966 linux_supports_tracefork_flag.
13967 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13968 * linux-low.h (get_process_thread): Avoid TID.
13969 (struct process_ifo): Move thread_known and tid to the end. Remove
13970 sigstop_sent.
13971 (linux_attach_lwp, thread_db_init): Update prototypes.
13972 * server.h (change_inferior_id): Delete prototype.
13973 (add_pid_to_list, pull_pid_from_list): New prototypes.
13974 * thread-db.c (thread_db_use_events): New.
13975 (find_first_thread): Rename to...
13976 (find_one_thread): ...this. Update callers and messages. Do not
13977 call fatal. Check thread_db_use_events. Do not call
13978 change_inferior_id or new_thread_notify.
13979 (maybe_attach_thread): Update. Do not call new_thread_notify.
13980 (thread_db_init): Set thread_db_use_events. Check use_events.
13981 * utils.c (fatal, warning): Correct message prefix.
13982
13983 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13984
13985 * Makefile.in (clean): Remove new files.
13986 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13987 (powerpc-64.o, powerpc-64.c): New rules.
13988 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13989 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13990 with SPE.
13991 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13992 SPE targets.
13993 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13994 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13995 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13996 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13997 (target_regsets): Add AltiVec and SPE register sets.
13998 * configure.ac: Check for AltiVec and SPE.
13999 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14000 (ppc_fill_vrregset, ppc_store_vrregset): New.
14001 (target_regsets): Add AltiVec register set.
14002 * configure: Regenerated.
14003
14004 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * linux-low.c (O_LARGEFILE): Define.
14007 (linux_read_memory): Use /proc/PID/mem.
14008 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14009 * configure, config.in: Regenerated.
14010
14011 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14012
14013 * linux-low.c (linux_wait_for_event): Do not pass signals while
14014 single-stepping.
14015
14016 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14017
14018 * win32-low.c (create_process): New.
14019 (win32_create_inferior): Use create_process instead of
14020 CreateProcess. If create_process failed retry appending an ".exe"
14021 suffix. Store the GetLastError result immediatelly after
14022 create_process calls and use it on the call to error.
14023
14024 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14025
14026 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14027
14028 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14029
14030 * configure.ac: Switch license to GPLv3.
14031
14032 2007-08-01 Michael Snyder <msnyder@access-company.com>
14033
14034 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14035
14036 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14037
14038 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14039 typedef.
14040 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14041 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14042 CloseToolhelp32Snapshot.
14043 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14044 CloseToolhelp32Snapshot.
14045
14046 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14047
14048 * server.c (main): Check for inferior exit before main loop.
14049
14050 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14051
14052 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14053 instead of on tmp_desc.
14054
14055 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14056 Daniel Jacobowitz <dan@codesourcery.com>
14057
14058 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14059 (add_thread): Minor cleanups.
14060 (clear_inferiors): Move lower in the file. Clear the DLL
14061 list.
14062 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14063 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14064 (xml_escape_text): New.
14065 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14066 for qSupported.
14067 (handle_v_cont): Report errors.
14068 (gdbserver_version): Update.
14069 (main): Correct size of own_buf. Do not report initial DLL events.
14070 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14071 (unloaded_dll, xml_escape_text): New.
14072 * win32-low.c (enum target_waitkind): Update comments.
14073 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14074 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14075 (win32_EnumProcessModules, win32_GetModuleInformation)
14076 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14077 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14078 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14079 (win32_Module32First, win32_Module32Next, load_toolhelp)
14080 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14081 (get_child_debug_event): Handle DLL events.
14082 (win32_wait): Likewise.
14083
14084 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14085
14086 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14087 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14088
14089 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14090
14091 * win32-low.c (handle_output_debug_string): Ignore event if not
14092 waiting.
14093
14094 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14095
14096 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14097
14098 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14099
14100 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14101
14102 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14103
14104 * inferiors.c (change_inferior_id): Add comment.
14105 * linux-low.c (check_removed_breakpoint): Add an early
14106 prototype. Improve debug output.
14107 (linux_attach): Doc update.
14108 (linux_detach_one_process, linux_detach): Clean up before releasing
14109 each process.
14110 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14111 * linux-low.h (struct process_info): Doc improvement.
14112 * mem-break.c (delete_all_breakpoints): New.
14113 * mem-break.h (delete_all_breakpoints): New prototype.
14114 * thread-db.c (find_first_thread): New.
14115 (thread_db_create_event): Call it instead of
14116 thread_db_find_new_threads. Clean up unused variables.
14117 (maybe_attach_thread): Remove first thread handling.
14118 (thread_db_find_new_threads): Use find_first_thread.
14119 (thread_db_get_tls_address): Likewise.
14120
14121 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14122
14123 * thread-db.c (thread_db_find_new_threads): Add prototype.
14124 (thread_db_create_event): Check for the main thread before adding
14125 a new thread.
14126 (maybe_attach_thread): Only enable event reporting if TID == 0.
14127 (thread_db_get_tls_address): Check for new threads.
14128
14129 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14130
14131 * linux-low.c (linux_create_inferior): Try execv before execvp.
14132 * spu-low.c (spu_create_inferior): Likewise.
14133
14134 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14135
14136 * linux-low.c (linux_create_inferior): Change execv to execvp.
14137 * spu-low.c (spu_create_inferior): Likewies.
14138
14139 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14140
14141 * Makefile.in (clean): Clean new files instead of deleted ones.
14142 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14143 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14144 rules.
14145 * configure.srv: Specify XML files and new regformats for MIPS and
14146 MIPS64 GNU/Linux.
14147 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14148 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14149 an entry for the restart register.
14150 (mips_cannot_fetch_register, mips_cannot_store_register)
14151 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14152 register names to match the XML descriptions.
14153 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14154 restart register instead of $0.
14155
14156 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14157 Markus Deuling <deuling@de.ibm.com>
14158
14159 * remote-utils.c (decode_xfer_write): New function.
14160 * server.h (decode_xfer_write): Add prototype.
14161 * server.c (handle_query): Add PACKET_LEN argument. Support
14162 qXfer:spu:read and qXfer:spu:write packets.
14163 (main): Pass packet_len to handle_query.
14164 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14165 * target.h (target_ops): Add qxfer_spu.
14166
14167 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14168
14169 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14170 accessing non-seekable spufs files.
14171
14172 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14173
14174 * server.c (handle_query): Add reply for qC packet.
14175
14176 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14177 Leo Zayas <lerele@champenstudios@com>
14178
14179 * server.h (check_remote_input_interrupt_request): New function.
14180 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14181 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14182 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14183 (check_remote_input_interrupt_request): New function.
14184 * server.h (check_remote_input_interrupt_request): Declare.
14185 * win32-low.c (winapi_DebugBreakProcess,
14186 winapi_GenerateConsoleCtrlEvent): New typedefs.
14187 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14188 to 250 ms.
14189 (win32_wait): Check for remote interrupt request
14190 with check_remote_input_interrupt_request.
14191 (win32_request_interrupt): New function.
14192 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14193
14194 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14195
14196 * win32-low.c (debug_registers_changed,
14197 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14198 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14199 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14200 (thread_rec): Get context using the low target.
14201 (child_add_thread): Call thread_added on the low target,
14202 which does the same thing.
14203 (regptr): Delete.
14204 (do_initial_child_stuff): Remove debug registers references.
14205 Set context using the low target. Resume threads after
14206 setting the contexts.
14207 (child_continue): Remove dead variable. Remove debug
14208 registers references.
14209 (child_fetch_inferior_registers): Go through the low target.
14210 (do_child_store_inferior_registers): Remove.
14211 (child_store_inferior_registers): Go through the low target.
14212 (win32_resume): Remove debug registers references.
14213 Set context using the low target.
14214 (handle_exception): Change return type to void. Don't record
14215 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14216 first chance exception.
14217 (get_child_debug_event): Change return type to void. Remove
14218 goto loop. Always return after waiting for debug event.
14219 (win32_wait): Convert to switch statement. Handle spurious
14220 events.
14221
14222 * win32-i386-low.c (debug_registers_changed,
14223 debug_registers_used): New.
14224 (initial_stuff): Rename to ...
14225 (i386_initial_stuff): ... this. Clear debug registers
14226 state variables.
14227 (store_debug_registers): Delete.
14228 (i386_get_thread_context): New.
14229 (load_debug_registers): Delete.
14230 (i386_set_thread_context): New.
14231 (i386_thread_added): New.
14232 (single_step): Rename to ...
14233 (i386_single_step): ... this.
14234 (do_fetch_inferior_registers): Rename to ...
14235 (i386_fetch_inferior_register): ... this.
14236 (i386_store_inferior_register): New.
14237 (the_low_target): Adapt to new interface.
14238
14239 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14240 (arm_get_thread_context): New.
14241 (arm_set_thread_context): New.
14242 (regptr): New.
14243 (do_fetch_inferior_registers): Rename to ...
14244 (arm_fetch_inferior_register): ... this.
14245 (arm_store_inferior_register): New.
14246 (arm_wince_breakpoint): Reimplement as unsigned long.
14247 (arm_wince_breakpoint_len): Define.
14248 (the_low_target): Adapt to new interface.
14249
14250 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14251 load_debug_registers. Add get_thread_context, set_thread_context,
14252 thread_added and store_inferior_register. Rename
14253 fetch_inferior_registers to fetch_inferior_register.
14254 (regptr): Remove declaration.
14255
14256 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14257
14258 * linux-low.c (linux_detach): Change return type to int. Return 0.
14259 * spu-low.c (spu_detach): Likewise.
14260
14261 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14262
14263 * target.h (target_ops): Change return type of detach to int.
14264 Add join.
14265 (join_inferior): New.
14266 * server.c (main): Don't skip detach support on mingw32.
14267 If the inferior doesn't support detaching return error.
14268 Call join_inferior instead of using waitpid.
14269 * linux-low.c (linux_join): New.
14270 (linux_target_op): Add linux_join.
14271 * spu-low.c (spu_join): New.
14272 (spu_target_ops): Add spu_join.
14273 * win32-low.c (win32_detach): Adapt to new interface.
14274 Reopen current_process_handle before detaching. Issue a child
14275 resume before detaching.
14276 (win32_join): New.
14277 (win32_target_op): Add win32_join.
14278
14279 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14280
14281 * win32-low.c (win32-attach): Fix return value.
14282 * target.h (target_ops): Describe ATTACH return values.
14283
14284 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14285
14286 * win32-low.c (GETPROCADDRESS): Define.
14287 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14288 (winapi_DebugSetProcessKillOnExit): Likewise.
14289 (win32_create_inferior): Force usage of ansi CreateProcessA.
14290 (win32_attach): Use GETPROCADDRESS.
14291 (win32_detach): Likewise.
14292
14293 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14294
14295 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14296
14297 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14298
14299 * win32-low.c: Commit leftover changes from 2007-03-29.
14300
14301 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14302
14303 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14304 fields short instead of int. Add explicit padding.
14305 (i387_cache_to_fsave): Remove unnecessary casts.
14306 (i387_fsave_to_cache): Doc fix.
14307 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14308
14309 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14312 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14313
14314 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14315
14316 * configure.srv (arm*-*-mingw32ce*): Move near the other
14317 arm targets.
14318
14319 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14320
14321 * configure.ac: Add errno checking.
14322 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14323 sys/file.h and malloc.h.
14324 (AC_CHECK_DECLS): Add perror.
14325 (srv_mingwce): Handle.
14326 * configure.srv (i[34567]86-*-cygwin*): Add
14327 win32-i386-low.o to srv_tgtobj.
14328 (i[34567]86-*-mingw*): Likewise.
14329 (arm*-*-mingw32ce*): Add case.
14330 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14331 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14332 [__MINGW32CE__] (strerror): New function.
14333 [__MINGW32CE__] (errno): Define to GetLastError.
14334 [__MINGW32CE__] (COUNTOF): New macro.
14335 (remote_open): Remove extra close call.
14336 * mem-break.c (delete_breakpoint_at): New function.
14337 * mem-break.h (delete_breakpoint_at): Declare.
14338 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14339 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14340 [USE_WIN32API] (read, write): Add char* casts.
14341 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14342 * server.h: Include wincecompat.h on Windows CE.
14343 [HAVE_ERRNO_H]: Check.
14344 (perror): Declare if not declared.
14345 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14346 (perror_with_name): Remove errno declaration.
14347 * wincecompat.h: New.
14348 * wincecompat.c: New.
14349 * win32-low.h: New.
14350 * win32-arm-low.c: New.
14351 * win32-i386-low.c: New.
14352 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14353 (OUTMSG2): Make it safe.
14354 (_T): New macro.
14355 (COUNTOF): New macro.
14356 (NUM_REGS): Get it from the low target.
14357 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14358 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14359 (thread_rec): Let low target handle debug registers.
14360 (child_add_thread): Likewise.
14361 (child_init_thread_list): Likewise.
14362 (continue_one_thread): Likewise.
14363 (regptr): New.
14364 (do_child_fetch_inferior_registers): Move to ...
14365 * win32-i386-low.c: ... here, and rename to ...
14366 (do_fetch_inferior_registers): ... this.
14367 * win32-low.c (child_fetch_inferior_registers):
14368 Go through the low target.
14369 (do_child_store_inferior_registers): Use regptr.
14370 (strwinerror): New function.
14371 (win32_create_inferior): Handle Windows CE.
14372 Use strwinerror instead of strerror on Windows error
14373 codes. Add program to the error output.
14374 Don't close the main thread handle on Windows CE.
14375 (win32_attach): Use coredll.dll on Windows CE.
14376 (win32_kill): Close current process and current
14377 thread handles.
14378 (win32_detach): Use coredll.dll on Windows CE.
14379 (win32_resume): Let low target handle debug registers, and
14380 step request.
14381 (handle_exception): Add/Remove initial breakpoint. Avoid
14382 non-existant WSTOPSIG on Windows CE.
14383 (win32_read_inferior_memory): Cast to remove warning.
14384 (win32_arch_string): Go through the low target.
14385 (initialize_low): Call set_breakpoint_data with the low
14386 target's breakpoint.
14387 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14388 FOP_REGNUM, mappings): Move to ...
14389 * win32-i386-low.c: ... here.
14390 * win32-low.c (win32_thread_info): Move to ...
14391 * win32-low.h: ... here.
14392 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14393 win32-arm-low.c and wincecompat.c.
14394 (all:): Add $EXEEXT.
14395 (install-only:): Likewise.
14396 (gdbserver:): Likewise.
14397 (gdbreplay:): Likewise.
14398 * config.in: Regenerate.
14399 * configure: Regenerate.
14400
14401 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14402
14403 * win32-low.c: Rename typedef thread_info to
14404 win32_thread_info throughout.
14405
14406 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14407
14408 * win32-i386-low.c: Rename to ...
14409 * win32-low.c: ... this.
14410 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14411 * Makefile.in: Likewise.
14412
14413 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14414
14415 * remote-utils.c (monitor_output): Constify msg parameter.
14416 * server.h (monitor_output): Likewise.
14417 * win32-i386-low.c (handle_output_debug_string): New.
14418 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14419 handle_output_debug_string.
14420 (get_child_debug_event): Likewise.
14421
14422 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14423
14424 * server.c (main): Correct strtoul check.
14425
14426 2007-03-27 Jon Ringle <jon@ringle.org>
14427
14428 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14429
14430 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14431
14432 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14433
14434 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14435
14436 * terminal.h: Check HAVE_SGTTY_H.
14437
14438 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14439
14440 * remote-utils.c (remote_open): Print out the assigned port number.
14441
14442 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14443
14444 * remote-utils.c (monitor_output): New function.
14445 * server.c (debug_threads): Define here.
14446 (monitor_show_help): New function.
14447 (handle_query): Handle qRcmd.
14448 (main): Do not handle 'd' packet.
14449 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14450 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14451 of debug_threads.
14452
14453 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14454
14455 * Makefile.in (EXEEXT): New.
14456 (clean): Use $(EXEEXT).
14457
14458 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14459
14460 * target.h (target_ops): Rename send_signal to request_interrupt,
14461 and remove enum target_signal parameter.
14462 * linux-low.c (linux_request_interrupt): Rename from
14463 linux_send_signal, and always send SIGINT.
14464 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14465 and always send SIGINT.
14466 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14467 of send_signal.
14468 (input_interrupt): Likewise.
14469
14470 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14471
14472 * server.c (get_features_xml): Check if target implemented
14473 arch_string.
14474 * win32-i386-low.c (win32_arch_string): New.
14475 (win32_target_ops): Add win32_arch_string as arch_string member.
14476
14477 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14478
14479 * spu-low.c (spu_arch_string): New.
14480 (spu_target_ops): Add spu_arch_string.
14481
14482 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14483
14484 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14485 * configure.ac: Do not check for terminal.h.
14486 * configure, config.in: Regenerated.
14487
14488 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14489
14490 * Makefile.in (OBS): Add $(XML_BUILTIN).
14491 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14492 (clean): Update.
14493 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14494 (arm-with-iwmmxt.c): New.
14495 * config.in, configure: Regenerate.
14496 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14497 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14498 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14499 (arm*-*-linux*): Add iWMMXt and regset support.
14500 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14501 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14502 (arm_store_wmmxregset, target_regsets): New.
14503 * server.c (get_features_xml): Take annex argument. Check builtin
14504 XML documents.
14505 (handle_query): Handle multiple annexes.
14506
14507 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14508
14509 * remote-utils.c [USE_WIN32API] (read, write): Define.
14510 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14511 write.
14512
14513 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * linux-i386-low.c (the_low_target): Set arch_string.
14516 * linux-x86-64-low.c (the_low_target): Likewise.
14517 * linux-low.c (linux_arch_string): New.
14518 (linux_target_ops): Add it.
14519 * linux-low.h (struct linux_target_ops): Add arch_string.
14520 * server.c (write_qxfer_response): Use const void * for DATA.
14521 (get_features_xml): New.
14522 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14523 * target.h (struct target_ops): Add arch_string method.
14524
14525 2007-01-03 Denis Pilat <denis.pilat@st.com>
14526 Daniel Jacobowitz <dan@codesourcery.com>
14527
14528 * linux-low.c (linux_kill): Handle being called with no threads.
14529 * win32-i386-low.c (win32_kill): Likewise.
14530 (get_child_debug_event): Clear current_process_handle.
14531
14532 2006-12-30 Denis PILAT <denis.pilat@st.com>
14533 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * remote-utils.c (remote_open): Check the type of specified
14536 serial port devices before opening them.
14537 * server.c (main): Kill the inferior if an error occurs during
14538 the first remote_open.
14539
14540 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14541
14542 * README: Update supported targets.
14543
14544 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14545
14546 * Makefile.in (clean): Remove reg-mips64.c.
14547 (reg-mips64.c, reg-mips64.o): New rules.
14548 * configure.srv: Handle mips64. Include regset support for mips.
14549 * linux-mips-low.c (union mips_register): New.
14550 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14551 (mips_breakpoint, mips_breakpoint_at): Use int.
14552 (mips_collect_register, mips_supply_register)
14553 (mips_collect_register_32bit, mips_supply_register_32bit)
14554 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14555 (mips_store_fpregset, target_regsets): New.
14556 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14557
14558 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14559
14560 * configure.srv: Add target "spu*-*-*".
14561 * Makefile.in (clean): Remove reg-spu.c.
14562 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14563 * spu-low.c: New file.
14564
14565 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14566
14567 * configure.ac: Correct td_thr_tls_get_addr test.
14568 * configure: Regenerated.
14569
14570 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14571
14572 * linux-low.c (linux_wait_for_event): Reformat. Use the
14573 pass_signals array.
14574 * remote-utils.c (decode_address_to_semicolon): New.
14575 * server.c (pass_signals, handle_general_set): New.
14576 (handle_query): Mention QPassSignals for qSupported.
14577 (main): Call handle_general_set.
14578 * server.h (pass_signals, decode_address_to_semicolon): New.
14579
14580 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14581
14582 * server.c (handle_query): Correct error handling for read_auxv.
14583
14584 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14585
14586 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14587 and srv_linux_thread_db to yes.
14588 * linux-s390-low.c (s390_fill_gregset): New function.
14589 (target_regsets): Define data structure.
14590
14591 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14594 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14595 * config.in, configure: Regenerated.
14596 * inferiors.c (gdb_id_to_thread): New function.
14597 (gdb_id_to_thread_id): Use it.
14598 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14599 * linux-low.h (struct process_info): Add th member.
14600 (thread_db_get_tls_address): New prototype.
14601 * remote-utils.c (decode_address): Make non-static.
14602 * server.c (handle_query): Handle qGetTLSAddr.
14603 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14604 * target.h (struct target_ops): Add get_tls_address.
14605 * thread-db.c (maybe_attach_thread): Save the thread handle.
14606 (thread_db_get_tls_address): New.
14607
14608 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14609
14610 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14611 (linux_resume_one_process): Take a siginfo_t *. Update all
14612 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14613 (struct pending_signals): Add a siginfo_t.
14614 (linux_wait_for_process): Always set last_status.
14615 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14616 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14617 * linux-low.h (struct process_info): Add last_status.
14618
14619 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * remote-utils.c (try_rle): New function.
14622 (putpkt_binary): Use it.
14623
14624 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14625
14626 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14627 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14628 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14629 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14630 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14631 point registers.
14632
14633 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14634
14635 * server.c (terminal_fd): New variable.
14636 (old_foreground_pgrp): Likewise.
14637 (restore_old_foreground_pgrp): New function.
14638 (start_inferior): Record the terminal file descriptor in terminal_fd
14639 and its original foreground group in old_foreground_pgrp. Register
14640 restore_old_foreground_pgrp with atexit().
14641
14642 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * server.c (handle_query): Correct qPart to qXfer.
14645
14646 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14647
14648 * configure.ac: Check for more headers which are missing on
14649 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14650 * configure.srv: Add Cygwin and mingw32.
14651 * remote-utils.c: Don't include headers unconditionally which
14652 are missing on mingw32. Include <winsock.h> for mingw32.
14653 (remote_open): Adjust for mingw32 support. Flush
14654 standard error after writing to it.
14655 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14656 (unblock_async_io, enable_async_io, disable_async_io)
14657 (readchar, getpkt): Update for Winsock support.
14658 (prepare_resume_reply): Expect a protocol signal number.
14659 * server.c: Disable <sys/wait.h> on mingw32.
14660 (start_inferior): Adjust for mingw32 support. Flush
14661 standard error after writing to it.
14662 (attach_inferior): Likewise. Use protocol signal
14663 numbers.
14664 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14665 and names.
14666 * win32-i386-low.c: New file.
14667 * Makefile.in (XM_CLIBS): Set.
14668 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14669 (win32-i386-low.o): New dependency rule.
14670 * linux-low.c (linux_wait): Use target signal numbers.
14671 * target.h (struct target_ops): Doc fix.
14672 * server.h (target_signal_to_name): New prototype.
14673 * gdbreplay.c: Don't include headers unconditionally which
14674 are missing on mingw32. Include <winsock.h> for mingw32.
14675 (remote_close, remote_open): Adjust for Winsock support.
14676 * configure, config.in: Regenerated.
14677
14678 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14679
14680 * server.c (decode_xfer_read, write_qxfer_response): New.
14681 (handle_query): Take a packet length argument. Handle
14682 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14683 the qSupported response.
14684 (main): Update call to handle_query.
14685
14686 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14687
14688 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14689 (putpkt_binary): Renamed from putpkt and adjusted for binary
14690 data.
14691 (putpkt): New wrapper for putpkt_binary.
14692 (readchar): Don't mask off the high bit.
14693 (decode_X_packet): New function.
14694 * server.c (main): Call putpkt_binary if a handler sets the packet
14695 length. Save the length of the incoming packet. Handle 'X'.
14696 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14697
14698 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14699
14700 * server.c (handle_query): Handle qSupported.
14701
14702 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * remote-utils.c (all_symbols_looked_up): New variable.
14705 (look_up_one_symbol): Check it.
14706 * server.h (look_up_one_symbol): New declaration.
14707 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14708
14709 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * Makefile.in (linux-arm-low.o): Update dependencies.
14712 * linux-arm-low.c: Include "gdb_proc_service.h".
14713 (PTRACE_GET_THREAD_AREA): Define.
14714 (ps_get_thread_area): New function.
14715
14716 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14717
14718 * configure.srv (m68k*-*-uclinux*): New target.
14719 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14720 (linux_resume_one_process): Remove extraneous cast.
14721 (linux_read_offsets): New.
14722 (linux_target_op): Add linux_read_offsets on mmuless systems.
14723 * server.c (handle_query): Add qOffsets logic.
14724 * target.h (struct target_ops): Add read_offsets.
14725
14726 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14727
14728 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14729 (PTRACE_GET_THREAD_AREA): Define.
14730 (ps_get_thread_area): New function.
14731 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14732 (linux-x86-64-low.o): Update.
14733
14734 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14735
14736 * configure.ac: Remove checks for prfpregset_t.
14737 * gdb_proc_service.h: New file.
14738 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14739 new "gdb_proc_service.h".
14740 * proc-service.c: Likewise.
14741 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14742 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14743 * Makefile.in (gdb_proc_service_h): Updated.
14744 * configure, config.in: Regenerated.
14745
14746 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * remote-utils.c (prepare_resume_reply): Move declaration
14749 of gdb_id_from_wait to the top of the block.
14750
14751 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14752
14753 * linux-low.c (regsets_store_inferior_registers): Read the regset
14754 from the target before filling it.
14755
14756 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14757
14758 * server.c (attach_inferior): Return SIGTRAP for a successful
14759 attach.
14760
14761 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14762
14763 * Makefile.in (OBS): Add version.o.
14764 (STAGESTUFF): Delete.
14765 (version.o): Add dependencies.
14766 (version.c): Replace rule.
14767 (clean): Remove version.c.
14768 * server.c (gdbserver_version): New.
14769 (gdbserver_usage): Use printf.
14770 (main): Handle --version and --help.
14771 * server.h (version, host_name): Add declarations.
14772
14773 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14774
14775 * linux-arm-low.c:
14776 * linux-arm-low.c:
14777 * inferiors.c:
14778 * i387-fp.h:
14779 * i387-fp.c:
14780 * gdbreplay.c:
14781 * regcache.c:
14782 * proc-service.c:
14783 * mem-break.h:
14784 * mem-break.c:
14785 * linux-x86-64-low.c:
14786 * linux-sh-low.c:
14787 * linux-s390-low.c:
14788 * linux-ppc64-low.c:
14789 * linux-ppc-low.c:
14790 * linux-mips-low.c:
14791 * linux-m68k-low.c:
14792 * linux-m32r-low.c:
14793 * linux-low.h:
14794 * linux-low.c:
14795 * linux-ia64-low.c:
14796 * linux-i386-low.c:
14797 * linux-crisv32-low.c:
14798 * thread-db.c:
14799 * terminal.h:
14800 * target.h:
14801 * target.c:
14802 * server.h:
14803 * server.c:
14804 * remote-utils.c:
14805 * regcache.h:
14806 * utils.c:
14807 * Makefile.in:
14808 * configure.ac:
14809 * gdbserver.1: Add (C) after Copyright. Update the FSF
14810 address.
14811
14812 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14813
14814 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14815 (arm_breakpoint_at): Recognize both breakpoints.
14816 (the_low_target): Use the correct breakpoint instruction.
14817
14818 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14819
14820 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14821 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14822 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14823 (the_low_target): Update.
14824
14825 2005-10-25 Andreas Schwab <schwab@suse.de>
14826
14827 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14828
14829 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14830 (ia64_num_regs): Reduce to 462.
14831
14832 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14833
14834 * acinclude.m4: Correct quoting.
14835 * aclocal.m4: Regenerated.
14836
14837 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14838 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14839 (thread_db_init): Call thread_db_err_str.
14840 * configure.ac: Check for TD_VERSION.
14841 * config.in, configure: Regenerated.
14842
14843 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14844
14845 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14846
14847 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14848
14849 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14850 is not available. Define HAVE_PTRACE_GETREGS if it is.
14851 * config.in, configure: Regenerated.
14852 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14853 * linux-i386-low.c, linux-m68k-low.c: Update to use
14854 HAVE_PTRACE_GETREGS.
14855 * linux-low.c (regsets_fetch_inferior_registers)
14856 (regsets_store_inferior_registers): Only return 0 if we processed
14857 GENERAL_REGS.
14858 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14859 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14860
14861 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14862
14863 * inferiors.c (struct thread_info): Add gdb_id.
14864 (add_thread): Add gdb_id argument.
14865 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14866 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14867 calls to add_thread.
14868 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14869 * server.c (handle_query): Use thread_to_gdb_id.
14870 (handle_v_cont, main): Use gdb_id_to_thread_id.
14871 * server.h (add_thread): Update prototype.
14872 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14873 prototypes.
14874
14875 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14876
14877 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14878 left-padded registers.
14879 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14880 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14881
14882 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14883
14884 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14885 * configure: Regenerate.
14886 * config.in: Regenerate.
14887 * server.h (NEED_DECLARATION_STRERROR):
14888 Replace with !HAVE_DECL_STRERROR.
14889
14890 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14891
14892 * linux-low.c (linux_wait, linux_send_signal): Don't test
14893 an unsigned long variable for > 0 if it could be MAX_ULONG.
14894 * server.c (myresume): Likewise.
14895 * target.c (set_desired_inferior): Likewise.
14896
14897 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14898
14899 * configure.ac: Simplify and improve check for socklen_t.
14900 * configure, config.in: Regenerate.
14901
14902 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14903
14904 * acconfig.h: Remove.
14905 * configure.ac: Add a test for socklen_t. Use three-argument
14906 AC_DEFINE throughout.
14907 * config.in: Regenerated using autoheader 2.59.
14908 * configure: Regenerated.
14909
14910 * gdbreplay.c (socklen_t): Provide a default.
14911 (remote_open): Use socklen_t.
14912 * remote-utils.c (socklen_t): Provide a default.
14913 (remote_open): Use socklen_t.
14914 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14915 unsigned char.
14916
14917 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14918 char for buffers.
14919 * linux-low.c (linux_read_memory, linux_write_memory)
14920 (linux_read_auxv): Likewise.
14921 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14922 (check_mem_write): Likewise.
14923 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14924 Likewise.
14925 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14926 (registers_from_string, register_data): Likewise.
14927 * server.c (handle_query, main): Likewise.
14928 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14929 (decode_M_packet): Likewise.
14930 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14931 * target.h (struct target_ops): Update read_memory, write_memory,
14932 and read_auxv.
14933 (read_inferior_memory, write_inferior_memory): Update.
14934 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14935 to unsigned char *.
14936 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14937 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14938 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14939 linux-s390-low.c, linux-sh-low.c: Update for changes in
14940 read_inferior_memory and the_low_target->breakpoint.
14941
14942 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14943
14944 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14945 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14946 * configure.srv: Add powerpc64-*-linux*.
14947 * linux-ppc64-low.c: New file.
14948
14949 2005-05-23 Orjan Friberg <orjanf@axis.com>
14950
14951 * linux-cris-low.c: New file with support for CRIS.
14952 * linux-crisv32-low.c: Ditto for CRISv32.
14953 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14954 (clean): Add reg-cris.c and reg-crisv32.c.
14955 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14956 reg-crisv32.o, and reg-crisv32.c to make rules.
14957 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14958 recognized targets.
14959
14960 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14961
14962 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14963 of sizeof (PTRACE_XFER_TYPE).
14964 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14965
14966 2005-05-12 Orjan Friberg <orjanf@axis.com>
14967
14968 * target.h (struct target_ops): Add insert_watchpoint,
14969 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14970 pointers for hardware watchpoint support.
14971 * linux-low.h (struct linux_target_ops): Ditto.
14972 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14973 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14974 to linux_target_ops.
14975 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14976 reply packet.
14977 * server.c (main): Recognize 'Z' and 'z' packets.
14978
14979 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14980
14981 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14982 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14983 (the_low_target): Add new members.
14984
14985 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14986
14987 * proc-service.c (ps_lgetregs): Search all_processes instead of
14988 all_threads.
14989
14990 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14991
14992 * server.c (start_inferior): Change return type to int.
14993 (attach_inferior): Change sigptr to int *.
14994 (handle_v_cont, handle_v_requests): Change signal to int *.
14995 (main): Change signal to int.
14996
14997 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14998
14999 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15000 * configure.srv: Add m32r*-*-linux*.
15001 * linux-m32r-low.c: New file.
15002
15003 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15004
15005 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15006
15007 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15010 Take unsigned long arguments for PIDs.
15011 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15012 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15013 (wait_for_sigstop, linux_resume_one_process)
15014 (regsets_fetch_inferior_registers, linux_send_signal)
15015 (linux_read_auxv): Likewise. Update the types of variables holding
15016 PIDs. Update format string specifiers.
15017 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15018 * remote-utils.c (prepare_resume_reply): Likewise.
15019 * server.c (cont_thread, general_thread, step_thread)
15020 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15021 unsigned long.
15022 (handle_query): Update format specifiers.
15023 (handle_v_cont, main): Use strtoul for thread IDs.
15024 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15025 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15026 (general_thread, step_thread, thread_from_wait)
15027 (old_thread_from_wait): Update.
15028 * target.h (struct thread_resume): Use unsigned long for THREAD.
15029 (struct target_ops): Use unsigned long for arguments to attach and
15030 thread_alive.
15031
15032 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15033
15034 * acinclude.m4: Include bfd/bfd.m4 directly.
15035 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15036 <agriffis@toolchain.org>.
15037 * aclocal.m4, configure: Regenerated.
15038
15039 2005-01-07 Andrew Cagney <cagney@gnu.org>
15040
15041 * configure.ac: Rename configure.in, require autoconf 2.59.
15042 * configure: Re-generate.
15043
15044 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15045
15046 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15047 LIBS when finished.
15048 * aclocal.m4: Regenerated.
15049 * configure: Regenerated.
15050
15051 2004-11-21 Andreas Schwab <schwab@suse.de>
15052
15053 * linux-m68k-low.c (m68k_num_gregs): Define.
15054 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15055 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15056 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15057 (m68k_breakpoint_at): New. Add to the_low_target.
15058
15059 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15060 srv_linux_thread_db to yes.
15061
15062 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15063
15064 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15065 (ARCH_SET_FS): Likewise.
15066 (ARCH_GET_FS): Likewise.
15067 (ARCH_GET_GS): Likewise.
15068
15069 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15070
15071 * linux-i386-low.c (ps_get_thread_area): New.
15072 * linux-x86-64-low.c (ps_get_thread_area): New.
15073 * linux-low.c: Include <sys/syscall.h>.
15074 (linux_kill_one_process): Don't kill the first thread here.
15075 (linux_kill): Kill the first thread here.
15076 (kill_lwp): New function.
15077 (send_sigstop, linux_send_signal): Use it.
15078 * proc-service.c: Clean up #ifdefs.
15079 (fpregset_info): Delete.
15080 (ps_lgetregs): Update and enable implementation.
15081 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15082 implementations.
15083 * remote-utils.c (struct sym_cache, symbol_cache): New.
15084 (input_interrupt): Print a clearer message.
15085 (async_io_enabled): New variable.
15086 (enable_async_io, disable_async_io): Use it. Update comments.
15087 (look_up_one_symbol): Use the symbol cache.
15088 * thread-db.c (thread_db_look_up_symbols): New function.
15089 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15090
15091 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15092
15093 * configure.in: Test for -rdynamic.
15094 * configure: Regenerated.
15095 * Makefile (INTERNAL_LDFLAGS): New.
15096 (gdbserver, gdbreplay): Use it.
15097
15098 2004-09-02 Andrew Cagney <cagney@gnu.org>
15099
15100 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15101
15102 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15103
15104 * linux-low.c (linux_wait): Clear all_processes list also.
15105
15106 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15107
15108 * linux-low.c: Include <errno.h>. Remove extern declaration of
15109 errno.
15110
15111 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15112
15113 * gdbreplay.c, server.h, utils.c: Update copyright years.
15114
15115 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15116
15117 * server.c (main): Print child status or termination signal from
15118 variable 'signal', not 'sig'.
15119
15120 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15121
15122 * linux-low.c (linux_read_memory): Change return type to
15123 int. Check for and return error from ptrace().
15124 * target.c (read_inferior_memory): Change return type to int. Pass
15125 back return status from the_target->read_memory().
15126 * target.h (struct target_ops): Adapt *read_memory() prototype.
15127 Update comment.
15128 (read_inferior_memory): Adapt prototype.
15129 * server.c (main): Return an error packet if
15130 read_inferior_memory() returns an error.
15131
15132 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15133
15134 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15135 Unify with other clean targets.
15136
15137 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15138
15139 * server.c (handle_v_cont): Call set_desired_inferior.
15140
15141 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15142
15143 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15144
15145 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15146
15147 * linux-low.c (linux_wait): Unblock async I/O.
15148 (linux_resume): Block and enable async I/O.
15149 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15150 * server.h (block_async_io, unblock_async_io): Add prototypes.
15151
15152 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15153
15154 * remote-utils.c (remote_open): Print a status notice after
15155 opening a TCP port.
15156 * server.c (attach_inferior): Print a status notice after
15157 attaching.
15158
15159 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15160
15161 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15162
15163 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15164
15165 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15166 error packet.
15167 * server.c, target.h: Update copyright years.
15168
15169 2004-02-25 Roland McGrath <roland@redhat.com>
15170
15171 * target.h (struct target_ops): New member `read_auxv'.
15172 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15173 * linux-low.c (linux_read_auxv): New function.
15174 (linux_target_ops): Initialize `read_auxv' member to that.
15175
15176 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15177
15178 Committed by Jim Blandy <jimb@redhat.com>.
15179
15180 * linux-s390-low.c (s390_num_regs): Update.
15181 (s390_regmap): Remove control registers. Use __s390x__ predefine
15182 instead of GPR_SIZE to distiguish s390 and s390x targets.
15183
15184 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15185
15186 * linux-low.c: Update copyright year.
15187 (check_removed_breakpoint): Clear pending_is_breakpoint.
15188 (linux_set_resume_request, linux_queue_one_thread)
15189 (resume_status_pending_p): New functions.
15190 (linux_continue_one_thread): Use process->resume.
15191 (linux_resume): Only resume threads if there are no pending events.
15192 * linux-low.h (struct process_info): Add resume request
15193 pointer.
15194
15195 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15196
15197 * regcache.c (new_register_cache): Clear the allocated register
15198 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15199
15200 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15201
15202 * linux-low.c (linux_resume): Take a struct thread_resume *
15203 argument.
15204 (linux_wait): Update call.
15205 (resume_ptr): New static variable.
15206 (linux_continue_one_thread): Renamed from
15207 linux_continue_one_process. Use resume_ptr.
15208 (linux_resume): Use linux_continue_one_thread.
15209 * server.c (handle_v_cont, handle_v_requests): New functions.
15210 (myresume): New function.
15211 (main): Handle 'v' case.
15212 * target.h (struct thread_resume): New type.
15213 (struct target_ops): Change argument of "resume" to struct
15214 thread_resume *.
15215 (myresume): Delete macro.
15216
15217 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15218
15219 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15220 (uninstall): Support DESTDIR.
15221
15222 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15223
15224 * configure.srv: Add xscale*linux copy of arm*linux entry.
15225
15226 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15227
15228 * linux-arm-low.c (arm_reinsert_addr): New function.
15229 (the_low_target): Add arm_reinsert_addr.
15230
15231 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15232
15233 * mem-break.c: Remove whitespace at end of file.
15234
15235 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15236
15237 * configure.in: Check whether we need to prototype strerror.
15238 * server.h: Optionally prototype strerror.
15239 * gdbreplay.c (perror_with_name): Use strerror.
15240 * linux-low.c (linux_attach_lwp): Use strerror.
15241 * utils.c (perror_with_name): Use strerror.
15242 * config.in, configure: Regenerated.
15243
15244 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15245
15246 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15247 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15248
15249 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15250
15251 * Makefile.in (SFILES): Update.
15252 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15253 low-sun3.c: Remove files.
15254
15255 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15256
15257 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15258 (linux_detach_one_process, linux_detach): New functions.
15259 (linux_target_ops): Add linux_detach.
15260 * server.c (main): Handle 'D' packet.
15261 * target.h (struct target_ops): Add "detach" member.
15262 (detach_inferior): Define.
15263
15264 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15265
15266 From Kelley Cook <kelleycook@wideopenwest.com>:
15267 * configure.srv: Accept i[34567]86 variants.
15268
15269 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15270
15271 * linux-low.c (linux_wait_for_event): Correct comment typos.
15272 (linux_resume_one_process): Call check_removed_breakpoint.
15273 (linux_send_signal): New function.
15274 (linux_target_ops): Add linux_send_signal.
15275 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15276 of kill.
15277 * target.h (struct target_ops): Add send_signal.
15278
15279 2003-05-29 Jim Blandy <jimb@redhat.com>
15280
15281 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15282 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15283 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15284 away part of the register's value.
15285
15286 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15287
15288 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15289 (linux_wait_for_event, linux_init_signals): Likewise.
15290
15291 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15292
15293 * configure.in: Check for stdlib.h.
15294 * configure: Regenerated.
15295 * config.in: Regenerated.
15296
15297 2003-01-04 Andreas Schwab <schwab@suse.de>
15298
15299 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15300
15301 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15302
15303 * Makefile.in: Remove obsolete code.
15304
15305 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15306
15307 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15308 defined(PT_FPR0_HI).
15309
15310 2002-11-17 Stuart Hughes <seh@zee2.com>
15311
15312 * linux-arm-low.c (arm_num_regs): Increase.
15313 (arm_regmap): Include status register.
15314
15315 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15316
15317 * linux-low.c (register_addr): Remove incorrect -1 check.
15318
15319 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15320
15321 * linux-low.c (linux_create_inferior): Call setpgid. Return
15322 the new PID.
15323 (unstopped_p, linux_signal_pid): Remove.
15324 (linux_target_ops): Remove linux_signal_pid.
15325 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15326 global instead of target method.
15327 * target.h (struct target_ops): Remove signal_pid. Update comment
15328 for create_inferior.
15329 * server.c (signal_pid): New variable.
15330 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15331 gdbserver. Set the child to be the foreground process group.
15332 (attach_inferior): Set signal_pid.
15333
15334 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15335
15336 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15337
15338 2002-08-20 Jim Blandy <jimb@redhat.com>
15339
15340 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15341 default for this.
15342
15343 2002-08-01 Andrew Cagney <cagney@redhat.com>
15344
15345 * Makefile.in: Make chill references obsolete.
15346
15347 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15348
15349 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15350 * configure: Regenerate.
15351 * config.in: Regenerate.
15352
15353 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15354
15355 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15356 (perror_with_name, remote_close, remote_open, expect, play): Static.
15357
15358 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15359
15360 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15361 byte offsets instead of an array of indexes.
15362 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15363
15364 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15365
15366 * regcache.c: Add comment.
15367
15368 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15369
15370 * thread-db.c: New file.
15371 * proc-service.c: New file.
15372 * acinclude.m4: New file.
15373 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15374 proc-service.o, and thread-db.o.
15375 (linux-low.o): Add USE_THREAD_DB.
15376 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15377 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15378 * aclocal.m4: Regenerated.
15379 * config.in: Regenerated.
15380 * configure: Regenerated.
15381 * configure.in: Check for proc_service.h, sys/procfs.h,
15382 thread_db.h, and linux/elf.h headrs.
15383 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15384 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15385 Check for -lthread_db and thread support.
15386 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15387 PowerPC, and SuperH.
15388 * i387-fp.c: Constify arguments.
15389 * i387-fp.h: Likewise.
15390 * inferiors.c: (struct thread_info): Renamed from
15391 `struct inferior_info'. Remove PID member. Use generic inferior
15392 list header. All uses updated.
15393 (inferiors, signal_pid): Removed.
15394 (all_threads): New variable.
15395 (get_thread): Define.
15396 (add_inferior_to_list): New function.
15397 (for_each_inferior): New function.
15398 (change_inferior_id): New function.
15399 (add_inferior): Removed.
15400 (remove_inferior): New function.
15401 (add_thread): New function.
15402 (free_one_thread): New function.
15403 (remove_thread): New function.
15404 (clear_inferiors): Use for_each_inferior and free_one_thread.
15405 (find_inferior): New function.
15406 (find_inferior_id): New function.
15407 (inferior_target_data): Update argument type.
15408 (set_inferior_target_data): Likewise.
15409 (inferior_regcache_data): Likewise.
15410 (set_inferior_regcache_data): Likewise.
15411 * linux-low.c (linux_bp_reinsert): Remove.
15412 (all_processes, stopping_threads, using_thrads)
15413 (struct pending_signals, debug_threads, pid_of): New.
15414 (inferior_pid): Replace with macro.
15415 (struct inferior_linux_data): Remove.
15416 (get_stop_pc, add_process): New functions.
15417 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15418 Use add_process and add_thread.
15419 (linux_attach_lwp): New function, based on old linux_attach. Use
15420 add_process and add_thread. Set stop_expected for new threads.
15421 (linux_attach): New function.
15422 (linux_kill_one_process): New function.
15423 (linux_kill): Kill all LWPs.
15424 (linux_thread_alive): Use find_inferior_id.
15425 (check_removed_breakpoints, status_pending_p): New functions.
15426 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15427 Update. Use WNOHANG. Wait for cloned processes also. Update process
15428 struct for the found process.
15429 (linux_wait_for_event): New function.
15430 (linux_wait): Use it. Support LWPs.
15431 (send_sigstop, wait_for_sigstop, stop_all_processes)
15432 (linux_resume_one_process, linux_continue_one_process): New functions.
15433 (linux_resume): Support LWPs.
15434 (REGISTER_RAW_SIZE): Remove.
15435 (fetch_register): Use register_size instead. Call supply_register.
15436 (usr_store_inferior_registers): Likewise. Call collect_register.
15437 Fix recursive case.
15438 (regsets_fetch_inferior_registers): Improve error message.
15439 (regsets_store_inferior_registers): Add debugging.
15440 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15441 (unstopped_p, linux_signal_pid): New functions.
15442 (linux_target_ops): Add linux_signal_pid.
15443 (linux_init_signals): New function.
15444 (initialize_low): Call it. Initialize using_threads.
15445 * regcache.c (inferior_regcache_data): Add valid
15446 flag.
15447 (get_regcache): Fetch registers lazily. Add fetch argument
15448 and update all callers.
15449 (regcache_invalidate_one, regcache_invalidate): New
15450 functions.
15451 (new_register_cache): Renamed from create_register_cache.
15452 Return the new regcache.
15453 (free_register_cache): Change argument to a void *.
15454 (registers_to_string, registers_from_string): Call get_regcache
15455 with fetch flag set.
15456 (register_data): Make static. Pass fetch flag to get_regcache.
15457 (supply_register): Call get_regcache with fetch flag clear.
15458 (collect_register): Call get_regcache with fetch flag set.
15459 (collect_register_as_string): New function.
15460 * regcache.h: Update.
15461 * remote-utils.c (putpkt): Flush after debug output and use
15462 stderr.
15463 Handle input interrupts while waiting for an ACK.
15464 (input_interrupt): Use signal_pid method.
15465 (getpkt): Flush after debug output and use stderr.
15466 (outreg): Use collect_register_as_string.
15467 (new_thread_notify, dead_thread_notify): New functions.
15468 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15469 and general_thread.
15470 (look_up_one_symbol): Flush after debug output.
15471 * server.c (step_thread, server_waiting): New variables.
15472 (start_inferior): Don't use signal_pid. Update call to mywait.
15473 (attach_inferior): Update call to mywait.
15474 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15475 (main): Don't fetch/store registers explicitly. Use
15476 set_desired_inferior. Support proposed ``Hs'' packet. Update
15477 calls to mywait.
15478 * server.h: Update.
15479 (struct inferior_list, struct_inferior_list_entry): New.
15480 * target.c (set_desired_inferior): New.
15481 (write_inferior_memory): Constify.
15482 (mywait): New function.
15483 * target.h: Update.
15484 (struct target_ops): New signal_pid method.
15485 (mywait): Removed macro, added prototype.
15486
15487 * linux-low.h (regset_func): Removed.
15488 (regset_fill_func, regset_store_func): New.
15489 (enum regset_type): New.
15490 (struct regset_info): Add type field. Use new operation types.
15491 (struct linux_target_ops): stop_pc renamed to get_pc.
15492 Add decr_pc_after_break and breakpoint_at.
15493 (get_process, get_thread_proess, get_process_thread)
15494 (strut process_info, all_processes, linux_attach_lwp)
15495 (thread_db_init): New.
15496
15497 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15498 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15499 (the_low_target): Add new members.
15500 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15501 (i386_store_fpxregset): Constify.
15502 (target_regsets): Add new kind identifier.
15503 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15504 (i386_set_pc): Add debugging.
15505 (i386_breakpoint_at): New function.
15506 (the_low_target): Add new members.
15507 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15508 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15509 (mips_breakpoint_at): New.
15510 (the_low_target): Add new members.
15511 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15512 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15513 (the_low_target): Add new members.
15514 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15515 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15516 (the_low_target): Add new members.
15517 * linux-x86-64-low.c (target_regsets): Add new kind
15518 identifier.
15519
15520 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15521
15522 From Martin Pool <mbp@samba.org>:
15523 * server.c (gdbserver_usage): New function.
15524 (main): Call it.
15525
15526 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15527
15528 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15529 stop_at -> stop_pc.
15530
15531 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15532
15533 * Makefile.in: Remove obsolete code.
15534
15535 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15536
15537 * linux-low.c (regsets_fetch_inferior_registers),
15538 (regsets_store_inferior_registers): Removed cast to int from
15539 ptrace() calls.
15540 * regcache.h: Added declaration of struct inferior_info.
15541
15542 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15543
15544 * inferiors.c (struct inferior_info): Add regcache_data.
15545 (add_inferior): Call create_register_cache.
15546 (clear_inferiors): Call free_register_cache.
15547 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15548 * regcache.c (struct inferior_regcache_data): New.
15549 (registers): Remove.
15550 (get_regcache): New function.
15551 (create_register_cache, free_register_cache): New functions.
15552 (set_register_cache): Don't initialize the register cache here.
15553 (registers_to_string, registers_from_string, register_data): Call
15554 get_regcache.
15555 * regcache.h: Add prototypes.
15556 * server.h: Likewise.
15557
15558 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15559
15560 * mem-break.c: New file.
15561 * mem-break.h: New file.
15562 * Makefile.in: Add mem-break.o rule; update server.h
15563 dependencies.
15564 * inferiors.c (struct inferior_info): Add target_data
15565 member.
15566 (clear_inferiors): Free target_data member if set.
15567 (inferior_target_data, set_inferior_target_data): New functions.
15568 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15569 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15570 * linux-low.c (linux_bp_reinsert): New variable.
15571 (struct inferior_linux_data): New.
15572 (linux_create_inferior): Use set_inferior_target_data.
15573 (linux_attach): Likewise. Call add_inferior.
15574 (linux_wait_for_one_inferior): New function.
15575 (linux_wait): Call it.
15576 (linux_write_memory): Add const.
15577 (initialize_low): Call set_breakpoint_data.
15578 * linux-low.h (struct linux_target_ops): Add breakpoint
15579 handling members.
15580 * server.c (attach_inferior): Remove extra add_inferior
15581 call.
15582 * server.h: Include mem-break.h. Update inferior.c
15583 prototypes.
15584 * target.c (read_inferior_memory)
15585 (write_inferior_memory): New functions.
15586 * target.h (read_inferior_memory)
15587 (write_inferior_memory): Change macros to prototypes.
15588 (struct target_ops): Update comments. Add const to write_memory
15589 definition.
15590
15591 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15592
15593 * linux-low.c (usr_store_inferior_registers): Support
15594 registers which are allowed to fail to store.
15595 * linux-low.h (linux_target_ops): Likewise.
15596 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15597 (ppc_cannot_store_register): FPSCR may not be storable.
15598
15599 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15600
15601 * server.h: Include <string.h> if HAVE_STRING_H.
15602 * ChangeLog: Correct paths in last ChangeLog entry.
15603
15604 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15605
15606 * linux-low.h: Remove obsolete prototypes.
15607 (struct linux_target_ops): New.
15608 (extern the_low_target): New.
15609 * linux-low.c (num_regs, regmap): Remove declarations.
15610 (register_addr): Use the_low_target explicitly.
15611 (fetch_register): Likewise.
15612 (usr_fetch_inferior_registers): Likewise.
15613 (usr_store_inferior_registers): Likewise.
15614 * linux-arm-low.c (num_regs): Remove.
15615 (arm_num_regs): Define.
15616 (arm_regmap): Renamed from regmap, made static.
15617 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15618 made static.
15619 (arm_cannot_store_register): Renamed from cannot_store_register,
15620 made static.
15621 (the_low_target): New.
15622 * linux-i386-low.c (num_regs): Remove.
15623 (i386_num_regs): Define.
15624 (i386_regmap): Renamed from regmap, made static.
15625 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15626 made static.
15627 (i386_cannot_store_register): Renamed from cannot_store_register,
15628 made static.
15629 (the_low_target): New.
15630 * linux-ia64-low.c (num_regs): Remove.
15631 (ia64_num_regs): Define.
15632 (ia64_regmap): Renamed from regmap, made static.
15633 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15634 made static.
15635 (ia64_cannot_store_register): Renamed from cannot_store_register,
15636 made static.
15637 (the_low_target): New.
15638 * linux-m68k-low.c (num_regs): Remove.
15639 (m68k_num_regs): Define.
15640 (m68k_regmap): Renamed from regmap, made static.
15641 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15642 made static.
15643 (m68k_cannot_store_register): Renamed from cannot_store_register,
15644 made static.
15645 (the_low_target): New.
15646 * linux-mips-low.c (num_regs): Remove.
15647 (mips_num_regs): Define.
15648 (mips_regmap): Renamed from regmap, made static.
15649 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15650 made static.
15651 (mips_cannot_store_register): Renamed from cannot_store_register,
15652 made static.
15653 (the_low_target): New.
15654 * linux-ppc-low.c (num_regs): Remove.
15655 (ppc_num_regs): Define.
15656 (ppc_regmap): Renamed from regmap, made static.
15657 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15658 made static.
15659 (ppc_cannot_store_register): Renamed from cannot_store_register,
15660 made static.
15661 (the_low_target): New.
15662 * linux-s390-low.c (num_regs): Remove.
15663 (s390_num_regs): Define.
15664 (s390_regmap): Renamed from regmap, made static.
15665 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15666 made static.
15667 (s390_cannot_store_register): Renamed from cannot_store_register,
15668 made static.
15669 (the_low_target): New.
15670 * linux-sh-low.c (num_regs): Remove.
15671 (sh_num_regs): Define.
15672 (sh_regmap): Renamed from regmap, made static.
15673 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15674 made static.
15675 (sh_cannot_store_register): Renamed from cannot_store_register,
15676 made static.
15677 (the_low_target): New.
15678 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15679 (the_low_target): New.
15680
15681 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15682
15683 * Makefile.in: Add stamp-h target.
15684 * configure.in: Create stamp-h.
15685 * configure: Regenerated.
15686
15687 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15688
15689 * inferiors.c: New file.
15690 * target.c: New file.
15691 * target.h: New file.
15692 * Makefile.in: Add target.o and inferiors.o. Update
15693 dependencies.
15694 * linux-low.c (inferior_pid): New static variable,
15695 moved from server.c.
15696 (linux_create_inferior): Renamed from create_inferior.
15697 Call add_inferior. Return 0 on success instead of a PID.
15698 (linux_attach): Renamed from myattach.
15699 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15700 (linux_thread_alive): Renamed from mythread_alive.
15701 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15702 child dies.
15703 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15704 (regsets_store_inferior_registers): Correct error message.
15705 Add missing ``return 0''.
15706 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15707 (linux_store_registers): Renamed from store_inferior_registers.
15708 (linux_read_memory): Renamed from read_inferior_memory.
15709 (linux_write_memory): Renamed from write_inferior_memory.
15710 (linux_target_ops): New structure.
15711 (initialize_low): Call set_target_ops ().
15712 * remote-utils.c (unhexify): New function.
15713 (hexify): New function.
15714 (input_interrupt): Send signals to ``signal_pid''.
15715 * server.c (inferior_pid): Remove.
15716 (start_inferior): Update create_inferior call.
15717 (attach_inferior): Call add_inferior.
15718 (handle_query): New function.
15719 (main): Call handle_query for `q' packets.
15720 * server.h: Include "target.h". Remove obsolete prototypes.
15721 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15722
15723 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15724
15725 * Makefile.in: Add WARN_CFLAGS. Update configury
15726 dependencies.
15727 * configure.in: Check for <string.h>
15728 * configure: Regenerate.
15729 * config.in: Regenerate.
15730 * gdbreplay.c: Include needed system headers.
15731 (remote_open): Remove strchr prototype.
15732 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15733 * regcache.c (supply_register): Change buf argument to const void *.
15734 (supply_register_by_name): Likewise.
15735 (collect_register): Change buf argument to void *.
15736 (collect_register_by_name): Likewise.
15737 * regcache.h: Add missing prototypes.
15738 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15739 * server.c (handle_query): New function.
15740 (attached): New static variable, moved out of main.
15741 (main): Quiet longjmp clobber warnings.
15742 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15743 * utils.c (error): Remove NORETURN.
15744 (fatal): Likewise.
This page took 0.374268 seconds and 4 git commands to generate.