Remove usages of find_inferior in handle_status
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
99078d34
SM
12017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (queue_stop_reply_callback): Change prototype, return
4 void.
5 (find_status_pending_thread_callback): Remove.
6 (handle_status): Replace find_inferior with find_thread and
7 for_each_thread.
8
cc628f3d
AH
92017-10-25 Alan Hayward <alan.hayward@arm.com>
10
11 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
12 with REGNO.
13 (aarch64_store_gregset): Likewise.
14 (aarch64_fill_fpregset): Likewise.
15 (aarch64_store_fpregset): Likewise.
16
4d3bb80e
SM
172017-10-21 Simon Marchi <simon.marchi@ericsson.com>
18
19 * gdbthread.h (find_thread, for_each_thread): New functions.
20 * inferiors.c (thread_of_pid): Remove.
21 (find_any_thread_of_pid): Use find_thread.
22 * linux-low.c (num_lwps): Use for_each_thread.
23
7a7cdfa0
YQ
242017-10-17 Yao Qi <yao.qi@linaro.org>
25
26 * Makefile.in: Remove one rule.
27 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
28
e675d170
YQ
292017-10-17 Yao Qi <yao.qi@linaro.org>
30
31 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
32 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
33
7eb4e0f9
YQ
342017-10-17 Yao Qi <yao.qi@linaro.org>
35
36 * configure.srv: Rename arm.o with arch/arm.o.
37
60d6cfc9
YQ
382017-10-17 Yao Qi <yao.qi@linaro.org>
39
40 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
41 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
42 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
43 (arch-i386.o, arch-amd64.o): Remove rules.
44 (arch/%.o): New rule.
45 Update POSTCOMPILE and COMPILE.pre.
46 * configure.ac: Invoke AC_CONFIG_COMMANDS.
47 * configure: Re-generated.
48 * configure.srv: Replace arch-i386.o with arch/i386.o.
49 Replace arch-amd64.o with arch/amd64.o.
50
5bfda255
YQ
512017-10-16 Yao Qi <yao.qi@linaro.org>
52
53 * configure: Regenerated.
54
9c80ecd6
SM
552017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * inferiors.h: (struct inferior_list): Remove.
58 (struct inferior_list_entry); Remove.
59 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
60 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
61 get_first_inferior): Remove.
62 (for_each_inferior, for_each_inferior_with_data, find_inferior,
63 find_inferior_id, find_inferior_in_random): Change signature.
64 * inferiors.c (all_threads): Change type to
65 std::list<thread_info *>.
66 (get_thread): Remove macro.
67 (find_inferior, find_inferior_id): Change signature, implement
68 using find_thread.
69 (find_inferior_in_random): Change signature, implement using
70 find_thread_in_random.
71 (for_each_inferior, for_each_inferior_with_data): Change
72 signature, implement using for_each_thread.
73 (add_inferior_to_list, remove_inferior): Remove.
74 (add_thread, get_first_thread, thread_of_pid,
75 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
76 (get_first_inferior, one_inferior_p, clear_inferior_list):
77 Remove.
78 (clear_inferiors, get_thread_process): Update.
79 * gdbthread.h: Include <list>.
80 (struct thread_info) <entry>: Remove field.
81 <id>: New field.
82 (all_threads): Change type to std::list<thread_info *>.
83 (get_first_inferior): Add doc.
84 (find_thread, for_each_thread, find_thread_in_random): New
85 functions.
86 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
87 * linux-arm-low.c (update_registers_callback): Update.
88 * linux-low.c (second_thread_of_pid_p): Update.
89 (kill_one_lwp_callback, linux_detach_lwp_callback,
90 delete_lwp_callback, status_pending_p_callback, same_lwp,
91 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
92 iterate_over_lwps, not_stopped_callback,
93 resume_stopped_resumed_lwps, count_events_callback,
94 select_singlestep_lwp_callback, select_event_lwp_callback,
95 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
96 suspend_and_send_sigstop_callback, wait_for_sigstop,
97 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
98 lwp_running, linux_set_resume_request, resume_status_pending_p,
99 need_step_over_p, start_step_over, linux_resume_one_thread,
100 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
101 reset_lwp_ptrace_options_callback): Update.
102 * linux-mips-low.c (update_watch_registers_callback): Update.
103 * regcache.c (regcache_invalidate_one, regcache_invalidate):
104 Update.
105 (free_register_cache_thread_one): Remove.
106 (regcache_release): Update.
107 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
108 handle_qxfer_threads_worker): Update.
109 (handle_query): Update, use list iterator.
110 (visit_actioned_threads, handle_pending_status,
111 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
112 clear_pending_status_callback, set_pending_status_callback,
113 find_status_pending_thread_callback, handle_status,
114 process_serial_event): Update.
115 * target.c (thread_search_callback): Update.
116 * thread-db.c (thread_db_get_tls_address): Update.
117 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
118 Update.
119 * win32-i386-low.c (update_debug_registers_callback): Update.
120 * win32-low.c (delete_thread_info, child_delete_thread,
121 continue_one_thread, suspend_one_thread,
122 get_child_debug_event): Adjust.
123
9179355e
SM
1242017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
125
126 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
127 * inferiors.h: Include <list>.
128 (struct process_info) <entry>: Remove field.
129 <pid>: New field.
130 (pid_of): Change macro to function.
131 (ptid_of, lwpid_of): Remove macro.
132 (all_processes): Change type to std::list<process_info *>.
133 (ALL_PROCESSES): Remove macro.
134 (for_each_process, find_process): New function.
135 * inferiors.c (all_processes): Change type to
136 std::list<process_info *>.
137 (find_thread_process): Adjust.
138 (add_process): Likewise.
139 (remove_process): Likewise.
140 (find_process_pid): Likewise.
141 (get_first_process): Likewise.
142 (started_inferior_callback): Remove.
143 (have_started_inferiors_p): Adjust.
144 (attached_inferior_callback): Remove.
145 (have_attached_inferiors_p): Adjust.
146 * linux-low.c (check_zombie_leaders): Likewise.
147 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
148 (x86_linux_update_xmltarget): Adjust.
149 * server.c (handle_query): Likewise.
150 (gdb_reattached_process): Remove.
151 (handle_status): Adjust.
152 (kill_inferior_callback): Likewise.
153 (detach_or_kill_inferior): Remove.
154 (print_started_pid): Likewise.
155 (print_attached_pid): Likewise.
156 (detach_or_kill_for_exit): Update.
157 (process_serial_event): Likewise.
158 * linux-arm-low.c (arm_new_fork): Likewise.
159
c9cb8905
SM
1602017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
161
162 * dll.h: Include <list>.
163 (struct dll_info): Add constructor.
164 <entry>: Remove field.
165 (all_dlls): Change type to std::list<dll_info>.
166 * dll.c: Include <algorithm>.
167 (get_dll): Remove macro.
168 (all_dlls): Change type to std::list<dll_info *>.
169 (free_one_dll): Remove.
170 (match_dll): Likewise.
171 (loaded_dll): Adjust.
172 (unloaded_dll): Adjust to all_dlls type change, use
173 std::find_if. Inline code from match_dll.
174 (clear_dlls): Adjust to all_dlls type change.
175 * server.c (emit_dll_description): Remove.
176 (handle_qxfer_libraries): Adjust to all_dlls type change,
177 integrate emit_dll_description's functionality.
178
04ec7890
SM
1792017-10-12 Simon Marchi <simon.marchi@ericsson.com>
180
181 * linux-low.h (struct linux_target_ops) <delete_process>: New
182 field.
183 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
184 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
185 (struct linux_target_ops): Add delete_process callback.
186 * linux-arm-low.c (arm_delete_process): New.
187 (struct linux_target_ops): Add delete_process callback.
188 * linux-bfin-low.c (struct linux_target_ops): Likewise.
189 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
190 * linux-m32r-low.c (struct linux_target_ops): Likewise.
191 * linux-mips-low.c (mips_linux_delete_process): New.
192 (struct linux_target_ops): Add delete_process callback.
193 * linux-ppc-low.c (struct linux_target_ops): Likewise.
194 * linux-s390-low.c (struct linux_target_ops): Likewise.
195 * linux-sh-low.c (struct linux_target_ops): Likewise.
196 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
197 * linux-tile-low.c (struct linux_target_ops): Likewise.
198 * linux-x86-low.c (x86_linux_delete_process): New.
199 (struct linux_target_ops): Add delete_process callback.
200 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
201
466eecee
SM
2022017-10-12 Simon Marchi <simon.marchi@ericsson.com>
203
204 * linux-aarch64-low.c (the_low_target): Add thread delete
205 callback.
206 * linux-arm-low.c (arm_delete_thread): New function.
207 (the_low_target): Add thread delete callback.
208 * linux-bfin-low.c (the_low_target): Likewise.
209 * linux-crisv32-low.c (the_low_target): Likewise.
210 * linux-low.c (delete_lwp): Invoke delete_thread callback if
211 set.
212 * linux-low.h (struct linux_target_ops) <delete_thread>: New
213 field.
214 * linux-m32r-low.c (the_low_target): Add thread delete callback.
215 * linux-mips-low.c (mips_linux_delete_thread): New function.
216 (the_low_target): Add thread delete callback.
217 * linux-ppc-low.c (the_low_target): Likewise.
218 * linux-s390-low.c (the_low_target): Likewise.
219 * linux-sh-low.c (the_low_target): Likewise.
220 * linux-tic6x-low.c (the_low_target): Likewise.
221 * linux-tile-low.c (the_low_target): Likewise.
222 * linux-x86-low.c (the_low_target): Likewise.
223 * linux-xtensa-low.c (the_low_target): Likewise.
224
b79f7801
YZ
2252017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
226
227 * win32-low.c: Include "common-inferior.h".
228
bc3b087d
SDJ
2292017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
230
231 * inferiors.c (set_inferior_cwd): New function.
232 * server.c (handle_general_set): Handle QSetWorkingDir packet.
233 (handle_query): Inform that QSetWorkingDir is supported.
234 * win32-low.c (create_process): Pass the inferior's cwd to
235 CreateProcess.
236
d092c5a2
SDJ
2372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
238
239 * inferiors.c (current_inferior_cwd): New global variable.
240 (get_inferior_cwd): New function.
241 * inferiors.h (struct process_info) <cwd>: New field.
242
7da0a886
SDJ
2432017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
244
245 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
246 (OBS): Add gdb_tilde_expand.o.
247
289a6840
SM
2482017-10-02 Simon Marchi <simon.marchi@ericsson.com>
249
250 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
251 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
252
256642e8
PA
2532017-09-29 Pedro Alves <palves@redhat.com>
254
255 * ax.c (gdb_parse_agent_expr): Constify.
256 * ax.h (gdb_parse_agent_expr): Constify.
257 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
258 Constify.
259 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
260 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
261 * remote-utils.h (read_ptid): Constify.
262 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
263 (process_point_options, process_serial_event): Constify.
264 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
265 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
266 (cmd_qtbuffer): Constify.
267
5b9ca4d4
PA
2682017-09-29 Pedro Alves <palves@redhat.com>
269
270 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
271 fails.
272
94c207e0
PA
2732017-09-29 Pedro Alves <palves@redhat.com>
274
275 * linux-low.c (handle_extended_wait): Pass parent thread instead
276 of process to thread_db_notice_clone.
277 * linux-low.h (thread_db_notice_clone): Replace parent process
278 parameter with parent thread parameter.
279 * thread-db.c (find_one_thread): Add comment.
280 (thread_db_notice_clone): Replace parent process parameter with
281 parent thread parameter. Temporarily switch to the parent thread.
282
75352e28
SDJ
2832017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
284
285 * gdbthread.h: Include "common-gdbthread.h".
286 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
287 "if" when validating the ptid.
288 * remote-utils.c: Include "gdbthread.h".
289 (prepare_resume_reply): Use "switch_to_thread".
290 * target.c (done_accessing_memory): Likewise.
291
ad339634
AA
2922017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
293
294 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
295 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
296 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
297 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
298 s390x-gs-linux64-ipa.o to ipa_obj.
299 * linux-s390-low.c (HWCAP_S390_GS): New define.
300 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
301 New functions.
302 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
303 (s390_arch_setup): Check for guarded-storage support and choose
304 appropriate tdesc.
305 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
306 init_registers_s390x_gs_linux64.
307 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
308 enum value.
309 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
310 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
311
cc4d742f
SM
3122017-09-22 Simon Marchi <simon.marchi@ericsson.com>
313
314 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
315
f6327dcb
KB
3162017-09-21 Kevin Buettner <kevinb@redhat.com>
317
318 * linux-low.h (struct lwp_info): Add new field, thread_handle.
319 (thread_db_thread_handle): Declare.
320 * linux-low.c (linux_target_ops): Initialize thread_handle.
321 * server.c (handle_qxfer_threads_worker): Add support for
322 "handle" attribute.
323 * target.h (struct target_ops): Add new function pointer,
324 thread_handle.
325 (target_thread_handle): Define.
326 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
327 field in lwp.
328 (thread_db_thread_handle): New function.
329
86299109
KB
3302017-09-21 Kevin Buettner <kevinb@redhat.com>
331
332 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
333 * linux-low.h (thread_db_notice_clone): Declare.
334 * thread-db.c (thread_db_notice_clone): New function.
335
f557a88a
PA
3362017-09-21 Pedro Alves <palves@redhat.com>
337
338 * server.c (gdb_read_memory, handle_status, process_serial_event)
339 (handle_serial_event, handle_target_event): Adjust to
340 set_desired_thread prototype change.
341 * target.c (set_desired_thread): Remove 'use_general' parameter
342 and adjust.
343 * target.h (set_desired_thread): Remove 'use_general' parameter.
344
223ffa71
TT
3452017-09-20 Tom Tromey <tom@tromey.com>
346
347 * target.c (target_terminal::terminal_state): Define.
348 (target_terminal::init): Rename from target_terminal_init.
349 (target_terminal::inferior): Rename from
350 target_terminal_inferior.
351 (target_terminal::ours): Rename from target_terminal_ours.
352 (target_terminal::ours_for_output, target_terminal::info): New.
353
04fd3ba9
SM
3542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
355
356 * server.c (accumulate_file_name_length): Remove.
357 (emit_dll_description): Adjust to std::string change.
358 (handle_qxfer_libraries): Use std::string to hold document.
359
5e187554
SM
3602017-09-16 Simon Marchi <simon.marchi@ericsson.com>
361
362 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
363 return type of xml_escape_text.
364 * server.c (emit_dll_description): Likewise.
365
1526853e
SM
3662017-09-16 Simon Marchi <simon.marchi@ericsson.com>
367
368 * server.c (captured_main): Accept argument for --selftest.
369 Update run_tests call.
370 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
371 when registering selftests.
372
c4dfafab
SDJ
3732017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
374
375 * regcache.c (get_thread_regcache): Update code to use "std::vector"
376 instead of "VEC" for "target_desc.reg_defs".
377 (regcache_cpy): Likewise.
378 (registers_to_string): Likewise.
379 (registers_from_string): Likewise.
380 (find_regno): Likewise.
381 (supply_regblock): Likewise.
382 (regcache_raw_read_unsigned): Likewise.
383 * tdesc.c (init_target_desc): Likewise.
384 (tdesc_create_reg): Likewise.
385 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
386 (struct target_desc) <reg_defs>: Convert to "std::vector".
387 (target_desc): Do not initialize "reg_defs".
388 (~target_desc): Update code to use "std::vector" instead of "VEC"
389 for "target_desc.reg_defs".
390 (operator==): Likewise.
391
124aceb4
SM
3922017-09-15 Simon Marchi <simon.marchi@ericsson.com>
393
394 * inferiors.h (thread_to_gdb_id): Remove.
395 * inferiors.c (thread_to_gdb_id): Remove.
396 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
397 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
398 lynx_store_registers, lynx_read_memory, lynx_write_memory):
399 Likewise.
400 * nto-low.c (nto_fetch_registers, nto_store_registers,
401 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
402
96cde54f
SM
4032017-09-15 Simon Marchi <simon.marchi@ericsson.com>
404
405 * inferiors.h (gdb_id_to_thread_id): Remove.
406 * inferiors.c (gdb_id_to_thread_id): Remove.
407 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
408 removal. Move pid declaration closer to where it's used.
409
e8ca139e
SM
4102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
411
412 * server.c (handle_detach): New function.
413 (process_serial_event): Move code out, call handle_detach.
414
f8a4e119
SM
4152017-09-15 Simon Marchi <simon.marchi@ericsson.com>
416
417 * server.c (require_running): Rename to ...
418 (require_running_or_return): ... this ...
419 (require_running_or_break): ... and this.
420 (handle_query, process_serial_event): Adjust.
421
0eb0a407
SM
4222017-09-15 Simon Marchi <simon.marchi@ericsson.com>
423
424 * linux-low.c (linux_set_resume_request): Remove unused
425 variables.
426
785922a5
SM
4272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
428
429 * server.c (first_thread_of): Remove.
430 (process_serial_event): Replace usage of first_thread_of with
431 find_any_thread_of_pid.
432 * tracepoint.c (same_process_p): Remove.
433 (gdb_agent_about_to_close): Replace usage of same_process_p with
434 find_any_thread_of_pid.
435 * linux-x86-low.c (same_process_callback): Remove.
436 (x86_arch_setup_process_callback): Replace usage of
437 same_process_callback with find_any_thread_of_pid.
438 * thread-db.c (any_thread_of): Remove.
439 (switch_to_process): Replace usage of any_thread_of with
440 find_any_thread_of_pid.
441 * inferiors.c (thread_pid_matches_callback): Remove.
442 (find_thread_process): Adjust to use find_any_thread_of_pid.
443
a059f00c
SDJ
4442017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
445
446 * regcache.c (get_thread_regcache): Guard calls to "memset"
447 with "!VEC_empty".
448
cc397f3a
SDJ
4492017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
450
451 * linux-low.c (handle_extended_wait): Use
452 "allocate_target_description" instead of "XNEW".
453 * linux-x86-low.c (initialize_low_arch): Likewise.
454
22916b07
YQ
4552017-09-05 Yao Qi <yao.qi@linaro.org>
456
457 * configure.srv (srv_i386_regobj): Remove.
458 (srv_amd64_regobj): Remove.
459 (srv_regobj): Set it to "" for x86 non-linux targets.
460 * linux-x86-tdesc.c (i386_linux_read_description):
461 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
462 (init_registers_i386): Remove the declaration.
463 (tdesc_i386): Remove the declaration.
464 (lynx_i386_arch_setup): Call i386_create_target_description.
465 * nto-x86-low.c: Likewise.
466 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
467 [!__x86_64__]: include arch/i386.h.
468 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
469
38602d55
YQ
4702017-09-05 Yao Qi <yao.qi@linaro.org>
471
472 * configure.srv (srv_amd64_linux_xmlfiles): Remove
473 i386/amd64-XXX-linux from it.
474
44b886ff
YQ
4752017-09-05 Yao Qi <yao.qi@linaro.org>
476
477 * configure.srv: Empty srv_amd64_linux_regobj if $development is
478 false.
479 (ipa_amd64_linux_regobj): Remove.
480 (ipa_x32_linux_regobj): Remove.
481
b4570e4b
YQ
4822017-09-05 Yao Qi <yao.qi@linaro.org>
483
484 * Makefile.in (arch-amd64.o): New rule.
485 * configure.srv: Append arch-amd64.o.
486 * linux-amd64-ipa.c: Include common/x86-xstate.h.
487 (get_ipa_tdesc): Call amd64_linux_read_description.
488 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
489 and init_registers_amd64_XXX.
490 * linux-x86-low.c (x86_linux_read_description): Call
491 amd64_linux_read_description.
492 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
493 (initialize_low_arch): Don't call init_registers_x32_XXX and
494 init_registers_amd64_XXX.
495 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
496 and tdesc_amd64_XXX.
497 [__x86_64__] (amd64_tdesc_test): New function.
498 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
499 and init_registers_amd64_XXX.
500 * linux-x86-tdesc.c: Include arch/amd64.h.
501 (xcr0_to_tdesc_idx): New function.
502 (i386_linux_read_description): New function.
503 (amd64_get_ipa_tdesc_idx): New function.
504 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
505 (amd64_get_ipa_tdesc): Declare.
506
d1f28ea2
YQ
5072017-09-05 Yao Qi <yao.qi@linaro.org>
508
509 * configure.srv (srv_i386_linux_xmlfiles): Remove
510 i386/i386-XXX-linux.xml from it.
511
25a93583
YQ
5122017-09-05 Yao Qi <yao.qi@linaro.org>
513
514 * configure.srv: Set srv_i386_linux_regobj empty if $development
515 is false.
516 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
517 initialize_low_tdesc.
518 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
519 with #if initialize_low_tdesc.
520 * linux-x86-tdesc-selftest.c: New file.
521 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
522
5f035c07
YQ
5232017-09-05 Yao Qi <yao.qi@linaro.org>
524
525 * Makefile.in (arch-i386.o): New rule.
526 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
527 (x86_64-*-linux*): Likewise.
528 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
529 include arch/i386.h.
530 (i386_linux_read_description): Remove code and call
531 i386_create_target_description.
532 * tdesc.c (allocate_target_description): New function.
533 * tdesc.h (set_tdesc_architecture): Remove declaration.
534 (set_tdesc_osabi): Likewise.
535
0abe8a89
YQ
5362017-09-05 Yao Qi <yao.qi@linaro.org>
537
538 * linux-x86-tdesc.c: Don't include <inttypes.h>.
539 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
540 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
541 .xmltarget.
542 * server.c (get_features_xml): Call tdesc_get_features_xml.
543 * tdesc.c (set_tdesc_architecture): New function.
544 (set_tdesc_osabi): New function.
545 (tdesc_get_features_xml): New function.
546 (tdesc_create_feature): Add an argument.
547 * tdesc.h (struct target_desc) <features>: New field.
548 <arch, osabi>: New field.
549 (~target_desc): xfree features, arch, and osabi.
550 (target_desc::oerator==): Don't compare .xmltarget.
551 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
552 (set_tdesc_osabi): Likewise.
553 (tdesc_get_features_xml): Likewise.
554
0a188386
YQ
5552017-09-05 Yao Qi <yao.qi@linaro.org>
556
557 * linux-x86-tdesc.c: Include selftest.h.
558 (i386_tdesc_test): New function.
559 (initialize_low_tdesc): Call selftests::register_test.
560 * tdesc.h: Include regdef.h.
561 (target_desc): Override operator == and !=.
562
f49ff000
YQ
5632017-09-05 Yao Qi <yao.qi@linaro.org>
564
565 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
566 (ipa_obj): Likewise.
567 * linux-i386-ipa.c: Include common/x86-xstate.h
568 (get_ipa_tdesc): Call i386_linux_read_description.
569 (initialize_low_tracepoint): Don't call init_registers_XXX
570 functions, call initialize_low_tdesc instead.
571 * linux-x86-low.c (x86_linux_read_description): Call
572 i386_linux_read_description.
573 (initialize_low_arch): Don't call init_registers_i386_XXX
574 functions, call initialize_low_tdesc.
575 * linux-x86-tdesc.c: New file.
576 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
577 (i386_get_ipa_tdesc_idx): Declare.
578 (i386_get_ipa_tdesc): Declare.
579 (initialize_low_tdesc): Declare.
580
2b68ef2f
YQ
5812017-09-05 Yao Qi <yao.qi@linaro.org>
582
583 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
584 instead of 0.
585
f7000548
YQ
5862017-09-05 Yao Qi <yao.qi@linaro.org>
587
588 * Makefile.in (IPA_OBJS): Add vec-ipa.o
589 * regcache.c (get_thread_regcache): Use VEC_length.
590 (init_register_cache): Likewise.
591 (regcache_cpy): Likewise.
592 (registers_to_string): Iterate reg_defs via VEC_iterate.
593 (find_regno): Likewise.
594 (find_register_by_number): Use VEC_index.
595 (register_size): Call find_register_by_number.
596 (register_data): Call find_register_by_number.
597 (supply_regblock): Use VEC_length.
598 (regcache_raw_read_unsigned): Likewise.
599 * tdesc.c (init_target_desc): Iterate reg_defs via
600 VEC_iterate.
601 (default_description): Update initializer.
602 (copy_target_description): Don't update field num_registers.
603 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
604 <num_registers>: Remove.
605
50a421ac
SM
6062017-09-04 Simon Marchi <simon.marchi@ericsson.com>
607
608 * Makefile.in (.SECONDARY): Define target.
609
23fdd69e
SM
6102017-09-03 Simon Marchi <simon.marchi@ericsson.com>
611
612 * linux-low.c (linux_wait_1): Adjust.
613 * server.c (queue_stop_reply_callback): Adjust.
614
0a2dde4a
SDJ
6152017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
616
617 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
618 QEnvironmentUnset and QEnvironmentReset packets.
619 (handle_query): Inform remote that QEnvironmentHexEncoded,
620 QEnvironmentUnset and QEnvironmentReset are supported.
621
6afd337d
SM
6222017-08-25 Simon Marchi <simon.marchi@ericsson.com>
623
624 * inferiors.h (inferior_target_data): Rename to ...
625 (thread_target_data): ... this.
626 (inferior_regcache_data): Rename to ...
627 (thread_regcache_data): ... this.
628 (set_inferior_regcache_data): Rename to ...
629 (set_thread_regcache_data): ... this.
630 * inferiors.c (inferior_target_data): Rename to ...
631 (thread_target_data): ... this.
632 (inferior_regcache_data): Rename to ...
633 (thread_regcache_data): ... this.
634 (set_inferior_regcache_data): Rename to ...
635 (set_thread_regcache_data): ... this.
636 (free_one_thread): Update.
637 * linux-low.h (get_thread_lwp): Update.
638 * regcache.c (get_thread_regcache): Update.
639 (regcache_invalidate_thread): Update.
640 (free_register_cache_thread): Update.
641 * win32-i386-low.c (update_debug_registers_callback): Update.
642 (win32_get_current_dr): Update.
643 * win32-low.c (thread_rec): Update.
644 (delete_thread_info): Update.
645 (continue_one_thread): Update.
646 (suspend_one_thread): Update.
647
a160cc46
SM
6482017-08-24 Simon Marchi <simon.marchi@ericsson.com>
649
650 * inferiors.c (set_inferior_target_data): Remove.
651 * inferiors.h (set_inferior_target_data): Remove.
652
6d580b63
YQ
6532017-08-18 Yao Qi <yao.qi@linaro.org>
654
655 * Makefile.in (OBS): Add selftest.o.
656 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
657 * configure, config.in: Re-generated.
658 * server.c: Include common/sefltest.h.
659 (captured_main): Handle option --selftest.
660
f5a29eb0
YQ
6612017-08-09 Yao Qi <yao.qi@linaro.org>
662
663 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
664 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
665 i386-avx-mpx.o and i386-mmx.o.
666 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
667 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
668 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
669 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
670 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
671 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
672 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
673 i386/amd64-avx-mpx.xml.
674
57757c2f
YQ
6752017-08-09 Yao Qi <yao.qi@linaro.org>
676
677 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
678 and x32-avx-avx512.o.
679 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
680 i386/x32-avx-avx512.xml.
681
229d26fc
SM
6822017-07-26 Simon Marchi <simon.marchi@ericsson.com>
683
684 * tracepoint.h (enum class fast_tpoint_collect_result): New
685 enumeration.
686 (fast_tracepoint_collecting): Change return type to
687 fast_tpoint_collect_result.
688 * tracepoint.c (fast_tracepoint_collecting): Likewise.
689 * linux-low.h: Include tracepoint.h.
690 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
691 fast_tpoint_collect_result.
692 * linux-low.c (handle_tracepoints): Adjust.
693 (linux_fast_tracepoint_collecting): Change return type to
694 fast_tpoint_collect_result.
695 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
696 linux_wait_1, stuck_in_jump_pad_callback,
697 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
698 proceed_one_lwp): Adjust to type change.
699
2e1e43e1
YQ
7002017-07-10 Yao Qi <yao.qi@linaro.org>
701
702 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
703
adc764e7
YQ
7042017-06-29 Yao Qi <yao.qi@linaro.org>
705
706 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
707 Remove.
708 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
709
a206891a
SM
7102017-06-20 Simon Marchi <simon.marchi@ericsson.com>
711
712 * Makefile.in (IPA_OBJS): Sort and format one item per line.
713
9a6c7d9c
SDJ
7142017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
715
716 * linux-low.c (linux_create_inferior): Adjust code to access the
717 environment information via 'gdb_environ' class.
718 * lynx-low.c (lynx_create_inferior): Likewise.
719 * server.c (our_environ): Make it an instance of 'gdb_environ'.
720 (get_environ): Return a pointer to 'our_environ'.
721 (captured_main): Initialize 'our_environ'.
722 * server.h (get_environ): Adjust prototype.
723 * spu-low.c (spu_create_inferior): Adjust code to access the
724 environment information via 'gdb_environ' class.
725
ae3e2ccf
SM
7262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
727
728 * linux-low.c (linux_read_memory, linux_write_memory): Remove
729 usage of "register" keyword.
730
3e019bdc
SM
7312017-06-17 Simon Marchi <simon.marchi@ericsson.com>
732
733 * configure: Re-generate.
734
8465943a
SM
7352017-06-17 Simon Marchi <simon.marchi@ericsson.com>
736
737 * configure: Re-generate.
738
cf0dd6f0
SM
7392017-06-17 Simon Marchi <simon.marchi@ericsson.com>
740
741 * Makefile.in (COMPILE.pre): Add "-x c++".
742
9845682b
SDJ
7432017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
744
745 * fork-child.c: Conditionally include <signal.h>.
746
aefd8b33
SDJ
7472017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
748
749 * server.c (handle_general_set): Handle new packet
750 "QStartupWithShell".
751 (handle_query): Add "QStartupWithShell" to the list of supported
752 packets.
753 (gdbserver_usage): Add help text explaining the
754 new "--startup-with-shell" and "--no-startup-with-shell" CLI
755 options.
756 (captured_main): Recognize and act upon the presence of the new
757 CLI options.
758
2090129c
SDJ
7592017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
760 Pedro Alves <palves@redhat.com>
761
762 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
763 * configure: Regenerate.
764 * configure.srv (srv_linux_obj): Add "fork-child.o" and
765 "fork-inferior.o".
766 (i[34567]86-*-lynxos*): Likewise.
767 (spu*-*-*): Likewise.
768 * fork-child.c: New file.
769 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
770 and "environ.h".
771 (linux_ptrace_fun): New function.
772 (linux_create_inferior): Adjust function prototype to reflect
773 change on "target.h". Adjust function code to use
774 "fork_inferior".
775 (linux_request_interrupt): Delete "signal_pid".
776 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
777 (lynx_ptrace_fun): New function.
778 (lynx_create_inferior): Adjust function prototype to reflect
779 change on "target.h". Adjust function code to use
780 "fork_inferior".
781 * nto-low.c (nto_create_inferior): Adjust function prototype and
782 code to reflect change on "target.h". Update comments.
783 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
784 "common-terminal.h" and "environ.h".
785 (terminal_fd): Moved to fork-child.c.
786 (old_foreground_pgrp): Likewise.
787 (restore_old_foreground_pgrp): Likewise.
788 (last_status): Make it global.
789 (last_ptid): Likewise.
790 (our_environ): New variable.
791 (startup_with_shell): Likewise.
792 (program_name): Likewise.
793 (program_argv): Rename to...
794 (program_args): ...this.
795 (wrapper_argv): New variable.
796 (start_inferior): Delete function.
797 (get_exec_wrapper): New function.
798 (get_exec_file): Likewise.
799 (get_environ): Likewise.
800 (prefork_hook): Likewise.
801 (post_fork_inferior): Likewise.
802 (postfork_hook): Likewise.
803 (postfork_child_hook): Likewise.
804 (handle_v_run): Update code to deal with arguments coming from the
805 remote host. Update calls from "start_inferior" to
806 "create_inferior".
807 (captured_main): Likewise. Initialize environment variable. Call
808 "have_job_control".
809 * server.h (post_fork_inferior): New prototype.
810 (get_environ): Likewise.
811 (last_status): Declare.
812 (last_ptid): Likewise.
813 (signal_pid): Likewise.
814 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
815 (spu_ptrace_fun): New function.
816 (spu_create_inferior): Adjust function prototype to reflect change
817 on "target.h". Adjust function code to use "fork_inferior".
818 * target.c (target_terminal_init): New function.
819 (target_terminal_inferior): Likewise.
820 (target_terminal_ours): Likewise.
821 * target.h: Include <vector>.
822 (struct target_ops) <create_inferior>: Update prototype.
823 (create_inferior): Update macro.
824 * utils.c (gdb_flush_out_err): New function.
825 * win32-low.c (win32_create_inferior): Adjust function prototype
826 and code to reflect change on "target.h".
827
043a4934
SDJ
8282017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
829
830 * inferiors.c (switch_to_thread): New function.
831
15652511
SDJ
8322017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
833
834 * Makefile.in (SFILE): Add "common/job-control.c".
835 (OBS): Add "job-control.o".
836
21ea5acd
SDJ
8372017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
838
839 * Makefile: Remove "@host_makefile_frag@".
840
e13cb306
PA
8412017-05-05 Pedro Alves <palves@redhat.com>
842
843 * configure: Regenerate.
844
c94fee56
SDJ
8452017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
846
847 * configure: Regenerate.
848
a0ff9e1a
SM
8492017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
850
851 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
852 software_single_step change of return type to
853 std::vector<CORE_ADDR>.
854 * linux-low.c (install_software_single_step_breakpoints):
855 Likewise.
856 * linux-low.h (install_software_single_step_breakpoints):
857 Likewise.
858
be628ab8
SDJ
8592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
860
861 * remote-utils.c: Include "gdb_termios.h" instead of
862 "terminal.h".
863 * terminal.h: Delete file.
864
7c5ded6a
SDJ
8652017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
866
867 * server.c: Include <vector>.
868 <program_argv, wrapper_argv>: Convert to std::vector.
869 (start_inferior): Rewrite function to use C++.
870 (handle_v_run): Likewise. Update code that calculates the argv
871 based on the vRun packet; use C++.
872 (captured_main): Likewise.
873
436252de
SM
8742017-04-06 Simon Marchi <simon.marchi@ericsson.com>
875
876 * server.c (handle_v_cont): Initialize thread_resume::thread
877 with null_ptid.
878
9bf2a700
PA
8792017-04-05 Pedro Alves <palves@redhat.com>
880
881 * configure: Regenerate.
882
a121b7c1
PA
8832017-04-05 Pedro Alves <palves@redhat.com>
884
885 * gdbreplay.c (sync_error): Constify.
886 * linux-x86-low.c (push_opcode): Constify.
887
21c8a587
PA
8882017-04-05 Pedro Alves <palves@redhat.com>
889
890 * win32-low.c (get_child_debug_event)
891 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
892 Report TARGET_WAITKIND_SPURIOUS instead.
893
fb32b4f7
PA
8942017-04-05 Pedro Alves <palves@redhat.com>
895
896 * remote-utils.c (remote_prepare, remote_open): Constify.
897 * remote-utils.h (remote_prepare, remote_open): Constify.
898 * server.c (captured_main): Constify 'port' handling.
899
65dd1e59
SM
9002017-04-04 Simon Marchi <simon.marchi@ericsson.com>
901
902 * Makefile.in (clean): Clear .deps.
903
8fa5b777
SM
9042017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
905
906 * .gitignore: Remove generated files, replace with wildcard.
907 * (clean): Replace removal of generated files with wildcard.
908 (version.c): Replace with...
909 (version-generated.c): ...this.
910 (xml-builtin.c): Replace with...
911 (xml-builtin-generated.c): ...this.
912 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
913 (%.c: *regformats*): Replace with...
914 (%-generated.c: *regformats*): ...this.
915
a12e714b
MF
9162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
917
918 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
919 (xtensa_fill_gregset): Call collect_register_by_name for
920 threadptr register.
921 (xtensa_store_gregset): Call supply_register_by_name for
922 threadptr register.
923
1a09b50a
MF
9242017-03-27 Max Filippov <jcmvbkbc@gmail.com>
925
926 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
927 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
928 (xtensa_store_gregset): Call supply_register for all registers in
929 a0_regnum..a0_regnum + C0_NREGS range.
930
1a01e7c6
SM
9312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
932
933 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
934 (ax-ipa.o: ax.c): Remove.
935 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
936 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
937 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
938 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
939 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
940
36bc18a8
SM
9412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
942
943 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
944 (print-utils-ipa.o: ../common/print-utils.c): Remove.
945 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
946 (errors-ipa.o: ../common/errors.c): Remove.
947 (format-ipa.o: ../common/format.c): Remove.
948 (common-utils-ipa.o: ../common/common-utils.c): Remove.
949
a8ebe3d5
SM
9502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
951
952 * Makefile.in (%-ipa.o: %.c): New rule.
953 (tracepoint-ipa.o: tracepoint.c): Remove.
954 (utils-ipa.o: utils.c): Remove.
955 (remote-utils-ipa.o: remote-utils.c): Remove.
956 (regcache-ipa.o: regcache.c): Remove.
957 (i386-linux-ipa.o: i386-linux.c): Remove.
958 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
959 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
960 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
961 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
962 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
963 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
964 (amd64-linux-ipa.o: amd64-linux.c): Remove.
965 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
966 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
967 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
968 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
969 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
970 (aarch64-ipa.o: aarch64.c): Remove.
971 (s390-linux32-ipa.o: s390-linux32.c): Remove.
972 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
973 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
974 (s390-linux64-ipa.o: s390-linux64.c): Remove.
975 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
976 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
977 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
978 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
979 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
980 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
981 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
982 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
983 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
984 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
985 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
986 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
987 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
988 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
989 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
990 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
991 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
992 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
993 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
994 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
995 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
996 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
997 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
998 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
999 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1000 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1001 (tdesc-ipa.o: tdesc.c): Remove.
1002 (x32-linux-ipa.o: x32-linux.c): Remove.
1003 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1004 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1005
50cfacb7
SM
10062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1007
1008 * Makefile.in (%.o: ../arch/%.c): New rule.
1009 (arm.o: ../arch/arm.c): Remove.
1010 (arm-linux.o: ../arch/arm-linux.c): Remove.
1011 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1012 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1013
c5a22423
SM
10142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1015
1016 * Makefile.in (%.o: ../nat/%.c): New rule.
1017 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1018 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1019 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1020 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1021 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1022 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1023 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1024 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1025 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1026 (linux-personality.o: ../nat/linux-personality.c): Remove.
1027 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1028 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1029 (x86-linux.o: ../nat/x86-linux.c): Remove.
1030 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1031 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1032
6bda016b
SM
10332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1034
1035 * Makefile.in (%.o: ../common/%.c): New rule.
1036 (signals.o: ../common/signals.c): Remove.
1037 (print-utils.o: ../common/print-utils.c): Remove.
1038 (rsp-low.o: ../common/rsp-low.c): Remove.
1039 (common-utils.o: ../common/common-utils.c): Remove.
1040 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1041 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1042 (vec.o: ../common/vec.c): Remove.
1043 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1044 (xml-utils.o: ../common/xml-utils.c): Remove.
1045 (ptid.o: ../common/ptid.c): Remove.
1046 (buffer.o: ../common/buffer.c): Remove.
1047 (format.o: ../common/format.c): Remove.
1048 (filestuff.o: ../common/filestuff.c): Remove.
1049 (agent.o: ../common/agent.c): Remove.
1050 (errors.o: ../common/errors.c): Remove.
1051 (environ.o: ../common/environ.c): Remove.
1052 (common-debug.o: ../common/common-debug.c): Remove.
1053 (cleanups.o: ../common/cleanups.c): Remove.
1054 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1055 (fileio.o: ../common/fileio.c): Remove.
1056 (common-regcache.o: ../common/common-regcache.c): Remove.
1057 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1058 (new-op.o: ../common/new-op.c): Remove.
1059 (btrace-common.o: ../common/btrace-common.c): Remove.
1060
21122961
SM
10612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1062
1063 * Makefile.in (%.o: ../target/%.c): New rule.
1064 (waitstatus.o: ../target/waitstatus.c): Remove.
1065
c362e621
SM
10662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1067
1068 * Makefile.in
1069 (%.c: ../regformats/%.dat,
1070 (%.c: ../regformats/arm/%.dat,
1071 (%.c: ../regformats/i386/%.dat,
1072 (%.c: ../regformats/rs6000/%.dat): New rules.
1073 (aarch64.c): Remove.
1074 (reg-arm.c): Remove.
1075 (arm-with-iwmmxt.c): Remove.
1076 (arm-with-vfpv2.c): Remove.
1077 (arm-with-vfpv3.c): Remove.
1078 (arm-with-neon.c): Remove.
1079 (reg-bfin.c): Remove.
1080 (reg-cris.c): Remove.
1081 (reg-crisv32.c): Remove.
1082 (i386.c): Remove.
1083 (i386-linux.c): Remove.
1084 (i386-avx.c): Remove.
1085 (i386-avx-linux.c): Remove.
1086 (i386-avx-avx512.c): Remove.
1087 (i386-avx-avx512-linux.c): Remove.
1088 (i386-mpx.c): Remove.
1089 (i386-mpx-linux.c): Remove.
1090 (i386-avx-mpx-avx512-pku.c): Remove.
1091 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1092 (i386-avx-mpx.c): Remove.
1093 (i386-avx-mpx-linux.c): Remove.
1094 (i386-mmx.c): Remove.
1095 (i386-mmx-linux.c): Remove.
1096 (reg-ia64.c): Remove.
1097 (reg-m32r.c): Remove.
1098 (reg-m68k.c): Remove.
1099 (reg-cf.c): Remove.
1100 (mips-linux.c): Remove.
1101 (mips-dsp-linux.c): Remove.
1102 (mips64-linux.c): Remove.
1103 (mips64-dsp-linux.c): Remove.
1104 (nios2-linux.c): Remove.
1105 (powerpc-32.c): Remove.
1106 (powerpc-32l.c): Remove.
1107 (powerpc-altivec32l.c): Remove.
1108 (powerpc-cell32l.c): Remove.
1109 (powerpc-vsx32l.c): Remove.
1110 (powerpc-isa205-32l.c): Remove.
1111 (powerpc-isa205-altivec32l.c): Remove.
1112 (powerpc-isa205-vsx32l.c): Remove.
1113 (powerpc-e500l.c): Remove.
1114 (powerpc-64l.c): Remove.
1115 (powerpc-altivec64l.c): Remove.
1116 (powerpc-cell64l.c): Remove.
1117 (powerpc-vsx64l.c): Remove.
1118 (powerpc-isa205-64l.c): Remove.
1119 (powerpc-isa205-altivec64l.c): Remove.
1120 (powerpc-isa205-vsx64l.c): Remove.
1121 (s390-linux32.c): Remove.
1122 (s390-linux32v1.c): Remove.
1123 (s390-linux32v2.c): Remove.
1124 (s390-linux64.c): Remove.
1125 (s390-linux64v1.c): Remove.
1126 (s390-linux64v2.c): Remove.
1127 (s390-te-linux64.c): Remove.
1128 (s390-vx-linux64.c): Remove.
1129 (s390-tevx-linux64.c): Remove.
1130 (s390x-linux64.c): Remove.
1131 (s390x-linux64v1.c): Remove.
1132 (s390x-linux64v2.c): Remove.
1133 (s390x-te-linux64.c): Remove.
1134 (s390x-vx-linux64.c): Remove.
1135 (s390x-tevx-linux64.c): Remove.
1136 (tic6x-c64xp-linux.c): Remove.
1137 (tic6x-c64x-linux.c): Remove.
1138 (tic6x-c62x-linux.c): Remove.
1139 (reg-sh.c): Remove.
1140 (reg-sparc64.c): Remove.
1141 (reg-spu.c): Remove.
1142 (amd64.c): Remove.
1143 (amd64-linux.c): Remove.
1144 (amd64-avx.c): Remove.
1145 (amd64-avx-linux.c): Remove.
1146 (amd64-avx-avx512.c): Remove.
1147 (amd64-avx-avx512-linux.c): Remove.
1148 (amd64-mpx.c): Remove.
1149 (amd64-mpx-linux.c): Remove.
1150 (amd64-avx-mpx-avx512-pku.c): Remove.
1151 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1152 (amd64-avx-mpx.c): Remove.
1153 (amd64-avx-mpx-linux.c): Remove.
1154 (x32.c): Remove.
1155 (x32-linux.c): Remove.
1156 (x32-avx.c): Remove.
1157 (x32-avx-linux.c): Remove.
1158 (x32-avx-avx512.c): Remove.
1159 (x32-avx-avx512-linux.c): Remove.
1160 (reg-xtensa.c): Remove.
1161 (reg-tilegx.c): Remove.
1162 (reg-tilegx32.c): Remove.
1163
1672e0d9
SDJ
11642017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1165
1166 * Makefile.in (SFILES): Add "common/environ.c".
1167 (OBJS): Add "common/environ.h".
1168
239b6d10
WT
11692017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1170
1171 * configure.ac: Check if the fs_base and gs_base members of
1172 `struct user_regs_struct' exist.
1173 * config.in: Regenerated.
1174 * configure: Likewise.
1175
694b382c
AT
11762017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1177
1178 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1179 target_read_memory.
1180 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1181 (get_next_pcs_syscall_next_pc): Likewise.
1182
7dc53023
LM
11832016-12-23 Luis Machado <lgustavo@codesourcery.com>
1184
1185 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1186 * nto-x86-low.c: Likewise.
1187
ad02e4fe
SM
11882016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1189
1190 * Makefile.in: Include disable-implicit-rules.mk.
1191
dcb07cfa
PA
11922016-11-23 Pedro Alves <palves@redhat.com>
1193
1194 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1195 (debug_vprintf): Use std::chrono::steady_clock instead of
1196 gettimeofday. Use '.' instead of ':'.
1197 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1198 (get_timestamp): Use std::chrono::steady_clock instead of
1199 gettimeofday.
1200
8629c02c
SM
12012016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1202
1203 * Makefile.in: Fix whitespace formatting.
1204
b593ecca
SM
12052016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1206
1207 * Makefile.in (SFILES, OBS): Flatten list and order
1208 alphabetically.
1209
9986ba08
PA
12102016-11-23 Pedro Alves <palves@redhat.com>
1211
1212 * event-loop.c (handle_file_event): Use warning.
1213 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1214 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1215 Use warning.
1216
4eefa7bc
PA
12172016-11-23 Pedro Alves <palves@redhat.com>
1218
1219 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1220 output.
1221 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1222 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1223 debug_printf and debug_flush for debug output.
1224 * server.c (handle_general_set): Likewise.
1225 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1226 output.
1227
5443506e
SM
12282016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1229
1230 * Makefile.in (.c.o): Replace rule with ...
1231 (%.o: %.c): ... this one.
1232
3b165252
SM
12332016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1234
1235 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1236 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1237 make.
1238 * configure.ac: Remove checks for the make program.
1239 * configure: Re-generate.
1240
0bcda685
PA
12412016-10-28 Pedro Alves <palves@redhat.com>
1242
1243 * Makefile.in (CXX_DIALECT): Get from configure.
1244 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1245 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1246 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1247 * config.in: Regenerate.
1248 * configure: Regenerate.
1249
c3805894
YQ
12502016-10-27 Yao Qi <yao.qi@linaro.org>
1251
1252 * linux-low.c (linux_supports_range_stepping): Return true if
1253 can_software_single_step return true.
1254
89342618
YQ
12552016-10-27 Yao Qi <yao.qi@linaro.org>
1256
1257 * inferiors.c (find_inferior_in_random): New function.
1258 * inferiors.h (find_inferior_in_random): Declare.
1259 * linux-low.c (linux_wait_for_event_filtered): Call
1260 find_inferior_in_random instead of find_inferior.
1261
e3652c84
YQ
12622016-10-27 Yao Qi <yao.qi@linaro.org>
1263
1264 * linux-low.c (linux_wait_1): If single-step breakpoints are
1265 inserted, remove them.
1266
5a04c4cf
PA
12672016-10-26 Pedro Alves <palves@redhat.com>
1268
1269 * linux-low.c (handle_extended_wait): Link parent/child fork
1270 threads.
1271 (linux_wait_1): Unlink them.
1272 (linux_set_resume_request): Ignore resume requests for
1273 already-resumed and unhandled fork child threads.
1274 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1275 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1276 New functions.
1277 (handle_v_requests) <vCont>: Don't call require_running.
1278 * server.h (in_queued_stop_replies): New declaration.
1279
cb93dc7f
YQ
12802016-10-24 Yao Qi <yao.qi@linaro.org>
1281
1282 PR server/20733
1283 * linux-aarch64-low.c (append_insns): Cast the return value to
1284 'uint32_t *'.
1285
a1078bea
YQ
12862016-10-10 Yao Qi <yao.qi@linaro.org>
1287
1288 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1289
1fb77080
SDJ
12902016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1291
1292 * target.c (target_supports_multi_process): New function, moved
1293 from...
1294 * target.h (target_supports_multi_process): ... here. Remove
1295 macro.
1296
39b5a3b9
TT
12972016-10-05 Tom Tromey <tom@tromey.com>
1298
1299 PR remote/20655:
1300 * tracepoint.c (handle_tracepoint_bkpts): Check
1301 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1302
c1d0b70a
YQ
13032016-10-05 Yao Qi <yao.qi@linaro.org>
1304
1305 * configure.srv: Update the path of arm-*.xml files.
1306
0a69eedb
YQ
13072016-10-05 Terry Guo <terry.guo@arm.com>
1308 Yao Qi <yao.qi@linaro.org>
1309
1310 * Makefile.in: Adjust the path of rules.
1311 * configure.srv: Update the path of xml files.
1312 * regformats/arm-with-iwmmxt.dat: Regenerated.
1313 * regformats/arm-with-neon.dat: Likewise.
1314 * regformats/arm-with-vfpv2.dat: Likewise.
1315 * regformats/arm-with-vfpv3.dat Likewise.
1316
17e16485
YQ
13172016-09-30 Yao Qi <yao.qi@linaro.org>
1318
1319 PR gdbserver/20627
1320 * target.c (target_stop_and_wait): Don't call
1321 target_continue_no_signal, use resume_stop instead.
1322
edeeb602
YQ
13232016-09-26 Yao Qi <yao.qi@linaro.org>
1324
1325 * linux-low.c (linux_wait_1): Call debug_exit.
1326
503b1c39
PA
13272016-09-23 Pedro Alves <palves@redhat.com>
1328
1329 * Makefile.in (SFILES): Add common/new-op.c.
1330 (OBS): Add common/new-op.o.
1331 (new-op.o): New rule.
1332
74172ecf
SM
13332016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1334
1335 * .gitinore: Ignore more files.
1336
fc6cda2e
YQ
13372016-09-21 Yao Qi <yao.qi@linaro.org>
1338
1339 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1340 23.
1341
bc1e6c81
SDJ
13422016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1343
1344 * server.c (start_inferior): Call target_mourn_inferior instead of
1345 mourn_inferior; pass ptid_t argument to it.
1346 (resume): Likewise.
1347 (handle_target_event): Likewise.
1348 * target.c (target_mourn_inferior): New function.
1349 * target.h (mourn_inferior): Delete macro.
1350
0e00e962
AA
13512016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1352
1353 * linux-low.c (lwp_is_stepping): New function.
1354
1d8cb77d
CL
13552016-09-06 Carl Love <cel@us.ibm.com>
1356
1357 * server.c (start_inferior): Fixed comment, requested comment change
1358 didn't get updated correctly. Removed reference to ptrace () call as
1359 it is only true on Linux systems.
1360
7313bced
CL
13612016-09-06 Carl Love <cel@us.ibm.com>
1362
1363 * server.c (start_inferior): Do not call
1364 function target_post_create_inferior () if the
1365 inferior process has already exited.
1366
cf6de44d
PA
13672016-09-05 Pedro Alves <palves@redhat.com>
1368
1369 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1370 (COMPILE.pre, CC_LD): Use CXX directly.
1371 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1372 * acinclude.m4: Don't include build-with-cxx.m4.
1373 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1374 * configure: Regenerate.
1375
c1da6748
AT
13762016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1377
1378 PR gdb/19495
1379 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1380 call writing data to own_buf.
1381
f2b9e3df
SDJ
13822016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1383
1384 * target.c (mywait): Call target_wait instead of
1385 the_target->wait.
1386 (target_wait): New function.
1387
049a8570
SDJ
13882016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1389
1390 * server.c (start_inferior): New variable 'ptid'. Replace calls
1391 to the_target->resume by target_continue{,_no_signal}, depending
1392 on the case.
1393 * target.c (target_stop_and_wait): Call target_continue_no_signal
1394 instead of the_target->resume.
1395 (target_continue): New function.
1396
3aa5cfa0
AT
13972016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1398
1399 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1400
754653a7
AZ
14012016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1402
1403 PR server/20491
1404 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1405 ps_prochandle.
1406 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1407 * linux-arm-low.c (ps_get_thread_area): Likewise.
1408 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1409 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1410 * linux-mips-low.c (ps_get_thread_area): Likewise.
1411 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1412 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1413 * linux-x86-low.c (ps_get_thread_area): Likewise.
1414 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1415
ed036b40
PA
14162016-08-19 Pedro Alves <palves@redhat.com>
1417
1418 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1419
c8ef42ee
PA
14202016-08-19 Pedro Alves <palves@redhat.com>
1421
1422 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1423 comment. Use memcpy instead of casting through unsigned long.
1424
9c235a72
PA
14252016-08-19 Pedro Alves <palves@redhat.com>
1426
1427 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1428 allocating around 0x80000000.
1429
201506da
PA
14302016-08-19 Pedro Alves <palves@redhat.com>
1431
1432 PR gdb/20415
1433 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1434 (x32-avx512-linux-ipa.o): New rules.
1435 * configure.ac (x86_64-*-linux*): New x32 check.
1436 * configure.srv (ipa_x32_linux_regobj): New.
1437 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1438 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1439 descriptions.
1440 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1441 descriptions.
1442 * configure: Regenerate.
1443
f348d89a
PA
14442016-08-09 Pedro Alves <palves@redhat.com>
1445
1446 PR gdb/18653
1447 * Makefile.in (OBS): Add signals-state-save-restore.o.
1448 (signals-state-save-restore.o): New rule.
1449 * config.in: Regenerate.
1450 * configure: Regenerate.
1451 * linux-low.c: Include "signals-state-save-restore.h".
1452 (linux_create_inferior): Call
1453 restore_original_signals_state.
1454 * server.c: Include "dispositions-save-restore.h".
1455 (captured_main): Call save_original_signals_state.
1456
1baf5149
PA
14572016-08-05 Pedro Alves <palves@redhat.com>
1458
1459 * configure: Regenerate.
1460
fcd4a73d
YQ
14612016-08-04 Yao Qi <yao.qi@linaro.org>
1462
1463 * linux-low.c (regsets_fetch_inferior_registers): Check
1464 errno is ESRCH or not.
1465
979659d0
YQ
14662016-08-02 Yao Qi <yao.qi@linaro.org>
1467
1468 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1469 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1470 (thread_db_load_search): Update.
1471 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1472 td_ta_set_event and td_ta_event_getmsg.
1473
6598661d
PA
14742016-07-26 Pedro Alves <palves@redhat.com>
1475
1476 PR server/20414
1477 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1478 of unsigned long for 64-bit registers and use uint32_t instead of
1479 unsigned int for 32-bit registers.
1480
9cf12d57
PA
14812016-07-26 Pedro Alves <palves@redhat.com>
1482
1483 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1484 to 'ptrace'.
1485
305450ed
TT
14862016-07-21 Tom Tromey <tom@tromey.com>
1487
1488 * configure: Rebuild.
1489
2583da7c
YQ
14902016-07-21 Yao Qi <yao.qi@linaro.org>
1491
1492 * mem-break.c (find_gdb_breakpoint): Cast bp to
1493 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1494
21536b36
YQ
14952016-07-21 Yao Qi <yao.qi@linaro.org>
1496
1497 * server.c (handle_v_requests): Support s and S actions
1498 if target_supports_software_single_step return true.
1499
8901d193
YQ
15002016-07-21 Yao Qi <yao.qi@linaro.org>
1501
1502 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1503 is resume_step, call maybe_hw_step.
1504 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1505 and unstop them.
1506 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1507 breakpoints or not.
1508 (proceed_one_lwp): If resume request is resume_step, install
1509 reinsert breakpoints and call maybe_hw_step.
1510
0e9a339e
YQ
15112016-07-21 Yao Qi <yao.qi@linaro.org>
1512
1513 * linux-low.c (proceed_one_lwp): Declare.
1514 (linux_resume_one_thread): Remove local variable 'step'.
1515 Lift code enqueue signal. Call proceed_one_lwp instead of
1516 linux_resume_one_lwp.
1517
4281b351
YQ
15182016-07-21 Yao Qi <yao.qi@linaro.org>
1519
1520 * linux-low.c (linux_resume_one_thread): Call
1521 enqueue_pending_signal.
1522
984a2c04
YQ
15232016-07-21 Yao Qi <yao.qi@linaro.org>
1524
1525 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1526 * inferiors.c (do_restore_current_thread_cleanup): New function.
1527 (make_cleanup_restore_current_thread): Likewise.
1528 * linux-low.c (install_software_single_step_breakpoints): Call
1529 make_cleanup_restore_current_thread. Switch current_thread to
1530 thread.
1531
bec903c9
YQ
15322016-07-21 Yao Qi <yao.qi@linaro.org>
1533
1534 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1535 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1536 (clone_one_breakpoint): Likewise.
1537 (delete_reinsert_breakpoints): Change parameter to thread.
1538 Callers updated.
1539 (has_reinsert_breakpoints): Likewise.
1540 (uninsert_reinsert_breakpoints): Likewise.
1541 (reinsert_reinsert_breakpoints): Likewise.
1542 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1543 (delete_reinsert_breakpoints): Likewise.
1544 (reinsert_reinsert_breakpoints): Likewise.
1545 (uninsert_reinsert_breakpoints): Likewise.
1546 (has_reinsert_breakpoints): Likewise.
1547
63c40ec7
YQ
15482016-07-21 Yao Qi <yao.qi@linaro.org>
1549
1550 * inferiors.c (get_thread_process): Make parameter const.
1551 * inferiors.h (get_thread_process): Update declaration.
1552 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1553 Add new parameters child_thread and parent_thread. Callers
1554 updated.
1555 * mem-break.h (clone_all_breakpoints): Update declaration.
1556
9aa76cd0
YQ
15572016-07-21 Yao Qi <yao.qi@linaro.org>
1558
1559 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1560 <command_list, handler>: Remove.
1561 (struct gdb_breakpoint): New.
1562 (struct other_breakpoint): New.
1563 (struct reinsert_breakpoint): New.
1564 (is_gdb_breakpoint): New function.
1565 (any_persistent_commands): Update command_list if
1566 is_gdb_breakpoint returns true.
1567 (set_breakpoint): Create breakpoints according to their types.
1568 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1569 (set_gdb_breakpoint_1): Likewise.
1570 (set_gdb_breakpoint): Likewise.
1571 (clear_breakpoint_conditions): Change parameter type to
1572 'struct gdb_breakpoint *'.
1573 (clear_breakpoint_commands): Likewise.
1574 (clear_breakpoint_conditions_and_commands): Likewise.
1575 (add_condition_to_breakpoint): Likewise.
1576 (add_breakpoint_condition): Likewise.
1577 (add_commands_to_breakpoint): Likewise.
1578 (check_breakpoints): Check other_breakpoint.
1579 (clone_one_breakpoint): Clone breakpopint according to its type.
1580 * mem-break.h (struct gdb_breakpoint): Declare.
1581 (set_gdb_breakpoint): Update declaration.
1582 (clear_breakpoint_conditions_and_commands): Likewise.
1583 (add_breakpoint_condition): Likewise.
1584 (add_breakpoint_commands): Likewise.
1585 * server.c (process_point_options): Change parameter type to
1586 'struct gdb_breakpoint *'.
1587
811f8301
YQ
15882016-07-21 Yao Qi <yao.qi@linaro.org>
1589
1590 * mem-break.c (set_breakpoint_at): Rename it to ...
1591 (set_breakpoint_type_at): ... it.
1592 (set_breakpoint_at): Call set_breakpoint_type_at.
1593 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1594 * mem-break.h (set_breakpoint_at): Update comments.
1595
b1c51e36
CLT
15962016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1597
1598 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1599 to buf parameter.
1600 (nios2_store_gregset): Likewise.
1601
ced2dffb
PA
16022016-07-01 Pedro Alves <palves@redhat.com>
1603 Antoine Tremblay <antoine.tremblay@ericsson.com>
1604
1605 * linux-low.c: Change interface to take the target lwp_info
1606 pointer directly and return void. Handle detaching from a zombie
1607 thread.
1608 (linux_detach_lwp_callback): New function.
1609 (linux_detach): Detach from the leader thread after detaching from
1610 the clone threads.
1611
2ac09a5b
YQ
16122016-06-28 Yao Qi <yao.qi@linaro.org>
1613
1614 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1615 for variable new_offset.
1616 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1617 (aarch64_ftrace_insn_reloc_cb): Likewise.
1618 (aarch64_ftrace_insn_reloc_tb): Likewise.
1619 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1620 PRIx64 instead of PRIx32.
1621
79e7fd4f
YQ
16222016-06-28 Yao Qi <yao.qi@linaro.org>
1623
1624 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1625 (the_low_target): Install arm_get_syscall_trapinfo.
1626
061fc021
YQ
16272016-06-28 Yao Qi <yao.qi@linaro.org>
1628
1629 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1630 function.
1631 (the_low_target): Install aarch64_get_syscall_trapinfo.
1632
4cc32bec
YQ
16332016-06-28 Yao Qi <yao.qi@linaro.org>
1634
1635 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1636 Callers updated.
1637 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1638 Remove parameter sysno.
1639 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1640 sysret.
1641
782c1122
AA
16422016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1643
1644 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1645 (s390_emit_ne_goto): Likewise.
1646 (s390_emit_lt_goto): Likewise.
1647 (s390_emit_le_goto): Likewise.
1648 (s390_emit_gt_goto): Likewise.
1649 (s390_emit_ge_goto): Likewise.
1650 (s390x_emit_eq_goto): Likewise.
1651 (s390x_emit_ne_goto): Likewise.
1652 (s390x_emit_lt_goto): Likewise.
1653 (s390x_emit_le_goto): Likewise.
1654 (s390x_emit_gt_goto): Likewise.
1655 (s390x_emit_ge_goto): Likewise.
1656 (s390_emit_ops_impl): Mark variable static.
1657 (s390x_emit_ops): Likewise.
1658
2e7b624b
YQ
16592016-06-17 Yao Qi <yao.qi@linaro.org>
1660
1661 * linux-low.c (handle_extended_wait): Call
1662 uninsert_reinsert_breakpoints for the parent process. Remove
1663 reinsert breakpoints from the child process. Reinsert them to
1664 the parent process when vfork is done.
1665 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1666 (reinsert_reinsert_breakpoints): New function.
1667 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1668 (reinsert_reinsert_breakpoints): Declare.
1669
8a81c5d7
YQ
16702016-06-17 Yao Qi <yao.qi@linaro.org>
1671
1672 * linux-low.c (handle_extended_wait): If the parent is doing
1673 step-over, remove the reinsert breakpoints from the forked child.
1674
f50bf8e5
YQ
16752016-06-17 Yao Qi <yao.qi@linaro.org>
1676
1677 * linux-low.c (unsuspend_all_lwps): Declare.
1678 (linux_low_filter_event): If thread exited, call finish_step_over.
1679 If step-over is finished, unsuspend other threads.
1680
8376a3cb
YQ
16812016-06-17 Yao Qi <yao.qi@linaro.org>
1682
1683 * linux-low.c (linux_resume_one_lwp_throw): Assert
1684 has_reinsert_breakpoints returns false.
1685 * mem-break.c (delete_disabled_breakpoints): Assert
1686 bp type isn't reinsert_breakpoint.
1687
f79b145d
YQ
16882016-06-17 Yao Qi <yao.qi@linaro.org>
1689
1690 * linux-low.c (maybe_hw_step): New function.
1691 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1692 (finish_step_over): Switch current_thread to lwp temporarily,
1693 and assert has_reinsert_breakpoints returns true.
1694 (proceed_one_lwp): Call maybe_hw_step.
1695 * mem-break.c (has_reinsert_breakpoints): New function.
1696 * mem-break.h (has_reinsert_breakpoints): Declare.
1697
0ae534d2
JT
16982016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1699
1700 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1701
fcdad592
YQ
17022016-05-17 Yao Qi <yao.qi@linaro.org>
1703
1704 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1705 instead of find_inferior.
1706
9e784964
YQ
17072016-05-05 Yao Qi <yao.qi@linaro.org>
1708
1709 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1710 Initialize res to zero.
1711
cf2ebb6e
YQ
17122016-05-05 Yao Qi <yao.qi@linaro.org>
1713
1714 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1715 to uint32_t.
1716
c1aebf87
UW
17172016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1718
1719 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1720 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1721 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1722
35fd2deb 17232016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1724 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1725
1726 * tracepoint.c (write_inferior_int8): New function.
1727 (cmd_qtenable_disable): Write enable flag using
1728 write_inferior_int8.
1729
484b3c32
YQ
17302016-04-25 Yao Qi <yao.qi@linaro.org>
1731
1732 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1733 (need_step_over_p): Return zero if the LWP has pending signals
1734 can be delivered on software single step target.
1735
85ba7d86
YQ
17362016-04-25 Yao Qi <yao.qi@linaro.org>
1737
1738 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1739 return instead of error.
1740
3539aa13
YQ
17412016-04-22 Yao Qi <yao.qi@linaro.org>
1742
1743 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1744 to 23.
1745
5b061e98
YQ
17462016-04-22 Yao Qi <yao.qi@linaro.org>
1747
1748 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1749 signal when stepping over breakpoint with software single
1750 step.
1751
3451269c
PA
17522016-04-21 Pedro Alves <palves@redhat.com>
1753
1754 * linux-s390-low.c (s390_collect_ptrace_register)
1755 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1756 add casts.
1757 (s390_check_regset): Use void * instead of gdb_byte *.
1758
a2358508
PA
17592016-04-20 Pedro Alves <palves@redhat.com>
1760
1761 * configure: Renegerate.
1762
6885166d
YQ
17632016-04-20 Yao Qi <yao.qi@linaro.org>
1764
1765 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1766 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1767 number 16.
1768 (arm_store_gregset): Likewise.
1769
2b863f51
WT
17702016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1771
1772 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1773 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1774 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1775 (amd64-avx-mpx-linux.c): New rules.
1776 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1777 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1778 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1779 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1780 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1781 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1782 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1783 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1784 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1785 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1786 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1787 * linux-x86-low.c (x86_linux_read_description): Add case for
1788 X86_XSTATE_AVX_MPX_MASK.
1789 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1790 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1791 init_registers_i386_avx_mpx_linux.
1792 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1793 (initialize_low_tracepoint): Call
1794 init_registers_i386_avx_mpx_linux.
1795 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1796 (initialize_low_tracepoint): Call
1797 init_registers_amd64_avx_mpx_linux.
1798 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1799 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1800 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1801 declarations.
1802
9b30624b
PA
18032016-04-18 Pedro Alves <palves@redhat.com>
1804
1805 * configure: Regenerate.
1806
45e3745e
AT
18072016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1808
1809 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1810 (aarch64_emit_sub): Likewise.
1811
2afc13ff
PA
18122016-04-12 Pedro Alves <palves@redhat.com>
1813
1814 * utils.c (prepare_to_throw_exception): Delete.
1815
6e774b13
SM
18162016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1817
1818 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1819
4dca19f8
MK
18202016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1821
1822 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1823
d0a9981f
MK
18242016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1825
1826 * linux-aarch64-ipa.c: Add <elf.h> include.
1827 * linux-ppc-ipa.c: Add <elf.h> include.
1828 * linux-s390-ipa.c: Add <elf.h> include.
1829
252db07e
MK
18302016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1831
1832 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1833 (get_raw_reg_ptr): Likewise.
1834 (get_trace_state_variable_value_ptr): Likewise.
1835 (set_trace_state_variable_value_ptr): Likewise.
1836 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1837 char *.
1838
14e2b6d9
MK
18392016-03-31 Wei-cheng Wang <cole945@gmail.com>
1840 Marcin Kościelnicki <koriakin@0x04.net>
1841
1842 PR/17221
1843 * linux-ppc-low.c (emit_insns): New function.
1844 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1845 (ppc_emit_prologue): New function.
1846 (ppc_emit_epilogue): New function.
1847 (ppc_emit_add): New function.
1848 (ppc_emit_sub): New function.
1849 (ppc_emit_mul): New function.
1850 (ppc_emit_lsh): New function.
1851 (ppc_emit_rsh_signed): New function.
1852 (ppc_emit_rsh_unsigned): New function.
1853 (ppc_emit_ext): New function.
1854 (ppc_emit_zero_ext): New function.
1855 (ppc_emit_log_not): New function.
1856 (ppc_emit_bit_and): New function.
1857 (ppc_emit_bit_or): New function.
1858 (ppc_emit_bit_xor): New function.
1859 (ppc_emit_bit_not): New function.
1860 (ppc_emit_equal): New function.
1861 (ppc_emit_less_signed): New function.
1862 (ppc_emit_less_unsigned): New function.
1863 (ppc_emit_ref): New function.
1864 (ppc_emit_const): New function.
1865 (ppc_emit_reg): New function.
1866 (ppc_emit_pop): New function.
1867 (ppc_emit_stack_flush): New function.
1868 (ppc_emit_swap): New function.
1869 (ppc_emit_stack_adjust): New function.
1870 (ppc_emit_call): New function.
1871 (ppc_emit_int_call_1): New function.
1872 (ppc_emit_void_call_2): New function.
1873 (ppc_emit_if_goto): New function.
1874 (ppc_emit_goto): New function.
1875 (ppc_emit_eq_goto): New function.
1876 (ppc_emit_ne_goto): New function.
1877 (ppc_emit_lt_goto): New function.
1878 (ppc_emit_le_goto): New function.
1879 (ppc_emit_gt_goto): New function.
1880 (ppc_emit_ge_goto): New function.
1881 (ppc_write_goto_address): New function.
1882 (ppc_emit_ops_impl): New static variable.
1883 (ppc64v1_emit_prologue): New function.
1884 (ppc64v2_emit_prologue): New function.
1885 (ppc64_emit_epilogue): New function.
1886 (ppc64_emit_add): New function.
1887 (ppc64_emit_sub): New function.
1888 (ppc64_emit_mul): New function.
1889 (ppc64_emit_lsh): New function.
1890 (ppc64_emit_rsh_signed): New function.
1891 (ppc64_emit_rsh_unsigned): New function.
1892 (ppc64_emit_ext): New function.
1893 (ppc64_emit_zero_ext): New function.
1894 (ppc64_emit_log_not): New function.
1895 (ppc64_emit_bit_and): New function.
1896 (ppc64_emit_bit_or): New function.
1897 (ppc64_emit_bit_xor): New function.
1898 (ppc64_emit_bit_not): New function.
1899 (ppc64_emit_equal): New function.
1900 (ppc64_emit_less_signed): New function.
1901 (ppc64_emit_less_unsigned): New function.
1902 (ppc64_emit_ref): New function.
1903 (ppc64_emit_const): New function.
1904 (ppc64v1_emit_reg): New function.
1905 (ppc64v2_emit_reg): New function.
1906 (ppc64_emit_pop): New function.
1907 (ppc64_emit_stack_flush): New function.
1908 (ppc64_emit_swap): New function.
1909 (ppc64v1_emit_call): New function.
1910 (ppc64v2_emit_call): New function.
1911 (ppc64v1_emit_int_call_1): New function.
1912 (ppc64v2_emit_int_call_1): New function.
1913 (ppc64v1_emit_void_call_2): New function.
1914 (ppc64v2_emit_void_call_2): New function.
1915 (ppc64_emit_if_goto): New function.
1916 (ppc64_emit_eq_goto): New function.
1917 (ppc64_emit_ne_goto): New function.
1918 (ppc64_emit_lt_goto): New function.
1919 (ppc64_emit_le_goto): New function.
1920 (ppc64_emit_gt_goto): New function.
1921 (ppc64_emit_ge_goto): New function.
1922 (ppc64v1_emit_ops_impl): New static variable.
1923 (ppc64v2_emit_ops_impl): New static variable.
1924 (ppc_emit_ops): New function.
1925 (linux_low_target): Wire in ppc_emit_ops.
1926
a2174ba4
MK
19272016-03-31 Wei-cheng Wang <cole945@gmail.com>
1928 Marcin Kościelnicki <koriakin@0x04.net>
1929
1930 PR/17221
1931 * Makefile.in: Add powerpc-*-ipa.o
1932 * configure.srv: Add ipa_obj for powerpc*-linux.
1933 * linux-ppc-ipa.c: New file.
1934 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1935 includes.
1936 (PPC_FIELD): New macro.
1937 (PPC_SEXT): New macro.
1938 (PPC_OP6): New macro.
1939 (PPC_BO): New macro.
1940 (PPC_LI): New macro.
1941 (PPC_BD): New macro.
1942 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1943 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1944 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1945 (ppc_get_thread_area): New function.
1946 (is_elfv2_inferior): New function.
1947 (gen_ds_form): New function.
1948 (GEN_STD): New macro.
1949 (GEN_STDU): New macro.
1950 (GEN_LD): New macro.
1951 (GEN_LDU): New macro.
1952 (gen_d_form): New function.
1953 (GEN_ADDI): New macro.
1954 (GEN_ADDIS): New macro.
1955 (GEN_LI): New macro.
1956 (GEN_LIS): New macro.
1957 (GEN_ORI): New macro.
1958 (GEN_ORIS): New macro.
1959 (GEN_LWZ): New macro.
1960 (GEN_STW): New macro.
1961 (GEN_STWU): New macro.
1962 (gen_xfx_form): New function.
1963 (GEN_MFSPR): New macro.
1964 (GEN_MTSPR): New macro.
1965 (GEN_MFCR): New macro.
1966 (GEN_MTCR): New macro.
1967 (GEN_SYNC): New macro.
1968 (GEN_LWSYNC): New macro.
1969 (gen_x_form): New function.
1970 (GEN_OR): New macro.
1971 (GEN_MR): New macro.
1972 (GEN_LWARX): New macro.
1973 (GEN_STWCX): New macro.
1974 (GEN_CMPW): New macro.
1975 (gen_md_form): New function.
1976 (GEN_RLDICL): New macro.
1977 (GEN_RLDICR): New macro.
1978 (gen_i_form): New function.
1979 (GEN_B): New macro.
1980 (GEN_BL): New macro.
1981 (gen_b_form): New function.
1982 (GEN_BNE): New macro.
1983 (GEN_LOAD): New macro.
1984 (GEN_STORE): New macro.
1985 (gen_limm): New function.
1986 (gen_atomic_xchg): New function.
1987 (gen_call): New function.
1988 (ppc_relocate_instruction): New function.
1989 (ppc_install_fast_tracepoint_jump_pad): New function.
1990 (ppc_get_min_fast_tracepoint_insn_len): New function.
1991 (ppc_get_ipa_tdesc_idx): New function.
1992 (the_low_target): Wire in the new functions.
1993 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1994 tdescs.
1995 * linux-ppc-tdesc.h: New file.
1996
a13c4696
MK
19972016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1998
1999 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2000 (alloc_jump_pad_buffer): New function.
2001 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2002 (alloc_jump_pad_buffer): New function.
2003 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2004 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2005 (alloc_jump_pad_buffer): New function.
2006 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2007 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2008 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2009 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2010
1cda1512
MK
20112016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2012
2013 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2014 * linux-amd64-ipa.c: Likewise.
2015 * linux-i386-ipa.c: Likewise.
2016 * linux-s390-ipa.c: Likewise.
2017 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2018 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2019 set_trace_state_variable_value_ptr.
2020 (struct ipa_sym_addresses): Likewise.
2021 (symbol_list): Likewise.
2022 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2023 accessing gdb_collect directly.
2024 (gdb_collect_ptr_type): New typedef.
2025 (get_raw_reg_ptr_type): New typedef.
2026 (get_trace_state_variable_value_ptr_type): New typedef.
2027 (set_trace_state_variable_value_ptr_type): New typedef.
2028 (gdb_collect_ptr): New global.
2029 (get_raw_reg_ptr): New global.
2030 (get_trace_state_variable_value_ptr): New global.
2031 (set_trace_state_variable_value_ptr): New global.
2032 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2033 accessing get_raw_reg directly.
2034 (get_get_tsv_func_addr): Likewise for
2035 get_trace_state_variable_value_ptr.
2036 (get_set_tsv_func_addr): Likewise for
2037 set_trace_state_variable_value_ptr.
2038 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2039
72fb5488
SM
20402016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2041
2042 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2043
28170b88
MK
20442016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2045
2046 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2047 packets.
2048 (relocate_instruction): Remove own_buf.
2049 * server.c (own_buf): Make global.
2050 (handle_v_requests): Make global.
2051 * server.h (own_buf): New declaration.
2052 (handle_v_requests): New prototype.
2053
f39e8743
MK
20542016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2055
2056 PR 18377
2057 * linux-s390-low.c (add_insns): New function.
2058 (s390_emit_prologue): New function.
2059 (s390_emit_epilogue): New function.
2060 (s390_emit_add): New function.
2061 (s390_emit_sub): New function.
2062 (s390_emit_mul): New function.
2063 (s390_emit_lsh): New function.
2064 (s390_emit_rsh_signed): New function.
2065 (s390_emit_rsh_unsigned): New function.
2066 (s390_emit_ext): New function.
2067 (s390_emit_log_not): New function.
2068 (s390_emit_bit_and): New function.
2069 (s390_emit_bit_or): New function.
2070 (s390_emit_bit_xor): New function.
2071 (s390_emit_bit_not): New function.
2072 (s390_emit_equal): New function.
2073 (s390_emit_less_signed): New function.
2074 (s390_emit_less_unsigned): New function.
2075 (s390_emit_ref): New function.
2076 (s390_emit_if_goto): New function.
2077 (s390_emit_goto): New function.
2078 (s390_write_goto_address): New function.
2079 (s390_emit_litpool): New function.
2080 (s390_emit_const): New function.
2081 (s390_emit_call): New function.
2082 (s390_emit_reg): New function.
2083 (s390_emit_pop): New function.
2084 (s390_emit_stack_flush): New function.
2085 (s390_emit_zero_ext): New function.
2086 (s390_emit_swap): New function.
2087 (s390_emit_stack_adjust): New function.
2088 (s390_emit_set_r2): New function.
2089 (s390_emit_int_call_1): New function.
2090 (s390_emit_void_call_2): New function.
2091 (s390_emit_eq_goto): New function.
2092 (s390_emit_ne_goto): New function.
2093 (s390_emit_lt_goto): New function.
2094 (s390_emit_le_goto): New function.
2095 (s390_emit_gt_goto): New function.
2096 (s390_emit_ge_goto): New function.
2097 (s390x_emit_prologue): New function.
2098 (s390x_emit_epilogue): New function.
2099 (s390x_emit_add): New function.
2100 (s390x_emit_sub): New function.
2101 (s390x_emit_mul): New function.
2102 (s390x_emit_lsh): New function.
2103 (s390x_emit_rsh_signed): New function.
2104 (s390x_emit_rsh_unsigned): New function.
2105 (s390x_emit_ext): New function.
2106 (s390x_emit_log_not): New function.
2107 (s390x_emit_bit_and): New function.
2108 (s390x_emit_bit_or): New function.
2109 (s390x_emit_bit_xor): New function.
2110 (s390x_emit_bit_not): New function.
2111 (s390x_emit_equal): New function.
2112 (s390x_emit_less_signed): New function.
2113 (s390x_emit_less_unsigned): New function.
2114 (s390x_emit_ref): New function.
2115 (s390x_emit_if_goto): New function.
2116 (s390x_emit_const): New function.
2117 (s390x_emit_call): New function.
2118 (s390x_emit_reg): New function.
2119 (s390x_emit_pop): New function.
2120 (s390x_emit_stack_flush): New function.
2121 (s390x_emit_zero_ext): New function.
2122 (s390x_emit_swap): New function.
2123 (s390x_emit_stack_adjust): New function.
2124 (s390x_emit_int_call_1): New function.
2125 (s390x_emit_void_call_2): New function.
2126 (s390x_emit_eq_goto): New function.
2127 (s390x_emit_ne_goto): New function.
2128 (s390x_emit_lt_goto): New function.
2129 (s390x_emit_le_goto): New function.
2130 (s390x_emit_gt_goto): New function.
2131 (s390x_emit_ge_goto): New function.
2132 (s390_emit_ops): New function.
2133 (struct linux_target_ops): Fill in emit_ops hook.
2134
abd9baf9
MK
21352016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2136
2137 PR 18377
2138 * Makefile.in: Add s390 IPA files.
2139 * configure.srv: Build IPA for s390.
2140 * linux-s390-ipa.c: New file.
2141 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2142 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2143 (tdesc_s390_linux32): Likewise.
2144 (init_registers_s390_linux32v1): Likewise.
2145 (tdesc_s390_linux32v1): Likewise.
2146 (init_registers_s390_linux32v2): Likewise.
2147 (tdesc_s390_linux32v2): Likewise.
2148 (init_registers_s390_linux64): Likewise.
2149 (tdesc_s390_linux64): Likewise.
2150 (init_registers_s390_linux64v1): Likewise.
2151 (tdesc_s390_linux64v1): Likewise.
2152 (init_registers_s390_linux64v2): Likewise.
2153 (tdesc_s390_linux64v2): Likewise.
2154 (init_registers_s390_te_linux64): Likewise.
2155 (tdesc_s390_te_linux64): Likewise.
2156 (init_registers_s390_vx_linux64): Likewise.
2157 (tdesc_s390_vx_linux64): Likewise.
2158 (init_registers_s390_tevx_linux64): Likewise.
2159 (tdesc_s390_tevx_linux64): Likewise.
2160 (init_registers_s390x_linux64): Likewise.
2161 (tdesc_s390x_linux64): Likewise.
2162 (init_registers_s390x_linux64v1): Likewise.
2163 (tdesc_s390x_linux64v1): Likewise.
2164 (init_registers_s390x_linux64v2): Likewise.
2165 (tdesc_s390x_linux64v2): Likewise.
2166 (init_registers_s390x_te_linux64): Likewise.
2167 (tdesc_s390x_te_linux64): Likewise.
2168 (init_registers_s390x_vx_linux64): Likewise.
2169 (tdesc_s390x_vx_linux64): Likewise.
2170 (init_registers_s390x_tevx_linux64): Likewise.
2171 (tdesc_s390x_tevx_linux64): Likewise.
2172 (have_hwcap_s390_vx): New static variable.
2173 (s390_arch_setup): Fill have_hwcap_s390_vx.
2174 (s390_get_thread_area): New function.
2175 (s390_ft_entry_gpr_esa): New const.
2176 (s390_ft_entry_gpr_zarch): New const.
2177 (s390_ft_entry_misc): New const.
2178 (s390_ft_entry_fr): New const.
2179 (s390_ft_entry_vr): New const.
2180 (s390_ft_main_31): New const.
2181 (s390_ft_main_64): New const.
2182 (s390_ft_exit_fr): New const.
2183 (s390_ft_exit_vr): New const.
2184 (s390_ft_exit_misc): New const.
2185 (s390_ft_exit_gpr_esa): New const.
2186 (s390_ft_exit_gpr_zarch): New const.
2187 (append_insns): New function.
2188 (s390_relocate_instruction): New function.
2189 (s390_install_fast_tracepoint_jump_pad): New function.
2190 (s390_get_min_fast_tracepoint_insn_len): New function.
2191 (s390_get_ipa_tdesc_idx): New function.
2192 (struct linux_target_ops): Wire in the above functions.
2193 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2194 * linux-s390-tdesc.h: New file.
2195
a4105d04
MK
21962016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2197
2198 * linux-s390-low.c (s390_supports_tracepoints): New function.
2199 (struct linux_target_ops): Fill supports_tracepoints hook.
2200
35ac8b3e
YQ
22012016-03-18 Yao Qi <yao.qi@linaro.org>
2202
2203 * linux-low.c (lwp_signal_can_be_delivered): New function.
2204 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2205
94610ec4
YQ
22062016-03-18 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2209 0 if signal is enqueued. Remove 'signal' from one debugging
2210 message. Move one debugging message to some lines below.
2211 Remove code setting 'signal' to 0.
2212
80aea927
YQ
22132016-03-18 Yao Qi <yao.qi@linaro.org>
2214
2215 * linux-low.c (linux_low_filter_event): Remove redundant
2216 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2217
b04fd3be
MK
22182016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2219
2220 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2221 (struct linux_target_ops): Wire in the above.
2222
c40c8d4b
YQ
22232016-03-03 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-low.c: Update comments to start_step_over.
2226
0f8288ae
YQ
22272016-03-03 Yao Qi <yao.qi@linaro.org>
2228
2229 PR server/19736
2230 * linux-low.c (handle_extended_wait): Set child suspended
2231 if event_lwp->bp_reinsert isn't zero.
2232
fdbd04a8
YQ
22332016-03-02 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2236 enqueue_pending_signal.
2237
6896a8fa
MK
22382016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2239
2240 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2241 is actually loaded.
2242
ab503087
MK
22432016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2244
2245 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2246 (s390_regmap_3264) [!__s390x__]: New global.
2247 (s390_collect_ptrace_register): Skip map entries containing -1.
2248 (s390_supply_ptrace_register): Ditto.
2249 (s390_fill_gprs_high): New function.
2250 (s390_store_gprs_high): New function.
2251 (s390_regsets): Add NT_S390_HIGH_GPRS.
2252 (s390_get_hwcap): Enable on 31-bit.
2253 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2254 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2255 Detect NT_S390_HIGH_GPRS.
2256 (s390_usrregs_info_3264): Enable on 31-bit.
2257 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2258 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2259
ae91f625
MK
22602016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2261
2262 PR gdb/13808
2263 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2264 * configure.srv: Ditto.
2265 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2266 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2267 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2268 (init_registers_amd64_linux): Remove prototype.
2269 (tdesc_amd64_linux): Remove declaration.
2270 (get_ipa_tdesc): New function.
2271 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2272 initialize remaining tdescs.
2273 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2274 (init_registers_i386_linux): Remove prototype.
2275 (tdesc_i386_linux): Remove declaration.
2276 (get_ipa_tdesc): New function.
2277 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2278 initialize remaining tdescs.
2279 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2280 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2281 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2282 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2283 (x86_get_ipa_tdesc_idx): New function.
2284 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2285 * linux-x86-tdesc.h: New file.
2286 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2287 (target_get_ipa_tdesc_idx): New macro.
2288 * tracepoint.c (ipa_tdesc_idx): New macro.
2289 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2290 (symbol_list): Add ipa_tdesc_idx.
2291 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2292 (ipa_tdesc): Remove.
2293 (ipa_tdesc_idx): New variable.
2294 (get_context_regcache): Use get_ipa_tdesc.
2295 (gdb_collect): Ditto.
2296 (gdb_probe): Ditto.
2297 * tracepoint.h (get_ipa_tdesc): New prototype.
2298 (ipa_tdesc): Remove.
2299
e7ad2f14
PA
23002016-02-24 Pedro Alves <palves@redhat.com>
2301
2302 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2303 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2304 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2305 Factor out common code between the USE_SIGTRAP_SIGINFO and
2306 !USE_SIGTRAP_SIGINFO blocks.
2307 (linux_low_filter_event): Call save_stop_reason instead of
2308 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2309 Update comments.
2310 (linux_wait_1): Update comments.
2311
657f9cde
WW
23122016-02-24 Wei-cheng Wang <cole945@gmail.com>
2313
2314 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2315 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2316 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2317 ppc_insert_point, ppc_remove_point.
2318
b00b61e1
MK
23192016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2320
2321 * linux-s390-low.c (s390_supports_z_point_type): New function.
2322 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2323
553cb527
YQ
23242016-02-16 Yao Qi <yao.qi@linaro.org>
2325
2326 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2327 PC. Get pc from regcache_read_pc.
2328
a5652c21
YQ
23292016-02-12 Yao Qi <yao.qi@linaro.org>
2330
2331 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2332 or linux_get_pc_32bit.
2333 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2334
ed443b61
YQ
23352016-02-12 Yao Qi <yao.qi@linaro.org>
2336
2337 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2338 arm_linux_get_next_pcs_fixup.
2339
020ecd38
MK
23402016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2341
2342 * tracepoint.c (x_tracepoint_action_download): Change
2343 write_inferior_data_ptr to write_inferior_data_pointer.
2344 (cmd_qtstart): Likewise.
2345 (write_inferior_data_ptr): Remove.
2346 (download_agent_expr): Change write_inferior_data_ptr to
2347 write_inferior_data_pointer.
2348 (download_tracepoint_1): Likewise.
2349 (download_tracepoint): Likewise.
2350 (download_trace_state_variables): Likewise.
2351
7cae9051
WW
23522016-02-11 Wei-cheng Wang <cole945@gmail.com>
2353 Marcin Kościelnicki <koriakin@0x04.net>
2354
2355 * tracepoint.c (struct tracepoint_action_ops): Remove.
2356 (struct tracepoint_action): Remove ops.
2357 (m_tracepoint_action_download, r_tracepoint_action_download)
2358 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2359 size and offset accordingly.
2360 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2361 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2362 (tracepoint_action_send, tracepoint_action_download): New functions.
2363 Helpers for trace action handlers.
2364 (add_tracepoint_action): Remove setup actions ops.
2365 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2366
9f6a71b4
YQ
23672016-02-10 Yao Qi <yao.qi@linaro.org>
2368
2369 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2370
1e94266c
SM
23712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2372
2373 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2374 to AC_OUTPUT.
2375 * configure: Regenerate.
2376
8adce034
SM
23772016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2378
2379 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2380 void * to gdb_byte *.
2381 * linux-low.c (siginfo_fixup): Likewise.
2382 (linux_xfer_siginfo): Likewise.
2383 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2384 Likewise.
2385 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2386
93813b37
WT
23872016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2388
2389 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2390 to srv_tgtobj.
2391 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2392 to srv_tgtobj.
2393 * linux-x86-low.c [__x86_64__]: Include
2394 "nat/amd64-linux-siginfo.h".
2395 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2396 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2397 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2398 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2399 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2400 (cpt_si_fd, si_timerid, si_overrun): Move from
2401 nat/amd64-linux-siginfo.c.
2402 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2403
8424cc97
SM
24042016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2405
2406 * server.c (skip_to_semicolon): Remove.
2407 (process_point_options): Use strchrnul instead of
2408 skip_to_semicolon.
2409
4d18591b
YQ
24102016-01-26 Yao Qi <yao.qi@linaro.org>
2411
2412 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2413 * linux-low.c (install_software_single_step_breakpoints): Don't
2414 call regcache_read_pc.
2415 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2416 argument pc.
2417
d8020970
YQ
24182016-01-26 Yao Qi <yao.qi@linaro.org>
2419
2420 * linux-low.c (install_software_single_step_breakpoints): Call
2421 regcache_read_pc instead of get_pc.
2422
8b207339
YQ
24232016-01-26 Yao Qi <yao.qi@linaro.org>
2424
2425 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2426 (unblock_async_io): Rename to ...
2427 (block_unblock_async_io): ... it. New function.
2428 (enable_async_io): Don't install SIGIO handler. Unblock it
2429 instead.
2430 (disable_async_io): Don't ignore SIGIO. Block it instead.
2431 (initialize_async_io): Install SIGIO handler. Don't call
2432 unblock_async_io.
2433
18879fef
YQ
24342016-01-26 Yao Qi <yao.qi@linaro.org>
2435
2436 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2437 first character is '\003', call *the_target->request_interrupt.
2438
a0f8e08a
YQ
24392016-01-25 Yao Qi <yao.qi@linaro.org>
2440
2441 * remote-utils.c (new_thread_notify): Remove.
2442 (dead_thread_notify): Likewise.
2443 * remote-utils.h (new_thread_notify): Remove declaration.
2444 (dead_thread_notify): Likewise.
2445
cc5fd9ab
MK
24462016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2447
2448 * gdb.trace/pending.exp: Fix expected message on continue.
2449
99e8eb11
MK
24502016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2451
2452 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2453 it works properly on big-endian machines where sizeof (CORE_ADDR)
2454 != sizeof (void *).
2455
a994041d
PA
24562016-01-21 Pedro Alves <palves@redhat.com>
2457
2458 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2459 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2460 * configure: Regenerate.
2461
f7a6a40d
YQ
24622016-01-21 Yao Qi <yao.qi@linaro.org>
2463
2464 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2465 is_thumb and set it according to CPSR saved on the stack.
2466 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2467 arm_sigreturn_next_pc.
2468
6f69e520
YQ
24692016-01-18 Yao Qi <yao.qi@linaro.org>
2470
2471 * linux-low.c (linux_set_pc_64bit): New function.
2472 (linux_get_pc_64bit): New function.
2473 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2474 Declare.
2475 * linux-sparc-low.c (debug_threads): Remove declaration.
2476 (sparc_get_pc): Remove.
2477 (the_low_target): Use linux_get_pc_64bit instead of
2478 sparc_get_pc.
2479 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2480 (the_low_target): Use linux_get_pc_64bit and
2481 linux_set_pc_64bit.
2482
276d4552
YQ
24832016-01-18 Yao Qi <yao.qi@linaro.org>
2484
2485 * linux-arm-low.c (debug_threads): Remove declaration.
2486 (arm_get_pc, arm_set_pc): Remove.
2487 (the_low_target): Use linux_get_pc_32bit and
2488 linux_set_pc_32bit.
2489 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2490 (the_low_target): Use linux_get_pc_32bit and
2491 linux_set_pc_32bit.
2492 * linux-cris-low.c (debug_threads): Remove declaration.
2493 (cris_get_pc, cris_set_pc,): Remove.
2494 (the_low_target): Use linux_get_pc_32bit and
2495 linux_set_pc_32bit.
2496 * linux-crisv32-low.c (debug_threads): Remove declaration.
2497 (cris_get_pc, cris_set_pc): Remove.
2498 (the_low_target): Use linux_get_pc_32bit and
2499 linux_set_pc_32bit.
2500 * linux-low.c: Include inttypes.h.
2501 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2502 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2503 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2504 (the_low_target): Use linux_get_pc_32bit and
2505 linux_set_pc_32bit.
2506 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2507 (the_low_target): Use linux_get_pc_32bit and
2508 linux_set_pc_32bit.
2509 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2510 (the_low_target): Use linux_get_pc_32bit and
2511 linux_set_pc_32bit.
2512 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2513 (the_low_target): Use linux_get_pc_32bit and
2514 linux_set_pc_32bit.
2515 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2516 (the_low_target): Use linux_get_pc_32bit and
2517 linux_set_pc_32bit.
2518
eb0edac8
GB
25192016-01-18 Gary Benson <gbenson@redhat.com>
2520
2521 * configure.ac (AC_FUNC_FORK): New check.
2522 * config.in: Regenerate.
2523 * configure: Likewise.
2524
1b451dda
YQ
25252016-01-14 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2528 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2529 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2530 arm_get_next_pcs_ctor.
2531
82075af2
JS
25322016-01-12 Josh Stone <jistone@redhat.com>
2533 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2534
2535 * inferiors.h: Include "gdb_vecs.h".
2536 (struct process_info): Add syscalls_to_catch.
2537 * inferiors.c (remove_process): Free syscalls_to_catch.
2538 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2539 syscall_return stops.
2540 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2541 * server.c (handle_general_set): Handle QCatchSyscalls.
2542 (handle_query): Report support for QCatchSyscalls.
2543 * target.h (struct target_ops): Add supports_catch_syscall.
2544 (target_supports_catch_syscall): New macro.
2545 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2546 (struct lwp_info): Add syscall_state.
2547 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2548 Maintain syscall_state and syscalls_to_catch across exec.
2549 (get_syscall_trapinfo): New function, proxy to the_low_target.
2550 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2551 (linux_low_filter_event): Toggle syscall_state entry/return for
2552 syscall traps, and set it ignored for all others.
2553 (gdb_catching_syscalls_p): New function.
2554 (gdb_catch_this_syscall_p): New function.
2555 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2556 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2557 (linux_supports_catch_syscall): New function.
2558 (linux_target_ops): Install it.
2559 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2560 (the_low_target): Install it.
2561
8f13a3ce
MF
25622016-01-12 Mike Frysinger <vapier@gentoo.org>
2563
2564 * acinclude.m4: Include new ../warning.m4 file.
2565 * configure: Regenerated.
2566 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2567
5b3da067
MF
25682016-01-12 Mike Frysinger <vapier@gentoo.org>
2569
2570 * ax.c (is_goto_target): Mark static.
2571 * linux-low.c (register_addr): Likewise.
2572 (linux_fetch_registers, linux_store_registers): Likewise.
2573 * mem-break.c (any_persistent_commands): Fix old prototype.
2574 (add_commands_to_breakpoint): Mark static.
2575 * regcache.c (find_register_by_name): Delete unused func.
2576 * remote-utils.c (hex_or_minus_one): Mark static.
2577 * server.c (monitor_show_help): Mark static.
2578 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2579 handle_v_requests): Likewise.
2580
bc504a31
PA
25812016-01-12 Pedro Alves <palves@redhat.com>
2582
2583 Remove use of the registered trademark symbol throughout.
2584
5a0dd67a
YQ
25852016-01-08 Yao Qi <yao.qi@linaro.org>
2586
2587 * remote-utils.c (getpkt): If c is '\003', call target hook
2588 request_interrupt.
2589
b2ca446f
YQ
25902016-01-06 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2593 linux-aarch32-low.c.
2594 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2595 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2596 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2597 (thumb2_breakpoint): Declare.
2598 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2599 linux-aarch32-low.h.
2600 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2601 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2602 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2603
edd88788
JB
26042016-01-01 Joel Brobecker <brobecker@adacore.com>
2605
2606 * gdbreplay.c (gdbreplay_version): Change copyright year in
2607 version message.
2608 * server.c (gdbserver_version): Likewise.
2609
65da7f14
PP
26102015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2611
2612 * server.c (crc32_table): Delete.
2613 (crc32): Use libiberty's xcrc32 function.
2614
4abd5ed2
JB
26152015-12-22 Joel Brobecker <brobecker@adacore.com>
2616
2617 * lynx-low.c (lynx_delete_thread_callback): New function.
2618 (lynx_mourn): Properly delete our process and all of its
2619 threads. Remove call to clear_inferiors.
2620
0e50fe5c
JB
26212015-12-22 Joel Brobecker <brobecker@adacore.com>
2622
2623 * target.c (thread_search_callback): Add check that
2624 the thread_stopped target callback is not NULL before
2625 calling it.
2626
35adc03f
YQ
26272015-12-21 Yao Qi <yao.qi@linaro.org>
2628
2629 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2630 arm breakpoint.
2631
bd2b2909
AT
26322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2633
2634 * server.c (handle_query): Call target_supports_software_single_step.
2635
7fe5e27e
AT
26362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2637
2638 * linux-low.c (single_step): New function.
2639 (linux_resume_one_lwp_throw): Call single_step.
2640 (start_step_over): Likewise.
2641
d9311bfa
AT
26422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2643
2644 * Makefile.in (SFILES): Append arch/arm-linux.c,
2645 arch/arm-get-next-pcs.c.
2646 (arm-linux.o): New rule.
2647 (arm-get-next-pcs.o): New rule.
2648 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2649 arm-linux.o.
2650 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2651 to linux-aarch32-low.c.
2652 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2653 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2654 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2655 (thumb2_breakpoint_len): Likewise.
2656 (arm_is_thumb_mode): Make non-static.
2657 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2658 from linux-aarch32-low.c.
2659 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2660 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2661 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2662 (thumb2_breakpoint_len): Likewise.
2663 (arm_is_thumb_mode): New declaration.
2664 * linux-arm-low.c: Include arch/arm-linux.h
2665 aarch/arm-get-next-pcs.h, sys/syscall.h.
2666 (get_next_pcs_ops): New struct.
2667 (get_next_pcs_addr_bits_remove): New function.
2668 (get_next_pcs_is_thumb): New function.
2669 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2670 (arm_sigreturn_next_pc): Likewise.
2671 (get_next_pcs_syscall_next_pc): Likewise.
2672 (arm_gdbserver_get_next_pcs): Likewise.
2673 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2674 Initialize.
2675 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2676 * server.h: Include gdb_vecs.h.
2677
68ce2059
AT
26782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2679
2680 * Makefile.in (SFILES): Append common/common-regcache.c.
2681 (OBS): Append common-regcache.o.
2682 (common-regcache.o): New rule.
2683 * regcache.c (init_register_cache): Initialize cache to
2684 REG_UNAVAILABLE.
2685 (regcache_raw_read_unsigned): New function.
2686 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2687 register_status enum.
2688
fa5308bd
AT
26892015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2690
2691 * linux-aarch64-low.c (the_low_targets): Rename
2692 breakpoint_reinsert_addr to get_next_pcs.
2693 * linux-arm-low.c (the_low_targets): Likewise.
2694 * linux-bfin-low.c (the_low_targets): Likewise.
2695 * linux-cris-low.c (the_low_targets): Likewise.
2696 * linux-crisv32-low.c (the_low_targets): Likewise.
2697 * linux-low.c (can_software_single_step): Likewise.
2698 (install_software_single_step_breakpoints): New function.
2699 (start_step_over): Use install_software_single_step_breakpoints.
2700 * linux-low.h: New CORE_ADDR vector.
2701 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2702 get_next_pcs.
2703 * linux-mips-low.c (the_low_targets): Likewise.
2704 * linux-nios2-low.c (the_low_targets): Likewise.
2705 * linux-sparc-low.c (the_low_targets): Likewise.
2706
4a6ed09b
PA
27072015-12-17 Pedro Alves <palves@redhat.com>
2708
2709 * linux-low.c (linux_kill_one_lwp): Remove references to
2710 LinuxThreads.
2711 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2712 to 'kill'.
2713 (linux_init_signals): Delete.
2714 (initialize_low): Adjust.
2715 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2716
7544db95
PA
27172015-12-16 Pedro Alves <palves@redhat.com>
2718
2719 * configure.ac (compiler warning flags): When testing a
2720 -Wno-foo option, check whether -Wfoo works instead.
2721 * configure: Regenerate.
2722
8020350c
DB
27232015-12-11 Don Breazeal <donb@codesourcery.com>
2724
2725 * server.c (process_serial_event): Don't exit from gdbserver
2726 in remote mode if there are still active inferiors.
2727
db91f502
YQ
27282015-12-11 Yao Qi <yao.qi@linaro.org>
2729
2730 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2731 arm_breakpoint_at if the process is 32-bit.
2732
b37a6290
YQ
27332015-12-11 Yao Qi <yao.qi@linaro.org>
2734
2735 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2736 arm breakpoint.
2737
17b1509a
YQ
27382015-12-07 Yao Qi <yao.qi@linaro.org>
2739
2740 * configure.srv: Append arm.o to srv_tgtobj for
2741 aarch64*-*-linux* target.
2742 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2743 from linux-arm-low.c.
2744 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2745 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2746 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2747 (thumb2_breakpoint_len): Likewise.
2748 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2749 (arm_breakpoint_kinds): Likewise.
2750 (arm_breakpoint_kind_from_pc): Likewise.
2751 (arm_sw_breakpoint_from_kind): Likewise.
2752 (arm_breakpoint_kind_from_current_state): Likewise.
2753 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2754 (arm_sw_breakpoint_from_kind): Declare.
2755 (arm_breakpoint_kind_from_current_state): Declare.
2756 (arm_breakpoint_at): Declare.
2757 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2758 arm_sw_breakpoint_from_kind if process is 32-bit.
2759 (aarch64_breakpoint_kind_from_pc): New function.
2760 (aarch64_breakpoint_kind_from_current_state): New function.
2761 (the_low_target): Initialize fields breakpoint_kind_from_pc
2762 and breakpoint_kind_from_current_state.
2763 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2764 linux-aarch32-low.c.
2765 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2766 (arm_breakpoint, arm_breakpoint_len): Likewise.
2767 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2768 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2769 (arm_is_thumb_mode): Likewise.
2770 (arm_breakpoint_at): Likewise.
2771 (arm_breakpoint_kind_from_pc): Likewise.
2772 (arm_sw_breakpoint_from_kind): Likewise.
2773 (arm_breakpoint_kind_from_current_state): Likewise.
2774
2775 Revert:
2776 2015-08-04 Yao Qi <yao.qi@linaro.org>
2777
2778 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2779 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2780 * server.c (extended_protocol): Remove "static".
2781 * server.h (extended_protocol): Declare it.
2782
ece66d65
JS
27832015-12-04 Josh Stone <jistone@redhat.com>
2784
2785 * target.h (struct target_ops) <arch_setup>: Rename to ...
2786 (struct target_ops) <post_create_inferior>: ... this.
2787 (target_arch_setup): Rename to ...
2788 (target_post_create_inferior): ... this, calling post_create_inferior.
2789 * server.c (start_inferior): Update target_arch_setup calls to
2790 target_post_create_inferior.
2791 * linux-low.c (linux_low_ptrace_options): Forward declare.
2792 (linux_arch_setup): Update its comment for general use.
2793 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2794 (struct linux_target_ops): Use linux_post_create_inferior.
2795 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2796 to post_create_inferior.
2797 * nto-low.c (struct nto_target_ops): Likewise.
2798 * spu-low.c (struct spu_target_ops): Likewise.
2799 * win32-low.c (struct win32_target_ops): Likewise.
2800
e58c48b4
AT
28012015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2802
2803 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2804
fbec8956
AT
28052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2806
2807 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2808 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2809 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2810 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2811 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2812 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2813 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2814 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2815 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2816 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2817 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2818 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2819
9b4c5f87
AT
28202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2821
2822 * linux-low.c (linux_look_up_symbols): Don't call
2823 linux_supports_traceclone.
2824 * linux-low.h (thread_db_init): Remove use_events argument.
2825 * thread-db.c (thread_db_use_event): Remove global variable.
2826 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2827 (struct thread_db) <td_create_bp>: Remove field.
2828 (thread_db_create_event): Remove function.
2829 (thread_db_enable_reporting): Likewise.
2830 (find_one_thread): Don't check for thread_db_use_events.
2831 (attach_thread): Likewise.
2832 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2833 (try_thread_db_load_1): Don't check for thread_db_use_events.
2834 (thread_db_init): Remove use_events argument and thread events
2835 handling.
2836 (remove_thread_event_breakpoints): Remove function.
2837 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2838
7d00775e
AT
28392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2840
2841 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2842 New function.
2843 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2844 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2845 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2846 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2847 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2848 Initialize.
2849 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2850 New function.
2851 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2852 * linux-low.c (can_hardware_single_step): Use
2853 supports_hardware_single_step.
2854 (can_software_single_step): New function.
2855 (start_step_over): Call can_software_single_step.
2856 (linux_supports_hardware_single_step): New function.
2857 (struct target_ops) <supports_software_single_step>: Initialize.
2858 * linux-low.h (struct linux_target_ops)
2859 <supports_hardware_single_step>: Initialize.
2860 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2861 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2862 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2863 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2864 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2866 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2868 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2869 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2870 Initialize.
2871 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2872 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2873 Initialize.
2874 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2875 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2876 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2877 New function.
2878 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2879 * target.h (struct target_ops): <supports_software_single_step>:
2880 New field.
2881 (target_supports_software_single_step): New macro.
2882
2d97cd35
AT
28832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2884
2885 * linux-low.c (linux_wait_1): Fix pc advance condition.
2886 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2887 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2888
769ef81f
AT
28892015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2890
2891 * linux-arm-low.c (arm_is_thumb_mode): New function.
2892 (arm_breakpoint_at): Use arm_is_thumb_mode.
2893 (arm_breakpoint_kind_from_current_state): New function.
2894 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2895 Initialize.
2896 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2897 (linux_breakpoint_kind_from_current_state): New function.
2898 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2899 * linux-low.h (struct linux_target_ops)
2900 <breakpoint_kind_from_current_state>: New field.
2901 * target.h (struct target_ops): Likewise.
2902 (target_breakpoint_kind_from_current_state): New macro.
2903
1bebeeca
PA
29042015-11-30 Pedro Alves <palves@redhat.com>
2905
2906 * linux-low.c (linux_resume): Wake up the event loop before
2907 returning.
2908
a67a9fae
PA
29092015-11-30 Pedro Alves <palves@redhat.com>
2910
2911 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2912 check.
2913 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2914 to -1.
2915 * target.c (struct thread_search): New structure.
2916 (thread_search_callback): New function.
2917 (prev_general_thread): New global.
2918 (prepare_to_access_memory, done_accessing_memory): New functions.
2919 * target.h (prepare_to_access_memory, done_accessing_memory):
2920 Replace macros with function declarations.
2921
f2faf941
PA
29222015-11-30 Pedro Alves <palves@redhat.com>
2923
2924 PR 14618
2925 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2926 report TARGET_WAITKIND_NO_RESUMED.
2927 * remote-utils.c (prepare_resume_reply): Handle
2928 TARGET_WAITKIND_NO_RESUMED.
2929 * server.c (report_no_resumed): New global.
2930 (handle_query) <qSupported>: Handle "no-resumed+". Report
2931 "no-resumed+" support.
2932 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2933 return error if the client doesn't support no-resumed events.
2934 (push_stop_notification): New function.
2935 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2936 events if the client supports them.
2937
a681f9c9
PA
29382015-11-30 Pedro Alves <palves@redhat.com>
2939
2940 * linux-low.c (thread_still_has_status_pending_p): Don't check
2941 vCont;t here.
2942 (lwp_resumed): New function.
2943 (status_pending_p_callback): Return early if the LWP is not
2944 supposed to be resumed.
2945
65706a29
PA
29462015-11-30 Pedro Alves <palves@redhat.com>
2947
2948 * linux-low.c (handle_extended_wait): Assert that the LWP's
2949 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2950 thread create events, leave the new child's status pending.
2951 (linux_low_filter_event): If GDB wants to hear about thread exit
2952 events, leave the LWP marked dead and don't delete it.
2953 (linux_wait_for_event_filtered): Don't check for thread exit.
2954 (filter_exit_event): New function.
2955 (linux_wait_1): Use it, when returning an exit event.
2956 (linux_resume_one_lwp_throw): Assert that the LWP's
2957 waitstatus is TARGET_WAITKIND_IGNORE.
2958 * remote-utils.c (prepare_resume_reply): Handle
2959 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2960 * server.c (report_thread_events): New global.
2961 (handle_general_set): Handle QThreadEvents.
2962 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2963 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2964 TARGET_WAITKIND_THREAD_EXITED.
2965 * server.h (report_thread_events): Declare.
2966
56cf4bed
PA
29672015-11-30 Pedro Alves <palves@redhat.com>
2968
2969 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2970 the thread's last_resume_kind was resume_stop.
2971
500c1d85
PA
29722015-11-30 Pedro Alves <palves@redhat.com>
2973
2974 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2975 before returning.
2976
de979965
PA
29772015-11-30 Pedro Alves <palves@redhat.com>
2978
2979 * server.c (handle_v_requests): Handle vCtrlC.
2980
34c65914
PA
29812015-11-30 Pedro Alves <palves@redhat.com>
2982
2983 * gdbthread.h (find_any_thread_of_pid): Declare.
2984 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2985 functions.
2986 * server.c (handle_query): If current_thread is NULL, look for
2987 another thread of the selected process.
2988
79efa585 29892015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2990 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2991
2992 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2993 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2994 name in reply.
2995 * target.h (struct target_ops) <thread_name>: New field.
2996 (target_thread_name): New macro.
2997
80d82c19
JB
29982015-11-23 Joel Brobecker <brobecker@adacore.com>
2999
3000 * regcache.h (regcache_invalidate_pid): Add declaration.
3001 * regcache.c (regcache_invalidate_pid): New function, extracted
3002 from regcache_invalidate.
3003 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3004 Add trivial documentation comment.
3005 * lynx-low.c: Use regcache_invalidate_pid instead of
3006 regcache_invalidate.
3007
64da5dd5
JB
30082015-11-23 Joel Brobecker <brobecker@adacore.com>
3009
3010 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3011 and Elf64_auxv_t if the target is Android.
3012
37ce4055
DE
30132015-11-22 Doug Evans <xdje42@gmail.com>
3014
3015 * target.h: #include <sys/types.h>.
3016
06e03fff
PA
30172015-11-19 Pedro Alves <palves@redhat.com>
3018
3019 * linux-low.c (linux_process_qsupported): Change prototype.
3020 Adjust.
3021 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3022 Change prototype.
3023 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3024 and adjust to loop over all features.
3025 * server.c (handle_query) <qSupported>: Adjust to call
3026 target_process_qsupported once, passing it a vector of unprocessed
3027 features.
3028 * target.h (struct target_ops) <process_qsupported>: Change
3029 prototype.
3030 (target_process_qsupported): Adjust.
3031
9a084706
PA
30322015-11-19 Pedro Alves <palves@redhat.com>
3033
3034 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3035 mode.
3036 * configure: Regenerate.
3037
dad44a1f
PA
30382015-11-19 Pedro Alves <palves@redhat.com>
3039
3040 * configure: Regenerate.
3041
231c0592
YQ
30422015-11-19 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3045 type to uint32_t.
3046
6c1c9a8b
YQ
30472015-11-19 Yao Qi <yao.qi@linaro.org>
3048
3049 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3050 (struct aarch64_operand): Move enum out.
3051
9caa3311
YQ
30522015-11-19 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3055 struct user_fpsimd_state *.
3056 (aarch64_store_fpregset): Likewise.
3057
6a69a054
YQ
30582015-11-19 Yao Qi <yao.qi@linaro.org>
3059
3060 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3061 struct user_pt_regs *.
3062 (aarch64_store_gregset): Likewise.
3063
1798301e
PA
30642015-11-18 Pedro Alves <palves@redhat.com>
3065
3066 * Makefile.in (all_object_files): Add $IPA_OBJS.
3067
ce7715e2
PA
30682015-11-17 Pedro Alves <palves@redhat.com>
3069
3070 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3071 GDB_SIGNAL_0 and gdb_signal_to_string.
3072
c0879059
PA
30732015-11-17 Pedro Alves <palves@redhat.com>
3074
3075 * win32-low.c (handle_output_debug_string): Remove parameter.
3076 (win32_kill): Remove our_status local and adjust call to
3077 handle_output_debug_string.
3078 (get_child_debug_event): Adjust call to
3079 handle_output_debug_string.
3080
1996e237
SM
30812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3082
3083 * linux-mips-low.c (mips_fill_gregset): Add cast.
3084 (mips_store_gregset): Likewise.
3085 (mips_fill_fpregset): Likewise.
3086 (mips_store_fpregset): Likewise.
3087
cbec665b
SM
30882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3089
3090 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3091 priv.
3092
eb3e3c67
SM
30932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3094
3095 * linux-mips-low.c (mips_linux_new_thread): Change type of
3096 watch_type to enum target_hw_bp_type.
3097
171de4b8
SM
30982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3099
3100 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3101 Change return type to arm_hwbp_type.
3102
04248ead
SM
31032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3104
3105 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3106 (arm_store_gregset): Likewise.
3107 * linux-arm-low.c (arm_get_hwcap): Likewise.
3108 (arm_read_description): Likewise.
3109
04b3479c
SM
31102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3111
3112 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3113
2bc84e8a
SM
31142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3115
3116 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3117 (ppc_fill_vsxregset): Likewise.
3118 (ppc_store_vsxregset): Likewise.
3119 (ppc_fill_vrregset): Likewise.
3120 (ppc_store_vrregset): Likewise.
3121 (ppc_fill_evrregset): Likewise.
3122 (ppc_store_evrregset): Likewise.
3123
e6c5bb05
SM
31242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3125
3126 * linux-ppc-low.c (ppc_usrregs_info): Remove
3127 forward-declaration.
3128 (ppc_arch_setup): Move lower in file.
3129
7ea45d72
SM
31302015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3131
3132 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3133 (ps_pdwrite): Likewise.
3134
69291610
HW
31352015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3136
3137 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3138 to after assert checks.
3139
b42945fd
SM
31402015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3141
3142 * proc-service.c (ps_pdread): Add/adjust casts.
3143 (ps_pdwrite): Add/adjust casts.
3144
d6f85c84
SM
31452015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3146
3147 * server.c (handle_search_memory_1): Cast return value of
3148 memmem.
3149
f98cd059
SM
31502015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3151
3152 * server.c (write_qxfer_response): Change type of data to
3153 gdb_byte *.
3154
d2412fa5
PA
31552015-10-29 Pedro Alves <palves@redhat.com>
3156
3157 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3158
c17414a2
PA
31592015-10-29 Pedro Alves <palves@redhat.com>
3160
3161 * tracepoint.c (clear_installed_tracepoints): Add casts.
3162
e053fbc4
PA
31632015-10-29 Pedro Alves <palves@redhat.com>
3164
3165 * server.c (handle_v_cont, process_serial_event): Add enum
3166 gdb_signal casts to signal parsing code.
3167
add67df8
PA
31682015-10-29 Pedro Alves <palves@redhat.com>
3169
3170 * linux-low.h (NULL_REGSET): Define.
3171 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3172 * linux-arm-low.c (arm_regsets): Likewise.
3173 * linux-crisv32-low.c (cris_regsets): Likewise.
3174 * linux-m68k-low.c (m68k_regsets): Likewise.
3175 * linux-mips-low.c (mips_regsets): Likewise.
3176 * linux-nios2-low.c (nios2_regsets): Likewise.
3177 * linux-ppc-low.c (ppc_regsets): Likewise.
3178 * linux-s390-low.c (s390_regsets): Likewise.
3179 * linux-sh-low.c (sh_regsets): Likewise.
3180 * linux-sparc-low.c (sparc_regsets): Likewise.
3181 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3182 * linux-tile-low.c (tile_regsets): Likewise.
3183 * linux-x86-low.c (x86_regsets): Likewise.
3184 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3185
50bc912a
PA
31862015-10-29 Pedro Alves <palves@redhat.com>
3187
3188 * linux-low.h (NULL_REGSET): Define.
3189 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3190 * linux-arm-low.c (arm_regsets): Likewise.
3191 * linux-crisv32-low.c (cris_regsets): Likewise.
3192 * linux-m68k-low.c (m68k_regsets): Likewise.
3193 * linux-mips-low.c (mips_regsets): Likewise.
3194 * linux-nios2-low.c (nios2_regsets): Likewise.
3195 * linux-ppc-low.c (ppc_regsets): Likewise.
3196 * linux-s390-low.c (s390_regsets): Likewise.
3197 * linux-sh-low.c (sh_regsets): Likewise.
3198 * linux-sparc-low.c (sparc_regsets): Likewise.
3199 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3200 * linux-tile-low.c (tile_regsets): Likewise.
3201 * linux-x86-low.c (x86_regsets): Likewise.
3202 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3203
682b2546
DE
32042015-10-26 Doug Evans <dje@google.com>
3205
3206 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3207
963843d4
DE
32082015-10-26 Doug Evans <dje@google.com>
3209
3210 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3211
d41401ac
DE
32122015-10-26 Doug Evans <dje@google.com>
3213
3214 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3215 for debug_printf.
3216 (attach_thread, find_new_threads_callback): Ditto.
3217
3db28855
AT
32182015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3219
3220 * mem-break.h (set_breakpoint_data): Remove.
3221
fb78e89c
AT
32222015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3223
3224 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3225 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3226 (initialize_low): Remove set_breakpoint_data call.
3227 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3228 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3229 (initialize_low): Remove set_breakpoint_data call.
3230 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3231 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3232 (initialize_low): Remove set_breakpoint_data call.
3233
2e6ee069
AT
32342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3235
3236 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3237 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3238 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3239 * target.h (target_breakpoint_kind_from_pc): New macro.
3240
1652a986
AT
32412015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3242
3243 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3244 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3245 the default breakpoint kind.
3246
abeead09
AT
32472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3248
3249 * linux-arm-low.c (arm_supports_z_point_type): Add software
3250 breakpoint support.
3251
b0b4b501
AT
32522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3253
3254 * linux-arm-low.c: Refactor breakpoint definitions.
3255 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3256 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3257
8689682c
AT
32582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3259
3260 * Makefile.in: Add arm.c/o.
3261 * configure.srv: Likewise.
3262 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3263 (arm_breakpoint_kind_from_pc): New function.
3264 (arm_sw_breakpoint_from_kind): Return proper kind.
3265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3266
27165294
AT
32672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3268
3269 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3270 removal.
3271 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3272 (struct raw_breakpoint) <size>: Remove.
3273 (struct raw_breakpoint) <kind>: Add.
3274 (bp_size): New function.
3275 (bp_opcode): Likewise.
3276 (find_raw_breakpoint_at): Adjust for kind.
3277 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3278 (remove_memory_breakpoint): Adjust for kind call bp_size.
3279 (set_raw_breakpoint_at): Adjust for kind.
3280 (set_breakpoint): Likewise.
3281 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3282 (delete_raw_breakpoint): Adjust for kind.
3283 (delete_breakpoint): Likewise.
3284 (find_gdb_breakpoint): Likewise.
3285 (set_gdb_breakpoint_1): Likewise.
3286 (set_gdb_breakpoint): Likewise.
3287 (delete_gdb_breakpoint_1): Likewise.
3288 (delete_gdb_breakpoint): Likewise.
3289 (uninsert_raw_breakpoint): Likewise.
3290 (reinsert_raw_breakpoint): Likewise.
3291 (set_breakpoint_data): Remove.
3292 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3293 (check_mem_read): Adjust for kind call bp_size.
3294 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3295 (clone_one_breakpoint): Adjust for kind.
3296 * mem-break.h (set_gdb_breakpoint): Likewise.
3297 (delete_gdb_breakpoint): Likewise.
3298 * server.c (process_serial_event): Likewise.
3299
dd373349
AT
33002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3301
3302 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3303 (struct linux_target_ops) <breakpoint>: Remove.
3304 (struct linux_target_ops) <breakpoint_len>: Remove.
3305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3307 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3308 (arm_sw_breakpoint_from_kind): New function.
3309 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3310 (struct linux_target_ops) <breakpoint>: Remove.
3311 (struct linux_target_ops) <breakpoint_len>: Remove.
3312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3314 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3315 (struct linux_target_ops) <breakpoint>: Remove.
3316 (struct linux_target_ops) <breakpoint_len>: Remove.
3317 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3318 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3319 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3320 (struct linux_target_ops) <breakpoint>: Remove.
3321 (struct linux_target_ops) <breakpoint_len>: Remove.
3322 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3323 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3324 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3325 and sw_breakpoint_from_kind to increment the pc.
3326 (linux_breakpoint_kind_from_pc): New function.
3327 (linux_sw_breakpoint_from_kind): New function.
3328 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3329 (initialize_low): Call breakpoint_kind_from_pc and
3330 sw_breakpoint_from_kind to replace breakpoint_data/len.
3331 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3332 New field.
3333 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3334 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3335 (struct linux_target_ops) <breakpoint>: Remove.
3336 (struct linux_target_ops) <breakpoint_len>: Remove.
3337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3338 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3339 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3340 (struct linux_target_ops) <breakpoint>: Remove.
3341 (struct linux_target_ops) <breakpoint_len>: Remove.
3342 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3344 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3345 (struct linux_target_ops) <breakpoint>: Remove.
3346 (struct linux_target_ops) <breakpoint_len>: Remove.
3347 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3348 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3349 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3350 (struct linux_target_ops) <breakpoint>: Remove.
3351 (struct linux_target_ops) <breakpoint_len>: Remove.
3352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3354 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3355 (struct linux_target_ops) <breakpoint>: Remove.
3356 (struct linux_target_ops) <breakpoint_len>: Remove.
3357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3359 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3360 (struct linux_target_ops) <breakpoint>: Remove.
3361 (struct linux_target_ops) <breakpoint_len>: Remove.
3362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3363 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3364 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3365 (struct linux_target_ops) <breakpoint>: Remove.
3366 (struct linux_target_ops) <breakpoint_len>: Remove.
3367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3369 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3370 (struct linux_target_ops) <breakpoint>: Remove.
3371 (struct linux_target_ops) <breakpoint_len>: Remove.
3372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3374 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3375 (struct linux_target_ops) <breakpoint>: Remove.
3376 (struct linux_target_ops) <breakpoint_len>: Remove.
3377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3379 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3380 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3381 (struct linux_target_ops) <breakpoint>: Remove.
3382 (struct linux_target_ops) <breakpoint_len>: Remove.
3383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3385 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3386 (struct linux_target_ops) <breakpoint>: Remove.
3387 (struct linux_target_ops) <breakpoint_len>: Remove.
3388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3390
4cd98a19
AT
33912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3392
3393 * linux-cris-low.c (cris_get_pc): Remove void arg.
3394
774ee6d2
AR
33952015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3396
3397 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3398 variable name.
3399
833dcd29
AR
34002015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3401
3402 * inferiors.c (thread_pid_matches_callback): New function.
3403 (find_thread_process): New function.
3404 (remove_thread): Reset current_thread.
3405 (remove_process): Assert threads have been removed first.
3406
8d689ee5
YQ
34072015-10-15 Yao Qi <yao.qi@linaro.org>
3408
3409 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3410 if it is 3.
3411 (aarch64_remove_point): Likewise.
3412 * regcache.c (regcache_register_size): New function.
3413
1c2e1515
YQ
34142015-10-12 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-aarch64-low.c: Update all callers as emit_load_store
3417 is renamed to aarch64_emit_load_store.
3418
e1c587c3
YQ
34192015-10-12 Yao Qi <yao.qi@linaro.org>
3420
3421 * linux-aarch64-low.c: Update all callers of function renaming
3422 from emit_insn to aarch64_emit_insn.
3423
b6542f81
YQ
34242015-10-12 Yao Qi <yao.qi@linaro.org>
3425
3426 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3427 arch/aarch64-insn.h.
3428 (struct aarch64_memory_operand): Likewise.
3429 (ENCODE): Likewise.
3430 (emit_insn): Move to arch/aarch64-insn.c.
3431 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3432 (emit_load_store): Move to arch/aarch64-insn.c.
3433 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3434 (can_encode_int32): Remove.
3435
246994ce
YQ
34362015-10-12 Yao Qi <yao.qi@linaro.org>
3437
3438 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3439 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3440 (aarch64_relocate_instruction): Likewise.
3441 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3442 (struct aarch64_insn_visitor): Likewise.
3443
0badd99f
YQ
34442015-10-12 Yao Qi <yao.qi@linaro.org>
3445
3446 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3447 (struct aarch64_insn_visitor): New.
3448 (struct aarch64_insn_relocation_data): New.
3449 (aarch64_ftrace_insn_reloc_b): New function.
3450 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3451 (aarch64_ftrace_insn_reloc_cb): Likewise.
3452 (aarch64_ftrace_insn_reloc_tb): Likewise.
3453 (aarch64_ftrace_insn_reloc_adr): Likewise.
3454 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3455 (aarch64_ftrace_insn_reloc_others): Likewise.
3456 (visitor): New.
3457 (aarch64_relocate_instruction): Use visitor.
3458
dfaffe9d
YQ
34592015-10-12 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3462 int. Add argument buf.
3463 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3464 aarch64_relocate_instruction.
3465
70b439f0
YQ
34662015-10-12 Yao Qi <yao.qi@linaro.org>
3467
3468 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3469 argument insn. Remove local variable insn. Don't call
3470 target_read_uint32.
3471 (aarch64_install_fast_tracepoint_jump_pad): Call
3472 target_read_uint32.
3473
7781c06f
YQ
34742015-09-30 Yao Qi <yao.qi@linaro.org>
3475
3476 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3477 (emit_load_store_pair): Likewise.
3478
9a3c8263
SM
34792015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3480
3481 * dll.c (match_dll): Add cast(s).
3482 (unloaded_dll): Likewise.
3483 * linux-low.c (second_thread_of_pid_p): Likewise.
3484 (delete_lwp_callback): Likewise.
3485 (count_events_callback): Likewise.
3486 (select_event_lwp_callback): Likewise.
3487 (linux_set_resume_request): Likewise.
3488 * server.c (accumulate_file_name_length): Likewise.
3489 (emit_dll_description): Likewise.
3490 (handle_qxfer_threads_worker): Likewise.
3491 (visit_actioned_threads): Likewise.
3492 * thread-db.c (any_thread_of): Likewise.
3493 * tracepoint.c (same_process_p): Likewise.
3494 (match_blocktype): Likewise.
3495 (build_traceframe_info_xml): Likewise.
3496
224c3ddb
SM
34972015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3498
3499 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3500 assignment.
3501 (gdb_unparse_agent_expr): Likewise.
3502 * hostio.c (require_data): Likewise.
3503 (handle_pread): Likewise.
3504 * linux-low.c (disable_regset): Likewise.
3505 (fetch_register): Likewise.
3506 (store_register): Likewise.
3507 (get_dynamic): Likewise.
3508 (linux_qxfer_libraries_svr4): Likewise.
3509 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3510 (set_fast_tracepoint_jump): Likewise.
3511 (uninsert_fast_tracepoint_jumps_at): Likewise.
3512 (reinsert_fast_tracepoint_jumps_at): Likewise.
3513 (validate_inserted_breakpoint): Likewise.
3514 (clone_agent_expr): Likewise.
3515 * regcache.c (init_register_cache): Likewise.
3516 * remote-utils.c (putpkt_binary_1): Likewise.
3517 (decode_M_packet): Likewise.
3518 (decode_X_packet): Likewise.
3519 (look_up_one_symbol): Likewise.
3520 (relocate_instruction): Likewise.
3521 (monitor_output): Likewise.
3522 * server.c (handle_search_memory): Likewise.
3523 (handle_qxfer_exec_file): Likewise.
3524 (handle_qxfer_libraries): Likewise.
3525 (handle_qxfer): Likewise.
3526 (handle_query): Likewise.
3527 (handle_v_cont): Likewise.
3528 (handle_v_run): Likewise.
3529 (captured_main): Likewise.
3530 * target.c (write_inferior_memory): Likewise.
3531 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3532 * tracepoint.c (init_trace_buffer): Likewise.
3533 (add_tracepoint_action): Likewise.
3534 (add_traceframe): Likewise.
3535 (add_traceframe_block): Likewise.
3536 (cmd_qtdpsrc): Likewise.
3537 (cmd_qtdv): Likewise.
3538 (cmd_qtstatus): Likewise.
3539 (response_source): Likewise.
3540 (response_tsv): Likewise.
3541 (cmd_qtnotes): Likewise.
3542 (gdb_collect): Likewise.
3543 (initialize_tracepoint): Likewise.
3544
afbe19f8
PL
35452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3546
3547 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3548 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3549 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3550 <NOP>: New.
3551 (enum aarch64_condition_codes): New enum.
3552 (w0): New static global.
3553 (fp): Likewise.
3554 (lr): Likewise.
3555 (struct aarch64_memory_operand) <type>: New
3556 MEMORY_OPERAND_POSTINDEX type.
3557 (postindex_memory_operand): New helper function.
3558 (emit_ret): New function.
3559 (emit_load_store_pair): New function, factored out of emit_stp
3560 with support for MEMORY_OPERAND_POSTINDEX.
3561 (emit_stp): Rewrite using emit_load_store_pair.
3562 (emit_ldp): New function.
3563 (emit_load_store): Likewise.
3564 (emit_ldr): Mention post-index instruction in comment.
3565 (emit_ldrh): New function.
3566 (emit_ldrb): New function.
3567 (emit_ldrsw): Mention post-index instruction in comment.
3568 (emit_str): Likewise.
3569 (emit_subs): New function.
3570 (emit_cmp): Likewise.
3571 (emit_and): Likewise.
3572 (emit_orr): Likewise.
3573 (emit_orn): Likewise.
3574 (emit_eor): Likewise.
3575 (emit_mvn): Likewise.
3576 (emit_lslv): Likewise.
3577 (emit_lsrv): Likewise.
3578 (emit_asrv): Likewise.
3579 (emit_mul): Likewise.
3580 (emit_sbfm): Likewise.
3581 (emit_sbfx): Likewise.
3582 (emit_ubfm): Likewise.
3583 (emit_ubfx): Likewise.
3584 (emit_csinc): Likewise.
3585 (emit_cset): Likewise.
3586 (emit_nop): Likewise.
3587 (emit_ops_insns): New helper function.
3588 (emit_pop): Likewise.
3589 (emit_push): Likewise.
3590 (aarch64_emit_prologue): New function.
3591 (aarch64_emit_epilogue): Likewise.
3592 (aarch64_emit_add): Likewise.
3593 (aarch64_emit_sub): Likewise.
3594 (aarch64_emit_mul): Likewise.
3595 (aarch64_emit_lsh): Likewise.
3596 (aarch64_emit_rsh_signed): Likewise.
3597 (aarch64_emit_rsh_unsigned): Likewise.
3598 (aarch64_emit_ext): Likewise.
3599 (aarch64_emit_log_not): Likewise.
3600 (aarch64_emit_bit_and): Likewise.
3601 (aarch64_emit_bit_or): Likewise.
3602 (aarch64_emit_bit_xor): Likewise.
3603 (aarch64_emit_bit_not): Likewise.
3604 (aarch64_emit_equal): Likewise.
3605 (aarch64_emit_less_signed): Likewise.
3606 (aarch64_emit_less_unsigned): Likewise.
3607 (aarch64_emit_ref): Likewise.
3608 (aarch64_emit_if_goto): Likewise.
3609 (aarch64_emit_goto): Likewise.
3610 (aarch64_write_goto_address): Likewise.
3611 (aarch64_emit_const): Likewise.
3612 (aarch64_emit_call): Likewise.
3613 (aarch64_emit_reg): Likewise.
3614 (aarch64_emit_pop): Likewise.
3615 (aarch64_emit_stack_flush): Likewise.
3616 (aarch64_emit_zero_ext): Likewise.
3617 (aarch64_emit_swap): Likewise.
3618 (aarch64_emit_stack_adjust): Likewise.
3619 (aarch64_emit_int_call_1): Likewise.
3620 (aarch64_emit_void_call_2): Likewise.
3621 (aarch64_emit_eq_goto): Likewise.
3622 (aarch64_emit_ne_goto): Likewise.
3623 (aarch64_emit_lt_goto): Likewise.
3624 (aarch64_emit_le_goto): Likewise.
3625 (aarch64_emit_gt_goto): Likewise.
3626 (aarch64_emit_ge_got): Likewise.
3627 (aarch64_emit_ops_impl): New static global variable.
3628 (aarch64_emit_ops): New target function, return
3629 &aarch64_emit_ops_impl.
3630 (struct linux_target_ops): Install it.
3631
bb903df0
PL
36322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3633
3634 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3635 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3636 aarch64-ipa.o.
3637 * linux-aarch64-ipa.c: New file.
3638 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3639 and endian.h.
3640 (aarch64_get_thread_area): New target method.
3641 (extract_signed_bitfield): New helper function.
3642 (aarch64_decode_ldr_literal): New function.
3643 (enum aarch64_opcodes): New enum.
3644 (struct aarch64_register): New struct.
3645 (struct aarch64_operand): New struct.
3646 (x0): New static global.
3647 (x1): Likewise.
3648 (x2): Likewise.
3649 (x3): Likewise.
3650 (x4): Likewise.
3651 (w2): Likewise.
3652 (ip0): Likewise.
3653 (sp): Likewise.
3654 (xzr): Likewise.
3655 (aarch64_register): New helper function.
3656 (register_operand): Likewise.
3657 (immediate_operand): Likewise.
3658 (struct aarch64_memory_operand): New struct.
3659 (offset_memory_operand): New helper function.
3660 (preindex_memory_operand): Likewise.
3661 (enum aarch64_system_control_registers): New enum.
3662 (ENCODE): New macro.
3663 (emit_insn): New helper function.
3664 (emit_b): New function.
3665 (emit_bcond): Likewise.
3666 (emit_cb): Likewise.
3667 (emit_tb): Likewise.
3668 (emit_blr): Likewise.
3669 (emit_stp): Likewise.
3670 (emit_ldp_q_offset): Likewise.
3671 (emit_stp_q_offset): Likewise.
3672 (emit_load_store): Likewise.
3673 (emit_ldr): Likewise.
3674 (emit_ldrsw): Likewise.
3675 (emit_str): Likewise.
3676 (emit_ldaxr): Likewise.
3677 (emit_stxr): Likewise.
3678 (emit_stlr): Likewise.
3679 (emit_data_processing_reg): Likewise.
3680 (emit_data_processing): Likewise.
3681 (emit_add): Likewise.
3682 (emit_sub): Likewise.
3683 (emit_mov): Likewise.
3684 (emit_movk): Likewise.
3685 (emit_mov_addr): Likewise.
3686 (emit_mrs): Likewise.
3687 (emit_msr): Likewise.
3688 (emit_sevl): Likewise.
3689 (emit_wfe): Likewise.
3690 (append_insns): Likewise.
3691 (can_encode_int32_in): New helper function.
3692 (aarch64_relocate_instruction): New function.
3693 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3694 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3695 (struct linux_target_ops): Install aarch64_get_thread_area,
3696 aarch64_install_fast_tracepoint_jump_pad and
3697 aarch64_get_min_fast_tracepoint_insn_len.
3698
787749ea
PL
36992015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3700
3701 * Makefile.in (aarch64-insn.o): New rule.
3702 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3703
9812b2e6
YQ
37042015-09-21 Yao Qi <yao.qi@linaro.org>
3705
3706 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3707
18fe412b
YQ
37082015-09-21 Yao Qi <yao.qi@linaro.org>
3709
3710 * tracepoint.c (max_jump_pad_size): Remove.
3711
a0cc84cd
YQ
37122015-09-18 Yao Qi <yao.qi@linaro.org>
3713
3714 * linux-aarch64-low.c: Don't include sys/uio.h.
3715 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3716
d78908cf
WW
37172015-09-16 Wei-cheng Wang <cole945@gmail.com>
3718
3719 * tracepoint.c (eval_result_type): Change prototype.
3720 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3721
d57e0d50
PA
37222015-09-15 Pedro Alves <palves@redhat.com>
3723
3724 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3725 Check whether to report exec events instead of checking whether
3726 multiprocess is enabled.
3727
5a676acc
PA
37282015-09-15 Pedro Alves <palves@redhat.com>
3729
3730 PR remote/18965
3731 * remote-utils.c (prepare_resume_reply): Merge
3732 TARGET_WAITKIND_VFORK_DONE switch case with the
3733 TARGET_WAITKIND_FORKED case.
3734
7c5d0fad
YQ
37352015-09-15 Yao Qi <yao.qi@linaro.org>
3736
3737 * server.c (handle_query): Check string comparison using
3738 "else if" instead of "if".
3739
750ce8d1
YQ
37402015-09-15 Yao Qi <yao.qi@linaro.org>
3741
3742 * server.c (vCont_supported): New global variable.
3743 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3744 matches. Append ";vContSupported+" to own_buf.
3745 (handle_v_requests): Append ";s;S" to own_buf if target supports
3746 hardware single step or vCont_supported is false.
3747 (capture_main): Set vCont_supported to zero.
3748
70b90b91
YQ
37492015-09-15 Yao Qi <yao.qi@linaro.org>
3750
3751 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3752 it to ...
3753 (linux_supports_hardware_single_step): ... New function.
3754 (linux_target_ops): Update.
3755 * lynx-low.c (lynx_target_ops): Set field
3756 supports_hardware_single_step to target_can_do_hardware_single_step.
3757 * nto-low.c (nto_target_ops): Likewise.
3758 * spu-low.c (spu_target_ops): Likewise.
3759 * win32-low.c (win32_target_ops): Likewise.
3760 * target.c (target_can_do_hardware_single_step): New function.
3761 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3762 Remove. <supports_hardware_single_step>: New field.
3763 (target_supports_conditional_breakpoints): Remove.
3764 (target_supports_hardware_single_step): New macro.
3765 (target_can_do_hardware_single_step): Declare.
3766 * server.c (handle_query): Use target_supports_hardware_single_step
3767 instead of target_supports_conditional_breakpoints.
3768
ade90bde
YQ
37692015-09-15 Yao Qi <yao.qi@linaro.org>
3770
3771 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3772 function.
3773 (struct linux_target_ops the_low_target): Install
3774 aarch64_linux_siginfo_fixup.
3775
94585166
DB
37762015-09-11 Don Breazeal <donb@codesourcery.com>
3777 Luis Machado <lgustavo@codesourcery.com>
3778
3779 * linux-low.c (linux_mourn): Static declaration.
3780 (linux_arch_setup): Move in front of
3781 handle_extended_wait.
3782 (linux_arch_setup_thread): New function.
3783 (handle_extended_wait): Handle exec events. Call
3784 linux_arch_setup_thread. Make event_lwp argument a
3785 pointer-to-a-pointer.
3786 (check_zombie_leaders): Do not check stopped threads.
3787 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3788 (linux_low_filter_event): Add lwp and thread for exec'ing
3789 non-leader thread if leader thread has been deleted.
3790 Refactor code into linux_arch_setup_thread and call it.
3791 Pass child lwp pointer by reference to handle_extended_wait.
3792 (linux_wait_for_event_filtered): Update comment.
3793 (linux_wait_1): Prevent clobbering exec event status.
3794 (linux_supports_exec_events): New function.
3795 (linux_target_ops) <supports_exec_events>: Initialize new member.
3796 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3797 new member.
3798 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3799 * server.c (report_exec_events): New global variable.
3800 (handle_query): Handle qSupported query for exec-events feature.
3801 (captured_main): Initialize report_exec_events.
3802 * server.h (report_exec_events): Declare new global variable.
3803 * target.h (struct target_ops) <supports_exec_events>: New
3804 member.
3805 (target_supports_exec_events): New macro.
3806 * win32-low.c (win32_target_ops) <supports_exec_events>:
3807 Initialize new member.
3808
0568462b
MM
38092015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3810
3811 * linux-low.c (linux_low_enable_btrace): Remove.
3812 (linux_target_ops): Replace linux_low_enable_btrace with
3813 linux_enable_btrace.
3814
39edd165
YQ
38152015-09-03 Yao Qi <yao.qi@linaro.org>
3816
3817 * linux-aarch64-low.c (aarch64_insert_point): Call
3818 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3819 returns true.
3820
1db33b5a
UW
38212015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3822
3823 * linux-low.c (check_stopped_by_breakpoint): Use
3824 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3825
ab290430
PA
38262015-08-27 Pedro Alves <palves@redhat.com>
3827
3828 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3829
8d749320
SM
38302015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3831
6711b7f8
SM
3832 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3833 the XNEW-family equivalent.
8d749320
SM
3834 (compile_bytecodes): Likewise.
3835 * dll.c (loaded_dll): Likewise.
3836 * event-loop.c (append_callback_event): Likewise.
3837 (create_file_handler): Likewise.
3838 (create_file_event): Likewise.
3839 * hostio.c (handle_open): Likewise.
3840 * inferiors.c (add_thread): Likewise.
3841 (add_process): Likewise.
3842 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3843 * linux-arm-low.c (arm_new_process): Likewise.
3844 (arm_new_thread): Likewise.
3845 * linux-low.c (add_to_pid_list): Likewise.
3846 (linux_add_process): Likewise.
3847 (handle_extended_wait): Likewise.
3848 (add_lwp): Likewise.
3849 (enqueue_one_deferred_signal): Likewise.
3850 (enqueue_pending_signal): Likewise.
3851 (linux_resume_one_lwp_throw): Likewise.
3852 (linux_resume_one_thread): Likewise.
3853 (linux_read_memory): Likewise.
3854 (linux_write_memory): Likewise.
3855 * linux-mips-low.c (mips_linux_new_process): Likewise.
3856 (mips_linux_new_thread): Likewise.
3857 (mips_add_watchpoint): Likewise.
3858 * linux-x86-low.c (initialize_low_arch): Likewise.
3859 * lynx-low.c (lynx_add_process): Likewise.
3860 * mem-break.c (set_raw_breakpoint_at): Likewise.
3861 (set_breakpoint): Likewise.
3862 (add_condition_to_breakpoint): Likewise.
3863 (add_commands_to_breakpoint): Likewise.
3864 (clone_agent_expr): Likewise.
3865 (clone_one_breakpoint): Likewise.
3866 * regcache.c (new_register_cache): Likewise.
3867 * remote-utils.c (look_up_one_symbol): Likewise.
3868 * server.c (queue_stop_reply): Likewise.
3869 (start_inferior): Likewise.
3870 (queue_stop_reply_callback): Likewise.
3871 (handle_target_event): Likewise.
3872 * spu-low.c (fetch_ppc_memory): Likewise.
3873 (store_ppc_memory): Likewise.
3874 * target.c (set_target_ops): Likewise.
3875 * thread-db.c (thread_db_load_search): Likewise.
3876 (try_thread_db_load_1): Likewise.
3877 * tracepoint.c (add_tracepoint): Likewise.
3878 (add_tracepoint_action): Likewise.
3879 (create_trace_state_variable): Likewise.
3880 (cmd_qtdpsrc): Likewise.
3881 (cmd_qtro): Likewise.
3882 (add_while_stepping_state): Likewise.
3883 * win32-low.c (child_add_thread): Likewise.
3884 (get_image_name): Likewise.
3885
ed8b7b42
YQ
38862015-08-25 Yao Qi <yao.qi@linaro.org>
3887
3888 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3889
db3cb7cb
YQ
38902015-08-25 Yao Qi <yao.qi@linaro.org>
3891
3892 * Makefile.in (aarch64-linux.o): New rule.
3893 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3894 srv_tgtobj.
3895 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3896 (aarch64_init_debug_reg_state): Make it extern.
3897 (aarch64_linux_prepare_to_resume): Remove.
3898
f6011a1c
YQ
38992015-08-25 Yao Qi <yao.qi@linaro.org>
3900
3901 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3902 lwp_arch_private_info and ptid_of_lwp.
3903
88e2cf7e
YQ
39042015-08-25 Yao Qi <yao.qi@linaro.org>
3905
3906 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3907 Find proc_info by find_process_pid. All callers updated.
3908
5e35436e
YQ
39092015-08-25 Yao Qi <yao.qi@linaro.org>
3910
3911 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3912 Remove.
3913 (debug_reg_change_callback): Remove.
3914 (aarch64_notify_debug_reg_change): Remove.
3915
4a8a7965
YQ
39162015-08-25 Yao Qi <yao.qi@linaro.org>
3917
3918 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3919 Call current_lwp_ptid.
3920
32a271ee
YQ
39212015-08-25 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-aarch64-low.c (debug_reg_change_callback): Use
3924 debug_printf.
3925
0d51c8d7
YQ
39262015-08-25 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3929
31a43dd5
YQ
39302015-08-25 Yao Qi <yao.qi@linaro.org>
3931
3932 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3933
8ee52567
YQ
39342015-08-25 Yao Qi <yao.qi@linaro.org>
3935
3936 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3937 the code.
3938
ff3f0f45
YQ
39392015-08-25 Yao Qi <yao.qi@linaro.org>
3940
3941 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3942 Remove.
3943 (debug_reg_change_callback): Remove argument entry and add argument
3944 lwp. Remove local variable thread. Don't print thread id in the
3945 debugging output. Don't check whether pid of thread equals to pid.
3946 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3947 iterate_over_lwps instead find_inferior.
3948
3d40fbb5
PA
39492015-08-24 Pedro Alves <palves@redhat.com>
3950
3951 * inferiors.c (get_first_process): New function.
3952 * inferiors.h (get_first_process): New declaration.
3953 * remote-utils.c (read_ptid): Default to the first process in the
3954 list, instead of to the current thread's process.
3955
438e1e42
PA
39562015-08-24 Pedro Alves <palves@redhat.com>
3957
3958 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3959 * event-loop.c: Likewise.
3960 * remote-utils.c: Likewise.
3961 * tracepoint.c: Likewise.
3962
a8c6d4fc
PA
39632015-08-24 Pedro Alves <palves@redhat.com>
3964
3965 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3966 ptid_get_lwp.
3967
99b0bb12
PA
39682015-08-21 Pedro Alves <palves@redhat.com>
3969
3970 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3971 instead of literal 1.
3972
f8904751
PA
39732015-08-21 Pedro Alves <palves@redhat.com>
3974
3975 * tdesc.c (default_description): Explicitly zero-initialize.
3976
465a859e
PA
39772015-08-21 Pedro Alves <palves@redhat.com>
3978
3979 PR gdb/18749
3980 * inferiors.c (remove_thread): Discard any pending stop reply for
3981 this thread.
3982 * server.c (remove_all_on_match_pid): Rename to ...
3983 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3984 instead of a pid.
3985 (discard_queued_stop_replies): Change parameter to a ptid. Now
3986 extern.
3987 (handle_v_kill, kill_inferior_callback, captured_main)
3988 (process_serial_event): Adjust.
3989 * server.h (discard_queued_stop_replies): Declare.
3990
f0db101d
PA
39912015-08-21 Pedro Alves <palves@redhat.com>
3992
3993 * linux-low.c (wait_for_sigstop): Always switch to no thread
3994 selected if the previously current thread dies.
3995 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3996 process instead of the current thread's.
3997 * remote-utils.c (input_interrupt): Don't check if there's no
3998 current thread.
3999 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4000 current thread to the general thread fails, error out.
4001 (handle_qxfer_auxv, handle_qxfer_libraries)
4002 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4003 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4004 (handle_query): Check if there's a thread selected instead of
4005 checking whether there's any thread in the thread list.
4006 (handle_qxfer_threads, handle_qxfer_btrace)
4007 (handle_qxfer_btrace_conf): Don't error out early if there's no
4008 thread in the thread list.
4009 (handle_v_cont, myresume): Don't set the current thread to the
4010 continue thread.
4011 (process_serial_event) <Hg handling>: Also set thread_id if the
4012 previous general thread is still alive.
4013 (process_serial_event) <g/G handling>: If setting the current
4014 thread to the general thread fails, error out.
4015 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4016 thread's lwp instead of the current thread's.
4017 * target.c (set_desired_thread): If the desired thread was not
4018 found, leave the current thread pointing to NULL. Return an int
4019 (boolean) indicating success.
4020 * target.h (set_desired_thread): Change return type to int.
4021
40045d91
MF
40222015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4023
4024 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4025 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4026 #includes.
4027 (ps_get_thread_area): New function.
4028
45face3b
GB
40292015-08-19 Gary Benson <gbenson@redhat.com>
4030
4031 * hostio.c (handle_pread): Do not attempt to read more data
4032 than hostio_reply_with_data can fit in a packet.
4033
16d5f642
JB
40342015-08-18 Joel Brobecker <brobecker@adacore.com>
4035
4036 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4037
a738da3a
MF
40382015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4039
4040 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4041
33ebda9d
PA
40422015-08-06 Pedro Alves <palves@redhat.com>
4043
4044 * tracepoint.c (expr_eval_result): Now an int.
4045
a44892be
PA
40462015-08-06 Pedro Alves <palves@redhat.com>
4047
4048 * gdbthread.h (struct regcache): Forward declare.
4049 (struct thread_info) <regcache_data>: Now a struct regcache
4050 pointer.
4051 * inferiors.c (inferior_regcache_data)
4052 (set_inferior_regcache_data): Now work with struct regcache
4053 pointers.
4054 * inferiors.h (struct regcache): Forward declare.
4055 (inferior_regcache_data, set_inferior_regcache_data): Now work
4056 with struct regcache pointers.
4057 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4058 (free_register_cache_thread): Remove struct regcache pointer
4059 casts.
4060
608a1e46
PA
40612015-08-06 Pedro Alves <palves@redhat.com>
4062
4063 * server.c (captured_main): On error, print the exception message
4064 to stderr, and if run_once is set, throw a quit.
4065
f0ce0d3a
PA
40662015-08-06 Pedro Alves <palves@redhat.com>
4067
4068 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4069 the current thread.
4070
bf47e248
PA
40712015-08-06 Pedro Alves <palves@redhat.com>
4072
4073 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4074 reading beyond the passed in buffer length.
4075
b6b9ffcc
PL
40762015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4077
4078 * tracepoint.c (symbol_list) <required>: Remove.
4079
863d01bd
PA
40802015-08-06 Pedro Alves <palves@redhat.com>
4081
4082 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4083 count if stopping and suspending threads.
4084 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4085 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4086 (linux_detach): Complete an ongoing step-over.
4087 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4088 throughout.
4089 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4090 (linux_wait_1): If passing a signal to the inferior after
4091 finishing a step-over, unsuspend and re-resume all lwps. If we
4092 see a single-step event but the thread should be continuing, don't
4093 pass the trap to gdb.
4094 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4095 internal_error instead of gdb_assert.
4096 (enqueue_pending_signal): New function.
4097 (check_ptrace_stopped_lwp_gone): Add debug output.
4098 (start_step_over): Use internal_error instead of gdb_assert.
4099 (complete_ongoing_step_over): New function.
4100 (linux_resume_one_thread): Don't resume a suspended thread.
4101 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4102 it stepping.
4103
00db26fa
PA
41042015-08-06 Pedro Alves <palves@redhat.com>
4105
4106 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4107 (linux_thread_alive): Use lwp_is_marked_dead.
4108 (extended_event_reported): Delete.
4109 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4110 instead of extended_event_reported.
4111 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4112 as well.
4113 (lwp_is_marked_dead): New function.
4114 (lwp_running): Use lwp_is_marked_dead.
4115 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4116 comment.
4117
ad071a30
PA
41182015-08-06 Pedro Alves <palves@redhat.com>
4119
4120 * linux-low.c (linux_wait_1): Move fork event output out of the
4121 !report_to_gdb check. Pass event_child->waitstatus to
4122 target_waitstatus_to_string instead of ourstatus.
4123
524b57e6
YQ
41242015-08-04 Yao Qi <yao.qi@linaro.org>
4125
4126 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4127 if current_thread is 32 bit.
4128
6085d6f6
YQ
41292015-08-04 Yao Qi <yao.qi@linaro.org>
4130
4131 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4132 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4133 * server.c (extended_protocol): Remove "static".
4134 * server.h (extended_protocol): Declare it.
4135
8a7e4587
YQ
41362015-08-04 Yao Qi <yao.qi@linaro.org>
4137
4138 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4139 both aarch64 and aarch32.
4140 (aarch64_set_pc): Likewise.
4141
3b53ae99
YQ
41422015-08-04 Yao Qi <yao.qi@linaro.org>
4143
4144 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4145 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4146 arm-with-neon.xml to srv_xmlfiles.
4147 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4148 (is_64bit_tdesc): New function.
4149 (aarch64_linux_read_description): New function.
4150 (aarch64_arch_setup): Call aarch64_linux_read_description.
4151 (regs_info): Rename to regs_info_aarch64.
4152 (aarch64_regs_info): Return right regs_info.
4153 (initialize_low_arch): Call initialize_low_arch_aarch32.
4154
bd9e6534
YQ
41552015-08-04 Yao Qi <yao.qi@linaro.org>
4156
4157 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4158 * linux-aarch32-low.c: New file.
4159 * linux-aarch32-low.h: New file.
4160 * linux-arm-low.c (arm_fill_gregset): Move it to
4161 linux-aarch32-low.c.
4162 (arm_store_gregset): Likewise.
4163 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4164 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4165 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4166 (regs_info): Rename to regs_info_arm.
4167 (arm_regs_info): Return regs_info_aarch32 if
4168 have_ptrace_getregset is 1 and target description is
4169 arm_with_neon or arm_with_vfpv3.
4170 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4171 Call initialize_low_arch_aarch32 instead.
4172
ded48a5e
YQ
41732015-08-04 Yao Qi <yao.qi@linaro.org>
4174
4175 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4176 * linux-low.c: ... here.
4177 * linux-low.h (have_ptrace_getregset): Declare it.
4178
96e9210f
PA
41792015-08-04 Pedro Alves <palves@redhat.com>
4180
4181 * thread-db.c (struct thread_db): Use new typedefs.
4182 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4183 CHK calls.
4184 (disable_thread_event_reporting): Cast result of dlsym to
4185 destination function pointer type.
4186 (thread_db_mourn): Use td_ta_delete_ftype.
4187
af60a1ef
SL
41882015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4189
4190 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4191 arch variant.
4192 (CDX_BREAKPOINT): Define for R2.
4193 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4194 (the_low_target): Add comments.
4195
e8b41681
YQ
41962015-07-30 Yao Qi <yao.qi@linaro.org>
4197
4198 * linux-arm-low.c (arm_hwcap): Remove it.
4199 (arm_read_description): New local variable arm_hwcap. Don't
4200 set arm_hwcap to zero.
4201
89abb039
YQ
42022015-07-30 Yao Qi <yao.qi@linaro.org>
4203
4204 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4205 Use regcache->tdesc instead.
4206 (arm_store_wmmxregset): Likewise.
4207 (arm_fill_vfpregset): Likewise.
4208 (arm_store_vfpregset): Likewise.
4209
deca266c
YQ
42102015-07-30 Yao Qi <yao.qi@linaro.org>
4211
4212 * linux-arm-low.c: Include arch/arm.h.
4213 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4214 (arm_store_gregset): Likewise.
4215
aa58a496
SM
42162015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4217
4218 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4219 ptrace's 4th parameter.
4220
50904b25
YQ
42212015-07-27 Yao Qi <yao.qi@linaro.org>
4222
4223 * configure.srv (case aarch64*-*-linux*): Don't set
4224 srv_linux_usrregs.
4225
5826e159
PA
42262015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4227
4228 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4229 sys/ptrace.h.
4230 * linux-arm-low.c: Likewise.
4231 * linux-cris-low.c: Likewise.
4232 * linux-crisv32-low.c: Likewise.
4233 * linux-low.c: Likewise.
4234 * linux-m68k-low.c: Likewise.
4235 * linux-mips-low.c: Likewise.
4236 * linux-nios2-low.c: Likewise.
4237 * linux-s390-low.c: Likewise.
4238 * linux-sparc-low.c: Likewise.
4239 * linux-tic6x-low.c: Likewise.
4240 * linux-tile-low.c: Likewise.
4241 * linux-x86-low.c: Likewise.
4242
54019719
PA
42432015-07-24 Pedro Alves <palves@redhat.com>
4244
4245 * config.in: Regenerate.
4246 * configure: Regenerate.
4247
eb7aa561
PA
42482015-07-24 Pedro Alves <palves@redhat.com>
4249
4250 * acinclude.m4: Include ../ptrace.m4.
4251 * configure.ac: Call GDB_AC_PTRACE.
4252 * config.in, configure: Regenerate.
4253
55d7b841
YQ
42542015-07-24 Yao Qi <yao.qi@linaro.org>
4255
4256 * linux-low.c (linux_create_inferior): Remove setting to
4257 proc->priv->new_inferior.
4258 (linux_attach): Likewise.
4259 (linux_low_filter_event): Likewise.
4260 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4261
c06cbd92
YQ
42622015-07-24 Yao Qi <yao.qi@linaro.org>
4263
4264 * linux-low.c (linux_arch_setup): New function.
4265 (linux_low_filter_event): If proc->tdesc is NULL and
4266 proc->attached is true, call the_low_target.arch_setup.
4267 Otherwise, keep status pending, and return.
4268 (linux_resume_one_lwp_throw): Don't call get_pc if
4269 thread->while_stepping isn't NULL. Don't call
4270 get_thread_regcache if proc->tdesc is NULL.
4271 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4272 (linux_target_ops): Install arch_setup.
4273 * server.c (start_inferior): Call the_target->arch_setup.
4274 * target.h (struct target_ops) <arch_setup>: New field.
4275 (target_arch_setup): New marco.
4276 * lynx-low.c (lynx_target_ops): Update.
4277 * nto-low.c (nto_target_ops): Update.
4278 * spu-low.c (spu_target_ops): Update.
4279 * win32-low.c (win32_target_ops): Update.
4280
5ae3ebba
YQ
42812015-07-24 Yao Qi <yao.qi@linaro.org>
4282
4283 * linux-low.c (linux_add_process): Don't set
4284 proc->priv->new_inferior.
4285 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4286 (linux_attach): Likewise.
4287
eb97750b
YQ
42882015-07-24 Yao Qi <yao.qi@linaro.org>
4289
4290 * server.c (start_inferior): Code refactor.
4291
51aee833
YQ
42922015-07-24 Yao Qi <yao.qi@linaro.org>
4293
4294 * server.c (process_serial_event): Set general_thread.
4295
af1b22f3
YQ
42962015-07-21 Yao Qi <yao.qi@linaro.org>
4297
4298 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4299 aarch64_linux_get_debug_reg_capacity.
4300
554717a3
YQ
43012015-07-17 Yao Qi <yao.qi@linaro.org>
4302
4303 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4304 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4305 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4306 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4307 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4308 (AARCH64_HWP_ALIGNMENT): Likewise.
4309 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4310 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4311 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4312 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4313 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4314 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4315 (struct aarch64_debug_reg_state): Likewise.
4316 (struct arch_lwp_info): Likewise.
4317 (aarch64_align_watchpoint): Likewise.
4318 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4319 (aarch64_watchpoint_length): Likewise.
4320 (aarch64_point_encode_ctrl_reg): Likewise
4321 (aarch64_point_is_aligned): Likewise.
4322 (aarch64_align_watchpoint): Likewise.
4323 (aarch64_linux_set_debug_regs):
4324 (aarch64_dr_state_insert_one_point): Likewise.
4325 (aarch64_dr_state_remove_one_point): Likewise.
4326 (aarch64_handle_breakpoint): Likewise.
4327 (aarch64_handle_aligned_watchpoint): Likewise.
4328 (aarch64_handle_unaligned_watchpoint): Likewise.
4329 (aarch64_handle_watchpoint): Likewise.
4330
c67ca4de
YQ
43312015-07-17 Yao Qi <yao.qi@linaro.org>
4332
4333 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4334 and don't aarch64_get_debug_reg_state. All callers update.
4335 (aarch64_handle_aligned_watchpoint): Likewise.
4336 (aarch64_handle_unaligned_watchpoint): Likewise.
4337 (aarch64_handle_watchpoint): Likewise.
4338 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4339 (aarch64_remove_point): Likewise.
4340
25abf979
YQ
43412015-07-17 Yao Qi <yao.qi@linaro.org>
4342
4343 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4344 debug_printf.
4345 (aarch64_handle_unaligned_watchpoint): Likewise.
4346
db1ff28b
JK
43472015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4348
4349 Revert the previous 3 commits:
4350 Move gdb_regex* to common/
4351 Move linux_find_memory_regions_full & co.
4352 gdbserver build-id attribute generator
4353
700ca40f
JK
43542015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4355 Jan Kratochvil <jan.kratochvil@redhat.com>
4356
4357 gdbserver build-id attribute generator.
4358 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4359 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4360 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4361 (find_phdr): New.
4362 (get_dynamic): Use find_pdhr to traverse program headers.
4363 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4364 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4365 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4366 (get_hex_build_id): New.
4367 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4368 to reply XML document.
4369
9904185c
JK
43702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4371 Jan Kratochvil <jan.kratochvil@redhat.com>
4372
4373 * target.c: Include target/target-utils.h and fcntl.h.
4374 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4375 (target_fileio_read_stralloc): New functions.
4376
6e5b4429
JK
43772015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4378
4379 * Makefile.in (OBS): Add gdb_regex.o.
4380 (gdb_regex.o): New.
4381 * config.in: Rebuilt.
4382 * configure: Rebuilt.
4383
ddc98fbf
JK
43842015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4385 Jan Kratochvil <jan.kratochvil@redhat.com>
4386
4387 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4388 * Makefile.in (OBS): Add target-utils.o.
4389 (linux-maps.o, target-utils.o): New.
4390 * configure.srv (srv_linux_obj): Add linux-maps.o.
4391
e57bb7a0
PL
43922015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4393
4394 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4395 function, return 1.
4396 (the_low_target): Install it.
4397
586b02a9
PA
43982015-07-14 Pedro Alves <palves@redhat.com>
4399
4400 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4401 Instead, ignore ECHILD, and throw an error for other errnos.
4402
58c1b36c
PA
44032015-07-10 Pedro Alves <palves@redhat.com>
4404
4405 * event-loop.c (struct callback_event) <data>: Change type to
4406 gdb_client_data instance instead of gdb_client_data pointer.
4407 (append_callback_event): Adjust.
4408
421530db
PL
44092015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4410
4411 * linux-aarch64-low.c: Add comments for each linux_target_ops
4412 method. Remove comments already covered in target_ops and
4413 linux_target_ops definitions.
4414 (the_low_target): Add comments for each unimplemented method.
4415
c2d65f38
YQ
44162015-07-09 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-aarch64-low.c (aarch64_regmap): Remove.
4419 (aarch64_usrregs_info): Remove.
4420 (regs_info): Set field usrregs to NULL.
4421
b20a6524
MM
44222015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4423
4424 * linux-low.c: Include "rsp-low.h"
4425 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4426 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4427 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4428 (handle_btrace_enable_pt): New.
4429 (handle_btrace_general_set): Support "pt".
4430 (handle_btrace_conf_general_set): Support "pt:size".
4431
96c97461
PL
44322015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4433
4434 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4435 Z_PACKET_SW_BP.
4436
37d66942
PL
44372015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4438
4439 * linux-aarch64-low.c: Remove comment about endianness.
4440 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4441 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4442 memcmp.
4443
dc06243f
GB
44442015-06-24 Gary Benson <gbenson@redhat.com>
4445
4446 * linux-i386-ipa.c (stdint.h): Do not include.
4447 * lynx-i386-low.c (stdint.h): Likewise.
4448 * lynx-ppc-low.c (stdint.h): Likewise.
4449 * mem-break.c (stdint.h): Likewise.
4450 * thread-db.c (stdint.h): Likewise.
4451 * tracepoint.c (stdint.h): Likewise.
4452 * win32-low.c (stdint.h): Likewise.
4453
124e13d9
SM
44542015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4455
4456 * server.c (write_qxfer_response): Update call to
4457 remote_escape_output.
4458
909c2cda
JK
44592015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4460 Jan Kratochvil <jan.kratochvil@redhat.com>
4461
4462 Merge multiple hex conversions.
4463 * gdbreplay.c (tohex): Rename to 'fromhex'.
4464 (logchar): Use fromhex.
4465
24c05f46
JK
44662015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4467
4468 * server.c (handle_qxfer_libraries): Set `version' attribute for
4469 <library-list>.
4470
14d2069a
GB
44712015-06-10 Gary Benson <gbenson@redhat.com>
4472
4473 * target.h (struct target_ops) <multifs_open>: New field.
4474 <multifs_unlink>: Likewise.
4475 <multifs_readlink>: Likewise.
4476 * linux-low.c (nat/linux-namespaces.h): New include.
4477 (linux_target_ops): Initialize the_target->multifs_open,
4478 the_target->multifs_unlink and the_target->multifs_readlink.
4479 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4480 * hostio.c (hostio_fs_pid): New static variable.
4481 (hostio_handle_new_gdb_connection): New function.
4482 (handle_setfs): Likewise.
4483 (handle_open): Use the_target->multifs_open as appropriate.
4484 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4485 (handle_readlink): Use the_target->multifs_readlink as
4486 appropriate.
4487 (handle_vFile): Handle vFile:setfs packets.
4488 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4489 after target_handle_new_gdb_connection.
4490
4b8b5e72
GB
44912015-06-10 Gary Benson <gbenson@redhat.com>
4492
4493 * configure.ac (AC_CHECK_FUNCS): Add setns.
4494 * config.in: Regenerate.
4495 * configure: Likewise.
4496 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4497 (linux-namespaces.o): New rule.
4498 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4499
3ac2e371
GB
45002015-06-09 Gary Benson <gbenson@redhat.com>
4501
4502 * hostio.c (handle_open): Process mode argument with
4503 fileio_to_host_mode.
4504
ca9b78ce
YQ
45052015-06-01 Yao Qi <yao.qi@linaro.org>
4506
4507 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4508 * linux-x86-low.c: Likewise.
4509
bfacd19d
DB
45102015-05-28 Don Breazeal <donb@codesourcery.com>
4511
4512 * linux-low.c (handle_extended_wait): Initialize
4513 thread_info.last_resume_kind for new fork children.
4514
452003ef
PA
45152015-05-15 Pedro Alves <palves@redhat.com>
4516
4517 * target.h (target_handle_new_gdb_connection): Rewrite using if
4518 wrapped in do/while.
4519
1041a03c
JB
45202015-05-14 Joel Brobecker <brobecker@adacore.com>
4521
4522 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4523 * configure, config.in: Regenerate.
4524 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4525 Declare typedef.
4526
c269dbdb
DB
45272015-05-12 Don Breazeal <donb@codesourcery.com>
4528
4529 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4530 PTRACE_EVENT_VFORK_DONE.
4531 (linux_low_ptrace_options, extended_event_reported): Add vfork
4532 events.
4533 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4534 and "vforkdone" for RSP 'T' Stop Reply Packet.
4535 * server.h (report_vfork_events): Declare
4536 global variable.
4537
3a8a0396
DB
45382015-05-12 Don Breazeal <donb@codesourcery.com>
4539
4540 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4541 (the_low_target) <new_fork>: Initialize new member.
4542 * linux-arm-low.c (arm_new_fork): New function.
4543 (the_low_target) <new_fork>: Initialize new member.
4544 * linux-low.c (handle_extended_wait): Call new target function
4545 new_fork.
4546 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4547 * linux-mips-low.c (mips_add_watchpoint): New function
4548 extracted from mips_insert_point.
4549 (the_low_target) <new_fork>: Initialize new member.
4550 (mips_linux_new_fork): New function.
4551 (mips_insert_point): Call mips_add_watchpoint.
4552 * linux-x86-low.c (x86_linux_new_fork): New function.
4553 (the_low_target) <new_fork>: Initialize new member.
4554
de0d863e
DB
45552015-05-12 Don Breazeal <donb@codesourcery.com>
4556
4557 * linux-low.c (handle_extended_wait): Implement return value,
4558 rename argument 'event_child' to 'event_lwp', handle
4559 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4560 (linux_low_ptrace_options): New function.
4561 (linux_low_filter_event): Call linux_low_ptrace_options,
4562 use different argument fo linux_enable_event_reporting,
4563 use return value from handle_extended_wait.
4564 (extended_event_reported): New function.
4565 (linux_wait_1): Call extended_event_reported and set
4566 status to report fork events.
4567 (linux_write_memory): Add pid to debug message.
4568 (reset_lwp_ptrace_options_callback): New function.
4569 (linux_handle_new_gdb_connection): New function.
4570 (linux_target_ops): Initialize new structure member.
4571 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4572 * lynx-low.c: Initialize new structure member.
4573 * remote-utils.c (prepare_resume_reply): Implement stop reason
4574 "fork" for "T" stop message.
4575 * server.c (handle_query): Call handle_new_gdb_connection.
4576 * server.h (report_fork_events): Declare global flag.
4577 * target.h (struct target_ops) <handle_new_gdb_connection>:
4578 New member.
4579 (target_handle_new_gdb_connection): New macro.
4580 * win32-low.c: Initialize new structure member.
4581
ddcbc397
DB
45822015-05-12 Don Breazeal <donb@codesourcery.com>
4583
4584 * mem-break.c (APPEND_TO_LIST): Define macro.
4585 (clone_agent_expr): New function.
4586 (clone_one_breakpoint): New function.
4587 (clone_all_breakpoints): New function.
4588 * mem-break.h: Declare new functions.
4589
89245bc0
DB
45902015-05-12 Don Breazeal <donb@codesourcery.com>
4591
4592 * linux-low.c (linux_supports_fork_events): New function.
4593 (linux_supports_vfork_events): New function.
4594 (linux_target_ops): Initialize new structure members.
4595 (initialize_low): Call linux_check_ptrace_features.
4596 * lynx-low.c (lynx_target_ops): Initialize new structure
4597 members.
4598 * server.c (report_fork_events, report_vfork_events):
4599 New global flags.
4600 (handle_query): Add new features to qSupported packet and
4601 response.
4602 (captured_main): Initialize new global variables.
4603 * target.h (struct target_ops) <supports_fork_events>:
4604 New member.
4605 <supports_vfork_events>: New member.
4606 (target_supports_fork_events): New macro.
4607 (target_supports_vfork_events): New macro.
4608 * win32-low.c (win32_target_ops): Initialize new structure
4609 members.
4610
835205d0
GB
46112015-05-12 Gary Benson <gbenson@redhat.com>
4612
4613 * server.c (handle_qxfer_exec_file): Use current process
4614 if annex is empty.
4615
21e94bd9
SL
46162015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4617
4618 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4619 Remove HAVE_PTRACE_GETREGS conditionals.
4620 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4621 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4622
45614f15
YQ
46232015-05-08 Yao Qi <yao.qi@linaro.org>
4624
4625 * linux-low.c (linux_supports_conditional_breakpoints): New
4626 function.
4627 (linux_target_ops): Install new target method.
4628 * lynx-low.c (lynx_target_ops): Install NULL hook for
4629 supports_conditional_breakpoints.
4630 * nto-low.c (nto_target_ops): Likewise.
4631 * spu-low.c (spu_target_ops): Likewise.
4632 * win32-low.c (win32_target_ops): Likewise.
4633 * server.c (handle_query): Check
4634 target_supports_conditional_breakpoints.
4635 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4636 New field.
4637 (target_supports_conditional_breakpoints): New macro.
4638
80ad801e
PA
46392015-05-06 Pedro Alves <palves@redhat.com>
4640
4641 PR server/18081
4642 * server.c (start_inferior): If the process exits, mourn it.
4643
819843c7
GB
46442015-04-21 Gary Benson <gbenson@redhat.com>
4645
4646 * hostio.c (fileio_open_flags_to_host): Factored out to
4647 fileio_to_host_openflags in common/fileio.c. Single use
4648 updated.
4649
a2d5a9d7
MF
46502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4651
4652 * linux-xtensa-low.c (xtensa_fill_gregset)
4653 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4654 XCHAL_HAVE_LOOP.
4655
deb44829
MF
46562015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4657
4658 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4659 (regs_info): Replace usrregs pointer with NULL.
4660
e57f1de3
GB
46612015-04-17 Gary Benson <gbenson@redhat.com>
4662
4663 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4664 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4665 * server.c (handle_qxfer_exec_file): New function.
4666 (qxfer_packets): Add exec-file entry.
4667 (handle_query): Report qXfer:exec-file:read as supported packet.
4668
62828379
RN
46692015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4670
4671 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4672
b88bb450
GB
46732015-04-09 Gary Benson <gbenson@redhat.com>
4674
4675 * hostio-errno.c (errno_to_fileio_error): Remove function.
4676 Update caller to use remote_fileio_to_fio_error.
4677
c8f4bfdd
YQ
46782015-04-09 Yao Qi <yao.qi@linaro.org>
4679
4680 * linux-low.c (linux_insert_point): Call
4681 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4682 (linux_remove_point): Call remove_memory_breakpoint if type is
4683 raw_bkpt_type_sw.
4684 * linux-x86-low.c (x86_insert_point): Don't call
4685 insert_memory_breakpoint.
4686 (x86_remove_point): Don't call remove_memory_breakpoint.
4687
41f98f02
PA
46882015-04-01 Pedro Alves <palves@redhat.com>
4689 Cleber Rosa <crosa@redhat.com>
4690
4691 * server.c (gdbserver_usage): Reorganize and extend the usage
4692 message.
4693
2bf6fb9d
PA
46942015-03-24 Pedro Alves <palves@redhat.com>
4695
4696 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4697 output. Also dump TRAP_TRACE.
4698 (linux_low_filter_event): In debug output, distinguish a
4699 resume_stop SIGSTOP from a delayed SIGSTOP.
4700
369f6daa
GB
47012015-03-24 Gary Benson <gbenson@redhat.com>
4702
4703 * linux-x86-low.c (x86_linux_new_thread): Moved to
4704 nat/x86-linux.c.
4705 (x86_linux_prepare_to_resume): Likewise.
4706
8e5d4070
GB
47072015-03-24 Gary Benson <gbenson@redhat.com>
4708
4709 * Makefile.in (x86-linux-dregs.o): New rule.
4710 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4711 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4712 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4713 (x86_linux_dr_get): Likewise.
4714 (x86_linux_dr_set): Likewise.
4715 (update_debug_registers_callback): Likewise.
4716 (x86_linux_dr_set_addr): Likewise.
4717 (x86_linux_dr_get_addr): Likewise.
4718 (x86_linux_dr_set_control): Likewise.
4719 (x86_linux_dr_get_control): Likewise.
4720 (x86_linux_dr_get_status): Likewise.
4721 (x86_linux_update_debug_registers): Likewise.
4722
2b95d440
GB
47232015-03-24 Gary Benson <gbenson@redhat.com>
4724
4725 * linux-x86-low.c (x86_linux_update_debug_registers):
4726 New function, factored out from...
4727 (x86_linux_prepare_to_resume): ...this.
4728
14b0bc68
GB
47292015-03-24 Gary Benson <gbenson@redhat.com>
4730
4731 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4732 (x86_linux_dr_set): Likewise.
4733 (update_debug_registers_callback): Likewise.
4734 (x86_linux_dr_set_addr): Likewise.
4735 (x86_linux_dr_get_addr): Likewise.
4736 (x86_linux_dr_set_control): Likewise.
4737 (x86_linux_dr_get_control): Likewise.
4738 (x86_linux_dr_get_status): Likewise.
4739 (x86_linux_prepare_to_resume): Likewise.
4740
5dfe6ca8
GB
47412015-03-24 Gary Benson <gbenson@redhat.com>
4742
4743 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4744 Use perror_with_name. Pass string through gettext.
4745 (x86_linux_dr_set): Likewise.
4746
d33472ad
GB
47472015-03-24 Gary Benson <gbenson@redhat.com>
4748
4749 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4750 (x86_linux_dr_set_addr): ...this.
4751 (x86_dr_low_get_addr): Rename to...
4752 (x86_linux_dr_get_addr): ...this.
4753 (x86_dr_low_set_control): Rename to...
4754 (x86_linux_dr_set_control): ...this.
4755 (x86_dr_low_get_control): Rename to...
4756 (x86_linux_dr_get_control): ...this.
4757 (x86_dr_low_get_status): Rename to...
4758 (x86_linux_dr_get_status): ...this.
4759 (x86_dr_low): Update with new function names.
4760
4b134ca1
GB
47612015-03-24 Gary Benson <gbenson@redhat.com>
4762
4763 * Makefile.in (x86-linux.o): New rule.
4764 * configure.srv: Add x86-linux.o to relevant targets.
4765 * linux-low.c (lwp_set_arch_private_info): New function.
4766 (lwp_arch_private_info): Likewise.
4767 * linux-x86-low.c: Include nat/x86-linux.h.
4768 (arch_lwp_info): Removed structure.
4769 (update_debug_registers_callback):
4770 Use lwp_set_debug_registers_changed.
4771 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4772 and lwp_set_debug_registers_changed.
4773 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4774
34c703da
GB
47752015-03-24 Gary Benson <gbenson@redhat.com>
4776
4777 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4778 * linux-arm-low.c (arm_new_thread): Likewise.
4779 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4780 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4781 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4782 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4783
cff068da
GB
47842015-03-24 Gary Benson <gbenson@redhat.com>
4785
4786 * linux-low.c (ptid_of_lwp): New function.
4787 (lwp_is_stopped): Likewise.
4788 (lwp_stop_reason): Likewise.
4789 * linux-x86-low.c (update_debug_registers_callback):
4790 Use lwp_is_stopped.
4791 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4792 lwp_stop_reason.
4793
b2f7c7e8
GB
47942015-03-24 Gary Benson <gbenson@redhat.com>
4795
4796 * linux-low.h (linux_stop_lwp): Remove declaration.
4797
6d4ee8c6
GB
47982015-03-24 Gary Benson <gbenson@redhat.com>
4799
4800 * linux-low.h: Include nat/linux-nat.h.
4801 * linux-low.c (iterate_over_lwps_args): New structure.
4802 (iterate_over_lwps_filter): New function.
4803 (iterate_over_lwps): Likewise.
4804 * linux-x86-low.c (update_debug_registers_callback):
4805 Update signature to what iterate_over_lwps expects.
4806 Remove PID check that iterate_over_lwps now performs.
4807 (x86_dr_low_set_addr): Use iterate_over_lwps.
4808 (x86_dr_low_set_control): Likewise.
4809
70a0bb6b
GB
48102015-03-24 Gary Benson <gbenson@redhat.com>
4811
4812 * linux-x86-low.c (x86_debug_reg_state): New function.
4813 (x86_linux_prepare_to_resume): Use the above.
4814
7b669087
GB
48152015-03-24 Gary Benson <gbenson@redhat.com>
4816
4817 * linux-low.c (current_lwp_ptid): New function.
4818 * linux-x86-low.c: Include nat/linux-nat.h.
4819 (x86_dr_low_get_addr): Use current_lwp_ptid.
4820 (x86_dr_low_get_control): Likewise.
4821 (x86_dr_low_get_status): Likewise.
4822
eef49a3d
PA
48232015-03-20 Pedro Alves <palves@redhat.com>
4824
4825 * tracepoint.c (cmd_qtstatus): Make "str" const.
4826
b2333d22
PA
48272015-03-20 Pedro Alves <palves@redhat.com>
4828
4829 * server.c (handle_general_set): Make "req_str" const.
4830
23f238d3
PA
48312015-03-19 Pedro Alves <palves@redhat.com>
4832
4833 * linux-low.c (linux_resume_one_lwp): Rename to ...
4834 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4835 instead call perror_with_name.
4836 (check_ptrace_stopped_lwp_gone): New function.
4837 (linux_resume_one_lwp): Reimplement as wrapper around
4838 linux_resume_one_lwp_throw that swallows errors if the LWP is
4839 gone.
4840
91baf43f
PA
48412015-03-19 Pedro Alves <palves@redhat.com>
4842
4843 * linux-low.c (count_events_callback, select_event_lwp_callback):
4844 No longer check whether the thread has resume_stop as last resume
4845 kind.
4846
8bf3b159
PA
48472015-03-19 Pedro Alves <palves@redhat.com>
4848
4849 * linux-low.c (count_events_callback, select_event_lwp_callback):
4850 Use the lwp's status_pending_p field, not the thread's.
4851
b90fc188
PA
48522015-03-19 Pedro Alves <palves@redhat.com>
4853
4854 * linux-low.c (select_event_lwp_callback): Update comments to
4855 no longer mention SIGTRAP.
4856
464b0089
GB
48572015-03-18 Gary Benson <gbenson@redhat.com>
4858
4859 * server.c (handle_query): Do not report vFile:fstat as supported.
4860
aa9e327f
GB
48612015-03-11 Gary Benson <gbenson@redhat.com>
4862
4863 * hostio.c (sys/types.h): New include.
4864 (sys/stat.h): Likewise.
4865 (common-remote-fileio.h): Likewise.
4866 (handle_fstat): New function.
4867 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4868
791c0056
GB
48692015-03-11 Gary Benson <gbenson@redhat.com>
4870
4871 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4872 struct stat.st_blocks and struct stat.st_blksize.
4873 * configure: Regenerate.
4874 * config.in: Likewise.
4875 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4876 (OBS): Add common-remote-fileio.o.
4877 (common-remote-fileio.o): New rule.
4878
9a9df970
PA
48792015-03-09 Pedro Alves <palves@redhat.com>
4880
4881 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4882 'struct sockaddr' pointer in 'accept' call.
4883
9eb1356e
PA
48842015-03-09 Pedro Alves <palves@redhat.com>
4885
4886 Revert:
4887 2015-03-07 Pedro Alves <palves@redhat.com>
4888 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4889 or <winsock2.h> here. Instead include "gdb_socket.h".
4890 (remote_open): Use union gdb_sockaddr_u.
4891 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4892 or <winsock2.h> here. Instead include "gdb_socket.h".
4893 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4894 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4895 or <sys/un.h>.
4896 (init_named_socket, gdb_agent_helper_thread): Use union
4897 gdb_sockaddr_u.
4898
aac331e4
PA
48992015-03-07 Pedro Alves <palves@redhat.com>
4900
4901 * configure.ac (build_warnings): Move
4902 -Wdeclaration-after-statement to the C-specific set.
4903 * configure: Regenerate.
4904
366c75fc
PA
49052015-03-07 Pedro Alves <palves@redhat.com>
4906
4907 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4908 or <winsock2.h> here. Instead include "gdb_socket.h".
4909 (remote_open): Use union gdb_sockaddr_u.
4910 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4911 or <winsock2.h> here. Instead include "gdb_socket.h".
4912 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4913 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4914 or <sys/un.h>.
4915 (init_named_socket, gdb_agent_helper_thread): Use union
4916 gdb_sockaddr_u.
4917
492d29ea
PA
49182015-03-07 Pedro Alves <palves@redhat.com>
4919
4920 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4921 instead.
4922
60a191ed
YQ
49232015-03-06 Yao Qi <yao.qi@linaro.org>
4924
4925 * linux-aarch64-low.c (aarch64_insert_point): Use
4926 show_debug_regs as a boolean.
4927 (aarch64_remove_point): Likewise.
4928
f5771b1d
PA
49292015-03-05 Pedro Alves <palves@redhat.com>
4930
4931 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4932 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4933 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4934 * nto-low.c (nto_target_ops): Likewise.
4935 * spu-low.c (spu_target_ops): Likewise.
4936 * win32-low.c (win32_target_ops): Likewise.
4937
3e572f71
PA
49382015-03-04 Pedro Alves <palves@redhat.com>
4939
72f4393d 4940 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4941 Decide whether a breakpoint triggered based on the SIGTRAP's
4942 siginfo.si_code.
72f4393d
L
4943 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4944 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4945 (linux_low_filter_event): Check for breakpoints before checking
4946 watchpoints.
4947 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4948 siginfo.si_code.
72f4393d
L
4949 (linux_stopped_by_sw_breakpoint)
4950 (linux_supports_stopped_by_sw_breakpoint)
4951 (linux_stopped_by_hw_breakpoint)
4952 (linux_supports_stopped_by_hw_breakpoint): New functions.
4953 (linux_target_ops): Install new target methods.
3e572f71 4954
1ec68e26
PA
49552015-03-04 Pedro Alves <palves@redhat.com>
4956
4957 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4958 * server.c (swbreak_feature, hwbreak_feature): New globals.
4959 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4960 (captured_main): Clear swbreak_feature and hwbreak_feature.
4961 * server.h (swbreak_feature, hwbreak_feature): Declare.
4962 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4963 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4964 supports_stopped_by_hw_breakpoint>: New fields.
4965 (target_supports_stopped_by_sw_breakpoint)
4966 (target_stopped_by_sw_breakpoint)
4967 (target_supports_stopped_by_hw_breakpoint)
4968 (target_stopped_by_hw_breakpoint): Declare.
4969
15c66dd6
PA
49702015-03-04 Pedro Alves <palves@redhat.com>
4971
4972 enum lwp_stop_reason -> enum target_stop_reason
4973 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4974 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4975 (linux_wait_1, stuck_in_jump_pad_callback)
4976 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4977 (linux_stopped_by_watchpoint):
4978 * linux-low.h (enum lwp_stop_reason): Delete.
4979 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4980 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4981
98fc70d6
YQ
49822015-03-04 Yao Qi <yao.qi@linaro.org>
4983
4984 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4985
dd2ac174
GB
49862015-03-03 Gary Benson <gbenson@redhat.com>
4987
4988 * hostio.c (handle_vFile): Fix prefix lengths.
4989
d68e53f4
MM
49902015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4991
4992 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4993 ptr_bits.
4994
bf2d68ab
AA
49952015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4996
4997 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4998 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4999 (clean): Add "rm -f" for above C files.
5000 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5001 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5002 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5003 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5004 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5005 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5006 (init_registers_s390x_vx_linux64)
5007 (init_registers_s390x_tevx_linux64)
5008 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5009 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5010 declarations.
5011 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5012 (s390_store_vxrs_high): New functions.
5013 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5014 NT_S390_VXRS_HIGH.
5015 (s390_arch_setup): Add logic for selecting one of the new target
5016 descriptions. Activate the new vector regsets if applicable.
5017 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5018 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5019 and init_registers_s390x_tevx_linux64.
5020
c966a859
PA
50212015-03-01 Pedro Alves <palves@redhat.com>
5022
5023 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5024 parameter.
5025
4180215b
PA
50262015-02-27 Pedro Alves <palves@redhat.com>
5027
5028 * linux-x86-low.c (u_debugreg_offset): New function.
5029 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5030
749bab01
PA
50312015-02-27 Pedro Alves <palves@redhat.com>
5032
5033 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5034 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5035 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5036 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5037 (ps_lsetfpregs, ps_getpid)
5038 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5039 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5040 (ps_lsetxregs, ps_plog): Declare.
5041
3c14e5a3
PA
50422015-02-27 Pedro Alves <palves@redhat.com>
5043
5044 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5045 IP_AGENT_EXPORT_FUNC.
5046 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5047 IP_AGENT_EXPORT_FUNC.
5048 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5049 (IP_AGENT_EXPORT): Delete.
5050 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5051 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5052 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5053 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5054 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5055 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5056 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5057 (traceframe_read_count, traceframe_write_count)
5058 (traceframes_created, trace_state_variables, get_raw_reg)
5059 (get_trace_state_variable_value, set_trace_state_variable_value)
5060 (ust_loaded, helper_thread_id, cmd_buf): Use
5061 IPA_SYM_EXPORTED_NAME.
5062 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5063 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5064 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5065 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5066 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5067 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5068 EXTERN_C_PUSH/EXTERN_C_POP.
5069 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5070 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5071 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5072 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5073 (traceframe_write_count, traceframe_read_count)
5074 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5075 (about_to_request_buffer_space, get_trace_state_variable_value)
5076 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5077 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5078 EXTERN_C_PUSH/EXTERN_C_POP.
5079 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5080 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5081 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5082 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5083 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5084 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5085 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5086 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5087 Define.
5088 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5089 (IP_AGENT_EXPORT_VAR_DECL): Define.
5090 (tracing): Declare.
5091 (gdb_agent_get_raw_reg): Declare.
5092
fe978cb0
PA
50932015-02-27 Tom Tromey <tromey@redhat.com>
5094 Pedro Alves <palves@redhat.com>
5095
5096 Rename symbols whose names are reserved C++ keywords throughout.
5097
3bc3d82a
PA
50982015-02-27 Pedro Alves <palves@redhat.com>
5099
5100 * Makefile.in (COMPILER): New, get it from autoconf.
5101 (CXX): Get from autoconf instead.
5102 (COMPILE.pre): Use COMPILER.
5103 (CC-LD): Rename to ...
5104 (CC_LD): ... this. Use COMPILER.
5105 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5106 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5107 * acinclude.m4: Include build-with-cxx.m4.
5108 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5109 Disable -Werror by default if building in C++ mode.
5110 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5111 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5112 the C++ compiler. Save/restore CXXFLAGS too.
5113 * configure: Regenerate.
5114
07697489
PA
51152015-02-27 Pedro Alves <palves@redhat.com>
5116
5117 * acinclude.m4: Include libiberty.m4.
5118 * configure.ac: Call libiberty_INIT.
5119 * config.in, configure: Regenerate.
5120
9beb7c4e
PA
51212015-02-26 Pedro Alves <palves@redhat.com>
5122
5123 * linux-low.c (linux_wait_1): When incrementing the PC past a
5124 program breakpoint always use the_low_target.breakpoint_len as
5125 increment, rather than the maximum between that and
5126 the_low_target.decr_pc_after_break.
5127
8090aef2
PA
51282015-02-23 Pedro Alves <palves@redhat.com>
5129
5130 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5131 thread was doing a step-over; always adjust the PC if
5132 we stepped over a permanent breakpoint.
5133 (linux_wait_1): If we stepped over breakpoint that was on top of a
5134 permanent breakpoint, manually advance the PC past it.
5135
bc9540e8
PA
51362015-02-23 Pedro Alves <palves@redhat.com>
5137
5138 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5139 modes.
5140 (x86_fill_gregset, x86_store_gregset): Use it when handling
5141 $orig_eax.
5142
2db9a427
PA
51432015-02-20 Pedro Alves <palves@redhat.com>
5144
5145 * thread-db.c: Include "nat/linux-procfs.h".
5146 (thread_db_init): Skip listing new threads if the kernel supports
5147 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5148
afa8d396
PA
51492015-02-20 Pedro Alves <palves@redhat.com>
5150
5151 * linux-low.c (status_pending_p_callback): Use ptid_match.
5152
c9587f88
AT
51532015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5154
5155 PR breakpoints/16812
5156 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5157 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5158 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5159
b05ec7a5
AT
51602015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5161
5162 PR breakpoints/15956
5163 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5164
d33501a5
MM
51652015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5166
5167 * linux-low.c (linux_low_btrace_conf): Print size.
5168 * server.c (handle_btrace_conf_general_set): New.
5169 (hanle_general_set): Call handle_btrace_conf_general_set.
5170 (handle_query): Report Qbtrace-conf:bts:size as supported.
5171
f4abbc16
MM
51722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5173
5174 * linux-low.c (linux_low_enable_btrace): Update parameters.
5175 (linux_low_btrace_conf): New.
5176 (linux_target_ops)<to_btrace_conf>: Initialize.
5177 * server.c (current_btrace_conf): New.
5178 (handle_btrace_enable): Rename to ...
5179 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5180 to target_enable_btrace. Update comment. Update users.
5181 (handle_qxfer_btrace_conf): New.
5182 (qxfer_packets): Add btrace-conf entry.
5183 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5184 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5185 (target_ops)<read_btrace_conf>: New.
5186 (target_enable_btrace): Update parameters.
5187 (target_read_btrace_conf): New.
5188
043c3577
MM
51892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5190
5191 * server.c (handle_btrace_general_set): Remove call to
5192 target_supports_btrace.
5193 (supported_btrace_packets): New.
5194 (handle_query): Call supported_btrace_packets.
5195 * target.h: include btrace-common.h.
5196 (btrace_target_info): Removed.
5197 (supports_btrace, target_supports_btrace): Update parameters.
5198
734b0e4b
MM
51992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5200
5201 * Makefile.in (SFILES): Add common/btrace-common.c.
5202 (OBS): Add common/btrace-common.o.
5203 (btrace-common.o): Add build rules.
5204 * linux-low: Include btrace-common.h.
5205 (linux_low_read_btrace): Use struct btrace_data. Call
5206 btrace_data_init and btrace_data_fini.
5207
d6c146e9
PA
52082015-02-06 Pedro Alves <palves@redhat.com>
5209
5210 * thread-db.c (find_new_threads_callback): Add debug output.
5211
20ba1ce6
PA
52122015-02-04 Pedro Alves <palves@redhat.com>
5213
5214 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5215 (resume_stopped_resumed_lwps): New function.
5216 (linux_wait_for_event_filtered): Use it.
5217
8cc73a39
SDJ
52182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5219
5220 * Makefile.in (SFILES): Add linux-personality.c.
5221 (linux-personality.o): New rule.
5222 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5223 list of objects to be built.
5224 * linux-low.c: Include nat/linux-personality.h.
5225 (linux_create_inferior): Remove code to disable address space
5226 randomization (moved to ../nat/linux-personality.c). Create
5227 cleanup to disable address space randomization.
5228
fb23d554
SDJ
52292015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5230
5231 * Makefile.in (posix-strerror.o): New rule.
5232 (mingw-strerror.o): Likewise.
5233 * configure: Regenerated.
5234 * configure.ac: Source file ../common/common.host. Initialize new
5235 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5236
cdf43629
YQ
52372015-01-14 Yao Qi <yao@codesourcery.com>
5238
5239 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5240 (ppc-linux.o): New rule.
5241 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5242 * configure.ac: AC_CHECK_FUNCS(getauxval).
5243 * config.in: Re-generated.
5244 * configure: Re-generated.
5245 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5246 ppc64_64bit_inferior_p
5247
514c5338
YQ
52482015-01-14 Yao Qi <yao@codesourcery.com>
5249
5250 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5251 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5252 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5253 (PT_ORIG_R3, PT_TRAP): Likewise.
5254 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5255 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5256 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5257
3368c1e5
JB
52582015-01-10 Joel Brobecker <brobecker@adacore.com>
5259
5260 * i387-fp.c (i387_cache_to_xsave): In look over
5261 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5262 zmmh_low_space field by use of zmmh_high_space.
5263
582511be
PA
52642015-01-09 Pedro Alves <palves@redhat.com>
5265
5266 * linux-low.c (step_over_bkpt): Move higher up in the file.
5267 (handle_extended_wait): Don't store the stop_pc here.
5268 (get_stop_pc): Adjust comments and rename to ...
5269 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5270 stopped for a software breakpoint or hardware breakpoint.
5271 (thread_still_has_status_pending_p): New function.
5272 (status_pending_p_callback): Use
5273 thread_still_has_status_pending_p. If the event is no longer
5274 interesting, resume the LWP.
5275 (handle_tracepoints): Add assert.
5276 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5277 (wstatus_maybe_breakpoint): New function.
5278 (cancel_breakpoint): Delete function.
5279 (check_stopped_by_watchpoint): New function, factored out from
5280 linux_low_filter_event.
5281 (lp_status_maybe_breakpoint): Delete function.
5282 (linux_low_filter_event): Remove filter_ptid argument.
5283 Leave thread group exits pending here. Store the LWP's stop PC.
5284 Always leave events pending.
5285 (linux_wait_for_event_filtered): Pull all events out of the
5286 kernel, and leave them all pending.
5287 (count_events_callback, select_event_lwp_callback): Consider all
5288 events.
5289 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5290 (select_event_lwp): Only give preference to the stepping LWP in
5291 all-stop mode. Adjust comments.
5292 (ignore_event): New function.
5293 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5294 references to cancel_breakpoints. Adjust to renames. Also give
5295 equal priority to all LWPs that have had events in non-stop mode.
5296 If reporting a software breakpoint event, unadjust the LWP's PC.
5297 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5298 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5299 Adjust.
5300 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5301 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5302 (linux_stopped_by_watchpoint): Adjust.
5303 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5304 * linux-low.h (enum lwp_stop_reason): New.
5305 (struct lwp_info) <stop_pc>: Adjust comment.
5306 <stopped_by_watchpoint>: Delete field.
5307 <stop_reason>: New field.
5308 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5309 * mem-break.c (software_breakpoint_inserted_here)
5310 (hardware_breakpoint_inserted_here): New function.
5311 * mem-break.h (software_breakpoint_inserted_here)
5312 (hardware_breakpoint_inserted_here): Declare.
5313 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5314 (cancel_breakpoints): Delete.
5315 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5316 (upload_fast_traceframes): Remove references to
5317 cancel_breakpoints.
5318
a33e3959
PA
53192015-01-09 Pedro Alves <palves@redhat.com>
5320
5321 * thread-db.c (find_new_threads_callback): Ignore thread if the
5322 kernel thread ID is -1.
5323
8784d563
PA
53242015-01-09 Pedro Alves <palves@redhat.com>
5325
5326 * linux-low.c (linux_attach_fail_reason_string): Move to
5327 nat/linux-ptrace.c, and rename.
5328 (linux_attach_lwp): Update comment.
5329 (attach_proc_task_lwp_callback): New function.
5330 (linux_attach): Adjust to rename and use
5331 linux_proc_attach_tgid_threads.
5332 (linux_attach_fail_reason_string): Delete declaration.
5333
76f2b779
JB
53342015-01-01 Joel Brobecker <brobecker@adacore.com>
5335
5336 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5337 * server.c (gdbserver_version): Likewise.
5338
fafcc06a
SDJ
53392014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5340
5341 * remote-utils.c: Include ctype.h.
5342 (input_interrupt): Explicitly handle the case when the char
5343 received is the NUL byte. Improve the printing of non-ASCII
5344 characters.
5345
beed38b8
JB
53462014-12-16 Joel Brobecker <brobecker@adacore.com>
5347
5348 * linux-low.c (linux_low_filter_event): Update call to
5349 linux_enable_event_reporting following the addition of
5350 a new parameter to that function.
5351
bf330350
CU
53522014-12-16 Catalin Udma <catalin.udma@freescale.com>
5353
5354 PR server/17457
5355 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5356 (AARCH64_FPCR_REGNO): Likewise.
5357 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5358 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5359 (aarch64_store_fpregset): Likewise.
5360
5227d625
JB
53612014-12-15 Joel Brobecker <brobecker@adacore.com>
5362
5363 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5364 Remove FIXME comment about assumption about N.
5365
f93b65a0
JB
53662014-12-13 Joel Brobecker <brobecker@adacore.com>
5367
5368 * configure.ac: If large-file support is disabled in GDBserver,
5369 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5370 * configure: Regenerate.
5371
e5a9158d
AA
53722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5373
5374 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5375 warning upon ENODATA from ptrace.
5376 * linux-s390-low.c (s390_store_tdb): New.
5377 (s390_regsets): Add regset for NT_S390_TDB.
5378
feea5f36
AA
53792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5380
5381 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5382 without a fill_function.
5383 * linux-s390-low.c (s390_fill_last_break): Remove.
5384 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5385 (s390_arch_setup): Use regset's size instead of fill_function for
5386 loop end condition.
5387
098dbe61
AA
53882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5389
5390 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5391 the regset's store function when ptrace returned an error.
5392 * regcache.c (get_thread_regcache): Invalidate register cache
5393 before fetching inferior's registers.
5394
28eef672
AA
53952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5396
5397 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5398 while-loop as for-loop.
5399 (regsets_store_inferior_registers): Likewise.
5400
bdca27a2
YQ
54012014-11-28 Yao Qi <yao@codesourcery.com>
5402
5403 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5404 * config.in, configure: Re-generate.
5405 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5406 is defined.
5407
9c232dda
YQ
54082014-11-21 Yao Qi <yao@codesourcery.com>
5409
5410 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5411 (AC_CHECK_HEADERS): Remove malloc.h.
5412 * configure: Re-generated.
5413 * config.in: Re-generated.
5414 * server.h: Don't include alloca.h and malloc.h.
5415 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5416 Don't include malloc.h.
5417
43968415
JB
54182014-11-17 Joel Brobecker <brobecker@adacore.com>
5419
5420 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5421 corresponding ERRNO check in same block.
5422
40e91bc7
PA
54232014-11-12 Pedro Alves <palves@redhat.com>
5424
5425 * server.c (cont_thread): Update comment.
5426 (start_inferior, attach_inferior): No longer clear cont_thread.
5427 (handle_v_cont): No longer set cont_thread.
5428 (captured_main): Clear cont_thread each time a GDB connects.
5429
c2c118cf
PA
54302014-11-12 Pedro Alves <palves@redhat.com>
5431
5432 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5433 thread, and don't resume all threads if the Hc thread has exited.
5434
78708b7c
PA
54352014-11-12 Pedro Alves <palves@redhat.com>
5436
5437 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5438 the process group instead of to a specific LWP.
5439
a2abc7de
PA
54402014-10-15 Pedro Alves <palves@redhat.com>
5441
5442 PR server/17487
5443 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5444 parameter.
5445 (arm_set_thread_context): Delete.
5446 (the_low_target): Adjust.
5447 * win32-i386-low.c (debug_registers_changed)
5448 (debug_registers_used): Delete.
5449 (update_debug_registers_callback): New function.
5450 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5451 needing to update their debug registers.
5452 (win32_get_current_dr): New function.
5453 (x86_dr_low_get_addr, x86_dr_low_get_control)
5454 (x86_dr_low_get_status): Fetch the debug register from the thread
5455 record's context.
5456 (i386_initial_stuff): Adjust.
5457 (i386_get_thread_context): Remove current_event parameter. Don't
5458 clear debug_registers_changed nor copy DR values to
5459 debug_reg_state.
5460 (i386_set_thread_context): Delete.
5461 (i386_prepare_to_resume): New function.
5462 (i386_thread_added): Mark the thread as needing to update irs
5463 debug registers.
5464 (the_low_target): Remove i386_set_thread_context and install
5465 i386_prepare_to_resume.
5466 * win32-low.c (win32_get_thread_context): Adjust.
5467 (win32_set_thread_context): Use SetThreadContext
5468 directly.
5469 (win32_prepare_to_resume): New function.
5470 (win32_require_context): New function, factored out from ...
5471 (thread_rec): ... this.
5472 (continue_one_thread): Call win32_prepare_to_resume on each thread
5473 we're about to continue.
5474 (win32_resume): Call win32_prepare_to_resume on the event thread.
5475 * win32-low.h (struct win32_thread_info)
5476 <debug_registers_changed>: New field.
5477 (struct win32_target_ops): Change prototype of set_thread_context,
5478 delete set_thread_context and add prepare_to_resume.
5479 (win32_require_context): New declaration.
5480
a442d071
GB
54812014-10-08 Gary Benson <gbenson@redhat.com>
5482
5483 * server.h: Do not include common-exceptions.h.
5484
6f1947e8
GB
54852014-10-08 Gary Benson <gbenson@redhat.com>
5486
5487 * server.h: Do not include cleanups.h.
5488
63b434a4
JH
54892014-09-30 James Hogan <james.hogan@imgtec.com>
5490
5491 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5492 mips64-dsp-linux.c.
5493
c4d9ceb6
YQ
54942014-09-23 Yao Qi <yao@codesourcery.com>
5495
5496 * linux-low.c (lp_status_maybe_breakpoint): New function.
5497 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5498 (count_events_callback): Likewise.
5499 (select_event_lwp_callback): Likewise.
5500 (cancel_breakpoints_callback): Likewise.
5501
89a5711c
DB
55022014-09-19 Don Breazeal <donb@codesourcery.com>
5503
5504 * linux-low.c (handle_extended_wait): Call
5505 linux_ptrace_get_extended_event.
5506 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5507 linux_is_extended_waitstatus.
5508
bffc0964
JB
55092014-09-16 Joel Brobecker <brobecker@adacore.com>
5510
5511 * Makefile.in (CPPFLAGS): Define.
5512 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5513 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5514
0bfdf32f
GB
55152014-09-16 Gary Benson <gbenson@redhat.com>
5516
5517 * inferiors.h (current_inferior): Renamed as...
5518 (current_thread): New variable. All uses updated.
5519 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5520 (maybe_move_out_of_jump_pad): Likewise.
5521 (cancel_breakpoint): Likewise.
5522 (linux_low_filter_event): Likewise.
5523 (wait_for_sigstop): Likewise.
5524 (linux_resume_one_lwp): Likewise.
5525 (need_step_over_p): Likewise.
5526 (start_step_over): Likewise.
5527 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5528 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5529 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5530 and save_inferior as saved_thread.
5531 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5532 saved_thread.
5533 (regcache_invalidate_thread): Likewise.
5534 * remote-utils.c (prepare_resume_reply): Likewise.
5535 * thread-db.c (thread_db_get_tls_address): Likewise.
5536 (disable_thread_event_reporting): Likewise.
5537 (remove_thread_event_breakpoints): Likewise.
5538 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5539 as saved_thread.
5540 * target.h (set_desired_inferior): Renamed as...
5541 (set_desired_thread): New declaration. All uses updated.
5542 * server.c (myresume): Updated comment to reference thread instead
5543 of inferior.
5544 (handle_serial_event): Likewise.
5545 (handle_target_event): Likewise.
5546
361c8ade
GB
55472014-09-12 Tom Tromey <tromey@redhat.com>
5548 Gary Benson <gbenson@redhat.com>
5549
5550 * regcache.h: Include common-regcache.h.
5551 (regcache_read_pc): Don't declare.
5552 * regcache.c (get_thread_regcache_for_ptid): New function.
5553
bd9269f7
GB
55542014-09-11 Tom Tromey <tromey@redhat.com>
5555 Gary Benson <gbenson@redhat.com>
5556
5557 * symbol.c: New file.
5558 * Makefile.in (SFILES): Add symbol.c.
5559 (OBS): Add symbol.o.
5560
f8c1d06b
GB
55612014-09-11 Gary Benson <gbenson@redhat.com>
5562
5563 * target.c (target_stop_ptid, target_continue_ptid): New
5564 functions.
5565
721ec300
GB
55662014-09-11 Tom Tromey <tromey@redhat.com>
5567 Gary Benson <gbenson@redhat.com>
5568
5569 * target.h: Include target/target.h.
5570 * target.c (target_read_memory, target_read_uint32)
5571 (target_write_memory): New functions.
5572
c5e92cca
GB
55732014-09-11 Gary Benson <gbenson@redhat.com>
5574
5575 * server.h (debug_hw_points): Don't declare.
5576 * server.c (debug_hw_points): Don't define. Replace all uses
5577 with show_debug_regs.
5578 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5579 all uses with show_debug_regs.
5580
2e4bb98a
EBM
55812014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5582
5583 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5584 endianness into account.
5585 (ppc_supply_ptrace_register): Likewise.
5586
ac740bc7
JH
55872014-09-03 James Hogan <james.hogan@imgtec.com>
5588
5589 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5590 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5591
97ea6506
GB
55922014-09-03 Gary Benson <gbenson@redhat.com>
5593
5594 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5595 ALL_DEBUG_ADDRESS_REGISTERS.
5596
df7e5265
GB
55972014-09-02 Gary Benson <gbenson@redhat.com>
5598
5599 * i386-low.h: Renamed as...
5600 * x86-low.h: New file. All type, function and variable name
5601 prefixes changed from "i386_" to "x86_". All references updated.
5602 * i386-low.c: Renamed as...
5603 * x86-low.c: New file. All type, function and variable name
5604 prefixes changed from "i386_" to "x86_". All references updated.
5605
ed859da7
GB
56062014-09-02 Gary Benson <gbenson@redhat.com>
5607
5608 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5609 (x86_linux_new_thread): Likewise.
5610
860789c7
GB
56112014-08-29 Gary Benson <gbenson@redhat.com>
5612
5613 * server.h (setjmp.h): Do not include.
5614 (toplevel): Do not declare.
5615 (common-exceptions.h): Include.
5616 (cleanups.h): Likewise.
5617 * server.c (toplevel): Do not define.
5618 (exit_code): New static global.
5619 (detach_or_kill_for_exit_cleanup): New function.
5620 (main): New function. Original main renamed to...
5621 (captured_main): New function.
5622 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5623
ff55e1b5
GB
56242014-08-29 Gary Benson <gbenson@redhat.com>
5625
5626 * Makefile.in (SFILES): Add common/common-exceptions.c.
5627 (OBS): Add common-exceptions.o.
5628 (common-exceptions.o): New rule.
5629 * utils.c (prepare_to_throw_exception): New function.
5630
e9bcb658
GB
56312014-08-29 Gary Benson <gbenson@redhat.com>
5632
5633 * config.in: Regenerate.
5634 * configure: Likewise.
5635
e3180625
GB
56362014-08-29 Gary Benson <gbenson@redhat.com>
5637
5638 * Makefile.in (SFILES): Add common/cleanups.c.
5639 (OBS): cleanups.o.
5640 (cleanups.o): New rule.
5641
e3d6ba5d
GB
56422014-08-29 Gary Benson <gbenson@redhat.com>
5643
5644 * utils.c (internal_vwarning): New function.
5645
7096e886
GB
56462014-08-28 Gary Benson <gbenson@redhat.com>
5647
5648 * utils.h (fatal): Remove declaration.
5649 * utils.c (fatal): Remove function.
5650
14ce3192
GB
56512014-08-28 Gary Benson <gbenson@redhat.com>
5652
5653 * tracepoint.c (gdb_agent_init): Replace fatal with
5654 perror_with_name.
5655 (initialize_tracepoint): Likewise.
5656
50278d59
GB
56572014-08-28 Gary Benson <gbenson@redhat.com>
5658
5659 * remote-utils.c (remote_prepare): Replace fatal with error.
5660
aa96c426
GB
56612014-08-28 Gary Benson <gbenson@redhat.com>
5662
5663 * linux-low.c (linux_async): Replace fatal with warning.
5664 Tidy up and return.
5665 (linux_start_non_stop): Return -1 if linux_async failed.
5666
f7160e97
GB
56672014-08-28 Gary Benson <gbenson@redhat.com>
5668
5669 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5670 gdb_assert.
5671 (i386_dr_low_get_addr): Remove vague comment.
5672 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5673 gdb_assert.
5674
38e08fca
GB
56752014-08-28 Gary Benson <gbenson@redhat.com>
5676
5677 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5678 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5679 internal_error.
5680 (linux_resume_one_lwp): Likewise.
5681 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5682 gdb_assert.
5683 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5684 with internal_error.
5685 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5686 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5687 (find_register_by_name): Replace fatal with internal_error.
5688 (find_regno): Likewise.
5689 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5690 * thread-db.c (thread_db_create_event): Likewise.
5691 (thread_db_load_search): Likewise.
5692 (try_thread_db_load_1): Likewise.
5693 * tracepoint.c (get_jump_space_head): Replace fatal with
5694 internal_error.
5695 (claim_trampoline_space): Likewise.
5696 (have_fast_tracepoint_trampoline_buffer): Likewise.
5697 (cmd_qtstart): Likewise.
5698 (stop_tracing): Likewise.
5699 (fast_tracepoint_collecting): Likewise.
5700 (target_malloc): Likewise.
5701 (download_tracepoint): Likewise.
5702 (download_trace_state_variables): Replace check with gdb_assert.
5703 (upload_fast_traceframes): Replace fatal with internal_error.
5704
34abf635
GB
57052014-08-19 Tom Tromey <tromey@redhat.com>
5706 Gary Benson <gbenson@redhat.com>
5707
5708 * Makefile.in (SFILES): Add common/common-debug.c.
5709 (OBS): Add common-debug.o.
5710 (common-debug.o): New rule.
5711 * debug.h (debug_printf): Don't declare.
5712 * debug.c (debug_printf): Renamed and rewritten as...
5713 (debug_vprintf): New function.
5714
f6e94d78
GB
57152014-08-19 Gary Benson <gbenson@redhat.com>
5716
5717 * utils.h: Do not include print-utils.h.
5718
9239eeab
GB
57192014-08-19 Tom Tromey <tromey@redhat.com>
5720 Gary Benson <gbenson@redhat.com>
5721
5722 * server.h: Add static assertion.
5723 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5724
ef87c8bb
GB
57252014-08-19 Tom Tromey <tromey@redhat.com>
5726 Gary Benson <gbenson@redhat.com>
5727
5728 * Makefile.in (SFILES): Add common/errors.c.
5729 (OBS): Add errors.o.
5730 (IPA_OBS): Add errors-ipa.o.
5731 (errors.o): New rule.
5732 (errors-ipa.o): Likewise.
5733 * utils.h (perror_with_name, error, warning): Don't declare.
5734 * utils.c (warning): Renamed and rewritten as...
5735 (vwarning): New function.
5736 (error): Renamed and rewritten as...
5737 (verror): New function.
5738 (internal_error): Renamed and rewritten as...
5739 (internal_verror): New function.
5740
bb974a24
GB
57412014-08-07 Gary Benson <gbenson@redhat.com>
5742
5743 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5744 * configure: Regenerate.
5745 * config.in: Likewise.
5746 * server.h: Do not include errno.h.
5747 * event-loop.c: Likewise.
5748 * hostio-errno.c: Likewise.
5749 * linux-low.c: Likewise.
5750 * remote-utils.c: Likewise.
5751 * spu-low.c: Likewise.
5752 * utils.c: Likewise.
5753 * gdbreplay.c: Unconditionally include errno.h.
5754
6d3d12eb
GB
57552014-08-07 Gary Benson <gbenson@redhat.com>
5756
5757 * server.h: Do not include string.h.
5758 * event-loop.c: Likewise.
5759 * linux-low.c: Likewise.
5760 * regcache.c: Likewise.
5761 * remote-utils.c: Likewise.
5762 * spu-low.c: Likewise.
5763 * utils.c: Likewise.
5764
dccbb609
GB
57652014-08-07 Gary Benson <gbenson@redhat.com>
5766
5767 * server.h: Do not include gdb_assert.h.
5768
e76df0d0
GB
57692014-08-07 Gary Benson <gbenson@redhat.com>
5770
5771 * server.h: Do not include common-utils.h.
5772
4cb9c816
GB
57732014-08-07 Gary Benson <gbenson@redhat.com>
5774
5775 * server.h: Do not include ptid.h.
5776 * notif.h: Likewise.
5777
3995eeee
GB
57782014-08-07 Gary Benson <gbenson@redhat.com>
5779
5780 * server.h: Do not include gdb_locale.h.
5781
cb9f1a9b
GB
57822014-08-07 Gary Benson <gbenson@redhat.com>
5783
5784 * server.h: Do not include gdb/signals.h.
5785 * win32-low.c: Likewise.
5786
a5fceff8
GB
57872014-08-07 Gary Benson <gbenson@redhat.com>
5788
5789 * server.h: Do not include pathmax.h.
5790
b9391142
GB
57912014-08-07 Gary Benson <gbenson@redhat.com>
5792
5793 * server.h: Do not include libiberty.h.
5794 * linux-bfin-low.c: Likewise.
5795
0e443c87
GB
57962014-08-07 Gary Benson <gbenson@redhat.com>
5797
5798 * server.h: Do not include ansidecl.h.
5799
8ebb3f56
GB
58002014-08-07 Gary Benson <gbenson@redhat.com>
5801
5802 * linux-x86-low.c: Do not include stddef.h.
5803 * lynx-ppc-low.c: Likewise.
5804 * tracepoint.c: Likewise.
5805
8980bdf6
GB
58062014-08-07 Gary Benson <gbenson@redhat.com>
5807
5808 * server.h: Do not include stdarg.h.
5809 * nto-low.c: Likewise.
5810
d7096f71
GB
58112014-08-07 Gary Benson <gbenson@redhat.com>
5812
5813 * server.h: Do not include stdlib.h.
5814 * inferiors.c: Likewise.
5815 * linux-low.c: Likewise.
5816 * regcache.c: Likewise.
5817 * spu-low.c: Likewise.
5818 * tracepoint.c: Likewise.
5819 * utils.c: Likewise.
5820
d02f550d
GB
58212014-08-07 Gary Benson <gbenson@redhat.com>
5822
5823 * server.h: Do not include stdio.h.
5824 * linux-low.c: Likewise.
5825 * remote-utils.c: Likewise.
5826 * spu-low.c: Likewise.
5827 * utils.c: Likewise.
5828 * wincecompat.c: Likewise.
5829
87f6c4e3
GB
58302014-08-06 Gary Benson <gbenson@redhat.com>
5831
5832 * regcache.c (init_register_cache): Move conditionals inside if.
5833
7089dca4
GB
58342014-08-06 Gary Benson <gbenson@redhat.com>
5835
5836 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5837
462f517e
GB
58382014-07-31 Gary Benson <gbenson@redhat.com>
5839
5840 * ax.h: Do not include server.h.
5841 * gdbthread.h: Likewise.
5842 * lynx-low.h: Likewise.
5843 * notif.h: Likewise.
5844
976411d6
GB
58452014-07-30 Gary Benson <gbenson@redhat.com>
5846
5847 * server.h: Include common-defs.h.
5848 Do not include config.h or build-gnulib-gdbserver/config.h.
5849
d41f6d8e
GB
58502014-07-30 Gary Benson <gbenson@redhat.com>
5851
5852 * hostio-errno.c: Move server.h to top of includes list.
5853 * inferiors.c: Likewise.
5854 * linux-x86-low.c: Likewise.
5855 * notif.c: Include server.h.
5856
314c6a35
TT
58572014-07-24 Tom Tromey <tromey@redhat.com>
5858 Gary Benson <gbenson@redhat.com>
5859
5860 * server.h (CORE_ADDR): Now unsigned.
5861
69ff6be5
PA
58622014-07-16 Pedro Alves <palves@redhat.com>
5863
5864 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5865
ce9e3fe7
PA
58662014-07-15 Pedro Alves <palves@redhat.com>
5867
5868 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5869 copy.
5870
e76126e8
PA
58712014-07-11 Pedro Alves <palves@redhat.com>
5872
5873 * linux-low.c (kill_wait_lwp): New function, based on
5874 kill_one_lwp_callback, but use my_waitpid directly.
5875 (kill_one_lwp_callback, linux_kill): Use it.
5876
8e9db26e
PA
58772014-06-23 Pedro Alves <palves@redhat.com>
5878
5879 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5880 before setting DR0..DR3.
5881
698b3e08
GB
58822014-06-20 Gary Benson <gbenson@redhat.com>
5883
5884 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5885 * configure: Regenerated.
5886 * config.in: Likewise.
5887
125f8a3d
GB
58882014-06-20 Gary Benson <gbenson@redhat.com>
5889
5890 * Makefile.in (SFILES): Update locations for files moved
5891 from common to nat.
5892 (object file files): Reordered.
5893
42995dbd
GB
58942014-06-20 Gary Benson <gbenson@redhat.com>
5895
5896 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5897 (i386_dr_low_set_addr): Likewise.
5898 (i386_dr_low_get_addr): Likewise.
5899 (i386_dr_low_can_set_control): Likewise.
5900 (i386_dr_low_set_control): Likewise.
5901 (i386_dr_low_get_control): Likewise.
5902 (i386_dr_low_get_status): Likewise.
5903 (i386_get_debug_register_length): Likewise.
5904 * linux-x86-low.c (i386_dr_low_set_addr):
5905 Changed signature. Made static.
5906 (i386_dr_low_get_addr): Likewise.
5907 (i386_dr_low_set_control): Likewise.
5908 (i386_dr_low_get_control): Likewise.
5909 (i386_dr_low_get_status): Likewise.
5910 (i386_dr_low): New global variable.
5911 * win32-i386-low.c (i386_dr_low_set_addr):
5912 Changed signature. Made static.
5913 (i386_dr_low_get_addr): Likewise.
5914 (i386_dr_low_set_control): Likewise.
5915 (i386_dr_low_get_control): Likewise.
5916 (i386_dr_low_get_status): Likewise.
5917 (i386_dr_low): New global variable.
5918
e1d2394b
MS
59192014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5920
5921 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5922 * Makefile.in (AR, AR_FLAGS): Define.
5923 * configure: Regenerate.
5924
3a8ee006
GB
59252014-06-19 Gary Benson <gbenson@redhat.com>
5926
5927 * Makefile.in (i386-dregs.o): New rule.
5928 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5929 * i386-low.c (target.h): Remove include.
5930 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5931 (DR_CONTROL_SHIFT): Likewise.
5932 (DR_CONTROL_SIZE): Likewise.
5933 (DR_RW_EXECUTE): Likewise.
5934 (DR_RW_WRITE): Likewise.
5935 (DR_RW_READ): Likewise.
5936 (DR_RW_IORW): Likewise.
5937 (DR_LEN_1): Likewise.
5938 (DR_LEN_2): Likewise.
5939 (DR_LEN_4): Likewise.
5940 (DR_LEN_8): Likewise.
5941 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5942 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5943 (DR_ENABLE_SIZE): Likewise.
5944 (DR_LOCAL_SLOWDOWN): Likewise.
5945 (DR_GLOBAL_SLOWDOWN): Likewise.
5946 (DR_CONTROL_RESERVED): Likewise.
5947 (I386_DR_CONTROL_MASK): Likewise.
5948 (I386_DR_VACANT): Likewise.
5949 (I386_DR_LOCAL_ENABLE): Likewise.
5950 (I386_DR_GLOBAL_ENABLE): Likewise.
5951 (I386_DR_DISABLE): Likewise.
5952 (I386_DR_SET_RW_LEN): Likewise.
5953 (I386_DR_GET_RW_LEN): Likewise.
5954 (I386_DR_WATCH_HIT): Likewise.
5955 (i386_wp_op_t): Likewise.
5956 (i386_show_dr): Likewise.
5957 (i386_length_and_rw_bits): Likewise.
5958 (i386_insert_aligned_watchpoint): Likewise.
5959 (i386_remove_aligned_watchpoint): Likewise.
5960 (i386_handle_nonaligned_watchpoint): Likewise.
5961 i386_update_inferior_debug_regs(): Likewise.
5962 (i386_dr_insert_watchpoint): Likewise.
5963 (i386_dr_remove_watchpoint): Likewise.
5964 (i386_dr_region_ok_for_watchpoint): Likewise.
5965 (i386_dr_stopped_data_address): Likewise.
5966 (i386_dr_stopped_by_watchpoint): Likewise.
5967
8f26655c
GB
59682014-06-19 Gary Benson <gbenson@redhat.com>
5969
5970 * i386-low.c (i386_dr_show): Renamed to
5971 i386_show_dr and made static. All uses updated.
5972 (i386_dr_length_and_rw_bits): Renamed to
5973 i386_length_and_rw_bits and made static.
5974 All uses updated.
5975 (i386_dr_insert_aligned_watchpoint): Renamed to
5976 i386_insert_aligned_watchpoint and made static.
5977 All uses updated.
5978 (i386_dr_remove_aligned_watchpoint): Renamed to
5979 i386_remove_aligned_watchpoint and made static.
5980 All uses updated.
5981 (i386_dr_update_inferior_debug_regs): Renamed to
5982 i386_update_inferior_debug_regs and made static.
5983 All uses updated.
5984
b9228891
GB
59852014-06-18 Gary Benson <gbenson@redhat.com>
5986
5171def3
GB
5987 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5988 (i386_dr_low_can_set_control): Likewise.
5989 (i386_get_debug_register_length): Likewise.
5990 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5991 (i386_dr_low_can_set_control): Likewise.
5992 (i386_get_debug_register_length): Likewise.
5993
59942014-06-17 Gary Benson <gbenson@redhat.com>
5995
b9228891
GB
5996 * i386-low.h (i386-dregs.h): New include.
5997 (DR_FIRSTADDR): Now in i386-dregs.h.
5998 (DR_LASTADDR): Likewise.
5999 (DR_NADDR): Likewise.
6000 (DR_STATUS): Likewise.
6001 (DR_CONTROL): Likewise.
6002 (i386_debug_reg_state): Likewise.
6003 (i386_dr_insert_watchpoint): Likewise.
6004 (i386_dr_remove_watchpoint): Likewise.
6005 (i386_dr_region_ok_for_watchpoint): Likewise.
6006 (i386_dr_stopped_data_address): Likewise.
6007 (i386_dr_stopped_by_watchpoint): Likewise.
6008 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6009
4be83cc2
GB
60102014-06-18 Gary Benson <gbenson@redhat.com>
6011
6012 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6013 i386_dr_insert_watchpoint.
6014 (i386_low_remove_watchpoint): Renamed to
6015 i386_dr_remove_watchpoint.
6016 (i386_low_region_ok_for_watchpoint): Renamed to
6017 i386_dr_region_ok_for_watchpoint.
6018 (i386_low_stopped_data_address): Renamed to
6019 i386_dr_stopped_data_address.
6020 (i386_low_stopped_by_watchpoint): Renamed to
6021 i386_dr_stopped_by_watchpoint.
6022 * i386-low.c (i386_show_dr): Renamed to
6023 i386_dr_show and made nonstatic. All uses updated.
6024 (i386_length_and_rw_bits): Renamed to
6025 i386_dr_length_and_rw_bits and made nonstatic.
6026 All uses updated.
6027 (i386_insert_aligned_watchpoint): Renamed to
6028 i386_dr_insert_aligned_watchpoint and made nonstatic.
6029 All uses updated.
6030 (i386_remove_aligned_watchpoint): Renamed to
6031 i386_dr_remove_aligned_watchpoint and made nonstatic.
6032 All uses updated.
6033 (i386_update_inferior_debug_regs): Renamed to
6034 i386_dr_update_inferior_debug_regs and made nonstatic.
6035 All uses updated.
6036 (i386_low_insert_watchpoint): Renamed to
6037 i386_dr_insert_watchpoint. All uses updated.
6038 (i386_low_remove_watchpoint): Renamed to
6039 i386_dr_remove_watchpoint. All uses updated.
6040 (i386_low_region_ok_for_watchpoint): Renamed to
6041 i386_dr_region_ok_for_watchpoint. All uses updated.
6042 (i386_low_stopped_data_address): Renamed to
6043 i386_dr_stopped_data_address. All uses updated.
6044 (i386_low_stopped_by_watchpoint): Renamed to
6045 i386_dr_stopped_by_watchpoint. All uses updated.
6046
131aa0d4
GB
60472014-06-18 Gary Benson <gbenson@redhat.com>
6048
6049 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6050 (i386_dr_low_can_set_control): Likewise.
6051 (i386_insert_aligned_watchpoint): New check.
6052
d9305f7f
GB
60532014-06-18 Gary Benson <gbenson@redhat.com>
6054
6055 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6056 Renamed to state.
6057
e927c9fc
GB
60582014-06-18 Gary Benson <gbenson@redhat.com>
6059
6060 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6061 instead of fatal and error.
6062 (i386_handle_nonaligned_watchpoint): Likewise.
6063
1b6d4134
GB
60642014-06-18 Gary Benson <gbenson@redhat.com>
6065
6066 * i386-low.c (i386_get_debug_register_length): New macro.
6067 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6068 (i386_show_dr): Use debug_printf instead of fprintf. Use
6069 phex to format values.
6070
6e62758f
GB
60712014-06-18 Gary Benson <gbenson@redhat.com>
6072
6073 * i386-low.h: Comment changes.
6074 * i386-low.c: Likewise.
6075
fc6e2f03
GB
60762014-06-18 Gary Benson <gbenson@redhat.com>
6077
6078 * i386-low.c: Whitespace changes.
6079
f9d1eeed
TT
60802014-06-12 Tom Tromey <tromey@redhat.com>
6081
6082 * utils.c (freeargv): Remove.
6083
0b04e523
TT
60842014-06-12 Tom Tromey <tromey@redhat.com>
6085
6086 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6087 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6088 (parse_debug_format_options): Likewise.
6089 (gdbserver_usage): Likewise.
6090 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6091 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6092 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6093 against libiberty.
6094 ($(LIBGNU)): Depend on libiberty.
6095 (all-lib): Recurse into all subdirs.
6096 (install-only): Invoke "install" target in subdirs.
6097 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6098 targets.
6099 * configure: Rebuild.
6100 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6101 for vasprintf, vsnprintf, or gettimeofday.
6102 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6103 srv_tgtobj.
6104
270c9937
JB
61052014-06-05 Joel Brobecker <brobecker@adacore.com>
6106
6107 * development.sh: Delete.
6108 * Makefile.in (config.status): Adjust dependency on development.sh.
6109 * configure.ac: Adjust development.sh source call.
6110 * configure: Regenerate.
6111
0a261ed8
PA
61122014-06-02 Pedro Alves <palves@redhat.com>
6113
6114 * ax.c (gdb_free_agent_expr): New function.
6115 * ax.h (gdb_free_agent_expr): New declaration.
6116 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6117 list.
6118 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6119 static.
6120 (clear_breakpoint_conditions_and_commands): New function.
6121 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6122 (clear_breakpoint_conditions_and_commands): New declaration.
6123
e9dae05e
RR
61242014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6125
6126 * linux-aarch64-low.c (asm/ptrace.h): Include.
6127
5876f503
JK
61282014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6129
6130 Fix TLS access for -static -pthread.
6131 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6132 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6133 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6134
802e8e6d
PA
61352014-05-20 Pedro Alves <palves@redhat.com>
6136
6137 * linux-aarch64-low.c (aarch64_insert_point)
6138 (aarch64_remove_point): No longer check whether the type is
6139 supported here. Adjust to new interface.
6140 (the_low_target): Install aarch64_supports_z_point_type as
6141 supports_z_point_type method.
6142 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6143 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6144 instead of a Z packet char. Adjust.
6145 (arm_supports_z_point_type): New function.
6146 (arm_insert_point, arm_remove_point): Adjust to new interface.
6147 (the_low_target): Install arm_supports_z_point_type.
6148 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6149 (cris_insert_point, cris_remove_point): Adjust to new interface.
6150 Don't check whether the type is supported here.
6151 (the_low_target): Install cris_supports_z_point_type.
6152 * linux-low.c (linux_supports_z_point_type): New function.
6153 (linux_insert_point, linux_remove_point): Adjust to new interface.
6154 * linux-low.h (struct linux_target_ops) <insert_point,
6155 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6156 raw_breakpoint pointer parameter.
6157 <supports_z_point_type>: New method.
6158 * linux-mips-low.c (mips_supports_z_point_type): New function.
6159 (mips_insert_point, mips_remove_point): Adjust to new interface.
6160 Use mips_supports_z_point_type.
6161 (the_low_target): Install mips_supports_z_point_type.
6162 * linux-ppc-low.c (the_low_target): Install NULL as
6163 supports_z_point_type method.
6164 * linux-s390-low.c (the_low_target): Install NULL as
6165 supports_z_point_type method.
6166 * linux-sparc-low.c (the_low_target): Install NULL as
6167 supports_z_point_type method.
6168 * linux-x86-low.c (x86_supports_z_point_type): New function.
6169 (x86_insert_point): Adjust to new insert_point interface. Use
6170 insert_memory_breakpoint. Adjust to new
6171 i386_low_insert_watchpoint interface.
6172 (x86_remove_point): Adjust to remove_point interface. Use
6173 remove_memory_breakpoint. Adjust to new
6174 i386_low_remove_watchpoint interface.
6175 (the_low_target): Install x86_supports_z_point_type.
6176 * lynx-low.c (lynx_target_ops): Install NULL as
6177 supports_z_point_type callback.
6178 * nto-low.c (nto_supports_z_point_type): New.
6179 (nto_insert_point, nto_remove_point): Adjust to new interface.
6180 (nto_target_ops): Install nto_supports_z_point_type.
6181 * mem-break.c: Adjust intro comment.
6182 (struct raw_breakpoint) <raw_type, size>: New fields.
6183 <inserted>: Update comment.
6184 <shlib_disabled>: Delete field.
6185 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6186 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6187 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6188 (raw_bkpt_type_to_target_hw_bp_type): New function.
6189 (find_enabled_raw_code_breakpoint_at): New function.
6190 (find_raw_breakpoint_at): New type and size parameters. Use them.
6191 (insert_memory_breakpoint): New function, based off
6192 set_raw_breakpoint_at.
6193 (remove_memory_breakpoint): New function.
6194 (set_raw_breakpoint_at): Reimplement.
6195 (set_breakpoint): New, based on set_breakpoint_at.
6196 (set_breakpoint_at): Reimplement.
6197 (delete_raw_breakpoint): Go through the_target->remove_point
6198 instead of assuming memory breakpoints.
6199 (find_gdb_breakpoint_at): Delete.
6200 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6201 (find_gdb_breakpoint): New function.
6202 (set_gdb_breakpoint_at): Delete.
6203 (z_type_supported): New function.
6204 (set_gdb_breakpoint_1): New function, loosely based off
6205 set_gdb_breakpoint_at.
6206 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6207 (delete_gdb_breakpoint_at): Delete.
6208 (delete_gdb_breakpoint_1): New function, loosely based off
6209 delete_gdb_breakpoint_at.
6210 (delete_gdb_breakpoint): New function.
6211 (clear_gdb_breakpoint_conditions): Rename to ...
6212 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6213 breakpoint.
6214 (add_condition_to_breakpoint): Make static.
6215 (add_breakpoint_condition): Take a struct breakpoint pointer
6216 instead of an address. Adjust.
6217 (gdb_condition_true_at_breakpoint): Rename to ...
6218 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6219 z_type parameter.
6220 (gdb_condition_true_at_breakpoint): Reimplement.
6221 (add_breakpoint_commands): Take a struct breakpoint pointer
6222 instead of an address. Adjust.
6223 (gdb_no_commands_at_breakpoint): Rename to ...
6224 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6225 parameter. Return true if no breakpoint was found. Change debug
6226 output.
6227 (gdb_no_commands_at_breakpoint): Reimplement.
6228 (run_breakpoint_commands): Rename to ...
6229 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6230 and change return type to boolean.
6231 (run_breakpoint_commands): New function.
6232 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6233 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6234 breakpoint. Go through the_target->remove_point instead of
6235 assuming memory breakpoint.
6236 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6237 software and hardware breakpoints.
6238 (reinsert_raw_breakpoint): Go through the_target->insert_point
6239 instead of assuming memory breakpoint.
6240 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6241 software and hardware breakpoints.
6242 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6243 Check both software and hardware breakpoints.
6244 (validate_inserted_breakpoint): Assert the breakpoint is a
6245 software breakpoint. Set the inserted flag to -1 instead of
6246 setting shlib_disabled.
6247 (delete_disabled_breakpoints): Adjust.
6248 (validate_breakpoints): Only validate software breakpoints.
6249 Adjust to inserted flag change.
6250 (check_mem_read, check_mem_write): Skip breakpoint types other
6251 than software breakpoints. Adjust to inserted flag change.
6252 * mem-break.h (enum raw_bkpt_type): New enum.
6253 (raw_breakpoint, struct process_info): Forward declare.
6254 (Z_packet_to_target_hw_bp_type): Delete declaration.
6255 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6256 (set_gdb_breakpoint, delete_gdb_breakpoint)
6257 (clear_breakpoint_conditions): New declarations.
6258 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6259 (breakpoint_inserted_here): Update comment.
6260 (add_breakpoint_condition, add_breakpoint_commands): Replace
6261 address parameter with a breakpoint pointer parameter.
6262 (gdb_breakpoint_here): Update comment.
6263 (delete_gdb_breakpoint_at): Delete.
6264 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6265 * server.c (process_point_options): Take a struct breakpoint
6266 pointer instead of an address. Adjust.
6267 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6268 delete_gdb_breakpoint.
6269 * spu-low.c (spu_target_ops): Install NULL as
6270 supports_z_point_type method.
6271 * target.h: Include mem-break.h.
6272 (struct target_ops) <prepare_to_access_memory>: Update comment.
6273 <supports_z_point_type>: New field.
6274 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6275 instead of a char. Also take a raw breakpoint pointer.
6276 * win32-arm-low.c (the_low_target): Install NULL as
6277 supports_z_point_type.
6278 * win32-i386-low.c (i386_supports_z_point_type): New function.
6279 (i386_insert_point, i386_remove_point): Adjust to new interface.
6280 (the_low_target): Install i386_supports_z_point_type.
6281 * win32-low.c (win32_supports_z_point_type): New function.
6282 (win32_insert_point, win32_remove_point): Adjust to new interface.
6283 (win32_target_ops): Install win32_supports_z_point_type.
6284 * win32-low.h (struct win32_target_ops):
6285 <supports_z_point_type>: New method.
6286 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6287 instead of a char. Also take a raw breakpoint pointer.
6288
932539e3
PA
62892014-05-20 Pedro Alves <palves@redhat.com>
6290
6291 * mem-break.h: Include break-common.h.
6292 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6293 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6294 (Z_packet_to_target_hw_bp_type): New declaration.
6295 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6296 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6297 (Z_PACKET_ACCESS_WP): Delete macros.
6298 (Z_packet_to_hw_type): Delete function.
6299 * i386-low.h: Don't include break-common.h here.
6300 (Z_packet_to_hw_type): Delete declaration.
6301 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6302 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6303 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6304 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6305 * linux-aarch64-low.c: Don't include break-common.h here.
6306 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6307 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6308 (Z_packet_to_target_hw_bp_type): Delete function.
6309 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6310 function.
6311 (mips_insert_point, mips_remove_point): Use
6312 Z_packet_to_target_hw_bp_type.
6313
4ff0d3d8
PA
63142014-05-20 Pedro Alves <palves@redhat.com>
6315
6316 * linux-aarch64-low.c: Include break-common.h.
6317 (enum target_point_type): Delete.
6318 (Z_packet_to_point_type): Rename to ...
6319 (Z_packet_to_target_hw_bp_type): ... this, and return a
6320 target_hw_bp_type instead.
6321 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6322 instead of an enum target_point_type.
6323 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6324 breakpoint type.
6325 (aarch64_dr_state_insert_one_point)
6326 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6327 (aarch64_handle_aligned_watchpoint)
6328 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6329 Take an enum target_hw_bp_type instead of an enum
6330 target_point_type.
6331 (aarch64_supports_z_point_type): New function.
6332 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6333 use Z_packet_to_target_hw_bp_type.
6334
786dc519
JB
63352014-05-20 Joel Brobecker <brobecker@adacore.com>
6336
6337 * configure.ac: Only use -Werror by default when DEVELOPMENT
6338 is true.
6339 * configure: Regenerate.
6340
9e0aa64f
JK
63412014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6342
6343 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6344 * linux-x86-low.c (X86_64_USER_REGS): New.
6345 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6346
2b577b92
YQ
63472014-04-28 Yao Qi <yao@codesourcery.com>
6348
6349 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6350 name.
6351
94611da2
PA
63522014-04-25 Pedro Alves <palves@redhat.com>
6353
6354 PR server/16255
6355 * linux-low.c (linux_attach_fail_reason_string): New function.
6356 (linux_attach_lwp): Delete.
6357 (linux_attach_lwp_1): Rename to ...
6358 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6359 argument. Remove "initial" parameter. Return int instead of
6360 void. Don't error or warn here.
6361 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6362 failure to attach to the tgid. Call warning when failing to
6363 attach to an lwp.
6364 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6365 argument. Remove "initial" parameter. Return int instead of
6366 void. Don't error or warn here.
6367 (linux_attach_fail_reason_string): New declaration.
6368 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6369 interface change. Use linux_attach_fail_reason_string.
6370
01f9f808
MS
63712014-04-24 Michael Sturm <michael.sturm@mintel.com>
6372 Walfred Tedeschi <walfred.tedeschi@intel.com>
6373
6374 * Makefile.in: Added rules to handle new files
6375 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6376 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6377 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6378 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6379 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6380 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6381 x32-avx512-linux.o.
6382 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6383 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6384 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6385 i386/x32-avx512.xml.
6386 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6387 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6388 i386/x32-avx512-linux.xml.
6389 * i387-fp.c (num_avx512_k_registers): New constant for number
6390 of K registers.
6391 (num_avx512_zmmh_low_registers): New constant for number of
6392 lower ZMM registers (0-15).
6393 (num_avx512_zmmh_high_registers): New constant for number of
6394 higher ZMM registers (16-31).
6395 (num_avx512_ymmh_registers): New contant for number of higher
6396 YMM registers (ymm16-31 added by avx521 on x86_64).
6397 (num_avx512_xmm_registers): New constant for number of higher
6398 XMM registers (xmm16-31 added by AVX512 on x86_64).
6399 (struct i387_xsave): Add space for AVX512 registers.
6400 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6401 Add code to handle AVX512 registers.
6402 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6403 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6404 prototypei from generated file.
6405 (tdesc_amd64_avx512_linux): Likewise.
6406 (init_registers_x32_avx512_linux): Likewise.
6407 (tdesc_x32_avx512_linux): Likewise.
6408 (init_registers_i386_avx512_linux): Likewise.
6409 (tdesc_i386_avx512_linux): Likewise.
6410 (x86_64_regmap): Add AVX512 registers.
6411 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6412 mask.
6413 (initialize_low_arch): Add code to initialize AVX512 registers.
6414
51aa91f9
PA
64152014-04-23 Pedro Alves <palves@redhat.com>
6416
6417 * mem-break.c (find_gdb_breakpoint_at): Make static.
6418 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6419
a4165e94
PA
64202014-04-23 Pedro Alves <palves@redhat.com>
6421
6422 * i386-low.c: Don't include break-common.h here.
6423 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6424 prototype to take target_hw_bp_type as argument instead of a Z
6425 packet char.
6426 * i386-low.h: Include break-common.h here.
6427 (Z_packet_to_hw_type): Declare.
6428 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6429 prototypes.
6430 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6431 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6432 (x86_remove_point): Convert the packet number to a
6433 target_hw_bp_type before calling i386_low_remove_watchpoint.
6434 * win32-i386-low.c (i386_insert_point): Convert the packet number
6435 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6436 (i386_remove_point): Convert the packet number to a
6437 target_hw_bp_type before calling i386_low_remove_watchpoint.
6438
b8acf843
PA
64392014-04-23 Pedro Alves <palves@redhat.com>
6440
6441 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6442
d708bcd1
PA
64432014-04-10 Pedro Alves <palves@redhat.com>
6444
6445 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6446 Check if the condition or command is NULL before checking if the
6447 breakpoint is known. On success, return true.
6448 * mem-break.h (add_breakpoint_condition): Document return.
6449 (add_breakpoint_commands): Add describing comment.
6450 * server.c (skip_to_semicolon): New function.
6451 (process_point_options): Use it.
6452
2eec7d5b
PA
64532014-04-09 Pedro Alves <palves@redhat.com>
6454
6455 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6456 to lwpid_of.
6457
fa96cb38
PA
64582014-02-27 Pedro Alves <palves@redhat.com>
6459
6460 PR 12702
6461 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6462 macros.
6463 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6464 output.
6465 (last_thread_of_process_p): Take a PID argument instead of a
6466 thread pointer.
6467 (linux_wait_for_lwp): Delete.
6468 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6469 functions.
6470 (linux_low_filter_event): New function, party factored out from
6471 linux_wait_for_event.
6472 (linux_wait_for_event): Rename to ...
6473 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6474 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6475 sigsuspend. Check for zombie leaders.
6476 (linux_wait_for_event): Reimplement as wrapper around
6477 linux_wait_for_event_filtered.
6478 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6479 a normal or signal exit is seen, it's the whole process exiting.
6480 (wait_for_sigstop): No longer a for_each_inferior callback.
6481 Rewrite on top of linux_wait_for_event_filtered.
6482 (stop_all_lwps): Call wait_for_sigstop directly.
6483 * server.c (resume, handle_target_event): Handle
6484 TARGET_WAITKIND_NO_RESUMED.
6485
d763de10
JB
64862014-02-26 Joel Brobecker <brobecker@adacore.com>
6487
6488 * win32-low.c (psapi_get_dll_name,
6489 * win32_CreateToolhelp32Snapshot): Delete.
6490 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6491 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6492 Delete.
6493 (handle_load_dll): Add function description.
6494 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6495
850a0f76
JB
64962014-02-26 Joel Brobecker <brobecker@adacore.com>
6497
6498 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6499 Add comment.
6500 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6501 base address when calling win32_add_one_solib.
6502 (handle_load_dll): Delete local variable load_addr.
6503 Remove 0x1000 offset applied to DLL base address when calling
6504 win32_add_one_solib.
6505 (handle_unload_dll): Add comment.
6506
f25b3fc3
JB
65072014-02-26 Joel Brobecker <brobecker@adacore.com>
6508
6509 * win32-low.c (win32_add_all_dlls): Renames
6510 win32_ensure_ntdll_loaded. Rewrite function documentation.
6511 Adjust implementation to always load all DLLs.
6512 Add 0x1000 offset to DLL base address when calling
6513 win32_add_one_solib.
6514 (child_initialization_done): New static global.
6515 (do_initial_child_stuff): Set child_initialization_done to
6516 zero during child initialization, and 1 after. Replace call
6517 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6518 Add comment.
6519 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6520 (handle_unload_dll): Add function documentation.
6521 (get_child_debug_event): Ignore load and unload DLL events
6522 during child initialization.
6523
d86d4aaf
DE
65242014-02-20 Doug Evans <dje@google.com>
6525
3bc32da3 6526 Remove global all_lwps.
d86d4aaf
DE
6527 * inferiors.h (ptid_of): Move here from linux-low.h.
6528 (pid_of, lwpid_of): Ditto.
6529 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6530 parameter is a struct thread_info * now.
6531 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6532 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6533 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6534 directly.
6535 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6536 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6537 * linux-arm-low.c (update_registers_callback): Update, "entry"
6538 parameter is a struct thread_info * now.
6539 Fetch lwpid from current_inferior directly.
6540 (arm_insert_point): Pass &all_threads to find_inferior instead of
6541 &all_lwps.
6542 (arm_remove_point): Ditto.
6543 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6544 (arm_prepare_to_resume): Fetch pid from thread.
6545 (arm_read_description): Fetch lwpid from current_inferior directly.
6546 * linux-low.c (all_lwps): Delete.
6547 (delete_lwp): Delete call to remove_inferior.
6548 (handle_extended_wait): Fetch lwpid from thread.
6549 (add_lwp): Don't set lwp->entry.id. Remove call to
6550 add_inferior_to_list.
6551 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6552 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6553 (kill_one_lwp_callback): Ditto.
6554 (linux_kill): Don't dereference NULL pointer.
6555 Fetch ptid,lwpid from thread.
6556 (get_detach_signal): Fetch ptid from thread.
6557 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6558 Simplify call to regcache_invalidate_thread.
6559 (delete_lwp_callback): Update, "entry" parameter is a
6560 struct thread_info * now. Fetch pid from thread.
6561 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6562 (status_pending_p_callback): Update, "entry" parameter is a
6563 struct thread_info * now. Fetch ptid from thread.
6564 (find_lwp_pid): Update, "entry" parameter is a
6565 struct thread_info * now.
6566 (linux_wait_for_lwp): Fetch pid from thread.
6567 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6568 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6569 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6570 (dequeue_one_deferred_signal): Ditto.
6571 (cancel_breakpoint): Fetch ptid from current_inferior.
6572 (linux_wait_for_event): Pass &all_threads to find_inferior,
6573 not &all_lwps. Fetch ptid, lwpid from thread.
6574 (count_events_callback): Update, "entry" parameter is a
6575 struct thread_info * now.
6576 (select_singlestep_lwp_callback): Ditto.
6577 (select_event_lwp_callback): Ditto.
6578 (cancel_breakpoints_callback): Ditto.
6579 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6580 not &all_lwps.
6581 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6582 (unsuspend_one_lwp): Update, "entry" parameter is a
6583 struct thread_info * now.
6584 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6585 not &all_lwps.
6586 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6587 Fetch lwpid from thread, not lwp.
6588 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6589 Pass &all_threads to find_inferior, not &all_lwps.
6590 (send_sigstop): Fetch lwpid from thread, not lwp.
6591 (send_sigstop_callback): Update, "entry" parameter is a
6592 struct thread_info * now.
6593 (suspend_and_send_sigstop_callback): Ditto.
6594 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6595 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6596 struct thread_info * now.
6597 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6598 from thread, lwp.
6599 (lwp_running): Update, "entry" parameter is a
6600 struct thread_info * now.
6601 (stop_all_lwps): Fetch ptid from thread.
6602 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6603 (linux_resume_one_lwp): Fetch lwpid from thread.
6604 (linux_set_resume_request): Update, "entry" parameter is a
6605 struct thread_info * now. Fetch pid, lwpid from thread.
6606 (resume_status_pending_p): Update, "entry" parameter is a
6607 struct thread_info * now.
6608 (need_step_over_p): Ditto. Fetch lwpid from thread.
6609 (start_step_over): Fetch lwpid from thread.
6610 (linux_resume_one_thread): Update, "entry" parameter is a
6611 struct thread_info * now. Fetch lwpid from thread.
6612 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6613 (proceed_one_lwp): Update, "entry" parameter is a
6614 struct thread_info * now. Fetch lwpid from thread.
6615 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6616 struct thread_info * now.
6617 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6618 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6619 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6620 directly.
6621 (regsets_store_inferior_registers): Ditto.
6622 (fetch_register, store_register): Ditto.
6623 (linux_read_memory, linux_write_memory): Ditto.
6624 (linux_request_interrupt): Ditto.
6625 (linux_read_auxv): Ditto.
6626 (linux_xfer_siginfo): Ditto.
6627 (linux_qxfer_spu): Ditto.
6628 (linux_qxfer_libraries_svr4): Ditto.
6629 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6630 moved to inferiors.h.
6631 (get_lwp): Delete.
6632 (get_thread_lwp): Update.
6633 (struct lwp_info): Delete member "entry". Simplify comment for
6634 member "thread".
6635 (all_lwps): Delete.
6636 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6637 current_inferior directly.
6638 (update_watch_registers_callback): Update, "entry" parameter is a
6639 struct thread_info * now. Fetch pid from thread.
6640 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6641 (mips_insert_point): Fetch lwpid from current_inferior.
6642 Pass &all_threads to find_inferior, not &all_lwps.
6643 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6644 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6645 directly.
6646 (mips_stopped_data_address): Ditto.
6647 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6648 directly.
6649 * linux-tile-low.c (tile_arch_setup): Ditto.
6650 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6651 (update_debug_registers_callback): Update, "entry" parameter is a
6652 struct thread_info * now. Fetch pid from thread.
6653 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6654 Pass &all_threads to find_inferior, not &all_lwps.
6655 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6656 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6657 Pass &all_threads to find_inferior, not &all_lwps.
6658 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6659 (i386_dr_low_get_status): Ditto.
6660 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6661 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6662 (x86_linux_read_description): Ditto.
6663 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6664
3b8361aa
DE
66652014-02-20 Doug Evans <dje@google.com>
6666
6667 * inferiors.c (get_first_inferior): Fix buglet.
6668
f7667f0d
DE
66692014-02-19 Doug Evans <dje@google.com>
6670
6671 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6672 * inferiors.c (add_thread): Change result type to struct thread_info *.
6673 All callers updated.
6674 (add_lwp): Call add_thread here instead of in callers.
6675 All callers updated.
6676 * linux-low.h (get_lwp_thread): Rewrite.
6677 (struct lwp_info): New member "thread".
6678
b3312d80
DE
66792014-02-19 Doug Evans <dje@google.com>
6680
6681 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6682 All callers updated.
6683
ecc6f45c
DE
66842014-02-19 Doug Evans <dje@google.com>
6685
6686 * inferiors.c (add_thread): Fix whitespace.
6687
649ebbca
DE
66882014-02-19 Doug Evans <dje@google.com>
6689
6690 * dll.c (clear_dlls): Replace accessing list implemention details
6691 with API function.
6692 * gdbthread.h (get_first_thread): Declare.
6693 * inferiors.c (for_each_inferior_with_data): New function.
6694 (get_first_thread): New function.
6695 (find_thread_ptid): Simplify.
6696 (get_first_inferior): New function.
6697 (clear_list): Delete.
6698 (one_inferior_p): New function.
6699 (clear_inferior_list): New function.
6700 (clear_inferiors): Update.
6701 * inferiors.h (for_each_inferior_with_data): Declare.
6702 (clear_inferior_list): Declare.
6703 (one_inferior_p): Declare.
6704 (get_first_inferior): Declare.
6705 * linux-low.c (linux_wait_for_event): Replace accessing list
6706 implemention details with API function.
6707 * server.c (target_running): Ditto.
6708 (accumulate_file_name_length): New function.
6709 (emit_dll_description): New function.
6710 (handle_qxfer_libraries): Replace accessing list implemention
6711 details with API function.
6712 (handle_qxfer_threads_worker): New function.
6713 (handle_qxfer_threads_proper): Replace accessing list implemention
6714 details with API function.
6715 (handle_query): Ditto.
6716 (visit_actioned_threads_callback_ftype): New typedef.
6717 (visit_actioned_threads_data): New struct.
6718 (visit_actioned_threads): Rewrite to be find_inferior callback.
6719 (resume): Call find_inferior.
6720 (handle_status): Replace accessing list implemention
6721 details with API function.
6722 (process_serial_event): Replace accessing list implemention details
6723 with API function.
6724 * target.c (set_desired_inferior): Replace accessing list implemention
6725 details with API function.
6726 * tracepoint.c (same_process_p): New function.
6727 (gdb_agent_about_to_close): Replace accessing list implemention
6728 details with API function.
6729 * win32-low.c (child_delete_thread): Replace accessing list
6730 implemention details with API function.
6731 (match_dll_by_basename): New function.
6732 (dll_is_loaded_by_basename): New function.
6733 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6734 details call to dll_is_loaded_by_basename.
6735
80894984
DE
67362014-02-19 Doug Evans <dje@google.com>
6737
6738 * dll.h (struct dll_info): Add comment.
6739 * gdbthread.h (struct thread_info): Add comment.
6740 (current_ptid): Simplify.
6741 * inferiors.c (add_process): Update.
6742 (remove_process): Update.
6743 * inferiors.h (struct process_info): Rename member "head" to "entry".
6744 * linux-low.c (delete_lwp): Update.
6745 (add_lwp): Update.
6746 (last_thread_of_process_p): Update.
6747 (kill_one_lwp_callback, linux_kill): Update.
6748 (status_pending_p_callback): Update.
6749 (wait_for_sigstop): Update. Simplify read of ptid.
6750 (start_step_over): Update.
6751 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6752 (get_lwp_thread): Update.
6753 (struct lwp_info): Rename member "head" to "entry".
6754 * regcache.h (inferior_list_entry): Delete.
6755 * server.c (kill_inferior_callback): Update.
6756 (detach_or_kill_inferior_callback): Update.
6757 (print_started_pid): Update.
6758 (print_attached_pid): Update.
6759 (process_serial_event): Simplify read of ptid.
6760 * thread-db.c (thread_db_create_event): Update.
6761 (thread_db_get_tls_address): Update.
6762 * win32-low.c (current_inferior_ptid): Simplify.
6763
46917d26
TT
67642014-02-19 Tom Tromey <tromey@redhat.com>
6765
6766 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6767 argument.
6768 (target_supports_btrace): Update.
6769
0759a81e
YQ
67702014-02-14 Yao Qi <yao@codesourcery.com>
6771
6772 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6773 (rsp-low-ipa.o): New target.
6774
a7191e8b
TT
67752014-02-12 Tom Tromey <tromey@redhat.com>
6776
6777 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6778 convert_ascii_to_int.
6779 * regcache.c (registers_to_string): Likewise.
6780 * remote-utils.c (decode_M_packet): Likewise.
6781 * server.c (process_serial_event): Likewise.
6782
ff0e980e
TT
67832014-02-12 Tom Tromey <tromey@redhat.com>
6784
6785 * server.c (handle_query, handle_v_run): Use hex2bin, not
6786 unhexify.
6787 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6788
e9371aff
TT
67892014-02-12 Tom Tromey <tromey@redhat.com>
6790
6791 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6792 convert_int_to_ascii.
6793 * regcache.c (registers_to_string, collect_register_as_string):
6794 Likewise.
6795 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6796 Likewise.
6797 * server.c (process_serial_event): Likewise.
6798 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6799 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6800
971dc0b8
TT
68012014-02-12 Tom Tromey <tromey@redhat.com>
6802
6803 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6804 bin2hex, not hexify.
6805 * tracepoint.c (cmd_qtstatus): Likewise.
6806
0a822afb
TT
68072014-02-12 Tom Tromey <tromey@redhat.com>
6808
6809 * remote-utils.c (monitor_output): Pass explicit length to
6810 hexify.
6811
9c3d6531
TT
68122014-02-12 Tom Tromey <tromey@redhat.com>
6813
6814 * tracepoint.c: Include rsp-low.h.
6815 * server.c: Include rsp-low.h.
6816 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6817 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6818 declare.
6819 * remote-utils.c: Include rsp-low.h.
6820 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6821 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6822 (convert_int_to_ascii, convert_ascii_to_int): Move to
6823 common/rsp-low.c.
6824 * regcache.c: Include rsp-low.h.
6825 * ax.c: Include rsp-low.h.
6826 * Makefile.in (SFILES): Add common/rsp-low.c.
6827 (OBS): Add rsp-low.o.
6828 (rsp-low.o): New target.
6829
01fd3ea5
TT
68302014-02-12 Tom Tromey <tromey@redhat.com>
6831
6832 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6833 Include print-utils.h.
6834 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6835 (plongest, thirty_two, phex_nz): Remove.
6836 * Makefile.in (SFILES): Add common/print-utils.c.
6837 (OBS): Add print-utils.o.
6838 (print-utils-ipa.o): New target.
6839 (print-utils.o): New target.
6840 (IPA_OBJS): Add print-utils-ipa.o.
6841
e99dc820
TT
68422014-02-06 Tom Tromey <tromey@redhat.com>
6843
6844 * Makefile.in (SFILES): Fix indentation.
6845
ee1e2d4f
DE
68462014-02-05 Doug Evans <dje@google.com>
6847
6848 * linux-low.c (linux_wait_for_event): Improve comment.
6849 (linux_wait_1): Keep current_inferior in sync with event_child.
6850
f5a02773
DE
68512014-01-22 Doug Evans <dje@google.com>
6852
6853 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6854
87ce2a04
DE
68552014-01-22 Doug Evans <dje@google.com>
6856
6857 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6858 * configure: Regenerate.
6859 * config.in: Regenerate.
6860 * Makefile.in (SFILES): Add debug.c.
6861 (OBS): Add debug.o.
6862 * debug.c: New file.
6863 * debug.h: New file.
6864 * linux-aarch64-low.c (*): Update all debugging printfs to use
6865 debug_printf instead of fprintf.
6866 * linux-arm-low.c (*): Ditto.
6867 * linux-cris-low.c (*): Ditto.
6868 * linux-crisv32-low.c (*): Ditto.
6869 * linux-m32r-low.c (*): Ditto.
6870 * linux-sparc-low.c (*): Ditto.
6871 * linux-x86.c (*): Ditto.
6872 * linux-low.c (*): Ditto.
6873 (linux_wait_1): Add calls to debug_enter, debug_exit.
6874 (linux_wait): Remove redundant debugging printf.
6875 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6876 (linux_resume, unstop_all_lwps): Ditto.
6877 * mem-break.c (*): Update all debugging printfs to use
6878 debug_printf instead of fprintf.
6879 * remote-utils.c (*): Ditto.
6880 * thread-db.c (*): Ditto.
6881 * server.c #include <ctype.h>, "gdb_vecs.h".
6882 (debug_threads): Moved to debug.c.
6883 (*): Update all debugging printfs to use debug_printf instead of
6884 fprintf.
6885 (start_inferior): Replace call to fflush with call to debug_flush.
6886 (monitor_show_help): Mention set debug-format.
6887 (parse_debug_format_options): New function.
6888 (handle_monitor_command): Handle "monitor set debug-format".
6889 (gdbserver_usage): Mention --debug-format.
6890 (main): Parse --debug-format.
6891 * server.h (debug_threads): Declaration moved to debug.h.
6892 #include "debug.h".
6893 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6894 trace_debug_1 that uses debug_printf.
6895 (tracepoint_look_up_symbols): Update all debugging printfs to use
6896 debug_printf instead of fprintf.
6897
e671835b
BS
68982014-01-20 Baruch Siach <baruch@tkos.co.il>
6899
6900 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6901 sys/ptrace.h.
6902
b5737fa9
PA
69032014-01-17 Pedro Alves <palves@redhat.com>
6904
ea38d2a9 6905 PR build/16445
c7faa97a
PA
6906 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6907 defined after including gdb_proc_service.h.
b5737fa9 6908
40ed484e
DE
69092014-01-16 Doug Evans <dje@google.com>
6910
6911 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6912 (match_dll): Use it.
6913
969c39fb
MM
69142014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6915
6916 * target.h (target_ops) <read_btrace>: Change parameters and
6917 return type to allow error reporting.
6918 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6919 trace reading errors on.
6920 * linux-low.c (linux_low_read_btrace): Pass trace reading
6921 errors on.
6922 (linux_low_disable_btrace): New.
6923
ab7f45ba
DE
69242014-01-15 Doug Evans <dje@google.com>
6925
6926 * inferiors.c (thread_id_to_gdb_id): Delete.
6927 * inferiors.h (thread_id_to_gdb_id): Delete.
6928
66af0f44
EZ
69292014-01-13 Eli Zaretskii <eliz@gnu.org>
6930
6931 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6932 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6933 versions.
6934
9939e131
PA
69352014-01-08 Pedro Alves <palves@redhat.com>
6936
6937 * server.c (handle_status): Don't discard previous queued stop
6938 replies or thread's pending status here.
6939 (main) <disconnection>: Do it here instead.
6940
b7ea362b
PA
69412014-01-08 Pedro Alves <palves@redhat.com>
6942
6943 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6944 * server.c (visit_actioned_threads, handle_pending_status): New
6945 function.
6946 (handle_v_cont): Factor out parts to ...
6947 (resume): ... this new function. If in all-stop, and a thread
6948 being resumed has a pending status, report it without actually
6949 resuming.
6950 (myresume): Adjust to use the new 'resume' function.
6951 (clear_pending_status_callback, set_pending_status_callback)
6952 (find_status_pending_thread_callback): New functions.
6953 (handle_status): Handle the case of multiple threads having
6954 interesting statuses to report. Report threads' real last signal
6955 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6956 with an interesting thread to report the status for, instead of
6957 always reporting the status of the first thread.
6958
28498c42
JB
69592014-01-01 Joel Brobecker <brobecker@adacore.com>
6960
6961 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6962 * gdbreplay.c (gdbreplay_version): Likewise.
6963
f45c82da
YZ
69642013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6965
6966 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6967 iov.iov_len with the real length in use.
6968
379a5e2d
JB
69692013-12-13 Joel Brobecker <brobecker@adacore.com>
6970
6971 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6972 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6973 for all targets that use win32-low.c.
6974 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6975 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6976
4210d83e
PA
69772013-12-13 Pedro Alves <palves@redhat.com>
6978
6979 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6980 if equal to TARGET_WAITKIND_LOADED.
6981 * win32-low.c (cached_status): New static global.
6982 (win32_wait): Add declaration.
6983 (do_initial_child_stuff): Flush all initial pending debug events
6984 up to the initial breakpoint.
6985 (win32_wait): If CACHED_STATUS was set, return that instead
6986 of doing a real wait. Remove the code resuming the execution
6987 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6988 during the initial phase. Also remove the code changing
6989 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6990 TARGET_WAITKIND_STOPPED.
6991
e7f0d979
YQ
69922013-12-11 Yao Qi <yao@codesourcery.com>
6993
6994 * notif.c (handle_notif_ack): Return 0 if no notification
6995 matches.
6996
ebcf782c
DE
69972013-11-20 Doug Evans <dje@google.com>
6998
6999 * linux-low.c (linux_set_resume_request): Fix comment.
7000
20ad9378
DE
70012013-11-20 Doug Evans <dje@google.com>
7002
7003 * linux-low.c (resume_status_pending_p): Tweak comment.
7004
a196ebeb
WT
70052013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7006
7007 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7008 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7009 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7010 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7011 (srv_amd64_regobj): Add amd64-mpx.o.
7012 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7013 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7014 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7015 * i387-fp.c (num_pl_bnd_register) Added constant.
7016 (num_pl_bnd_cfg_registers) Added constant.
7017 (struct i387_xsave) Added reserved area and MPX fields.
7018 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7019 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7020 function.
7021 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7022 (init_registers_amd64_mpx_linux): Declare new function.
7023 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7024 (x86_64_regmap): Add MPX registers.
7025 (x86_linux_read_description): Add MPX case.
7026 (initialize_low_arch): Initialize MPX targets.
7027
0080a2f6
TT
70282013-11-18 Tom Tromey <tromey@redhat.com>
7029
7030 * configure: Rebuild.
7031 * configure.ac: Don't check for stdlib.h.
7032 * gdbreplay.c: Unconditionally include stdlib.h.
7033
2978b111
TT
70342013-11-18 Tom Tromey <tromey@redhat.com>
7035
7036 * config.in: Rebuild.
7037 * configure: Rebuild.
7038 * configure.ac: Don't use AC_HEADER_DIRENT.
7039
a3d08894
TT
70402013-11-18 Tom Tromey <tromey@redhat.com>
7041
7042 * server.h: Don't check HAVE_STRING_H.
7043 * gdbreplay.c: Don't check HAVE_STRING_H.
7044 * configure: Rebuild.
7045
0a5dd17d
TT
70462013-11-18 Tom Tromey <tromey@redhat.com>
7047
7048 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7049 LIBGNU.
7050
1bd2f0ba
TT
70512013-11-08 Tom Tromey <tromey@redhat.com>
7052
7053 * configure, config.in: Rebuild.
7054 * configure.ac: Remove unused configury.
7055
3266f10b
TT
70562013-11-08 Tom Tromey <tromey@redhat.com>
7057
7058 * acinclude.m4: Include common.m4, codeset.m4.
7059 * configure, config.in: Rebuild.
7060 * configure.ac: Use GDB_AC_COMMON.
7061
6682d959
AA
70622013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7063
7064 * linux-s390-low.c (HWCAP_S390_TE): New define.
7065 (s390_arch_setup): Consider the TE field in the HWCAP for
7066 determining 'have_regset_tdb'.
7067
fd0a4d76
SDJ
70682013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7069
7070 PR gdb/16014
7071 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7072 call to sizeof.
7073
1a3d890b
PA
70742013-10-02 Pedro Alves <palves@redhat.com>
7075
7076 * server.c (process_serial_event): Don't output "GDBserver
7077 exiting" if GDB is connected through stdio.
7078 * target.c (mywait): Likewise, be silent if GDB is connected
7079 through stdio.
7080
97ad4581
JB
70812013-10-01 Joel Brobecker <brobecker@adacore.com>
7082
7083 * lynx-low.c (lynx_add_threads_after_attach): New function.
7084 (lynx_attach): Remove call to add_thread. Add call to
7085 lynx_add_threads_after_attach instead.
7086
5b4e221c
MF
70872013-09-28 Mike Frysinger <vapier@gentoo.org>
7088
7089 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7090 * config.in, configure: Regenerated.
7091
ee47b2f8
YQ
70922013-09-18 Yao Qi <yao@codesourcery.com>
7093
7094 PR server/15959
7095 * server.c (start_inferior): Clear 'resume_info'.
7096
d6707650 70972013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7098
d6707650
JW
7099 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7100 for each register.
7101
9243dd0e 71022013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7103
9243dd0e
JW
7104 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7105 linux-tile-low.o to srv_tgtobj.
7106
c623a6ef
WN
71072013-09-16 Will Newton <will.newton@linaro.org>
7108
7109 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7110 out regs.
7111
fb71d39e
PA
71122013-09-06 Pedro Alves <palves@redhat.com>
7113
7114 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7115 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7116 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7117 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7118 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7119 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7120
8e7e9910
PA
71212013-09-06 Pedro Alves <palves@redhat.com>
7122
7123 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7124 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7125
7c3a12ca
PA
71262013-09-06 Pedro Alves <palves@redhat.com>
7127
7128 * linux-amd64-ipa.c: Include tracepoint.h.
7129 * linux-i386-ipa.c: Include tracepoint.h.
7130
8eb3d7b6
RW
71312013-09-06 Ricard Wanderlof <ricardw@axis.com>
7132
7133 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7134 (ps_get_thread_area): New function.
7135
eddddb9d
RW
71362013-09-06 Ricard Wanderlof <ricardw@axis.com>
7137
7138 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7139 (initialize_low_arch): Call init_registers_crisv32 rather than
7140 init_register_crisv32.
7141
533b0600
PA
71422013-09-05 Pedro Alves <palves@redhat.com>
7143
7144 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7145 to ...
7146 * hostio.h: ... this new file.
7147 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7148 win32-low.c: Include hostio.h.
7149
0ce3d3b5
PA
71502013-09-05 Pedro Alves <palves@redhat.com>
7151
7152 * server.h (gdb_client_data, handler_func, callback_handler_func)
7153 (delete_file_handler, add_file_handler, append_callback_event)
7154 (delete_callback_event, start_event_loop, initialize_event_loop):
7155 Move to event-loop.h and include it.
7156 * event-loop.h: New file.
7157
799cdc37
PA
71582013-09-05 Pedro Alves <palves@redhat.com>
7159
7160 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7161 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7162 (loaded_dll, unloaded_dll): Move to ...
7163 * dll.h: ... this new file.
7164 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7165
6a6bbd9d
PA
71662013-09-05 Pedro Alves <palves@redhat.com>
7167
7168 * server.h (current_process, get_thread_process, all_processes)
7169 (add_inferior_to_list, for_each_inferior, current_inferior)
7170 (remove_inferior, add_process, remove_process, find_process_pid)
7171 (have_started_inferiors_p, have_attached_inferiors_p)
7172 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7173 (clear_inferiors, find_inferior, find_inferior_id)
7174 (inferior_target_data, set_inferior_target_data)
7175 (inferior_regcache_data, set_inferior_regcache_data): Move to
7176 inferiors.h, and include it.
7177 * inferiors.h: New file.
7178
f699aaba
PA
71792013-09-05 Pedro Alves <palves@redhat.com>
7180
7181 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7182 Move ...
72f4393d 7183 * ax.h: ... here.
f699aaba 7184
c144c7a0
PA
71852013-09-05 Pedro Alves <palves@redhat.com>
7186
7187 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7188 tracepoint.h.
7189 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7190 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7191 (handle_tracepoint_general_set, handle_tracepoint_query)
7192 (tracepoint_finished_step, tracepoint_was_hit)
7193 (release_while_stepping_state_list, current_traceframe)
7194 (in_readonly_region, traceframe_read_mem)
7195 (fetch_traceframe_registers, traceframe_read_sdata)
7196 (traceframe_read_info, struct fast_tpoint_collect_status)
7197 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7198 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7199 (supply_fast_tracepoint_registers)
7200 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7201 (ipa_tdesc, claim_trampoline_space)
7202 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7203 (agent_mem_read, agent_get_trace_state_variable_value)
7204 (agent_set_trace_state_variable_value, agent_tsv_read)
7205 (agent_mem_read_string, get_raw_reg_func_addr)
7206 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7207 * tracepoint.h: ... this new file.
7208
ff42e6ab
PA
72092013-09-05 Pedro Alves <palves@redhat.com>
7210
7211 * server.h (perror_with_name, error, fatal, warning, paddress)
7212 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7213 include it.
7214 * utils.h: New file.
7215
541af0f4
PA
72162013-09-05 Pedro Alves <palves@redhat.com>
7217
7218 * server.h (remote_debug, noack_mode, transport_is_reliable)
7219 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7220 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7221 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7222 (write_enn, initialize_async_io, enable_async_io)
7223 (disable_async_io, check_remote_input_interrupt_request)
7224 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7225 (dead_thread_notify, prepare_resume_reply)
7226 (decode_address_to_semicolon, decode_address, decode_m_packet)
7227 (decode_M_packet, decode_X_packet, decode_xfer_write)
7228 (decode_search_memory_packet, unhexify, hexify)
7229 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7230 (look_up_one_symbol, relocate_instruction)
7231 (monitor_output): Move to remote-utils.h, and include it.
7232 * remote-utils.h: New file.
7233
eebdf26b
PA
72342013-09-05 Pedro Alves <palves@redhat.com>
7235
7236 * server.h (_): Delete.
7237
3aafd2ff
PA
72382013-09-02 Pedro Alves <palves@redhat.com>
7239
7240 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7241 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7242 allocated.
7243 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7244
cee83bcb
PM
72452013-09-02 Pierre Muller <muller@sourceware.org>
7246
7247 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7248 or WriteProcessMemory complete successfully and handle
7249 ERROR_PARTIAL_COPY error.
7250
9a13b2fa
PA
72512013-09-02 Pedro Alves <palves@redhat.com>
7252
7253 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7254 error instead of EIO.
7255
602e3198
JK
72562013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7257
7258 PR server/15604
7259 * linux-low.c: Include filestuff.h.
7260 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7261 * lynx-low.c: Include filestuff.h.
7262 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7263 * server.c: Include filestuff.h.
7264 (main): Call notice_open_fds.
7265 * spu-low.c: Include filestuff.h.
7266 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7267
96d7229d
LM
72682013-08-22 Luis Machado <lgustavo@codesourcery.com>
7269
7270 * Makefile.in: Explain why ../target and ../nat are not
7271 listed as include file search paths.
7272 (linux-waitpid.o): New object file rule.
7273 * configure.srv (srv_native_linux_obj): New variable.
7274 Replace all occurrences of linux native object files with
7275 $srv_native_linux_obj.
7276 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7277 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7278 (linux_enable_event_reporting): Remove declaration.
7279 (my_waitpid): Moved to common/linux-waitpid.c.
7280 (linux_wait_for_event): Pass ptid when calling
7281 linux_enable_event_reporting.
7282 (linux_supports_tracefork_flag): Remove.
7283 (linux_enable_event_reporting): Likewise.
7284 (linux_tracefork_grandchild): Remove.
7285 (STACK_SIZE): Moved to common/linux-ptrace.c.
7286 (linux_tracefork_child): Remove.
7287 (linux_test_for_tracefork): Remove.
7288 (linux_look_up_symbols): Call linux_supports_traceclone.
7289 (initialize_low): Remove call to linux_test_for_tracefork.
7290 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7291 common/linux-ptrace.h.
7292 (PTRACE_TYPE_ARG4): Likewise.
7293 Include linux-ptrace.h.
7294
32940073
PA
72952013-08-21 Pedro Alves <palves@redhat.com>
7296
7297 * config.in: Renegerate.
7298
33b60d58 72992013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7300
33b60d58
LM
7301 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7302 (SFILES): Remove $(srcdir)/common/target-common.c and
7303 add $(srcdir)/target/waitstatus.c.
7304 (OBS): Remove target-common.o and add waitstatus.o.
7305 (server_h): Remove $(srcdir)/../common/target-common.h and
7306 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7307 and $(srcdir)/../target/waitstatus.h.
7308 (target-common.o): Remove.
7309 (waitstatus.o): New target object file.
7310 * target.h: Do not include target-common.h and
7311 include target/resume.h, target/wait.h and
7312 target/waitstatus.h.
7313
b8e1b30e
LM
73142013-08-13 Luis Machado <lgustavo@codesourcery.com>
7315
7316 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7317 to PTRACE_TYPE_ARG3.
7318 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7319 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7320 PTRACE_TYPE_ARG4.
7321 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7322 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7323
7a60ad40
YQ
73242013-07-27 Jie Zhang <jie@codesourcery.com>
7325 Daniel Jacobowitz <dan@codesourcery.com>
7326 Yao Qi <yao@codesourcery.com>
7327
7328 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7329 (mips-linux-watch.o): New rule.
7330 (mips_linux_watch_h): New variable.
7331 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7332 srv_tgtobj.
7333 * linux-mips-low.c: Include mips-linux-watch.h.
7334 (struct arch_process_info, struct arch_lwp_info): New.
7335 (update_watch_registers_callback): New function.
7336 (mips_linux_new_process, mips_linux_new_thread) New functions.
7337 (mips_linux_prepare_to_resume, mips_insert_point): New
7338 functions.
7339 (mips_remove_point, mips_stopped_by_watchpoint): New
7340 functions.
7341 (rsp_bp_type_to_target_hw_bp_type): New function.
7342 (mips_stopped_data_address): New function.
7343 (the_low_target): Add watchpoint support functions.
7344
de6f69ad
YQ
73452013-07-27 Yao Qi <yao@codesourcery.com>
7346
7347 * i386-low.c: Include break-common.h.
7348 (enum target_hw_bp_type): Remove.
7349
3360c0bf
LM
73502013-07-24 Luis Machado <lgustavo@codesourcery.com>
7351
7352 * Makefile.in (SFILES): /common/target-common.c.
7353 (OBS): Add target-common.o.
7354 (server_h): Add $(srcdir)/../common/target-common.h.
7355 (target-common.o): New target.
7356 * server.c (queue_stop_reply_callback): Free
7357 status string after use.
7358 * target.c (target_waitstatus_to_string): Remove.
7359 * target.h: Include target-common.h.
7360 (resume_kind): Likewise.
7361 (target_waitkind): Likewise.
7362 (target_waitstatus): Likewise.
7363 (TARGET_WNOHANG): Likewise.
7364
bd885420
YQ
73652013-07-04 Yao Qi <yao@codesourcery.com>
7366
7367 * Makefile.in (host_alias): Use @host_noncanonical@.
7368 (target_alias): Use @target_noncanonical@.
7369 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7370 ACX_NONCANONICAL_HOST.
7371 * configure: Regenerated.
7372
7373 Revert:
7374 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7375
7376 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7377 * configure: Rebuild.
7378 * Makefile.in (version_host, version_target): Get from configure.
7379 (version.c): Use $(version_host) and $(version_target).
7380
17ef446e
PA
73812013-07-03 Pedro Alves <palves@redhat.com>
7382
7383 * Makefile.in (config.status): Depend on development.sh.
7384 * acinclude.m4: Include libmcheck.m4.
7385 * configure: Regenerate.
7386
7a9a7487
MG
73872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7388
7389 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7390 attribute inside the parentheses.
7391 (winapi_DebugSetProcessKillOnExit): Ditto.
7392 (winapi_DebugBreakProcess): Ditto.
7393 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7394
49b64de6
MG
73952013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7396
7397 * notif.h (notif_event): Add a dummy member to avoid compiler
7398 errors.
7399
d5749ee7
PA
74002013-07-01 Pedro Alves <palves@redhat.com>
7401
7402 * hostio.c (HOSTIO_PATH_MAX): Define.
7403 (require_filename, handle_open, handle_unlink, handle_readlink):
7404 Use it.
7405
d8d2a3ee
PA
74062013-07-01 Pedro Alves <palves@redhat.com>
7407
7408 * server.h: Include "pathmax.h".
7409 * linux-low.c: Don't include sys/param.h.
7410 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7411 MAXPATHLEN.
7412 * win32-low.c: Don't include sys/param.h.
7413 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7414
bc7dea8d
PA
74152013-07-01 Pedro Alves <palves@redhat.com>
7416
7417 * event-loop.c: Don't check HAVE_UNISTD_H before including
7418 <unistd.h>.
7419 * gdbreplay.c: Likewise.
7420 * remote-utils.c: Likewise.
7421 * server.c: Likewise.
7422 * configure.ac: Don't check for unistd.h.
7423 * configure: Regenerate.
7424
d6c2da54
TT
74252013-06-28 Tom Tromey <tromey@redhat.com>
7426
7427 * Makefile.in (version.c): Use version.in, not
7428 common/version.in.
7429
257b6bec
MG
74302013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7431
7432 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7433 * configure: Rebuild.
7434 * Makefile.in (version_host, version_target): Get from configure.
7435 (version.c): Use $(version_host) and $(version_target).
7436
86ebe149
DK
74372013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7438
7439 Fix trace-status to output user name without trailing colon.
7440 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7441
f30aa5af
DK
74422013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7443
7444 Fix trace-status to output proper start-time and stop-time.
7445 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7446 output start time and stop time in hex as gdb expects.
7447
28a93511
YQ
74482013-06-26 Pedro Alves <pedro@codesourcery.com>
7449
7450 * tracepoint.c (build_traceframe_info_xml): Output trace state
7451 variables present in the trace buffer.
7452
01208463
TT
74532013-06-24 Tom Tromey <tromey@redhat.com>
7454
7455 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7456 create-version.sh.
7457 (version.o): Remove.
7458 * gdbreplay.c: Include version.h.
7459 (version, host_name): Don't declare.
7460 * server.h: Include version.h.
7461 (version, host_name): Don't declare.
7462
760256f9
PA
74632013-06-12 Pedro Alves <palves@redhat.com>
7464
7465 * linux-x86-low.c (linux_is_elf64): Delete global.
7466 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7467 with local linux_pid_exe_is_elf_64_file use.
7468
030031ee
PA
74692013-06-11 Pedro Alves <palves@redhat.com>
7470
7471 * linux-low.c (regset_disabled, disable_regset): New functions.
7472 (regsets_fetch_inferior_registers)
7473 (regsets_store_inferior_registers): Use them.
7474 (initialize_regsets_info); Don't allocate the disabled_regsets
7475 array here.
7476 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7477 comment.
7478
5da6eb0a
PA
74792013-06-11 Pedro Alves <palves@redhat.com>
7480
7481 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7482 xmalloc.
7483
7e5aaa09
PA
74842013-06-11 Pedro Alves <palves@redhat.com>
7485
7486 * linux-x86-low.c (initialize_low_arch): Call
7487 init_registers_x32_avx_linux.
7488
d878444c
JK
74892013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7490
7491 Fix compatibility with Android Bionic.
7492 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7493 it is not empty.
7494
3aee8918
PA
74952013-06-07 Pedro Alves <palves@redhat.com>
7496
5f2b57b5 7497 PR server/14823
3aee8918
PA
7498 * Makefile.in (OBS): Add tdesc.o.
7499 (IPA_OBJS): Add tdesc-ipa.o.
7500 (tdesc-ipa.o): New rule.
7501 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7502 interface.
7503 * linux-low.c (new_inferior): Delete.
7504 (disabled_regsets, num_regsets): Delete.
7505 (linux_add_process): Adjust to set the new per-process
7506 new_inferior flag.
7507 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7508 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7509 was a stop. When calling arch_setup, switch the current inferior
7510 to the thread that got an event.
7511 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7512 (regsets_fetch_inferior_registers)
7513 (regsets_store_inferior_registers): New regsets_info parameter.
7514 Adjust to use it.
7515 (linux_register_in_regsets): New regs_info parameter. Adjust to
7516 use it.
7517 (register_addr, fetch_register, store_register): New usrregs_info
7518 parameter. Adjust to use it.
7519 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7520 parameter regs_info. Adjust to use it.
7521 (linux_fetch_registers): Get the current inferior's regs_info, and
7522 adjust to use it.
7523 (linux_store_registers): Ditto.
7524 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7525 (initialize_low): Don't initialize the target_regsets here. Call
7526 initialize_low_arch.
7527 * linux-low.h (target_regsets): Delete declaration.
7528 (struct regsets_info): New.
7529 (struct usrregs_info): New.
7530 (struct regs_info): New.
7531 (struct process_info_private) <new_inferior>: New field.
7532 (struct linux_target_ops): Delete the num_regs, regmap, and
7533 regset_bitmap fields. New field regs_info.
7534 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7535 * i387-fp.c (num_xmm_registers): Delete.
7536 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7537 calls to new interface.
7538 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7539 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7540 Infer the number of xmm registers from the regcache's target
7541 description.
7542 * i387-fp.h (num_xmm_registers): Delete.
7543 * inferiors.c (add_thread): Don't install the thread's regcache
7544 here.
7545 * proc-service.c (gregset_info): Fetch the current inferior's
7546 regs_info. Adjust to use it.
7547 * regcache.c: Include tdesc.h.
7548 (register_bytes, reg_defs, num_registers)
7549 (gdbserver_expedite_regs): Delete.
7550 (get_thread_regcache): If the thread doesn't have a regcache yet,
7551 create one, instead of aborting gdbserver.
7552 (regcache_invalidate_one): Rename to ...
7553 (regcache_invalidate_thread): ... this.
7554 (regcache_invalidate_one): New.
7555 (regcache_invalidate): Only invalidate registers of the current
7556 process.
7557 (init_register_cache): Add target_desc parameter, and use it.
7558 (new_register_cache): Ditto. Assert the target description has a
7559 non zero registers_size.
7560 (regcache_cpy): Add assertions. Adjust.
7561 (realloc_register_cache, set_register_cache): Delete.
7562 (registers_to_string, registers_from_string): Adjust.
7563 (find_register_by_name, find_regno, find_register_by_number)
7564 (register_cache_size): Add target_desc parameter, and use it.
7565 (free_register_cache_thread, free_register_cache_thread_one)
7566 (regcache_release, register_cache_size): New.
7567 (register_size): Add target_desc parameter, and use it.
7568 (register_data, supply_register, supply_register_zeroed)
7569 (supply_regblock, supply_register_by_name, collect_register)
7570 (collect_register_as_string, collect_register_by_name): Adjust.
7571 * regcache.h (struct target_desc): Forward declare.
7572 (struct regcache) <tdesc>: New field.
7573 (init_register_cache, new_register_cache): Add target_desc
7574 parameter.
7575 (regcache_invalidate_thread): Declare.
7576 (regcache_invalidate_one): Delete declaration.
7577 (regcache_release): Declare.
7578 (find_register_by_number, register_cache_size, register_size)
7579 (find_regno): Add target_desc parameter.
7580 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7581 declarations.
7582 * remote-utils.c: Include tdesc.h.
7583 (outreg, prepare_resume_reply): Adjust.
7584 * server.c: Include tdesc.h.
7585 (gdbserver_xmltarget): Delete declaration.
7586 (get_features_xml, process_serial_event): Adjust.
7587 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7588 declare.
7589 (struct process_info) <tdesc>: New field.
7590 (ipa_tdesc): Declare.
7591 * tdesc.c: New file.
7592 * tdesc.h: New file.
7593 * tracepoint.c: Include tdesc.h.
7594 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7595 (get_context_regcache): Adjust to pass ipa_tdesc down.
7596 (do_action_at_tracepoint): Adjust to get the register cache size
7597 from the context regcache's description.
7598 (traceframe_walk_blocks): Adjust to get the register cache size
7599 from the current trace frame's description.
7600 (traceframe_get_pc): Adjust to get current trace frame's
7601 description and pass it down.
7602 (gdb_collect): Adjust to get the register cache size from the
7603 IPA's description.
7604 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7605 (gdbserver_xmltarget): Delete.
7606 (initialize_low_tracepoint): Set the ipa's target description.
7607 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7608 (initialize_low_tracepoint): Set the ipa's target description.
7609 * linux-x86-low.c: Include tdesc.h.
7610 [__x86_64__] (is_64bit_tdesc): New.
7611 (ps_get_thread_area, x86_get_thread_area): Use it.
7612 (i386_cannot_store_register): Rename to ...
7613 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7614 (i386_cannot_fetch_register): Rename to ...
7615 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7616 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7617 to new interface.
7618 (target_regsets): Rename to ...
7619 (x86_regsets): ... this.
7620 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7621 interface.
7622 (x86_siginfo_fixup): Use is_64bit_tdesc.
7623 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7624 (tdesc_x32_avx_linux, tdesc_x32_linux)
7625 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7626 Declare.
7627 (x86_linux_update_xmltarget): Delete.
7628 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7629 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7630 (AMD64_LINUX_USER64_CS): New.
7631 (x86_linux_read_description): New, based on
7632 x86_linux_update_xmltarget.
7633 (same_process_callback): New.
7634 (x86_arch_setup_process_callback): New.
7635 (x86_linux_update_xmltarget): New.
7636 (x86_regsets_info): New.
7637 (amd64_linux_regs_info): New.
7638 (i386_linux_usrregs_info): New.
7639 (i386_linux_regs_info): New.
7640 (x86_linux_regs_info): New.
7641 (x86_arch_setup): Reimplement.
7642 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7643 (x86_emit_ops): Ditto.
7644 (the_low_target): Adjust. Install x86_linux_regs_info,
7645 x86_cannot_fetch_register, and x86_cannot_store_register.
7646 (initialize_low_arch): New.
7647 * linux-ia64-low.c (tdesc_ia64): Declare.
7648 (ia64_fetch_register): Adjust.
7649 (ia64_usrregs_info, regs_info): New globals.
7650 (ia64_regs_info): New function.
7651 (the_low_target): Adjust.
7652 (initialize_low_arch): New function.
7653 * linux-sparc-low.c (tdesc_sparc64): Declare.
7654 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7655 Adjust.
7656 (sparc_arch_setup): New function.
7657 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7658 (the_low_target): Adjust.
7659 (initialize_low_arch): New function.
7660 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7661 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7662 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7663 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7664 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7665 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7666 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7667 (tdesc_powerpc_isa205_vsx64l): Declare.
7668 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7669 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7670 (ppc_set_pc, ppc_get_hwcap): Adjust.
7671 (ppc_usrregs_info): Forward declare.
7672 (!__powerpc64__) ppc_regmap_adjusted: New global.
7673 (ppc_arch_setup): Adjust to the current process'es target
7674 description.
7675 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7676 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7677 (ppc_store_evrregset): Adjust.
7678 (target_regsets): Rename to ...
7679 (ppc_regsets): ... this, and make static.
7680 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7681 (ppc_regs_info): New function.
7682 (the_low_target): Adjust.
7683 (initialize_low_arch): New function.
7684 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7685 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7686 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7687 (tdesc_s390x_linux64v2): Declare.
7688 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7689 (s390_fill_gregset, s390_store_last_break): Adjust.
7690 (target_regsets): Rename to ...
7691 (s390_regsets): ... this, and make static.
7692 (s390_get_pc, s390_set_pc): Adjust.
7693 (s390_get_hwcap): New target_desc parameter, and use it.
7694 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7695 (s390_arch_setup): Adjust to set the current process'es target
7696 description. Don't adjust the regmap.
7697 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7698 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7699 (regs_info_3264): New globals.
7700 (s390_regs_info): New function.
7701 (the_low_target): Adjust.
7702 (initialize_low_arch): New function.
7703 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7704 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7705 [__mips64] (init_registers_mips_linux)
7706 (init_registers_mips_dsp_linux): Delete defines.
7707 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7708 (have_dsp): New global.
7709 (mips_read_description): New, based on mips_arch_setup.
7710 (mips_arch_setup): Reimplement.
7711 (get_usrregs_info): New function.
7712 (mips_cannot_fetch_register, mips_cannot_store_register)
7713 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7714 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7715 (target_regsets): Rename to ...
7716 (mips_regsets): ... this, and make static.
7717 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7718 (dsp_regs_info, regs_info): New globals.
7719 (mips_regs_info): New function.
7720 (the_low_target): Adjust.
7721 (initialize_low_arch): New function.
7722 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7723 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7724 Declare.
7725 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7726 (arm_read_description): New, with bits factored from
7727 arm_arch_setup.
7728 (arm_arch_setup): Reimplement.
7729 (target_regsets): Rename to ...
7730 (arm_regsets): ... this, and make static.
7731 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7732 (arm_regs_info): New function.
7733 (the_low_target): Adjust.
7734 (initialize_low_arch): New function.
7735 * linux-m68k-low.c (tdesc_m68k): Declare.
7736 (target_regsets): Rename to ...
7737 (m68k_regsets): ... this, and make static.
7738 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7739 (m68k_regs_info): New function.
7740 (m68k_arch_setup): New function.
7741 (the_low_target): Adjust.
7742 (initialize_low_arch): New function.
7743 * linux-sh-low.c (tdesc_sharch): Declare.
7744 (target_regsets): Rename to ...
7745 (sh_regsets): ... this, and make static.
7746 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7747 (sh_regs_info, sh_arch_setup): New functions.
7748 (the_low_target): Adjust.
7749 (initialize_low_arch): New function.
7750 * linux-bfin-low.c (tdesc_bfin): Declare.
7751 (bfin_arch_setup): New function.
7752 (bfin_usrregs_info, regs_info): New globals.
7753 (bfin_regs_info): New function.
7754 (the_low_target): Adjust.
7755 (initialize_low_arch): New function.
7756 * linux-cris-low.c (tdesc_cris): Declare.
7757 (cris_arch_setup): New function.
7758 (cris_usrregs_info, regs_info): New globals.
7759 (cris_regs_info): New function.
7760 (the_low_target): Adjust.
7761 (initialize_low_arch): New function.
7762 * linux-cris-low.c (tdesc_crisv32): Declare.
7763 (cris_arch_setup): New function.
7764 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7765 (cris_regs_info): New function.
7766 (the_low_target): Adjust.
7767 (initialize_low_arch): New function.
7768 * linux-m32r-low.c (tdesc_m32r): Declare.
7769 (m32r_arch_setup): New function.
7770 (m32r_usrregs_info, regs_info): New globals.
7771 (m32r_regs_info): Adjust.
7772 (initialize_low_arch): New function.
7773 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7774 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7775 (tic6x_usrregs_info): Forward declare.
7776 (tic6x_read_description): New function, based on ...
7777 (tic6x_arch_setup): ... this. Reimplement.
7778 (target_regsets): Rename to ...
7779 (tic6x_regsets): ... this, and make static.
7780 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7781 (tic6x_regs_info): New function.
7782 (the_low_target): Adjust.
7783 (initialize_low_arch): New function.
7784 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7785 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7786 (target_regsets): Rename to ...
7787 (xtensa_regsets): ... this, and make static.
7788 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7789 globals.
7790 (xtensa_arch_setup, xtensa_regs_info): New functions.
7791 (the_low_target): Adjust.
7792 (initialize_low_arch): New function.
7793 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7794 (nios2_arch_setup): Set the current process'es tdesc.
7795 (target_regsets): Rename to ...
7796 (nios2_regsets): ... this.
7797 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7798 (nios2_regs_info): New function.
7799 (the_low_target): Adjust.
7800 (initialize_low_arch): New function.
a261b8f5
PA
7801 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7802 (aarch64_arch_setup): Set the current process'es tdesc.
7803 (target_regsets): Rename to ...
7804 (aarch64_regsets): ... this.
7805 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7806 (aarch64_regs_info): New function.
7807 (the_low_target): Adjust.
7808 (initialize_low_arch): New function.
3aee8918
PA
7809 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7810 globals.
7811 (target_regsets): Rename to ...
7812 (tile_regsets): ... this.
7813 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7814 (tile_regs_info): New function.
7815 (tile_arch_setup): Set the current process'es tdesc.
7816 (the_low_target): Adjust.
7817 (initialize_low_arch): New function.
7818 * spu-low.c (tdesc_spu): Declare.
7819 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7820 * win32-arm-low.c (tdesc_arm): Declare.
7821 (arm_arch_setup): New function.
7822 (the_low_target): Install arm_arch_setup instead of
7823 init_registers_arm.
7824 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7825 (init_windows_x86): Rename to ...
7826 (i386_arch_setup): ... this. Set `win32_tdesc'.
7827 (the_low_target): Adjust.
7828 * win32-low.c (win32_tdesc): New global.
7829 (child_add_thread): Don't create the thread cache here.
7830 (do_initial_child_stuff): Set the new process'es tdesc.
7831 * win32-low.h (struct target_desc): Forward declare.
7832 (win32_tdesc): Declare.
7833 * lynx-i386-low.c (tdesc_i386): Declare global.
7834 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7835 * lynx-low.c (lynx_tdesc): New global.
7836 (lynx_add_process): Set the new process'es tdesc.
7837 * lynx-low.h (struct target_desc): Forward declare.
7838 (lynx_tdesc): Declare global.
7839 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7840 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7841 * nto-low.c (nto_tdesc): New global.
7842 (do_attach): Set the new process'es tdesc.
7843 * nto-low.h (struct target_desc): Forward declare.
7844 (nto_tdesc): Declare.
7845 * nto-x86-low.c (tdesc_i386): Declare.
7846 (nto_x86_arch_setup): Set `nto_tdesc'.
7847
b1fbec62
GB
78482013-06-04 Gary Benson <gbenson@redhat.com>
7849
7850 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7851 to qSupported response when appropriate.
7852 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7853 with nonzero-length annex.
7854 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7855 arguments supplied in annex.
7856
d1ec4ce7
DE
78572013-05-31 Doug Evans <dje@google.com>
7858
ac44adcb 7859 PR server/15594
d1ec4ce7
DE
7860 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7861 64 bits in 64-cross-32 environment.
7862
9b25f2d3
PA
78632013-05-28 Pedro Alves <palves@redhat.com>
7864
7865 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7866 (aarch64-without-fpu.c): Delete rule.
7867 * configure.srv (aarch64*-*-linux*): Remove references to
7868 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7869 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7870 declaration.
7871
6740dc9c
PA
78722013-05-24 Pedro Alves <palves@redhat.com>
7873
7874 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7875 instead of strchr/decode_address. Error if the range isn't split
7876 with a ','. Don't assume there's be a ':' in the action.
7877
c2d6af84
PA
78782013-05-23 Yao Qi <yao@codesourcery.com>
7879 Pedro Alves <palves@redhat.com>
7880
7881 * linux-low.c (lwp_in_step_range): New function.
7882 (linux_wait_1): If the thread was range stepping and stopped
7883 outside the stepping range, report the stop to GDB. Otherwise,
7884 continue stepping. Add range stepping debug output.
7885 (linux_set_resume_request): Copy the step range from the resume
7886 request to the lwp.
7887 (linux_supports_range_stepping): New.
7888 (linux_target_ops) <supports_range_stepping>: Set to
7889 linux_supports_range_stepping.
7890 * linux-low.h (struct linux_target_ops)
7891 <supports_range_stepping>: New field.
7892 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7893 * linux-x86-low.c (x86_supports_range_stepping): New.
7894 (the_low_target) <supports_range_stepping>: Set to
7895 x86_supports_range_stepping.
7896 * server.c (handle_v_cont): Handle 'r' action.
7897 (handle_v_requests): Append ";r" if the target supports range
7898 stepping.
7899 * target.h (struct thread_resume) <step_range_start,
7900 step_range_end>: New fields.
7901 (struct target_ops) <supports_range_stepping>:
7902 New field.
7903 (target_supports_range_stepping): New macro.
7904
58794e1a
JB
79052013-05-17 Joel Brobecker <brobecker@adacore.com>
7906
7907 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7908 confusion in comment.
7909
d631c5a7
JB
79102013-05-17 Joel Brobecker <brobecker@adacore.com>
7911
7912 * lynx-low.c (struct process_info_private): New type.
7913 (lynx_add_process): New function.
7914 (lynx_create_inferior, lynx_attach): Replace calls to
7915 add_process by calls to lynx_add_process.
7916 (lynx_resume): If PTID is null, then try using
7917 current_process()->private->last_wait_event_ptid.
7918 Add comments.
7919 (lynx_clear_inferiors): Delete. The contents of that function
7920 has been inlined in lynx_mourn;
7921 (lynx_wait_1): Save the ptid in the process's private data.
7922 (lynx_mourn): Free the process' private data. Replace call
7923 to lynx_clear_inferiors by call to clear_inferiors.
7924
96f7a20f
YQ
79252013-05-17 Yao Qi <yao@codesourcery.com>
7926
7927 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7928 the right place.
7929
db0dfaa0
LM
79302013-05-16 Luis Machado <lgustavo@codesourcery.com>
7931
7932 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7933 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7934 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7935 PT_TEXT_END_ADDR guards. Update comments.
7936 (linux_target_op) <read_offsets>: Conditionally define to
7937 linux_read_offsets if the target is UCLIBC and if it defines
7938 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7939
68f5f838
SL
79402013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7941 Andrew Jenner <andrew@codesourcery.com>
7942
7943 * Makefile.in (SFILES): Add linux-nios2-low.c.
7944 (clean): Add action to delete nios2-linux.c.
7945 (nios2-linux.c): New rule.
7946 * configure.srv: Add nios2*-*-linux*.
7947 * linux-nios2-low.c: New.
7948
1ebff1fd
HAQ
79492013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7950
7951 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7952
f6150862
HZ
79532013-04-25 Hui Zhu <hui@codesourcery.com>
7954
7955 PR gdb/15186
f6150862
HZ
7956 * ax.c (ax_printf): Add fflush.
7957
614c279d
TT
79582013-04-22 Tom Tromey <tromey@redhat.com>
7959
7960 * Makefile.in (SFILES): Add filestuff.c.
7961 (OBS): Add filestuff.o.
7962 (filestuff.o): New target.
7963 * config.in, configure: Rebuild.
7964 * configure.ac: Check for fdwalk, pipe2.
7965
7d4e5717
PA
79662013-04-17 Pedro Alves <palves@redhat.com>
7967
7968 * configure.ac (USE_THREAD_DB): Delete variable.
7969 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7970 Don't AC_SUBST USE_THREAD_DB.
7971 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7972 * config.in, configure: Regenerate.
7973
d5c93e41
PA
79742013-04-16 Pedro Alves <palves@redhat.com>
7975
7976 * linux-low.h (struct lwp_info) <thread_known>: Move under
7977 the USE_THREAD_DB #ifdef.
7978
04f5fe89
PA
79792013-04-16 Pedro Alves <palves@redhat.com>
7980
7981 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7982 (linux-low.o): Delete rule.
7983 * linux-low.h: Always include "gdb_thread_db.h" instead of
7984 conditionally including thread_db.h.
7985 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7986 HAVE_THREAD_DB_H.
7987
480b27bf
JK
79882013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7989
7990 * Makefile.in (install-only): Fix make install regression.
7991
43662968
JK
79922013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7993
7994 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7995 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7996 installation.
7997 * gdbserver.1: Remove.
7998
3e74e146
PA
79992013-03-22 Pedro Alves <palves@redhat.com>
8000
8001 * linux-low.c (handle_extended_wait): Don't call
8002 linux_enable_event_reporting.
8003
a8347a2a
TT
80042013-03-15 Tony Theodore <tonyt@logyst.com>
8005
8006 PR build/9098:
8007 * Makefile.in (SHELL): Use @SHELL@.
8008
eeb56fa7
SDJ
80092013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8010
8011 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8012 compiler warning.
8013
4fa7e2ff
JB
80142013-03-13 Joel Brobecker <brobecker@adacore.com>
8015
8016 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8017 Remove extraneous NULL element.
8018
8ddb1965
YQ
80192013-03-13 Yao Qi <yao@codesourcery.com>
8020
8021 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8022 'V' block in trace frame.
8023
9accd112
MM
80242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8025
8026 * target.h (struct target_ops): Add btrace ops.
8027 (target_supports_btrace): New macro.
8028 (target_enable_btrace): New macro.
8029 (target_disable_btrace): New macro.
8030 (target_read_btrace): New macro.
8031 * gdbthread.h (struct thread_info): Add btrace field.
8032 * server.c: Include btrace-common.h.
8033 (handle_btrace_general_set): New function.
8034 (handle_btrace_enable): New function.
8035 (handle_btrace_disable): New function.
8036 (handle_general_set): Call handle_btrace_general_set.
8037 (handle_qxfer_btrace): New function.
8038 (struct qxfer qxfer_packets[]): Add btrace entry.
8039 * inferiors.c (remove_thread): Disable btrace.
8040 * linux-low: Include linux-btrace.h.
8041 (linux_low_enable_btrace): New function.
8042 (linux_low_read_btrace): New function.
8043 (linux_target_ops): Add btrace ops.
8044 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8045 Add srv_linux_btrace=yes.
8046 (x86_64-*-linux*): Add linux-btrace.o.
8047 Add srv_linux_btrace=yes.
8048 * configure.ac: Define HAVE_LINUX_BTRACE.
8049 * config.in: Regenerated.
8050 * configure: Regenerated.
8051
5cc22e4c
MM
80522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8053
8054 * server.c (handle_qxfer): Preserve error message if -3 is
8055 returned.
8056 (qxfer): Document the -3 return value.
8057
7c97f91e
MM
80582013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8059
8060 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8061 (linux_btrace_h): New variable.
8062 (linux-btrace.o): New rule.
8063
be9a119c 80642013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8065 Hafiz Abid Qadeer <abidh@codesourcery.com>
8066
8067 * tracepoint.c (trace_buffer_size): New global.
8068 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8069 (init_trace_buffer): Change to one-argument function. Allocate
8070 trace buffer memory.
8071 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8072 handle QTBuffer:size packet.
8073 (cmd_bigqtbuffer_size): New function.
8074 (initialize_tracepoint): Call init_trace_buffer with
8075 DEFAULT_TRACE_BUFFER_SIZE.
8076 * server.c (handle_query): Add QTBuffer:size in the
8077 supported packets.
8078
e64f7499
YQ
80792013-03-07 Yao Qi <yao@codesourcery.com>
8080
8081 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8082 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8083 of -1.
8084 (cmd_qtsp): Adjust condition. Do post increment.
8085 Set cur_action and cur_step_action back to 0.
8086
f0ae6fc3
PA
80872013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8088
8089 PR server/15236
8090 * linux-low.c (linux_write_memory): Return early success if LEN is
8091 zero.
8092
b5b0b0af
CV
80932013-03-05 Corinna Vinschen <vinschen@redhat.de>
8094
334ad4a8 8095 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8096
589bc927
TT
80972013-02-28 Tom Tromey <tromey@redhat.com>
8098
8099 * configure.ac: Invoke AC_SYS_LARGEFILE.
8100 * configure, config.in: Rebuild.
8101
dfe07582
CV
81022013-02-28 Corinna Vinschen <vinschen@redhat.com>
8103
8104 * win32-low.c: Throughout, fix format strings and casts of
8105 printf-like functions to avoid type related warnings on all
8106 platforms.
8107 (get_child_debug_event): Print dwDebugEventCode as hex since
8108 that's how it's usually documented.
8109
736cd585
YQ
81102013-02-28 Yao Qi <yao@codesourcery.com>
8111
8112 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8113 pulongest.
8114
e1f58301
JW
81152013-02-27 Jiong Wang <jiwang@tilera.com>
8116
8117 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8118 (reg-tilegx32.c): New rule.
8119 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8120 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8121 different register info initializer according to elf class.
8122 (init_registers_tilgx32): New function. The tilegx32 register info
8123 initializer.
8124 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8125 (tile_store_gregset): Likewise.
8126
d171ca78
YQ
81272013-02-27 Yao Qi <yao@codesourcery.com>
8128
8129 * server.c (process_point_options): Print debug message when
8130 debug_threads is true.
8131
282bbdf3
YQ
81322013-02-26 Yao Qi <yao@codesourcery.com>
8133
8134 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8135
aca22551
PA
81362013-02-19 Pedro Alves <palves@redhat.com>
8137 Kai Tietz <ktietz@redhat.com>
8138
8139 PR gdb/15161
8140
8141 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8142 instead of strtoul to extract address from packet.
8143 (process_serial_event) <'z'>: Likewise.
8144
4f3cee1c
YQ
81452013-02-18 Yao Qi <yao@codesourcery.com>
8146
8147 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8148
8e1d55a3
PA
81492013-02-14 Pedro Alves <palves@redhat.com>
8150
8151 Plug memory leak.
8152
8153 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8154 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8155
458820da
PA
81562013-02-14 Pedro Alves <palves@redhat.com>
8157
8158 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8159
baea0dae
PA
81602013-02-14 Pedro Alves <palves@redhat.com>
8161
8162 * tracepoint.c (save_string): Delete.
8163 (add_tracepoint_action): Use savestring instead of save_string.
8164
0b1afbb3
PA
81652013-02-12 Pedro Alves <palves@redhat.com>
8166
8167 * linux-xtensa-low.c: Ditto.
8168 * xtensa-xtregs.c: Ditto.
8169
8a4ac37e
PA
81702013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8171
8172 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8173 thread_db.
8174
148de6bb
MS
81752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8176
8177 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8178 aarch64_num_wp_regs and aarch64_num_bp_regs to
8179 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8180
55fac6e0
MS
81812013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8182
8183 * linux-aarch64-low.c (ps_get_thread_area): Replace
8184 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8185
176eb98c
MS
81862013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8187 Marcus Shawcroft <marcus.shawcroft@arm.com>
8188 Nigel Stephens <nigel.stephens@arm.com>
8189 Yufeng Zhang <yufeng.zhang@arm.com>
8190
8191 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8192 (aarch64.c, aarch64-without-fpu.c): New targets.
8193 * configure.srv (aarch64*-*-linux*): New.
8194 * linux-aarch64-low.c: New file.
8195
56f7af9c
MS
81962013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8197
43aaf8b6 8198 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8199 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8200 (dequeue_one_deferred_signal, linux_resume_one_thread)
8201 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8202 (linux_tracefork_grandchild, linux_test_for_tracefork)
8203 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8204 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8205 where the argument is 0.
8206
60f662b0
YQ
82072013-01-25 Yao Qi <yao@codesourcery.com>
8208
8209 * event-loop.c: Include "queue.h".
8210 (gdb_event_p): New typedef.
8211 (struct gdb_event) <next_event>: Remove.
8212 (event_queue): Change to QUEUE(gdb_event_p).
8213 (async_queue_event): Remove.
8214 (gdb_event_xfree): New.
8215 (initialize_event_loop): New.
8216 (process_event): Use API from QUEUE.
8217 (wait_for_event): Likewise.
8218 * server.c (main): Call initialize_event_loop.
8219 * server.h (initialize_event_loop): Declare.
8220
5ae4861a
YQ
82212013-01-18 Yao Qi <yao@codesourcery.com>
8222
8223 * ax.h (struct eval_agent_expr_context): New.
8224 (gdb_eval_agent_expr): Update declaration.
8225 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8226 TFRAME. Add new argument CTX.
8227 * server.h (struct eval_agent_expr_context): Declare.
8228 (agent_mem_read, agent_tsv_read): Update declaration.
8229 (agent_mem_read_string): Likewise.
8230 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8231 (add_traceframe_block): Add new argument TPOINT.
8232 Increase TPOINT->traceframe_usage.
8233 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8234 eval_tracepoint_agent_expr.
8235 (condition_true_at_tracepoint): Likewise.
8236 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8237 (agent_mem_read_string, agent_tsv_read): Likewise.
8238
85e00e85
YQ
82392013-01-16 Yao Qi <yao@codesourcery.com>
8240
8241 * linux-low.c (linux_resume_one_lwp): Don't check
8242 'lwp->bp_reinsert != 0'.
8243
4039cf45
JB
82442013-01-07 Joel Brobecker <brobecker@adacore.com>
8245 Pedro Alves <palves@redhat.com>
8246
8247 * lynx-low.c (ptrace_request_to_str): Define a temporary
8248 macro and use it to simplify this function's implementation.
8249
9044dee2
JB
82502013-01-07 Joel Brobecker <brobecker@adacore.com>
8251
8252 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8253 sets errno.
8254
e6352c8f
JB
82552013-01-07 Joel Brobecker <brobecker@adacore.com>
8256
8257 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8258
50681a27
JB
82592013-01-07 Joel Brobecker <brobecker@adacore.com>
8260
8261 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8262
3f6e77ef
JB
82632013-01-07 Joel Brobecker <brobecker@adacore.com>
8264
8265 * lynx-low.c (lynx_resume): Use the resume_info parameter
8266 to determine the ptid for the lynx_ptrace call, unless
8267 it is equal to minus_one_ptid, in which case we use the
8268 ptid of the current_inferior.
8269 (lynx_wait_1): After having received a thread create/exit
8270 event, resume the inferior's execution using the signaling
8271 thread's ptid, rather than the old ptid.
8272
7fda33ae
JB
82732013-01-07 Joel Brobecker <brobecker@adacore.com>
8274
8275 * lynx-low.c (lynx_resume): Delete variable ret.
8276
b9786c74
JB
82772013-01-01 Joel Brobecker <brobecker@adacore.com>
8278
8279 * gdbreplay.c (gdbreplay_version): Update copyright year.
8280 * server.c (gdbserver_version): Likewise.
8281
8b93d60f
JB
82822012-12-17 Joel Brobecker <brobecker@adacore.com>
8283
8284 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8285 new thread.
8286
037335a7
JB
82872012-12-17 Joel Brobecker <brobecker@adacore.com>
8288
8289 * lynx-low.c (ptrace_request_to_str): Add handling for
8290 PTRACE_GETTRACESIG.
8291
52d4cbd8
JB
82922012-12-17 Joel Brobecker <brobecker@adacore.com>
8293
8294 * lynx-low.c (lynx_attach): Delete variable new_process.
8295
ab8f6ca9
JB
82962012-12-17 Joel Brobecker <brobecker@adacore.com>
8297
8298 * lynx-low.c (lynx_create_inferior): Delete variable
8299 new_process.
8300
78cbc024
JB
83012012-12-17 Joel Brobecker <brobecker@adacore.com>
8302
8303 * lynx-low.c (ptrace_request_to_str): Do not handle
8304 PTRACE_GETTHREADLIST if this macro does not exist.
8305
14a00470
YQ
83062012-12-15 Yao Qi <yao@codesourcery.com>
8307
8308 * Makefile.in (OBS): Add notif.o.
8309 * notif.c, notif.h: New.
8310 * server.c: Include "notif.h".
8311 (struct vstop_notif) <next>: Remove.
8312 <base>: New field.
8313 (queue_stop_reply): Update.
8314 (push_event, send_next_stop_reply): Remove.
8315 (discard_queued_stop_replies): Update.
8316 (notif_stop): New variable.
8317 (handle_v_stopped): Remove.
8318 (handle_v_requests): Don't call handle_v_stopped. Call
8319 handle_ack_notif instead.
8320 (queue_stop_reply_callback): Call notif_event_enque instead
8321 of queue_stop_reply.
8322 (handle_status): Don't call send_next_stop_reply, call
8323 notif_write_event instead.
8324 (kill_inferior_callback): Likewise.
8325 (detach_or_kill_inferior_callback): Likewise.
8326 (main): Call initialize_notif.
8327 (process_serial_event): Call QUEUE_is_empty.
8328 (handle_target_event): Call notif_push instead of push event.
8329 * server.h (push_event): Remove declaration.
8330
61c125b9
TT
83312012-12-10 Tom Tromey <tromey@redhat.com>
8332
8333 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8334 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8335 macros.
8336 (.c.o): Rewrite.
8337 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8338 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8339 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8340 (amd64-linux-ipa.o, ax.o): Rewrite.
8341 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8342 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8343 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8344 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8345 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8346 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8347 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8348 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8349 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8350 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8351 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8352 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8353 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8354 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8355 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8356 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8357 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8358 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8359 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8360 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8361 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8362 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8363 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8364 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8365 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8366 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8367 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8368 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8369 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8370 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8371 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8372 (reg-tilegx.o): Remove.
8373 (all_object_files): New macro.
8374 Include .deps files.
8375 * aclocal.m4, configure: Rebuild.
8376 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8377 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8378 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8379
e90e9ad9
TT
83802012-12-05 Tom Tromey <tromey@redhat.com>
8381
8382 PR gdb/14917:
8383 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8384
02d403bf 83852012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8386
8387 * configure.ac: Check for linux/perf_event.h.
8388 * config.in: Regenerated.
8389 * configure: Regenerated.
8390
0270a750
PA
83912012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8392
8393 * hostio.c (handle_readlink): Decrease buffer size
8394 parameter passed to readlink by one byte.
8395
8c29b58e
YQ
83962012-11-26 Yao Qi <yao@codesourcery.com>
8397
8398 * configure.ac (build_warnings): Append '-Wempty-body'.
8399 * configure: Regenerated.
8400 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8401 body.
8402
8bdce1ff
PM
84032012-11-15 Pierre Muller <muller@sourceware.org>
8404
8405 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8406 * config.in: Regenerate.
8407 * configure: Regenerate.
8408 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8409 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8410 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8411 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8412 header.
8413 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8414 instead of <sys/wait.h> header.
8415 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8416
02d403bf 84172012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8418
8419 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8420 (various make rules): Remove -DGDBSERVER
8421
fbd5db48
YQ
84222012-11-09 Yao Qi <yao@codesourcery.com>
8423
8424 * spu-low.c (current_ptid): Move it to ..
8425 * gdbthread.h: ... here. New.
8426 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8427 * server.c (myresume, process_serial_event): Likewise.
8428 * thread-db.c (thread_db_find_new_threads): Likewise.
8429 * tracepoint.c (run_inferior_command): Likewise.
8430
b3dc46ff
AB
84312012-10-01 Andrew Burgess <aburgess@broadcom.com>
8432
8433 * server.c (handle_search_memory_1): Include access length in
8434 warning message.
8435
07c04788
HPN
84362012-09-05 Michael Brandt <michael.brandt@axis.com>
8437
8438 * linux-crisv32-low.c: Fix compile errors.
8439
918d227b
YQ
84402012-09-04 Yao Qi <yao@codesourcery.com>
8441
8442 * tracepoint.c (cmd_qtsv): Adjust debug message.
8443 Don't check CUR_TPOINT.
8444
18c1b81a
YQ
84452012-08-28 Yao Qi <yao@codesourcery.com>
8446
8447 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8448 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8449 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8450 Remove declarations of xmalloc, xreallloc, xstrdup and
8451 freeargv.
8452 * Makefile.in (libiberty_h): New.
8453 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8454 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8455
dc82f37b
YQ
84562012-08-23 Yao Qi <yao@codesourcery.com>
8457
8458 * server.h: Remove declaration of 'xsnprintf'.
8459
406b1477
KS
84602012-08-22 Keith Seitz <keiths@redhat.com>
8461
8462 * server.h: Include build-gnulib-gbserver/config.h.
8463 * gdbreplay.c: Likewise.
8464
e6712ff1
DE
84652012-08-08 Doug Evans <dje@google.com>
8466
8467 * Makefile.in (SFILES): Add gdb_vecs.c.
8468 (OBS): Add gdb_vecs.o.
8469 (gdb_vecs_h, host_defs_h): New variables.
8470 (thread-db.o): Add $(gdb_vecs_h) dependency.
8471 (gdb_vecs.o): New rule.
8472 * thread-db.c: #include "gdb_vecs.h".
8473 (thread_db_load_search): Use a vector to iterate over path elements.
8474 Handle text appearing after "$pdir".
8475
8476 * configure.ac: Add check for strstr.
8477 * config.in: Regenerate.
8478 * configure: Regenerate.
8479
7c3270ae
UW
84802012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8481
8482 * hostio.c (handle_pread): If pread fails, fall back to attempting
8483 lseek/read.
8484 (handle_pwrite): Likewise for pwrite.
8485
b62e2b27
UW
84862012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8487
8488 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8489 between unsupported TYPE and unimplementable ADDR/LEN combination.
8490 (arm_insert_point): Act on new return value.
8491
78a99e91
PA
84922012-07-31 Pedro Alves <palves@redhat.com>
8493
8494 * server.c (process_point_options): Only skip tokens if we find
8495 one that is unrecognized. Don't treat 'X' specially while
8496 skipping unrecognized tokens.
8497
fcf303ab
UW
84982012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8499
8500 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8501 to 4-byte-align HW breakpoint addresses for Thumb.
8502
7255706c
YQ
85032012-07-27 Yao Qi <yao@codesourcery.com>
8504
8505 PR remote/14161.
8506
8507 * server.h: Declare gdb_agent_about_to_close.
8508 * target.c (kill_inferior): Include "agent.h".
8509 New. Send command 'kill'.
8510 * target.h (kill_inferior): Removed macro.
8511 * tracepoint.c (gdb_agent_about_to_close): New.
8512 (gdb_agent_helper_thread): Handle command 'close'.
8513 Wait endlessly until the inferior stops.
8514 Install gdb_agent_remove_socket to atexit hook.
8515 (agent_socket_name): New static variable.
8516 (gdb_agent_socket_init): Replace local variable 'name' with
8517 'agent_socket_name'.
8518 (gdb_agent_remove_socket): New.
8519
5a3f286f
YQ
85202012-07-27 Yao Qi <yao@codesourcery.com>
8521
8522 * server.c (process_point_options): Stop at 'X' when parsing.
8523
961bd387
ME
85242012-07-19 Michael Eager <eager@eagercon.com>
8525
a261b8f5 8526 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8527 to hw_execute.
8528 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8529 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8530 hardware breakpoint.
8531
aa7c7447
JK
85322012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8533
8534 * gdbserver/linux-low.c (initialize_low): Call
8535 linux_ptrace_init_warnings.
8536
7f216e7c
DE
85372012-07-02 Doug Evans <dje@google.com>
8538
8539 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8540 pointer to int.
8541
d3ce09f5
SS
85422012-07-02 Stan Shebs <stan@codesourcery.com>
8543
8544 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8545 (ax.o): Add it to build rule.
8546 (ax-ipa.o): Ditto.
8547 (OBS): Add format.o.
8548 (IPA_OBS): Add format.o.
8549 * server.c (handle_query): Claim support for breakpoint commands.
8550 (process_point_options): Add command case.
8551 (process_serial_event): Leave running if there are printfs in
8552 effect.
8553 * mem-break.h (any_persistent_commands): Declare.
8554 (add_breakpoint_commands): Declare.
8555 (gdb_no_commands_at_breakpoint): Declare.
8556 (run_breakpoint_commands): Declare.
8557 * mem-break.c (struct point_command_list): New struct.
8558 (struct breakpoint): New field command_list.
8559 (any_persistent_commands): New function.
8560 (add_commands_to_breakpoint): New function.
8561 (add_breakpoint_commands): New function.
8562 (gdb_no_commands_at_breakpoint): New function.
8563 (run_breakpoint_commands): New function.
8564 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8565 locally.
8566 * ax.c: Include format.h.
8567 (ax_printf): New function.
8568 (gdb_eval_agent_expr): Add printf opcode.
8569
2f8f6aed
YQ
85702012-06-13 Yao Qi <yao@codesourcery.com>
8571
8572 * server.c (start_inferior): Remove duplicated writes to fields
8573 'last_resume_kind' and 'last_status' of 'current_inferior'.
8574
0c9070b3
YQ
85752012-06-12 Yao Qi <yao@codesourcery.com>
8576 Pedro Alves <palves@redhat.com>
8577
8578 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8579 comment.
8580 * server.c (handle_v_cont): Extend comment.
8581
c52daf70
YQ
85822012-06-11 Yao Qi <yao@codesourcery.com>
8583
8584 * linux-low.c (linux_attach): Add 'static'.
8585
d38bbb0a
YQ
85862012-06-06 Yao Qi <yao@codesourcery.com>
8587
8588 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8589
89dc0afd
JK
85902012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8591
8592 Fix gcc -flto compilation warning.
8593 * server.c (main): Make variable multi_mode and attach volatile.
8594
75f62ce7
TJB
85952012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8596
8597 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8598 if the platform doesn't know about it.
8599
65f479b6
PA
86002012-05-30 Jeff Kenton <jkenton@tilera.com>
8601
8602 * Makefile.in (SFILES): Add linux-tile-low.c.
8603 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8604 * configure.srv: Handle tilegx-*-linux*.
8605 * linux-tile-low.c: New file.
8606
0c5bf5a9
JK
86072012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8608
8609 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8610
a493e3e2
PA
86112012-05-24 Pedro Alves <palves@redhat.com>
8612
8613 PR gdb/7205
8614
43aaf8b6 8615 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8616
2ea28649
PA
86172012-05-24 Pedro Alves <palves@redhat.com>
8618
8619 PR gdb/7205
8620
8621 Replace target_signal with gdb_signal throughout.
8622
8d409d16
MR
86232012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8624
8625 * linux-low.c (linux_store_registers): Avoid the copying sequence
8626 when no data has been retrieved by ptrace.
8627
23512c01
MGD
86282012-05-22 Will Deacon <will.deacon@arm.com>
8629
8630 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8631 Include asm/ptrace.h.
8632 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8633 already defined.
8634
4934b29e
MR
86352012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8636
8637 * linux-low.c (linux_store_registers): Don't re-retrieve data
8638 with ptrace that has already been obtained from /proc. Always
8639 copy any data retrieved with ptrace to the buffer supplied.
8640
bde24c0a
PA
86412012-05-11 Yao Qi <yao@codesourcery.com>
8642 Pedro Alves <palves@redhat.com>
8643
8644 * linux-low.c (enum stopping_threads_kind): New.
8645 (stopping_threads): Change type to `enum stopping_threads_kind'.
8646 (handle_extended_wait): If stopping and suspending threads, leave
8647 the new_lwp suspended too.
8648 (linux_wait_for_event): Adjust.
8649 (stop_all_lwps): Set `stopping_threads' to
8650 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8651 whether we're suspending threads or just stopping them. Assert no
8652 recursion happens.
8653
623b6bdf
YQ
86542012-04-29 Yao Qi <yao@codesourcery.com>
8655
8656 * server.h: Move some code to ...
8657 * gdbthread.h: ... here. New.
8658 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8659 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8660 (nto-low.o, win32-low.o): Likewise.
8661 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8662 * regcache.c, remote-utils.c, server.c: Likewise.
8663 * target.c, tracepoint.c, win32-low.c: Likewise.
8664
f15f9948
TJB
86652012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8666
8667 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8668 (PTRACE_ARG4_TYPE): Likewise.
8669 (PTRACE_XFER_TYPE): Likewise.
8670 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8671 ptrace to PTRACE_ARG3_TYPE.
8672 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8673 (PTRACE_ARG4_TYPE): Likewise.
8674 (PTRACE_XFER_TYPE): Likewise.
8675 (linux_detach_one_lwp): Cast fourth argument of
8676 ptrace to long then PTRACE_ARG4_TYPE.
8677 (regsets_fetch_inferior_registers): Cast third argument of
8678 ptrace to long then PTRACE_ARG3_TYPE.
8679 (regsets_store_inferior_registers): Likewise.
8680
38ea300a
PA
86812012-04-20 Pedro Alves <palves@redhat.com>
8682
8683 * configure: Regenerate.
8684
c971b7fa
PA
86852012-04-19 Pedro Alves <palves@redhat.com>
8686
43aaf8b6 8687 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8688 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8689 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8690 (all, install-only, uninstall, clean-info, all-lib, clean): No
8691 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8692 (maintainer-clean realclean distclean): Use subdir_do.
8693 (subdir_do): New.
8694 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8695 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8696 * acinclude.m4: Include acx_configure_dir.m4.
8697 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8698 calls. Call AC_PROG_RANLIB. Configure gnulib using
8699 ACX_CONFIGURE_DIR.
8700 (GNULIB): New.
8701 (GNULIB_STDINT_H): Adjust.
8702 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8703 * gdbreplay.c: Include build-gnulib/config.h.
8704 * server.h: Likewise.
8705 * aclocal.m4: Regenerate.
8706 * config.in: Regenerate.
8707 * configure: Regenerate.
c971b7fa 8708
809277f8
PA
87092012-04-19 Pedro Alves <palves@redhat.com>
8710
8711 * Makefile.in (LIBGNU, INCGNU): Adjust.
8712 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8713 (all, install-only, uninstall, clean-info, all-lib, clean)
8714 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8715 * configure.ac: Adjust AC_OUTPUT output.
8716 * aclocal.m4: Regenerate.
8717 * configure: Regenerate.
8718
fd9bb8b8
PA
87192012-04-19 Pedro Alves <palves@redhat.com>
8720
8721 * Makefile.in (generated_files): New.
8722 (server_h): Remove the explicit dependency on config.h, and depend
8723 on $generated_files.
8724
1c298c66
PA
87252012-04-19 Pedro Alves <palves@redhat.com>
8726
8727 * Makefile.in (INCGNU): Add -Ignulib.
8728
57c4b50b
PA
87292012-04-19 Pedro Alves <palves@redhat.com>
8730
8731 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8732 (INCGNU): ... this, and spell out -I here.
8733 (GNULIB_LIB): Rename to ...
8734 (LIBGNU): ... this.
8735 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8736
1030e047
PA
87372012-04-19 Pedro Alves <palves@redhat.com>
8738
8739 * config.in: Regenerate.
8740
447d4319
PA
87412012-04-19 Pedro Alves <palves@redhat.com>
8742
8743 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8744 * server.h (memmem): Remove declaration.
8745 * config.in: Regenerate.
8746 * configure: Regenerate.
8747
aad9eab9
YQ
87482012-04-19 Yao Qi <yao@codesourcery.com>
8749
8750 * Makefile.in (SFILES): Add common/vec.c.
8751 (OBS): Add vec.o.
8752 (vec.o): New rule.
8753
3e10640f
YQ
87542012-04-19 Yao Qi <yao@codesourcery.com>
8755
8756 * remote-utils.c (prepare_resume_reply): Replace with macro
8757 target_core_of_thread.
8758 * server.c (handle_qxfer_threads_proper): Likewise.
8759 * target.h (traget_core_of_thread): New macro.
8760
71622373
PA
87612012-04-18 Pedro Alves <palves@redhat.com>
8762
8763 * aclocal.m4: Regenerate.
8764 * configure: Regenerate.
8765
80d26939
YQ
87662012-04-16 Yao Qi <yao@codesourcery.com>
8767
8768 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8769 duplicated on address.
8770
42476b70
YQ
87712012-04-16 Yao Qi <yao@codesourcery.com>
8772
8773 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8774 (struct tracepoint_action_ops) <send>: New field.
8775 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8776 (agent_expr_send, x_tracepoint_action_send): New.
8777 (l_tracepoint_action_send): New.
8778 (cmd_qtdp): Download and install tracepoint
8779 according to `use_agent'.
8780 (run_inferior_command): Add one more parameter `len'.
8781 Update callers.
8782 (tracepoint_send_agent): New.
8783 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8784
7bc83639
YQ
87852012-04-16 Yao Qi <yao@codesourcery.com>
8786
8787 * tracepoint.c (download_tracepoints): Moved to ...
8788 (cmd_qtstart): ... here.
8789
5f18041e
YQ
87902012-04-14 Yao Qi <yao@codesourcery.com>
8791
8792 * tracepoint.c: Include inttypes.h.
8793 (struct collect_memory_action): Use sized types.
8794 (struct tracepoint): Likewise.
8795 (cmd_qtdp, stop_tracing): Update print specifiers.
8796 (cmd_qtp, response_tracepoint): Likewise.
8797 (collect_data_at_tracepoint): Likewise.
8798 (collect_data_at_step): Likewise.
8799
55a8c076
YQ
88002012-04-14 Yao Qi <yao@codesourcery.com>
8801
8802 Import gnulib module inttypes.
8803 * aclocal.m4, config.in, configure: Regenerated.
8804
dc750257
YQ
88052012-04-14 Yao Qi <yao@codesourcery.com>
8806
8807 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8808 Makefile and config.status at last.
8809
0ab5faf9
YQ
88102012-04-13 Yao Qi <yao@codesourcery.com>
8811
8812 * tracepoint.c: Include stdint.h unconditionally.
8813
18f5fd81
TJB
88142012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8815
8816 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8817 on BFD_HAVE_SYS_PROCFS_TYPE.
8818 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8819 * configure: Regenerate.
8820 * config.in: Likewise.
8821
4d47af5c
L
88222012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8823
8824 * Makefile.in (clean): Also remove x32.c x32-linux.c
8825 x32-avx.c x32-avx-linux.c.
8826 (x32.o): New target.
8827 (x32.c): Likewise.
8828 (x32-linux.o): Likewise.
8829 (x32-linux.c): Likewise.
8830 (x32-avx.o): Likewise.
8831 (x32-avx.c): Likewise.
8832 (x32-avx-linux.o): Likewise.
8833 (x32-avx-linux.c): Likewise.
8834
8835 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8836 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8837 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8838 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8839 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8840 i386/x32-avx-linux.xml.
8841
8842 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8843 (init_registers_x32_avx_linux): Likwise.
8844 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8845 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8846
ecedbe58
PA
88472012-04-13 Pedro Alves <palves@redhat.com>
8848
8849 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8850 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8851 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8852 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8853 the sub-make.
8854
c92b5177
L
88552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8856
8857 * linux-x86-low.c (compat_x32_clock_t): New.
8858 (compat_x32_siginfo_t): Likewise.
8859 (compat_x32_siginfo_from_siginfo): Likewise.
8860 (siginfo_from_compat_x32_siginfo): Likewise.
8861 (linux_is_elf64): Likewise.
8862 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8863 and siginfo_from_compat_x32_siginfo for x32.
8864 (x86_arch_setup): Set linux_is_elf64.
8865
214d508e
L
88662012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8867
8868 PR gdb/13969
8869 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8870 e_machine field.
8871 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8872 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8873 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8874 compatible with process.
8875
c9a1864a
YQ
88762012-04-12 Yao Qi <yao@codesourcery.com>
8877
8878 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8879 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8880 (install-only, install-info, clean): Handle sub dir gnulib.
8881 (all-lib, am--refresh): New targets.
8882 (memmem.o): Remove target.
8883 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8884 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8885 (AC_REPLACE_FUNCS): Remove memmem.
8886 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8887 (AC_OUTPUT): Generate Makefile in gnulib/.
8888 * aclocal.m4, config.in, configure: Regenerated.
8889
367ba2c2
MR
88902012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8891
8892 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8893
9d236627
PA
88942012-04-05 Pedro Alves <palves@redhat.com>
8895
8896 -Werror=strict-aliasing
8897
8898 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8899 pointer.
8900
111217b3
PA
89012012-04-04 Pedro Alves <palves@redhat.com>
8902
8903 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8904 (sparc_store_gregset_from_stack, sparc_store_gregset)
8905 (sparc_breakpoint_at): Fix formatting.
8906
8365dcf5
TJB
89072012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8908
8909 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8910 are available.
8911 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8912 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8913 * config.in: Regenerate.
8914 * configure: Likewise.
8915
689cc2ae
PA
89162012-03-29 Pedro Alves <palves@redhat.com>
8917
8918 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8919 Correct ptrace arguments.
8920
c14dfd32
PA
89212012-03-28 Pedro Alves <palves@redhat.com>
8922
8923 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8924 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8925 (IA64_FR1_REGNUM): New defines.
8926 (ia64_fetch_register): New.
8927 (the_low_target): Install it.
8928 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8929 field.
8930 * linux-low.c (linux_fetch_registers): Try the
8931 the_low_target.fetch_register hook first.
8932
8933 * linux-arm-low.c (the_low_target): Adjust.
8934 * linux-bfin-low.c (the_low_target): Adjust.
8935 * linux-cris-low.c (the_low_target): Adjust.
8936 * linux-crisv32-low.c (the_low_target): Adjust.
8937 * linux-m32r-low.c (the_low_target): Adjust.
8938 * linux-m68k-low.c (the_low_target): Adjust.
8939 * linux-mips-low.c (the_low_target): Adjust.
8940 * linux-ppc-low.c (the_low_target): Adjust.
8941 * linux-s390-low.c (the_low_target): Adjust.
8942 * linux-sh-low.c (the_low_target): Adjust.
8943 * linux-sparc-low.c (the_low_target): Adjust.
8944 * linux-tic6x-low.c (the_low_target): Adjust.
8945 * linux-x86-low.c (the_low_target): Adjust.
8946 * linux-xtensa-low.c (the_low_target): Adjust.
8947
63c88e13
PA
89482012-03-26 Pedro Alves <palves@redhat.com>
8949
8950 * server.c (handle_qxfer_libraries): Don't bail early if
8951 the_target->qxfer_libraries_svr4 is not NULL.
8952
fb723180
PA
89532012-03-26 Pedro Alves <palves@redhat.com>
8954
8955 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8956
0afae3cf
PA
89572012-03-23 Pedro Alves <palves@redhat.com>
8958
8959 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8960 "library-list-svr4" element's start tag when the the DSO list is
8961 empty.
8962
485f1ee4
PA
89632012-03-23 Pedro Alves <palves@redhat.com>
8964
8965 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8966 a variable whose type size is the same as the inferior's pointer
8967 size.
8968
a5362b9a
TS
89692012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8970
8971 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8972 struct siginfo.
8973 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8974 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8975 * linux-low.h: Include <signal.h>.
8976 (struct siginfo): Remove forward declaration.
8977 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8978 struct siginfo.
8979
d226c142
MF
89802012-03-21 Mike Frysinger <vapier@gentoo.org>
8981
8982 * .gitignore: Ignore more files.
8983
122f36ef
PA
89842012-03-19 Pedro Alves <palves@redhat.com>
8985 Jan Kratochvil <jan.kratochvil@redhat.com>
8986
8987 * server.c (cont_thread, general_thread): Add describing comments.
8988 (start_inferior): Clear `cont_thread'.
8989 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8990 of a process.
8991
fc3e5175
YQ
89922012-03-15 Yao Qi <yao@codesourcery.com>
8993
8994 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8995 handling to ...
8996 (cmd_qtdp): ... here.
8997
8d0d92cd
YQ
89982012-03-15 Yao Qi <yao@codesourcery.com>
8999
9000 * tracepoint.c (struct tracepoint_action_ops): New.
9001 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9002 (m_tracepoint_action_download): New.
9003 (r_tracepoint_action_download): New.
9004 (x_tracepoint_action_download): New.
9005 (l_tracepoint_action_download): New.
9006 (add_tracepoint_action): Install `action->ops' according type.
9007 (download_tracepoint_1): Move code `download' function pointer
9008 of various tracepoint_action_ops.
9009
87b0bb13
JK
90102012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9011
9012 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9013 linux_ptrace_attach_warnings.
9014
5f572dec
JK
90152012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9016
9017 * Makefile.in (linux-ptrace.o): New.
9018 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9019 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9020 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9021 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9022 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9023 of these targets.
9024 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9025
f4647387
YQ
90262012-03-08 Yao Qi <yao@codesourcery.com>
9027 Pedro Alves <palves@redhat.com>
9028
9029 Fix PR server/13392.
9030 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9031 offset of JMP insn.
9032 * tracepoint.c (remove_tracepoint): New.
9033 (cmd_qtdp): Call remove_tracepoint when failed to install.
9034
9b224c5e
PA
90352012-03-07 Pedro Alves <palves@redhat.com>
9036
9037 * linux-low.c (get_detach_signal): New.
9038 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9039 Pass on pending signals to PTRACE_DETACH. Check the result of the
9040 ptrace call.
9041 * server.c (program_signals, program_signals_p): New.
9042 (handle_general_set): Handle QProgramSignals.
9043 * server.h (program_signals, program_signals_p): Declare.
9044
e237a7e2
JK
90452012-03-05 Pedro Alves <palves@redhat.com>
9046 Jan Kratochvil <jan.kratochvil@redhat.com>
9047
9048 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9049 New comment why.
9050
5808517f
YQ
90512012-03-03 Yao Qi <yao@codesourcery.com>
9052
9053 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9054 agent_look_up_symbols.
9055
58b4daa5
YQ
90562012-03-03 Yao Qi <yao@codesourcery.com>
9057
9058 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9059 (linux-x86-low.o): Likewise.
9060 * server.h: Remove in_process_agent_loaded.
9061 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9062 common/agent.c.
9063 Update callers.
9064
8ffcbaaf
YQ
90652012-03-03 Yao Qi <yao@codesourcery.com>
9066
9067 * tracepoint.c (gdb_agent_capability): New global.
9068 (in_process_agent_loaded_ust): Renamed to
9069 `in_process_agent_supports_ust'.
9070 Update callers.
9071 (in_process_agent_supports_ust): Call agent_capability_check.
9072 (clear_installed_tracepoints): Assert that agent supports
9073 agent.
9074
d1feda86
YQ
90752012-03-03 Yao Qi <yao@codesourcery.com>
9076
9077 * linux-low.c (linux_supports_agent): New.
9078 (linux_target_ops): Initialize field `supports_agent' with
9079 linux_supports_agent.
9080 * target.h (struct target_ops) <supports_agent>: New.
9081 (target_supports_agent): New macro.
9082 * server.c (handle_general_set): Handle packet 'QAgent'.
9083 (handle_query): Send `QAgent+'.
9084 * Makefile.in (server.o): Depends on agent.h.
9085
2fa291ac
YQ
90862012-03-03 Yao Qi <yao@codesourcery.com>
9087
9088 * Makefile.in (OBS): Add agent.o.
9089 Add new rule for agent.o.
9090 Track dependence of tracepoint.c on agent.h.
9091 * tracepoint.c (run_inferior_command_1):
9092 (run_inferior_command): Call agent_run_command.
9093 (gdb_ust_connect_sync_socket): Deleted. Move it to
9094 common/agent.c.
9095 (resume_thread, stop_thread): Likewise.
9096 (gdb_ust_socket_init): Renamed to ...
9097 (gdb_agent_socket_init): ... New.
9098 (gdb_ust_thread): Renamed to ...
9099 (gdb_agent_helper_thread): ... New.
9100 (gdb_ust_init): Move some code to ...
9101 (gdb_agent_init): ... here. New.
9102 [HAVE_UST]: Call gdb_ust_init.
9103 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9104 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9105 * config.in, configure: Regenerated.
9106
05044653
PA
91072012-03-02 Pedro Alves <palves@redhat.com>
9108
9109 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9110 * linux-low.c (struct simple_pid_list): New.
9111 (stopped_pids): New a struct simple_pid_list pointer.
9112 (add_to_pid_list, pull_pid_from_list): New.
9113 (handle_extended_wait): Don't assume the first signal new children
9114 report is SIGSTOP. Adjust call to pull_pid_from_list.
9115 (linux_wait_for_lwp): Adjust.
9116
8d00225b
YQ
91172012-03-02 Yao Qi <yao@codesourcery.com>
9118
9119 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9120 debug log.
9121
19560ba5
YQ
91222012-03-02 Yao Qi <yao@codesourcery.com>
9123
9124 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9125 `stop_pc' and `tpoint'. Update caller.
9126
1faeff08
MR
91272012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9128
9129 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9130 * linux-low.c (use_linux_regsets): New macro.
9131 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9132 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9133 (linux_register_in_regsets): New function.
9134 (usr_fetch_inferior_registers): Skip registers covered by
9135 regsets.
9136 (usr_store_inferior_registers): Likewise.
9137 (usr_fetch_inferior_registers): New macro.
9138 (usr_store_inferior_registers): Likewise.
9139 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9140 (linux_store_registers): Likewise.
9141 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9142 prototype.
9143 (init_registers_mips64_dsp_linux): Likewise.
9144 (init_registers_mips_linux): New macro.
9145 (init_registers_mips_dsp_linux): Likewise.
9146 (mips_dsp_num_regs): Likewise.
9147 (DSP_BASE, DSP_CONTROL): New fallback macros.
9148 (mips_base_regs): New macro.
9149 (mips_regmap): Use it. Fix the size.
9150 (mips_dsp_regmap): New variable.
9151 (mips_dsp_regset_bitmap): Likewise.
9152 (mips_arch_setup): New function.
9153 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9154 than mips_regmap.
9155 (mips_cannot_store_register): Likewise.
9156 (the_low_target): Update .arch_setup, .num_regs and .regmap
9157 initializers. Add .regset_bitmap initializer.
9158 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9159 initializer.
9160 * linux-bfin-low.c (the_low_target): Likewise.
9161 * linux-cris-low.c (the_low_target): Likewise.
9162 * linux-crisv32-low.c (the_low_target): Likewise.
9163 * linux-ia64-low.c (the_low_target): Likewise.
9164 * linux-m32r-low.c (the_low_target): Likewise.
9165 * linux-m68k-low.c (the_low_target): Likewise.
9166 * linux-ppc-low.c (the_low_target): Likewise.
9167 * linux-s390-low.c (the_low_target): Likewise.
9168 * linux-sh-low.c (the_low_target): Likewise.
9169 * linux-sparc-low.c (the_low_target): Likewise.
9170 * linux-tic6x-low.c (the_low_target): Likewise.
9171 * linux-x86-low.c (the_low_target): Likewise.
9172 * linux-xtensa-low.c (the_low_target): Likewise.
9173 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9174 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9175 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9176 srv_xmlfiles.
9177 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9178 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9179
c03e6ccc
YQ
91802012-02-29 Yao Qi <yao@codesourcery.com>
9181 Pedro Alves <palves@redhat.com>
9182
9183 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9184 `step_over_finished' is true.
9185
644cebc9
PA
91862012-02-27 Pedro Alves <palves@redhat.com>
9187
9188 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9189 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9190
c14d7ab2
PA
91912012-02-27 Pedro Alves <palves@redhat.com>
9192
9193 PR server/9684
9194 * linux-low.c (pid_is_stopped): New.
9195 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9196
412c89dd
LM
91972012-02-25 Luis Machado <lgustavo@codesourcery.com>
9198
9199 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9200 of conditions.
9201
b745defe
MR
92022012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9203
9204 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9205
9f3a5c85
LM
92062012-02-24 Luis Machado <lgustavo@codesourcery>
9207
9208 * server.c (handle_query): Advertise support for target-side
9209 breakpoint condition evaluation.
9210 (process_point_options): New function.
9211 (process_serial_event): When inserting a breakpoint, check for
9212 a target-side condition that should be evaluated.
9213
9214 * mem-break.c: Include regcache.h and ax.h.
9215 (point_cond_list_t): New data structure.
9216 (breakpoint) <cond_list>: New field.
9217 (find_gdb_breakpoint_at): Make non-static.
9218 (delete_gdb_breakpoint_at): Clear any target-side
9219 conditions.
9220 (clear_gdb_breakpoint_conditions): New function.
9221 (add_condition_to_breakpoint): Likewise.
9222 (add_breakpoint_condition): Likewise.
9223 (gdb_condition_true_at_breakpoint): Likewise.
9224 (gdb_breakpoint_here): Return result directly instead
9225 of going through a local variable.
9226
9227 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9228 (clear_gdb_breakpoint_conditions): Likewise.
9229 (add_breakpoint_condition): Likewise.
9230 (gdb_condition_true_at_breakpoint): Likewise.
9231
9232 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9233 (need_step_over_p): Take target-side breakpoint condition into
9234 consideration.
9235
5e1dc496
LM
92362012-02-24 Luis Machado <lgustavo@codesourcery>
9237
9238 * server.h: Include tracepoint.h.
9239 (agent_mem_read, agent_get_trace_state_variable_value,
9240 agent_set_trace_state_variable_value,
9241 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9242 get_set_tsv_func_addr): New prototypes.
9243
9244 * ax.h: New include file.
9245 * ax.c: New source file.
9246
9247 * tracepoint.c: Include ax.h.
9248 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9249 agent_expr, eval_result_type): Move to ax.h.
9250 (parse_agent_expr): Rename to ...
9251 (gdb_parse_agent_expr): ... this, make it non-static and move
9252 to ax.h.
9253 (unparse_agent_expr) Rename to ...
9254 (gdb_unparse_agent_expr): ... this, make it non-static and move
9255 to ax.h.
9256 (eval_agent_expr): Rename to ...
9257 (eval_tracepoint_agent_expr): ... this.
9258 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9259 forward declarations.
9260 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9261 (agent_get_trace_state_variable_value): New function.
9262 (agent_set_trace_state_variable_value): New function.
9263 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9264 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9265 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9266 (condition_true_at_tracepoint): Likewise.
9267 (parse_agent_expr): Rename to ...
9268 (gdb_parse_agent_expr): ... this and move to ax.c.
9269 (unparse_agent_expr): Rename to ...
9270 (gdb_unparse_agent_expr): ... this and move to ax.c.
9271 (gdb_agent_op_name): Move to ax.c.
9272 (eval_agent_expr): Rename to ...
9273 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9274 and move to ax.c.
9275 (eval_tracepoint_agent_expr): New function.
9276 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9277 non-static.
5e1dc496
LM
9278 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9279 ax.c.
9280 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9281 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9282 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9283 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9284 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9285 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9286 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9287 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9288 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9289 (compile_bytecodes): Remove forward declaration.
9290 (is_goto_target): Move to ax.c.
9291 (compile_bytecodes): Move to ax.c and call
9292 agent_get_trace_state_variable_value (...) and
9293 agent_set_trace_state_variable_value (...).
9294
9295 * Makefile.in: Update ax.c and IPA dependencies.
9296
277e4e52
PA
92972012-02-24 Pedro Alves <palves@redhat.com>
9298
9299 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9300 (cmd_bigqtbuffer_circular): ... this. Only handle
9301 'QTBuffer:circular:'.
9302 (handle_tracepoint_general_set): Adjust.
9303
bf4c19f7
YQ
93042012-02-16 Yao Qi <yao@codesourcery.com>
9305
9306 * inferiors.c: Move code to ...
9307 * dll.c: .... here. New.
9308 * server.h: Declare clear_dlls.
9309 * Makefile.in (SFILES): Add dll.c.
9310 (OBS): Add dll.o
9311 (dll.o): New rule.
9312
d73f2619
YQ
93132012-02-11 Yao Qi <yao@codesourcery.com>
9314
9315 * server.c: (handle_monitor_command): Add a new parameter
9316 `own_buf'.
9317 (handle_query): Update caller.
9318
f8255c2a
JB
93192012-02-09 Joel Brobecker <brobecker@adacore.com>
9320
9321 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9322 * configure, config.in: Regenerate.
9323 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9324 is not defined.
9325
da84f473
PA
93262012-02-02 Pedro Alves <palves@redhat.com>
9327
9328 Try SIGKILL first, then PTRACE_KILL.
9329 * linux-low.c (linux_kill_one_lwp): New.
9330 (linux_kill_one_lwp): Rename to ...
9331 (kill_one_lwp_callback): ... this. Use the new
9332 linux_kill_one_lwp.
9333
e886a173
PA
93342012-02-02 Pedro Alves <palves@redhat.com>
9335
9336 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9337 inferior.
9338
be07f1a2
PA
93392012-01-27 Pedro Alves <palves@redhat.com>
9340
9341 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9342 (elf_64_file_p): Make static.
9343 (linux_pid_exe_is_elf_64_file): New.
9344 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9345 Delete declarations.
9346 (linux_pid_exe_is_elf_64_file): Declare.
9347 * linux-x86-low.c (x86_arch_setup): Use
9348 linux_pid_exe_is_elf_64_file.
9349
d8301ad1
JK
93502012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9351
9352 * linux-low.c (linux_wait_for_event_1): Rename to ...
9353 (linux_wait_for_event): ... here and merge it with former
9354 linux_wait_for_event - new variable wait_ptid, use it.
9355 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9356
01b17894
PA
93572012-01-23 Pedro Alves <palves@redhat.com>
9358
9359 * server.c (main): Avoid yet another case of infinite loop while
9360 detaching/killing after a longjmp.
9361
e825046f
JK
93622012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9363
9364 Code cleanup.
9365 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9366
b9e7b9c3
UW
93672012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9368
9369 * hostio.c (handle_readlink): New function.
9370 (handle_vFile): Call it to handle "vFile:readlink" packets.
9371
901f9912
UW
93722012-01-20 Pedro Alves <palves@redhat.com>
9373 Ulrich Weigand <ulrich.weigand@linaro.org>
9374
9375 * server.c (handle_v_requests): Only support vAttach and vRun to
9376 start multiple processes when in extended protocol mode.
9377
fc1ab1a0
PA
93782012-01-17 Pedro Alves <palves@redhat.com>
9379
9380 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9381 memalign plus mprotect to allocate the scratch buffer.
9382
7d5d4e98
PA
93832012-01-13 Pedro Alves <palves@redhat.com>
9384
9385 * server.c (attach_inferior): Clear `cont_thread'.
9386
f128d5e9
PA
93872012-01-13 Pedro Alves <palves@redhat.com>
9388
9389 * server.c (main): Avoid infinite loop while detaching/killing
9390 after a longjmp.
9391
06db92f0
DE
93922012-01-09 Doug Evans <dje@google.com>
9393
9394 * server.c (start_inferior): Set last_ptid in --wrapper case.
9395
32d92999
YQ
93962012-01-06 Yao Qi <yao@codesourcery.com>
9397
9398 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9399 defined.
9400 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9401
5e0a92a9
YQ
94022012-01-04 Yao Qi <yao@codesourcery.com>
9403
9404 * tracepoint.c (cmd_qtdp): Print debug message
9405 for static tracepoint.
9406
ae639e8c
YQ
94072012-01-04 Yao Qi <yao@codesourcery.com>
9408
9409 * tracepoint.c (trace_vdebug): Differentiate debug message
9410 between gdbserver and IPA.
9411
f72429c5
YQ
94122012-01-03 Yao Qi <yao@codesourcery.com>
9413
9414 * tracepoint.c (tracepoint_was_hit): Don't collect for
9415 static tracepoint.
9416
12c3e59c
JB
94172012-01-02 Joel Brobecker <brobecker@adacore.com>
9418
9419 * terminal.h: Reformat copyright header.
9420
67827812
JB
94212012-01-02 Joel Brobecker <brobecker@adacore.com>
9422
9423 * server.c (gdbserver_version): Update copyright year.
9424 * gdbreplay.c (gdbreplay_version): Likewise.
9425
3e52c33d
JK
94262011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9427
9428 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9429
9430 Revert:
9431 2011-12-18 Hui Zhu <teawater@gmail.com>
9432 * linux-low.c (linux_create_inferior): Save return value to ret.
9433
66f1260e
HZ
94342011-12-18 Hui Zhu <teawater@gmail.com>
9435
9436 * linux-low.c (linux_create_inferior): Save return value to ret.
9437
e77616d7
DE
94382011-12-16 Doug Evans <dje@google.com>
9439
e7b06c57
DE
9440 * linux-low.c (linux_create_inferior): If stdio connection,
9441 redirect stdin from /dev/null, stdout to stderr.
9442 * remote-utils.c (remote_is_stdio): New static global.
9443 (remote_connection_is_stdio): New function.
9444 (remote_prepare): Handle stdio connection.
9445 (remote_open): Ditto.
9446 (remote_close): Don't close stdin for stdio connections.
9447 (read_prim,write_prim): New functions. Replace all calls to
9448 read/write to these.
9449 * server.c (main): Watch for "-" argument. Move call to
9450 remote_prepare before start_inferior.
9451 * server.h (STDIO_CONNECTION_NAME): New macro.
9452 (remote_connection_is_stdio): Declare.
9453
e77616d7
DE
9454 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9455 in debugging output.
9456
82067193
YQ
94572011-12-15 Yao Qi <yao@codesourcery.com>
9458
9459 * tracepoint.c: Include sys/syscall.h.
9460 (gdb_ust_thread): Remove preprocessor conditional.
9461
82bfbe7e
PA
94622011-12-14 Pedro Alves <pedro@codesourcery.com>
9463
9464 * linux-low.c (linux_detach_one_lwp): Call
9465 the_low_target.prepare_to_resume before detaching.
9466
712c6575
YQ
94672011-12-14 Yao Qi <yao@codesourcery.com>
9468
9469 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9470 of write.
9471
d54d1edf
YQ
94722011-12-14 Yao Qi <yao@codesourcery.com>
9473
9474 * i386-low.c (i386_low_stopped_data_address): Initialize local
9475 variable `control'.
9476
6210a125
PA
94772011-12-13 Pedro Alves <pedro@codesourcery.com>
9478
9479 PR remote/13492
9480
9481 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9482 DR_CONTROL unless necessary. Extend comments.
9483 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9484 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9485
2ece8244
YQ
94862011-12-13 Yao Qi <yao@codesourcery.com>
9487
9488 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9489 macros.
9490 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9491
784867a5
JK
94922011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9493
9494 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9495 Print new debug message for such case.
9496
6bf36717
JK
94972011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9498
9499 Fix overlapping memcpy.
9500 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9501 the read_inferior_memory transfer.
9502 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9503 write_inferior_memory transfer.
9504 (set_fast_tracepoint_jump): New variable buf. Use it for the
9505 read_inferior_memory and write_inferior_memory transfers.
9506 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9507 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9508 Use it for the write_inferior_memory transfer.
9509 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9510 buffers.
9511
50275556
MR
95122011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9513
9514 * linux-low.c (fetch_register, store_register): Make code
9515 consistent, fix formatting.
9516
7325beb4
MR
95172011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9518
9519 * linux-low.c (usr_store_inferior_registers): Factor out code
9520 to handle individual registers into...
9521 (store_register): ... this new function.
9522
c642a434
UW
95232011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9524
9525 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9526 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9527 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9528 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9529 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9530 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9531 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9532 (srv_xmlfiles): Add new XML files.
9533
9534 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9535 and <sys/uio.h>.
9536 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9537 (init_registers_s390_linux32v1): Add prototype.
9538 (init_registers_s390_linux32v2): Likewise.
9539 (init_registers_s390_linux64v1): Likewise.
9540 (init_registers_s390_linux64v2): Likewise.
9541 (init_registers_s390x_linux64v1): Likewise.
9542 (init_registers_s390x_linux64v2): Likewise.
9543 (s390_num_regs): Increment to 52.
9544 (s390_regmap): Add orig_r2 register.
9545 (s390_num_regs_3264): Increment to 68.
9546 (s390_regmap_3264): Add orig_r2 register.
9547 (s390_collect_ptrace_register): Handle orig_r2 register.
9548 (s390_supply_ptrace_register): Likewise.
9549 (s390_fill_last_break): New function.
9550 (s390_store_last_break): Likewise.
9551 (s390_fill_system_call): New function.
9552 (s390_store_system_call): Likewise.
9553 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9554 register sets.
9555 (s390_check_regset): New function.
9556 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9557 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9558 Update target_regsets for available register sets.
9559
2268b414
JK
95602011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9561 Jan Kratochvil <jan.kratochvil@redhat.com>
9562
9563 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9564 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9565 New.
9566 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9567 * linux-low.h (struct process_info_private): New member r_debug.
9568 * server.c (handle_qxfer_libraries): Call
9569 the_target->qxfer_libraries_svr4.
9570 (handle_qxfer_libraries_svr4): New function.
9571 (qxfer_packets): New entry "libraries-svr4".
9572 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9573 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9574 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9575 PACKET_qXfer_libraries_svr4.
9576
d6db1fab
UW
95772011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9578
9579 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9580 PSW address/mask between 8-byte and 16-byte formats.
9581 (s390_supply_ptrace_register): Likewise.
9582 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9583 basic addressing mode bit.
9584
242f5f1c
SS
95852011-11-24 Stan Shebs <stan@codesourcery.com>
9586
9587 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9588
f196051f
SS
95892011-11-17 Stan Shebs <stan@codesourcery.com>
9590
9591 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9592 (tracing_start_time): New global.
9593 (tracing_stop_time): New global.
9594 (tracing_user_name): New global.
9595 (tracing_notes): New global.
9596 (tracing_stop_note): New global.
9597 (cmd_qtstart): Set traceframe_usage, start_time.
9598 (stop_tracing): Set stop_time.
9599 (cmd_qtstatus): Report additional status.
9600 (cmd_qtp): New function.
9601 (handle_tracepoint_query): Call it.
9602 (cmd_qtnotes): New function.
9603 (handle_tracepoint_general_set): Call it.
9604 (get_timestamp): Rename from tsv_get_timestamp.
9605
405f8e94
SS
96062011-11-14 Stan Shebs <stan@codesourcery.com>
9607 Kwok Cheung Yeung <kcy@codesourcery.com>
9608
9609 * linux-x86-low.c (small_jump_insn): New.
9610 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9611 trampoline and error message, build a trampoline and issue a small
9612 jump instruction to it.
9613 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9614 trampoline and error message.
9615 (x86_get_min_fast_tracepoint_insn_len): New.
9616 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9617 * linux-low.h (struct linux_target_ops): Add arguments to
9618 install_fast_tracepoint_jump_pad operation, add new operation.
9619 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9620 arguments.
9621 (linux_get_min_fast_tracepoint_insn_len): New function.
9622 (linux_target_op): Add new operation.
9623 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9624 (gdb_trampoline_buffer_end): Ditto.
9625 (gdb_trampoline_buffer_error): Ditto.
9626 (struct ipa_sym_addresses): Add fields for new IPA variables.
9627 (symbol_list): Add entries for new IPA variables.
9628 (struct tracepoint): Add fields to hold the address range of the
9629 trampoline used by the tracepoint.
9630 (trampoline_buffer_head): New static variable.
9631 (trampoline_buffer_tail): Ditto.
9632 (claim_trampoline_space): New function.
9633 (have_fast_tracepoint_trampoline_buffer): New function.
9634 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9635 structure.
9636 (install_fast_tracepoint): Ditto, also add error buffer argument.
9637 (cmd_qtminftpilen): New function.
9638 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9639 (fast_tracepoint_from_trampoline_address): New function.
9640 (fast_tracepoint_collecting): Handle trampoline as part of jump
9641 pad space.
9642 (set_trampoline_buffer_space): New function.
9643 (initialize_tracepoint): Initialize new IPA variables.
9644 * target.h (struct target_ops): Add arguments to
9645 install_fast_tracepoint_jump_pad operation, add new
9646 get_min_fast_tracepoint_insn_len operation.
9647 (target_get_min_fast_tracepoint_insn_len): New.
9648 (install_fast_tracepoint_jump_pad): Add arguments.
9649 * server.h (IPA_BUFSIZ): Define.
9650 * linux-i386-ipa.c: Include extra header files.
9651 (initialize_fast_tracepoint_trampoline_buffer): New function.
9652 (initialize_low_tracepoint): Call it.
9653 * server.h (set_trampoline_buffer_space): Declare.
9654 (claim_trampoline_space): Ditto.
9655 (have_fast_tracepoint_trampoline_buffer): Ditto.
9656
1e4d1764
YQ
96572011-11-14 Yao Qi <yao@codesourcery.com>
9658
9659 * server.c (handle_query): Handle InstallInTrace for qSupported.
9660 * tracepoint.c (add_tracepoint): Sort list.
9661 (install_tracepoint, download_tracepoint): New.
9662 (cmd_qtdp): Call them to install and download tracepoints.
9663 (sort_tracepoints): Removed.
9664 (cmd_qtstart): Update.
9665
5c73ff4e
YQ
96662011-11-14 Yao Qi <yao@codesourcery.com>
9667
9668 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9669 * mem-break.h: Declare.
9670 * tracepoint.c (cmd_qtstart): Move some code to ...
9671 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9672 New.
9673 (download_tracepoints): Move some code to ...
9674 (download_tracepoint_1): ... here. New.
9675
86a30030
YQ
96762011-11-08 Yao Qi <yao@codesourcery.com>
9677
9678 * remote-utils.c (relocate_instruction): A comment fix.
9679
8d26e50c
JB
96802011-11-07 Joel Brobecker <brobecker@adacore.com>
9681
9682 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9683 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9684 dr_status_mirror and dr_control_mirror from debug_reg_state.
9685 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9686 (i386_initial_stuff): Remove use of deleted globals.
9687 (i386_get_thread_context, i386_set_thread_context,
9688 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9689 from debug_reg_state.
9690
a59306a3
YQ
96912011-11-05 Yao Qi <yao@codesourcery.com>
9692
9693 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9694 address as TPOINT's.
9695
3065dfb6
SS
96962011-11-02 Stan Shebs <stan@codesourcery.com>
9697
9698 * tracepoint.c (agent_mem_read_string): New function.
9699 (eval_agent_expr): Call it for tracenz.
9700 * server.c (handle_query): Report support for tracenz.
9701
fd0d8c7c
YQ
97022011-11-02 Yao Qi <yao@codesourcery.com>
9703
9704 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9705
609086b1
YQ
97062011-11-02 Yao Qi <yao@codesourcery.com>
9707
9708 * target.h: Fix a typo in comment.
9709
b9fd1791
PA
97102011-10-31 Pedro Alves <pedro@codesourcery.com>
9711
9712 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9713 clobber the breakpoints' shadows with fast tracepoint jumps.
9714 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9715 * target.c (write_inferior_memory): Also pass MYADDR down to
9716 check_mem_write.
9717
03583c20
UW
97182011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9719
9720 * configure.ac: Check support for personality routine.
9721 * configure: Regenerate.
9722 * config.in: Likewise.
9723 * linux-low.c: Include <sys/personality.h>.
9724 Define ADDR_NO_RANDOMIZE if necessary.
9725 (linux_create_inferior): Disable address space randomization when
9726 forking inferior, if requested.
9727 (linux_supports_disable_randomization): New function.
9728 (linux_target_ops): Install it.
9729 * server.h (disable_randomization): Declare.
9730 * server.c (disable_randomization): New global variable.
9731 (handle_general_set): Handle QDisableRandomization.
9732 (handle_query): Likewise for qSupported.
9733 (main): Support --disable-randomization and --no-disable-randomization
9734 command line arguments.
9735 * target.h (struct target_ops): Add supports_disable_randomization.
9736 (target_supports_disable_randomization): New macro.
9737
723b724b
MF
97382011-09-29 Mike Frysinger <vapier@gentoo.org>
9739
9740 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9741 ifdef check.
9742 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9743 [!PT_GETDSBT] (target_loadmap): New definition.
9744 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9745 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9746 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9747 and PT_GETDSBT to LINUX_LOADMAP.
9748 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9749 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9750
55329a5c 97512011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9752
9753 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9754 (arm_linux_hwbp_cap): New static variable.
9755 (arm_linux_get_hwbp_cap): Replace by ...
9756 (arm_linux_init_hwbp_cap): ... this new function.
9757 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9758 (arm_linux_get_hw_watchpoint_count): Likewise.
9759 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9760 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9761 (arm_prepare_to_resume): Use perror_with_name instead of error.
9762
55329a5c 97632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9764
9765 * linux-arm-low.c: Include <signal.h>.
9766 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9767 (struct arm_linux_hwbp_cap): New data type.
9768 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9769 (struct arm_linux_hw_breakpoint): New data type.
9770 (MAX_BPTS, MAX_WPTS): Define.
9771 (struct arch_process_info, struct arch_lwp_info): New data types.
9772 (arm_linux_get_hwbp_cap): New function.
9773 (arm_linux_get_hw_breakpoint_count): Likewise.
9774 (arm_linux_get_hw_watchpoint_count): Likewise.
9775 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9776 (arm_hwbp_control_initialize): Likewise.
9777 (arm_hwbp_control_is_enabled): Likewise.
9778 (arm_hwbp_control_is_initialized): Likewise.
9779 (arm_hwbp_control_disable): Likewise.
9780 (arm_linux_hw_breakpoint_equal): Likewise.
9781 (arm_linux_hw_point_initialize): Likewise.
9782 (struct update_registers_data): New data structure.
9783 (update_registers_callback: New function.
9784 (arm_insert_point): Likewise.
9785 (arm_remove_point): Likewise.
9786 (arm_stopped_by_watchpoint): Likewise.
9787 (arm_stopped_data_address): Likewise.
9788 (arm_new_process): Likewise.
9789 (arm_new_thread): Likewise.
9790 (arm_prepare_to_resume): Likewise.
9791 (the_low_target): Register arm_insert_point, arm_remove_point,
9792 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9793 arm_new_thread, and arm_prepare_to_resume.
9794
6b9801d4
SS
97952011-09-15 Stan Shebs <stan@codesourcery.com>
9796
9797 * server.h (struct emit_ops): Add compare-goto fields.
9798 * tracepoint.c (gdb_agent_op_sizes): New table.
9799 (emit_eq_goto): New function.
9800 (emit_ne_goto): New function.
9801 (emit_lt_goto): New function.
9802 (emit_le_goto): New function.
9803 (emit_gt_goto): New function.
9804 (emit_ge_goto): New function.
9805 (is_goto_target): New function.
9806 (compile_bytecodes): Recognize special cases of compare-goto
9807 combinations and call specialized emitters for them.
9808 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9809 (amd64_emit_ne_goto): New function.
9810 (amd64_emit_lt_goto): New function.
9811 (amd64_emit_le_goto): New function.
9812 (amd64_emit_gt_goto): New function.
9813 (amd64_emit_ge_goto): New function.
9814 (amd64_emit_ops): Add the new functions.
9815 (i386_emit_eq_goto): New function.
9816 (i386_emit_ne_goto): New function.
9817 (i386_emit_lt_goto): New function.
9818 (i386_emit_le_goto): New function.
9819 (i386_emit_gt_goto): New function.
9820 (i386_emit_ge_goto): New function.
9821 (i386_emit_ops): Add the new functions.
9822
bf15cbda
SS
98232011-09-08 Stan Shebs <stan@codesourcery.com>
9824
9825 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9826 (i386_emit_epilogue): Restore %ebx.
9827
943ca1dd
JZ
98282011-08-31 Jie Zhang <jzhang918@gmail.com>
9829
9830 * server.c (step_thread): Remove definition.
9831 (process_serial_event): Don't handle Hs.
9832 * server.h (step_thread): Remove declaration.
9833 * target.c (set_desired_inferior): Remove use of step_thread.
9834
e3deef73
LM
98352011-08-24 Luis Machado <lgustavo@codesourcery.com>
9836
9837 * linux-low.c: Include linux-procfs.h.
9838 (linux_attach_lwp_1): Update comments.
9839 (linux_attach): Scan for existing threads when attaching to a
9840 process that is the tgid.
9841 * Makefile.in: Update dependencies.
9842
13da1c97
LM
98432011-08-24 Luis Machado <lgustavo@codesourcery.com>
9844
9845 * configure.srv: Add linux-procfs.o dependencies.
9846
881127c9
YQ
98472011-08-14 Yao Qi <yao@codesourcery.com>
9848
9849 * target.h (struct target_ops): Fix indent.
9850 * win32-low.c (win32_target_ops): Fix comment.
9851
58dbd541
YQ
98522011-08-14 Andrew Jenner <andrew@codesourcery.com>
9853 Yao Qi <yao@codesourcery.com>
9854
9855 * Makefile.in (clean): Remove tic6x-*.c files.
9856 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9857 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9858 (tic6x-c64xp-linux.c): Likewise.
9859 * configure.srv: Add support for tic6x-*-uclinux.
9860 * linux-tic6x-low.c: New.
9861 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9862
78d85199
YQ
98632011-08-14 Andrew Stubbs <ams@codesourcery.com>
9864 Yao Qi <yao@codesourcery.com>
9865
9866 * target.h (struct target_ops): Add read_loadmap.
9867 * linux-low.c (struct target_loadseg): New type.
9868 (struct target_loadmap): New type.
9869 (linux_read_loadmap): New function.
9870 (linux_target_ops): Add linux_read_loadmap.
9871 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9872 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9873 to NULL.
78d85199 9874
a959a88d
EZ
98752011-08-05 Eli Zaretskii <eliz@gnu.org>
9876
9877 * win32-low.c: Include <stdint.h>.
9878
1ced966e
PA
98792011-07-22 Pedro Alves <pedro@codesourcery.com>
9880
9881 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9882 to the inferior here.
9883 (i386_remove_aligned_watchpoint): Ditto.
9884 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9885 fit part of the watchpoint in the debug registers.
9886 (i386_update_inferior_debug_regs): New.
9887 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9888 registers, and only update the inferior on success.
9889 (i386_low_remove_watchpoint): Ditto.
9890
d26e3629
KY
98912011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9892
9893 * linux-low.c (compare_ints, unique, list_threads, show_process,
9894 linux_core_of_thread): Delete.
9895 (linux_target_ops): Change linux_core_of_thread to
9896 linux_common_core_of_thread.
9897 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9898 * utils.c (malloc_failure): Change type of argument.
9899 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9900 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9901 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9902 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9903 (IPA_OBJS): Add common-utils-ipa.o.
9904 (ptid_h, linux_osdata_h): New macros.
9905 (server_h): Add common/common-utils.h, common/xml-utils.h,
9906 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9907 common/ptid.h.
9908 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9909 ptid.o, buffer.o): New rules.
9910 (linux-low.o): Add common/linux-osdata.h as a dependency.
9911 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9912 * configure.ac: Add AC_HEADER_DIRENT check.
9913 * config.in: Regenerate.
9914 * configure: Regenerate.
9915 * remote-utils.c (xml_escape_text): Delete.
9916 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9917 buffer_xml_printf): Move to common/buffer.c.
9918 * server.c (main): Remove call to initialize_inferiors.
9919 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9920 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9921 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9922 internal_error, gdb_assert, gdb_assert_fail): Delete.
9923 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9924 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9925 common/buffer.h.
9926 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9927 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9928 initialize_inferiors): Delete.
9929
2275a1a7
PA
99302011-07-20 Pedro Alves <pedro@codesourcery.com>
9931
9932 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9933 symbol error.
9934
0a5b1e09
PA
99352011-05-31 Pedro Alves <pedro@codesourcery.com>
9936
9937 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9938 assertion.
9939 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9940
6938fd34
YQ
99412011-05-26 Yao Qi <yao@codesourcery.com>
9942
9943 * Makefile.in (thread-db.o): Track dependence to
9944 common/gdb_thread_db.h.
9945 * thread-db.c: include gdb_thread_db.h from right place.
9946
b481f9e0
TT
99472011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9948
9949 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9950 __FILE__ and __LINE__ to internal_error.
9951
98a5dd13
DE
99522011-05-13 Doug Evans <dje@google.com>
9953
9954 * thread-db.c (try_thread_db_load_from_sdir): New function.
9955 (try_thread_db_load_from_dir): New function.
9956 (thread_db_load_search): Handle $sdir, ignore $pdir.
9957 Remove trying of system directories if search of
9958 libthread-db-search-path fails, that is now done via $sdir.
9959
d248b706
KY
99602011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9961
9962 * server.c (handle_query): Add EnableDisableTracepoints to the list
9963 of supported features.
43aaf8b6 9964 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9965 tracepoints.
43aaf8b6
PA
9966 (cmd_qtenable_disable): New.
9967 (cmd_qtstart): Install tracepoints even if disabled.
9968 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9969 receiving a QTEnable or QTDisable packet.
9970 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9971 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9972 tracepoints.
9973 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9974
84e578fb
DE
99752011-05-10 Doug Evans <dje@google.com>
9976
9977 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9978
71f55dd8
DE
99792011-05-04 Doug Evans <dje@google.com>
9980
9981 * linux-low.c (linux_join): Skip process lookup.
9982 * spu-low.c (spu_join): Ditto.
9983 * server.c (join_inferiors_callback): Delete.
9984 (process_serial_event): For 'D' packet (detach) call join_inferior
9985 directly.
9986
4d393d60
JM
99872011-05-04 Joseph Myers <joseph@codesourcery.com>
9988
9989 * README: Don't mention xscale*-*-linux*.
9990 * configure.srv (xscale*-*-linux*): Don't handle target.
9991
b00ad6ff
NF
99922011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9993
9994 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9995 casting pointers.
9996 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9997 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9998 (i386_emit_void_call_2): Likewise.
9999
af96c192
YQ
100002011-04-26 Yao Qi <yao@codesourcery.com>
10001
43aaf8b6
PA
10002 * linux-low.c: Move common macros to linux-ptrace.h.
10003 Include linux-ptrace.h.
af96c192
YQ
10004 * Makefile.in (linux_ptrace_h): New.
10005 (linux-low.o): Depends on linux-ptrace.h.
10006
03f2bd59
JK
100072011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10008
10009 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10010 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10011 (remote_prepare): New function with most of the TCP code from ...
10012 (remote_open): ... here. Detect PORT here unconditionally. Move also
10013 setting transport_is_reliable.
10014 * server.c (run_once): New variable.
10015 (gdbserver_usage): Document it.
10016 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10017 the first run if RUN_ONCE.
10018 * server.h (run_once, remote_prepare): New declarations.
10019
7a9dd1b2
TT
100202011-04-19 Tom Tromey <tromey@redhat.com>
10021
10022 * win32-low.c (handle_load_dll): Remove duplicate "the".
10023
81239425
PM
100242011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10025
10026 Remove support for old Cygwin 1.5 versions.
10027 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10028 function to avoid warning.
10029 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10030 warning.
10031
9e0627f1
PM
100322011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10033
10034 * gdbserver/server.h (Macro _): Define it if not available.
10035
588eebee
MS
100362011-03-14 Michael Snyder <msnyder@vmware.com>
10037
348af9f7 10038 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10039
43f70d4c
JB
100402011-03-10 Joel Brobecker <brobecker@adacore.com>
10041
10042 * Makefile.in (maintainer-clean realclean distclean): Remove
10043 "make ... subdir_do" command.
10044
348af9f7
MS
100452011-03-10 Michael Snyder <msnyder@vmware.com>
10046
10047 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10048
10049 * server.c (handle_v_run): Free alloced buffer on early return.
10050
e637a4f5
YQ
100512011-03-09 Yao Qi <yao@codesourcery.com>
10052
10053 Revert:
10054 2011-03-04 Yao Qi <yao@codesourcery.com>
10055
10056 * Makefile.in: Remove GNU make feature --directory.
10057
10058 2011-03-05 Yao Qi <yao@codesourcery.com>
10059
10060 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10061 (subdir_do): New make target. Copied from gdb/Makefile.
10062 (maintainer-clean, realclean, distclean, clean): Call corresponding
10063 make targets in common/Makefile.
10064
10065 2011-02-11 Yao Qi <yao@codesourcery.com>
10066
10067 * configure.ac: Call AC_PROG_RANLIB.
10068 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10069 * configure: Regenerate.
10070
e6edda56
JK
100712011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10072
10073 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10074
e5141119
JB
100752011-03-06 Yao Qi <yao@codesourcery.com>
10076
10077 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10078
64794aa4
JB
100792011-03-05 Yao Qi <yao@codesourcery.com>
10080
10081 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10082 (subdir_do): New make target. Copied from gdb/Makefile.
10083 (maintainer-clean, realclean, distclean, clean): Call corresponding
10084 make targets in common/Makefile.
10085
7a762829
YQ
100862011-03-04 Yao Qi <yao@codesourcery.com>
10087
10088 * Makefile.in: Remove GNU make feature --directory.
10089
348af9f7
MS
100902011-03-04 Michael Snyder <msnyder@vmware.com>
10091
10092 * server.c (queue_stop_reply): Call xmalloc not malloc.
10093
100942011-03-02 Michael Snyder <msnyder@vmware.com>
10095
10096 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10097
9f72fee2
MS
100982011-02-28 Michael Snyder <msnyder@vmware.com>
10099
588eebee
MS
10100 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10101 (cmd_qtframe): Ditto.
10102 (cmd_qtbuffer): Ditto.
10103 (cmd_bigqtbuffer): Ditto.
10104
9f72fee2
MS
10105 * utils.c (decimal2str): Initialize 'width' to nine, then
10106 don't mess with it.
10107
8040bd49
UW
101082011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10109
10110 * hostio.c (require_data): Free *data, not data.
10111
7e52cbd0
JK
101122011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10113
10114 * hostio.c (require_data): Use free, not xfree.
10115
9130f83e
MS
101162011-02-27 Michael Snyder <msnyder@vmware.com>
10117
4b812f4e
MS
10118 * server.c (handle_query): Discard unused value.
10119
9130f83e
MS
10120 * hostio.c (require_data): Free malloc memory before returning
10121 error.
10122
69d37113
MS
101232011-02-26 Michael Snyder <msnyder@vmware.com>
10124
10125 * linux-low.c (list_threads): Call closedir for dirent.
10126
35f5825a
MS
101272011-02-27 Michael Snyder <msnyder@vmware.com>
10128
2a589cef
MS
10129 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10130 a case statement falls through.
10131
0adea5f7
MS
10132 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10133
35f5825a
MS
10134 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10135 in comparison.
10136
238f1c74
MS
101372011-02-26 Michael Snyder <msnyder@vmware.com>
10138
10139 * utils.c (decimal2str): Eliminate dead code and dead param.
10140 (pulongest): Drop dead param from call to decimal2str.
10141 (plongest): Ditto.
10142
633ff500
JB
101432011-02-24 Joel Brobecker <brobecker@adacore.com>
10144
10145 Revert the following patch (not approved yet):
10146 2011-02-21 Hui Zhu <teawater@gmail.com>
10147 * tracepoint.c (tp_printf): New function.
10148 (eval_agent_expr): Handle gdb_agent_op_printf.
10149
f9c6ff72
HZ
101502011-02-21 Hui Zhu <teawater@gmail.com>
10151
10152 * tracepoint.c (tp_printf): New function.
10153 (eval_agent_expr): Handle gdb_agent_op_printf.
10154
94d5e490
TT
101552011-02-18 Tom Tromey <tromey@redhat.com>
10156
10157 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10158 (tracepoint.o): Likewise.
10159 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10160 (gdb_agent_op_names): Likewise.
10161
c7f96d2b
TT
101622011-02-18 Tom Tromey <tromey@redhat.com>
10163
10164 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10165 gdb_agent_op_rot>: New constants.
10166 (gdb_agent_op_names): Add pick and roll.
10167 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10168 cases.
10169
0feedb2c
JK
101702011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10171
10172 * aclocal.m4: Regenerated with aclocal-1.11.1.
10173
b3b9301e
PA
101742011-02-14 Pedro Alves <pedro@codesourcery.com>
10175
10176 * server.c (handle_qxfer_traceframe_info): New.
10177 (qxfer_packets): Register "traceframe-info".
10178 (handle_query): Report support for qXfer:traceframe-info:read+.
10179 * tracepoint.c (match_blocktype): New.
10180 (traceframe_find_block_type): Rename to ...
10181 (traceframe_walk_blocks): ... this. Add callback filter argument,
10182 and use it.
10183 (traceframe_find_block_type): New, reimplemented on top of
10184 traceframe_walk_blocks.
10185 (build_traceframe_info_xml): New.
10186 (traceframe_read_info): New.
10187 * server.h (traceframe_read_info): Declare.
10188
4f3e6fb7
YQ
101892011-02-11 Yao Qi <yao@codesourcery.com>
10190
10191 * configure.ac: Call AC_PROG_RANLIB.
10192 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10193 * configure: Regenerate.
10194
764880b7
PA
101952011-02-07 Pedro Alves <pedro@codesourcery.com>
10196
10197 * server.c (gdb_read_memory): Change return semantics to allow
10198 partial transfers.
10199 (handle_search_memory_1): Adjust.
10200 (process_serial_event) <'m' packet>: Handle partial transfers.
10201 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10202
1c79eb8a
PA
102032011-01-28 Pedro Alves <pedro@codesourcery.com>
10204
10205 * regcache.c (init_register_cache): Initialize
10206 regcache->register_status.
10207 (free_register_cache): Release regcache->register_status.
10208 (regcache_cpy): Copy register_status.
10209 (registers_to_string): Print 'x's for unavailable registers.
10210 (supply_register): Mark the register's status valid or
10211 unavailable, depending on whether a buffer was passed in or not.
10212 (supply_register_zeroed): New.
10213 (supply_regblock): Mark the registers' status valid or
10214 unavailable, depending on whether a buffer was passed in or not.
10215 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10216 (struct regcache): New `register_status' field.
10217 (supply_register_zeroed): Declare.
10218 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10219 supply_register_zeroed, rather than passing a NULL buffer to
10220 supply_register.
10221 * tracepoint.c (fetch_traceframe_registers): Update comment.
10222
85724a0e
PA
102232011-01-28 Pedro Alves <pedro@codesourcery.com>
10224
10225 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10226 buffer explicit.
10227
d08aafef
PA
102282011-01-25 Pedro Alves <pedro@codesourcery.com>
10229
10230 * server.h (decode_xfer_write): Change prototype.
10231 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10232 and don't extract the annex here.
10233 * server.c (decode_xfer_read): Remove `annex' parameter,
10234 and don't extract the annex here.
10235 (decode_xfer): New.
10236 (struct qxfer): New.
10237 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10238 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10239 (handle_qxfer_statictrace): New functions, abstracted out from
10240 handle_query, and made to use the struct qxfer interface.
10241 (handle_threads_qxfer_proper): Rename to ...
10242 (handle_qxfer_threads_proper): ... this.
10243 (handle_threads_qxfer): Rename to ...
10244 (handle_qxfer_threads): ... this. Adjust.
10245 (qxfer_packets): New array.
10246 (handle_qxfer): New function.
10247 (handle_query): Use handle_qxfer.
10248
493e2a69
MS
102492011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10250
10251 * gdbreplay.c: Shorten lines of >= 80 columns.
10252 * linux-low.c: Ditto.
10253 * linux-ppc-low.c: Ditto.
10254 * linux-s390-low.c: Ditto.
10255 * linux-sparc-low.c: Ditto.
10256 * linux-x86-low.c: Ditto.
10257 * linux-xtensa-low.c: Ditto.
10258 * mem-break.c: Ditto.
10259 * nto-low.c: Ditto.
10260 * regcache.h: Ditto.
10261 * remote-utils.c: Ditto.
10262 * server.c: Ditto.
10263 * server.h: Ditto.
10264 * thread-db.c: Ditto.
10265 * tracepoint.c: Ditto.
10266 * utils.c: Ditto.
10267 * win32-low.h: Ditto.
10268
44944448
JB
102692011-01-05 Joel Brobecker <brobecker@adacore.com>
10270
10271 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10272 update.
10273
71ce852c
JB
102742011-01-01 Joel Brobecker <brobecker@adacore.com>
10275
10276 * server.c (gdbserver_version): Update copyright year in version
10277 output.
10278 * gdbreplay.c (gdbreplay_version): Ditto.
10279
eb826dc6
MF
102802010-12-29 Jie Zhang <jie.zhang@analog.com>
10281
10282 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10283 * linux-bfin-low.c: New file.
10284 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10285 PT_DATA_ADDR for BFIN targets.
10286 * Makefile.in (SFILES): Add linux-bfin-low.c.
10287 (clean): Remove reg-bfin.c.
10288 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10289 * README: Mention supported Blackfin targets.
10290
39ab222a
MF
102912010-12-23 Mike Frysinger <vapier@gentoo.org>
10292
10293 * .gitignore: New file.
10294
a1f2ce7d
MF
102952010-11-16 Mike Frysinger <vapier@gentoo.org>
10296
10297 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10298
f474844c
JZ
102992010-10-22 Jie Zhang <jie@codesourcery.com>
10300
10301 * Makefile.in: Add FLAGS_TO_PASS variable.
10302 (install): Remove dependency of install-only and recursively
10303 invoke make for install-only.
10304
f1048712
DE
103052010-10-04 Doug Evans <dje@google.com>
10306
10307 * Makefile.in (uninstall): Use $(DESTDIR).
10308
b53a1623
PA
103092010-09-24 Pedro Alves <pedro@codesourcery.com>
10310
e6ee044d
PA
10311 PR gdb/11842
10312
b53a1623
PA
10313 * linux-x86-low.c (compat_siginfo_from_siginfo)
10314 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10315 si_code is < 0. Check for si_code == SI_TIMER before checking for
10316 si_code < 0.
10317
fa1bd1e4
JB
103182010-09-13 Joel Brobecker <brobecker@adacore.com>
10319
10320 * lynx-i386-low.c: New file.
10321 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10322
47fac8f8
JB
103232010-09-13 Joel Brobecker <brobecker@adacore.com>
10324
10325 * lynx-low.c (ptrace_request_to_str): Remove handling for
10326 request values that have been removed in LynxOS 5.x.
10327
1adfc54d
JB
103282010-09-13 Joel Brobecker <brobecker@adacore.com>
10329
10330 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10331 <ptrace.h>
10332
c2a66c29
NS
103332010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10334
10335 * configure.ac: Add --enable-inprocess-agent option.
10336 * configure: Rebuilt.
10337
32fcada3
YQ
103382010-09-06 Yao Qi <yao@codesourcery.com>
10339
10340 * linux-low.c (linux_kill): Remove unused variable.
10341 (linux_stabilize_threads): Likewise.
10342 * server.c (start_inferior): Likewise.
10343 (queue_stop_reply_callback): Likewise.
10344 * tracepoint.c (do_action_at_tracepoint): Likewise.
10345
0cccb683
YQ
103462010-09-06 Yao Qi <yao@codesourcery.com>
10347
10348 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10349 on return.
10350
423ec54c
JK
103512010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10352
10353 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10354
12ac6819
PA
103552010-09-06 Pedro Alves <pedro@codesourcery.com>
10356
10357 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10358 "$(IPA_DEPFILES)".
10359
8ed54b31
JB
103602010-09-01 Joel Brobecker <brobecker@adacore.com>
10361
10362 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10363 gdbserver/lynx-ppc-low.c: New files.
10364 * Makefile.in (lynx_low_h): New variable.
10365 (lynx-low.o, lynx-ppc-low.o): New rules.
10366 * configure.ac: On LynxOS, link with -lnetinet.
10367 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10368 * configure: regenerate.
10369
bb0116a4
JB
103702010-09-01 Joel Brobecker <brobecker@adacore.com>
10371
10372 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10373 * configure.ac: Add check for vasprintf and vsnprintf.
10374 * configure, config.in: Regenerate.
10375 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10376
a778ab81 103772010-09-01 Joel Brobecker <brobecker@adacore.com>
10378
10379 * gdbreplay.c: Move include of alloca.h up, next to include of
10380 malloc.h.
10381 * server.h: Add include of malloc.h.
10382 * mem-break.c: Remove include of malloc.h.
10383 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10384
8b034a19 103852010-09-01 Joel Brobecker <brobecker@adacore.com>
10386
10387 * Makefile.in (memmem.o): Build with -Wno-error.
10388
103892010-09-01 Joel Brobecker <brobecker@adacore.com>
10390
10391 * utils.c (xsnprintf): Make non-static.
10392 * server.h: Add xsnprintf declaration.
10393 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10394 replace calls to snprintf by calls to xsnprintf throughout.
10395
103962010-09-01 Joel Brobecker <brobecker@adacore.com>
10397
10398 * configure.ac: Add configure check for alloca.
10399 * configure, config.in: Regenerate.
10400 * server.h: Include alloca.h if it exists.
10401 * gdbreplay.c: Include alloca.h if it exists.
10402
1a981360
PA
104032010-08-28 Pedro Alves <pedro@codesourcery.com>
10404
10405 * linux-low.c (__SIGRTMIN): Define if not already defined.
10406 (linux_create_inferior): Check for __ANDROID__ rather than
10407 __SIGRTMIN.
10408 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10409 are already deferred.
10410 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10411 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10412 stopped and already has a pending signal to report.
10413 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10414 a pending signal to report or is moving out of a jump pad.
10415 (linux_init_signals): Check for __ANDROID__ rather than
10416 __SIGRTMIN.
10417
b4d51a55
PA
104182010-08-28 Pedro Alves <pedro@codesourcery.com>
10419
10420 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10421 debug_threads check. Avoid a linear search when not doing debug
10422 output.
10423
ec48365d
PA
104242010-08-27 Pedro Alves <pedro@codesourcery.com>
10425
10426 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10427 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10428 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10429 (process_event): Change local fd's type to gdb_fildes_t.
10430 (create_file_handler): Adjust prototype.
10431 (delete_file_handler): Adjust prototype.
10432 (handle_file_event): Adjust prototype. Use pfildes.
10433 (create_file_event): Adjsut prototype.
10434 * remote-utils.c (remote_desc, listen_desc): Change type to
10435 gdb_fildes_t.
10436 * server.h: New gdb_fildes_t typedef.
10437 [USE_WIN32API]: Include winsock2.h.
10438 (delete_file_handler, add_file_handler): Adjust prototypes.
10439 (pfildes): Declare.
10440 * utils.c (pfildes): New.
10441
854d88f0
PA
104422010-08-27 Pedro Alves <pedro@codesourcery.com>
10443
10444 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10445 * configure: Regenerate.
10446
0146f85b
PA
104472010-08-27 Pedro Alves <pedro@codesourcery.com>
10448
10449 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10450 (linux_done_accessing_memory): ... this.
10451 (linux_target_ops): Adjust.
10452 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10453 * nto-low.c (nto_target_ops): Adjust comment.
10454 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10455 * spu-low.c (spu_target_ops): Adjust comment.
10456 * target.h (target_ops): Rename unprepare_to_access_memory field
10457 to done_accessing_memory.
10458 (unprepare_to_access_memory): Rename to ...
10459 (done_accessing_memory): ... this.
10460
90d74c30
PA
104612010-08-26 Pedro Alves <pedro@codesourcery.com>
10462
10463 * linux-low.c (linux_prepare_to_access_memory): New.
10464 (linux_unprepare_to_access_memory): New.
10465 (linux_target_ops): Install them.
10466 * server.c (read_memory): Rename to ...
10467 (gdb_read_memory): ... this. Use
10468 prepare_to_access_memory/prepare_to_access_memory.
10469 (write_memory): Rename to ...
10470 (gdb_write_memory): ... this. Use
10471 prepare_to_access_memory/prepare_to_access_memory.
10472 (handle_search_memory_1): Adjust.
10473 (process_serial_event): Adjust.
10474 * target.h (struct target_ops): New fields
10475 prepare_to_access_memory and unprepare_to_access_memory.
10476 (prepare_to_access_memory, unprepare_to_access_memory): New.
10477 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10478 prepare_to_access_memory/prepare_to_access_memory.
10479 * nto-low.c (nto_target_ops): Adjust.
10480 * spu-low.c (spu_target_ops): Adjust.
10481 * win32-low.c (win32_target_ops): Adjust.
10482
fd467969
PA
104832010-08-26 Pedro Alves <pedro@codesourcery.com>
10484
10485 * Makefile.in (WARN_CFLAGS): Get it from configure.
10486 (WERROR_CFLAGS): New.
10487 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10488 * configure.ac: Introduce --enable-werror, which adds -Werror to
10489 the compiler command line. Enabled by default. Disable with
10490 --disable-werror. Add -Wdeclaration-after-statement
10491 Wpointer-arith and -Wformat-nonliteral to warning flags.
10492 * configure: Regenerate.
10493
331e2f5f
PA
104942010-08-26 Pedro Alves <pedro@codesourcery.com>
10495
10496 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10497
e581f2b4
PA
104982010-08-26 Pedro Alves <pedro@codesourcery.com>
10499
10500 * gdbreplay.c (remote_error): New.
10501 (gdbchar): New.
10502 (expect): Use gdbchar. Check for error reading from GDB.
10503 Clarify sync error output.
10504 (play): Check for errors writing to GDB.
10505 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10506 * remote-utils.c (getpkt): Check for errors writing to the remote
10507 descriptor.
10508
3c11dd79
PA
105092010-08-25 Pedro Alves <pedro@codesourcery.com>
10510
10511 * linux-low.c (linux_wait_1): Move non-debugging code out of
10512 `debug_threads' control.
10513
d20a8ad9
PA
105142010-08-25 Pedro Alves <pedro@codesourcery.com>
10515
10516 * linux-low.c (linux_wait_1): Don't set last_status here.
10517 * server.c (push_event, queue_stop_reply_callback): Assert we're
10518 not pushing a TARGET_WAITKIND_IGNORE event.
10519 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10520 (myresume, handle_target_event): Set the thread's last_resume_kind
10521 and last_status from the target returned status.
10522
964e4306
PA
105232010-08-25 Pedro Alves <pedro@codesourcery.com>
10524
10525 PR threads/10729
10526
10527 * linux-x86-low.c (update_debug_registers_callback): New.
10528 (i386_dr_low_set_addr): Use it.
10529 (i386_dr_low_get_addr): New.
10530 (i386_dr_low_set_control): Use update_debug_registers_callback.
10531 (i386_dr_low_get_control): New.
10532 (i386_dr_low_get_status): Adjust.
10533 * linux-low.c (linux_stop_lwp): New.
10534 * linux-low.h (linux_stop_lwp): Declare.
10535
10536 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10537 argument instead of a i386_debug_reg_state.
10538 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10539 a i386_debug_reg_state.
10540 (i386_insert_aligned_watchpoint): Adjust.
10541 (i386_remove_aligned_watchpoint): Adjust.
10542 (i386_low_stopped_data_address): Read the debug registers from the
10543 inferior instead of from the mirrors.
10544 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10545 (i386_dr_low_get_addr): Declare.
10546 (i386_dr_low_get_control): Declare.
10547 (i386_dr_low_get_status): Change prototype.
10548
10549 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10550 (i386_dr_low_get_addr): New.
10551 (i386_dr_low_get_control): New.
10552 (i386_dr_low_get_status): Adjust prototype. Return
10553 dr_status_mirror.
10554 (i386_initial_stuff): Clear dr_status_mirror and
10555 dr_control_mirror.
10556 (i386_get_thread_context): Adjust.
10557 (i386_set_thread_context): Adjust.
10558 (i386_thread_added): Adjust.
10559
5f21a75b
PA
105602010-08-24 Pedro Alves <pedro@codesourcery.com>
10561
10562 * linux-low.h (linux_thread_area): Delete declaration.
10563
3e4c1235
TS
105642010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10565
10566 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10567 after its termination.
10568
1971b033
PA
105692010-08-09 Pedro Alves <pedro@codesourcery.com>
10570
10571 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10572 (gdb_wants_all_stopped): Delete.
10573 (linux_wait_1): Don't call them.
10574 * server.c (handle_v_cont): Tag all threads as want-stopped.
10575 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10576 stopped as "client-wants-stopped".
10577
310444ac
PA
105782010-07-31 Pedro Alves <pedro@codesourcery.com>
10579
10580 * Makefile.in (signals_h): New.
10581 (server_h): Depend on it.
10582 (server.o): Don't depend on $(signals_def).
10583 (signals.o): Depend on $(signals_def).
10584
a19cae16
JK
105852010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10586
10587 * Makefile.in (signals_def): New.
10588 (server_h): Append include/gdb/signals.h and signals_def.
10589 (server.o): Append signals_def.
10590
30d50328
JK
105912010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10592
10593 * server.c (handle_target_event): Use target_signal_to_host for
10594 resume_info.sig initialization.
10595 * target.h (struct thread_resume) <sig>: New comment.
10596
5c3216e2
OS
105972010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10598
c6f46ca0
OS
10599 * server.c (handle_query): strcpy() the returned string from paddress()
10600 instead of sprintf().
5c3216e2
OS
10601 * utils.c (paddress): Return phex_nz().
10602
6bd31874
JB
106032010-07-07 Joel Brobecker <brobecker@adacore.com>
10604
10605 * server.c (handle_v_cont): Call mourn_inferior if process
10606 just exited.
10607 (myresume): Likewise.
10608
0fb4aa4b
PA
106092010-07-01 Pedro Alves <pedro@codesourcery.com>
10610
10611 Static tracepoints, and integration with UST.
10612
10613 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10614 * mem-break.c (uninsert_all_breakpoints)
10615 (reinsert_all_breakpoints): New.
10616 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10617 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10618 (gdb_agent_ust_loaded, helper_thread_id)
10619 (gdb_agent_helper_thread_id): New macros.
10620 (struct ipa_sym_addresses): Add addr_ust_loaded,
10621 addr_helper_thread_id, addr_cmd_buf.
10622 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10623 (in_process_agent_loaded_ust): New.
10624 (write_e_ust_not_loaded): New.
10625 (maybe_write_ipa_ust_not_loaded): New.
10626 (struct collect_static_trace_data_action): New.
10627 (enum tracepoint_type) <static_tracepoint>: New.
10628 (struct tracepoint) <handle>: Mention static tracepoints.
10629 (struct static_tracepoint_ctx): New.
10630 (CMD_BUF_SIZE): New.
10631 (add_tracepoint_action): Handle static tracepoint actions.
10632 (unprobe_marker_at): New.
10633 (clear_installed_tracepoints): Handle static tracepoints.
10634 (cmd_qtdp): Handle static tracepoints.
10635 (probe_marker_at): New.
10636 (cmd_qtstart): Handle static tracepoints.
10637 (response_tracepoint): Handle static tracepoints.
10638 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10639 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10640 (get_context_regcache): Handle static tracepoints.
10641 (do_action_at_tracepoint): Handle static tracepoint actions.
10642 (traceframe_find_block_type): Handle static trace data blocks.
10643 (traceframe_read_sdata): New.
10644 (download_tracepoints): Download static tracepoint actions.
10645 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10646 (GDB_PROBE_NAME): New.
10647 (ust_ops): New.
10648 (GET_UST_SYM): New.
10649 (USTF): New.
10650 (dlsym_ust): New.
10651 (ust_marker_to_static_tracepoint): New.
10652 (gdb_probe): New.
10653 (collect_ust_data_at_tracepoint): New.
10654 (gdb_ust_probe): New.
10655 (UNIX_PATH_MAX, SOCK_DIR): New.
10656 (gdb_ust_connect_sync_socket): New.
10657 (resume_thread, stop_thread): New.
10658 (run_inferior_command): New.
10659 (init_named_socket): New.
10660 (gdb_ust_socket_init): New.
10661 (cstr_to_hexstr): New.
10662 (next_st): New.
10663 (first_marker, next_marker): New.
10664 (response_ust_marker): New.
10665 (cmd_qtfstm, cmd_qtsstm): New.
10666 (unprobe_marker_at, probe_marker_at): New.
10667 (cmd_qtstmat, gdb_ust_thread): New.
10668 (gdb_ust_init): New.
10669 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10670 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10671 (ST_REGENTRY): New.
10672 (x86_64_st_collect_regmap): New.
10673 (X86_64_NUM_ST_COLLECT_GREGS): New.
10674 (AMD64_RIP_REGNUM): New.
10675 (supply_static_tracepoint_registers): New.
10676 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10677 (ST_REGENTRY): New.
10678 (i386_st_collect_regmap): New.
10679 (i386_NUM_ST_COLLECT_GREGS): New.
10680 (supply_static_tracepoint_registers): New.
10681 * server.c (handle_query): Handle qXfer:statictrace:read.
10682 <qSupported>: Report support for StaticTracepoints, and
10683 qXfer:statictrace:read features.
10684 * server.h (traceframe_read_sdata)
10685 (supply_static_tracepoint_registers): Declare.
10686 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10687 (unpack_varlen_hex): Include in IPA build.
10688 * Makefile.in (ustlibs, ustinc): New.
10689 (IPA_OBJS): Add remote-utils-ipa.o.
10690 ($(IPA_LIB)): Link -ldl and -lpthread.
10691 (UST_CFLAGS): New.
10692 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10693 * config.in, configure: Regenerate.
10694
9e4344e5
PA
106952010-06-20 Ian Lance Taylor <iant@google.com>
10696 Pedro Alves <pedro@codesourcery.com>
10697
10698 * linux-x86-low.c (always_true): Delete.
10699 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10700 trying to fool the compiler with always_true.
10701
c6beb2cb
PA
107022010-06-20 Pedro Alves <pedro@codesourcery.com>
10703
10704 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10705 conditions in gdbserver.
10706
d2ed6730
UW
107072010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10708
10709 * spu-low.c (spu_read_memory): Wrap around local store limit.
10710 (spu_write_memory): Likewise.
10711
4e29fb54
PA
107122010-06-15 Pedro Alves <pedro@codesourcery.com>
10713
10714 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10715 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10716 LONGEST uses.
10717 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10718 uses.
10719 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10720 uses with LONGEST uses.
10721
6a271cae
PA
107222010-06-14 Stan Shebs <stan@codesourcery.com>
10723 Pedro Alves <pedro@codesourcery.com>
10724
10725 Bytecode compiler.
10726
10727 * linux-x86-low.c: Include limits.h.
10728 (add_insns): New.
10729 (always_true): New.
10730 (EMIT_ASM): New.
10731 (EMIT_ASM32): New.
10732 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10733 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10734 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10735 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10736 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10737 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10738 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10739 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10740 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10741 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10742 (amd64_emit_void_call_2): New.
10743 (amd64_emit_ops): New.
10744 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10745 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10746 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10747 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10748 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10749 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10750 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10751 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10752 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10753 (i386_emit_stack_adjust, i386_emit_int_call_1)
10754 (i386_emit_void_call_2): New.
10755 (i386_emit_ops): New.
10756 (x86_emit_ops): New.
10757 (the_low_target): Install x86_emit_ops.
10758 * server.h (struct emit_ops): New.
10759 (get_raw_reg_func_addr): Declare.
10760 (current_insn_ptr, emit_error): Declare.
10761 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10762 (set_trace_state_variable_value): New defines.
10763 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10764 addr_get_trace_state_variable_value and
10765 addr_set_trace_state_variable_value.
10766 (symbol_list): New fields for get_raw_reg,
10767 get_trace_state_variable_value and set_trace_state_variable_value.
10768 (condfn): New typedef.
10769 (struct tracepoint): New field `compiled_cond'.
10770 (do_action_at_tracepoint): Clear compiled_cond.
10771 (get_trace_state_variable_value, set_trace_state_variable_value):
10772 Export in the IPA.
10773 (condition_true_at_tracepoint): If there's a compiled condition,
10774 run that.
10775 (current_insn_ptr, emit_error): New globals.
10776 (struct bytecode_address): New.
10777 (get_raw_reg_func_addr): New.
10778 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10779 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10780 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10781 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10782 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10783 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10784 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10785 (compile_tracepoint_condition, compile_bytecodes): New.
10786 * target.h (emit_ops): Forward declare.
10787 (struct target_ops): New field emit_ops.
10788 (target_emit_ops): New.
10789 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10790 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10791 * linux-low.c (linux_emit_ops): New.
10792 (linux_target_ops): Install it.
10793 * linux-low.h (struct linux_target_ops): New field emit_ops.
10794
92b72907
UW
107952010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10796
10797 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10798 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10799
fa593d66
PA
108002010-06-01 Pedro Alves <pedro@codesourcery.com>
10801 Stan Shebs <stan@codesourcery.com>
10802
10803 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10804 (all): Depend on $(extra_libraries).
10805 (install-only): Install the IPA.
10806 (IPA_OBJS, IPA_LIB): New.
10807 (clean): Remove the IPA lib.
10808 (IPAGENT_CFLAGS): New.
10809 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10810 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10811 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10812 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10813 * configure.ac: Check for atomic builtins support in the compiler.
10814 (IPA_DEPFILES, extra_libraries): Define.
10815 * configure.srv (ipa_obj): Add description.
10816 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10817 (i[34567]86-*-linux*): Set ipa_obj.
10818 (x86_64-*-linux*): Set ipa_obj.
10819 * linux-low.c (stabilizing_threads): New.
10820 (supports_fast_tracepoints): New.
10821 (linux_detach): Stabilize threads before detaching.
10822 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10823 the lwp is either not stabilizing, or is moving out of a jump pad.
10824 (linux_fast_tracepoint_collecting): New.
10825 (maybe_move_out_of_jump_pad): New.
10826 (enqueue_one_deferred_signal): New.
10827 (dequeue_one_deferred_signal): New.
10828 (linux_wait_for_event_1): If moving out of a jump pad, defer
10829 pending signals to later.
10830 (linux_stabilize_threads): New.
10831 (linux_wait_1): Check if threads need moving out of jump pads, and
10832 do it if so.
10833 (stuck_in_jump_pad_callback): New.
10834 (move_out_of_jump_pad_callback): New.
10835 (lwp_running): New.
10836 (linux_resume_one_lwp): Handle moving out of jump pads.
10837 (linux_set_resume_request): Dequeue deferred signals.
10838 (need_step_over_p): Also step over fast tracepoint jumps.
10839 (start_step_over): Also uninsert fast tracepoint jumps.
10840 (finish_step_over): Also reinsert fast tracepoint jumps.
10841 (linux_install_fast_tracepoint_jump): New.
10842 (linux_target_ops): Install linux_stabilize_threads and
10843 linux_install_fast_tracepoint_jump_pad.
10844 * linux-low.h (linux_target_ops) <get_thread_area,
10845 install_fast_tracepoint_jump_pad>: New fields.
10846 (struct lwp_info) <collecting_fast_tracepoint,
10847 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10848 (linux_get_thread_area): Declare.
10849 * linux-x86-low.c (jump_insn): New.
10850 (x86_get_thread_area): New.
10851 (append_insns): New.
10852 (push_opcode): New.
10853 (amd64_install_fast_tracepoint_jump_pad): New.
10854 (i386_install_fast_tracepoint_jump_pad): New.
10855 (x86_install_fast_tracepoint_jump_pad): New.
10856 (the_low_target): Install x86_get_thread_area and
10857 x86_install_fast_tracepoint_jump_pad.
10858 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10859 (struct fast_tracepoint_jump): New.
10860 (fast_tracepoint_jump_insn): New.
10861 (fast_tracepoint_jump_shadow): New.
10862 (find_fast_tracepoint_jump_at): New.
10863 (fast_tracepoint_jump_here): New.
10864 (delete_fast_tracepoint_jump): New.
10865 (set_fast_tracepoint_jump): New.
10866 (uninsert_fast_tracepoint_jumps_at): New.
10867 (reinsert_fast_tracepoint_jumps_at): New.
10868 (set_breakpoint_at): Use write_inferior_memory.
10869 (uninsert_raw_breakpoint): Use write_inferior_memory.
10870 (check_mem_read): Mask out fast tracepoint jumps.
10871 (check_mem_write): Mask out fast tracepoint jumps.
10872 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10873 (set_fast_tracepoint_jump): Declare.
10874 (delete_fast_tracepoint_jump)
10875 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10876 (reinsert_fast_tracepoint_jumps_at): Declare.
10877 * regcache.c: Don't compile many functions when building the
10878 in-process agent library.
10879 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10880 the register buffer in the heap.
10881 (free_register_cache): If the register buffer isn't owned by the
10882 regcache, don't free it.
10883 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10884 pre-existing register caches.
10885 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10886 type.
10887 (convert_ascii_to_int): : Constify `from' parameter type.
10888 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10889 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10890 the needed buffer in-place.
10891 (relocate_instruction): New.
10892 * server.c (handle_query) <qSymbols>: If the target supports
10893 tracepoints, give it a chance of looking up symbols. Report
10894 support for fast tracepoints.
10895 (handle_status): Stabilize threads.
10896 (process_serial_event): Adjust.
10897 * server.h (struct fast_tracepoint_jump): Forward declare.
10898 (struct process_info) <fast_tracepoint_jumps>: New field.
10899 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10900 (decode_X_packet, decode_M_packet): Adjust.
10901 (relocate_instruction): Declare.
10902 (in_process_agent_loaded): Declare.
10903 (tracepoint_look_up_symbols): Declare.
10904 (struct fast_tpoint_collect_status): Declare.
10905 (fast_tracepoint_collecting): Declare.
10906 (force_unlock_trace_buffer): Declare.
10907 (handle_tracepoint_bkpts): Declare.
10908 (initialize_low_tracepoint)
10909 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10910 * target.h (struct target_ops) <stabilize_threads,
10911 install_fast_tracepoint_jump_pad>: New fields.
10912 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10913 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10914 [HAVE_STDINT_H]: Include stdint.h.
10915 (trace_debug_1): Rename to ...
10916 (trace_vdebug): ... this.
10917 (trace_debug): Rename to ...
10918 (trace_debug_1): ... this. Add `level' parameter.
10919 (trace_debug): New.
10920 (ATTR_USED, ATTR_NOINLINE): New.
10921 (IP_AGENT_EXPORT): New.
10922 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10923 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10924 (about_to_request_buffer_space, trace_buffer_is_full)
10925 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10926 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10927 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10928 (traceframe_write_count, traceframes_created)
10929 (trace_state_variables)
10930 New renaming defines.
10931 (struct ipa_sym_addresses): New.
10932 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10933 (symbol_list): New.
10934 (ipa_sym_addrs): New.
10935 (all_tracepoint_symbols_looked_up): New.
10936 (in_process_agent_loaded): New.
10937 (write_e_ipa_not_loaded): New.
10938 (maybe_write_ipa_not_loaded): New.
10939 (tracepoint_look_up_symbols): New.
10940 (debug_threads) [IN_PROCESS_AGENT]: New.
10941 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10942 (UNKNOWN_SIDE_EFFECTS): New.
10943 (stop_tracing): New.
10944 (flush_trace_buffer): New.
10945 (stop_tracing_bkpt): New.
10946 (flush_trace_buffer_bkpt): New.
10947 (read_inferior_integer): New.
10948 (read_inferior_uinteger): New.
10949 (read_inferior_data_pointer): New.
10950 (write_inferior_data_pointer): New.
10951 (write_inferior_integer): New.
10952 (write_inferior_uinteger): New.
10953 (struct collect_static_trace_data_action): Delete.
10954 (enum tracepoint_type): New.
10955 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10956 <actions_str, step_actions, step_actions_str>: Only include in
10957 GDBserver.
fa593d66
PA
10958 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10959 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10960 (tracepoints): Use IP_AGENT_EXPORT.
10961 (last_tracepoint): Don't include in the IPA.
10962 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10963 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10964 (alloced_trace_state_variables): New.
10965 (trace_state_variables): Use IP_AGENT_EXPORT.
10966 (traceframe_t): Delete unused variable.
10967 (circular_trace_buffer): Don't include in the IPA.
10968 (trace_buffer_start): Delete.
10969 (struct trace_buffer_control): New.
10970 (trace_buffer_free): Delete.
10971 (struct ipa_trace_buffer_control): New.
10972 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10973 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10974 New.
10975 (trace_buffer_ctrl): New.
10976 (TRACE_BUFFER_CTRL_CURR): New.
10977 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10978 Reimplement as macros.
10979 (trace_buffer_wrap): Delete.
10980 (traceframe_write_count, traceframe_read_count)
10981 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10982 (struct tracepoint_hit_ctx) <type>: New field.
10983 (struct fast_tracepoint_ctx): New.
10984 (memory_barrier): New.
10985 (cmpxchg): New.
10986 (record_tracepoint_error): Update atomically in the IPA.
10987 (clear_inferior_trace_buffer): New.
10988 (about_to_request_buffer_space): New.
10989 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10990 updating the same buffer.
10991 (add_tracepoint): Default the tracepoint's type to trap
10992 tracepoint, and orig_size to -1.
10993 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10994 internal variables.
10995 (create_trace_state_variable): New parameter `gdb'. Handle it.
10996 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10997 (cmd_qtdp): Handle fast tracepoints.
10998 (cmd_qtdv): Adjust.
10999 (max_jump_pad_size): New.
11000 (gdb_jump_pad_head): New.
11001 (get_jump_space_head): New.
11002 (claim_jump_space): New.
11003 (sort_tracepoints): New.
11004 (MAX_JUMP_SIZE): New.
11005 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11006 IPA.
11007 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11008 support. Upload fast traceframes, and delete internal IPA
11009 breakpoints.
11010 (stop_tracing_handler): New.
11011 (flush_trace_buffer_handler): New.
11012 (cmd_qtstop): Upload fast tracepoints.
11013 (response_tracepoint): Handle fast tracepoints.
11014 (tracepoint_finished_step): Upload fast traceframes. Set the
11015 tracepoint hit context's tracepoint type.
11016 (handle_tracepoint_bkpts): New.
11017 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11018 type. Add comment about fast tracepoints.
11019 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11020 non-existing action_str field.
11021 (get_context_regcache): Handle fast tracepoints.
11022 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11023 to the regcache.
11024 (fast_tracepoint_from_jump_pad_address): New.
11025 (fast_tracepoint_from_ipa_tpoint_address): New.
11026 (collecting_t): New.
11027 (force_unlock_trace_buffer): New.
11028 (fast_tracepoint_collecting): New.
11029 (collecting): New.
11030 (gdb_collect): New.
11031 (write_inferior_data_ptr): New.
11032 (target_tp_heap): New.
11033 (target_malloc): New.
11034 (download_agent_expr): New.
11035 (UALIGN): New.
11036 (download_tracepoints): New.
11037 (download_trace_state_variables): New.
11038 (upload_fast_traceframes): New.
11039 (IPA_FIRST_TRACEFRAME): New.
11040 (IPA_NEXT_TRACEFRAME_1): New.
11041 (IPA_NEXT_TRACEFRAME): New.
11042 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11043 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11044 (gdb_jump_pad_buffer_end): New.
11045 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11046 (initialize_tracepoint): Adjust.
11047 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11048 buffer. Initialize the low module.
11049 * utils.c (PREFIX, TOOLNAME): New.
11050 (malloc_failure): Use PREFIX.
11051 (error): In the IPA, an error causes an exit.
11052 (fatal, warning): Use PREFIX.
11053 (internal_error): Use TOOLNAME.
11054 (NUMCELLS): Increase to 10.
11055 * configure, config.in: Regenerate.
11056
d149dd1d
PA
110572010-06-01 Pedro Alves <pedro@codesourcery.com>
11058
11059 * server.c (handle_query) <qSupported>: Do two passes over the
11060 qSupported string to avoid nesting strtok.
11061
f6528abd
JK
110622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11063
11064 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11065 (CDEPS): New.
11066 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11067 -Wl,--dynamic-list.
11068 * configure: Regenerate.
11069 * proc-service.list: New.
11070
ca2a87a0
JK
110712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11072
11073 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11074 New comment.
11075
363a6e9f
OS
110762010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11077
11078 * gdbreplay.c (remote_open): Check error return from socket() call by
11079 its equality to -1 not by it being negative.
11080 * remote-utils.c (remote_open): Likewise.
11081
d23b6cb1
PA
110822010-05-23 Pedro Alves <pedro@codesourcery.com>
11083
11084 * config.h: Regenerate.
11085
28d3cf85
MK
110862010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11087
11088 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11089 doesn't provide PTRACE_GET_THREAD_AREA.
11090
fea36a59
MK
110912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11092
11093 * linux-m68k-low.c: Include <asm/ptrace.h>
11094 (ps_get_thread_area): Implement.
11095
24b066ba
DE
110962010-05-03 Doug Evans <dje@google.com>
11097
11098 * event-loop.c (struct callback_event): New struct.
11099 (callback_list): New global.
11100 (append_callback_event, delete_callback_event): New functions.
11101 (process_callback): New function.
11102 (start_event_loop): Call it.
11103 * remote-utils.c (NOT_SCHEDULED): Define.
11104 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11105 moved out of readchar.
11106 (readchar): Rewrite. Call reschedule before returning.
11107 (reset_readchar): New function.
11108 (remote_close): Call it.
11109 (process_remaining, reschedule): New functions.
11110 * server.h (callback_handler_func): New typedef.
11111 (append_callback_event, delete_callback_event): Declare.
11112
9836d6ea
PA
111132010-05-03 Pedro Alves <pedro@codesourcery.com>
11114
11115 * proc-service.c (ps_pglobal_lookup): Use
11116 thread_db_look_up_one_symbol.
11117 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11118 parameter. Use it instead of all_symbols_looked_up.
11119 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11120 field.
11121 (all_symbols_looked_up): Don't declare.
11122 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11123 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11124 field.
11125 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11126 Set all_symbols_looked_up here.
11127 (thread_db_look_up_one_symbol): New.
11128 (thread_db_get_tls_address): Adjust.
11129 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11130 thread_db object on the heap, and tentatively set it in the
11131 process structure.
11132 (thread_db_init): Don't set all_symbols_looked_up here.
11133 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11134
7984d532
PA
111352010-05-03 Pedro Alves <pedro@codesourcery.com>
11136
11137 * linux-low.c (linux_kill, linux_detach): Adjust.
11138 (status_pending_p_callback): Remove redundant statement. Check
11139 for !TARGET_WAITIKIND_IGNORE, instead of
11140 TARGET_WAITKIND_STOPPED.
11141 (handle_tracepoints): Make sure LWP is locked. Adjust.
11142 (linux_wait_for_event_1): Adjust.
11143 (linux_cancel_breakpoints): New.
11144 (unsuspend_one_lwp): New.
11145 (unsuspend_all_lwps): New.
11146 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11147 (send_sigstop_callback): Change return type to int, add new
11148 `except' parameter and handle it.
11149 (suspend_and_send_sigstop_callback): New.
11150 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11151 pass them down. If SUSPEND, also increment the lwp's suspend
11152 count.
11153 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11154 (need_step_over_p): Don't consider suspended LWPs.
11155 (start_step_over): Adjust.
11156 (proceed_one_lwp): Change return type to int, add new `except'
11157 parameter and handle it.
11158 (unsuspend_and_proceed_one_lwp): New.
11159 (proceed_all_lwps): Use find_inferior instead of
11160 for_each_inferior.
11161 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11162 also decrement the suspend count of LWPs. Pass `except' down,
11163 instead of hacking its suspend count.
11164 (linux_pause_all): Add `freeze' parameter. Adjust.
11165 (linux_unpause_all): New.
11166 (linux_target_ops): Install linux_unpause_all.
11167 * server.c (handle_status): Adjust.
11168 * target.h (struct target_ops): New fields `unpause_all' and
11169 `cancel_breakpoints'. Add new parameter to `pause_all'.
11170 (pause_all): Add new `freeze' parameter.
11171 (unpause_all): New.
11172 (cancel_breakpoints): New.
11173 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11174 cancel breakpoints.
11175 (cmd_qtstart): Pause threads.
11176 (stop_tracing): Pause threads, and cancel breakpoints.
11177 * win32-low.c (win32_target_ops): Adjust.
11178
e471f25b
PA
111792010-05-03 Pedro Alves <pedro@codesourcery.com>
11180
11181 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11182 the inferior right away from here...
11183 (linux_wait_1): ... to here, and adjust to check the thread's
11184 last_resume_kind instead of the lwp's step or stop_expected flags.
11185
1915ef4f
PA
111862010-05-02 Pedro Alves <pedro@codesourcery.com>
11187
11188 * README: Use consistent `GDB' and `GDBserver' spellings.
11189
f9e39928
PA
111902010-05-02 Pedro Alves <pedro@codesourcery.com>
11191
11192 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11193 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11194 (linux_detach_one_lwp): Assume the lwp is stopped.
11195 (any_thread_of): Delete.
11196 (linux_detach): Stop all lwps here. Don't blindly delete all
11197 breakpoints.
11198 (delete_lwp_callback): New.
11199 (linux_mourn): Delete all lwps of the process that is gone.
11200 (linux_wait_1): Don't delete the last lwp of the process here.
11201 * mem-break.h (mark_breakpoints_out): Declare.
11202 * mem-break.c (mark_breakpoints_out): New.
11203 (free_all_breakpoints): Use it.
11204 * server.c (handle_target_event): If the process is gone, mark
11205 breakpoints out.
11206 * thread-db.c (struct thread_db) <create_bp>: New field.
11207 (thread_db_enable_reporting): Fix prototype. Store a thread event
11208 breakpoint reference in the thread_db struct.
11209 (thread_db_load_search): Clear the thread_db object.
11210 (try_thread_db_load_1): Ditto.
11211 (switch_to_process): New.
11212 (disable_thread_event_reporting): Use it.
11213 (remove_thread_event_breakpoints): New.
11214 (thread_db_detach, thread_db_mourn): Use it.
11215
1e7fc18c
PA
112162010-05-01 Pedro Alves <pedro@codesourcery.com>
11217
11218 * linux-low.c (linux_enable_event_reporting): New.
11219 (linux_wait_for_event_1, handle_extended_wait): Use it.
11220
02fc4de7
PA
112212010-04-30 Pedro Alves <pedro@codesourcery.com>
11222
11223 * linux-low.c (linux_kill_one_lwp, linux_kill)
11224 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11225 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11226 SIGSTOP even if the LWP is stopped.
11227 (send_sigstop_callback): New.
11228 (stop_all_lwps): Use send_sigstop_callback instead.
11229 (linux_resume_one_thread): Adjust.
11230 (proceed_one_lwp): Still proceed an LWP that the client has
11231 requested to stop, if we haven't reported it as stopped yet. Make
11232 sure that LWPs the client want stopped, have a pending SIGSTOP.
11233
bc3b5632
DE
112342010-04-26 Doug Evans <dje@google.com>
11235
ae1ada35
DE
11236 * server.c (handle_general_set): Make static.
11237
bc3b5632
DE
11238 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11239 Print received char after testing for error/eof instead of before.
11240 (input_interrupt): Tweak comment.
11241
65730243
DE
112422010-04-23 Doug Evans <dje@google.com>
11243
11244 * server.c (start_inferior): Print inferior argv if --debug.
11245
a8ae7dc0
AR
112462010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11247
11248 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11249 * nto-x86-low.c: Include server.h
11250
1c07cc19
PM
112512010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11252
11253 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11254 be consistent with other sources of this directory.
11255 (init_registers_amd64): Correct name of source file of this function
11256 in the comment.
11257
e0a61e09
PM
112582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11259
11260 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11261 64-bit executables.
11262
54709339
PM
112632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11264
11265 * win32-i386-low.c: Add 64-bit support.
11266 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11267 (init_registers_amd64): Declare.
11268 (mappings): Add 64-bit version of array.
11269 (init_windows_x86): New function.
11270 (the_low_target): Change init_arch field to init_windows_x86.
11271
e8f0053d
PM
112722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11273
11274 * win32-low.c: Adapt to support also 64-bit architecture.
11275 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11276 (get_image_name): Use SIZE_T type for local variable `done'.
11277 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11278 (toolhelp_get_dll_name): Idem.
11279 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11280 Use uintptr_t typecast to avoid warning.
11281 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11282 (handle_exception): Use phex_nz to avoid warning.
11283 (win32_wait): Remove unused local variable `process'.
11284
c481e77e
PM
112852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11286
11287 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11288 `amd64-avx.o'.
11289
12ea4b69
PM
112902010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11291
11292 * configure.ac: Use `ws2_32' library for srv_mingw.
11293 * configure: Regenerate.
11294 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11295 * remote-utils.c: Likewise.
11296
f6d1620c
L
112972010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11298
11299 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11300 if __x86_64__ is defined.
11301
8e642873
PM
113022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11303
11304 * configure: Regenerate.
11305
711e434b
PM
113062010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11307
11308 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11309 * target.h (target_ops): New get_tib_address field.
11310 * win32-low.h (win32_thread_info): Add thread_local_base field.
11311 * win32-low.c (child_add_thread): Add tlb argument.
11312 Set thread_local_base field to TLB.
11313 (get_child_debug_event): Adapt to child_add_thread change.
11314 (win32_get_tib_address): New function.
11315 (win32_target_ops): Set get_tib_address field to
11316 win32_get_tib_address.
11317 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11318
505106cd
PA
113192010-04-12 Pedro Alves <pedro@codesourcery.com>
11320
505106cd
PA
11321 * linux-low.c (linux_mourn): Also remove the process.
11322 * server.c (handle_target_event): Don't remove the process here.
11323 * nto-low.c (nto_mourn): New.
11324 (nto_target_ops): Install it.
11325 * spu-low.c (spu_mourn): New.
11326 (spu_target_ops): Install it.
11327 * win32-low.c (win32_mourn): New.
11328 (win32_target_ops): Install it.
11329
e8470a06
PA
113302010-04-12 Pedro Alves <pedro@codesourcery.com>
11331
11332 * server.h (buffer_xml_printf): Remove redundant `;'.
11333
45ba0d02
PA
113342010-04-12 Pedro Alves <pedro@codesourcery.com>
11335
11336 * regcache.c (set_register_cache): Invalidate regcaches before
11337 changing the register cache layout.
11338 (regcache_invalidate_one): Allow a NULL regcache.
11339 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11340 regcaches before changing the register cache layout or the target
11341 regsets.
11342
59e04013
L
113432010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11344
11345 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11346 variable warning on Linux/x86-64.
11347
8336d594
PA
113482010-04-11 Pedro Alves <pedro@codesourcery.com>
11349
11350 GDBserver disconnected tracing support.
11351
11352 * linux-low.c (linux_remove_process): Delete.
11353 (add_lwp): Don't set last_resume_kind here.
11354 (linux_kill): Use `mourn'.
11355 (linux_detach): Use `thread_db_detach', and `mourn'.
11356 (linux_mourn): New.
11357 (linux_attach_lwp_1): Adjust comment.
11358 (linux_attach): last_resume_kind moved the thread_info; adjust.
11359 (status_pending_p_callback): Adjust.
11360 (linux_wait_for_event_1): Adjust.
11361 (count_events_callback, select_singlestep_lwp_callback)
11362 (select_event_lwp_callback, cancel_breakpoints_callback)
11363 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11364 (proceed_one_lwp): Adjust.
11365 (linux_async): Add debug output.
11366 (linux_thread_stopped): New.
11367 (linux_pause_all): New.
11368 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11369 linux_pause_all.
11370 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11371 (thread_db_free): Delete declaration.
11372 (thread_db_detach, thread_db_mourn): Declare.
11373 * thread-db.c (thread_db_init): Use thread_db_mourn.
11374 (thread_db_free): Delete, split in two.
11375 (disable_thread_event_reporting): New.
11376 (thread_db_detach): New.
11377 (thread_db_mourn): New.
11378
11379 * server.h (struct thread_info) <last_resume_kind>: New field.
11380 <attached>: Add comment.
11381 <gdb_detached>: New field.
11382 (handler_func): Change return type to int.
11383 (handle_serial_event, handle_target_event): Ditto.
11384 (gdb_connected): Declare.
11385 (tracing): Delete.
11386 (disconnected_tracing): Declare.
11387 (stop_tracing): Declare.
11388
11389 * server.c (handle_query) <qSupported>: Report support for
11390 disconnected tracing.
11391 (queue_stop_reply_callback): Account for running threads.
11392 (gdb_wants_thread_stopped): New.
11393 (gdb_wants_all_threads_stopped): New.
11394 (gdb_reattached_process): New.
11395 (handle_status): Clear the `gdb_detached' flag of all processes.
11396 In all-stop, stop all threads.
11397 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11398 (process_serial_event): If the remote connection breaks, or if an
11399 exit was forced with "monitor exit", force an event loop exit.
11400 Handle disconnected tracing on detach.
11401 (handle_serial_event): Adjust.
11402 (handle_target_event): If GDB isn't connected, forward events back
11403 to the inferior, unless the last process exited, in which case,
11404 exit gdbserver. Adjust interface.
11405
11406 * remote-utils.c (remote_open): Don't block in accept. Instead
11407 register an event loop source on the listen socket file
11408 descriptor. Refactor bits into ...
11409 (listen_desc): ... this new global.
11410 (gdb_connected): ... this new function.
11411 (enable_async_notification): ... this new function.
11412 (handle_accept_event): ... this new function.
11413 (remote_close): Clear remote_desc.
11414
11415 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11416
11417 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11418 New fields.
11419 (mourn_inferior): Define.
11420 (target_process_qsupported): Avoid the dangling else problem.
11421 (thread_stopped): Define.
11422 (pause_all): Define.
11423 (target_waitstatus_to_string): Declare.
11424 * target.c (target_waitstatus_to_string): New.
11425
11426 * tracepoint.c (tracing): Make extern.
11427 (disconnected_tracing): New.
11428 (stop_tracing): Make extern. Handle tracing stops due to GDB
11429 disconnecting.
11430 (cmd_qtdisconnected): New.
11431 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11432 (handle_tracepoint_general_set): Handle QTDisconnected.
11433
11434 * event-loop.c (event_handler_func): Change return type to int.
11435 (process_event): Bail out if the event handler wants the event
11436 loop to stop.
11437 (handle_file_event): Ditto.
11438 (start_event_loop): Bail out if the event handler wants the event
11439 loop to stop.
11440
11441 * nto-low.c (nto_target_ops): Adjust.
11442 * spu-low.c (spu_wait): Don't remove the process here.
11443 (spu_target_ops): Adjust.
11444 * win32-low.c (win32_wait): Don't remove the process here.
11445 (win32_target_ops): Adjust.
11446
5d267c4c
PA
114472010-04-11 Pedro Alves <pedro@codesourcery.com>
11448
11449 * regcache.c (realloc_register_cache): Invalidate inferior's
11450 regcache before recreating it.
11451
623ccd72
PA
114522010-04-09 Pedro Alves <pedro@codesourcery.com>
11453
11454 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11455
219f2f23
PA
114562010-04-09 Stan Shebs <stan@codesourcery.com>
11457 Pedro Alves <pedro@codesourcery.com>
11458
11459 * server.h (LONGEST): New.
11460 (struct thread_info) <while_stepping>: New field.
11461 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11462 Declare.
11463 (initialize_tracepoint, handle_tracepoint_general_set)
11464 (handle_tracepoint_query, tracepoint_finished_step)
11465 (tracepoint_was_hit, release_while_stepping_state_list):
11466 (current_traceframe): Declare.
11467 * server.c (handle_general_set): Handle tracepoint packets.
11468 (read_memory): New.
11469 (write_memory): New.
11470 (handle_search_memory_1): Use read_memory.
11471 (handle_query): Report support for conditional tracepoints, trace
11472 state variables, and tracepoint sources. Handle tracepoint
11473 queries.
11474 (main): Initialize the tracepoints module.
11475 (process_serial_event): Handle traceframe reads/writes.
11476
11477 * linux-low.c (handle_tracepoints): New.
11478 (linux_wait_1): Call it.
11479 (linux_resume_one_lwp): Handle while-stepping.
11480 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11481 (linux_target_ops): Install them.
11482 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11483 New field.
11484 * linux-x86-low.c (x86_supports_tracepoints): New.
11485 (the_low_target). Install it.
11486
11487 * mem-break.h (delete_breakpoint): Declare.
11488 * mem-break.c (delete_breakpoint): Make external.
11489
11490 * target.h (struct target_ops): Add `supports_tracepoints',
11491 `read_pc', and `write_pc' fields.
11492 (target_supports_tracepoints): Define.
11493 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11494 (phex_nz): New.
11495
11496 * regcache.h (struct regcache) <registers_owned>: New field.
11497 (init_register_cache, regcache_cpy): Declare.
11498 (regcache_read_pc, regcache_write_pc): Declare.
11499 (register_cache_size): Declare.
11500 (supply_regblock): Declare.
11501 * regcache.c (init_register_cache): New.
11502 (new_register_cache): Use it.
11503 (regcache_cpy): New.
11504 (register_cache_size): New.
11505 (supply_regblock): New.
11506 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11507
219f2f23
PA
11508 * tracepoint.c: New.
11509
11510 * Makefile.in (OBS): Add tracepoint.o.
11511 (tracepoint.o): New rule.
11512
3a13a53b
L
115132010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11514
11515 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11516 (i386-mmx.o): New.
11517 (i386-mmx.c): Likewise.
11518 (i386-mmx-linux.o): Likewise.
11519 (i386-mmx-linux.c): Likewise.
11520
11521 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11522 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11523 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11524 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11525
11526 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11527 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11528 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11529
1570b33e
L
115302010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11531
11532 * Makefile.in (clean): Updated.
11533 (i386-avx.o): New.
11534 (i386-avx.c): Likewise.
11535 (i386-avx-linux.o): Likewise.
11536 (i386-avx-linux.c): Likewise.
11537 (amd64-avx.o): Likewise.
11538 (amd64-avx.c): Likewise.
11539 (amd64-avx-linux.o): Likewise.
11540 (amd64-avx-linux.c): Likewise.
11541
11542 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11543 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11544 (srv_amd64_regobj): Add amd64-avx.o.
11545 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11546 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11547 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11548 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11549 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11550 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11551 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11552
11553 * i387-fp.c: Include "i386-xstate.h".
11554 (i387_xsave): New.
11555 (i387_cache_to_xsave): Likewise.
11556 (i387_xsave_to_cache): Likewise.
11557 (x86_xcr0): Likewise.
11558
11559 * i387-fp.h (i387_cache_to_xsave): Likewise.
11560 (i387_xsave_to_cache): Likewise.
11561 (x86_xcr0): Likewise.
11562
11563 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11564 * linux-crisv32-low.c (target_regsets): Likewise.
11565 * linux-m68k-low.c (target_regsets): Likewise.
11566 * linux-mips-low.c (target_regsets): Likewise.
11567 * linux-ppc-low.c (target_regsets): Likewise.
11568 * linux-s390-low.c (target_regsets): Likewise.
11569 * linux-sh-low.c (target_regsets): Likewise.
11570 * linux-sparc-low.c (target_regsets): Likewise.
11571 * linux-xtensa-low.c (target_regsets): Likewise.
11572
11573 * linux-low.c: Include <sys/uio.h>.
11574 (regsets_fetch_inferior_registers): Support nt_type.
11575 (regsets_store_inferior_registers): Likewise.
11576 (linux_process_qsupported): New.
11577 (linux_target_ops): Add linux_process_qsupported.
11578
11579 * linux-low.h (regset_info): Add nt_type.
11580 (linux_target_ops): Add process_qsupported.
11581
11582 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11583 and <sys/uio.h>.
11584 (init_registers_i386_avx_linux): New.
11585 (init_registers_amd64_avx_linux): Likewise.
11586 (xmltarget_i386_linux_no_xml): Likewise.
11587 (xmltarget_amd64_linux_no_xml): Likewise.
11588 (PTRACE_GETREGSET): Likewise.
11589 (PTRACE_SETREGSET): Likewise.
11590 (x86_fill_xstateregset): Likewise.
11591 (x86_store_xstateregset): Likewise.
11592 (use_xml): Likewise.
11593 (x86_linux_update_xmltarget): Likewise.
11594 (x86_linux_process_qsupported): Likewise.
11595 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11596 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11597 init_registers_i386_linux here. Call
11598 x86_linux_update_xmltarget.
11599 (the_low_target): Add x86_linux_process_qsupported.
11600
11601 * server.c (handle_query): Call target_process_qsupported.
11602
11603 * target.h (target_ops): Add process_qsupported.
11604 (target_process_qsupported): New.
11605
fc7238bb
PA
116062010-04-03 Pedro Alves <pedro@codesourcery.com>
11607
11608 * inferiors.c (add_thread): Set last_status kind to
11609 TARGET_WAITKIND_IGNORE.
11610 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11611 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11612 (linux_wait_1): Move `thread' local definition to block that uses
11613 it. Don't NULL initialize `event_child'.
11614 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11615 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11616 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11617
bdabb078
PA
116182010-04-01 Pedro Alves <pedro@codesourcery.com>
11619
11620 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11621 an extended waitstatus, or by a watchpoint.
11622 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11623 thread was stepping or has been stopped by a watchpoint.
11624
d3bbe7a0
PA
116252010-04-01 Pedro Alves <pedro@codesourcery.com>
11626
11627 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11628 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11629 of another, then delete the previous, and validate all
11630 breakpoints.
11631 (validate_inserted_breakpoint): New.
11632 (delete_disabled_breakpoints): New.
11633 (validate_breakpoints): New.
11634 (check_mem_read): Validate breakpoints before trusting their
11635 shadow. Delete disabled breakpoints.
11636 (check_mem_write): Validate breakpoints before trusting they
11637 should be inserted. Delete disabled breakpoints.
11638 * mem-break.h (validate_breakpoints):
11639 * server.c (handle_query): Validate breakpoints when we see a
11640 qSymbol query.
11641
8b07ae33
PA
116422010-04-01 Pedro Alves <pedro@codesourcery.com>
11643
11644 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11645 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11646 if we could tell there's a GDB breakpoint at stop_pc.
11647 (need_step_over_p): Don't do a step over if we find a GDB
11648 breakpoint at the resume PC.
11649
11650 * mem-break.c (struct raw_breakpoint): New.
11651 (enum bkpt_type): New type `gdb_breakpoint'.
11652 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11653 fields. New field `raw'.
11654 (find_raw_breakpoint_at): New.
11655 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11656 breakpoint instead.
11657 (set_breakpoint_at): Adjust.
11658 (delete_raw_breakpoint): New.
11659 (release_breakpoint): New.
11660 (delete_breakpoint): Rename to...
11661 (delete_breakpoint_1): ... this. Add proc parameter. Use
11662 release_breakpoint. Return ENOENT.
11663 (delete_breakpoint): Reimplement.
11664 (find_breakpoint_at): Delete.
11665 (find_gdb_breakpoint_at): New.
11666 (delete_breakpoint_at): Delete.
11667 (set_gdb_breakpoint_at): New.
11668 (delete_gdb_breakpoint_at): New.
11669 (gdb_breakpoint_here): New.
11670 (set_reinsert_breakpoint): Use release_breakpoint.
11671 (uninsert_breakpoint): Rename to ...
11672 (uninsert_raw_breakpoint): ... this.
11673 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11674 (reinsert_raw_breakpoint): Change parameter type to
11675 raw_breakpoint.
11676 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11677 instead.
11678 (check_breakpoints): Adjust. Use release_breakpoint.
11679 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11680 (breakpoint_inserted_here): Ditto.
11681 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11682 Don't trust the breakpoint's shadow if it is not inserted.
11683 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11684 (delete_all_breakpoints): Adjust.
11685 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11686 use delete_breakpoint_1.
11687
11688 * mem-break.h (breakpoints_supported): Delete declaration.
11689 (set_gdb_breakpoint_at): Declare.
11690 (gdb_breakpoint_here): Declare.
11691 (delete_breakpoint_at): Delete.
11692 (delete_gdb_breakpoint_at): Declare.
11693
11694 * server.h (struct raw_breakpoint): Forward declare.
11695 (struct process_info): New field `raw_breakpoints'.
11696
11697 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11698 breakpoints.
11699
6bf5e0ba
PA
117002010-03-24 Pedro Alves <pedro@codesourcery.com>
11701
11702 * linux-low.c (status_pending_p_callback): Fix comment.
11703 (linux_wait_for_event_1): Move most of the internal breakpoint
11704 handling from here...
11705 (linux_wait_1): ... to here.
11706 (count_events_callback): New.
11707 (select_singlestep_lwp_callback): New.
11708 (select_event_lwp_callback): New.
11709 (cancel_breakpoints_callback): New.
11710 (select_event_lwp): New.
11711 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11712 priority to all LWPs that have had events that should be reported
11713 to the client. Cancel breakpoints when about to reporting the
11714 event to the client, not while stopping lwps. No longer cancel
11715 finished single-steps here.
11716 (cancel_finished_single_step): Delete.
11717 (cancel_finished_single_steps): Delete.
11718
414a389f
PA
117192010-03-24 Pedro Alves <pedro@codesourcery.com>
11720
11721 * mem-break.c (enum bkpt_type): New.
11722 (struct breakpoint): New field `type'.
11723 (set_breakpoint_at): Change return type to struct breakpoint
11724 pointer. Set type to `other_breakpoint' by default.
11725 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11726 in the breakpoint list.
11727 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11728 (reinsert_breakpoint): Rename to ...
11729 (reinsert_raw_breakpoint): ... this.
11730 (reinsert_breakpoints_at): Adjust.
11731 * mem-break.h (struct breakpoint): Declare.
11732 (set_breakpoint_at): Change return type to struct breakpoint
11733 pointer.
11734
2280c721
PA
117352010-03-24 Pedro Alves <pedro@codesourcery.com>
11736
11737 * server.c (handle_query): Assign, not compare.
11738
d50171e4
PA
117392010-03-24 Pedro Alves <pedro@codesourcery.com>
11740
11741 Teach linux gdbserver to step-over-breakpoints.
11742
11743 * linux-low.c (can_hardware_single_step): New.
11744 (supports_breakpoints): New.
11745 (handle_extended_wait): If stopping threads, read the stop pc of
11746 the new cloned LWP.
11747 (get_pc): New.
11748 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11749 low target doesn't support retrieving the PC.
11750 (add_lwp): Set last_resume_kind to resume_continue.
11751 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11752 (linux_attach): Don't clear stop_expected. Set the lwp's
11753 last_resume_kind to resume_stop.
11754 (linux_detach_one_lwp): Don't check for removed breakpoints.
11755 (check_removed_breakpoint): Delete.
11756 (status_pending_p): Rename to ...
11757 (status_pending_p_callback): ... this. Don't check for removed
11758 breakpoints. Don't consider threads that are stopped from GDB's
11759 perspective.
11760 (linux_wait_for_lwp): Always read the stop_pc here.
11761 (cancel_breakpoint): New.
11762 (step_over_bkpt): New global.
11763 (linux_wait_for_event_1): Implement stepping over breakpoints.
11764 (gdb_wants_lwp_stopped): New.
11765 (gdb_wants_all_stopped): New.
11766 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11767 single-step traps here. Store the thread's last reported target
11768 wait status.
11769 (send_sigstop): Don't clear stop_expected. Always set it,
11770 instead.
11771 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11772 (cancel_finished_single_step): New.
11773 (cancel_finished_single_steps): New.
11774 (wait_for_sigstop): Don't cancel finished single-step traps here.
11775 (linux_resume_one_lwp): Don't check for removed breakpoints.
11776 Don't set `step' on non-hardware step archs.
11777 (linux_set_resume_request): Ignore resume_stop requests if already
11778 stopping or stopped. Set the lwp's last_resume_kind.
11779 (resume_status_pending_p): Don't check for removed breakpoints.
11780 (need_step_over_p): New.
11781 (start_step_over): New.
11782 (finish_step_over): New.
11783 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11784 requests. Clear the thread's last reported target waitstatus.
11785 Don't use the `suspended' flag. Don't consider pending breakpoints.
11786 (linux_resume): Start a step-over if necessary.
11787 (proceed_one_lwp): New.
11788 (proceed_all_lwps): New.
11789 (unstop_all_lwps): New.
11790 * linux-low.h (struct lwp_info): Rewrite comment for the
11791 `suspended' flag. Add the `stop_pc' field. Delete the
11792 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11793 Add `'last_resume_kind' and `need_step_over' fields.
11794 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11795 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11796 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11797 (set_raw_breakpoint_at): New.
11798 (set_breakpoint_at): Rewrite to use it.
11799 (reinsert_breakpoint_handler): Delete.
11800 (set_reinsert_breakpoint): New.
11801 (reinsert_breakpoint_by_bp): Delete.
11802 (delete_reinsert_breakpoints): New.
11803 (uninsert_breakpoint): Rewrite.
11804 (uninsert_breakpoints_at): New.
11805 (reinsert_breakpoint): Rewrite.
11806 (reinsert_breakpoints_at): New.
11807 (check_breakpoints): Rewrite.
11808 (breakpoint_here): New.
11809 (breakpoint_inserted_here): New.
11810 (check_mem_read): Adjust.
11811 * mem-break.h (breakpoints_supported, breakpoint_here)
11812 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11813 (reinsert_breakpoint_by_bp): Delete declaration.
11814 (delete_reinsert_breakpoints): Declare.
11815 (reinsert_breakpoint): Delete declaration.
11816 (reinsert_breakpoints_at): Declare.
11817 (uninsert_breakpoint): Delete declaration.
11818 (uninsert_breakpoints_at): Declare.
11819 (check_breakpoints): Adjust prototype.
11820 * server.h: Adjust include order.
11821 (struct thread_info): Declare here. Add a `last_status' field.
11822
30ba68cb
MS
118232010-03-23 Michael Snyder <msnyder@vmware.com>
11824
11825 * server.c (crc32): New function.
11826 (handle_query): Add handling for 'qCRC:' request.
11827
b9a881c2
PA
118282010-03-23 Pedro Alves <pedro@codesourcery.com>
11829
11830 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11831 lwp had been stopped by a watchpoint.
11832
e92d13d5
PA
118332010-03-16 Pedro Alves <pedro@codesourcery.com>
11834
11835 * server.h (internal_error): Declare.
11836 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11837 * utils.c (internal_error): New function.
11838
64daa791
AS
118392010-03-15 Andreas Schwab <schwab@redhat.com>
11840
11841 * configure.srv: Fix typo setting srv_regobj.
11842
f52cd8cd
PA
118432010-03-15 Pedro Alves <pedro@codesourcery.com>
11844
11845 * linux-low.c (fetch_register): Avoid passing a non string literal
11846 format to `error'.
11847 (usr_store_inferior_registers): Ditto.
11848
93ae6fdc
PA
118492010-03-14 Pedro Alves <pedro@codesourcery.com>
11850
11851 * linux-low.c (linux_write_memory): Bail out early if peeking
11852 memory failed.
11853
c3adc08c
PA
118542010-03-14 Pedro Alves <pedro@codesourcery.com>
11855
11856 * linux-low.h (struct lwp_info): New fields
11857 `stopped_by_watchpoint' and `stopped_data_address'.
11858 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11859 here, and cache them in the lwp object.
11860 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11861 directly.
11862 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11863 field.
11864 (linux_stopped_by_watchpoint): Rewrite.
11865 (linux_stopped_data_address): Rewrite.
11866
bce522a2
PA
118672010-03-06 Simo Melenius <simo.melenius@iki.fi>
11868
11869 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11870 switching the current inferior, not before.
11871
90884b2b
L
118722010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11873
11874 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11875 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11876 i386-linux.c and amd64-linux.c.
11877 (reg-i386.o): Removed.
11878 (reg-i386.c): Likewise.
11879 (reg-i386-linux.o): Likewise.
11880 (reg-i386-linux.c): Likewise.
11881 (reg-x86-64.o): Likewise.
11882 (reg-x86-64.c): Likewise.
11883 (reg-x86-64-linux.o): Likewise.
11884 (reg-x86-64-linux.c): Likewise.
11885 (i386.o): New.
11886 (i386.c): Likewise.
11887 (i386-linux.o): Likewise.
11888 (i386-linux.c): Likewise.
11889 (amd64.o): Likewise.
11890 (amd64.c): Likewise.
11891 (amd64-linux.o): Likewise.
11892 (amd64-linux.c): Likewise.
11893
11894 * configure.srv (srv_i386_regobj): New.
11895 (srv_i386_linux_regobj): Likewise.
11896 (srv_amd64_regobj): Likewise.
11897 (srv_amd64_linux_regobj): Likewise.
11898 (srv_i386_32bit_xmlfiles): Likewise.
11899 (srv_i386_64bit_xmlfiles): Likewise.
11900 (srv_i386_xmlfiles): Likewise.
11901 (srv_amd64_xmlfiles): Likewise.
11902 (srv_i386_linux_xmlfiles): Likewise.
11903 (srv_amd64_linux_xmlfiles): Likewise.
11904 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11905 srv_xmlfiles to $srv_i386_xmlfiles.
11906 (i[34567]86-*-mingw32ce*): Likewise.
11907 (i[34567]86-*-mingw*): Likewise.
11908 (i[34567]86-*-nto*): Likewise.
11909 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11910 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11911 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11912 (x86_64-*-linux*): Likewise.
11913
11914 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11915 (init_registers_amd64_linux): New.
11916 (x86_arch_setup): Replace init_registers_x86_64_linux with
11917 init_registers_amd64_linux.
11918
193f13e6
MK
119192010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11920
11921 * configure.ac: Check for libdl. If it is not available link against
11922 static libthread_db.
11923 * configure: Regenerate.
11924
85d721b8
PA
119252010-02-22 Pedro Alves <pedro@codesourcery.com>
11926
11927 PR9605
11928
11929 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11930 handing a read watchpoint.
11931 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11932
6076632b
DE
119332010-02-12 Doug Evans <dje@google.com>
11934
11935 * linux-low.c (linux_supports_tracefork_flag): Document.
11936 (linux_look_up_symbols): Add comment.
11937
3327ccf7
L
119382010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11939
11940 * regcache.c (supply_register): Clear regcache if buf is NULL.
11941
0718675c 119422010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11943 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11944
11945 * inferiors.c (find_inferior): Add function documentation.
11946 (unloaded_dll): Handle the case where the unloaded dll has not
11947 been previously registered in the dll list.
11948
177321bd
DJ
119492010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11950
11951 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11952 (thumb2_breakpoint): New.
11953 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11954
2b009048
DJ
119552010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11956
11957 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11958 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11959 breakpoints.
11960
3be029c7
PA
119612010-01-21 Pedro Alves <pedro@codesourcery.com>
11962
11963 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11964
18f5de3b
JK
119652010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11966
11967 * linux-s390-low.c (s390_collect_ptrace_register)
11968 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11969
3743bb4f
DE
119702010-01-21 Doug Evans <dje@google.com>
11971
14ce3065
DE
11972 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11973 (PTRACE_ARG4_TYPE): New macro.
11974 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11975 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11976 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11977 (usr_store_inferior_registers): Ditto.
11978 (linux_read_memory, linux_write_memory): Ditto.
11979 (linux_test_for_tracefork): Ditto.
11980
3743bb4f
DE
11981 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11982 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11983
8b315be5
PA
119842010-01-21 Pedro Alves <pedro@codesourcery.com>
11985
11986 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11987 target.
11988
85492558
PA
119892010-01-21 Pedro Alves <pedro@codesourcery.com>
11990
11991 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11992 prototype to take a regcache. Adjust.
11993
442ea881
PA
119942010-01-20 Pedro Alves <pedro@codesourcery.com>
11995
11996 * regcache.h (struct thread_info): Forward declare.
11997 (struct regcache): New.
11998 (new_register_cache): Adjust prototype.
11999 (get_thread_regcache): Declare.
12000 (free_register_cache): Adjust prototype.
12001 (registers_to_string, registers_from_string): Ditto.
12002 (supply_register, supply_register_by_name, collect_register)
12003 (collect_register_as_string, collect_register_by_name): Ditto.
12004 * regcache.c (struct inferior_regcache_data): Delete.
12005 (get_regcache): Rename to ...
12006 (get_thread_regcache): ... this. Adjust. Switch inferior before
12007 fetching registers.
12008 (regcache_invalidate_one): Adjust.
12009 (regcache_invalidate): Fix prototype.
12010 (new_register_cache): Return the new register cache.
12011 (free_register_cache): Change prototype.
12012 (realloc_register_cache): Adjust.
12013 (registers_to_string): Change prototype to take a regcache. Adjust.
12014 (registers_from_string): Ditto.
12015 (register_data): Ditto.
12016 (supply_register): Ditto.
12017 (supply_register_by_name): Ditto.
12018 (collect_register): Ditto.
12019 (collect_register_as_string): Ditto.
12020 (collect_register_by_name): Ditto.
12021 * server.c (process_serial_event): Adjust.
12022 * linux-low.h (regset_fill_func, regset_store_func): Change
12023 prototype.
12024 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12025 Change prototype.
12026 * linux-low.c (get_stop_pc): Adjust.
12027 (check_removed_breakpoint): Adjust.
12028 (linux_wait_for_event): Adjust.
12029 (linux_resume_one_lwp): Adjust.
12030 (fetch_register): Add regcache parameter. Adjust.
12031 (usr_store_inferior_registers): Ditto.
12032 (regsets_fetch_inferior_registers): Ditto.
12033 (regsets_store_inferior_registers): Ditto.
12034 (linux_fetch_registers, linux_store_registers): Ditto.
12035 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12036 regcache. Adjust.
43aaf8b6
PA
12037 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12038 Ditto.
442ea881
PA
12039 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12040 prototype to take a regcache.
12041 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12042 * remote-utils.c (convert_ascii_to_int, outreg)
12043 (prepare_resume_reply): Change prototype to take a regcache.
12044 Adjust.
12045 * target.h (struct target_ops) <fetch_registers, store_registers>:
12046 Change prototype to take a regcache.
12047 (fetch_inferior_registers, store_inferior_registers): Change
12048 prototype to take a regcache. Adjust.
12049 * proc-service.c (ps_lgetregs): Adjust.
12050 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12051 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12052 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12053 take a regcache. Adjust.
12054 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12055 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12056 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12057 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12058 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12059 (cris_cannot_fetch_register):
12060 (cris_breakpoint_at): Change prototype to take a regcache.
12061 Adjust.
12062 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12063 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12064 to take a regcache. Adjust.
12065 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12066 Adjust.
12067 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12068 take a regcache. Adjust.
12069 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12070 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12071 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12072 * linux-mips-low.c (mips_get_pc):
12073 (mips_set_pc): Change prototype to take a regcache. Adjust.
12074 (mips_reinsert_addr): Adjust.
12075 (mips_collect_register): Change prototype to take a regcache.
12076 Adjust.
12077 (mips_supply_register):
12078 (mips_collect_register_32bit, mips_supply_register_32bit)
12079 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12080 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12081 * linux-ppc-low.c (ppc_supply_ptrace_register)
12082 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12083 (parse_spufs_run): Adjust.
12084 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12085 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12086 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12087 take a regcache. Adjust.
12088 * linux-s390-low.c (s390_collect_ptrace_register)
12089 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12090 (s390_set_pc): Change prototype to take a regcache. Adjust.
12091 (s390_arch_setup): Adjust.
12092 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12093 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12094 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12095 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12096 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12097 regcache. Adjust.
12098 (sparc_breakpoint_at): Adjust.
12099 * linux-xtensa-low.c (xtensa_fill_gregset):
12100 (xtensa_store_gregset):
12101 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12102 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12103 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12104 prototype to take a regcache. Adjust.
12105 * win32-arm-low.c (arm_fetch_inferior_register)
12106 (arm_store_inferior_register): Change prototype to take a
12107 regcache. Adjust.
12108 * win32-i386-low.c (i386_fetch_inferior_register)
12109 (i386_store_inferior_register): Change prototype to take a
12110 regcache. Adjust.
12111 * win32-low.c (child_fetch_inferior_registers)
12112 (child_store_inferior_registers): Change prototype to take a
12113 regcache. Adjust.
12114 (win32_wait): Adjust.
12115 (win32_fetch_inferior_registers): Change prototype to take a
12116 regcache. Adjust.
12117 (win32_store_inferior_registers): Adjust.
12118 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12119 store_inferior_register>: Change prototype to take a regcache.
12120
60c3d7b0
DE
121212010-01-20 Doug Evans <dje@google.com>
12122
12123 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12124 #ifdef.
12125 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12126 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12127
dc146f7c
VP
121282010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12129
12130 * linux-low.c (linux_core_of_thread): New.
12131 (compare_ints, show_process, list_threads): New.
12132 (linux_qxfer_osdata): Report threads and cores.
12133 (linux_target_op): Register linux_core_of_thread.
12134 * remote-utils.c (prepare_resume_reply): Report the core.
12135 (buffer_xml_printf): Support %d specifier.
12136 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12137 New.
12138 (handle_query): Handle qXfer:threads. Announce availability
12139 thereof.
12140 * target.h (struct target_ops): New field core_of_thread.
12141
7803799a
UW
121422010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12143
12144 * Makefile.in (clean): Remove new generated files.
12145 (reg-s390.o, reg-s390.c): Remove rules.
12146 (reg-s390x.o, reg-s390x.c): Likewise.
12147 (s390-linux32.o, s390-linux32.c): Add rules.
12148 (s390-linux64.o, s390-linux64.c): Likewise.
12149 (s390x-linux64.o, s390x-linux64.c): Likewise.
12150 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12151 * linux-s390-low.c: Include <elf.h>.
12152 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12153 (init_registers_s390): Remove prototype.
12154 (init_registers_s390x): Likewise.
12155 (init_registers_s390_linux32): Add prototype.
12156 (init_registers_s390_linux64): Likewise.
12157 (init_registers_s390x_linux64): Likewise.
12158 (s390_num_regs_3264): New define.
12159 (s390_regmap_3264): New global variable.
12160 (s390_cannot_fetch_register): Remove obsolete check.
12161 (s390_cannot_store_register): Likewise.
12162 (s390_collect_ptrace_register): Handle upper/lower register halves.
12163 (s390_supply_ptrace_register): Likewise.
12164 (s390_fill_gregset): Update to register number changes.
12165 (s390_get_hwcap): New routine.
12166 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12167 Install appropriate regmap and register set.
12168
6e7ffa39
JB
121692010-01-01 Joel Brobecker <brobecker@adacore.com>
12170
12171 * server.c (gdbserver_version): Update copyright year to 2010.
12172 * gdbreplay.c (gdbreplay_version): Likewise.
12173
957f3f49
DE
121742009-12-28 Doug Evans <dje@google.com>
12175
12176 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12177 elf/external.h. Include <elf.h> instead but only if necessary.
12178
ca5c370d
PA
121792009-12-28 Pedro Alves <pedro@codesourcery.com>
12180
12181 * linux-low.c (linux_remove_process): Remove `detaching'
12182 parameter. Don't release/detach from thread_db here.
12183 (linux_kill): Release/detach from thread_db here, ...
12184 (linux_detach): ... and here, before actually detaching.
12185 (linux_wait_1): ... and here, when a process exits.
12186 * thread-db.c (any_thread_of): New.
12187 (thread_db_free): Switch the current inferior to a thread of the
12188 passed in process.
12189
4ee62156
DE
121902009-12-21 Doug Evans <dje@google.com>
12191
d90e6a88
DE
12192 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12193
c5f62d5f
DE
12194 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12195 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12196 warning ifndef __NR_tkill. Move setting of errno there too.
12197 Delete unnecessary resetting of errno after syscall.
12198 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12199
10e86dd7
DE
12200 * configure.ac: Check for dladdr.
12201 * config.in: Regenerate.
12202 * configure: Regenerate.
12203 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12204 (try_thread_db_load): Update.
12205
4ee62156
DE
12206 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12207
00f515da
DE
122082009-12-18 Doug Evans <dje@google.com>
12209
e9464885
DE
12210 * event-loop.c: Include unistd.h if it exists.
12211
07d4f67e
DE
12212 * linux-low.c (my_waitpid): Move definition away from being in
12213 between linux_tracefork_child/linux_test_for_tracefork.
12214
00f515da
DE
12215 * gdb_proc_service.h (psaddr_t): Fix type.
12216 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12217 signature to match glibc.
12218
1de1badb
DE
122192009-12-16 Doug Evans <dje@google.com>
12220
12221 * linux-low.c (linux_read_memory): Fix argument to read.
12222
aeeb81d1
PA
122232009-11-26 Pedro Alves <pedro@codesourcery.com>
12224
12225 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12226 events, don't leave current_inferior pointing at null.
12227
10357975
PA
122282009-11-26 Pedro Alves <pedro@codesourcery.com>
12229
12230 * win32-low.c (LOG): Delete.
12231 (OUTMSG): Output to stderr.
12232 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12233 on compile time LOG macro.
12234 (win32_wait): Fix debug output.
12235
cf6e3471
PA
122362009-11-26 Pedro Alves <pedro@codesourcery.com>
12237
12238 * win32-low.c (win32_add_one_solib): If the dll name is
12239 "ntdll.dll", prepend the system directory to the dll path.
12240
0c85e18e
MK
122412009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12242
12243 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12244
9ac544ce 122452009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12246 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12247
12248 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12249 * configure.ac: Check for __mcoldfire__ and set
12250 gdb_cv_m68k_is_coldfire.
12251 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12252 reg-cf.o and reg-m68k.o.
12253 * configure: Regenerated.
12254
fd7dd3e6
PA
122552009-11-16 Pedro Alves <pedro@codesourcery.com>
12256
12257 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12258 Pass it to thread_db_free.
12259 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12260 proper `detaching' argument to linux_remove_process.
12261 * linux-low.h (thread_db_free): Add `detaching' parameter.
12262 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12263 to thread_db_free.
12264 (thread_db_free): Add `detaching' parameter. Only
12265 call td_ta_clear_event if detaching from process.
12266
75aa492e
MK
122672009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12268
12269 * thread-db.c (thread_db_free): Fix typo.
12270
21e1bee4
PP
122712009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12272
12273 PR gdb/10838
12274 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12275
8838b45e
NS
122762009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12277
12278 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12279 with an i686 compiler.
12280 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12281 needed.
12282 * configure: Rebuilt.
12283
8a35fb51
SL
122842009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12285
12286 PR gdb/10783
12287
12288 * server.c (handle_search_memory_1): Correct read_addr initialization
12289 in loop for searching subsequent chunks.
12290
96f15937
PP
122912009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12292
12293 * configure.ac: New --with-libthread-db option.
12294 * thread-db.c: Allow direct dependence on libthread_db.
12295 (thread_db_free): Adjust.
12296 * config.in: Regenerate.
12297 * configure: Likewise.
889bf7c5 12298
5f7d1694
PP
122992009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12300
12301 PR gdb/10757
12302 * thread-db.c (attach_thread): New function.
12303 (maybe_attach_thread): Return success/failure.
12304 (find_new_threads_callback): Adjust.
889bf7c5
PA
12305 (thread_db_find_new_threads): Loop until no new threads.
12306
88e3b899
PA
123072009-10-13 Pedro Alves <pedro@codesourcery.com>
12308
12309 * proc-service.c (ps_lgetregs): Formatting.
12310
cdbfd419
PP
123112009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12312
12313 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12314 * configure.ac: Adjust.
12315 * linux-low.h (struct process_info_private): Move members to struct
12316 thread_db.
12317 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12318 * linux-low.c (linux_remove_process): Adjust.
12319 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12320 * server.c (handle_query): Move code ...
12321 (handle_monitor_command): ... here. New function.
12322 * target.h (struct target_ops): New member.
12323 * thread-db.c (struct thread_db): New.
12324 (libthread_db_search_path): New variable.
12325 (thread_db_create_event, thread_db_enable_reporting)
12326 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12327 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12328 (try_thread_db_load_1, dladdr_to_soname): New functions.
12329 (try_thread_db_load, thread_db_load_search): New functions.
12330 (thread_db_init): Search for libthread_db.
12331 (thread_db_free): New function.
12332 (thread_db_handle_monitor_command): Likewise.
12333 * config.in: Regenerate.
12334 * configure: Regenerate.
889bf7c5 12335
4168d2d6
UW
123362009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12337
12338 * spu-low.c (spu_kill): Wait for inferior to terminate.
12339 Call clear_inferiors.
12340 (spu_detach): Call clear_inferiors.
12341
81ecdfbb
RW
123422009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12343
12344 * aclocal.m4: Regenerate.
12345 * config.in: Likewise.
12346 * configure: Likewise.
12347
0b9ff2c0
UW
123482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12349
12350 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12351 (parse_spufs_run): New function.
12352 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12353 (ppc_breakpoint_at): Handle SPU breakpoints.
12354
efcbbd14
UW
123552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12356
12357 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12358 (SPUFS_MAGIC): Define.
12359 (spu_enumerate_spu_ids): New function.
12360 (linux_qxfer_spu): New function.
12361 (linux_target_ops): Install linux_qxfer_spu.
12362
f4d9bade
UW
123632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12364
12365 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12366 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12367 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12368 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12369 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12370 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12371 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12372 (init_registers_powerpc_cell32l): Add prototype.
12373 (init_registers_powerpc_cell64l): Likewise.
12374 (ppc_arch_setup): Detect Cell/B.E. architecture.
12375
96e946ca
RW
123762009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12377
12378 * Makefile.in (datarootdir): New variable.
12379
58d6951d
DJ
123802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12381
12382 * linux-low.c (linux_write_memory): Update debugging output.
12383 * Makefile.in (clean): Add new descriptions.
12384 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12385 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12386 * configure.srv: Add new files for arm*-*-linux*.
12387 * linux-arm-low.c: Add new declarations.
12388 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12389 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12390 (HWCAP_VFPv3D16): New.
12391 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12392 instead of __IWMMXT__.
12393 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12394 (arm_arch_setup): New.
12395 (target_regsets): Remove #ifdef. Add VFP regset.
12396 (the_low_target): Use arm_arch_setup.
12397
12b42a12
DJ
123982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12399
12400 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12401 the main thread again.
12402
ac8c974e
AR
124032009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12404
12405 Adding Neutrino gdbserver.
12406 * configure: Regenerated.
12407 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12408 * configure.srv (i[34567]86-*-nto*): New target.
12409 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12410 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12411 (nto_comctrl) [__QNX__]: New function.
12412 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12413
4424e0c3 124142009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12415
12416 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12417 srv_tgtobj.
12418
912cf4ba
PA
124192009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12420 Pedro Alves <pedro@codesourcery.com>
12421
12422 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12423 don't support CONTEXT_EXTENDED_REGISTERS.
12424 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12425 (the_low_target): Install them.
12426 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12427 failing with ERROR_PIPE_NOT_CONNECTED.
12428
aa5ca48f
DE
124292009-06-30 Doug Evans <dje@google.com>
12430 Pierre Muller <muller@ics.u-strasbg.fr>
12431
12432 Add h/w watchpoint support to x86-linux, win32-i386.
12433 * Makefile.in (SFILES): Add i386-low.c
12434 (i386_low_h): Define.
12435 (i386-low.o): Add dependencies.
12436 (linux-x86-low.o): Add i386-low.h dependency.
12437 (win32-i386-low.o): Ditto.
12438 * i386-low.c: New file.
12439 * i386-low.h: New file.
12440 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12441 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12442 * linux-low.c (linux_add_process): Initialize arch_private.
12443 (linux_remove_process): Free arch_private.
12444 (add_lwp): Initialize arch_private.
12445 (delete_lwp): Free arch_private.
12446 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12447 provided.
12448 * linux-low.h (process_info_private): New member arch_private.
12449 (lwp_info): New member arch_private.
12450 (linux_target_ops): New members new_process, new_thread,
12451 prepare_to_resume.
12452 (ptid_of): New macro.
12453 * linux-x86-low.c: Include stddef.h, i386-low.h.
12454 (arch_process_info): New struct.
12455 (arch_lwp_info): New struct.
12456 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12457 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12458 (i386_dr_low_get_status): New function.
12459 (x86_insert_point, x86_remove_point): New functions.
12460 (x86_stopped_by_watchpoint): New function.
12461 (x86_stopped_data_address): New function.
12462 (x86_linux_new_process, x86_linux_new_thread): New functions.
12463 (x86_linux_prepare_to_resume): New function.
12464 (the_low_target): Add entries for insert_point, remove_point,
12465 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12466 prepare_to_resume.
12467 * server.c (debug_hw_points): New global.
12468 (monitor_show_help): Document set debug-hw-points.
12469 (handle_query): Process "set debug-hw-points".
12470 * server.h (debug_hw_points): Declare.
12471 (paddress): Declare.
12472 * utils.c (NUMCELLS, CELLSIZE): New macros.
12473 (get_sell, xsnprintf, paddress): New functions.
12474 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12475 remove_point, stopped_by_watchpoint, stopped_data_address.
12476 * win32-i386-low.c: Include i386-low.h.
12477 (debug_reg_state): Replaces dr.
12478 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12479 (i386_dr_low_get_status): New function.
12480 (i386_insert_point, i386_remove_point): New functions.
12481 (i386_stopped_by_watchpoint): New function.
12482 (i386_stopped_data_address): New function.
12483 (i386_initial_stuff): Update.
12484 (get_thread_context,set_thread_context,i386_thread_added): Update.
12485 (the_low_target): Add entries for insert_point,
12486 remove_point, stopped_by_watchpoint, stopped_data_address.
12487 * win32-low.c (win32_insert_watchpoint): New function.
12488 (win32_remove_watchpoint): New function.
12489 (win32_stopped_by_watchpoint): New function.
12490 (win32_stopped_data_address): New function.
12491 (win32_target_ops): Add entries for insert_watchpoint,
12492 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12493 * win32-low.h (win32_target_ops): New members insert_point,
12494 remove_point, stopped_by_watchpoint, stopped_data_address.
12495
d993e290
PA
124962009-06-25 Pedro Alves <pedro@codesourcery.com>
12497
12498 * server.c (process_serial_event): Re-return unsupported, not
12499 error, if the type isn't recognized. Re-allow supporting only
12500 insert or remove packets. Also call require_running for
12501 breakpoints. Add missing break statement to default case. Tidy.
12502 * target.h (struct target_ops): Rename insert_watchpoint to
12503 insert_point, and remove_watchpoint to remove_point.
12504
12505 * linux-low.h (struct linux_target_ops): Likewise.
12506 * linux-low.c (linux_insert_watchpoint): Rename to ...
12507 (linux_insert_point): ... this. Adjust.
12508 (linux_remove_watchpoint): Rename to ...
12509 (linux_remove_point): ... this. Adjust.
12510 (linux_target_ops): Adjust.
12511 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12512 (cris_insert_point): ... this.
12513 (cris_remove_watchpoint): Rename to ...
12514 (cris_remove_point): ... this.
12515 (the_low_target): Adjust.
12516
0f54c268
PM
125172009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12518
12519 * server.c (handle_v_kill): Pass signal_pid to
12520 kill_inferior if multi_process is zero.
12521
c6314022
AR
125222009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12523
12524 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12525 * target.h (target_ops): Comment for *_watchpoint to make it clear
12526 the functions can get types '0' and '1'.
12527
4463ce24
AR
125282009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12529
12530 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12531 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12532 * regcache.c (get_regcache): Likewise.
12533 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12534 * win32-low.c (child_fetch_inferior_registers): Remove check for
12535 regno 0.
12536
cf8fd78b
PA
125372009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12538 Pedro Alves <pedro@codesourcery.com>
12539
12540 * target.h (struct target_ops) <supports_multi_process>: New
12541 callback.
12542 (target_supports_multi_process): New.
12543 * server.c (handle_query): Even if GDB reports support, only
12544 enable multi-process if the target also supports it. Report
12545 multi-process support only if the target backend supports it.
12546 * linux-low.c (linux_supports_multi_process): New function.
12547 (linux_target_ops): Install it as target_supports_multi_process
12548 callback.
12549
47c0c975
DE
125502009-05-24 Doug Evans <dje@google.com>
12551
e09875d4
DE
12552 Global renaming of find_thread_pid to find_thread_ptid.
12553 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12554 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12555 All callers updated.
12556
e27d73f6
DE
12557 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12558 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12559 directly.
12560
47c0c975
DE
12561 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12562 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12563 (linux_resume_one_lwp): Ditto.
12564
2acc282a
DE
125652009-05-23 Doug Evans <dje@google.com>
12566
12567 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12568 from struct inferior_list_entry * to struct lwp_info *.
12569 All callers updated.
12570
9f1036c1
DE
125712009-05-13 Doug Evans <dje@google.com>
12572
12573 * linux-x86-low.c: Don't include assert.h.
12574 (x86_siginfo_fixup): Use fatal, not assert.
12575 (x86_arch_setup): Fix comment.
12576
d0722149
DE
125772009-05-12 Doug Evans <dje@google.com>
12578
12579 Biarch support for i386/amd64 gdbserver.
12580 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12581 Add linux-x86-low.c.
12582 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12583 (linux-x86-low.o): Add.
12584 * linux-x86-64-low.c: Delete.
12585 * linux-i386-low.c: Delete.
12586 * linux-x86-low.c: New file.
12587 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12588 linux-x86-low.o.
12589 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12590 linux-x86-low.o.
12591 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12592 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12593 (linux_child_pid_to_exec_file): New function.
12594 (elf_64_header_p, elf_64_file_p): New functions.
12595 (siginfo_fixup): New function.
12596 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12597 give target a chance to convert layout.
12598 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12599 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12600
fdeb2a12
DE
126012009-05-07 Doug Evans <dje@google.com>
12602
12603 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12604 (regsets_store_inferior_registers): Ditto.
12605
a6dbe5df
PA
126062009-05-06 Pedro Alves <pedro@codesourcery.com>
12607
12608 PR server/10048
12609
12610 * linux-low.c (must_set_ptrace_flags): Delete.
12611 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12612 of the global.
12613 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12614 `lwp->must_set_ptrace_flags' instead.
ba42693b 12615 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12616 (linux_wait_1): ... not here.
12617
5091eb23
DE
126182009-04-30 Doug Evans <dje@google.com>
12619
9f767825
DE
12620 * inferiors.c (started_inferior_callback): New function.
12621 (attached_inferior_callback): New function.
12622 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12623 * server.c (print_started_pid, print_attached_pid): New functions.
12624 (detach_or_kill_for_exit): New function.
12625 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12626 * server.h (have_started_inferiors_p): Declare.
12627 (have_attached_inferiors_p): Declare.
12628
5091eb23
DE
12629 * inferiors.c (remove_process): Fix memory leak, free process.
12630 * linux-low.c (linux_remove_process): New function.
12631 (linux_kill): Call it instead of remove_process.
12632 (linux_detach, linux_wait_1): Ditto.
12633
155c8968
PA
126342009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12635
12636 * configure.srv: Add x86 Windows CE target.
12637
7fe519cb
UW
126382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12639
12640 * inferiors.c (get_thread_process): Make global.
12641 * server.h (get_thread_process): Add prototype.
12642 * thread-db.c (find_one_thread): Use get_thread_process
12643 instead of current_process.
12644 (thread_db_get_tls_address): Do not crash if called when
12645 thread layer is not yet initialized.
12646
5472f405
UW
126472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12648
12649 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12650 * spu-low.c (current_tid): Rename to ...
12651 (current_ptid): ... this.
12652 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12653 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12654 ptid_get_lwp (current_ptid) instead of current_tid.
12655 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12656 instead of current_tid. Use find_process_pid to verify pid
12657 argument is valid. Pass proper argument to remove_process.
12658 (spu_thread_alive): Compare current_ptid instead of current_tid.
12659 (spu_resume): Likewise.
12660
55ac2b99
PA
126612009-04-02 Pedro Alves <pedro@codesourcery.com>
12662
12663 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12664 variable.
12665
95954743
PA
126662009-04-01 Pedro Alves <pedro@codesourcery.com>
12667
12668 Implement the multiprocess extensions, and add linux multiprocess
12669 support.
12670
12671 * server.h (ULONGEST): Declare.
12672 (struct ptid, ptid_t): New.
12673 (minus_one_ptid, null_ptid): Declare.
12674 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12675 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12676 (struct inferior_list_entry): Change `id' type from unsigned from
12677 to ptid_t.
12678 (struct sym_cache, struct breakpoint, struct
12679 process_info_private): Forward declare.
12680 (struct process_info): Declare.
12681 (current_process): Declare.
12682 (all_processes): Declare.
12683 (initialize_inferiors): Declare.
12684 (add_thread): Adjust to use ptid_t.
12685 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12686 (add_process, remove_process, find_thread_pid): Declare.
12687 (find_inferior_id): Adjust to use ptid_t.
12688 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12689 (multi_process): Declare.
12690 (push_event): Adjust to use ptid_t.
12691 (read_ptid, write_ptid): Declare.
12692 (prepare_resume_reply): Adjust to use ptid_t.
12693 (clear_symbol_cache): Declare.
12694 * inferiors.c (all_processes): New.
12695 (null_ptid, minus_one_ptid): New.
12696 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12697 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12698 (add_thread): Change unsigned long to ptid. Remove gdb_id
12699 parameter. Adjust.
12700 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12701 (gdb_id_to_thread): Rename to ...
12702 (find_thread_pid): ... this. Change unsigned long to ptid.
12703 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12704 (loaded_dll, pull_pid_from_list): Adjust.
12705 (add_process, remove_process, find_process_pid)
12706 (get_thread_process, current_process, initialize_inferiors): New.
12707 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12708 (struct target_waitstatus) <related_pid>: Ditto.
12709 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12710 return type to int.
12711 (struct target_ops) <join>: Add `pid' argument.
12712 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12713 (struct target_ops) <wait>: Add `ptid' field. Change return type
12714 to ptid.
12715 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12716 (mywait): Add `ptid' argument. Change return type to ptid_t.
12717 (target_pid_to_str): Declare.
12718 * target.c (set_desired_inferior): Adjust to use ptids.
12719 (mywait): Add new `ptid' argument. Adjust.
12720 (target_pid_to_str): New.
12721 * mem-break.h (free_all_breakpoints): Declare.
12722 * mem-break.c (breakpoints): Delelete.
12723 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12724 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12725 to use per-process breakpoint list.
12726 (free_all_breakpoints): New.
12727 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12728 (symbol_cache, all_symbols_looked_up): Delete.
12729 (hexchars): New.
12730 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12731 read_ptid): New.
12732 (prepare_resume_reply): Change ptid argument's type from unsigned
12733 long to ptid_t. Adjust. Implement W;process and X;process.
12734 (free_sym_cache, clear_symbol_cache): New.
12735 (look_up_one_symbol): Adjust to per-process symbol cache. *
12736 * server.c (cont_thread, general_thread, step_thread): Change type
12737 to ptid_t.
12738 (attached): Delete.
12739 (multi_process): New.
12740 (last_ptid): Change type to ptid_t.
12741 (struct vstop_notif) <ptid>: Change type to ptid_t.
12742 (queue_stop_reply, push_event): Change `ptid' argument's type to
12743 ptid_t.
12744 (discard_queued_stop_replies): Add `pid' argument.
12745 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12746 changes. Don't reference the `attached' global.
12747 (attach_inferior): Adjust to mywait interface changes.
12748 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12749 features. Handle and report "multiprocess+". Handle
12750 "qAttached:PID".
12751 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12752 changes.
12753 (handle_v_kill): New.
12754 (handle_v_stopped): Adjust to use target_pid_to_str.
12755 (handle_v_requests): Allow multiple attaches and runs when
12756 multiprocess extensions are in effect. Handle "vKill".
12757 (myresume): Adjust to use ptids.
12758 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12759 (handle_status): Adjust to discard_queued_stop_replies interface
12760 change.
12761 (first_thread_of, kill_inferior_callback)
12762 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12763 (main): Call initialize_inferiors. Adjust to use ptids, killing
12764 and detaching from all inferiors. Handle multiprocess packet
12765 variants.
12766 * linux-low.h: Include gdb_proc_service.h.
12767 (struct process_info_private): New.
12768 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12769 <lwpid_of>: Use ptid_get_lwp.
12770 (get_lwp_thread): Adjust.
12771 (struct lwp_info): Add `dead' member.
12772 (find_lwp_pid): Declare.
12773 * linux-low.c (thread_db_active): Delete.
12774 (new_inferior): Adjust comment.
12775 (inferior_pid): Delete.
12776 (linux_add_process): New.
12777 (handle_extended_wait): Adjust.
12778 (add_lwp): Change unsigned long to ptid.
12779 (linux_create_inferior): Add process to processes table. Adjust
12780 to use ptids. Don't set new_inferior here.
12781 (linux_attach_lwp): Rename to ...
12782 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12783 it. Adjust to use ptids.
12784 (linux_attach_lwp): New.
12785 (linux_attach): Add process to processes table. Don't set
12786 new_inferior here.
12787 (struct counter): New.
12788 (second_thread_of_pid_p, last_thread_of_process_p): New.
12789 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12790 multiple processes.
12791 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12792 processes. Remove process from process table.
12793 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12794 to multiple processes.
12795 (any_thread_of): New.
12796 (linux_detach): Add `pid' argument, and handle it. Remove process
12797 from processes table.
12798 (linux_join): Add `pid' argument. Handle it.
12799 (linux_thread_alive): Change unsighed long argument to ptid_t.
12800 Consider dead lwps as not being alive.
12801 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12802 threads we're not interested in.
12803 (same_lwp, find_lwp_pid): New.
12804 (linux_wait_for_lwp): Change `pid' argument's type from int to
12805 ptid_t. Adjust.
12806 (linux_wait_for_event): Rename to ...
12807 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12808 from int to ptid_t. Adjust.
12809 (linux_wait_for_event): New.
12810 (linux_wait_1): Add `ptid' argument. Change return type to
12811 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12812 that exit from the process table.
12813 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12814 Adjust.
12815 (mark_lwp_dead): New.
12816 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12817 stopping all threads, mark its main lwp as dead.
12818 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12819 ptids.
12820 (fetch_register, usr_store_inferior_registers)
12821 (regsets_fetch_inferior_registers)
12822 (regsets_store_inferior_registers, linux_read_memory)
12823 (linux_write_memory): Inline `inferior_pid'.
12824 (linux_look_up_symbols): Adjust to use per-process
12825 `thread_db_active'.
12826 (linux_request_interrupt): Adjust to use ptids.
12827 (linux_read_auxv): Inline `inferior_pid'.
12828 (initialize_low): Don't reference thread_db_active.
12829 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12830 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12831 (ps_getpid): Return the pid of the current inferior.
12832 * thread-db.c (proc_handle, thread_agent): Delete.
12833 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12834 per-process data.
12835 (find_one_thread): Change argument type to ptid_t. Adjust to
12836 per-process data.
12837 (maybe_attach_thread): Adjust to per-process data and ptids.
12838 (thread_db_find_new_threads): Ditto.
12839 (thread_db_init): Ditto.
12840 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12841 processes table. Adjust to use ptids.
12842 (spu_kill, spu_detach): Adjust interface. Remove process from
12843 processes table.
12844 (spu_join, spu_thread_alive): Adjust interface.
12845 (spu_wait): Adjust interface. Remove process from processes
12846 table. Adjust to use ptids.
12847 * win32-low.c (current_inferior_tid): Delete.
12848 (current_inferior_ptid): New.
12849 (debug_event_ptid): New.
12850 (thread_rec): Take a ptid. Adjust.
12851 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12852 (child_delete_thread): Ditto.
12853 (do_initial_child_stuff): Add `attached' argument. Add process to
12854 processes table.
12855 (child_fetch_inferior_registers, child_store_inferior_registers):
12856 Adjust.
12857 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12858 (win32_attach): Pass 1 to do_initial_child_stuff.
12859 (win32_kill): Adjust interface. Remove process from processes
12860 table.
12861 (win32_detach): Ditto.
12862 (win32_join): Adjust interface.
12863 (win32_thread_alive): Take a ptid.
12864 (win32_resume): Adjust to use ptids.
12865 (get_child_debug_event): Ditto.
12866 (win32_wait): Adjust interface. Remove exiting process from
12867 processes table.
12868
bd99dc85
PA
128692009-04-01 Pedro Alves <pedro@codesourcery.com>
12870
12871 Non-stop mode support.
12872
12873 * server.h (non_stop): Declare.
12874 (gdb_client_data, handler_func): Declare.
12875 (delete_file_handler, add_file_handler, start_event_loop):
12876 Declare.
12877 (handle_serial_event, handle_target_event, push_event)
12878 (putpkt_notif): Declare.
12879 * target.h (enum resume_kind): New.
12880 (struct thread_resume): Replace `step' field by `kind' field.
12881 (TARGET_WNOHANG): Define.
12882 (struct target_ops) <wait>: Add `options' argument.
12883 <supports_non_stop, async, start_non_stop>: New fields.
12884 (target_supports_non_stop, target_async): New.
12885 (start_non_stop): Declare.
12886 (mywait): Add `options' argument.
12887 * target.c (mywait): Add `options' argument. Print child exit
12888 notifications here.
12889 (start_non_stop): New.
12890 * server.c (non_stop, own_buf, mem_buf): New globals.
12891 (struct vstop_notif): New.
12892 (notif_queue): New global.
12893 (queue_stop_reply, push_event, discard_queued_stop_replies)
12894 (send_next_stop_reply): New.
12895 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12896 interface changes.
12897 (attach_inferior): In non-stop mode, don't wait for the target
12898 here.
12899 (handle_general_set): Handle QNonStop.
12900 (handle_query): When handling qC, return the current general
12901 thread, instead of the first thread of the list.
12902 (handle_query): If the backend supports non-stop mode, include
12903 QNonStop+ in the qSupported query response.
12904 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12905 and non-stop mode.
12906 (handle_v_attach, handle_v_run): Handle non-stop mode.
12907 (handle_v_stopped): New.
12908 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12909 (myresume): Adjust to use resume_kind. Handle non-stop.
12910 (queue_stop_reply_callback): New.
12911 (handle_status): Handle non-stop mode.
12912 (main): Clear non_stop flag on reconnection. Use the event-loop.
12913 Refactor serial protocol handling from here ...
12914 (process_serial_event): ... to this new function. When GDB
12915 selects any thread, select one here. In non-stop mode, wait until
12916 GDB acks all pending events before exiting.
12917 (handle_serial_event, handle_target_event): New.
12918 * remote-utils.c (remote_open): Install remote_desc in the event
12919 loop.
12920 (remote_close): Remove remote_desc from the event loop.
12921 (putpkt_binary): Rename to...
12922 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12923 (putpkt_binary): New as wrapper around putpkt_binary_1.
12924 (putpkt_notif): New.
12925 (prepare_resume_reply): In non-stop mode, don't change the
12926 general_thread.
12927 * event-loop.c: New.
12928 * Makefile.in (OBJ): Add event-loop.o.
12929 (event-loop.o): New rule.
12930
12931 * linux-low.h (pid_of): Moved here.
12932 (lwpid_of): New.
12933 (get_lwp_thread): Use lwpid_of.
12934 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12935 * linux-low.c (pid_of): Delete.
12936 (inferior_pid): Use lwpid_of.
12937 (linux_event_pipe): New.
12938 (target_is_async_p): New.
12939 (delete_lwp): New.
12940 (handle_extended_wait): Use lwpid_of.
12941 (add_lwp): Don't set lwpid field.
12942 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12943 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12944 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12945 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12946 first. Adjust to linux_wait_for_event interface changes. Use
12947 lwpid_of.
12948 (linux_detach): Don't delete the main lwp here.
12949 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12950 (status_pending_p): Don't consider explicitly suspended lwps.
12951 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12952 pointer. Add OPTIONS argument. Change return type to int. Use
12953 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12954 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12955 pointer. Add status pointer argument. Return a pid instead of a
12956 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12957 changes. In non-stop mode, don't switch to a random thread.
12958 (linux_wait): Rename to...
12959 (linux_wait_1): ... this. Add target_options argument, and handle
12960 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12961 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12962 clean exit and signal exit code. Don't stop all threads in
12963 non-stop mode. In all-stop mode, only stop all threads when
12964 reporting a stop to GDB. Handle explicit thread stop requests.
12965 (async_file_flush, async_file_mark): New.
12966 (linux_wait): New.
12967 (send_sigstop): Use lwpid_of.
12968 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12969 interface changes. In non-stop mode, don't switch to a random
12970 thread.
12971 (linux_resume_one_lwp): Use lwpid_of.
12972 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12973 (linux_resume_one_thread): ... this. Handle resume_stop. In
12974 non-stop mode, don't look for pending flag in all threads.
12975 (resume_status_pending_p): Don't consider explicitly suspended
12976 threads.
12977 (my_waitpid): Reimplement. Emulate __WALL.
12978 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12979 Use lwpid_of.
12980 (sigchld_handler, linux_supports_non_stop, linux_async)
12981 (linux_start_non_stop): New.
12982 (linux_target_ops): Register linux_supports_non_stop, linux_async
12983 and linux_start_non_stop.
12984 (initialize_low): Install SIGCHLD handler.
12985 * thread-db.c (thread_db_create_event, find_one_thread)
12986 (thread_db_get_tls_address): Use lwpid_of.
12987 * win32-low.c (win32_detach): Adjust to use resume_kind.
12988 (win32_wait): Add `options' argument.
12989 * spu-low.c (spu_resume): Adjust to use resume_kind.
12990 (spu_wait): Add `options' argument.
12991
5b1c542e
PA
129922009-04-01 Pedro Alves <pedro@codesourcery.com>
12993
12994 Decouple target code from remote protocol.
12995
12996 * target.h (enum target_waitkind): New.
12997 (struct target_waitstatus): New.
12998 (struct target_ops) <wait>: Return an unsigned long. Take a
12999 target_waitstatus pointer instead of a char pointer.
13000 (mywait): Likewise.
13001 * target.c (mywait): Change prototype to return an unsigned long.
13002 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13003 * server.h (thread_from_wait, old_thread_from_wait): Delete
13004 declarations.
13005 (prepare_resume_reply): Change prototype to take a
13006 target_waitstatus.
13007 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13008 (last_status, last_ptid): New.
13009 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13010 pid instead of a signal.
13011 (attach_inferior): Remove "status" and "signal" parameters.
13012 Adjust.
13013 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13014 not as an address.
13015 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13016 (handle_v_requests, myresume): Remove "status" and "signal"
13017 parameters. Adjust.
13018 (handle_status): New.
13019 (main): Delete local `status'. Adjust.
13020 * remote-utils.c: Include target.h.
13021 (prepare_resume_reply): Change prototype to take a
13022 target_waitstatus. Adjust.
13023
13024 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13025 interface.
13026 * spu-low.c (spu_wait): Adjust.
13027 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13028 Delete.
13029 (win32_wait): Adjust.
13030
2bd7c093
PA
130312009-04-01 Pedro Alves <pedro@codesourcery.com>
13032
13033 * target.h (struct thread_resume): Delete leave_stopped member.
13034 (struct target_ops): Add a `n' argument to the `resume' callback.
13035 * server.c (start_inferior): Adjust.
13036 (handle_v_cont, myresume): Adjust.
13037 * linux-low.c (check_removed_breakpoint): Adjust to resume
13038 interface change, and to removed leave_stopped field.
13039 (resume_ptr): Delete.
13040 (struct thread_resume_array): New.
13041 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13042 resume interface change.
13043 (linux_continue_one_thread, linux_queue_one_thread)
13044 (resume_status_pending_p): Check if the resume field is NULL
13045 instead of checking the leave_stopped member.
13046 (linux_resume): Adjust to the target resume interface change.
13047 * spu-low.c (spu_resume): Adjust to the target resume interface
13048 change.
13049 * win32-low.c (win32_detach, win32_resume): Ditto.
13050
c35fafde
PA
130512009-04-01 Pedro Alves <pedro@codesourcery.com>
13052
13053 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13054 flag.
13055 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13056 pending.
13057 (linux_continue_one_thread): Only preserve the stepping flag if
13058 there's a pending breakpoint.
13059
0a59d50b
PA
130602009-03-31 Pedro Alves <pedro@codesourcery.com>
13061
13062 * server.c (main): After the inferior having exited, call
13063 remote_close before exiting gdbserver.
13064
f04c6d38
TJB
130652009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13066
13067 Fix size of FPSCR in Power 7 processors.
13068 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13069 (PPC_FEATURE_HAS_DFP): New #define.
13070 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13071 size of the FPSCR.
13072
78e5cee6
PA
130732009-03-23 Pedro Alves <pedro@codesourcery.com>
13074
13075 * server.c (handle_query) Whitespace and formatting.
13076
1b3f6016
PA
130772009-03-22 Pedro Alves <pedro@codesourcery.com>
13078
13079 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13080 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13081 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13082 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13083 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13084 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13085 Makefile.in, configure.ac: Fix whitespace throughout.
13086 * configure: Regenerate.
13087
a07b2135
PA
130882009-03-22 Pedro Alves <pedro@codesourcery.com>
13089
13090 * inferiors.c (find_inferior): Make it safe for the callback
13091 function to delete the currently iterated inferior.
13092
67cc2626
PA
130932009-03-22 Pedro Alves <pedro@codesourcery.com>
13094
13095 * Makefile.in (linuw_low_h): Move higher.
13096 (thread-db.o): Depend on $(linux_low_h).
13097
54a0b537
PA
130982009-03-17 Pedro Alves <pedro@codesourcery.com>
13099
13100 Rename "process" to "lwp" throughout.
13101
13102 * linux-low.c (all_processes): Rename to...
13103 (all_lwps): ... this.
13104 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13105 (add_process): Rename to ...
13106 (add_lwp): ... this. Adjust.
13107 (linux_create_inferior): Adjust.
13108 (linux_attach_lwp): Adjust.
13109 (linux_attach): Adjust.
13110 (linux_kill_one_process): Rename to ...
13111 (linux_kill_one_lwp): ... this. Adjust.
13112 (linux_kill): Adjust.
13113 (linux_detach_one_process): Rename to ...
13114 (linux_detach_one_lwp): ... this. Adjust.
13115 (linux_detach): Adjust.
13116 (check_removed_breakpoint): Adjust.
13117 (status_pending_p): Adjust.
13118 (linux_wait_for_process): Rename to ...
13119 (linux_wait_for_lwp): ... this. Adjust.
13120 (linux_wait_for_event): Adjust.
13121 (send_sigstop): Adjust.
13122 (wait_for_sigstop): Adjust.
13123 (stop_all_processes): Rename to ...
13124 (stop_all_lwps): ... this.
13125 (linux_resume_one_process): Rename to ...
13126 (linux_resume_one_lwp): ... this. Adjust.
13127 (linux_set_resume_request, linux_continue_one_thread)
13128 (linux_queue_one_thread, resume_status_pending_p)
13129 (usr_store_inferior_registers, regsets_store_inferior_registers)
13130 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13131 Adjust.
13132 * linux-low.h (get_process): Rename to ...
13133 (get_lwp): ... this. Adjust.
13134 (get_thread_process): Rename to ...
13135 (get_thread_lwp): ... this. Adjust.
13136 (get_process_thread): Rename to ...
13137 (get_lwp_thread): ... this. Adjust.
13138 (struct process_info): Rename to ...
13139 (struct lwp_info): ... this.
13140 (all_processes): Rename to ...
13141 (all_lwps): ... this.
13142 * proc-service.c (ps_lgetregs): Adjust.
13143 * thread-db.c (thread_db_create_event, find_one_thread)
13144 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13145
0b16c5cf
PA
131462009-03-14 Pedro Alves <pedro@codesourcery.com>
13147
13148 * server.c (handle_query): Handle "qAttached".
13149
32de4b9d
NS
131502009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13151
13152 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13153 GPLv3, update license URL.
13154
2aecd87f
DE
131552009-03-01 Doug Evans <dje@google.com>
13156
93efd302 13157 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13158 (server_h): Add gdb_signals.h.
13159 (signals.o): Update.
13160 * server.h (target_signal_from_host,target_signal_to_host_p)
13161 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13162
86b1f9c5
PM
131632009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13164
13165 * remote-utils.c (getpkt): Also generate remote-debug
13166 information if noack_mode is set.
13167
4aa995e1
PA
131682009-02-06 Pedro Alves <pedro@codesourcery.com>
13169
13170 * server.c (handle_query): Report qXfer:siginfo:read and
13171 qXfer:siginfo:write as supported and handle them.
13172 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13173 * linux-low.c (linux_xfer_siginfo): New.
13174 (linux_target_ops): Set it.
13175
62709adf
PA
131762009-01-26 Pedro Alves <pedro@codesourcery.com>
13177
13178 * server.c (gdbserver_usage): Mention --remote-debug.
13179 (main): Accept '--remote-debug' switch.
13180
aef93bd7
DE
131812009-01-18 Doug Evans <dje@google.com>
13182
13183 * regcache.c (new_register_cache): No need to check result of xcalloc.
13184 * server.c (handle_search_memory): Back out calls to xmalloc,
13185 result is checked and error is returned to user upon failure.
13186 (handle_query): Ditto. Add more checks for result of malloc.
13187 (handle_v_cont): Check result of malloc, report error back to
13188 user upon failure.
13189 (handle_v_run): Ditto. Call freeargv.
13190 * server.h (freeargv): Declare.
13191 * utils.c (freeargv): New fn.
13192
54363045
DE
131932009-01-15 Doug Evans <dje@google.com>
13194
f626972c
DE
13195 * gdbreplay.c (perror_with_name): Make arg const char *.
13196 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13197 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13198 * utils.c (perror_with_name): Make arg const char *.
54363045 13199
18aae699
PA
132002009-01-14 Pedro Alves <pedro@codesourcery.com>
13201
13202 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13203 when handling a EXIT_PROCESS_DEBUG_EVENT.
13204
ff703abe
JB
132052009-01-06 Joel Brobecker <brobecker@adacore.com>
13206
13207 * gdbreplay.c (gdbreplay_version): Update copyright year.
13208 * server.c (gdbserver_version): Likewise.
13209
f21cc1a2 132102009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13211
13212 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13213 (handle_extended_wait): Improve comment.
0e21c1ec 13214
bca929d3
DE
132152008-12-13 Doug Evans <dje@google.com>
13216
13217 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13218 * server.h (ATTR_MALLOC): New macro.
13219 (xmalloc,xcalloc,xstrdup): Declare.
13220 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13221 * inferiors.c: Ditto.
13222 * linux-low.c: Ditto.
13223 * mem-break.c: Ditto.
13224 * regcache.c: Ditto.
13225 * remote-utils.c: Ditto.
13226 * server.c: Ditto.
13227 * target.c: Ditto.
13228 * win32-low.c: Ditto.
13229
97438e3f
DE
132302008-12-12 Doug Evans <dje@google.com>
13231
896c7fbb
DE
13232 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13233 in debugging printf.
13234
97438e3f
DE
13235 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13236
e3b886f8
DE
132372008-12-09 Doug Evans <dje@google.com>
13238
13239 * linux-low.h (struct process_info): Delete member tid, unused.
13240 * thread-db.c (find_one_thread): Update.
13241 (maybe_attach_thread): Update.
13242
07e059b5
VP
132432008-12-02 Pedro Alves <pedro@codesourcery.com>
13244
889bf7c5
PA
13245 * target.h (struct target_ops): Add qxfer_osdata member.
13246 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13247 and dirent.h.
13248 (linux_qxfer_osdata): New functions.
13249 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13250 callback.
13251 * server.c (handle_query): Handle "qXfer:osdata:read:".
13252 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13253 (buffer_xml_printf): New functions.
13254 * server.h (struct buffer): New.
13255 (buffer_grow_str, buffer_grow_str0): New macros.
13256 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13257 (buffer_xml_printf): Declare.
07e059b5 13258
4cab47ab
DE
132592008-11-24 Doug Evans <dje@google.com>
13260
13261 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13262
f142445f
DJ
132632008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13264
13265 * server.c (handle_v_run): Always use the supplied argument list.
13266
d0107bb6 132672008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13268
d0107bb6
BW
13269 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13270 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13271
2c4ad781
TJB
132722008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13273
13274 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13275 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13276 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13277 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13278 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13279 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13280 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13281 XML target descriptions.
13282 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13283 when inferior is running on an ISA 2.05 or later processor. Add
13284 special case to return offset for full 64-bit slot of FPSCR when
13285 in 32-bits.
13286
dfb64f85
DJ
132872008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13288
13289 * Makefile.in (SFILES, clean): Added sparc64 files.
13290 (reg-sparc64.o, reg-sparc64.c): New.
13291 * configure.srv (sparc*-*-linux*): New configuration.
13292 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13293 syscall arguments for SPARC.
13294 (regsets_store_inferior_registers): Likewise.
13295 * linux-sparc-low.c: New file.
13296
66b6e1dd
DE
132972008-10-21 Doug Evans <dje@google.com>
13298
13299 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13300 (READLINE_DIR,READLINE_DEP): Delete.
13301 (INTERNAL_CFLAGS): Update.
13302 (LINTFLAGS): Update.
13303
9b710a42
PA
133042008-10-10 Pedro Alves <pedro@codesourcery.com>
13305
13306 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13307 whole argv from the last run, not just argv[0].
13308
5822d809
PA
133092008-09-08 Pedro Alves <pedro@codesourcery.com>
13310
13311 * regcache.c (new_register_cache): Return NULL if the register
13312 cache size isn't known yet.
13313 (free_register_cache): Avoid dereferencing a NULL regcache.
13314
74aac56f
DJ
133152008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13316
13317 * configure.srv: Merge MIPS and MIPS64.
13318
400b20f5
MR
133192008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13320
13321 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13322
677c5bb1
LM
133232008-08-18 Luis Machado <luisgpm@br.ibm.com>
13324
13325 * Makefile.in: Add required vsx dependencies.
13326
13327 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13328 Declare init_registers_powerpc_vsx32l.
13329 Declare init_registers_powerpc_vsx64l.
13330 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13331 (ppc_arch_setup): Check for VSX in hwcap.
13332 (ppc_fill_vsxregset): New function.
13333 (ppc_store_vsxregset): New function.
13334 Add new VSX entry in regset_info target_regsets.
13335
13336 * configure.srv: Add new VSX dependencies.
13337
a6f3e723
SL
133382008-08-12 Pedro Alves <pedro@codesourcery.com>
13339
13340 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13341 (remote_open): Set or clear transport_is_reliable.
13342 (putpkt_binary): Don't expect acks in noack mode.
13343 (getpkt): Don't send ack/nac in noack mode.
13344 * server.c (handle_general_set): Handle QStartNoAckMode.
13345 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13346 qSupported.
13347 (main): Reset noack_mode on every connection.
13348 * server.h (noack_mode): Declare.
13349
a417dc56
RW
133502008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13351
13352 * Makefile.in (GDBREPLAY_OBS): New variable.
13353 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13354
3221518c
UW
133552008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13356 Daniel Jacobowitz <dan@codesourcery.com>
13357
13358 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13359 (usr_store_inferior_registers): Likewise.
13360 (regsets_store_inferior_registers): Likewise.
13361
ec56be1b
PA
133622008-07-31 Rolf Jansen <rj@surtec.com>
13363 Pedro Alves <pedro@codesourcery.com>
13364
13365 * configure.ac: Check for memmem declaration.
13366 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13367 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13368 (disable_packet_qfThreadInfo): Unconditionally compile.
13369 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13370 * configure, config.in: Regenerate.
13371
2fe5e3ff
DE
133722008-07-28 Doug Kwan <dougkwan@google.com>
13373
13374 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13375 (linux_write_memory): Remove declaration of errno.
13376
836acd6d
UW
133772008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13378
13379 * linux-low.c (handle_extended_wait): Do not use "status"
13380 variable uninitialized.
13381
aeba519e
PA
133822008-07-07 Pedro Alves <pedro@codesourcery.com>
13383
13384 * server.c (handle_v_attach): Inhibit reporting dll changes.
13385
db42f210
PA
133862008-06-27 Pedro Alves <pedro@codesourcery.com>
13387
13388 * remote-utils.c (prepare_resume_reply): If requested, don't
13389 output "thread:TID" in the T stop reply.
13390
13391 * server.c (disable_packet_vCont, disable_packet_Tthread)
13392 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13393 (handle_query): If requested, disable support for qC, qfThreadInfo
13394 and qsThreadInfo.
13395 (handle_v_requests): If requested, disable support for vCont.
13396 (gdbserver_show_disableable): New.
13397 (main): Handle --disable-packet and --disable-packet=LIST.
13398
13399 * server.h (disable_packet_vCont, disable_packet_Tthread)
13400 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13401
8e4c5421
CD
134022008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13403
13404 * server.c (gdbserver_usage): Mention --version.
13405
6e23a804
DJ
134062008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13407
13408 * Makefile.in (gdbreplay.o): New rule.
13409
90aa6a40
JM
134102008-06-06 Joseph Myers <joseph@codesourcery.com>
13411
13412 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13413 message, not gdbserver.
13414
c16158bc 134152008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13416 Nathan Sidwell <nathan@codesourcery.com>
13417 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13418
13419 * acinclude.m4: Include ../../config/acx.m4.
13420 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13421 * configure, config.in: Regenerate.
13422 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13423 * server.c (gdbserver_version): Print PKGVERSION.
13424 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13425 (main): Adjust gdbserver_usage calls.
13426 * gdbreplay.c (version, host_name): Add declarations.
13427 (gdbreplay_version, gdbreplay_usage): New.
13428 (main): Accept --version and --help options.
13429
aeb75bf5
DJ
134302008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13433 (arm_breakpoint_at): Handle Thumb.
13434 (the_low_target): Add comment.
13435
76b233dd
UW
134362008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13437
13438 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13439
08388c79
DE
134402008-05-09 Doug Evans <dje@google.com>
13441
a3c83fae
DE
13442 * server.h (decode_search_memory_packet): Declare.
13443 * remote-utils.c (decode_search_memory_packet): New fn.
13444 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13445 (handle_search_memory): New fn.
13446 (handle_query): Process qSearch:memory packets.
13447
bb9c3d36
UW
134482008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13449
13450 * regcache.c (registers_length): Remove.
13451 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13452 full register packet.
13453 * regcache.h (registers_length): Remove prototype.
13454 * server.h (PBUFSIZ): Define to 16384.
13455
7284e1be
UW
134562008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13457
13458 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13459 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13460 powerpc-64l.o, and powerpc-altivec64l.o.
13461 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13462 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13463 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13464 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13465 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13466 to srv_xmlfiles.
13467
13468 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13469 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13470 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13471 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13472 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13473 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13474 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13475 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13476 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13477 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13478 (clean): Update.
13479
13480 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13481 (init_registers_powerpc_32l): ... this new prototype.
13482 (init_registers_powerpc_32): Remove, replace by ...
13483 (init_registers_powerpc_altivec32l): ... this new prototype.
13484 (init_registers_powerpc_e500): Remove, replace by ...
13485 (init_registers_powerpc_e500l): ... this new prototype.
13486 (init_registers_ppc64): Remove, replace by ...
13487 (init_registers_powerpc_64l): ... this new prototype.
13488 (init_registers_powerpc_64): Remove, replace by ...
13489 (init_registers_powerpc_altivec64l): ... this new prototype.
13490 (ppc_num_regs): Set to 73.
13491 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13492 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13493 (ppc_cannot_store_register): Handle orig_r3 and trap.
13494 (ppc_arch_setup): Update init_registers_... calls.
13495 (ppc_fill_gregset): Handle orig_r3 and trap.
13496
13497 * inferiors.c (clear_inferiors): Reset current_inferior.
13498
fdc59709
PB
134992008-04-23 Paolo Bonzini <bonzini@gnu.org>
13500
889bf7c5
PA
13501 * acinclude.m4: Add override.m4.
13502 * configure: Regenerate.
fdc59709 13503
c9b2f845
UW
135042008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13505
13506 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13507 initial call to init_register_ppc64.
13508
550512b8
UW
135092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13510
43aaf8b6
PA
13511 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13512 single powerpc*-*-linux* case.
550512b8
UW
13513 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13514
b6430ec3
UW
135152008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13516
13517 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13518 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13519 from reg_xmlfiles.
13520 * linux-ppc-low.c: Include <elf.h>.
13521 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13522 (ppc_hwcap): New global variable.
13523 (ppc_regmap): Remove __SPE__ #ifdef sections.
13524 (ppc_regmap_e500): New global variable.
13525 (ppc_cannot_store_register): Update __SPE__ special case.
13526 (ppc_get_hwcap): New function.
13527 (ppc_arch_setup): Use it to determine whether inferior supports
13528 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13529 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13530 Do not access registers if target does not support AltiVec.
13531 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13532 Do not access registers if target does not support SPE.
13533 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13534
52fa2412
UW
135352008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13536
13537 * linux-low.c (disabled_regsets, num_regsets): New.
13538 (use_regsets_p): Delete.
13539 (linux_wait_for_process): Clear disabled_regsets.
13540 (regsets_fetch_inferior_registers): Check and set it.
13541 (regsets_store_inferior_registers): Likewise.
13542 (linux_fetch_registers, linux_store_registers): Do not use
13543 use_regsets_p.
13544 (initialize_low): Allocate disabled_regsets.
13545
e28b3332
DJ
135462008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13547
13548 * Makefile.in (LIBOBJS): New.
13549 (OBS): Use LIBOBJS.
13550 (memmem.o): New rule.
13551 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13552 * configure: Regenerated.
13553
4536995d
UW
135542008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13555
13556 * server.c (handle_query): Never return "unsupported" for
13557 qXfer:features:read queries.
13558
221c031f
UW
135592008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13560
13561 * server.c (get_features_xml): Fix inverted condition.
13562 (handle_query): Always support qXfer:feature:read.
13563
ccd213ac
DJ
135642008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13565
13566 * server.c (wrapper_argv): New.
13567 (start_inferior): Handle wrapper_argv. If set, expect an extra
13568 trap.
13569 (gdbserver_usage): Document --wrapper.
13570 (main): Parse --wrapper.
13571
6fe305f7
UW
135722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13573
13574 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13575 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13576 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13577 (ppc_set_pc): Likewise.
13578 (ppc_arch_setup): New function.
13579 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13580 of collect_register.
889bf7c5 13581 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13582
5b0a002e
UW
135832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13584
13585 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13586 instead of linux-ppc64-low.o.
13587 * linux-ppc64-low.c: Remove file.
13588 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13589 (linux-ppc64-low.o): Remove rule.
13590
13591 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13592 (init_registers_powerpc_64): Likewise.
13593 (ppc_regmap): Conditionally define depending on __powerpc64__.
13594 (ppc_cannot_store_register): Do not special-case "fpscr" when
13595 compiled on __powerpc64__.
13596 (ppc_collect_ptrace_register): New function.
13597 (ppc_supply_ptrace_register): New function.
13598 (ppc_breakpoint): Change type to "unsigned int".
13599 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13600 (the_low_target): Conditionally provide initializers for the
889bf7c5 13601 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13602 collect_ptrace_register and supply_ptrace_register members.
13603
9b4b61c8
UW
136042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13605
13606 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13607 * server.c (gdbserver_xmltarget): Define.
13608 (get_features_xml): Use it to replace "target.xml" and arch_string.
13609
13610 * configure.srv: Remove srv_xmltarget. Add XML files that were
13611 mentioned there to srv_xmlfiles instead. Remove conditional tests
13612 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13613 srv_xmlfiles and srv_regobj to include all possible choices.
13614 * configure.ac (srv_xmltarget): Remove.
13615 (srv_xmlfiles): Do not add "target.xml".
13616 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13617 checks for supplementary target information.
13618 * configure: Regenerate.
13619 * Makefile.in (XML_TARGET): Remove.
13620 (target.xml): Remove rule.
13621 (clean): Do not clean up target.xml.
13622 (.PRECIOUS): Do not mention target.xml.
13623
13624 * target.h (struct target_ops): Remove arch_string member.
13625 * linux-low.c (linux_arch_string): Remove.
13626 (linux_target_ops): Remove arch_string initializer.
13627 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13628 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13629 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13630 * spu-low.c (spu_arch_string): Remove.
13631 (spu_target_ops): Remove arch_string initializer.
13632 * win32-low.c (win32_arch_string): Remove.
13633 (win32_target_ops): Remove arch_string initializer.
13634 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13635 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13636 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13637
ee1a7ae4
UW
136382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13639
13640 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13641 by collect_ptrace_register and supply_ptrace_register hooks.
13642 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13643 instead of checking for the_low_target.left_pad_xfer.
13644 (usr_store_inferior_registers): Use collect_ptrace_register callback
13645 instead of checking for the_low_target.left_pad_xfer.
13646
13647 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13648 (s390_supply_ptrace_register): Likewise.
13649 (s390_fill_gregset): Call s390_collect_ptrace_register.
13650 (the_low_target): Update.
13651
13652 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13653 (ppc_supply_ptrace_register): Likewise.
13654 (the_low_target): Update.
13655
13656 * linux-i386-low.c (the_low_target): Update.
13657 * linux-x86-64-low.c (the_low_target): Update.
13658
d61ddec4
UW
136592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13660
13661 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13662 reg-s390.o and reg-s390x.o.
13663
13664 * linux-low.c (new_inferior): New global variable.
13665 (linux_create_inferior, linux_attach): Set it.
13666 (linux_wait_for_process): Call the_low_target.arch_setup after the
13667 target has stopped for the first time.
13668 (initialize_low): Do not call the_low_target.arch_setup.
13669
13670 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13671 (s390_set_pc): Likewise.
13672 (s390_arch_setup): New function.
13673 (the_low_target): Use s390_arch_setup as arch_setup routine.
13674
13675 * regcache.c (realloc_register_cache): New function.
13676 (set_register_cache): Call it for each existing regcache.
13677
d05b4ac3
UW
136782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13679
13680 * server.h (init_registers): Remove prototype.
13681
13682 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13683 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13684 instead of init_registers ().
13685 * linux-arm-low.c (init_registers_arm): Add prototype.
13686 (init_registers_arm_with_iwmmxt): Likewise.
13687 (the_low_target): Add initializer for arch_setup field.
13688 * linux-cris-low.c (init_registers_cris): Add prototype.
13689 (the_low_target): Add initializer for arch_setup field.
13690 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13691 (the_low_target): Add initializer for arch_setup field.
13692 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13693 (the_low_target): Add initializer for arch_setup field.
13694 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13695 (the_low_target): Add initializer for arch_setup field.
13696 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13697 (the_low_target): Add initializer for arch_setup field.
13698 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13699 (the_low_target): Add initializer for arch_setup field.
13700 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13701 (init_registers_mips64_linux): Likewise.
13702 (the_low_target): Add initializer for arch_setup field.
13703 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13704 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13705 (the_low_target): Add initializer for arch_setup field.
13706 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13707 (init_registers_powerpc_64): Likewise.
13708 (the_low_target): Add initializer for arch_setup field.
13709 * linux-s390-low.c (init_registers_s390): Add prototype.
13710 (init_registers_s390x): Likewise.
13711 (the_low_target): Add initializer for arch_setup field.
13712 * linux-sh-low.c (init_registers_sh): Add prototype.
13713 (the_low_target): Add initializer for arch_setup field.
13714 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13715 (the_low_target): Add initializer for arch_setup field.
13716 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13717 (the_low_target): Add initializer for arch_setup field.
13718
13719 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13720 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13721 instead of init_registers ().
13722 * win32-arm-low.c (init_registers_arm): Add prototype.
13723 (the_low_target): Add initializer for arch_setup field.
13724 * win32-i386-low.c (init_registers_i386): Add prototype.
13725 (the_low_target): Add initializer for arch_setup field.
13726
13727 * spu-low.c (init_registers_spu): Add prototype.
13728 (initialize_low): Call initialie_registers_spu () instead of
13729 initialize_registers ().
13730
fd96d250
PA
137312008-02-19 Pedro Alves <pedro@codesourcery.com>
13732
13733 * server.c (handle_v_requests): When handling the vRun and vAttach
13734 packets, if already debugging a process, don't kill it. Return an
13735 error instead.
13736
d41b6bb4
DJ
137372008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13738
13739 * server.c (handle_query): Correct length check.
13740
5ac588cf
PA
137412008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13742
13743 * win32-low.c (do_initial_child_stuff): Add process handle
13744 parameter. Set current_process_handle and current_process_id from the
13745 parameters. Clear globals.
13746 (win32_create_inferior): Don't set current_process_handle and
13747 current_process_id here. Instead pass them on the call to
13748 do_initial_child_stuff.
13749 (win32_attach): Likewise.
13750 (win32_clear_inferiors): New.
13751 (win32_kill): Don't close the current process handle or the
13752 current thread handle here. Instead call win32_clear_inferiors.
13753 (win32_detach): Don't open a new handle to the process. Call
13754 win32_clear_inferiors.
13755 (win32_join): Don't rely on current_process_handle; open a new
13756 handle using the process id.
13757 (win32_wait): Call win32_clear_inferiors when the inferior process
13758 has exited.
13759
ecd7ecbc
DJ
137602008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13761
13762 * server.c (monitor_show_help): Add "exit".
13763
1525d545
MG
137642008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13765
ecd7ecbc 13766 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13767 (clean): Add reg-xtensa.c.
13768 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13769 * configure.srv (xtensa*-*-linux*) New target.
13770 * linux-xtensa-low.c: New.
13771 * xtensa-xtregs.c: New.
1525d545 13772
59a016f0
PA
137732008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13774
13775 * hostio.c: Don't include errno.h.
13776 (errno_to_fileio_errno): Move to hostio-errno.
13777 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13778 error number outputting to the target->hostio_last_error callback.
13779 (hostio_packet_error): Use FILEIO_EINVAL directly.
13780 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13781 calls to hostio_error.
13782 * hostio-errno.c: New.
13783 * server.h (hostio_last_error_from_errno): Declare.
13784 * target.h (target_ops): Add hostio_last_error member.
13785 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13786 as hostio_last_error handler.
889bf7c5 13787 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13788 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13789 (wince_hostio_last_error): New functions.
13790 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13791 as hostio_last_error handler.
13792 (win32_target_ops) [!_WIN32_WCE]: Register
13793 hostio_last_error_from_errno as hostio_last_error handler.
13794 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13795 (hostio-errno.o): New rule.
13796 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13797 * configure.srv (srv_hostio_err_objs): New variable. Default to
13798 hostio-errno.o.
13799 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13800 * configure: Regenerate.
13801
2d717e4f
DJ
138022008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13803
13804 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13805 (linux_kill, linux_detach): Clean up the process list.
13806 * remote-utils.c (remote_open): Improve port number parsing.
13807 (putpkt_binary, input_interrupt): Only send interrupts if the target
13808 is running.
13809 * server.c (extended_protocol): Make static.
13810 (attached): Define earlier.
13811 (exit_requested, response_needed, program_argv): New variables.
13812 (target_running): New.
13813 (start_inferior): Clear attached here.
13814 (attach_inferior): Set attached here.
13815 (require_running): Define.
13816 (handle_query): Use require_running and target_running. Implement
13817 "monitor exit".
13818 (handle_v_attach, handle_v_run): New.
13819 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13820 (gdbserver_usage): Update.
13821 (main): Redo argument parsing. Handle --debug and --multi. Handle
13822 --attach along with other options or after the port. Save
13823 program_argv. Support no initial program. Resynchronize
13824 communication with GDB after an error. Handle "monitor exit".
13825 Use require_running and target_running. Always allow the extended
13826 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13827 restart in extended mode.
13828 * README: Refer to the GDB manual. Update --attach usage.
13829
7407e2de
AS
138302007-12-20 Andreas Schwab <schwab@suse.de>
13831
13832 * linux-low.c (STACK_SIZE): Define.
13833 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13834 (linux_test_for_tracefork): Likewise.
13835
b65d95c5
DJ
138362007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13837
13838 * linux-low.c (linux_wait_for_event): Update messages. Do not
13839 reinsert auto-delete breakpoints.
13840 * mem-break.c (struct breakpoint): Change return type of handler to
13841 int.
13842 (set_breakpoint_at): Update handler type.
13843 (reinsert_breakpoint_handler): Return 1 instead of calling
13844 delete_breakpoint.
13845 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13846 setting a new one.
13847 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13848 * mem-break.h (set_breakpoint_at): Update handler type.
13849 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13850 * win32-low.c (auto_delete_breakpoint): New.
13851 (get_child_debug_event): Use it.
13852
4e799345
DJ
138532007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13854
13855 * configure.ac: Check for pread and pwrite.
13856 * hostio.c (handle_pread): Fall back to lseek and read.
13857 (handle_pwrite): Fall back to lseek and write.
13858 * config.in, configure: Regenerated.
13859
27524b67
DJ
138602007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * server.c (myresume): Add own_buf argument.
13863 (main): Update calls.
13864
a20d5e98
DJ
138652007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13866
13867 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13868 * remote-utils.c (remote_open): Do not call disable_async_io.
13869 (block_async_io): Delete.
13870 (unblock_async_io): Make static.
13871 (initialize_async_io): New.
13872 * server.c (handle_v_cont): Handle async I/O here.
13873 (myresume): Likewise. Move other common resume tasks here...
13874 (main): ... from here. Call initialize_async_io. Disable async
13875 I/O before the main loop.
13876 * server.h (initialize_async_io): Declare.
13877 (block_async_io, unblock_async_io): Delete prototypes.
13878 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13879
b79d787e
DJ
138802007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13881
13882 * remote-utils.c (readchar): Allow binary data in received messages.
13883
d97903b2
PA
138842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13885
13886 * win32-low.c (attaching): New global.
13887 (win32_create_inferior): Clear the `attaching' global.
13888 (win32_attach): Set the `attaching' global.
13889 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13890 attaching. Only set a breakpoint at the entry point if not
13891 attaching.
13892
311de423
PA
138932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13894
13895 * server.c (main): Don't report dll events on the initial
13896 connection on attaches.
13897
6c2d16d2
PA
138982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13899
13900 * server.c (main): Relax numerical bases supported for the pid of
13901 the --attach command line argument.
13902
5ca906e6
PA
139032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13904
13905 * win32-low.c (win32_attach): Call OpenProcess before
13906 DebugActiveProcess, not after. Add last error output to error
13907 call.
13908
9c6c8194
PA
139092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13910
13911 * win32-low.c (win32_get_thread_context)
13912 (win32_set_thread_context): New functions.
13913 (thread_rec): Use win32_get_thread_context.
13914 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13915 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13916 field.
13917
4d5d1aaa
PA
139182007-12-03 Leo Zayas
13919 Pedro Alves <pedro_alves@portugalmail.pt>
13920
13921 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13922 global variables.
13923 (child_add_thread): Minor cleanup.
13924 (child_continue): Resume artificially suspended threads before
13925 calling ContinueDebugEvent.
13926 (suspend_one_thread): New.
13927 (fake_breakpoint_event): New.
13928 (get_child_debug_event): Change return type to int. Check here if
13929 gdb sent an interrupt request. If a soft interrupt was requested,
13930 fake a breakpoint event. Return 0 if there is no event to handle,
13931 and 1 otherwise.
13932 (win32_wait): Don't check here if gdb sent an interrupt request.
13933 Ensure there is a valid event to handle.
13934 (win32_request_interrupt): Add soft interruption method as last
13935 resort.
13936
c436e841
PA
139372007-12-03 Leo Zayas
13938 Pedro Alves <pedro_alves@portugalmail.pt>
13939
13940 * win32-low.h (win32_thread_info): Add descriptions to the
13941 structure members. Replace `suspend_count' counter by a
13942 `suspended' flag.
13943 * win32-low.c (thread_rec): Update condition of when to get the
13944 context from the inferior. Rely on ContextFlags being set if it
13945 has already been retrieved. Only suspend the inferior thread if
13946 we haven't already. Warn if that fails.
13947 (continue_one_thread): s/suspend_count/suspended/. Only call
13948 ResumeThread once. Warn if that fails.
13949
e7b5fa67
PA
139502007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13951
13952 * win32-low.c (win32_wait): Don't read from the inferior when it
13953 has already exited.
13954
a385171d
PA
139552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13956
13957 * Makefile.in (win32_low_h): New variable.
13958 (win32-low.o): Add dependency on $(win32_low_h).
13959 (win32-arm-low.o, win32-i386-low.o): New rules.
13960
f80c84b3
DJ
139612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * hostio.c: Correct copyright year.
13964
a6b151f1
DJ
139652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * Makefile.in (OBS): Add hostio.o.
13968 (hostio.o): New rule.
13969 * server.h (handle_vFile): Declare.
13970 * hostio.c: New file.
13971 * server.c (handle_v_requests): Take packet_len and new_packet_len
13972 for binary packets. Call handle_vFile.
13973 (main): Update call to handle_v_requests.
13974
f9387fc3
DJ
139752007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13976
13977 * linux-low.c: Include <sched.h>.
13978
51c2684e
DJ
139792007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13980
13981 * linux-low.c (linux_tracefork_grandchild): New.
13982 (linux_tracefork_child): Use clone.
13983 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13984
75f83163
JB
139852007-10-31 Joel Brobecker <brobecker@adacore.com>
13986
13987 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13988
da5898ce
DJ
139892007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13990
13991 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13992
24a09b5f
DJ
139932007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13994
13995 * inferiors.c (change_inferior_id): Delete.
13996 (add_pid_to_list, pull_pid_from_list): New.
13997 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13998 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13999 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14000 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14001 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14002 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14003 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14004 (using_threads): Always set to 1.
14005 (handle_extended_wait): New.
14006 (add_process): Do not set TID.
14007 (linux_create_inferior): Set must_set_ptrace_flags.
14008 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14009 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14010 (linux_thread_alive): Rename TID argument to LWPID.
14011 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14012 (linux_wait_for_event): Do not use TID or check using_threads. Update
14013 call to dead_thread_notify. Call handle_extended_wait.
14014 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14015 (send_sigstop): Delete sigstop_sent.
14016 (wait_for_sigstop): Avoid TID.
14017 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14018 (linux_test_for_tracefork): New.
14019 (linux_lookup_signals): Use thread_db_active and
14020 linux_supports_tracefork_flag.
14021 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14022 * linux-low.h (get_process_thread): Avoid TID.
14023 (struct process_ifo): Move thread_known and tid to the end. Remove
14024 sigstop_sent.
14025 (linux_attach_lwp, thread_db_init): Update prototypes.
14026 * server.h (change_inferior_id): Delete prototype.
14027 (add_pid_to_list, pull_pid_from_list): New prototypes.
14028 * thread-db.c (thread_db_use_events): New.
14029 (find_first_thread): Rename to...
14030 (find_one_thread): ...this. Update callers and messages. Do not
14031 call fatal. Check thread_db_use_events. Do not call
14032 change_inferior_id or new_thread_notify.
14033 (maybe_attach_thread): Update. Do not call new_thread_notify.
14034 (thread_db_init): Set thread_db_use_events. Check use_events.
14035 * utils.c (fatal, warning): Correct message prefix.
14036
30ed0a8f
DJ
140372007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14038
14039 * Makefile.in (clean): Remove new files.
14040 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14041 (powerpc-64.o, powerpc-64.c): New rules.
14042 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14043 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14044 with SPE.
14045 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14046 SPE targets.
14047 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14048 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14049 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14050 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14051 (target_regsets): Add AltiVec and SPE register sets.
14052 * configure.ac: Check for AltiVec and SPE.
14053 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14054 (ppc_fill_vrregset, ppc_store_vrregset): New.
14055 (target_regsets): Add AltiVec register set.
14056 * configure: Regenerated.
14057
fd462a61
DJ
140582007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14059
14060 * linux-low.c (O_LARGEFILE): Define.
14061 (linux_read_memory): Use /proc/PID/mem.
14062 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14063 * configure, config.in: Regenerated.
14064
69f223ed
DJ
140652007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * linux-low.c (linux_wait_for_event): Do not pass signals while
14068 single-stepping.
14069
aec18585
PA
140702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14071
14072 * win32-low.c (create_process): New.
14073 (win32_create_inferior): Use create_process instead of
14074 CreateProcess. If create_process failed retry appending an ".exe"
14075 suffix. Store the GetLastError result immediatelly after
14076 create_process calls and use it on the call to error.
14077
34d86ddd
PA
140782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14079
14080 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14081
5a0e3bd0
JB
140822007-08-23 Joel Brobecker <brobecker@adacore.com>
14083
14084 * configure.ac: Switch license to GPLv3.
14085
f88c79e6
MS
140862007-08-01 Michael Snyder <msnyder@access-company.com>
14087
14088 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14089
6b3d9b83
PA
140902007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14091
14092 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14093 typedef.
14094 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14095 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14096 CloseToolhelp32Snapshot.
14097 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14098 CloseToolhelp32Snapshot.
14099
c588c53c
MS
141002007-07-27 Michael Snyder <michael.snyder@access-company.com>
14101
14102 * server.c (main): Check for inferior exit before main loop.
14103
aa0403d9
PA
141042007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14105
14106 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14107 instead of on tmp_desc.
14108
255e7678
DJ
141092007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14110 Daniel Jacobowitz <dan@codesourcery.com>
14111
14112 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14113 (add_thread): Minor cleanups.
14114 (clear_inferiors): Move lower in the file. Clear the DLL
14115 list.
14116 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14117 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14118 (xml_escape_text): New.
14119 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14120 for qSupported.
14121 (handle_v_cont): Report errors.
14122 (gdbserver_version): Update.
14123 (main): Correct size of own_buf. Do not report initial DLL events.
14124 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14125 (unloaded_dll, xml_escape_text): New.
14126 * win32-low.c (enum target_waitkind): Update comments.
14127 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14128 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14129 (win32_EnumProcessModules, win32_GetModuleInformation)
14130 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14131 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14132 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14133 (win32_Module32First, win32_Module32Next, load_toolhelp)
14134 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14135 (get_child_debug_event): Handle DLL events.
14136 (win32_wait): Likewise.
14137
0d37add9
DJ
141382007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14139
14140 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14141 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14142
45e2715e
PA
141432007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14144
14145 * win32-low.c (handle_output_debug_string): Ignore event if not
14146 waiting.
14147
c5674cf1
PA
141482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14149
14150 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14151
2bbe3cc1
DJ
141522007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14155
ae13219e
DJ
141562007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14157
14158 * inferiors.c (change_inferior_id): Add comment.
14159 * linux-low.c (check_removed_breakpoint): Add an early
14160 prototype. Improve debug output.
14161 (linux_attach): Doc update.
14162 (linux_detach_one_process, linux_detach): Clean up before releasing
14163 each process.
14164 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14165 * linux-low.h (struct process_info): Doc improvement.
14166 * mem-break.c (delete_all_breakpoints): New.
14167 * mem-break.h (delete_all_breakpoints): New prototype.
14168 * thread-db.c (find_first_thread): New.
14169 (thread_db_create_event): Call it instead of
14170 thread_db_find_new_threads. Clean up unused variables.
14171 (maybe_attach_thread): Remove first thread handling.
14172 (thread_db_find_new_threads): Use find_first_thread.
14173 (thread_db_get_tls_address): Likewise.
14174
4105de34
DJ
141752007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * thread-db.c (thread_db_find_new_threads): Add prototype.
14178 (thread_db_create_event): Check for the main thread before adding
14179 a new thread.
14180 (maybe_attach_thread): Only enable event reporting if TID == 0.
14181 (thread_db_get_tls_address): Check for new threads.
14182
2b876972
DJ
141832007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * linux-low.c (linux_create_inferior): Try execv before execvp.
14186 * spu-low.c (spu_create_inferior): Likewise.
14187
7a245884
DJ
141882007-06-13 Mike Frysinger <vapier@gentoo.org>
14189
14190 * linux-low.c (linux_create_inferior): Change execv to execvp.
14191 * spu-low.c (spu_create_inferior): Likewies.
14192
117ce543
DJ
141932007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14194
14195 * Makefile.in (clean): Clean new files instead of deleted ones.
14196 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14197 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14198 rules.
14199 * configure.srv: Specify XML files and new regformats for MIPS and
14200 MIPS64 GNU/Linux.
14201 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14202 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14203 an entry for the restart register.
14204 (mips_cannot_fetch_register, mips_cannot_store_register)
14205 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14206 register names to match the XML descriptions.
14207 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14208 restart register instead of $0.
14209
0e7f50da
UW
142102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14211 Markus Deuling <deuling@de.ibm.com>
14212
14213 * remote-utils.c (decode_xfer_write): New function.
14214 * server.h (decode_xfer_write): Add prototype.
14215 * server.c (handle_query): Add PACKET_LEN argument. Support
14216 qXfer:spu:read and qXfer:spu:write packets.
14217 (main): Pass packet_len to handle_query.
14218 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14219 * target.h (target_ops): Add qxfer_spu.
14220
374c1d38
UW
142212007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14222
14223 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14224 accessing non-seekable spufs files.
14225
bb63802a
UW
142262007-05-16 Markus Deuling <deuling@de.ibm.com>
14227
889bf7c5 14228 * server.c (handle_query): Add reply for qC packet.
bb63802a 14229
7390519e
PA
142302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14231 Leo Zayas <lerele@champenstudios@com>
14232
14233 * server.h (check_remote_input_interrupt_request): New function.
14234 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14235 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14236 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14237 (check_remote_input_interrupt_request): New function.
14238 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14239 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14240 winapi_GenerateConsoleCtrlEvent): New typedefs.
14241 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14242 to 250 ms.
14243 (win32_wait): Check for remote interrupt request
14244 with check_remote_input_interrupt_request.
14245 (win32_request_interrupt): New function.
14246 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14247
34b34921
PA
142482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14249
14250 * win32-low.c (debug_registers_changed,
14251 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14252 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14253 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14254 (thread_rec): Get context using the low target.
14255 (child_add_thread): Call thread_added on the low target,
14256 which does the same thing.
14257 (regptr): Delete.
14258 (do_initial_child_stuff): Remove debug registers references.
14259 Set context using the low target. Resume threads after
14260 setting the contexts.
14261 (child_continue): Remove dead variable. Remove debug
14262 registers references.
14263 (child_fetch_inferior_registers): Go through the low target.
14264 (do_child_store_inferior_registers): Remove.
14265 (child_store_inferior_registers): Go through the low target.
14266 (win32_resume): Remove debug registers references.
14267 Set context using the low target.
14268 (handle_exception): Change return type to void. Don't record
14269 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14270 first chance exception.
889bf7c5 14271 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14272 goto loop. Always return after waiting for debug event.
14273 (win32_wait): Convert to switch statement. Handle spurious
14274 events.
14275
14276 * win32-i386-low.c (debug_registers_changed,
14277 debug_registers_used): New.
14278 (initial_stuff): Rename to ...
14279 (i386_initial_stuff): ... this. Clear debug registers
14280 state variables.
14281 (store_debug_registers): Delete.
14282 (i386_get_thread_context): New.
14283 (load_debug_registers): Delete.
14284 (i386_set_thread_context): New.
14285 (i386_thread_added): New.
14286 (single_step): Rename to ...
14287 (i386_single_step): ... this.
14288 (do_fetch_inferior_registers): Rename to ...
14289 (i386_fetch_inferior_register): ... this.
14290 (i386_store_inferior_register): New.
14291 (the_low_target): Adapt to new interface.
14292
14293 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14294 (arm_get_thread_context): New.
14295 (arm_set_thread_context): New.
14296 (regptr): New.
14297 (do_fetch_inferior_registers): Rename to ...
14298 (arm_fetch_inferior_register): ... this.
14299 (arm_store_inferior_register): New.
14300 (arm_wince_breakpoint): Reimplement as unsigned long.
14301 (arm_wince_breakpoint_len): Define.
14302 (the_low_target): Adapt to new interface.
14303
14304 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14305 load_debug_registers. Add get_thread_context, set_thread_context,
14306 thread_added and store_inferior_register. Rename
14307 fetch_inferior_registers to fetch_inferior_register.
14308 (regptr): Remove declaration.
14309
dd6953e1
PA
143102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14311
14312 * linux-low.c (linux_detach): Change return type to int. Return 0.
14313 * spu-low.c (spu_detach): Likewise.
14314
444d6139
PA
143152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14316
14317 * target.h (target_ops): Change return type of detach to int.
14318 Add join.
14319 (join_inferior): New.
14320 * server.c (main): Don't skip detach support on mingw32.
14321 If the inferior doesn't support detaching return error.
14322 Call join_inferior instead of using waitpid.
14323 * linux-low.c (linux_join): New.
14324 (linux_target_op): Add linux_join.
14325 * spu-low.c (spu_join): New.
14326 (spu_target_ops): Add spu_join.
14327 * win32-low.c (win32_detach): Adapt to new interface.
14328 Reopen current_process_handle before detaching. Issue a child
14329 resume before detaching.
14330 (win32_join): New.
14331 (win32_target_op): Add win32_join.
14332
1d5315fe
PA
143332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14334
14335 * win32-low.c (win32-attach): Fix return value.
14336 * target.h (target_ops): Describe ATTACH return values.
14337
bf914831
PA
143382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14339
14340 * win32-low.c (GETPROCADDRESS): Define.
14341 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14342 (winapi_DebugSetProcessKillOnExit): Likewise.
14343 (win32_create_inferior): Force usage of ansi CreateProcessA.
14344 (win32_attach): Use GETPROCADDRESS.
14345 (win32_detach): Likewise.
14346
f72f3e60
PA
143472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14348
14349 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14350
ed50f18f
PA
143512007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14352
14353 * win32-low.c: Commit leftover changes from 2007-03-29.
14354
0c2ead7e
DJ
143552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14356
14357 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14358 fields short instead of int. Add explicit padding.
14359 (i387_cache_to_fsave): Remove unnecessary casts.
14360 (i387_fsave_to_cache): Doc fix.
14361 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14362
73725ff3
DJ
143632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14364
14365 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14366 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14367
d99f33d8
PA
143682007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14369
14370 * configure.srv (arm*-*-mingw32ce*): Move near the other
14371 arm targets.
14372
68070c10
PA
143732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14374
2482afc6 14375 * configure.ac: Add errno checking.
68070c10
PA
14376 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14377 sys/file.h and malloc.h.
14378 (AC_CHECK_DECLS): Add perror.
14379 (srv_mingwce): Handle.
2482afc6 14380 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14381 win32-i386-low.o to srv_tgtobj.
14382 (i[34567]86-*-mingw*): Likewise.
14383 (arm*-*-mingw32ce*): Add case.
14384 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14385 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14386 [__MINGW32CE__] (strerror): New function.
14387 [__MINGW32CE__] (errno): Define to GetLastError.
14388 [__MINGW32CE__] (COUNTOF): New macro.
14389 (remote_open): Remove extra close call.
14390 * mem-break.c (delete_breakpoint_at): New function.
14391 * mem-break.h (delete_breakpoint_at): Declare.
14392 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14393 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14394 [USE_WIN32API] (read, write): Add char* casts.
14395 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14396 * server.h: Include wincecompat.h on Windows CE.
14397 [HAVE_ERRNO_H]: Check.
14398 (perror): Declare if not declared.
14399 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14400 (perror_with_name): Remove errno declaration.
14401 * wincecompat.h: New.
14402 * wincecompat.c: New.
14403 * win32-low.h: New.
14404 * win32-arm-low.c: New.
14405 * win32-i386-low.c: New.
14406 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14407 (OUTMSG2): Make it safe.
14408 (_T): New macro.
14409 (COUNTOF): New macro.
14410 (NUM_REGS): Get it from the low target.
14411 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14412 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14413 (thread_rec): Let low target handle debug registers.
14414 (child_add_thread): Likewise.
14415 (child_init_thread_list): Likewise.
14416 (continue_one_thread): Likewise.
14417 (regptr): New.
14418 (do_child_fetch_inferior_registers): Move to ...
14419 * win32-i386-low.c: ... here, and rename to ...
14420 (do_fetch_inferior_registers): ... this.
889bf7c5 14421 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14422 Go through the low target.
14423 (do_child_store_inferior_registers): Use regptr.
14424 (strwinerror): New function.
14425 (win32_create_inferior): Handle Windows CE.
14426 Use strwinerror instead of strerror on Windows error
14427 codes. Add program to the error output.
14428 Don't close the main thread handle on Windows CE.
14429 (win32_attach): Use coredll.dll on Windows CE.
14430 (win32_kill): Close current process and current
14431 thread handles.
14432 (win32_detach): Use coredll.dll on Windows CE.
14433 (win32_resume): Let low target handle debug registers, and
14434 step request.
14435 (handle_exception): Add/Remove initial breakpoint. Avoid
14436 non-existant WSTOPSIG on Windows CE.
14437 (win32_read_inferior_memory): Cast to remove warning.
14438 (win32_arch_string): Go through the low target.
14439 (initialize_low): Call set_breakpoint_data with the low
14440 target's breakpoint.
14441 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14442 FOP_REGNUM, mappings): Move to ...
14443 * win32-i386-low.c: ... here.
14444 * win32-low.c (win32_thread_info): Move to ...
14445 * win32-low.h: ... here.
14446 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14447 win32-arm-low.c and wincecompat.c.
14448 (all:): Add $EXEEXT.
14449 (install-only:): Likewise.
14450 (gdbserver:): Likewise.
14451 (gdbreplay:): Likewise.
14452 * config.in: Regenerate.
14453 * configure: Regenerate.
14454
41093d81
PA
144552007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14456
14457 * win32-low.c: Rename typedef thread_info to
14458 win32_thread_info throughout.
14459
544afa54
PA
144602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14461
14462 * win32-i386-low.c: Rename to ...
14463 * win32-low.c: ... this.
14464 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14465 * Makefile.in: Likewise.
14466
bce7165d
PA
144672007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14468
14469 * remote-utils.c (monitor_output): Constify msg parameter.
14470 * server.h (monitor_output): Likewise.
14471 * win32-i386-low.c (handle_output_debug_string): New.
14472 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14473 handle_output_debug_string.
14474 (get_child_debug_event): Likewise.
14475
506c7aa0
DJ
144762007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14477
14478 * server.c (main): Correct strtoul check.
14479
42c81e2a
DJ
144802007-03-27 Jon Ringle <jon@ringle.org>
14481
14482 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14483
9453113a
DJ
144842007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14485
14486 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14487
64a69107
DJ
144882007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14489
14490 * terminal.h: Check HAVE_SGTTY_H.
14491
144922007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14493
14494 * remote-utils.c (remote_open): Print out the assigned port number.
14495
c74d0ad8
DJ
144962007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * remote-utils.c (monitor_output): New function.
14499 * server.c (debug_threads): Define here.
14500 (monitor_show_help): New function.
14501 (handle_query): Handle qRcmd.
14502 (main): Do not handle 'd' packet.
14503 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14504 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14505 of debug_threads.
14506
de7c3b4a
PA
145072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14508
14509 * Makefile.in (EXEEXT): New.
14510 (clean): Use $(EXEEXT).
14511
ef57601b
PA
145122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14513
14514 * target.h (target_ops): Rename send_signal to request_interrupt,
14515 and remove enum target_signal parameter.
14516 * linux-low.c (linux_request_interrupt): Rename from
14517 linux_send_signal, and always send SIGINT.
14518 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14519 and always send SIGINT.
14520 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14521 of send_signal.
14522 (input_interrupt): Likewise.
14523
820f2bda
PA
145242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14525
14526 * server.c (get_features_xml): Check if target implemented
14527 arch_string.
14528 * win32-i386-low.c (win32_arch_string): New.
14529 (win32_target_ops): Add win32_arch_string as arch_string member.
14530
ab39bf24
UW
145312007-02-22 Markus Deuling <deuling@de.ibm.com>
14532
14533 * spu-low.c (spu_arch_string): New.
14534 (spu_target_ops): Add spu_arch_string.
14535
61ff6e04
DJ
145362007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14537
14538 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14539 * configure.ac: Do not check for terminal.h.
14540 * configure, config.in: Regenerated.
14541
fb1e4ffc
DJ
145422007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14543
14544 * Makefile.in (OBS): Add $(XML_BUILTIN).
14545 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14546 (clean): Update.
14547 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14548 (arm-with-iwmmxt.c): New.
14549 * config.in, configure: Regenerate.
14550 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14551 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14552 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14553 (arm*-*-linux*): Add iWMMXt and regset support.
14554 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14555 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14556 (arm_store_wmmxregset, target_regsets): New.
14557 * server.c (get_features_xml): Take annex argument. Check builtin
14558 XML documents.
14559 (handle_query): Handle multiple annexes.
14560
0f48aa01
DJ
145612007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14562
14563 * remote-utils.c [USE_WIN32API] (read, write): Define.
14564 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14565 write.
14566
23181151
DJ
145672007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14568
14569 * linux-i386-low.c (the_low_target): Set arch_string.
14570 * linux-x86-64-low.c (the_low_target): Likewise.
14571 * linux-low.c (linux_arch_string): New.
14572 (linux_target_ops): Add it.
14573 * linux-low.h (struct linux_target_ops): Add arch_string.
14574 * server.c (write_qxfer_response): Use const void * for DATA.
14575 (get_features_xml): New.
14576 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14577 * target.h (struct target_ops): Add arch_string method.
14578
9d606399
DJ
145792007-01-03 Denis Pilat <denis.pilat@st.com>
14580 Daniel Jacobowitz <dan@codesourcery.com>
14581
14582 * linux-low.c (linux_kill): Handle being called with no threads.
14583 * win32-i386-low.c (win32_kill): Likewise.
14584 (get_child_debug_event): Clear current_process_handle.
14585
145862006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14587 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * remote-utils.c (remote_open): Check the type of specified
14590 serial port devices before opening them.
14591 * server.c (main): Kill the inferior if an error occurs during
14592 the first remote_open.
14593
a5e13d24
DJ
145942006-12-05 Markus Deuling <deuling@de.ibm.com>
14595
14596 * README: Update supported targets.
14597
186947f7
DJ
145982006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14599
14600 * Makefile.in (clean): Remove reg-mips64.c.
14601 (reg-mips64.c, reg-mips64.o): New rules.
14602 * configure.srv: Handle mips64. Include regset support for mips.
14603 * linux-mips-low.c (union mips_register): New.
14604 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14605 (mips_breakpoint, mips_breakpoint_at): Use int.
14606 (mips_collect_register, mips_supply_register)
14607 (mips_collect_register_32bit, mips_supply_register_32bit)
14608 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14609 (mips_store_fpregset, target_regsets): New.
14610 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14611
a13e2c95
UW
146122006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14613
14614 * configure.srv: Add target "spu*-*-*".
14615 * Makefile.in (clean): Remove reg-spu.c.
14616 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14617 * spu-low.c: New file.
14618
cb7283db
DJ
146192006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * configure.ac: Correct td_thr_tls_get_addr test.
14622 * configure: Regenerated.
14623
89be2091
DJ
146242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14625
14626 * linux-low.c (linux_wait_for_event): Reformat. Use the
14627 pass_signals array.
14628 * remote-utils.c (decode_address_to_semicolon): New.
14629 * server.c (pass_signals, handle_general_set): New.
14630 (handle_query): Mention QPassSignals for qSupported.
14631 (main): Call handle_general_set.
14632 * server.h (pass_signals, decode_address_to_semicolon): New.
14633
000ef4f0
DJ
146342006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14635
14636 * server.c (handle_query): Correct error handling for read_auxv.
14637
b7149293
UW
146382005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14639
14640 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14641 and srv_linux_thread_db to yes.
14642 * linux-s390-low.c (s390_fill_gregset): New function.
14643 (target_regsets): Define data structure.
14644
dae5f5cf
DJ
146452006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14646
14647 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14648 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14649 * config.in, configure: Regenerated.
14650 * inferiors.c (gdb_id_to_thread): New function.
14651 (gdb_id_to_thread_id): Use it.
14652 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14653 * linux-low.h (struct process_info): Add th member.
14654 (thread_db_get_tls_address): New prototype.
14655 * remote-utils.c (decode_address): Make non-static.
14656 * server.c (handle_query): Handle qGetTLSAddr.
14657 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14658 * target.h (struct target_ops): Add get_tls_address.
14659 * thread-db.c (maybe_attach_thread): Save the thread handle.
14660 (thread_db_get_tls_address): New.
14661
32ca6d61
DJ
146622006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14663
14664 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14665 (linux_resume_one_process): Take a siginfo_t *. Update all
14666 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14667 (struct pending_signals): Add a siginfo_t.
14668 (linux_wait_for_process): Always set last_status.
14669 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14670 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14671 * linux-low.h (struct process_info): Add last_status.
14672
5ffff7c1
DJ
146732006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14674
14675 * remote-utils.c (try_rle): New function.
14676 (putpkt_binary): Use it.
14677
8695c747
DJ
146782006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14679
14680 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14681 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14682 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14683 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14684 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14685 point registers.
14686
290fadea
RS
146872006-08-08 Richard Sandiford <richard@codesourcery.com>
14688
14689 * server.c (terminal_fd): New variable.
14690 (old_foreground_pgrp): Likewise.
14691 (restore_old_foreground_pgrp): New function.
14692 (start_inferior): Record the terminal file descriptor in terminal_fd
14693 and its original foreground group in old_foreground_pgrp. Register
14694 restore_old_foreground_pgrp with atexit().
14695
9f2e1e63
DJ
146962006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * server.c (handle_query): Correct qPart to qXfer.
14699
b80864fb
DJ
147002006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * configure.ac: Check for more headers which are missing on
14703 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14704 * configure.srv: Add Cygwin and mingw32.
14705 * remote-utils.c: Don't include headers unconditionally which
14706 are missing on mingw32. Include <winsock.h> for mingw32.
14707 (remote_open): Adjust for mingw32 support. Flush
14708 standard error after writing to it.
14709 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14710 (unblock_async_io, enable_async_io, disable_async_io)
14711 (readchar, getpkt): Update for Winsock support.
14712 (prepare_resume_reply): Expect a protocol signal number.
14713 * server.c: Disable <sys/wait.h> on mingw32.
14714 (start_inferior): Adjust for mingw32 support. Flush
14715 standard error after writing to it.
14716 (attach_inferior): Likewise. Use protocol signal
14717 numbers.
14718 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14719 and names.
14720 * win32-i386-low.c: New file.
14721 * Makefile.in (XM_CLIBS): Set.
14722 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14723 (win32-i386-low.o): New dependency rule.
14724 * linux-low.c (linux_wait): Use target signal numbers.
14725 * target.h (struct target_ops): Doc fix.
14726 * server.h (target_signal_to_name): New prototype.
14727 * gdbreplay.c: Don't include headers unconditionally which
14728 are missing on mingw32. Include <winsock.h> for mingw32.
14729 (remote_close, remote_open): Adjust for Winsock support.
14730 * configure, config.in: Regenerated.
14731
0876f84a
DJ
147322006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14733
14734 * server.c (decode_xfer_read, write_qxfer_response): New.
14735 (handle_query): Take a packet length argument. Handle
14736 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14737 the qSupported response.
14738 (main): Update call to handle_query.
14739
01f9e8fa
DJ
147402006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14741
14742 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14743 (putpkt_binary): Renamed from putpkt and adjusted for binary
14744 data.
14745 (putpkt): New wrapper for putpkt_binary.
14746 (readchar): Don't mask off the high bit.
14747 (decode_X_packet): New function.
14748 * server.c (main): Call putpkt_binary if a handler sets the packet
14749 length. Save the length of the incoming packet. Handle 'X'.
14750 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14751
be2a5f71
DJ
147522006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14753
14754 * server.c (handle_query): Handle qSupported.
14755
ea025f5f
DJ
147562006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14757
14758 * remote-utils.c (all_symbols_looked_up): New variable.
14759 (look_up_one_symbol): Check it.
14760 * server.h (look_up_one_symbol): New declaration.
14761 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14762
9308fc88
DJ
147632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14766 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14767 (PTRACE_GET_THREAD_AREA): Define.
14768 (ps_get_thread_area): New function.
14769
52fb6437
NS
147702006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14771
14772 * configure.srv (m68k*-*-uclinux*): New target.
14773 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14774 (linux_resume_one_process): Remove extraneous cast.
14775 (linux_read_offsets): New.
14776 (linux_target_op): Add linux_read_offsets on mmuless systems.
14777 * server.c (handle_query): Add qOffsets logic.
14778 * target.h (struct target_ops): Add read_offsets.
14779
21b0f40c
DJ
147802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14781
14782 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14783 (PTRACE_GET_THREAD_AREA): Define.
14784 (ps_get_thread_area): New function.
14785 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14786 (linux-x86-64-low.o): Update.
14787
0050a760
DJ
147882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14789
14790 * configure.ac: Remove checks for prfpregset_t.
14791 * gdb_proc_service.h: New file.
14792 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14793 new "gdb_proc_service.h".
14794 * proc-service.c: Likewise.
14795 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14796 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14797 * Makefile.in (gdb_proc_service_h): Updated.
14798 * configure, config.in: Regenerated.
14799
b92a518e
DJ
148002006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * remote-utils.c (prepare_resume_reply): Move declaration
14803 of gdb_id_from_wait to the top of the block.
14804
545587ee
DJ
148052006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14806
14807 * linux-low.c (regsets_store_inferior_registers): Read the regset
14808 from the target before filling it.
14809
9db87ebd
DJ
148102006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * server.c (attach_inferior): Return SIGTRAP for a successful
14813 attach.
14814
dd24457d
DJ
148152006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14816
14817 * Makefile.in (OBS): Add version.o.
14818 (STAGESTUFF): Delete.
14819 (version.o): Add dependencies.
14820 (version.c): Replace rule.
14821 (clean): Remove version.c.
14822 * server.c (gdbserver_version): New.
14823 (gdbserver_usage): Use printf.
14824 (main): Handle --version and --help.
14825 * server.h (version, host_name): Add declarations.
14826
6f0f660e
EZ
148272005-12-23 Eli Zaretskii <eliz@gnu.org>
14828
889bf7c5
PA
14829 * linux-arm-low.c:
14830 * linux-arm-low.c:
14831 * inferiors.c:
14832 * i387-fp.h:
14833 * i387-fp.c:
14834 * gdbreplay.c:
14835 * regcache.c:
14836 * proc-service.c:
14837 * mem-break.h:
14838 * mem-break.c:
14839 * linux-x86-64-low.c:
14840 * linux-sh-low.c:
14841 * linux-s390-low.c:
14842 * linux-ppc64-low.c:
14843 * linux-ppc-low.c:
14844 * linux-mips-low.c:
14845 * linux-m68k-low.c:
14846 * linux-m32r-low.c:
14847 * linux-low.h:
14848 * linux-low.c:
14849 * linux-ia64-low.c:
14850 * linux-i386-low.c:
14851 * linux-crisv32-low.c:
14852 * thread-db.c:
14853 * terminal.h:
14854 * target.h:
14855 * target.c:
14856 * server.h:
14857 * server.c:
14858 * remote-utils.c:
14859 * regcache.h:
14860 * utils.c:
14861 * Makefile.in:
14862 * configure.ac:
6f0f660e
EZ
14863 * gdbserver.1: Add (C) after Copyright. Update the FSF
14864 address.
14865
9d1fb177
DJ
148662005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14867
14868 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14869 (arm_breakpoint_at): Recognize both breakpoints.
14870 (the_low_target): Use the correct breakpoint instruction.
14871
011a70c2
DJ
148722005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14873
14874 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14875 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14876 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14877 (the_low_target): Update.
14878
7fb85e41
AS
148792005-10-25 Andreas Schwab <schwab@suse.de>
14880
14881 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14882
14883 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14884 (ia64_num_regs): Reduce to 462.
14885
3db0444b
DJ
148862005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14887
14888 * acinclude.m4: Correct quoting.
14889 * aclocal.m4: Regenerated.
14890
14891 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14892 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14893 (thread_db_init): Call thread_db_err_str.
14894 * configure.ac: Check for TD_VERSION.
14895 * config.in, configure: Regenerated.
14896
bee0189a
DJ
148972005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14898
14899 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14900
e9d25b98
DJ
149012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14904 is not available. Define HAVE_PTRACE_GETREGS if it is.
14905 * config.in, configure: Regenerated.
14906 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14907 * linux-i386-low.c, linux-m68k-low.c: Update to use
14908 HAVE_PTRACE_GETREGS.
14909 * linux-low.c (regsets_fetch_inferior_registers)
14910 (regsets_store_inferior_registers): Only return 0 if we processed
14911 GENERAL_REGS.
14912 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14913 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14914
a06660f7
DJ
149152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14916
14917 * inferiors.c (struct thread_info): Add gdb_id.
14918 (add_thread): Add gdb_id argument.
14919 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14920 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14921 calls to add_thread.
14922 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14923 * server.c (handle_query): Use thread_to_gdb_id.
14924 (handle_v_cont, main): Use gdb_id_to_thread_id.
14925 * server.h (add_thread): Update prototype.
14926 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14927 prototypes.
14928
5a1f5858
DJ
149292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14930
14931 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14932 left-padded registers.
14933 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14934 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14935
e122f1f5
SE
149362005-07-01 Steve Ellcey <sje@cup.hp.com>
14937
14938 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14939 * configure: Regenerate.
14940 * config.in: Regenerate.
14941 * server.h (NEED_DECLARATION_STRERROR):
14942 Replace with !HAVE_DECL_STRERROR.
14943
d592fa2f
DJ
149442005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14945
14946 * linux-low.c (linux_wait, linux_send_signal): Don't test
14947 an unsigned long variable for > 0 if it could be MAX_ULONG.
14948 * server.c (myresume): Likewise.
14949 * target.c (set_desired_inferior): Likewise.
14950
ccbd4912
MK
149512005-06-13 Mark Kettenis <kettenis@gnu.org>
14952
14953 * configure.ac: Simplify and improve check for socklen_t.
14954 * configure, config.in: Regenerate.
14955
f450004a
DJ
149562005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14957
14958 * acconfig.h: Remove.
14959 * configure.ac: Add a test for socklen_t. Use three-argument
14960 AC_DEFINE throughout.
14961 * config.in: Regenerated using autoheader 2.59.
14962 * configure: Regenerated.
14963
14964 * gdbreplay.c (socklen_t): Provide a default.
14965 (remote_open): Use socklen_t.
14966 * remote-utils.c (socklen_t): Provide a default.
14967 (remote_open): Use socklen_t.
14968 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14969 unsigned char.
14970
14971 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14972 char for buffers.
14973 * linux-low.c (linux_read_memory, linux_write_memory)
14974 (linux_read_auxv): Likewise.
14975 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14976 (check_mem_write): Likewise.
14977 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14978 Likewise.
14979 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14980 (registers_from_string, register_data): Likewise.
14981 * server.c (handle_query, main): Likewise.
14982 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14983 (decode_M_packet): Likewise.
14984 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14985 * target.h (struct target_ops): Update read_memory, write_memory,
14986 and read_auxv.
14987 (read_inferior_memory, write_inferior_memory): Update.
14988 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14989 to unsigned char *.
14990 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14991 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14992 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14993 linux-s390-low.c, linux-sh-low.c: Update for changes in
14994 read_inferior_memory and the_low_target->breakpoint.
14995
eee84df1
DJ
149962005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14997
14998 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14999 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15000 * configure.srv: Add powerpc64-*-linux*.
15001 * linux-ppc64-low.c: New file.
15002
45b134e5
OF
150032005-05-23 Orjan Friberg <orjanf@axis.com>
15004
15005 * linux-cris-low.c: New file with support for CRIS.
15006 * linux-crisv32-low.c: Ditto for CRISv32.
15007 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15008 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15009 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15010 reg-crisv32.o, and reg-crisv32.c to make rules.
15011 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15012 recognized targets.
15013
48d93c75
UW
150142005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15015
15016 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15017 of sizeof (PTRACE_XFER_TYPE).
15018 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15019
e013ee27
OF
150202005-05-12 Orjan Friberg <orjanf@axis.com>
15021
889bf7c5 15022 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15023 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15024 pointers for hardware watchpoint support.
15025 * linux-low.h (struct linux_target_ops): Ditto.
15026 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15027 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15028 to linux_target_ops.
15029 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15030 reply packet.
15031 * server.c (main): Recognize 'Z' and 'z' packets.
15032
b0ded00b
UW
150332005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15034
15035 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15036 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15037 (the_low_target): Add new members.
15038
8643e2ad
DJ
150392005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15040
15041 * proc-service.c (ps_lgetregs): Search all_processes instead of
15042 all_threads.
15043
fc620387
DJ
150442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * server.c (start_inferior): Change return type to int.
15047 (attach_inferior): Change sigptr to int *.
15048 (handle_v_cont, handle_v_requests): Change signal to int *.
15049 (main): Change signal to int.
15050
150512005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15052
15053 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15054 * configure.srv: Add m32r*-*-linux*.
15055 * linux-m32r-low.c: New file.
15056
e0e76420
DJ
150572005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15058
15059 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15060
a1928bad
DJ
150612005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15062
15063 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15064 Take unsigned long arguments for PIDs.
15065 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15066 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15067 (wait_for_sigstop, linux_resume_one_process)
15068 (regsets_fetch_inferior_registers, linux_send_signal)
15069 (linux_read_auxv): Likewise. Update the types of variables holding
15070 PIDs. Update format string specifiers.
15071 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15072 * remote-utils.c (prepare_resume_reply): Likewise.
15073 * server.c (cont_thread, general_thread, step_thread)
15074 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15075 unsigned long.
15076 (handle_query): Update format specifiers.
15077 (handle_v_cont, main): Use strtoul for thread IDs.
15078 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15079 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15080 (general_thread, step_thread, thread_from_wait)
15081 (old_thread_from_wait): Update.
15082 * target.h (struct thread_resume): Use unsigned long for THREAD.
15083 (struct target_ops): Use unsigned long for arguments to attach and
15084 thread_alive.
15085
dcdb98d2
DJ
150862005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15087
15088 * acinclude.m4: Include bfd/bfd.m4 directly.
15089 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15090 <agriffis@toolchain.org>.
15091 * aclocal.m4, configure: Regenerated.
15092
bec39cab
AC
150932005-01-07 Andrew Cagney <cagney@gnu.org>
15094
15095 * configure.ac: Rename configure.in, require autoconf 2.59.
15096 * configure: Re-generate.
15097
434c4c77
DJ
150982004-12-08 Daniel Jacobowitz <dan@debian.org>
15099
15100 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15101 LIBS when finished.
15102 * aclocal.m4: Regenerated.
15103 * configure: Regenerated.
15104
db1d3e1b
AS
151052004-11-21 Andreas Schwab <schwab@suse.de>
15106
15107 * linux-m68k-low.c (m68k_num_gregs): Define.
15108 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15109 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15110 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15111 (m68k_breakpoint_at): New. Add to the_low_target.
15112
15113 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15114 srv_linux_thread_db to yes.
15115
43360365
JB
151162004-10-20 Joel Brobecker <brobecker@gnat.com>
15117
15118 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15119 (ARCH_SET_FS): Likewise.
15120 (ARCH_GET_FS): Likewise.
15121 (ARCH_GET_GS): Likewise.
15122
fd500816
DJ
151232004-10-16 Daniel Jacobowitz <dan@debian.org>
15124
15125 * linux-i386-low.c (ps_get_thread_area): New.
15126 * linux-x86-64-low.c (ps_get_thread_area): New.
15127 * linux-low.c: Include <sys/syscall.h>.
15128 (linux_kill_one_process): Don't kill the first thread here.
15129 (linux_kill): Kill the first thread here.
15130 (kill_lwp): New function.
15131 (send_sigstop, linux_send_signal): Use it.
15132 * proc-service.c: Clean up #ifdefs.
15133 (fpregset_info): Delete.
15134 (ps_lgetregs): Update and enable implementation.
15135 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15136 implementations.
15137 * remote-utils.c (struct sym_cache, symbol_cache): New.
15138 (input_interrupt): Print a clearer message.
15139 (async_io_enabled): New variable.
15140 (enable_async_io, disable_async_io): Use it. Update comments.
15141 (look_up_one_symbol): Use the symbol cache.
15142 * thread-db.c (thread_db_look_up_symbols): New function.
15143 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15144
f6de3c42
DJ
151452004-10-16 Daniel Jacobowitz <dan@debian.org>
15146
15147 * configure.in: Test for -rdynamic.
15148 * configure: Regenerated.
15149 * Makefile (INTERNAL_LDFLAGS): New.
15150 (gdbserver, gdbreplay): Use it.
15151
2c0fc042
AC
151522004-09-02 Andrew Cagney <cagney@gnu.org>
15153
15154 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15155
075b3282
DJ
151562004-03-23 Daniel Jacobowitz <drow@mvista.com>
15157
15158 * linux-low.c (linux_wait): Clear all_processes list also.
15159
fa6a77dc
DJ
151602004-03-12 Daniel Jacobowitz <drow@mvista.com>
15161
15162 * linux-low.c: Include <errno.h>. Remove extern declaration of
15163 errno.
15164
6d782a97
DJ
151652004-03-12 Daniel Jacobowitz <drow@mvista.com>
15166
15167 * gdbreplay.c, server.h, utils.c: Update copyright years.
15168
3a7fb99b
DJ
151692004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15170
15171 * server.c (main): Print child status or termination signal from
15172 variable 'signal', not 'sig'.
15173
c3e735a6
DJ
151742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15175
15176 * linux-low.c (linux_read_memory): Change return type to
15177 int. Check for and return error from ptrace().
15178 * target.c (read_inferior_memory): Change return type to int. Pass
15179 back return status from the_target->read_memory().
15180 * target.h (struct target_ops): Adapt *read_memory() prototype.
15181 Update comment.
15182 (read_inferior_memory): Adapt prototype.
15183 * server.c (main): Return an error packet if
15184 read_inferior_memory() returns an error.
15185
a59d1c82
DJ
151862004-03-04 Daniel Jacobowitz <drow@mvista.com>
15187
15188 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15189 Unify with other clean targets.
15190
dc3f8883
DJ
151912004-02-29 Daniel Jacobowitz <drow@mvista.com>
15192
15193 * server.c (handle_v_cont): Call set_desired_inferior.
15194
89a208da
DJ
151952004-02-29 Daniel Jacobowitz <drow@mvista.com>
15196
15197 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15198
62ea82f5
DJ
151992004-02-29 Daniel Jacobowitz <drow@mvista.com>
15200
15201 * linux-low.c (linux_wait): Unblock async I/O.
15202 (linux_resume): Block and enable async I/O.
15203 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15204 * server.h (block_async_io, unblock_async_io): Add prototypes.
15205
6910d122
DJ
152062004-02-29 Daniel Jacobowitz <drow@mvista.com>
15207
15208 * remote-utils.c (remote_open): Print a status notice after
15209 opening a TCP port.
15210 * server.c (attach_inferior): Print a status notice after
15211 attaching.
15212
152132004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15214
15215 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15216
c89dc5d4
DJ
152172004-02-26 Daniel Jacobowitz <drow@mvista.com>
15218
15219 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15220 error packet.
15221 * server.c, target.h: Update copyright years.
15222
4b8dad4a
RM
152232004-02-25 Roland McGrath <roland@redhat.com>
15224
15225 * target.h (struct target_ops): New member `read_auxv'.
15226 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15227 * linux-low.c (linux_read_auxv): New function.
15228 (linux_target_ops): Initialize `read_auxv' member to that.
15229
d7446758
JB
152302004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15231
15232 Committed by Jim Blandy <jimb@redhat.com>.
15233
15234 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15235 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15236 instead of GPR_SIZE to distiguish s390 and s390x targets.
15237
5544ad89
DJ
152382004-01-31 Daniel Jacobowitz <drow@mvista.com>
15239
15240 * linux-low.c: Update copyright year.
15241 (check_removed_breakpoint): Clear pending_is_breakpoint.
15242 (linux_set_resume_request, linux_queue_one_thread)
15243 (resume_status_pending_p): New functions.
15244 (linux_continue_one_thread): Use process->resume.
15245 (linux_resume): Only resume threads if there are no pending events.
15246 * linux-low.h (struct process_info): Add resume request
15247 pointer.
15248
2a68b70e
DJ
152492004-01-30 Daniel Jacobowitz <drow@mvista.com>
15250
15251 * regcache.c (new_register_cache): Clear the allocated register
15252 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15253
64386c31
DJ
152542003-10-13 Daniel Jacobowitz <drow@mvista.com>
15255
15256 * linux-low.c (linux_resume): Take a struct thread_resume *
15257 argument.
15258 (linux_wait): Update call.
15259 (resume_ptr): New static variable.
15260 (linux_continue_one_thread): Renamed from
15261 linux_continue_one_process. Use resume_ptr.
15262 (linux_resume): Use linux_continue_one_thread.
15263 * server.c (handle_v_cont, handle_v_requests): New functions.
15264 (myresume): New function.
15265 (main): Handle 'v' case.
15266 * target.h (struct thread_resume): New type.
15267 (struct target_ops): Change argument of "resume" to struct
15268 thread_resume *.
15269 (myresume): Delete macro.
15270
c938e9b0
L
152712003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15272
15273 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15274 (uninstall): Support DESTDIR.
15275
7f313d07
BC
15276Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15277
15278 * configure.srv: Add xscale*linux copy of arm*linux entry.
15279
3b2fc2ea
DJ
152802003-07-24 Daniel Jacobowitz <drow@mvista.com>
15281
15282 * linux-arm-low.c (arm_reinsert_addr): New function.
15283 (the_low_target): Add arm_reinsert_addr.
15284
1c0a559e
MK
152852003-07-08 Mark Kettenis <kettenis@gnu.org>
15286
15287 * mem-break.c: Remove whitespace at end of file.
15288
43d5792c
DJ
152892003-06-28 Daniel Jacobowitz <drow@mvista.com>
15290
15291 * configure.in: Check whether we need to prototype strerror.
15292 * server.h: Optionally prototype strerror.
15293 * gdbreplay.c (perror_with_name): Use strerror.
15294 * linux-low.c (linux_attach_lwp): Use strerror.
15295 * utils.c (perror_with_name): Use strerror.
15296 * config.in, configure: Regenerated.
15297
c8a86edf
DJ
152982003-06-28 Daniel Jacobowitz <drow@mvista.com>
15299
15300 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15301 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15302
73d37363
DJ
153032003-06-20 Daniel Jacobowitz <drow@mvista.com>
15304
15305 * Makefile.in (SFILES): Update.
15306 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15307 low-sun3.c: Remove files.
15308
6ad8ae5c
DJ
153092003-06-17 Daniel Jacobowitz <drow@mvista.com>
15310
15311 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15312 (linux_detach_one_process, linux_detach): New functions.
15313 (linux_target_ops): Add linux_detach.
15314 * server.c (main): Handle 'D' packet.
15315 * target.h (struct target_ops): Add "detach" member.
15316 (detach_inferior): Define.
15317
1581182a
MK
153182003-06-13 Mark Kettenis <kettenis@gnu.org>
15319
15320 From Kelley Cook <kelleycook@wideopenwest.com>:
15321 * configure.srv: Accept i[34567]86 variants.
15322
e5379b03
DJ
153232003-06-05 Daniel Jacobowitz <drow@mvista.com>
15324
15325 * linux-low.c (linux_wait_for_event): Correct comment typos.
15326 (linux_resume_one_process): Call check_removed_breakpoint.
15327 (linux_send_signal): New function.
15328 (linux_target_ops): Add linux_send_signal.
15329 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15330 of kill.
15331 * target.h (struct target_ops): Add send_signal.
15332
2ff29de4
JB
153332003-05-29 Jim Blandy <jimb@redhat.com>
15334
15335 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15336 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15337 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15338 away part of the register's value.
15339
254787d4
DJ
153402003-03-26 Daniel Jacobowitz <drow@mvista.com>
15341
15342 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15343 (linux_wait_for_event, linux_init_signals): Likewise.
15344
94e10508
DJ
153452003-03-17 Daniel Jacobowitz <drow@mvista.com>
15346
15347 * configure.in: Check for stdlib.h.
15348 * configure: Regenerated.
15349 * config.in: Regenerated.
15350
4c0711e0
DJ
153512003-01-04 Andreas Schwab <schwab@suse.de>
15352
15353 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15354
ef66e766
AC
153552003-01-02 Andrew Cagney <ac131313@redhat.com>
15356
15357 * Makefile.in: Remove obsolete code.
15358
a1358604
DJ
153592002-11-20 Daniel Jacobowitz <drow@mvista.com>
15360
15361 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15362 defined(PT_FPR0_HI).
15363
23ce3b1c
DJ
153642002-11-17 Stuart Hughes <seh@zee2.com>
15365
15366 * linux-arm-low.c (arm_num_regs): Increase.
15367 (arm_regmap): Include status register.
15368
153692002-11-17 Daniel Jacobowitz <drow@mvista.com>
15370
15371 * linux-low.c (register_addr): Remove incorrect -1 check.
15372
a9fa9f7d
DJ
153732002-08-29 Daniel Jacobowitz <drow@mvista.com>
15374
15375 * linux-low.c (linux_create_inferior): Call setpgid. Return
15376 the new PID.
15377 (unstopped_p, linux_signal_pid): Remove.
15378 (linux_target_ops): Remove linux_signal_pid.
15379 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15380 global instead of target method.
15381 * target.h (struct target_ops): Remove signal_pid. Update comment
15382 for create_inferior.
15383 * server.c (signal_pid): New variable.
15384 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15385 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15386 (attach_inferior): Set signal_pid.
15387
17574093
DJ
153882002-08-23 Daniel Jacobowitz <drow@mvista.com>
15389
15390 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15391
153922002-08-20 Jim Blandy <jimb@redhat.com>
15393
15394 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15395 default for this.
15396
153972002-08-01 Andrew Cagney <cagney@redhat.com>
15398
15399 * Makefile.in: Make chill references obsolete.
15400
154012002-07-24 Kevin Buettner <kevinb@redhat.com>
15402
15403 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15404 * configure: Regenerate.
15405 * config.in: Regenerate.
15406
154072002-07-09 David O'Brien <obrien@FreeBSD.org>
15408
15409 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15410 (perror_with_name, remote_close, remote_open, expect, play): Static.
15411
154122002-07-04 Michal Ludvig <mludvig@suse.cz>
15413
4b8dad4a 15414 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15415 byte offsets instead of an array of indexes.
15416 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15417
154182002-06-13 Daniel Jacobowitz <drow@mvista.com>
15419
15420 * regcache.c: Add comment.
15421
154222002-06-11 Daniel Jacobowitz <drow@mvista.com>
15423
15424 * thread-db.c: New file.
15425 * proc-service.c: New file.
15426 * acinclude.m4: New file.
15427 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15428 proc-service.o, and thread-db.o.
15429 (linux-low.o): Add USE_THREAD_DB.
15430 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15431 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15432 * aclocal.m4: Regenerated.
15433 * config.in: Regenerated.
15434 * configure: Regenerated.
15435 * configure.in: Check for proc_service.h, sys/procfs.h,
15436 thread_db.h, and linux/elf.h headrs.
15437 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15438 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15439 Check for -lthread_db and thread support.
15440 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15441 PowerPC, and SuperH.
15442 * i387-fp.c: Constify arguments.
15443 * i387-fp.h: Likewise.
15444 * inferiors.c: (struct thread_info): Renamed from
15445 `struct inferior_info'. Remove PID member. Use generic inferior
15446 list header. All uses updated.
15447 (inferiors, signal_pid): Removed.
15448 (all_threads): New variable.
15449 (get_thread): Define.
15450 (add_inferior_to_list): New function.
15451 (for_each_inferior): New function.
15452 (change_inferior_id): New function.
15453 (add_inferior): Removed.
15454 (remove_inferior): New function.
15455 (add_thread): New function.
15456 (free_one_thread): New function.
15457 (remove_thread): New function.
15458 (clear_inferiors): Use for_each_inferior and free_one_thread.
15459 (find_inferior): New function.
15460 (find_inferior_id): New function.
15461 (inferior_target_data): Update argument type.
15462 (set_inferior_target_data): Likewise.
15463 (inferior_regcache_data): Likewise.
15464 (set_inferior_regcache_data): Likewise.
15465 * linux-low.c (linux_bp_reinsert): Remove.
15466 (all_processes, stopping_threads, using_thrads)
15467 (struct pending_signals, debug_threads, pid_of): New.
15468 (inferior_pid): Replace with macro.
15469 (struct inferior_linux_data): Remove.
15470 (get_stop_pc, add_process): New functions.
15471 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15472 Use add_process and add_thread.
15473 (linux_attach_lwp): New function, based on old linux_attach. Use
15474 add_process and add_thread. Set stop_expected for new threads.
15475 (linux_attach): New function.
15476 (linux_kill_one_process): New function.
15477 (linux_kill): Kill all LWPs.
15478 (linux_thread_alive): Use find_inferior_id.
15479 (check_removed_breakpoints, status_pending_p): New functions.
15480 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15481 Update. Use WNOHANG. Wait for cloned processes also. Update process
15482 struct for the found process.
15483 (linux_wait_for_event): New function.
15484 (linux_wait): Use it. Support LWPs.
15485 (send_sigstop, wait_for_sigstop, stop_all_processes)
15486 (linux_resume_one_process, linux_continue_one_process): New functions.
15487 (linux_resume): Support LWPs.
15488 (REGISTER_RAW_SIZE): Remove.
15489 (fetch_register): Use register_size instead. Call supply_register.
15490 (usr_store_inferior_registers): Likewise. Call collect_register.
15491 Fix recursive case.
15492 (regsets_fetch_inferior_registers): Improve error message.
15493 (regsets_store_inferior_registers): Add debugging.
15494 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15495 (unstopped_p, linux_signal_pid): New functions.
15496 (linux_target_ops): Add linux_signal_pid.
15497 (linux_init_signals): New function.
15498 (initialize_low): Call it. Initialize using_threads.
15499 * regcache.c (inferior_regcache_data): Add valid
15500 flag.
15501 (get_regcache): Fetch registers lazily. Add fetch argument
15502 and update all callers.
15503 (regcache_invalidate_one, regcache_invalidate): New
15504 functions.
15505 (new_register_cache): Renamed from create_register_cache.
15506 Return the new regcache.
15507 (free_register_cache): Change argument to a void *.
15508 (registers_to_string, registers_from_string): Call get_regcache
15509 with fetch flag set.
15510 (register_data): Make static. Pass fetch flag to get_regcache.
15511 (supply_register): Call get_regcache with fetch flag clear.
15512 (collect_register): Call get_regcache with fetch flag set.
15513 (collect_register_as_string): New function.
15514 * regcache.h: Update.
15515 * remote-utils.c (putpkt): Flush after debug output and use
15516 stderr.
15517 Handle input interrupts while waiting for an ACK.
15518 (input_interrupt): Use signal_pid method.
15519 (getpkt): Flush after debug output and use stderr.
15520 (outreg): Use collect_register_as_string.
15521 (new_thread_notify, dead_thread_notify): New functions.
15522 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15523 and general_thread.
15524 (look_up_one_symbol): Flush after debug output.
15525 * server.c (step_thread, server_waiting): New variables.
15526 (start_inferior): Don't use signal_pid. Update call to mywait.
15527 (attach_inferior): Update call to mywait.
15528 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15529 (main): Don't fetch/store registers explicitly. Use
15530 set_desired_inferior. Support proposed ``Hs'' packet. Update
15531 calls to mywait.
15532 * server.h: Update.
15533 (struct inferior_list, struct_inferior_list_entry): New.
15534 * target.c (set_desired_inferior): New.
15535 (write_inferior_memory): Constify.
15536 (mywait): New function.
15537 * target.h: Update.
15538 (struct target_ops): New signal_pid method.
15539 (mywait): Removed macro, added prototype.
15540
15541 * linux-low.h (regset_func): Removed.
15542 (regset_fill_func, regset_store_func): New.
15543 (enum regset_type): New.
15544 (struct regset_info): Add type field. Use new operation types.
15545 (struct linux_target_ops): stop_pc renamed to get_pc.
15546 Add decr_pc_after_break and breakpoint_at.
15547 (get_process, get_thread_proess, get_process_thread)
15548 (strut process_info, all_processes, linux_attach_lwp)
15549 (thread_db_init): New.
15550
15551 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15552 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15553 (the_low_target): Add new members.
15554 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15555 (i386_store_fpxregset): Constify.
15556 (target_regsets): Add new kind identifier.
15557 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15558 (i386_set_pc): Add debugging.
15559 (i386_breakpoint_at): New function.
15560 (the_low_target): Add new members.
15561 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15562 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15563 (mips_breakpoint_at): New.
15564 (the_low_target): Add new members.
15565 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15566 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15567 (the_low_target): Add new members.
15568 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15569 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15570 (the_low_target): Add new members.
15571 * linux-x86-64-low.c (target_regsets): Add new kind
15572 identifier.
15573
155742002-05-15 Daniel Jacobowitz <drow@mvista.com>
15575
15576 From Martin Pool <mbp@samba.org>:
15577 * server.c (gdbserver_usage): New function.
15578 (main): Call it.
15579
155802002-05-14 Daniel Jacobowitz <drow@mvista.com>
15581
15582 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15583 stop_at -> stop_pc.
15584
155852002-05-04 Andrew Cagney <ac131313@redhat.com>
15586
15587 * Makefile.in: Remove obsolete code.
15588
155892002-04-24 Michal Ludvig <mludvig@suse.cz>
15590
15591 * linux-low.c (regsets_fetch_inferior_registers),
15592 (regsets_store_inferior_registers): Removed cast to int from
15593 ptrace() calls.
15594 * regcache.h: Added declaration of struct inferior_info.
15595
155962002-04-20 Daniel Jacobowitz <drow@mvista.com>
15597
15598 * inferiors.c (struct inferior_info): Add regcache_data.
15599 (add_inferior): Call create_register_cache.
15600 (clear_inferiors): Call free_register_cache.
15601 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15602 * regcache.c (struct inferior_regcache_data): New.
15603 (registers): Remove.
15604 (get_regcache): New function.
15605 (create_register_cache, free_register_cache): New functions.
15606 (set_register_cache): Don't initialize the register cache here.
15607 (registers_to_string, registers_from_string, register_data): Call
15608 get_regcache.
15609 * regcache.h: Add prototypes.
15610 * server.h: Likewise.
15611
156122002-04-20 Daniel Jacobowitz <drow@mvista.com>
15613
15614 * mem-break.c: New file.
15615 * mem-break.h: New file.
15616 * Makefile.in: Add mem-break.o rule; update server.h
15617 dependencies.
15618 * inferiors.c (struct inferior_info): Add target_data
15619 member.
15620 (clear_inferiors): Free target_data member if set.
15621 (inferior_target_data, set_inferior_target_data): New functions.
15622 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15623 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15624 * linux-low.c (linux_bp_reinsert): New variable.
15625 (struct inferior_linux_data): New.
15626 (linux_create_inferior): Use set_inferior_target_data.
15627 (linux_attach): Likewise. Call add_inferior.
15628 (linux_wait_for_one_inferior): New function.
15629 (linux_wait): Call it.
15630 (linux_write_memory): Add const.
15631 (initialize_low): Call set_breakpoint_data.
15632 * linux-low.h (struct linux_target_ops): Add breakpoint
15633 handling members.
15634 * server.c (attach_inferior): Remove extra add_inferior
15635 call.
15636 * server.h: Include mem-break.h. Update inferior.c
15637 prototypes.
15638 * target.c (read_inferior_memory)
15639 (write_inferior_memory): New functions.
15640 * target.h (read_inferior_memory)
15641 (write_inferior_memory): Change macros to prototypes.
15642 (struct target_ops): Update comments. Add const to write_memory
15643 definition.
15644
156452002-04-11 Daniel Jacobowitz <drow@mvista.com>
15646
15647 * linux-low.c (usr_store_inferior_registers): Support
15648 registers which are allowed to fail to store.
15649 * linux-low.h (linux_target_ops): Likewise.
15650 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15651 (ppc_cannot_store_register): FPSCR may not be storable.
15652
156532002-04-09 Daniel Jacobowitz <drow@mvista.com>
15654
15655 * server.h: Include <string.h> if HAVE_STRING_H.
15656 * ChangeLog: Correct paths in last ChangeLog entry.
15657
156582002-04-09 Daniel Jacobowitz <drow@mvista.com>
15659
15660 * linux-low.h: Remove obsolete prototypes.
15661 (struct linux_target_ops): New.
15662 (extern the_low_target): New.
15663 * linux-low.c (num_regs, regmap): Remove declarations.
15664 (register_addr): Use the_low_target explicitly.
15665 (fetch_register): Likewise.
15666 (usr_fetch_inferior_registers): Likewise.
15667 (usr_store_inferior_registers): Likewise.
15668 * linux-arm-low.c (num_regs): Remove.
15669 (arm_num_regs): Define.
15670 (arm_regmap): Renamed from regmap, made static.
15671 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15672 made static.
15673 (arm_cannot_store_register): Renamed from cannot_store_register,
15674 made static.
15675 (the_low_target): New.
15676 * linux-i386-low.c (num_regs): Remove.
15677 (i386_num_regs): Define.
15678 (i386_regmap): Renamed from regmap, made static.
15679 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15680 made static.
15681 (i386_cannot_store_register): Renamed from cannot_store_register,
15682 made static.
15683 (the_low_target): New.
15684 * linux-ia64-low.c (num_regs): Remove.
15685 (ia64_num_regs): Define.
15686 (ia64_regmap): Renamed from regmap, made static.
15687 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15688 made static.
15689 (ia64_cannot_store_register): Renamed from cannot_store_register,
15690 made static.
15691 (the_low_target): New.
15692 * linux-m68k-low.c (num_regs): Remove.
15693 (m68k_num_regs): Define.
15694 (m68k_regmap): Renamed from regmap, made static.
15695 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15696 made static.
15697 (m68k_cannot_store_register): Renamed from cannot_store_register,
15698 made static.
15699 (the_low_target): New.
15700 * linux-mips-low.c (num_regs): Remove.
15701 (mips_num_regs): Define.
15702 (mips_regmap): Renamed from regmap, made static.
15703 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15704 made static.
15705 (mips_cannot_store_register): Renamed from cannot_store_register,
15706 made static.
15707 (the_low_target): New.
15708 * linux-ppc-low.c (num_regs): Remove.
15709 (ppc_num_regs): Define.
15710 (ppc_regmap): Renamed from regmap, made static.
15711 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15712 made static.
15713 (ppc_cannot_store_register): Renamed from cannot_store_register,
15714 made static.
15715 (the_low_target): New.
15716 * linux-s390-low.c (num_regs): Remove.
15717 (s390_num_regs): Define.
15718 (s390_regmap): Renamed from regmap, made static.
15719 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15720 made static.
15721 (s390_cannot_store_register): Renamed from cannot_store_register,
15722 made static.
15723 (the_low_target): New.
15724 * linux-sh-low.c (num_regs): Remove.
15725 (sh_num_regs): Define.
15726 (sh_regmap): Renamed from regmap, made static.
15727 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15728 made static.
15729 (sh_cannot_store_register): Renamed from cannot_store_register,
15730 made static.
15731 (the_low_target): New.
15732 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15733 (the_low_target): New.
15734
157352002-04-09 Daniel Jacobowitz <drow@mvista.com>
15736
15737 * Makefile.in: Add stamp-h target.
15738 * configure.in: Create stamp-h.
15739 * configure: Regenerated.
15740
157412002-04-09 Daniel Jacobowitz <drow@mvista.com>
15742
15743 * inferiors.c: New file.
15744 * target.c: New file.
15745 * target.h: New file.
15746 * Makefile.in: Add target.o and inferiors.o. Update
15747 dependencies.
15748 * linux-low.c (inferior_pid): New static variable,
15749 moved from server.c.
15750 (linux_create_inferior): Renamed from create_inferior.
15751 Call add_inferior. Return 0 on success instead of a PID.
15752 (linux_attach): Renamed from myattach.
15753 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15754 (linux_thread_alive): Renamed from mythread_alive.
15755 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15756 child dies.
15757 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15758 (regsets_store_inferior_registers): Correct error message.
15759 Add missing ``return 0''.
15760 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15761 (linux_store_registers): Renamed from store_inferior_registers.
15762 (linux_read_memory): Renamed from read_inferior_memory.
15763 (linux_write_memory): Renamed from write_inferior_memory.
15764 (linux_target_ops): New structure.
15765 (initialize_low): Call set_target_ops ().
15766 * remote-utils.c (unhexify): New function.
15767 (hexify): New function.
15768 (input_interrupt): Send signals to ``signal_pid''.
15769 * server.c (inferior_pid): Remove.
15770 (start_inferior): Update create_inferior call.
15771 (attach_inferior): Call add_inferior.
15772 (handle_query): New function.
15773 (main): Call handle_query for `q' packets.
15774 * server.h: Include "target.h". Remove obsolete prototypes.
15775 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15776
157772002-04-09 Daniel Jacobowitz <drow@mvista.com>
15778
15779 * Makefile.in: Add WARN_CFLAGS. Update configury
15780 dependencies.
15781 * configure.in: Check for <string.h>
15782 * configure: Regenerate.
15783 * config.in: Regenerate.
15784 * gdbreplay.c: Include needed system headers.
15785 (remote_open): Remove strchr prototype.
15786 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15787 * regcache.c (supply_register): Change buf argument to const void *.
15788 (supply_register_by_name): Likewise.
15789 (collect_register): Change buf argument to void *.
15790 (collect_register_by_name): Likewise.
15791 * regcache.h: Add missing prototypes.
15792 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15793 * server.c (handle_query): New function.
15794 (attached): New static variable, moved out of main.
15795 (main): Quiet longjmp clobber warnings.
15796 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15797 * utils.c (error): Remove NORETURN.
15798 (fatal): Likewise.
This page took 1.881377 seconds and 4 git commands to generate.