1 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3 * dll.h: Include <list>.
4 (struct dll_info): Add constructor.
6 (all_dlls): Change type to std::list<dll_info>.
7 * dll.c: Include <algorithm>.
8 (get_dll): Remove macro.
9 (all_dlls): Change type to std::list<dll_info *>.
10 (free_one_dll): Remove.
11 (match_dll): Likewise.
13 (unloaded_dll): Adjust to all_dlls type change, use
14 std::find_if. Inline code from match_dll.
15 (clear_dlls): Adjust to all_dlls type change.
16 * server.c (emit_dll_description): Remove.
17 (handle_qxfer_libraries): Adjust to all_dlls type change,
18 integrate emit_dll_description's functionality.
20 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
22 * linux-low.h (struct linux_target_ops) <delete_process>: New
24 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
25 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
26 (struct linux_target_ops): Add delete_process callback.
27 * linux-arm-low.c (arm_delete_process): New.
28 (struct linux_target_ops): Add delete_process callback.
29 * linux-bfin-low.c (struct linux_target_ops): Likewise.
30 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
31 * linux-m32r-low.c (struct linux_target_ops): Likewise.
32 * linux-mips-low.c (mips_linux_delete_process): New.
33 (struct linux_target_ops): Add delete_process callback.
34 * linux-ppc-low.c (struct linux_target_ops): Likewise.
35 * linux-s390-low.c (struct linux_target_ops): Likewise.
36 * linux-sh-low.c (struct linux_target_ops): Likewise.
37 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
38 * linux-tile-low.c (struct linux_target_ops): Likewise.
39 * linux-x86-low.c (x86_linux_delete_process): New.
40 (struct linux_target_ops): Add delete_process callback.
41 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
43 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
45 * linux-aarch64-low.c (the_low_target): Add thread delete
47 * linux-arm-low.c (arm_delete_thread): New function.
48 (the_low_target): Add thread delete callback.
49 * linux-bfin-low.c (the_low_target): Likewise.
50 * linux-crisv32-low.c (the_low_target): Likewise.
51 * linux-low.c (delete_lwp): Invoke delete_thread callback if
53 * linux-low.h (struct linux_target_ops) <delete_thread>: New
55 * linux-m32r-low.c (the_low_target): Add thread delete callback.
56 * linux-mips-low.c (mips_linux_delete_thread): New function.
57 (the_low_target): Add thread delete callback.
58 * linux-ppc-low.c (the_low_target): Likewise.
59 * linux-s390-low.c (the_low_target): Likewise.
60 * linux-sh-low.c (the_low_target): Likewise.
61 * linux-tic6x-low.c (the_low_target): Likewise.
62 * linux-tile-low.c (the_low_target): Likewise.
63 * linux-x86-low.c (the_low_target): Likewise.
64 * linux-xtensa-low.c (the_low_target): Likewise.
66 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
68 * win32-low.c: Include "common-inferior.h".
70 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
72 * inferiors.c (set_inferior_cwd): New function.
73 * server.c (handle_general_set): Handle QSetWorkingDir packet.
74 (handle_query): Inform that QSetWorkingDir is supported.
75 * win32-low.c (create_process): Pass the inferior's cwd to
78 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
80 * inferiors.c (current_inferior_cwd): New global variable.
81 (get_inferior_cwd): New function.
82 * inferiors.h (struct process_info) <cwd>: New field.
84 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
86 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
87 (OBS): Add gdb_tilde_expand.o.
89 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
91 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
92 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
94 2017-09-29 Pedro Alves <palves@redhat.com>
96 * ax.c (gdb_parse_agent_expr): Constify.
97 * ax.h (gdb_parse_agent_expr): Constify.
98 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
100 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
101 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
102 * remote-utils.h (read_ptid): Constify.
103 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
104 (process_point_options, process_serial_event): Constify.
105 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
106 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
107 (cmd_qtbuffer): Constify.
109 2017-09-29 Pedro Alves <palves@redhat.com>
111 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
114 2017-09-29 Pedro Alves <palves@redhat.com>
116 * linux-low.c (handle_extended_wait): Pass parent thread instead
117 of process to thread_db_notice_clone.
118 * linux-low.h (thread_db_notice_clone): Replace parent process
119 parameter with parent thread parameter.
120 * thread-db.c (find_one_thread): Add comment.
121 (thread_db_notice_clone): Replace parent process parameter with
122 parent thread parameter. Temporarily switch to the parent thread.
124 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
126 * gdbthread.h: Include "common-gdbthread.h".
127 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
128 "if" when validating the ptid.
129 * remote-utils.c: Include "gdbthread.h".
130 (prepare_resume_reply): Use "switch_to_thread".
131 * target.c (done_accessing_memory): Likewise.
133 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
135 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
136 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
137 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
138 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
139 s390x-gs-linux64-ipa.o to ipa_obj.
140 * linux-s390-low.c (HWCAP_S390_GS): New define.
141 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
143 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
144 (s390_arch_setup): Check for guarded-storage support and choose
146 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
147 init_registers_s390x_gs_linux64.
148 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
150 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
151 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
153 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
155 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
157 2017-09-21 Kevin Buettner <kevinb@redhat.com>
159 * linux-low.h (struct lwp_info): Add new field, thread_handle.
160 (thread_db_thread_handle): Declare.
161 * linux-low.c (linux_target_ops): Initialize thread_handle.
162 * server.c (handle_qxfer_threads_worker): Add support for
164 * target.h (struct target_ops): Add new function pointer,
166 (target_thread_handle): Define.
167 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
169 (thread_db_thread_handle): New function.
171 2017-09-21 Kevin Buettner <kevinb@redhat.com>
173 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
174 * linux-low.h (thread_db_notice_clone): Declare.
175 * thread-db.c (thread_db_notice_clone): New function.
177 2017-09-21 Pedro Alves <palves@redhat.com>
179 * server.c (gdb_read_memory, handle_status, process_serial_event)
180 (handle_serial_event, handle_target_event): Adjust to
181 set_desired_thread prototype change.
182 * target.c (set_desired_thread): Remove 'use_general' parameter
184 * target.h (set_desired_thread): Remove 'use_general' parameter.
186 2017-09-20 Tom Tromey <tom@tromey.com>
188 * target.c (target_terminal::terminal_state): Define.
189 (target_terminal::init): Rename from target_terminal_init.
190 (target_terminal::inferior): Rename from
191 target_terminal_inferior.
192 (target_terminal::ours): Rename from target_terminal_ours.
193 (target_terminal::ours_for_output, target_terminal::info): New.
195 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
197 * server.c (accumulate_file_name_length): Remove.
198 (emit_dll_description): Adjust to std::string change.
199 (handle_qxfer_libraries): Use std::string to hold document.
201 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
203 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
204 return type of xml_escape_text.
205 * server.c (emit_dll_description): Likewise.
207 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
209 * server.c (captured_main): Accept argument for --selftest.
210 Update run_tests call.
211 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
212 when registering selftests.
214 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
216 * regcache.c (get_thread_regcache): Update code to use "std::vector"
217 instead of "VEC" for "target_desc.reg_defs".
218 (regcache_cpy): Likewise.
219 (registers_to_string): Likewise.
220 (registers_from_string): Likewise.
221 (find_regno): Likewise.
222 (supply_regblock): Likewise.
223 (regcache_raw_read_unsigned): Likewise.
224 * tdesc.c (init_target_desc): Likewise.
225 (tdesc_create_reg): Likewise.
226 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
227 (struct target_desc) <reg_defs>: Convert to "std::vector".
228 (target_desc): Do not initialize "reg_defs".
229 (~target_desc): Update code to use "std::vector" instead of "VEC"
230 for "target_desc.reg_defs".
231 (operator==): Likewise.
233 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
235 * inferiors.h (thread_to_gdb_id): Remove.
236 * inferiors.c (thread_to_gdb_id): Remove.
237 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
238 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
239 lynx_store_registers, lynx_read_memory, lynx_write_memory):
241 * nto-low.c (nto_fetch_registers, nto_store_registers,
242 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
244 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
246 * inferiors.h (gdb_id_to_thread_id): Remove.
247 * inferiors.c (gdb_id_to_thread_id): Remove.
248 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
249 removal. Move pid declaration closer to where it's used.
251 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
253 * server.c (handle_detach): New function.
254 (process_serial_event): Move code out, call handle_detach.
256 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
258 * server.c (require_running): Rename to ...
259 (require_running_or_return): ... this ...
260 (require_running_or_break): ... and this.
261 (handle_query, process_serial_event): Adjust.
263 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
265 * linux-low.c (linux_set_resume_request): Remove unused
268 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
270 * server.c (first_thread_of): Remove.
271 (process_serial_event): Replace usage of first_thread_of with
272 find_any_thread_of_pid.
273 * tracepoint.c (same_process_p): Remove.
274 (gdb_agent_about_to_close): Replace usage of same_process_p with
275 find_any_thread_of_pid.
276 * linux-x86-low.c (same_process_callback): Remove.
277 (x86_arch_setup_process_callback): Replace usage of
278 same_process_callback with find_any_thread_of_pid.
279 * thread-db.c (any_thread_of): Remove.
280 (switch_to_process): Replace usage of any_thread_of with
281 find_any_thread_of_pid.
282 * inferiors.c (thread_pid_matches_callback): Remove.
283 (find_thread_process): Adjust to use find_any_thread_of_pid.
285 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
287 * regcache.c (get_thread_regcache): Guard calls to "memset"
290 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
292 * linux-low.c (handle_extended_wait): Use
293 "allocate_target_description" instead of "XNEW".
294 * linux-x86-low.c (initialize_low_arch): Likewise.
296 2017-09-05 Yao Qi <yao.qi@linaro.org>
298 * configure.srv (srv_i386_regobj): Remove.
299 (srv_amd64_regobj): Remove.
300 (srv_regobj): Set it to "" for x86 non-linux targets.
301 * linux-x86-tdesc.c (i386_linux_read_description):
302 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
303 (init_registers_i386): Remove the declaration.
304 (tdesc_i386): Remove the declaration.
305 (lynx_i386_arch_setup): Call i386_create_target_description.
306 * nto-x86-low.c: Likewise.
307 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
308 [!__x86_64__]: include arch/i386.h.
309 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
311 2017-09-05 Yao Qi <yao.qi@linaro.org>
313 * configure.srv (srv_amd64_linux_xmlfiles): Remove
314 i386/amd64-XXX-linux from it.
316 2017-09-05 Yao Qi <yao.qi@linaro.org>
318 * configure.srv: Empty srv_amd64_linux_regobj if $development is
320 (ipa_amd64_linux_regobj): Remove.
321 (ipa_x32_linux_regobj): Remove.
323 2017-09-05 Yao Qi <yao.qi@linaro.org>
325 * Makefile.in (arch-amd64.o): New rule.
326 * configure.srv: Append arch-amd64.o.
327 * linux-amd64-ipa.c: Include common/x86-xstate.h.
328 (get_ipa_tdesc): Call amd64_linux_read_description.
329 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
330 and init_registers_amd64_XXX.
331 * linux-x86-low.c (x86_linux_read_description): Call
332 amd64_linux_read_description.
333 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
334 (initialize_low_arch): Don't call init_registers_x32_XXX and
335 init_registers_amd64_XXX.
336 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
338 [__x86_64__] (amd64_tdesc_test): New function.
339 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
340 and init_registers_amd64_XXX.
341 * linux-x86-tdesc.c: Include arch/amd64.h.
342 (xcr0_to_tdesc_idx): New function.
343 (i386_linux_read_description): New function.
344 (amd64_get_ipa_tdesc_idx): New function.
345 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
346 (amd64_get_ipa_tdesc): Declare.
348 2017-09-05 Yao Qi <yao.qi@linaro.org>
350 * configure.srv (srv_i386_linux_xmlfiles): Remove
351 i386/i386-XXX-linux.xml from it.
353 2017-09-05 Yao Qi <yao.qi@linaro.org>
355 * configure.srv: Set srv_i386_linux_regobj empty if $development
357 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
358 initialize_low_tdesc.
359 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
360 with #if initialize_low_tdesc.
361 * linux-x86-tdesc-selftest.c: New file.
362 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
364 2017-09-05 Yao Qi <yao.qi@linaro.org>
366 * Makefile.in (arch-i386.o): New rule.
367 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
368 (x86_64-*-linux*): Likewise.
369 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
371 (i386_linux_read_description): Remove code and call
372 i386_create_target_description.
373 * tdesc.c (allocate_target_description): New function.
374 * tdesc.h (set_tdesc_architecture): Remove declaration.
375 (set_tdesc_osabi): Likewise.
377 2017-09-05 Yao Qi <yao.qi@linaro.org>
379 * linux-x86-tdesc.c: Don't include <inttypes.h>.
380 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
381 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
383 * server.c (get_features_xml): Call tdesc_get_features_xml.
384 * tdesc.c (set_tdesc_architecture): New function.
385 (set_tdesc_osabi): New function.
386 (tdesc_get_features_xml): New function.
387 (tdesc_create_feature): Add an argument.
388 * tdesc.h (struct target_desc) <features>: New field.
389 <arch, osabi>: New field.
390 (~target_desc): xfree features, arch, and osabi.
391 (target_desc::oerator==): Don't compare .xmltarget.
392 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
393 (set_tdesc_osabi): Likewise.
394 (tdesc_get_features_xml): Likewise.
396 2017-09-05 Yao Qi <yao.qi@linaro.org>
398 * linux-x86-tdesc.c: Include selftest.h.
399 (i386_tdesc_test): New function.
400 (initialize_low_tdesc): Call selftests::register_test.
401 * tdesc.h: Include regdef.h.
402 (target_desc): Override operator == and !=.
404 2017-09-05 Yao Qi <yao.qi@linaro.org>
406 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
408 * linux-i386-ipa.c: Include common/x86-xstate.h
409 (get_ipa_tdesc): Call i386_linux_read_description.
410 (initialize_low_tracepoint): Don't call init_registers_XXX
411 functions, call initialize_low_tdesc instead.
412 * linux-x86-low.c (x86_linux_read_description): Call
413 i386_linux_read_description.
414 (initialize_low_arch): Don't call init_registers_i386_XXX
415 functions, call initialize_low_tdesc.
416 * linux-x86-tdesc.c: New file.
417 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
418 (i386_get_ipa_tdesc_idx): Declare.
419 (i386_get_ipa_tdesc): Declare.
420 (initialize_low_tdesc): Declare.
422 2017-09-05 Yao Qi <yao.qi@linaro.org>
424 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
427 2017-09-05 Yao Qi <yao.qi@linaro.org>
429 * Makefile.in (IPA_OBJS): Add vec-ipa.o
430 * regcache.c (get_thread_regcache): Use VEC_length.
431 (init_register_cache): Likewise.
432 (regcache_cpy): Likewise.
433 (registers_to_string): Iterate reg_defs via VEC_iterate.
434 (find_regno): Likewise.
435 (find_register_by_number): Use VEC_index.
436 (register_size): Call find_register_by_number.
437 (register_data): Call find_register_by_number.
438 (supply_regblock): Use VEC_length.
439 (regcache_raw_read_unsigned): Likewise.
440 * tdesc.c (init_target_desc): Iterate reg_defs via
442 (default_description): Update initializer.
443 (copy_target_description): Don't update field num_registers.
444 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
445 <num_registers>: Remove.
447 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
449 * Makefile.in (.SECONDARY): Define target.
451 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
453 * linux-low.c (linux_wait_1): Adjust.
454 * server.c (queue_stop_reply_callback): Adjust.
456 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
458 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
459 QEnvironmentUnset and QEnvironmentReset packets.
460 (handle_query): Inform remote that QEnvironmentHexEncoded,
461 QEnvironmentUnset and QEnvironmentReset are supported.
463 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
465 * inferiors.h (inferior_target_data): Rename to ...
466 (thread_target_data): ... this.
467 (inferior_regcache_data): Rename to ...
468 (thread_regcache_data): ... this.
469 (set_inferior_regcache_data): Rename to ...
470 (set_thread_regcache_data): ... this.
471 * inferiors.c (inferior_target_data): Rename to ...
472 (thread_target_data): ... this.
473 (inferior_regcache_data): Rename to ...
474 (thread_regcache_data): ... this.
475 (set_inferior_regcache_data): Rename to ...
476 (set_thread_regcache_data): ... this.
477 (free_one_thread): Update.
478 * linux-low.h (get_thread_lwp): Update.
479 * regcache.c (get_thread_regcache): Update.
480 (regcache_invalidate_thread): Update.
481 (free_register_cache_thread): Update.
482 * win32-i386-low.c (update_debug_registers_callback): Update.
483 (win32_get_current_dr): Update.
484 * win32-low.c (thread_rec): Update.
485 (delete_thread_info): Update.
486 (continue_one_thread): Update.
487 (suspend_one_thread): Update.
489 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
491 * inferiors.c (set_inferior_target_data): Remove.
492 * inferiors.h (set_inferior_target_data): Remove.
494 2017-08-18 Yao Qi <yao.qi@linaro.org>
496 * Makefile.in (OBS): Add selftest.o.
497 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
498 * configure, config.in: Re-generated.
499 * server.c: Include common/sefltest.h.
500 (captured_main): Handle option --selftest.
502 2017-08-09 Yao Qi <yao.qi@linaro.org>
504 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
505 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
506 i386-avx-mpx.o and i386-mmx.o.
507 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
508 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
509 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
510 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
511 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
512 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
513 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
514 i386/amd64-avx-mpx.xml.
516 2017-08-09 Yao Qi <yao.qi@linaro.org>
518 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
519 and x32-avx-avx512.o.
520 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
521 i386/x32-avx-avx512.xml.
523 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
525 * tracepoint.h (enum class fast_tpoint_collect_result): New
527 (fast_tracepoint_collecting): Change return type to
528 fast_tpoint_collect_result.
529 * tracepoint.c (fast_tracepoint_collecting): Likewise.
530 * linux-low.h: Include tracepoint.h.
531 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
532 fast_tpoint_collect_result.
533 * linux-low.c (handle_tracepoints): Adjust.
534 (linux_fast_tracepoint_collecting): Change return type to
535 fast_tpoint_collect_result.
536 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
537 linux_wait_1, stuck_in_jump_pad_callback,
538 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
539 proceed_one_lwp): Adjust to type change.
541 2017-07-10 Yao Qi <yao.qi@linaro.org>
543 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
545 2017-06-29 Yao Qi <yao.qi@linaro.org>
547 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
549 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
551 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
553 * Makefile.in (IPA_OBJS): Sort and format one item per line.
555 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
557 * linux-low.c (linux_create_inferior): Adjust code to access the
558 environment information via 'gdb_environ' class.
559 * lynx-low.c (lynx_create_inferior): Likewise.
560 * server.c (our_environ): Make it an instance of 'gdb_environ'.
561 (get_environ): Return a pointer to 'our_environ'.
562 (captured_main): Initialize 'our_environ'.
563 * server.h (get_environ): Adjust prototype.
564 * spu-low.c (spu_create_inferior): Adjust code to access the
565 environment information via 'gdb_environ' class.
567 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
569 * linux-low.c (linux_read_memory, linux_write_memory): Remove
570 usage of "register" keyword.
572 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
574 * configure: Re-generate.
576 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
578 * configure: Re-generate.
580 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
582 * Makefile.in (COMPILE.pre): Add "-x c++".
584 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
586 * fork-child.c: Conditionally include <signal.h>.
588 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
590 * server.c (handle_general_set): Handle new packet
592 (handle_query): Add "QStartupWithShell" to the list of supported
594 (gdbserver_usage): Add help text explaining the
595 new "--startup-with-shell" and "--no-startup-with-shell" CLI
597 (captured_main): Recognize and act upon the presence of the new
600 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
601 Pedro Alves <palves@redhat.com>
603 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
604 * configure: Regenerate.
605 * configure.srv (srv_linux_obj): Add "fork-child.o" and
607 (i[34567]86-*-lynxos*): Likewise.
608 (spu*-*-*): Likewise.
609 * fork-child.c: New file.
610 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
612 (linux_ptrace_fun): New function.
613 (linux_create_inferior): Adjust function prototype to reflect
614 change on "target.h". Adjust function code to use
616 (linux_request_interrupt): Delete "signal_pid".
617 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
618 (lynx_ptrace_fun): New function.
619 (lynx_create_inferior): Adjust function prototype to reflect
620 change on "target.h". Adjust function code to use
622 * nto-low.c (nto_create_inferior): Adjust function prototype and
623 code to reflect change on "target.h". Update comments.
624 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
625 "common-terminal.h" and "environ.h".
626 (terminal_fd): Moved to fork-child.c.
627 (old_foreground_pgrp): Likewise.
628 (restore_old_foreground_pgrp): Likewise.
629 (last_status): Make it global.
630 (last_ptid): Likewise.
631 (our_environ): New variable.
632 (startup_with_shell): Likewise.
633 (program_name): Likewise.
634 (program_argv): Rename to...
635 (program_args): ...this.
636 (wrapper_argv): New variable.
637 (start_inferior): Delete function.
638 (get_exec_wrapper): New function.
639 (get_exec_file): Likewise.
640 (get_environ): Likewise.
641 (prefork_hook): Likewise.
642 (post_fork_inferior): Likewise.
643 (postfork_hook): Likewise.
644 (postfork_child_hook): Likewise.
645 (handle_v_run): Update code to deal with arguments coming from the
646 remote host. Update calls from "start_inferior" to
648 (captured_main): Likewise. Initialize environment variable. Call
650 * server.h (post_fork_inferior): New prototype.
651 (get_environ): Likewise.
652 (last_status): Declare.
653 (last_ptid): Likewise.
654 (signal_pid): Likewise.
655 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
656 (spu_ptrace_fun): New function.
657 (spu_create_inferior): Adjust function prototype to reflect change
658 on "target.h". Adjust function code to use "fork_inferior".
659 * target.c (target_terminal_init): New function.
660 (target_terminal_inferior): Likewise.
661 (target_terminal_ours): Likewise.
662 * target.h: Include <vector>.
663 (struct target_ops) <create_inferior>: Update prototype.
664 (create_inferior): Update macro.
665 * utils.c (gdb_flush_out_err): New function.
666 * win32-low.c (win32_create_inferior): Adjust function prototype
667 and code to reflect change on "target.h".
669 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
671 * inferiors.c (switch_to_thread): New function.
673 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
675 * Makefile.in (SFILE): Add "common/job-control.c".
676 (OBS): Add "job-control.o".
678 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
680 * Makefile: Remove "@host_makefile_frag@".
682 2017-05-05 Pedro Alves <palves@redhat.com>
684 * configure: Regenerate.
686 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
688 * configure: Regenerate.
690 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
692 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
693 software_single_step change of return type to
694 std::vector<CORE_ADDR>.
695 * linux-low.c (install_software_single_step_breakpoints):
697 * linux-low.h (install_software_single_step_breakpoints):
700 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
702 * remote-utils.c: Include "gdb_termios.h" instead of
704 * terminal.h: Delete file.
706 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
708 * server.c: Include <vector>.
709 <program_argv, wrapper_argv>: Convert to std::vector.
710 (start_inferior): Rewrite function to use C++.
711 (handle_v_run): Likewise. Update code that calculates the argv
712 based on the vRun packet; use C++.
713 (captured_main): Likewise.
715 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
717 * server.c (handle_v_cont): Initialize thread_resume::thread
720 2017-04-05 Pedro Alves <palves@redhat.com>
722 * configure: Regenerate.
724 2017-04-05 Pedro Alves <palves@redhat.com>
726 * gdbreplay.c (sync_error): Constify.
727 * linux-x86-low.c (push_opcode): Constify.
729 2017-04-05 Pedro Alves <palves@redhat.com>
731 * win32-low.c (get_child_debug_event)
732 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
733 Report TARGET_WAITKIND_SPURIOUS instead.
735 2017-04-05 Pedro Alves <palves@redhat.com>
737 * remote-utils.c (remote_prepare, remote_open): Constify.
738 * remote-utils.h (remote_prepare, remote_open): Constify.
739 * server.c (captured_main): Constify 'port' handling.
741 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
743 * Makefile.in (clean): Clear .deps.
745 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
747 * .gitignore: Remove generated files, replace with wildcard.
748 * (clean): Replace removal of generated files with wildcard.
749 (version.c): Replace with...
750 (version-generated.c): ...this.
751 (xml-builtin.c): Replace with...
752 (xml-builtin-generated.c): ...this.
753 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
754 (%.c: *regformats*): Replace with...
755 (%-generated.c: *regformats*): ...this.
757 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
759 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
760 (xtensa_fill_gregset): Call collect_register_by_name for
762 (xtensa_store_gregset): Call supply_register_by_name for
765 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
767 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
768 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
769 (xtensa_store_gregset): Call supply_register for all registers in
770 a0_regnum..a0_regnum + C0_NREGS range.
772 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
774 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
775 (ax-ipa.o: ax.c): Remove.
776 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
777 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
778 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
779 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
780 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
782 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
784 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
785 (print-utils-ipa.o: ../common/print-utils.c): Remove.
786 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
787 (errors-ipa.o: ../common/errors.c): Remove.
788 (format-ipa.o: ../common/format.c): Remove.
789 (common-utils-ipa.o: ../common/common-utils.c): Remove.
791 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
793 * Makefile.in (%-ipa.o: %.c): New rule.
794 (tracepoint-ipa.o: tracepoint.c): Remove.
795 (utils-ipa.o: utils.c): Remove.
796 (remote-utils-ipa.o: remote-utils.c): Remove.
797 (regcache-ipa.o: regcache.c): Remove.
798 (i386-linux-ipa.o: i386-linux.c): Remove.
799 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
800 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
801 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
802 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
803 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
804 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
805 (amd64-linux-ipa.o: amd64-linux.c): Remove.
806 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
807 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
808 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
809 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
810 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
811 (aarch64-ipa.o: aarch64.c): Remove.
812 (s390-linux32-ipa.o: s390-linux32.c): Remove.
813 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
814 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
815 (s390-linux64-ipa.o: s390-linux64.c): Remove.
816 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
817 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
818 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
819 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
820 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
821 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
822 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
823 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
824 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
825 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
826 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
827 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
828 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
829 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
830 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
831 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
832 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
833 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
834 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
835 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
836 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
837 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
838 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
839 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
840 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
841 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
842 (tdesc-ipa.o: tdesc.c): Remove.
843 (x32-linux-ipa.o: x32-linux.c): Remove.
844 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
845 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
847 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
849 * Makefile.in (%.o: ../arch/%.c): New rule.
850 (arm.o: ../arch/arm.c): Remove.
851 (arm-linux.o: ../arch/arm-linux.c): Remove.
852 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
853 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
855 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
857 * Makefile.in (%.o: ../nat/%.c): New rule.
858 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
859 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
860 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
861 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
862 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
863 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
864 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
865 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
866 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
867 (linux-personality.o: ../nat/linux-personality.c): Remove.
868 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
869 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
870 (x86-linux.o: ../nat/x86-linux.c): Remove.
871 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
872 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
874 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
876 * Makefile.in (%.o: ../common/%.c): New rule.
877 (signals.o: ../common/signals.c): Remove.
878 (print-utils.o: ../common/print-utils.c): Remove.
879 (rsp-low.o: ../common/rsp-low.c): Remove.
880 (common-utils.o: ../common/common-utils.c): Remove.
881 (posix-strerror.o: ../common/posix-strerror.c): Remove.
882 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
883 (vec.o: ../common/vec.c): Remove.
884 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
885 (xml-utils.o: ../common/xml-utils.c): Remove.
886 (ptid.o: ../common/ptid.c): Remove.
887 (buffer.o: ../common/buffer.c): Remove.
888 (format.o: ../common/format.c): Remove.
889 (filestuff.o: ../common/filestuff.c): Remove.
890 (agent.o: ../common/agent.c): Remove.
891 (errors.o: ../common/errors.c): Remove.
892 (environ.o: ../common/environ.c): Remove.
893 (common-debug.o: ../common/common-debug.c): Remove.
894 (cleanups.o: ../common/cleanups.c): Remove.
895 (common-exceptions.o: ../common/common-exceptions.c): Remove.
896 (fileio.o: ../common/fileio.c): Remove.
897 (common-regcache.o: ../common/common-regcache.c): Remove.
898 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
899 (new-op.o: ../common/new-op.c): Remove.
900 (btrace-common.o: ../common/btrace-common.c): Remove.
902 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
904 * Makefile.in (%.o: ../target/%.c): New rule.
905 (waitstatus.o: ../target/waitstatus.c): Remove.
907 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
910 (%.c: ../regformats/%.dat,
911 (%.c: ../regformats/arm/%.dat,
912 (%.c: ../regformats/i386/%.dat,
913 (%.c: ../regformats/rs6000/%.dat): New rules.
916 (arm-with-iwmmxt.c): Remove.
917 (arm-with-vfpv2.c): Remove.
918 (arm-with-vfpv3.c): Remove.
919 (arm-with-neon.c): Remove.
920 (reg-bfin.c): Remove.
921 (reg-cris.c): Remove.
922 (reg-crisv32.c): Remove.
924 (i386-linux.c): Remove.
925 (i386-avx.c): Remove.
926 (i386-avx-linux.c): Remove.
927 (i386-avx-avx512.c): Remove.
928 (i386-avx-avx512-linux.c): Remove.
929 (i386-mpx.c): Remove.
930 (i386-mpx-linux.c): Remove.
931 (i386-avx-mpx-avx512-pku.c): Remove.
932 (i386-avx-mpx-avx512-pku-linux.c): Remove.
933 (i386-avx-mpx.c): Remove.
934 (i386-avx-mpx-linux.c): Remove.
935 (i386-mmx.c): Remove.
936 (i386-mmx-linux.c): Remove.
937 (reg-ia64.c): Remove.
938 (reg-m32r.c): Remove.
939 (reg-m68k.c): Remove.
941 (mips-linux.c): Remove.
942 (mips-dsp-linux.c): Remove.
943 (mips64-linux.c): Remove.
944 (mips64-dsp-linux.c): Remove.
945 (nios2-linux.c): Remove.
946 (powerpc-32.c): Remove.
947 (powerpc-32l.c): Remove.
948 (powerpc-altivec32l.c): Remove.
949 (powerpc-cell32l.c): Remove.
950 (powerpc-vsx32l.c): Remove.
951 (powerpc-isa205-32l.c): Remove.
952 (powerpc-isa205-altivec32l.c): Remove.
953 (powerpc-isa205-vsx32l.c): Remove.
954 (powerpc-e500l.c): Remove.
955 (powerpc-64l.c): Remove.
956 (powerpc-altivec64l.c): Remove.
957 (powerpc-cell64l.c): Remove.
958 (powerpc-vsx64l.c): Remove.
959 (powerpc-isa205-64l.c): Remove.
960 (powerpc-isa205-altivec64l.c): Remove.
961 (powerpc-isa205-vsx64l.c): Remove.
962 (s390-linux32.c): Remove.
963 (s390-linux32v1.c): Remove.
964 (s390-linux32v2.c): Remove.
965 (s390-linux64.c): Remove.
966 (s390-linux64v1.c): Remove.
967 (s390-linux64v2.c): Remove.
968 (s390-te-linux64.c): Remove.
969 (s390-vx-linux64.c): Remove.
970 (s390-tevx-linux64.c): Remove.
971 (s390x-linux64.c): Remove.
972 (s390x-linux64v1.c): Remove.
973 (s390x-linux64v2.c): Remove.
974 (s390x-te-linux64.c): Remove.
975 (s390x-vx-linux64.c): Remove.
976 (s390x-tevx-linux64.c): Remove.
977 (tic6x-c64xp-linux.c): Remove.
978 (tic6x-c64x-linux.c): Remove.
979 (tic6x-c62x-linux.c): Remove.
981 (reg-sparc64.c): Remove.
984 (amd64-linux.c): Remove.
985 (amd64-avx.c): Remove.
986 (amd64-avx-linux.c): Remove.
987 (amd64-avx-avx512.c): Remove.
988 (amd64-avx-avx512-linux.c): Remove.
989 (amd64-mpx.c): Remove.
990 (amd64-mpx-linux.c): Remove.
991 (amd64-avx-mpx-avx512-pku.c): Remove.
992 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
993 (amd64-avx-mpx.c): Remove.
994 (amd64-avx-mpx-linux.c): Remove.
996 (x32-linux.c): Remove.
998 (x32-avx-linux.c): Remove.
999 (x32-avx-avx512.c): Remove.
1000 (x32-avx-avx512-linux.c): Remove.
1001 (reg-xtensa.c): Remove.
1002 (reg-tilegx.c): Remove.
1003 (reg-tilegx32.c): Remove.
1005 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1007 * Makefile.in (SFILES): Add "common/environ.c".
1008 (OBJS): Add "common/environ.h".
1010 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1012 * configure.ac: Check if the fs_base and gs_base members of
1013 `struct user_regs_struct' exist.
1014 * config.in: Regenerated.
1015 * configure: Likewise.
1017 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1019 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1021 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1022 (get_next_pcs_syscall_next_pc): Likewise.
1024 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1026 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1027 * nto-x86-low.c: Likewise.
1029 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1031 * Makefile.in: Include disable-implicit-rules.mk.
1033 2016-11-23 Pedro Alves <palves@redhat.com>
1035 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1036 (debug_vprintf): Use std::chrono::steady_clock instead of
1037 gettimeofday. Use '.' instead of ':'.
1038 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1039 (get_timestamp): Use std::chrono::steady_clock instead of
1042 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1044 * Makefile.in: Fix whitespace formatting.
1046 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1048 * Makefile.in (SFILES, OBS): Flatten list and order
1051 2016-11-23 Pedro Alves <palves@redhat.com>
1053 * event-loop.c (handle_file_event): Use warning.
1054 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1055 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1058 2016-11-23 Pedro Alves <palves@redhat.com>
1060 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1062 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1063 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1064 debug_printf and debug_flush for debug output.
1065 * server.c (handle_general_set): Likewise.
1066 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1069 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1071 * Makefile.in (.c.o): Replace rule with ...
1072 (%.o: %.c): ... this one.
1074 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1076 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1077 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1079 * configure.ac: Remove checks for the make program.
1080 * configure: Re-generate.
1082 2016-10-28 Pedro Alves <palves@redhat.com>
1084 * Makefile.in (CXX_DIALECT): Get from configure.
1085 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1086 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1087 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1088 * config.in: Regenerate.
1089 * configure: Regenerate.
1091 2016-10-27 Yao Qi <yao.qi@linaro.org>
1093 * linux-low.c (linux_supports_range_stepping): Return true if
1094 can_software_single_step return true.
1096 2016-10-27 Yao Qi <yao.qi@linaro.org>
1098 * inferiors.c (find_inferior_in_random): New function.
1099 * inferiors.h (find_inferior_in_random): Declare.
1100 * linux-low.c (linux_wait_for_event_filtered): Call
1101 find_inferior_in_random instead of find_inferior.
1103 2016-10-27 Yao Qi <yao.qi@linaro.org>
1105 * linux-low.c (linux_wait_1): If single-step breakpoints are
1106 inserted, remove them.
1108 2016-10-26 Pedro Alves <palves@redhat.com>
1110 * linux-low.c (handle_extended_wait): Link parent/child fork
1112 (linux_wait_1): Unlink them.
1113 (linux_set_resume_request): Ignore resume requests for
1114 already-resumed and unhandled fork child threads.
1115 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1116 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1118 (handle_v_requests) <vCont>: Don't call require_running.
1119 * server.h (in_queued_stop_replies): New declaration.
1121 2016-10-24 Yao Qi <yao.qi@linaro.org>
1124 * linux-aarch64-low.c (append_insns): Cast the return value to
1127 2016-10-10 Yao Qi <yao.qi@linaro.org>
1129 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1131 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1133 * target.c (target_supports_multi_process): New function, moved
1135 * target.h (target_supports_multi_process): ... here. Remove
1138 2016-10-05 Tom Tromey <tom@tromey.com>
1141 * tracepoint.c (handle_tracepoint_bkpts): Check
1142 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1144 2016-10-05 Yao Qi <yao.qi@linaro.org>
1146 * configure.srv: Update the path of arm-*.xml files.
1148 2016-10-05 Terry Guo <terry.guo@arm.com>
1149 Yao Qi <yao.qi@linaro.org>
1151 * Makefile.in: Adjust the path of rules.
1152 * configure.srv: Update the path of xml files.
1153 * regformats/arm-with-iwmmxt.dat: Regenerated.
1154 * regformats/arm-with-neon.dat: Likewise.
1155 * regformats/arm-with-vfpv2.dat: Likewise.
1156 * regformats/arm-with-vfpv3.dat Likewise.
1158 2016-09-30 Yao Qi <yao.qi@linaro.org>
1161 * target.c (target_stop_and_wait): Don't call
1162 target_continue_no_signal, use resume_stop instead.
1164 2016-09-26 Yao Qi <yao.qi@linaro.org>
1166 * linux-low.c (linux_wait_1): Call debug_exit.
1168 2016-09-23 Pedro Alves <palves@redhat.com>
1170 * Makefile.in (SFILES): Add common/new-op.c.
1171 (OBS): Add common/new-op.o.
1172 (new-op.o): New rule.
1174 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1176 * .gitinore: Ignore more files.
1178 2016-09-21 Yao Qi <yao.qi@linaro.org>
1180 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1183 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1185 * server.c (start_inferior): Call target_mourn_inferior instead of
1186 mourn_inferior; pass ptid_t argument to it.
1188 (handle_target_event): Likewise.
1189 * target.c (target_mourn_inferior): New function.
1190 * target.h (mourn_inferior): Delete macro.
1192 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1194 * linux-low.c (lwp_is_stepping): New function.
1196 2016-09-06 Carl Love <cel@us.ibm.com>
1198 * server.c (start_inferior): Fixed comment, requested comment change
1199 didn't get updated correctly. Removed reference to ptrace () call as
1200 it is only true on Linux systems.
1202 2016-09-06 Carl Love <cel@us.ibm.com>
1204 * server.c (start_inferior): Do not call
1205 function target_post_create_inferior () if the
1206 inferior process has already exited.
1208 2016-09-05 Pedro Alves <palves@redhat.com>
1210 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1211 (COMPILE.pre, CC_LD): Use CXX directly.
1212 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1213 * acinclude.m4: Don't include build-with-cxx.m4.
1214 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1215 * configure: Regenerate.
1217 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1220 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1221 call writing data to own_buf.
1223 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1225 * target.c (mywait): Call target_wait instead of
1227 (target_wait): New function.
1229 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1231 * server.c (start_inferior): New variable 'ptid'. Replace calls
1232 to the_target->resume by target_continue{,_no_signal}, depending
1234 * target.c (target_stop_and_wait): Call target_continue_no_signal
1235 instead of the_target->resume.
1236 (target_continue): New function.
1238 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1240 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1242 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1245 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1247 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1248 * linux-arm-low.c (ps_get_thread_area): Likewise.
1249 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1250 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1251 * linux-mips-low.c (ps_get_thread_area): Likewise.
1252 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1253 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1254 * linux-x86-low.c (ps_get_thread_area): Likewise.
1255 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1257 2016-08-19 Pedro Alves <palves@redhat.com>
1259 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1261 2016-08-19 Pedro Alves <palves@redhat.com>
1263 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1264 comment. Use memcpy instead of casting through unsigned long.
1266 2016-08-19 Pedro Alves <palves@redhat.com>
1268 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1269 allocating around 0x80000000.
1271 2016-08-19 Pedro Alves <palves@redhat.com>
1274 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1275 (x32-avx512-linux-ipa.o): New rules.
1276 * configure.ac (x86_64-*-linux*): New x32 check.
1277 * configure.srv (ipa_x32_linux_regobj): New.
1278 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1279 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1281 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1283 * configure: Regenerate.
1285 2016-08-09 Pedro Alves <palves@redhat.com>
1288 * Makefile.in (OBS): Add signals-state-save-restore.o.
1289 (signals-state-save-restore.o): New rule.
1290 * config.in: Regenerate.
1291 * configure: Regenerate.
1292 * linux-low.c: Include "signals-state-save-restore.h".
1293 (linux_create_inferior): Call
1294 restore_original_signals_state.
1295 * server.c: Include "dispositions-save-restore.h".
1296 (captured_main): Call save_original_signals_state.
1298 2016-08-05 Pedro Alves <palves@redhat.com>
1300 * configure: Regenerate.
1302 2016-08-04 Yao Qi <yao.qi@linaro.org>
1304 * linux-low.c (regsets_fetch_inferior_registers): Check
1305 errno is ESRCH or not.
1307 2016-08-02 Yao Qi <yao.qi@linaro.org>
1309 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1310 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1311 (thread_db_load_search): Update.
1312 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1313 td_ta_set_event and td_ta_event_getmsg.
1315 2016-07-26 Pedro Alves <palves@redhat.com>
1318 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1319 of unsigned long for 64-bit registers and use uint32_t instead of
1320 unsigned int for 32-bit registers.
1322 2016-07-26 Pedro Alves <palves@redhat.com>
1324 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1327 2016-07-21 Tom Tromey <tom@tromey.com>
1329 * configure: Rebuild.
1331 2016-07-21 Yao Qi <yao.qi@linaro.org>
1333 * mem-break.c (find_gdb_breakpoint): Cast bp to
1334 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1336 2016-07-21 Yao Qi <yao.qi@linaro.org>
1338 * server.c (handle_v_requests): Support s and S actions
1339 if target_supports_software_single_step return true.
1341 2016-07-21 Yao Qi <yao.qi@linaro.org>
1343 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1344 is resume_step, call maybe_hw_step.
1345 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1347 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1349 (proceed_one_lwp): If resume request is resume_step, install
1350 reinsert breakpoints and call maybe_hw_step.
1352 2016-07-21 Yao Qi <yao.qi@linaro.org>
1354 * linux-low.c (proceed_one_lwp): Declare.
1355 (linux_resume_one_thread): Remove local variable 'step'.
1356 Lift code enqueue signal. Call proceed_one_lwp instead of
1357 linux_resume_one_lwp.
1359 2016-07-21 Yao Qi <yao.qi@linaro.org>
1361 * linux-low.c (linux_resume_one_thread): Call
1362 enqueue_pending_signal.
1364 2016-07-21 Yao Qi <yao.qi@linaro.org>
1366 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1367 * inferiors.c (do_restore_current_thread_cleanup): New function.
1368 (make_cleanup_restore_current_thread): Likewise.
1369 * linux-low.c (install_software_single_step_breakpoints): Call
1370 make_cleanup_restore_current_thread. Switch current_thread to
1373 2016-07-21 Yao Qi <yao.qi@linaro.org>
1375 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1376 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1377 (clone_one_breakpoint): Likewise.
1378 (delete_reinsert_breakpoints): Change parameter to thread.
1380 (has_reinsert_breakpoints): Likewise.
1381 (uninsert_reinsert_breakpoints): Likewise.
1382 (reinsert_reinsert_breakpoints): Likewise.
1383 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1384 (delete_reinsert_breakpoints): Likewise.
1385 (reinsert_reinsert_breakpoints): Likewise.
1386 (uninsert_reinsert_breakpoints): Likewise.
1387 (has_reinsert_breakpoints): Likewise.
1389 2016-07-21 Yao Qi <yao.qi@linaro.org>
1391 * inferiors.c (get_thread_process): Make parameter const.
1392 * inferiors.h (get_thread_process): Update declaration.
1393 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1394 Add new parameters child_thread and parent_thread. Callers
1396 * mem-break.h (clone_all_breakpoints): Update declaration.
1398 2016-07-21 Yao Qi <yao.qi@linaro.org>
1400 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1401 <command_list, handler>: Remove.
1402 (struct gdb_breakpoint): New.
1403 (struct other_breakpoint): New.
1404 (struct reinsert_breakpoint): New.
1405 (is_gdb_breakpoint): New function.
1406 (any_persistent_commands): Update command_list if
1407 is_gdb_breakpoint returns true.
1408 (set_breakpoint): Create breakpoints according to their types.
1409 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1410 (set_gdb_breakpoint_1): Likewise.
1411 (set_gdb_breakpoint): Likewise.
1412 (clear_breakpoint_conditions): Change parameter type to
1413 'struct gdb_breakpoint *'.
1414 (clear_breakpoint_commands): Likewise.
1415 (clear_breakpoint_conditions_and_commands): Likewise.
1416 (add_condition_to_breakpoint): Likewise.
1417 (add_breakpoint_condition): Likewise.
1418 (add_commands_to_breakpoint): Likewise.
1419 (check_breakpoints): Check other_breakpoint.
1420 (clone_one_breakpoint): Clone breakpopint according to its type.
1421 * mem-break.h (struct gdb_breakpoint): Declare.
1422 (set_gdb_breakpoint): Update declaration.
1423 (clear_breakpoint_conditions_and_commands): Likewise.
1424 (add_breakpoint_condition): Likewise.
1425 (add_breakpoint_commands): Likewise.
1426 * server.c (process_point_options): Change parameter type to
1427 'struct gdb_breakpoint *'.
1429 2016-07-21 Yao Qi <yao.qi@linaro.org>
1431 * mem-break.c (set_breakpoint_at): Rename it to ...
1432 (set_breakpoint_type_at): ... it.
1433 (set_breakpoint_at): Call set_breakpoint_type_at.
1434 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1435 * mem-break.h (set_breakpoint_at): Update comments.
1437 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1439 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1441 (nios2_store_gregset): Likewise.
1443 2016-07-01 Pedro Alves <palves@redhat.com>
1444 Antoine Tremblay <antoine.tremblay@ericsson.com>
1446 * linux-low.c: Change interface to take the target lwp_info
1447 pointer directly and return void. Handle detaching from a zombie
1449 (linux_detach_lwp_callback): New function.
1450 (linux_detach): Detach from the leader thread after detaching from
1453 2016-06-28 Yao Qi <yao.qi@linaro.org>
1455 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1456 for variable new_offset.
1457 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1458 (aarch64_ftrace_insn_reloc_cb): Likewise.
1459 (aarch64_ftrace_insn_reloc_tb): Likewise.
1460 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1461 PRIx64 instead of PRIx32.
1463 2016-06-28 Yao Qi <yao.qi@linaro.org>
1465 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1466 (the_low_target): Install arm_get_syscall_trapinfo.
1468 2016-06-28 Yao Qi <yao.qi@linaro.org>
1470 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1472 (the_low_target): Install aarch64_get_syscall_trapinfo.
1474 2016-06-28 Yao Qi <yao.qi@linaro.org>
1476 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1478 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1479 Remove parameter sysno.
1480 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1483 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1485 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1486 (s390_emit_ne_goto): Likewise.
1487 (s390_emit_lt_goto): Likewise.
1488 (s390_emit_le_goto): Likewise.
1489 (s390_emit_gt_goto): Likewise.
1490 (s390_emit_ge_goto): Likewise.
1491 (s390x_emit_eq_goto): Likewise.
1492 (s390x_emit_ne_goto): Likewise.
1493 (s390x_emit_lt_goto): Likewise.
1494 (s390x_emit_le_goto): Likewise.
1495 (s390x_emit_gt_goto): Likewise.
1496 (s390x_emit_ge_goto): Likewise.
1497 (s390_emit_ops_impl): Mark variable static.
1498 (s390x_emit_ops): Likewise.
1500 2016-06-17 Yao Qi <yao.qi@linaro.org>
1502 * linux-low.c (handle_extended_wait): Call
1503 uninsert_reinsert_breakpoints for the parent process. Remove
1504 reinsert breakpoints from the child process. Reinsert them to
1505 the parent process when vfork is done.
1506 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1507 (reinsert_reinsert_breakpoints): New function.
1508 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1509 (reinsert_reinsert_breakpoints): Declare.
1511 2016-06-17 Yao Qi <yao.qi@linaro.org>
1513 * linux-low.c (handle_extended_wait): If the parent is doing
1514 step-over, remove the reinsert breakpoints from the forked child.
1516 2016-06-17 Yao Qi <yao.qi@linaro.org>
1518 * linux-low.c (unsuspend_all_lwps): Declare.
1519 (linux_low_filter_event): If thread exited, call finish_step_over.
1520 If step-over is finished, unsuspend other threads.
1522 2016-06-17 Yao Qi <yao.qi@linaro.org>
1524 * linux-low.c (linux_resume_one_lwp_throw): Assert
1525 has_reinsert_breakpoints returns false.
1526 * mem-break.c (delete_disabled_breakpoints): Assert
1527 bp type isn't reinsert_breakpoint.
1529 2016-06-17 Yao Qi <yao.qi@linaro.org>
1531 * linux-low.c (maybe_hw_step): New function.
1532 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1533 (finish_step_over): Switch current_thread to lwp temporarily,
1534 and assert has_reinsert_breakpoints returns true.
1535 (proceed_one_lwp): Call maybe_hw_step.
1536 * mem-break.c (has_reinsert_breakpoints): New function.
1537 * mem-break.h (has_reinsert_breakpoints): Declare.
1539 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1541 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1543 2016-05-17 Yao Qi <yao.qi@linaro.org>
1545 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1546 instead of find_inferior.
1548 2016-05-05 Yao Qi <yao.qi@linaro.org>
1550 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1551 Initialize res to zero.
1553 2016-05-05 Yao Qi <yao.qi@linaro.org>
1555 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1558 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1560 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1561 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1562 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1564 2016-04-28 Par Olsson <par.olsson@windriver.com>
1565 Simon Marchi <simon.marchi@ericsson.com>
1567 * tracepoint.c (write_inferior_int8): New function.
1568 (cmd_qtenable_disable): Write enable flag using
1569 write_inferior_int8.
1571 2016-04-25 Yao Qi <yao.qi@linaro.org>
1573 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1574 (need_step_over_p): Return zero if the LWP has pending signals
1575 can be delivered on software single step target.
1577 2016-04-25 Yao Qi <yao.qi@linaro.org>
1579 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1580 return instead of error.
1582 2016-04-22 Yao Qi <yao.qi@linaro.org>
1584 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1587 2016-04-22 Yao Qi <yao.qi@linaro.org>
1589 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1590 signal when stepping over breakpoint with software single
1593 2016-04-21 Pedro Alves <palves@redhat.com>
1595 * linux-s390-low.c (s390_collect_ptrace_register)
1596 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1598 (s390_check_regset): Use void * instead of gdb_byte *.
1600 2016-04-20 Pedro Alves <palves@redhat.com>
1602 * configure: Renegerate.
1604 2016-04-20 Yao Qi <yao.qi@linaro.org>
1606 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1607 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1609 (arm_store_gregset): Likewise.
1611 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1613 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1614 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1615 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1616 (amd64-avx-mpx-linux.c): New rules.
1617 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1618 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1619 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1620 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1621 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1622 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1623 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1624 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1625 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1626 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1627 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1628 * linux-x86-low.c (x86_linux_read_description): Add case for
1629 X86_XSTATE_AVX_MPX_MASK.
1630 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1631 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1632 init_registers_i386_avx_mpx_linux.
1633 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1634 (initialize_low_tracepoint): Call
1635 init_registers_i386_avx_mpx_linux.
1636 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1637 (initialize_low_tracepoint): Call
1638 init_registers_amd64_avx_mpx_linux.
1639 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1640 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1641 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1644 2016-04-18 Pedro Alves <palves@redhat.com>
1646 * configure: Regenerate.
1648 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1650 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1651 (aarch64_emit_sub): Likewise.
1653 2016-04-12 Pedro Alves <palves@redhat.com>
1655 * utils.c (prepare_to_throw_exception): Delete.
1657 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1659 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1661 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1663 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1665 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1667 * linux-aarch64-ipa.c: Add <elf.h> include.
1668 * linux-ppc-ipa.c: Add <elf.h> include.
1669 * linux-s390-ipa.c: Add <elf.h> include.
1671 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1673 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1674 (get_raw_reg_ptr): Likewise.
1675 (get_trace_state_variable_value_ptr): Likewise.
1676 (set_trace_state_variable_value_ptr): Likewise.
1677 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1680 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1681 Marcin Kościelnicki <koriakin@0x04.net>
1684 * linux-ppc-low.c (emit_insns): New function.
1685 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1686 (ppc_emit_prologue): New function.
1687 (ppc_emit_epilogue): New function.
1688 (ppc_emit_add): New function.
1689 (ppc_emit_sub): New function.
1690 (ppc_emit_mul): New function.
1691 (ppc_emit_lsh): New function.
1692 (ppc_emit_rsh_signed): New function.
1693 (ppc_emit_rsh_unsigned): New function.
1694 (ppc_emit_ext): New function.
1695 (ppc_emit_zero_ext): New function.
1696 (ppc_emit_log_not): New function.
1697 (ppc_emit_bit_and): New function.
1698 (ppc_emit_bit_or): New function.
1699 (ppc_emit_bit_xor): New function.
1700 (ppc_emit_bit_not): New function.
1701 (ppc_emit_equal): New function.
1702 (ppc_emit_less_signed): New function.
1703 (ppc_emit_less_unsigned): New function.
1704 (ppc_emit_ref): New function.
1705 (ppc_emit_const): New function.
1706 (ppc_emit_reg): New function.
1707 (ppc_emit_pop): New function.
1708 (ppc_emit_stack_flush): New function.
1709 (ppc_emit_swap): New function.
1710 (ppc_emit_stack_adjust): New function.
1711 (ppc_emit_call): New function.
1712 (ppc_emit_int_call_1): New function.
1713 (ppc_emit_void_call_2): New function.
1714 (ppc_emit_if_goto): New function.
1715 (ppc_emit_goto): New function.
1716 (ppc_emit_eq_goto): New function.
1717 (ppc_emit_ne_goto): New function.
1718 (ppc_emit_lt_goto): New function.
1719 (ppc_emit_le_goto): New function.
1720 (ppc_emit_gt_goto): New function.
1721 (ppc_emit_ge_goto): New function.
1722 (ppc_write_goto_address): New function.
1723 (ppc_emit_ops_impl): New static variable.
1724 (ppc64v1_emit_prologue): New function.
1725 (ppc64v2_emit_prologue): New function.
1726 (ppc64_emit_epilogue): New function.
1727 (ppc64_emit_add): New function.
1728 (ppc64_emit_sub): New function.
1729 (ppc64_emit_mul): New function.
1730 (ppc64_emit_lsh): New function.
1731 (ppc64_emit_rsh_signed): New function.
1732 (ppc64_emit_rsh_unsigned): New function.
1733 (ppc64_emit_ext): New function.
1734 (ppc64_emit_zero_ext): New function.
1735 (ppc64_emit_log_not): New function.
1736 (ppc64_emit_bit_and): New function.
1737 (ppc64_emit_bit_or): New function.
1738 (ppc64_emit_bit_xor): New function.
1739 (ppc64_emit_bit_not): New function.
1740 (ppc64_emit_equal): New function.
1741 (ppc64_emit_less_signed): New function.
1742 (ppc64_emit_less_unsigned): New function.
1743 (ppc64_emit_ref): New function.
1744 (ppc64_emit_const): New function.
1745 (ppc64v1_emit_reg): New function.
1746 (ppc64v2_emit_reg): New function.
1747 (ppc64_emit_pop): New function.
1748 (ppc64_emit_stack_flush): New function.
1749 (ppc64_emit_swap): New function.
1750 (ppc64v1_emit_call): New function.
1751 (ppc64v2_emit_call): New function.
1752 (ppc64v1_emit_int_call_1): New function.
1753 (ppc64v2_emit_int_call_1): New function.
1754 (ppc64v1_emit_void_call_2): New function.
1755 (ppc64v2_emit_void_call_2): New function.
1756 (ppc64_emit_if_goto): New function.
1757 (ppc64_emit_eq_goto): New function.
1758 (ppc64_emit_ne_goto): New function.
1759 (ppc64_emit_lt_goto): New function.
1760 (ppc64_emit_le_goto): New function.
1761 (ppc64_emit_gt_goto): New function.
1762 (ppc64_emit_ge_goto): New function.
1763 (ppc64v1_emit_ops_impl): New static variable.
1764 (ppc64v2_emit_ops_impl): New static variable.
1765 (ppc_emit_ops): New function.
1766 (linux_low_target): Wire in ppc_emit_ops.
1768 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1769 Marcin Kościelnicki <koriakin@0x04.net>
1772 * Makefile.in: Add powerpc-*-ipa.o
1773 * configure.srv: Add ipa_obj for powerpc*-linux.
1774 * linux-ppc-ipa.c: New file.
1775 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1777 (PPC_FIELD): New macro.
1778 (PPC_SEXT): New macro.
1779 (PPC_OP6): New macro.
1780 (PPC_BO): New macro.
1781 (PPC_LI): New macro.
1782 (PPC_BD): New macro.
1783 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1784 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1785 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1786 (ppc_get_thread_area): New function.
1787 (is_elfv2_inferior): New function.
1788 (gen_ds_form): New function.
1789 (GEN_STD): New macro.
1790 (GEN_STDU): New macro.
1791 (GEN_LD): New macro.
1792 (GEN_LDU): New macro.
1793 (gen_d_form): New function.
1794 (GEN_ADDI): New macro.
1795 (GEN_ADDIS): New macro.
1796 (GEN_LI): New macro.
1797 (GEN_LIS): New macro.
1798 (GEN_ORI): New macro.
1799 (GEN_ORIS): New macro.
1800 (GEN_LWZ): New macro.
1801 (GEN_STW): New macro.
1802 (GEN_STWU): New macro.
1803 (gen_xfx_form): New function.
1804 (GEN_MFSPR): New macro.
1805 (GEN_MTSPR): New macro.
1806 (GEN_MFCR): New macro.
1807 (GEN_MTCR): New macro.
1808 (GEN_SYNC): New macro.
1809 (GEN_LWSYNC): New macro.
1810 (gen_x_form): New function.
1811 (GEN_OR): New macro.
1812 (GEN_MR): New macro.
1813 (GEN_LWARX): New macro.
1814 (GEN_STWCX): New macro.
1815 (GEN_CMPW): New macro.
1816 (gen_md_form): New function.
1817 (GEN_RLDICL): New macro.
1818 (GEN_RLDICR): New macro.
1819 (gen_i_form): New function.
1821 (GEN_BL): New macro.
1822 (gen_b_form): New function.
1823 (GEN_BNE): New macro.
1824 (GEN_LOAD): New macro.
1825 (GEN_STORE): New macro.
1826 (gen_limm): New function.
1827 (gen_atomic_xchg): New function.
1828 (gen_call): New function.
1829 (ppc_relocate_instruction): New function.
1830 (ppc_install_fast_tracepoint_jump_pad): New function.
1831 (ppc_get_min_fast_tracepoint_insn_len): New function.
1832 (ppc_get_ipa_tdesc_idx): New function.
1833 (the_low_target): Wire in the new functions.
1834 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1836 * linux-ppc-tdesc.h: New file.
1838 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1840 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1841 (alloc_jump_pad_buffer): New function.
1842 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1843 (alloc_jump_pad_buffer): New function.
1844 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1845 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1846 (alloc_jump_pad_buffer): New function.
1847 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1848 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1849 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1850 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1852 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1854 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1855 * linux-amd64-ipa.c: Likewise.
1856 * linux-i386-ipa.c: Likewise.
1857 * linux-s390-ipa.c: Likewise.
1858 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1859 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1860 set_trace_state_variable_value_ptr.
1861 (struct ipa_sym_addresses): Likewise.
1862 (symbol_list): Likewise.
1863 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1864 accessing gdb_collect directly.
1865 (gdb_collect_ptr_type): New typedef.
1866 (get_raw_reg_ptr_type): New typedef.
1867 (get_trace_state_variable_value_ptr_type): New typedef.
1868 (set_trace_state_variable_value_ptr_type): New typedef.
1869 (gdb_collect_ptr): New global.
1870 (get_raw_reg_ptr): New global.
1871 (get_trace_state_variable_value_ptr): New global.
1872 (set_trace_state_variable_value_ptr): New global.
1873 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1874 accessing get_raw_reg directly.
1875 (get_get_tsv_func_addr): Likewise for
1876 get_trace_state_variable_value_ptr.
1877 (get_set_tsv_func_addr): Likewise for
1878 set_trace_state_variable_value_ptr.
1879 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1881 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1883 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1885 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1887 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1889 (relocate_instruction): Remove own_buf.
1890 * server.c (own_buf): Make global.
1891 (handle_v_requests): Make global.
1892 * server.h (own_buf): New declaration.
1893 (handle_v_requests): New prototype.
1895 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1898 * linux-s390-low.c (add_insns): New function.
1899 (s390_emit_prologue): New function.
1900 (s390_emit_epilogue): New function.
1901 (s390_emit_add): New function.
1902 (s390_emit_sub): New function.
1903 (s390_emit_mul): New function.
1904 (s390_emit_lsh): New function.
1905 (s390_emit_rsh_signed): New function.
1906 (s390_emit_rsh_unsigned): New function.
1907 (s390_emit_ext): New function.
1908 (s390_emit_log_not): New function.
1909 (s390_emit_bit_and): New function.
1910 (s390_emit_bit_or): New function.
1911 (s390_emit_bit_xor): New function.
1912 (s390_emit_bit_not): New function.
1913 (s390_emit_equal): New function.
1914 (s390_emit_less_signed): New function.
1915 (s390_emit_less_unsigned): New function.
1916 (s390_emit_ref): New function.
1917 (s390_emit_if_goto): New function.
1918 (s390_emit_goto): New function.
1919 (s390_write_goto_address): New function.
1920 (s390_emit_litpool): New function.
1921 (s390_emit_const): New function.
1922 (s390_emit_call): New function.
1923 (s390_emit_reg): New function.
1924 (s390_emit_pop): New function.
1925 (s390_emit_stack_flush): New function.
1926 (s390_emit_zero_ext): New function.
1927 (s390_emit_swap): New function.
1928 (s390_emit_stack_adjust): New function.
1929 (s390_emit_set_r2): New function.
1930 (s390_emit_int_call_1): New function.
1931 (s390_emit_void_call_2): New function.
1932 (s390_emit_eq_goto): New function.
1933 (s390_emit_ne_goto): New function.
1934 (s390_emit_lt_goto): New function.
1935 (s390_emit_le_goto): New function.
1936 (s390_emit_gt_goto): New function.
1937 (s390_emit_ge_goto): New function.
1938 (s390x_emit_prologue): New function.
1939 (s390x_emit_epilogue): New function.
1940 (s390x_emit_add): New function.
1941 (s390x_emit_sub): New function.
1942 (s390x_emit_mul): New function.
1943 (s390x_emit_lsh): New function.
1944 (s390x_emit_rsh_signed): New function.
1945 (s390x_emit_rsh_unsigned): New function.
1946 (s390x_emit_ext): New function.
1947 (s390x_emit_log_not): New function.
1948 (s390x_emit_bit_and): New function.
1949 (s390x_emit_bit_or): New function.
1950 (s390x_emit_bit_xor): New function.
1951 (s390x_emit_bit_not): New function.
1952 (s390x_emit_equal): New function.
1953 (s390x_emit_less_signed): New function.
1954 (s390x_emit_less_unsigned): New function.
1955 (s390x_emit_ref): New function.
1956 (s390x_emit_if_goto): New function.
1957 (s390x_emit_const): New function.
1958 (s390x_emit_call): New function.
1959 (s390x_emit_reg): New function.
1960 (s390x_emit_pop): New function.
1961 (s390x_emit_stack_flush): New function.
1962 (s390x_emit_zero_ext): New function.
1963 (s390x_emit_swap): New function.
1964 (s390x_emit_stack_adjust): New function.
1965 (s390x_emit_int_call_1): New function.
1966 (s390x_emit_void_call_2): New function.
1967 (s390x_emit_eq_goto): New function.
1968 (s390x_emit_ne_goto): New function.
1969 (s390x_emit_lt_goto): New function.
1970 (s390x_emit_le_goto): New function.
1971 (s390x_emit_gt_goto): New function.
1972 (s390x_emit_ge_goto): New function.
1973 (s390_emit_ops): New function.
1974 (struct linux_target_ops): Fill in emit_ops hook.
1976 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1979 * Makefile.in: Add s390 IPA files.
1980 * configure.srv: Build IPA for s390.
1981 * linux-s390-ipa.c: New file.
1982 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1983 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1984 (tdesc_s390_linux32): Likewise.
1985 (init_registers_s390_linux32v1): Likewise.
1986 (tdesc_s390_linux32v1): Likewise.
1987 (init_registers_s390_linux32v2): Likewise.
1988 (tdesc_s390_linux32v2): Likewise.
1989 (init_registers_s390_linux64): Likewise.
1990 (tdesc_s390_linux64): Likewise.
1991 (init_registers_s390_linux64v1): Likewise.
1992 (tdesc_s390_linux64v1): Likewise.
1993 (init_registers_s390_linux64v2): Likewise.
1994 (tdesc_s390_linux64v2): Likewise.
1995 (init_registers_s390_te_linux64): Likewise.
1996 (tdesc_s390_te_linux64): Likewise.
1997 (init_registers_s390_vx_linux64): Likewise.
1998 (tdesc_s390_vx_linux64): Likewise.
1999 (init_registers_s390_tevx_linux64): Likewise.
2000 (tdesc_s390_tevx_linux64): Likewise.
2001 (init_registers_s390x_linux64): Likewise.
2002 (tdesc_s390x_linux64): Likewise.
2003 (init_registers_s390x_linux64v1): Likewise.
2004 (tdesc_s390x_linux64v1): Likewise.
2005 (init_registers_s390x_linux64v2): Likewise.
2006 (tdesc_s390x_linux64v2): Likewise.
2007 (init_registers_s390x_te_linux64): Likewise.
2008 (tdesc_s390x_te_linux64): Likewise.
2009 (init_registers_s390x_vx_linux64): Likewise.
2010 (tdesc_s390x_vx_linux64): Likewise.
2011 (init_registers_s390x_tevx_linux64): Likewise.
2012 (tdesc_s390x_tevx_linux64): Likewise.
2013 (have_hwcap_s390_vx): New static variable.
2014 (s390_arch_setup): Fill have_hwcap_s390_vx.
2015 (s390_get_thread_area): New function.
2016 (s390_ft_entry_gpr_esa): New const.
2017 (s390_ft_entry_gpr_zarch): New const.
2018 (s390_ft_entry_misc): New const.
2019 (s390_ft_entry_fr): New const.
2020 (s390_ft_entry_vr): New const.
2021 (s390_ft_main_31): New const.
2022 (s390_ft_main_64): New const.
2023 (s390_ft_exit_fr): New const.
2024 (s390_ft_exit_vr): New const.
2025 (s390_ft_exit_misc): New const.
2026 (s390_ft_exit_gpr_esa): New const.
2027 (s390_ft_exit_gpr_zarch): New const.
2028 (append_insns): New function.
2029 (s390_relocate_instruction): New function.
2030 (s390_install_fast_tracepoint_jump_pad): New function.
2031 (s390_get_min_fast_tracepoint_insn_len): New function.
2032 (s390_get_ipa_tdesc_idx): New function.
2033 (struct linux_target_ops): Wire in the above functions.
2034 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2035 * linux-s390-tdesc.h: New file.
2037 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2039 * linux-s390-low.c (s390_supports_tracepoints): New function.
2040 (struct linux_target_ops): Fill supports_tracepoints hook.
2042 2016-03-18 Yao Qi <yao.qi@linaro.org>
2044 * linux-low.c (lwp_signal_can_be_delivered): New function.
2045 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2047 2016-03-18 Yao Qi <yao.qi@linaro.org>
2049 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2050 0 if signal is enqueued. Remove 'signal' from one debugging
2051 message. Move one debugging message to some lines below.
2052 Remove code setting 'signal' to 0.
2054 2016-03-18 Yao Qi <yao.qi@linaro.org>
2056 * linux-low.c (linux_low_filter_event): Remove redundant
2057 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2059 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2061 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2062 (struct linux_target_ops): Wire in the above.
2064 2016-03-03 Yao Qi <yao.qi@linaro.org>
2066 * linux-low.c: Update comments to start_step_over.
2068 2016-03-03 Yao Qi <yao.qi@linaro.org>
2071 * linux-low.c (handle_extended_wait): Set child suspended
2072 if event_lwp->bp_reinsert isn't zero.
2074 2016-03-02 Yao Qi <yao.qi@linaro.org>
2076 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2077 enqueue_pending_signal.
2079 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2081 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2084 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2086 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2087 (s390_regmap_3264) [!__s390x__]: New global.
2088 (s390_collect_ptrace_register): Skip map entries containing -1.
2089 (s390_supply_ptrace_register): Ditto.
2090 (s390_fill_gprs_high): New function.
2091 (s390_store_gprs_high): New function.
2092 (s390_regsets): Add NT_S390_HIGH_GPRS.
2093 (s390_get_hwcap): Enable on 31-bit.
2094 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2095 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2096 Detect NT_S390_HIGH_GPRS.
2097 (s390_usrregs_info_3264): Enable on 31-bit.
2098 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2099 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2101 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2104 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2105 * configure.srv: Ditto.
2106 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2107 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2108 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2109 (init_registers_amd64_linux): Remove prototype.
2110 (tdesc_amd64_linux): Remove declaration.
2111 (get_ipa_tdesc): New function.
2112 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2113 initialize remaining tdescs.
2114 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2115 (init_registers_i386_linux): Remove prototype.
2116 (tdesc_i386_linux): Remove declaration.
2117 (get_ipa_tdesc): New function.
2118 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2119 initialize remaining tdescs.
2120 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2121 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2122 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2123 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2124 (x86_get_ipa_tdesc_idx): New function.
2125 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2126 * linux-x86-tdesc.h: New file.
2127 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2128 (target_get_ipa_tdesc_idx): New macro.
2129 * tracepoint.c (ipa_tdesc_idx): New macro.
2130 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2131 (symbol_list): Add ipa_tdesc_idx.
2132 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2133 (ipa_tdesc): Remove.
2134 (ipa_tdesc_idx): New variable.
2135 (get_context_regcache): Use get_ipa_tdesc.
2136 (gdb_collect): Ditto.
2138 * tracepoint.h (get_ipa_tdesc): New prototype.
2139 (ipa_tdesc): Remove.
2141 2016-02-24 Pedro Alves <palves@redhat.com>
2143 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2144 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2145 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2146 Factor out common code between the USE_SIGTRAP_SIGINFO and
2147 !USE_SIGTRAP_SIGINFO blocks.
2148 (linux_low_filter_event): Call save_stop_reason instead of
2149 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2151 (linux_wait_1): Update comments.
2153 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2155 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2156 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2157 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2158 ppc_insert_point, ppc_remove_point.
2160 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2162 * linux-s390-low.c (s390_supports_z_point_type): New function.
2163 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2165 2016-02-16 Yao Qi <yao.qi@linaro.org>
2167 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2168 PC. Get pc from regcache_read_pc.
2170 2016-02-12 Yao Qi <yao.qi@linaro.org>
2172 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2173 or linux_get_pc_32bit.
2174 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2176 2016-02-12 Yao Qi <yao.qi@linaro.org>
2178 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2179 arm_linux_get_next_pcs_fixup.
2181 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2183 * tracepoint.c (x_tracepoint_action_download): Change
2184 write_inferior_data_ptr to write_inferior_data_pointer.
2185 (cmd_qtstart): Likewise.
2186 (write_inferior_data_ptr): Remove.
2187 (download_agent_expr): Change write_inferior_data_ptr to
2188 write_inferior_data_pointer.
2189 (download_tracepoint_1): Likewise.
2190 (download_tracepoint): Likewise.
2191 (download_trace_state_variables): Likewise.
2193 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2194 Marcin Kościelnicki <koriakin@0x04.net>
2196 * tracepoint.c (struct tracepoint_action_ops): Remove.
2197 (struct tracepoint_action): Remove ops.
2198 (m_tracepoint_action_download, r_tracepoint_action_download)
2199 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2200 size and offset accordingly.
2201 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2202 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2203 (tracepoint_action_send, tracepoint_action_download): New functions.
2204 Helpers for trace action handlers.
2205 (add_tracepoint_action): Remove setup actions ops.
2206 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2208 2016-02-10 Yao Qi <yao.qi@linaro.org>
2210 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2212 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2214 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2216 * configure: Regenerate.
2218 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2220 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2221 void * to gdb_byte *.
2222 * linux-low.c (siginfo_fixup): Likewise.
2223 (linux_xfer_siginfo): Likewise.
2224 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2226 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2228 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2230 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2232 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2234 * linux-x86-low.c [__x86_64__]: Include
2235 "nat/amd64-linux-siginfo.h".
2236 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2237 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2238 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2239 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2240 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2241 (cpt_si_fd, si_timerid, si_overrun): Move from
2242 nat/amd64-linux-siginfo.c.
2243 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2245 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2247 * server.c (skip_to_semicolon): Remove.
2248 (process_point_options): Use strchrnul instead of
2251 2016-01-26 Yao Qi <yao.qi@linaro.org>
2253 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2254 * linux-low.c (install_software_single_step_breakpoints): Don't
2255 call regcache_read_pc.
2256 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2259 2016-01-26 Yao Qi <yao.qi@linaro.org>
2261 * linux-low.c (install_software_single_step_breakpoints): Call
2262 regcache_read_pc instead of get_pc.
2264 2016-01-26 Yao Qi <yao.qi@linaro.org>
2266 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2267 (unblock_async_io): Rename to ...
2268 (block_unblock_async_io): ... it. New function.
2269 (enable_async_io): Don't install SIGIO handler. Unblock it
2271 (disable_async_io): Don't ignore SIGIO. Block it instead.
2272 (initialize_async_io): Install SIGIO handler. Don't call
2275 2016-01-26 Yao Qi <yao.qi@linaro.org>
2277 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2278 first character is '\003', call *the_target->request_interrupt.
2280 2016-01-25 Yao Qi <yao.qi@linaro.org>
2282 * remote-utils.c (new_thread_notify): Remove.
2283 (dead_thread_notify): Likewise.
2284 * remote-utils.h (new_thread_notify): Remove declaration.
2285 (dead_thread_notify): Likewise.
2287 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2289 * gdb.trace/pending.exp: Fix expected message on continue.
2291 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2293 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2294 it works properly on big-endian machines where sizeof (CORE_ADDR)
2297 2016-01-21 Pedro Alves <palves@redhat.com>
2299 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2300 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2301 * configure: Regenerate.
2303 2016-01-21 Yao Qi <yao.qi@linaro.org>
2305 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2306 is_thumb and set it according to CPSR saved on the stack.
2307 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2308 arm_sigreturn_next_pc.
2310 2016-01-18 Yao Qi <yao.qi@linaro.org>
2312 * linux-low.c (linux_set_pc_64bit): New function.
2313 (linux_get_pc_64bit): New function.
2314 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2316 * linux-sparc-low.c (debug_threads): Remove declaration.
2317 (sparc_get_pc): Remove.
2318 (the_low_target): Use linux_get_pc_64bit instead of
2320 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2321 (the_low_target): Use linux_get_pc_64bit and
2324 2016-01-18 Yao Qi <yao.qi@linaro.org>
2326 * linux-arm-low.c (debug_threads): Remove declaration.
2327 (arm_get_pc, arm_set_pc): Remove.
2328 (the_low_target): Use linux_get_pc_32bit and
2330 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2331 (the_low_target): Use linux_get_pc_32bit and
2333 * linux-cris-low.c (debug_threads): Remove declaration.
2334 (cris_get_pc, cris_set_pc,): Remove.
2335 (the_low_target): Use linux_get_pc_32bit and
2337 * linux-crisv32-low.c (debug_threads): Remove declaration.
2338 (cris_get_pc, cris_set_pc): Remove.
2339 (the_low_target): Use linux_get_pc_32bit and
2341 * linux-low.c: Include inttypes.h.
2342 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2343 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2344 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2345 (the_low_target): Use linux_get_pc_32bit and
2347 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2348 (the_low_target): Use linux_get_pc_32bit and
2350 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2351 (the_low_target): Use linux_get_pc_32bit and
2353 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2354 (the_low_target): Use linux_get_pc_32bit and
2356 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2357 (the_low_target): Use linux_get_pc_32bit and
2360 2016-01-18 Gary Benson <gbenson@redhat.com>
2362 * configure.ac (AC_FUNC_FORK): New check.
2363 * config.in: Regenerate.
2364 * configure: Likewise.
2366 2016-01-14 Yao Qi <yao.qi@linaro.org>
2368 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2369 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2370 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2371 arm_get_next_pcs_ctor.
2373 2016-01-12 Josh Stone <jistone@redhat.com>
2374 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2376 * inferiors.h: Include "gdb_vecs.h".
2377 (struct process_info): Add syscalls_to_catch.
2378 * inferiors.c (remove_process): Free syscalls_to_catch.
2379 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2380 syscall_return stops.
2381 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2382 * server.c (handle_general_set): Handle QCatchSyscalls.
2383 (handle_query): Report support for QCatchSyscalls.
2384 * target.h (struct target_ops): Add supports_catch_syscall.
2385 (target_supports_catch_syscall): New macro.
2386 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2387 (struct lwp_info): Add syscall_state.
2388 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2389 Maintain syscall_state and syscalls_to_catch across exec.
2390 (get_syscall_trapinfo): New function, proxy to the_low_target.
2391 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2392 (linux_low_filter_event): Toggle syscall_state entry/return for
2393 syscall traps, and set it ignored for all others.
2394 (gdb_catching_syscalls_p): New function.
2395 (gdb_catch_this_syscall_p): New function.
2396 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2397 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2398 (linux_supports_catch_syscall): New function.
2399 (linux_target_ops): Install it.
2400 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2401 (the_low_target): Install it.
2403 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2405 * acinclude.m4: Include new ../warning.m4 file.
2406 * configure: Regenerated.
2407 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2409 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2411 * ax.c (is_goto_target): Mark static.
2412 * linux-low.c (register_addr): Likewise.
2413 (linux_fetch_registers, linux_store_registers): Likewise.
2414 * mem-break.c (any_persistent_commands): Fix old prototype.
2415 (add_commands_to_breakpoint): Mark static.
2416 * regcache.c (find_register_by_name): Delete unused func.
2417 * remote-utils.c (hex_or_minus_one): Mark static.
2418 * server.c (monitor_show_help): Mark static.
2419 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2420 handle_v_requests): Likewise.
2422 2016-01-12 Pedro Alves <palves@redhat.com>
2424 Remove use of the registered trademark symbol throughout.
2426 2016-01-08 Yao Qi <yao.qi@linaro.org>
2428 * remote-utils.c (getpkt): If c is '\003', call target hook
2431 2016-01-06 Yao Qi <yao.qi@linaro.org>
2433 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2434 linux-aarch32-low.c.
2435 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2436 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2437 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2438 (thumb2_breakpoint): Declare.
2439 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2440 linux-aarch32-low.h.
2441 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2442 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2443 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2445 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2447 * gdbreplay.c (gdbreplay_version): Change copyright year in
2449 * server.c (gdbserver_version): Likewise.
2451 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2453 * server.c (crc32_table): Delete.
2454 (crc32): Use libiberty's xcrc32 function.
2456 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2458 * lynx-low.c (lynx_delete_thread_callback): New function.
2459 (lynx_mourn): Properly delete our process and all of its
2460 threads. Remove call to clear_inferiors.
2462 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2464 * target.c (thread_search_callback): Add check that
2465 the thread_stopped target callback is not NULL before
2468 2015-12-21 Yao Qi <yao.qi@linaro.org>
2470 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2473 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2475 * server.c (handle_query): Call target_supports_software_single_step.
2477 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2479 * linux-low.c (single_step): New function.
2480 (linux_resume_one_lwp_throw): Call single_step.
2481 (start_step_over): Likewise.
2483 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2485 * Makefile.in (SFILES): Append arch/arm-linux.c,
2486 arch/arm-get-next-pcs.c.
2487 (arm-linux.o): New rule.
2488 (arm-get-next-pcs.o): New rule.
2489 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2491 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2492 to linux-aarch32-low.c.
2493 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2494 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2495 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2496 (thumb2_breakpoint_len): Likewise.
2497 (arm_is_thumb_mode): Make non-static.
2498 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2499 from linux-aarch32-low.c.
2500 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2501 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2502 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2503 (thumb2_breakpoint_len): Likewise.
2504 (arm_is_thumb_mode): New declaration.
2505 * linux-arm-low.c: Include arch/arm-linux.h
2506 aarch/arm-get-next-pcs.h, sys/syscall.h.
2507 (get_next_pcs_ops): New struct.
2508 (get_next_pcs_addr_bits_remove): New function.
2509 (get_next_pcs_is_thumb): New function.
2510 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2511 (arm_sigreturn_next_pc): Likewise.
2512 (get_next_pcs_syscall_next_pc): Likewise.
2513 (arm_gdbserver_get_next_pcs): Likewise.
2514 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2516 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2517 * server.h: Include gdb_vecs.h.
2519 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2521 * Makefile.in (SFILES): Append common/common-regcache.c.
2522 (OBS): Append common-regcache.o.
2523 (common-regcache.o): New rule.
2524 * regcache.c (init_register_cache): Initialize cache to
2526 (regcache_raw_read_unsigned): New function.
2527 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2528 register_status enum.
2530 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2532 * linux-aarch64-low.c (the_low_targets): Rename
2533 breakpoint_reinsert_addr to get_next_pcs.
2534 * linux-arm-low.c (the_low_targets): Likewise.
2535 * linux-bfin-low.c (the_low_targets): Likewise.
2536 * linux-cris-low.c (the_low_targets): Likewise.
2537 * linux-crisv32-low.c (the_low_targets): Likewise.
2538 * linux-low.c (can_software_single_step): Likewise.
2539 (install_software_single_step_breakpoints): New function.
2540 (start_step_over): Use install_software_single_step_breakpoints.
2541 * linux-low.h: New CORE_ADDR vector.
2542 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2544 * linux-mips-low.c (the_low_targets): Likewise.
2545 * linux-nios2-low.c (the_low_targets): Likewise.
2546 * linux-sparc-low.c (the_low_targets): Likewise.
2548 2015-12-17 Pedro Alves <palves@redhat.com>
2550 * linux-low.c (linux_kill_one_lwp): Remove references to
2552 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2554 (linux_init_signals): Delete.
2555 (initialize_low): Adjust.
2556 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2558 2015-12-16 Pedro Alves <palves@redhat.com>
2560 * configure.ac (compiler warning flags): When testing a
2561 -Wno-foo option, check whether -Wfoo works instead.
2562 * configure: Regenerate.
2564 2015-12-11 Don Breazeal <donb@codesourcery.com>
2566 * server.c (process_serial_event): Don't exit from gdbserver
2567 in remote mode if there are still active inferiors.
2569 2015-12-11 Yao Qi <yao.qi@linaro.org>
2571 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2572 arm_breakpoint_at if the process is 32-bit.
2574 2015-12-11 Yao Qi <yao.qi@linaro.org>
2576 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2579 2015-12-07 Yao Qi <yao.qi@linaro.org>
2581 * configure.srv: Append arm.o to srv_tgtobj for
2582 aarch64*-*-linux* target.
2583 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2584 from linux-arm-low.c.
2585 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2586 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2587 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2588 (thumb2_breakpoint_len): Likewise.
2589 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2590 (arm_breakpoint_kinds): Likewise.
2591 (arm_breakpoint_kind_from_pc): Likewise.
2592 (arm_sw_breakpoint_from_kind): Likewise.
2593 (arm_breakpoint_kind_from_current_state): Likewise.
2594 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2595 (arm_sw_breakpoint_from_kind): Declare.
2596 (arm_breakpoint_kind_from_current_state): Declare.
2597 (arm_breakpoint_at): Declare.
2598 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2599 arm_sw_breakpoint_from_kind if process is 32-bit.
2600 (aarch64_breakpoint_kind_from_pc): New function.
2601 (aarch64_breakpoint_kind_from_current_state): New function.
2602 (the_low_target): Initialize fields breakpoint_kind_from_pc
2603 and breakpoint_kind_from_current_state.
2604 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2605 linux-aarch32-low.c.
2606 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2607 (arm_breakpoint, arm_breakpoint_len): Likewise.
2608 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2609 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2610 (arm_is_thumb_mode): Likewise.
2611 (arm_breakpoint_at): Likewise.
2612 (arm_breakpoint_kind_from_pc): Likewise.
2613 (arm_sw_breakpoint_from_kind): Likewise.
2614 (arm_breakpoint_kind_from_current_state): Likewise.
2617 2015-08-04 Yao Qi <yao.qi@linaro.org>
2619 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2620 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2621 * server.c (extended_protocol): Remove "static".
2622 * server.h (extended_protocol): Declare it.
2624 2015-12-04 Josh Stone <jistone@redhat.com>
2626 * target.h (struct target_ops) <arch_setup>: Rename to ...
2627 (struct target_ops) <post_create_inferior>: ... this.
2628 (target_arch_setup): Rename to ...
2629 (target_post_create_inferior): ... this, calling post_create_inferior.
2630 * server.c (start_inferior): Update target_arch_setup calls to
2631 target_post_create_inferior.
2632 * linux-low.c (linux_low_ptrace_options): Forward declare.
2633 (linux_arch_setup): Update its comment for general use.
2634 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2635 (struct linux_target_ops): Use linux_post_create_inferior.
2636 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2637 to post_create_inferior.
2638 * nto-low.c (struct nto_target_ops): Likewise.
2639 * spu-low.c (struct spu_target_ops): Likewise.
2640 * win32-low.c (struct win32_target_ops): Likewise.
2642 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2644 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2646 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2648 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2649 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2650 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2651 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2652 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2653 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2654 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2655 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2656 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2657 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2658 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2659 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2661 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2663 * linux-low.c (linux_look_up_symbols): Don't call
2664 linux_supports_traceclone.
2665 * linux-low.h (thread_db_init): Remove use_events argument.
2666 * thread-db.c (thread_db_use_event): Remove global variable.
2667 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2668 (struct thread_db) <td_create_bp>: Remove field.
2669 (thread_db_create_event): Remove function.
2670 (thread_db_enable_reporting): Likewise.
2671 (find_one_thread): Don't check for thread_db_use_events.
2672 (attach_thread): Likewise.
2673 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2674 (try_thread_db_load_1): Don't check for thread_db_use_events.
2675 (thread_db_init): Remove use_events argument and thread events
2677 (remove_thread_event_breakpoints): Remove function.
2678 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2680 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2682 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2684 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2685 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2686 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2687 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2688 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2690 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2692 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2693 * linux-low.c (can_hardware_single_step): Use
2694 supports_hardware_single_step.
2695 (can_software_single_step): New function.
2696 (start_step_over): Call can_software_single_step.
2697 (linux_supports_hardware_single_step): New function.
2698 (struct target_ops) <supports_software_single_step>: Initialize.
2699 * linux-low.h (struct linux_target_ops)
2700 <supports_hardware_single_step>: Initialize.
2701 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2702 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2703 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2704 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2705 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2706 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2707 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2708 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2709 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2710 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2712 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2713 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2715 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2716 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2717 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2719 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2720 * target.h (struct target_ops): <supports_software_single_step>:
2722 (target_supports_software_single_step): New macro.
2724 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2726 * linux-low.c (linux_wait_1): Fix pc advance condition.
2727 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2728 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2730 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2732 * linux-arm-low.c (arm_is_thumb_mode): New function.
2733 (arm_breakpoint_at): Use arm_is_thumb_mode.
2734 (arm_breakpoint_kind_from_current_state): New function.
2735 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2737 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2738 (linux_breakpoint_kind_from_current_state): New function.
2739 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2740 * linux-low.h (struct linux_target_ops)
2741 <breakpoint_kind_from_current_state>: New field.
2742 * target.h (struct target_ops): Likewise.
2743 (target_breakpoint_kind_from_current_state): New macro.
2745 2015-11-30 Pedro Alves <palves@redhat.com>
2747 * linux-low.c (linux_resume): Wake up the event loop before
2750 2015-11-30 Pedro Alves <palves@redhat.com>
2752 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2754 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2756 * target.c (struct thread_search): New structure.
2757 (thread_search_callback): New function.
2758 (prev_general_thread): New global.
2759 (prepare_to_access_memory, done_accessing_memory): New functions.
2760 * target.h (prepare_to_access_memory, done_accessing_memory):
2761 Replace macros with function declarations.
2763 2015-11-30 Pedro Alves <palves@redhat.com>
2766 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2767 report TARGET_WAITKIND_NO_RESUMED.
2768 * remote-utils.c (prepare_resume_reply): Handle
2769 TARGET_WAITKIND_NO_RESUMED.
2770 * server.c (report_no_resumed): New global.
2771 (handle_query) <qSupported>: Handle "no-resumed+". Report
2772 "no-resumed+" support.
2773 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2774 return error if the client doesn't support no-resumed events.
2775 (push_stop_notification): New function.
2776 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2777 events if the client supports them.
2779 2015-11-30 Pedro Alves <palves@redhat.com>
2781 * linux-low.c (thread_still_has_status_pending_p): Don't check
2783 (lwp_resumed): New function.
2784 (status_pending_p_callback): Return early if the LWP is not
2785 supposed to be resumed.
2787 2015-11-30 Pedro Alves <palves@redhat.com>
2789 * linux-low.c (handle_extended_wait): Assert that the LWP's
2790 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2791 thread create events, leave the new child's status pending.
2792 (linux_low_filter_event): If GDB wants to hear about thread exit
2793 events, leave the LWP marked dead and don't delete it.
2794 (linux_wait_for_event_filtered): Don't check for thread exit.
2795 (filter_exit_event): New function.
2796 (linux_wait_1): Use it, when returning an exit event.
2797 (linux_resume_one_lwp_throw): Assert that the LWP's
2798 waitstatus is TARGET_WAITKIND_IGNORE.
2799 * remote-utils.c (prepare_resume_reply): Handle
2800 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2801 * server.c (report_thread_events): New global.
2802 (handle_general_set): Handle QThreadEvents.
2803 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2804 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2805 TARGET_WAITKIND_THREAD_EXITED.
2806 * server.h (report_thread_events): Declare.
2808 2015-11-30 Pedro Alves <palves@redhat.com>
2810 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2811 the thread's last_resume_kind was resume_stop.
2813 2015-11-30 Pedro Alves <palves@redhat.com>
2815 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2818 2015-11-30 Pedro Alves <palves@redhat.com>
2820 * server.c (handle_v_requests): Handle vCtrlC.
2822 2015-11-30 Pedro Alves <palves@redhat.com>
2824 * gdbthread.h (find_any_thread_of_pid): Declare.
2825 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2827 * server.c (handle_query): If current_thread is NULL, look for
2828 another thread of the selected process.
2830 2015-11-26 Daniel Colascione <dancol@dancol.org>
2831 Simon Marchi <simon.marchi@ericsson.com>
2833 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2834 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2836 * target.h (struct target_ops) <thread_name>: New field.
2837 (target_thread_name): New macro.
2839 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2841 * regcache.h (regcache_invalidate_pid): Add declaration.
2842 * regcache.c (regcache_invalidate_pid): New function, extracted
2843 from regcache_invalidate.
2844 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2845 Add trivial documentation comment.
2846 * lynx-low.c: Use regcache_invalidate_pid instead of
2847 regcache_invalidate.
2849 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2851 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2852 and Elf64_auxv_t if the target is Android.
2854 2015-11-22 Doug Evans <xdje42@gmail.com>
2856 * target.h: #include <sys/types.h>.
2858 2015-11-19 Pedro Alves <palves@redhat.com>
2860 * linux-low.c (linux_process_qsupported): Change prototype.
2862 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2864 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2865 and adjust to loop over all features.
2866 * server.c (handle_query) <qSupported>: Adjust to call
2867 target_process_qsupported once, passing it a vector of unprocessed
2869 * target.h (struct target_ops) <process_qsupported>: Change
2871 (target_process_qsupported): Adjust.
2873 2015-11-19 Pedro Alves <palves@redhat.com>
2875 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2877 * configure: Regenerate.
2879 2015-11-19 Pedro Alves <palves@redhat.com>
2881 * configure: Regenerate.
2883 2015-11-19 Yao Qi <yao.qi@linaro.org>
2885 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2888 2015-11-19 Yao Qi <yao.qi@linaro.org>
2890 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2891 (struct aarch64_operand): Move enum out.
2893 2015-11-19 Yao Qi <yao.qi@linaro.org>
2895 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2896 struct user_fpsimd_state *.
2897 (aarch64_store_fpregset): Likewise.
2899 2015-11-19 Yao Qi <yao.qi@linaro.org>
2901 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2902 struct user_pt_regs *.
2903 (aarch64_store_gregset): Likewise.
2905 2015-11-18 Pedro Alves <palves@redhat.com>
2907 * Makefile.in (all_object_files): Add $IPA_OBJS.
2909 2015-11-17 Pedro Alves <palves@redhat.com>
2911 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2912 GDB_SIGNAL_0 and gdb_signal_to_string.
2914 2015-11-17 Pedro Alves <palves@redhat.com>
2916 * win32-low.c (handle_output_debug_string): Remove parameter.
2917 (win32_kill): Remove our_status local and adjust call to
2918 handle_output_debug_string.
2919 (get_child_debug_event): Adjust call to
2920 handle_output_debug_string.
2922 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2924 * linux-mips-low.c (mips_fill_gregset): Add cast.
2925 (mips_store_gregset): Likewise.
2926 (mips_fill_fpregset): Likewise.
2927 (mips_store_fpregset): Likewise.
2929 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2931 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2934 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2936 * linux-mips-low.c (mips_linux_new_thread): Change type of
2937 watch_type to enum target_hw_bp_type.
2939 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2941 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2942 Change return type to arm_hwbp_type.
2944 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2946 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2947 (arm_store_gregset): Likewise.
2948 * linux-arm-low.c (arm_get_hwcap): Likewise.
2949 (arm_read_description): Likewise.
2951 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2953 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2955 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2957 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2958 (ppc_fill_vsxregset): Likewise.
2959 (ppc_store_vsxregset): Likewise.
2960 (ppc_fill_vrregset): Likewise.
2961 (ppc_store_vrregset): Likewise.
2962 (ppc_fill_evrregset): Likewise.
2963 (ppc_store_evrregset): Likewise.
2965 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2967 * linux-ppc-low.c (ppc_usrregs_info): Remove
2968 forward-declaration.
2969 (ppc_arch_setup): Move lower in file.
2971 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2973 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2974 (ps_pdwrite): Likewise.
2976 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2978 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2979 to after assert checks.
2981 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2983 * proc-service.c (ps_pdread): Add/adjust casts.
2984 (ps_pdwrite): Add/adjust casts.
2986 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2988 * server.c (handle_search_memory_1): Cast return value of
2991 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2993 * server.c (write_qxfer_response): Change type of data to
2996 2015-10-29 Pedro Alves <palves@redhat.com>
2998 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3000 2015-10-29 Pedro Alves <palves@redhat.com>
3002 * tracepoint.c (clear_installed_tracepoints): Add casts.
3004 2015-10-29 Pedro Alves <palves@redhat.com>
3006 * server.c (handle_v_cont, process_serial_event): Add enum
3007 gdb_signal casts to signal parsing code.
3009 2015-10-29 Pedro Alves <palves@redhat.com>
3011 * linux-low.h (NULL_REGSET): Define.
3012 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3013 * linux-arm-low.c (arm_regsets): Likewise.
3014 * linux-crisv32-low.c (cris_regsets): Likewise.
3015 * linux-m68k-low.c (m68k_regsets): Likewise.
3016 * linux-mips-low.c (mips_regsets): Likewise.
3017 * linux-nios2-low.c (nios2_regsets): Likewise.
3018 * linux-ppc-low.c (ppc_regsets): Likewise.
3019 * linux-s390-low.c (s390_regsets): Likewise.
3020 * linux-sh-low.c (sh_regsets): Likewise.
3021 * linux-sparc-low.c (sparc_regsets): Likewise.
3022 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3023 * linux-tile-low.c (tile_regsets): Likewise.
3024 * linux-x86-low.c (x86_regsets): Likewise.
3025 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3027 2015-10-29 Pedro Alves <palves@redhat.com>
3029 * linux-low.h (NULL_REGSET): Define.
3030 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3031 * linux-arm-low.c (arm_regsets): Likewise.
3032 * linux-crisv32-low.c (cris_regsets): Likewise.
3033 * linux-m68k-low.c (m68k_regsets): Likewise.
3034 * linux-mips-low.c (mips_regsets): Likewise.
3035 * linux-nios2-low.c (nios2_regsets): Likewise.
3036 * linux-ppc-low.c (ppc_regsets): Likewise.
3037 * linux-s390-low.c (s390_regsets): Likewise.
3038 * linux-sh-low.c (sh_regsets): Likewise.
3039 * linux-sparc-low.c (sparc_regsets): Likewise.
3040 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3041 * linux-tile-low.c (tile_regsets): Likewise.
3042 * linux-x86-low.c (x86_regsets): Likewise.
3043 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3045 2015-10-26 Doug Evans <dje@google.com>
3047 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3049 2015-10-26 Doug Evans <dje@google.com>
3051 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3053 2015-10-26 Doug Evans <dje@google.com>
3055 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3057 (attach_thread, find_new_threads_callback): Ditto.
3059 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3061 * mem-break.h (set_breakpoint_data): Remove.
3063 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3065 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3066 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3067 (initialize_low): Remove set_breakpoint_data call.
3068 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3069 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3070 (initialize_low): Remove set_breakpoint_data call.
3071 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3072 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3073 (initialize_low): Remove set_breakpoint_data call.
3075 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3077 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3078 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3079 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3080 * target.h (target_breakpoint_kind_from_pc): New macro.
3082 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3084 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3085 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3086 the default breakpoint kind.
3088 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3090 * linux-arm-low.c (arm_supports_z_point_type): Add software
3093 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3095 * linux-arm-low.c: Refactor breakpoint definitions.
3096 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3097 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3099 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3101 * Makefile.in: Add arm.c/o.
3102 * configure.srv: Likewise.
3103 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3104 (arm_breakpoint_kind_from_pc): New function.
3105 (arm_sw_breakpoint_from_kind): Return proper kind.
3106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3108 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3110 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3112 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3113 (struct raw_breakpoint) <size>: Remove.
3114 (struct raw_breakpoint) <kind>: Add.
3115 (bp_size): New function.
3116 (bp_opcode): Likewise.
3117 (find_raw_breakpoint_at): Adjust for kind.
3118 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3119 (remove_memory_breakpoint): Adjust for kind call bp_size.
3120 (set_raw_breakpoint_at): Adjust for kind.
3121 (set_breakpoint): Likewise.
3122 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3123 (delete_raw_breakpoint): Adjust for kind.
3124 (delete_breakpoint): Likewise.
3125 (find_gdb_breakpoint): Likewise.
3126 (set_gdb_breakpoint_1): Likewise.
3127 (set_gdb_breakpoint): Likewise.
3128 (delete_gdb_breakpoint_1): Likewise.
3129 (delete_gdb_breakpoint): Likewise.
3130 (uninsert_raw_breakpoint): Likewise.
3131 (reinsert_raw_breakpoint): Likewise.
3132 (set_breakpoint_data): Remove.
3133 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3134 (check_mem_read): Adjust for kind call bp_size.
3135 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3136 (clone_one_breakpoint): Adjust for kind.
3137 * mem-break.h (set_gdb_breakpoint): Likewise.
3138 (delete_gdb_breakpoint): Likewise.
3139 * server.c (process_serial_event): Likewise.
3141 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3143 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3144 (struct linux_target_ops) <breakpoint>: Remove.
3145 (struct linux_target_ops) <breakpoint_len>: Remove.
3146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3148 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3149 (arm_sw_breakpoint_from_kind): New function.
3150 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3151 (struct linux_target_ops) <breakpoint>: Remove.
3152 (struct linux_target_ops) <breakpoint_len>: Remove.
3153 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3154 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3155 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3156 (struct linux_target_ops) <breakpoint>: Remove.
3157 (struct linux_target_ops) <breakpoint_len>: Remove.
3158 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3159 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3160 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3161 (struct linux_target_ops) <breakpoint>: Remove.
3162 (struct linux_target_ops) <breakpoint_len>: Remove.
3163 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3164 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3165 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3166 and sw_breakpoint_from_kind to increment the pc.
3167 (linux_breakpoint_kind_from_pc): New function.
3168 (linux_sw_breakpoint_from_kind): New function.
3169 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3170 (initialize_low): Call breakpoint_kind_from_pc and
3171 sw_breakpoint_from_kind to replace breakpoint_data/len.
3172 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3175 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3176 (struct linux_target_ops) <breakpoint>: Remove.
3177 (struct linux_target_ops) <breakpoint_len>: Remove.
3178 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3179 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3180 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3181 (struct linux_target_ops) <breakpoint>: Remove.
3182 (struct linux_target_ops) <breakpoint_len>: Remove.
3183 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3184 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3185 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3186 (struct linux_target_ops) <breakpoint>: Remove.
3187 (struct linux_target_ops) <breakpoint_len>: Remove.
3188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3190 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3191 (struct linux_target_ops) <breakpoint>: Remove.
3192 (struct linux_target_ops) <breakpoint_len>: Remove.
3193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3195 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3196 (struct linux_target_ops) <breakpoint>: Remove.
3197 (struct linux_target_ops) <breakpoint_len>: Remove.
3198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3200 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3201 (struct linux_target_ops) <breakpoint>: Remove.
3202 (struct linux_target_ops) <breakpoint_len>: Remove.
3203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3205 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3206 (struct linux_target_ops) <breakpoint>: Remove.
3207 (struct linux_target_ops) <breakpoint_len>: Remove.
3208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3210 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3211 (struct linux_target_ops) <breakpoint>: Remove.
3212 (struct linux_target_ops) <breakpoint_len>: Remove.
3213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3215 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3216 (struct linux_target_ops) <breakpoint>: Remove.
3217 (struct linux_target_ops) <breakpoint_len>: Remove.
3218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3220 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3221 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3222 (struct linux_target_ops) <breakpoint>: Remove.
3223 (struct linux_target_ops) <breakpoint_len>: Remove.
3224 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3225 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3226 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3227 (struct linux_target_ops) <breakpoint>: Remove.
3228 (struct linux_target_ops) <breakpoint_len>: Remove.
3229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3232 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3234 * linux-cris-low.c (cris_get_pc): Remove void arg.
3236 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3238 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3241 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3243 * inferiors.c (thread_pid_matches_callback): New function.
3244 (find_thread_process): New function.
3245 (remove_thread): Reset current_thread.
3246 (remove_process): Assert threads have been removed first.
3248 2015-10-15 Yao Qi <yao.qi@linaro.org>
3250 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3252 (aarch64_remove_point): Likewise.
3253 * regcache.c (regcache_register_size): New function.
3255 2015-10-12 Yao Qi <yao.qi@linaro.org>
3257 * linux-aarch64-low.c: Update all callers as emit_load_store
3258 is renamed to aarch64_emit_load_store.
3260 2015-10-12 Yao Qi <yao.qi@linaro.org>
3262 * linux-aarch64-low.c: Update all callers of function renaming
3263 from emit_insn to aarch64_emit_insn.
3265 2015-10-12 Yao Qi <yao.qi@linaro.org>
3267 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3268 arch/aarch64-insn.h.
3269 (struct aarch64_memory_operand): Likewise.
3271 (emit_insn): Move to arch/aarch64-insn.c.
3272 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3273 (emit_load_store): Move to arch/aarch64-insn.c.
3274 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3275 (can_encode_int32): Remove.
3277 2015-10-12 Yao Qi <yao.qi@linaro.org>
3279 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3280 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3281 (aarch64_relocate_instruction): Likewise.
3282 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3283 (struct aarch64_insn_visitor): Likewise.
3285 2015-10-12 Yao Qi <yao.qi@linaro.org>
3287 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3288 (struct aarch64_insn_visitor): New.
3289 (struct aarch64_insn_relocation_data): New.
3290 (aarch64_ftrace_insn_reloc_b): New function.
3291 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3292 (aarch64_ftrace_insn_reloc_cb): Likewise.
3293 (aarch64_ftrace_insn_reloc_tb): Likewise.
3294 (aarch64_ftrace_insn_reloc_adr): Likewise.
3295 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3296 (aarch64_ftrace_insn_reloc_others): Likewise.
3298 (aarch64_relocate_instruction): Use visitor.
3300 2015-10-12 Yao Qi <yao.qi@linaro.org>
3302 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3303 int. Add argument buf.
3304 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3305 aarch64_relocate_instruction.
3307 2015-10-12 Yao Qi <yao.qi@linaro.org>
3309 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3310 argument insn. Remove local variable insn. Don't call
3312 (aarch64_install_fast_tracepoint_jump_pad): Call
3315 2015-09-30 Yao Qi <yao.qi@linaro.org>
3317 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3318 (emit_load_store_pair): Likewise.
3320 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3322 * dll.c (match_dll): Add cast(s).
3323 (unloaded_dll): Likewise.
3324 * linux-low.c (second_thread_of_pid_p): Likewise.
3325 (delete_lwp_callback): Likewise.
3326 (count_events_callback): Likewise.
3327 (select_event_lwp_callback): Likewise.
3328 (linux_set_resume_request): Likewise.
3329 * server.c (accumulate_file_name_length): Likewise.
3330 (emit_dll_description): Likewise.
3331 (handle_qxfer_threads_worker): Likewise.
3332 (visit_actioned_threads): Likewise.
3333 * thread-db.c (any_thread_of): Likewise.
3334 * tracepoint.c (same_process_p): Likewise.
3335 (match_blocktype): Likewise.
3336 (build_traceframe_info_xml): Likewise.
3338 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3340 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3342 (gdb_unparse_agent_expr): Likewise.
3343 * hostio.c (require_data): Likewise.
3344 (handle_pread): Likewise.
3345 * linux-low.c (disable_regset): Likewise.
3346 (fetch_register): Likewise.
3347 (store_register): Likewise.
3348 (get_dynamic): Likewise.
3349 (linux_qxfer_libraries_svr4): Likewise.
3350 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3351 (set_fast_tracepoint_jump): Likewise.
3352 (uninsert_fast_tracepoint_jumps_at): Likewise.
3353 (reinsert_fast_tracepoint_jumps_at): Likewise.
3354 (validate_inserted_breakpoint): Likewise.
3355 (clone_agent_expr): Likewise.
3356 * regcache.c (init_register_cache): Likewise.
3357 * remote-utils.c (putpkt_binary_1): Likewise.
3358 (decode_M_packet): Likewise.
3359 (decode_X_packet): Likewise.
3360 (look_up_one_symbol): Likewise.
3361 (relocate_instruction): Likewise.
3362 (monitor_output): Likewise.
3363 * server.c (handle_search_memory): Likewise.
3364 (handle_qxfer_exec_file): Likewise.
3365 (handle_qxfer_libraries): Likewise.
3366 (handle_qxfer): Likewise.
3367 (handle_query): Likewise.
3368 (handle_v_cont): Likewise.
3369 (handle_v_run): Likewise.
3370 (captured_main): Likewise.
3371 * target.c (write_inferior_memory): Likewise.
3372 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3373 * tracepoint.c (init_trace_buffer): Likewise.
3374 (add_tracepoint_action): Likewise.
3375 (add_traceframe): Likewise.
3376 (add_traceframe_block): Likewise.
3377 (cmd_qtdpsrc): Likewise.
3378 (cmd_qtdv): Likewise.
3379 (cmd_qtstatus): Likewise.
3380 (response_source): Likewise.
3381 (response_tsv): Likewise.
3382 (cmd_qtnotes): Likewise.
3383 (gdb_collect): Likewise.
3384 (initialize_tracepoint): Likewise.
3386 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3388 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3389 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3390 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3392 (enum aarch64_condition_codes): New enum.
3393 (w0): New static global.
3396 (struct aarch64_memory_operand) <type>: New
3397 MEMORY_OPERAND_POSTINDEX type.
3398 (postindex_memory_operand): New helper function.
3399 (emit_ret): New function.
3400 (emit_load_store_pair): New function, factored out of emit_stp
3401 with support for MEMORY_OPERAND_POSTINDEX.
3402 (emit_stp): Rewrite using emit_load_store_pair.
3403 (emit_ldp): New function.
3404 (emit_load_store): Likewise.
3405 (emit_ldr): Mention post-index instruction in comment.
3406 (emit_ldrh): New function.
3407 (emit_ldrb): New function.
3408 (emit_ldrsw): Mention post-index instruction in comment.
3409 (emit_str): Likewise.
3410 (emit_subs): New function.
3411 (emit_cmp): Likewise.
3412 (emit_and): Likewise.
3413 (emit_orr): Likewise.
3414 (emit_orn): Likewise.
3415 (emit_eor): Likewise.
3416 (emit_mvn): Likewise.
3417 (emit_lslv): Likewise.
3418 (emit_lsrv): Likewise.
3419 (emit_asrv): Likewise.
3420 (emit_mul): Likewise.
3421 (emit_sbfm): Likewise.
3422 (emit_sbfx): Likewise.
3423 (emit_ubfm): Likewise.
3424 (emit_ubfx): Likewise.
3425 (emit_csinc): Likewise.
3426 (emit_cset): Likewise.
3427 (emit_nop): Likewise.
3428 (emit_ops_insns): New helper function.
3429 (emit_pop): Likewise.
3430 (emit_push): Likewise.
3431 (aarch64_emit_prologue): New function.
3432 (aarch64_emit_epilogue): Likewise.
3433 (aarch64_emit_add): Likewise.
3434 (aarch64_emit_sub): Likewise.
3435 (aarch64_emit_mul): Likewise.
3436 (aarch64_emit_lsh): Likewise.
3437 (aarch64_emit_rsh_signed): Likewise.
3438 (aarch64_emit_rsh_unsigned): Likewise.
3439 (aarch64_emit_ext): Likewise.
3440 (aarch64_emit_log_not): Likewise.
3441 (aarch64_emit_bit_and): Likewise.
3442 (aarch64_emit_bit_or): Likewise.
3443 (aarch64_emit_bit_xor): Likewise.
3444 (aarch64_emit_bit_not): Likewise.
3445 (aarch64_emit_equal): Likewise.
3446 (aarch64_emit_less_signed): Likewise.
3447 (aarch64_emit_less_unsigned): Likewise.
3448 (aarch64_emit_ref): Likewise.
3449 (aarch64_emit_if_goto): Likewise.
3450 (aarch64_emit_goto): Likewise.
3451 (aarch64_write_goto_address): Likewise.
3452 (aarch64_emit_const): Likewise.
3453 (aarch64_emit_call): Likewise.
3454 (aarch64_emit_reg): Likewise.
3455 (aarch64_emit_pop): Likewise.
3456 (aarch64_emit_stack_flush): Likewise.
3457 (aarch64_emit_zero_ext): Likewise.
3458 (aarch64_emit_swap): Likewise.
3459 (aarch64_emit_stack_adjust): Likewise.
3460 (aarch64_emit_int_call_1): Likewise.
3461 (aarch64_emit_void_call_2): Likewise.
3462 (aarch64_emit_eq_goto): Likewise.
3463 (aarch64_emit_ne_goto): Likewise.
3464 (aarch64_emit_lt_goto): Likewise.
3465 (aarch64_emit_le_goto): Likewise.
3466 (aarch64_emit_gt_goto): Likewise.
3467 (aarch64_emit_ge_got): Likewise.
3468 (aarch64_emit_ops_impl): New static global variable.
3469 (aarch64_emit_ops): New target function, return
3470 &aarch64_emit_ops_impl.
3471 (struct linux_target_ops): Install it.
3473 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3475 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3476 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3478 * linux-aarch64-ipa.c: New file.
3479 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3481 (aarch64_get_thread_area): New target method.
3482 (extract_signed_bitfield): New helper function.
3483 (aarch64_decode_ldr_literal): New function.
3484 (enum aarch64_opcodes): New enum.
3485 (struct aarch64_register): New struct.
3486 (struct aarch64_operand): New struct.
3487 (x0): New static global.
3496 (aarch64_register): New helper function.
3497 (register_operand): Likewise.
3498 (immediate_operand): Likewise.
3499 (struct aarch64_memory_operand): New struct.
3500 (offset_memory_operand): New helper function.
3501 (preindex_memory_operand): Likewise.
3502 (enum aarch64_system_control_registers): New enum.
3503 (ENCODE): New macro.
3504 (emit_insn): New helper function.
3505 (emit_b): New function.
3506 (emit_bcond): Likewise.
3507 (emit_cb): Likewise.
3508 (emit_tb): Likewise.
3509 (emit_blr): Likewise.
3510 (emit_stp): Likewise.
3511 (emit_ldp_q_offset): Likewise.
3512 (emit_stp_q_offset): Likewise.
3513 (emit_load_store): Likewise.
3514 (emit_ldr): Likewise.
3515 (emit_ldrsw): Likewise.
3516 (emit_str): Likewise.
3517 (emit_ldaxr): Likewise.
3518 (emit_stxr): Likewise.
3519 (emit_stlr): Likewise.
3520 (emit_data_processing_reg): Likewise.
3521 (emit_data_processing): Likewise.
3522 (emit_add): Likewise.
3523 (emit_sub): Likewise.
3524 (emit_mov): Likewise.
3525 (emit_movk): Likewise.
3526 (emit_mov_addr): Likewise.
3527 (emit_mrs): Likewise.
3528 (emit_msr): Likewise.
3529 (emit_sevl): Likewise.
3530 (emit_wfe): Likewise.
3531 (append_insns): Likewise.
3532 (can_encode_int32_in): New helper function.
3533 (aarch64_relocate_instruction): New function.
3534 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3535 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3536 (struct linux_target_ops): Install aarch64_get_thread_area,
3537 aarch64_install_fast_tracepoint_jump_pad and
3538 aarch64_get_min_fast_tracepoint_insn_len.
3540 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3542 * Makefile.in (aarch64-insn.o): New rule.
3543 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3545 2015-09-21 Yao Qi <yao.qi@linaro.org>
3547 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3549 2015-09-21 Yao Qi <yao.qi@linaro.org>
3551 * tracepoint.c (max_jump_pad_size): Remove.
3553 2015-09-18 Yao Qi <yao.qi@linaro.org>
3555 * linux-aarch64-low.c: Don't include sys/uio.h.
3556 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3558 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3560 * tracepoint.c (eval_result_type): Change prototype.
3561 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3563 2015-09-15 Pedro Alves <palves@redhat.com>
3565 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3566 Check whether to report exec events instead of checking whether
3567 multiprocess is enabled.
3569 2015-09-15 Pedro Alves <palves@redhat.com>
3572 * remote-utils.c (prepare_resume_reply): Merge
3573 TARGET_WAITKIND_VFORK_DONE switch case with the
3574 TARGET_WAITKIND_FORKED case.
3576 2015-09-15 Yao Qi <yao.qi@linaro.org>
3578 * server.c (handle_query): Check string comparison using
3579 "else if" instead of "if".
3581 2015-09-15 Yao Qi <yao.qi@linaro.org>
3583 * server.c (vCont_supported): New global variable.
3584 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3585 matches. Append ";vContSupported+" to own_buf.
3586 (handle_v_requests): Append ";s;S" to own_buf if target supports
3587 hardware single step or vCont_supported is false.
3588 (capture_main): Set vCont_supported to zero.
3590 2015-09-15 Yao Qi <yao.qi@linaro.org>
3592 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3594 (linux_supports_hardware_single_step): ... New function.
3595 (linux_target_ops): Update.
3596 * lynx-low.c (lynx_target_ops): Set field
3597 supports_hardware_single_step to target_can_do_hardware_single_step.
3598 * nto-low.c (nto_target_ops): Likewise.
3599 * spu-low.c (spu_target_ops): Likewise.
3600 * win32-low.c (win32_target_ops): Likewise.
3601 * target.c (target_can_do_hardware_single_step): New function.
3602 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3603 Remove. <supports_hardware_single_step>: New field.
3604 (target_supports_conditional_breakpoints): Remove.
3605 (target_supports_hardware_single_step): New macro.
3606 (target_can_do_hardware_single_step): Declare.
3607 * server.c (handle_query): Use target_supports_hardware_single_step
3608 instead of target_supports_conditional_breakpoints.
3610 2015-09-15 Yao Qi <yao.qi@linaro.org>
3612 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3614 (struct linux_target_ops the_low_target): Install
3615 aarch64_linux_siginfo_fixup.
3617 2015-09-11 Don Breazeal <donb@codesourcery.com>
3618 Luis Machado <lgustavo@codesourcery.com>
3620 * linux-low.c (linux_mourn): Static declaration.
3621 (linux_arch_setup): Move in front of
3622 handle_extended_wait.
3623 (linux_arch_setup_thread): New function.
3624 (handle_extended_wait): Handle exec events. Call
3625 linux_arch_setup_thread. Make event_lwp argument a
3626 pointer-to-a-pointer.
3627 (check_zombie_leaders): Do not check stopped threads.
3628 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3629 (linux_low_filter_event): Add lwp and thread for exec'ing
3630 non-leader thread if leader thread has been deleted.
3631 Refactor code into linux_arch_setup_thread and call it.
3632 Pass child lwp pointer by reference to handle_extended_wait.
3633 (linux_wait_for_event_filtered): Update comment.
3634 (linux_wait_1): Prevent clobbering exec event status.
3635 (linux_supports_exec_events): New function.
3636 (linux_target_ops) <supports_exec_events>: Initialize new member.
3637 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3639 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3640 * server.c (report_exec_events): New global variable.
3641 (handle_query): Handle qSupported query for exec-events feature.
3642 (captured_main): Initialize report_exec_events.
3643 * server.h (report_exec_events): Declare new global variable.
3644 * target.h (struct target_ops) <supports_exec_events>: New
3646 (target_supports_exec_events): New macro.
3647 * win32-low.c (win32_target_ops) <supports_exec_events>:
3648 Initialize new member.
3650 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3652 * linux-low.c (linux_low_enable_btrace): Remove.
3653 (linux_target_ops): Replace linux_low_enable_btrace with
3654 linux_enable_btrace.
3656 2015-09-03 Yao Qi <yao.qi@linaro.org>
3658 * linux-aarch64-low.c (aarch64_insert_point): Call
3659 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3662 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3664 * linux-low.c (check_stopped_by_breakpoint): Use
3665 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3667 2015-08-27 Pedro Alves <palves@redhat.com>
3669 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3671 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3673 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3674 the XNEW-family equivalent.
3675 (compile_bytecodes): Likewise.
3676 * dll.c (loaded_dll): Likewise.
3677 * event-loop.c (append_callback_event): Likewise.
3678 (create_file_handler): Likewise.
3679 (create_file_event): Likewise.
3680 * hostio.c (handle_open): Likewise.
3681 * inferiors.c (add_thread): Likewise.
3682 (add_process): Likewise.
3683 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3684 * linux-arm-low.c (arm_new_process): Likewise.
3685 (arm_new_thread): Likewise.
3686 * linux-low.c (add_to_pid_list): Likewise.
3687 (linux_add_process): Likewise.
3688 (handle_extended_wait): Likewise.
3689 (add_lwp): Likewise.
3690 (enqueue_one_deferred_signal): Likewise.
3691 (enqueue_pending_signal): Likewise.
3692 (linux_resume_one_lwp_throw): Likewise.
3693 (linux_resume_one_thread): Likewise.
3694 (linux_read_memory): Likewise.
3695 (linux_write_memory): Likewise.
3696 * linux-mips-low.c (mips_linux_new_process): Likewise.
3697 (mips_linux_new_thread): Likewise.
3698 (mips_add_watchpoint): Likewise.
3699 * linux-x86-low.c (initialize_low_arch): Likewise.
3700 * lynx-low.c (lynx_add_process): Likewise.
3701 * mem-break.c (set_raw_breakpoint_at): Likewise.
3702 (set_breakpoint): Likewise.
3703 (add_condition_to_breakpoint): Likewise.
3704 (add_commands_to_breakpoint): Likewise.
3705 (clone_agent_expr): Likewise.
3706 (clone_one_breakpoint): Likewise.
3707 * regcache.c (new_register_cache): Likewise.
3708 * remote-utils.c (look_up_one_symbol): Likewise.
3709 * server.c (queue_stop_reply): Likewise.
3710 (start_inferior): Likewise.
3711 (queue_stop_reply_callback): Likewise.
3712 (handle_target_event): Likewise.
3713 * spu-low.c (fetch_ppc_memory): Likewise.
3714 (store_ppc_memory): Likewise.
3715 * target.c (set_target_ops): Likewise.
3716 * thread-db.c (thread_db_load_search): Likewise.
3717 (try_thread_db_load_1): Likewise.
3718 * tracepoint.c (add_tracepoint): Likewise.
3719 (add_tracepoint_action): Likewise.
3720 (create_trace_state_variable): Likewise.
3721 (cmd_qtdpsrc): Likewise.
3722 (cmd_qtro): Likewise.
3723 (add_while_stepping_state): Likewise.
3724 * win32-low.c (child_add_thread): Likewise.
3725 (get_image_name): Likewise.
3727 2015-08-25 Yao Qi <yao.qi@linaro.org>
3729 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3731 2015-08-25 Yao Qi <yao.qi@linaro.org>
3733 * Makefile.in (aarch64-linux.o): New rule.
3734 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3736 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3737 (aarch64_init_debug_reg_state): Make it extern.
3738 (aarch64_linux_prepare_to_resume): Remove.
3740 2015-08-25 Yao Qi <yao.qi@linaro.org>
3742 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3743 lwp_arch_private_info and ptid_of_lwp.
3745 2015-08-25 Yao Qi <yao.qi@linaro.org>
3747 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3748 Find proc_info by find_process_pid. All callers updated.
3750 2015-08-25 Yao Qi <yao.qi@linaro.org>
3752 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3754 (debug_reg_change_callback): Remove.
3755 (aarch64_notify_debug_reg_change): Remove.
3757 2015-08-25 Yao Qi <yao.qi@linaro.org>
3759 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3760 Call current_lwp_ptid.
3762 2015-08-25 Yao Qi <yao.qi@linaro.org>
3764 * linux-aarch64-low.c (debug_reg_change_callback): Use
3767 2015-08-25 Yao Qi <yao.qi@linaro.org>
3769 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3771 2015-08-25 Yao Qi <yao.qi@linaro.org>
3773 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3775 2015-08-25 Yao Qi <yao.qi@linaro.org>
3777 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3780 2015-08-25 Yao Qi <yao.qi@linaro.org>
3782 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3784 (debug_reg_change_callback): Remove argument entry and add argument
3785 lwp. Remove local variable thread. Don't print thread id in the
3786 debugging output. Don't check whether pid of thread equals to pid.
3787 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3788 iterate_over_lwps instead find_inferior.
3790 2015-08-24 Pedro Alves <palves@redhat.com>
3792 * inferiors.c (get_first_process): New function.
3793 * inferiors.h (get_first_process): New declaration.
3794 * remote-utils.c (read_ptid): Default to the first process in the
3795 list, instead of to the current thread's process.
3797 2015-08-24 Pedro Alves <palves@redhat.com>
3799 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3800 * event-loop.c: Likewise.
3801 * remote-utils.c: Likewise.
3802 * tracepoint.c: Likewise.
3804 2015-08-24 Pedro Alves <palves@redhat.com>
3806 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3809 2015-08-21 Pedro Alves <palves@redhat.com>
3811 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3812 instead of literal 1.
3814 2015-08-21 Pedro Alves <palves@redhat.com>
3816 * tdesc.c (default_description): Explicitly zero-initialize.
3818 2015-08-21 Pedro Alves <palves@redhat.com>
3821 * inferiors.c (remove_thread): Discard any pending stop reply for
3823 * server.c (remove_all_on_match_pid): Rename to ...
3824 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3826 (discard_queued_stop_replies): Change parameter to a ptid. Now
3828 (handle_v_kill, kill_inferior_callback, captured_main)
3829 (process_serial_event): Adjust.
3830 * server.h (discard_queued_stop_replies): Declare.
3832 2015-08-21 Pedro Alves <palves@redhat.com>
3834 * linux-low.c (wait_for_sigstop): Always switch to no thread
3835 selected if the previously current thread dies.
3836 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3837 process instead of the current thread's.
3838 * remote-utils.c (input_interrupt): Don't check if there's no
3840 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3841 current thread to the general thread fails, error out.
3842 (handle_qxfer_auxv, handle_qxfer_libraries)
3843 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3844 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3845 (handle_query): Check if there's a thread selected instead of
3846 checking whether there's any thread in the thread list.
3847 (handle_qxfer_threads, handle_qxfer_btrace)
3848 (handle_qxfer_btrace_conf): Don't error out early if there's no
3849 thread in the thread list.
3850 (handle_v_cont, myresume): Don't set the current thread to the
3852 (process_serial_event) <Hg handling>: Also set thread_id if the
3853 previous general thread is still alive.
3854 (process_serial_event) <g/G handling>: If setting the current
3855 thread to the general thread fails, error out.
3856 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3857 thread's lwp instead of the current thread's.
3858 * target.c (set_desired_thread): If the desired thread was not
3859 found, leave the current thread pointing to NULL. Return an int
3860 (boolean) indicating success.
3861 * target.h (set_desired_thread): Change return type to int.
3863 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3865 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3866 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3868 (ps_get_thread_area): New function.
3870 2015-08-19 Gary Benson <gbenson@redhat.com>
3872 * hostio.c (handle_pread): Do not attempt to read more data
3873 than hostio_reply_with_data can fit in a packet.
3875 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3877 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3879 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3881 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3883 2015-08-06 Pedro Alves <palves@redhat.com>
3885 * tracepoint.c (expr_eval_result): Now an int.
3887 2015-08-06 Pedro Alves <palves@redhat.com>
3889 * gdbthread.h (struct regcache): Forward declare.
3890 (struct thread_info) <regcache_data>: Now a struct regcache
3892 * inferiors.c (inferior_regcache_data)
3893 (set_inferior_regcache_data): Now work with struct regcache
3895 * inferiors.h (struct regcache): Forward declare.
3896 (inferior_regcache_data, set_inferior_regcache_data): Now work
3897 with struct regcache pointers.
3898 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3899 (free_register_cache_thread): Remove struct regcache pointer
3902 2015-08-06 Pedro Alves <palves@redhat.com>
3904 * server.c (captured_main): On error, print the exception message
3905 to stderr, and if run_once is set, throw a quit.
3907 2015-08-06 Pedro Alves <palves@redhat.com>
3909 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3912 2015-08-06 Pedro Alves <palves@redhat.com>
3914 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3915 reading beyond the passed in buffer length.
3917 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3919 * tracepoint.c (symbol_list) <required>: Remove.
3921 2015-08-06 Pedro Alves <palves@redhat.com>
3923 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3924 count if stopping and suspending threads.
3925 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3926 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3927 (linux_detach): Complete an ongoing step-over.
3928 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3930 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3931 (linux_wait_1): If passing a signal to the inferior after
3932 finishing a step-over, unsuspend and re-resume all lwps. If we
3933 see a single-step event but the thread should be continuing, don't
3934 pass the trap to gdb.
3935 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3936 internal_error instead of gdb_assert.
3937 (enqueue_pending_signal): New function.
3938 (check_ptrace_stopped_lwp_gone): Add debug output.
3939 (start_step_over): Use internal_error instead of gdb_assert.
3940 (complete_ongoing_step_over): New function.
3941 (linux_resume_one_thread): Don't resume a suspended thread.
3942 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3945 2015-08-06 Pedro Alves <palves@redhat.com>
3947 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3948 (linux_thread_alive): Use lwp_is_marked_dead.
3949 (extended_event_reported): Delete.
3950 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3951 instead of extended_event_reported.
3952 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3954 (lwp_is_marked_dead): New function.
3955 (lwp_running): Use lwp_is_marked_dead.
3956 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3959 2015-08-06 Pedro Alves <palves@redhat.com>
3961 * linux-low.c (linux_wait_1): Move fork event output out of the
3962 !report_to_gdb check. Pass event_child->waitstatus to
3963 target_waitstatus_to_string instead of ourstatus.
3965 2015-08-04 Yao Qi <yao.qi@linaro.org>
3967 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3968 if current_thread is 32 bit.
3970 2015-08-04 Yao Qi <yao.qi@linaro.org>
3972 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3973 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3974 * server.c (extended_protocol): Remove "static".
3975 * server.h (extended_protocol): Declare it.
3977 2015-08-04 Yao Qi <yao.qi@linaro.org>
3979 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3980 both aarch64 and aarch32.
3981 (aarch64_set_pc): Likewise.
3983 2015-08-04 Yao Qi <yao.qi@linaro.org>
3985 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3986 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3987 arm-with-neon.xml to srv_xmlfiles.
3988 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3989 (is_64bit_tdesc): New function.
3990 (aarch64_linux_read_description): New function.
3991 (aarch64_arch_setup): Call aarch64_linux_read_description.
3992 (regs_info): Rename to regs_info_aarch64.
3993 (aarch64_regs_info): Return right regs_info.
3994 (initialize_low_arch): Call initialize_low_arch_aarch32.
3996 2015-08-04 Yao Qi <yao.qi@linaro.org>
3998 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3999 * linux-aarch32-low.c: New file.
4000 * linux-aarch32-low.h: New file.
4001 * linux-arm-low.c (arm_fill_gregset): Move it to
4002 linux-aarch32-low.c.
4003 (arm_store_gregset): Likewise.
4004 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4005 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4006 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4007 (regs_info): Rename to regs_info_arm.
4008 (arm_regs_info): Return regs_info_aarch32 if
4009 have_ptrace_getregset is 1 and target description is
4010 arm_with_neon or arm_with_vfpv3.
4011 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4012 Call initialize_low_arch_aarch32 instead.
4014 2015-08-04 Yao Qi <yao.qi@linaro.org>
4016 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4017 * linux-low.c: ... here.
4018 * linux-low.h (have_ptrace_getregset): Declare it.
4020 2015-08-04 Pedro Alves <palves@redhat.com>
4022 * thread-db.c (struct thread_db): Use new typedefs.
4023 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4025 (disable_thread_event_reporting): Cast result of dlsym to
4026 destination function pointer type.
4027 (thread_db_mourn): Use td_ta_delete_ftype.
4029 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4031 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4033 (CDX_BREAKPOINT): Define for R2.
4034 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4035 (the_low_target): Add comments.
4037 2015-07-30 Yao Qi <yao.qi@linaro.org>
4039 * linux-arm-low.c (arm_hwcap): Remove it.
4040 (arm_read_description): New local variable arm_hwcap. Don't
4041 set arm_hwcap to zero.
4043 2015-07-30 Yao Qi <yao.qi@linaro.org>
4045 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4046 Use regcache->tdesc instead.
4047 (arm_store_wmmxregset): Likewise.
4048 (arm_fill_vfpregset): Likewise.
4049 (arm_store_vfpregset): Likewise.
4051 2015-07-30 Yao Qi <yao.qi@linaro.org>
4053 * linux-arm-low.c: Include arch/arm.h.
4054 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4055 (arm_store_gregset): Likewise.
4057 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4059 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4060 ptrace's 4th parameter.
4062 2015-07-27 Yao Qi <yao.qi@linaro.org>
4064 * configure.srv (case aarch64*-*-linux*): Don't set
4067 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4069 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4071 * linux-arm-low.c: Likewise.
4072 * linux-cris-low.c: Likewise.
4073 * linux-crisv32-low.c: Likewise.
4074 * linux-low.c: Likewise.
4075 * linux-m68k-low.c: Likewise.
4076 * linux-mips-low.c: Likewise.
4077 * linux-nios2-low.c: Likewise.
4078 * linux-s390-low.c: Likewise.
4079 * linux-sparc-low.c: Likewise.
4080 * linux-tic6x-low.c: Likewise.
4081 * linux-tile-low.c: Likewise.
4082 * linux-x86-low.c: Likewise.
4084 2015-07-24 Pedro Alves <palves@redhat.com>
4086 * config.in: Regenerate.
4087 * configure: Regenerate.
4089 2015-07-24 Pedro Alves <palves@redhat.com>
4091 * acinclude.m4: Include ../ptrace.m4.
4092 * configure.ac: Call GDB_AC_PTRACE.
4093 * config.in, configure: Regenerate.
4095 2015-07-24 Yao Qi <yao.qi@linaro.org>
4097 * linux-low.c (linux_create_inferior): Remove setting to
4098 proc->priv->new_inferior.
4099 (linux_attach): Likewise.
4100 (linux_low_filter_event): Likewise.
4101 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4103 2015-07-24 Yao Qi <yao.qi@linaro.org>
4105 * linux-low.c (linux_arch_setup): New function.
4106 (linux_low_filter_event): If proc->tdesc is NULL and
4107 proc->attached is true, call the_low_target.arch_setup.
4108 Otherwise, keep status pending, and return.
4109 (linux_resume_one_lwp_throw): Don't call get_pc if
4110 thread->while_stepping isn't NULL. Don't call
4111 get_thread_regcache if proc->tdesc is NULL.
4112 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4113 (linux_target_ops): Install arch_setup.
4114 * server.c (start_inferior): Call the_target->arch_setup.
4115 * target.h (struct target_ops) <arch_setup>: New field.
4116 (target_arch_setup): New marco.
4117 * lynx-low.c (lynx_target_ops): Update.
4118 * nto-low.c (nto_target_ops): Update.
4119 * spu-low.c (spu_target_ops): Update.
4120 * win32-low.c (win32_target_ops): Update.
4122 2015-07-24 Yao Qi <yao.qi@linaro.org>
4124 * linux-low.c (linux_add_process): Don't set
4125 proc->priv->new_inferior.
4126 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4127 (linux_attach): Likewise.
4129 2015-07-24 Yao Qi <yao.qi@linaro.org>
4131 * server.c (start_inferior): Code refactor.
4133 2015-07-24 Yao Qi <yao.qi@linaro.org>
4135 * server.c (process_serial_event): Set general_thread.
4137 2015-07-21 Yao Qi <yao.qi@linaro.org>
4139 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4140 aarch64_linux_get_debug_reg_capacity.
4142 2015-07-17 Yao Qi <yao.qi@linaro.org>
4144 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4145 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4146 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4147 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4148 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4149 (AARCH64_HWP_ALIGNMENT): Likewise.
4150 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4151 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4152 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4153 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4154 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4155 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4156 (struct aarch64_debug_reg_state): Likewise.
4157 (struct arch_lwp_info): Likewise.
4158 (aarch64_align_watchpoint): Likewise.
4159 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4160 (aarch64_watchpoint_length): Likewise.
4161 (aarch64_point_encode_ctrl_reg): Likewise
4162 (aarch64_point_is_aligned): Likewise.
4163 (aarch64_align_watchpoint): Likewise.
4164 (aarch64_linux_set_debug_regs):
4165 (aarch64_dr_state_insert_one_point): Likewise.
4166 (aarch64_dr_state_remove_one_point): Likewise.
4167 (aarch64_handle_breakpoint): Likewise.
4168 (aarch64_handle_aligned_watchpoint): Likewise.
4169 (aarch64_handle_unaligned_watchpoint): Likewise.
4170 (aarch64_handle_watchpoint): Likewise.
4172 2015-07-17 Yao Qi <yao.qi@linaro.org>
4174 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4175 and don't aarch64_get_debug_reg_state. All callers update.
4176 (aarch64_handle_aligned_watchpoint): Likewise.
4177 (aarch64_handle_unaligned_watchpoint): Likewise.
4178 (aarch64_handle_watchpoint): Likewise.
4179 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4180 (aarch64_remove_point): Likewise.
4182 2015-07-17 Yao Qi <yao.qi@linaro.org>
4184 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4186 (aarch64_handle_unaligned_watchpoint): Likewise.
4188 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4190 Revert the previous 3 commits:
4191 Move gdb_regex* to common/
4192 Move linux_find_memory_regions_full & co.
4193 gdbserver build-id attribute generator
4195 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4196 Jan Kratochvil <jan.kratochvil@redhat.com>
4198 gdbserver build-id attribute generator.
4199 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4200 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4201 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4203 (get_dynamic): Use find_pdhr to traverse program headers.
4204 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4205 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4206 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4207 (get_hex_build_id): New.
4208 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4209 to reply XML document.
4211 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4212 Jan Kratochvil <jan.kratochvil@redhat.com>
4214 * target.c: Include target/target-utils.h and fcntl.h.
4215 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4216 (target_fileio_read_stralloc): New functions.
4218 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4220 * Makefile.in (OBS): Add gdb_regex.o.
4222 * config.in: Rebuilt.
4223 * configure: Rebuilt.
4225 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4226 Jan Kratochvil <jan.kratochvil@redhat.com>
4228 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4229 * Makefile.in (OBS): Add target-utils.o.
4230 (linux-maps.o, target-utils.o): New.
4231 * configure.srv (srv_linux_obj): Add linux-maps.o.
4233 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4235 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4237 (the_low_target): Install it.
4239 2015-07-14 Pedro Alves <palves@redhat.com>
4241 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4242 Instead, ignore ECHILD, and throw an error for other errnos.
4244 2015-07-10 Pedro Alves <palves@redhat.com>
4246 * event-loop.c (struct callback_event) <data>: Change type to
4247 gdb_client_data instance instead of gdb_client_data pointer.
4248 (append_callback_event): Adjust.
4250 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4252 * linux-aarch64-low.c: Add comments for each linux_target_ops
4253 method. Remove comments already covered in target_ops and
4254 linux_target_ops definitions.
4255 (the_low_target): Add comments for each unimplemented method.
4257 2015-07-09 Yao Qi <yao.qi@linaro.org>
4259 * linux-aarch64-low.c (aarch64_regmap): Remove.
4260 (aarch64_usrregs_info): Remove.
4261 (regs_info): Set field usrregs to NULL.
4263 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4265 * linux-low.c: Include "rsp-low.h"
4266 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4267 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4268 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4269 (handle_btrace_enable_pt): New.
4270 (handle_btrace_general_set): Support "pt".
4271 (handle_btrace_conf_general_set): Support "pt:size".
4273 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4275 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4278 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4280 * linux-aarch64-low.c: Remove comment about endianness.
4281 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4282 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4285 2015-06-24 Gary Benson <gbenson@redhat.com>
4287 * linux-i386-ipa.c (stdint.h): Do not include.
4288 * lynx-i386-low.c (stdint.h): Likewise.
4289 * lynx-ppc-low.c (stdint.h): Likewise.
4290 * mem-break.c (stdint.h): Likewise.
4291 * thread-db.c (stdint.h): Likewise.
4292 * tracepoint.c (stdint.h): Likewise.
4293 * win32-low.c (stdint.h): Likewise.
4295 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4297 * server.c (write_qxfer_response): Update call to
4298 remote_escape_output.
4300 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4301 Jan Kratochvil <jan.kratochvil@redhat.com>
4303 Merge multiple hex conversions.
4304 * gdbreplay.c (tohex): Rename to 'fromhex'.
4305 (logchar): Use fromhex.
4307 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4309 * server.c (handle_qxfer_libraries): Set `version' attribute for
4312 2015-06-10 Gary Benson <gbenson@redhat.com>
4314 * target.h (struct target_ops) <multifs_open>: New field.
4315 <multifs_unlink>: Likewise.
4316 <multifs_readlink>: Likewise.
4317 * linux-low.c (nat/linux-namespaces.h): New include.
4318 (linux_target_ops): Initialize the_target->multifs_open,
4319 the_target->multifs_unlink and the_target->multifs_readlink.
4320 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4321 * hostio.c (hostio_fs_pid): New static variable.
4322 (hostio_handle_new_gdb_connection): New function.
4323 (handle_setfs): Likewise.
4324 (handle_open): Use the_target->multifs_open as appropriate.
4325 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4326 (handle_readlink): Use the_target->multifs_readlink as
4328 (handle_vFile): Handle vFile:setfs packets.
4329 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4330 after target_handle_new_gdb_connection.
4332 2015-06-10 Gary Benson <gbenson@redhat.com>
4334 * configure.ac (AC_CHECK_FUNCS): Add setns.
4335 * config.in: Regenerate.
4336 * configure: Likewise.
4337 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4338 (linux-namespaces.o): New rule.
4339 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4341 2015-06-09 Gary Benson <gbenson@redhat.com>
4343 * hostio.c (handle_open): Process mode argument with
4344 fileio_to_host_mode.
4346 2015-06-01 Yao Qi <yao.qi@linaro.org>
4348 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4349 * linux-x86-low.c: Likewise.
4351 2015-05-28 Don Breazeal <donb@codesourcery.com>
4353 * linux-low.c (handle_extended_wait): Initialize
4354 thread_info.last_resume_kind for new fork children.
4356 2015-05-15 Pedro Alves <palves@redhat.com>
4358 * target.h (target_handle_new_gdb_connection): Rewrite using if
4359 wrapped in do/while.
4361 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4363 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4364 * configure, config.in: Regenerate.
4365 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4368 2015-05-12 Don Breazeal <donb@codesourcery.com>
4370 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4371 PTRACE_EVENT_VFORK_DONE.
4372 (linux_low_ptrace_options, extended_event_reported): Add vfork
4374 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4375 and "vforkdone" for RSP 'T' Stop Reply Packet.
4376 * server.h (report_vfork_events): Declare
4379 2015-05-12 Don Breazeal <donb@codesourcery.com>
4381 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4382 (the_low_target) <new_fork>: Initialize new member.
4383 * linux-arm-low.c (arm_new_fork): New function.
4384 (the_low_target) <new_fork>: Initialize new member.
4385 * linux-low.c (handle_extended_wait): Call new target function
4387 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4388 * linux-mips-low.c (mips_add_watchpoint): New function
4389 extracted from mips_insert_point.
4390 (the_low_target) <new_fork>: Initialize new member.
4391 (mips_linux_new_fork): New function.
4392 (mips_insert_point): Call mips_add_watchpoint.
4393 * linux-x86-low.c (x86_linux_new_fork): New function.
4394 (the_low_target) <new_fork>: Initialize new member.
4396 2015-05-12 Don Breazeal <donb@codesourcery.com>
4398 * linux-low.c (handle_extended_wait): Implement return value,
4399 rename argument 'event_child' to 'event_lwp', handle
4400 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4401 (linux_low_ptrace_options): New function.
4402 (linux_low_filter_event): Call linux_low_ptrace_options,
4403 use different argument fo linux_enable_event_reporting,
4404 use return value from handle_extended_wait.
4405 (extended_event_reported): New function.
4406 (linux_wait_1): Call extended_event_reported and set
4407 status to report fork events.
4408 (linux_write_memory): Add pid to debug message.
4409 (reset_lwp_ptrace_options_callback): New function.
4410 (linux_handle_new_gdb_connection): New function.
4411 (linux_target_ops): Initialize new structure member.
4412 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4413 * lynx-low.c: Initialize new structure member.
4414 * remote-utils.c (prepare_resume_reply): Implement stop reason
4415 "fork" for "T" stop message.
4416 * server.c (handle_query): Call handle_new_gdb_connection.
4417 * server.h (report_fork_events): Declare global flag.
4418 * target.h (struct target_ops) <handle_new_gdb_connection>:
4420 (target_handle_new_gdb_connection): New macro.
4421 * win32-low.c: Initialize new structure member.
4423 2015-05-12 Don Breazeal <donb@codesourcery.com>
4425 * mem-break.c (APPEND_TO_LIST): Define macro.
4426 (clone_agent_expr): New function.
4427 (clone_one_breakpoint): New function.
4428 (clone_all_breakpoints): New function.
4429 * mem-break.h: Declare new functions.
4431 2015-05-12 Don Breazeal <donb@codesourcery.com>
4433 * linux-low.c (linux_supports_fork_events): New function.
4434 (linux_supports_vfork_events): New function.
4435 (linux_target_ops): Initialize new structure members.
4436 (initialize_low): Call linux_check_ptrace_features.
4437 * lynx-low.c (lynx_target_ops): Initialize new structure
4439 * server.c (report_fork_events, report_vfork_events):
4441 (handle_query): Add new features to qSupported packet and
4443 (captured_main): Initialize new global variables.
4444 * target.h (struct target_ops) <supports_fork_events>:
4446 <supports_vfork_events>: New member.
4447 (target_supports_fork_events): New macro.
4448 (target_supports_vfork_events): New macro.
4449 * win32-low.c (win32_target_ops): Initialize new structure
4452 2015-05-12 Gary Benson <gbenson@redhat.com>
4454 * server.c (handle_qxfer_exec_file): Use current process
4457 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4459 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4460 Remove HAVE_PTRACE_GETREGS conditionals.
4461 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4462 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4464 2015-05-08 Yao Qi <yao.qi@linaro.org>
4466 * linux-low.c (linux_supports_conditional_breakpoints): New
4468 (linux_target_ops): Install new target method.
4469 * lynx-low.c (lynx_target_ops): Install NULL hook for
4470 supports_conditional_breakpoints.
4471 * nto-low.c (nto_target_ops): Likewise.
4472 * spu-low.c (spu_target_ops): Likewise.
4473 * win32-low.c (win32_target_ops): Likewise.
4474 * server.c (handle_query): Check
4475 target_supports_conditional_breakpoints.
4476 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4478 (target_supports_conditional_breakpoints): New macro.
4480 2015-05-06 Pedro Alves <palves@redhat.com>
4483 * server.c (start_inferior): If the process exits, mourn it.
4485 2015-04-21 Gary Benson <gbenson@redhat.com>
4487 * hostio.c (fileio_open_flags_to_host): Factored out to
4488 fileio_to_host_openflags in common/fileio.c. Single use
4491 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4493 * linux-xtensa-low.c (xtensa_fill_gregset)
4494 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4497 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4499 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4500 (regs_info): Replace usrregs pointer with NULL.
4502 2015-04-17 Gary Benson <gbenson@redhat.com>
4504 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4505 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4506 * server.c (handle_qxfer_exec_file): New function.
4507 (qxfer_packets): Add exec-file entry.
4508 (handle_query): Report qXfer:exec-file:read as supported packet.
4510 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4512 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4514 2015-04-09 Gary Benson <gbenson@redhat.com>
4516 * hostio-errno.c (errno_to_fileio_error): Remove function.
4517 Update caller to use remote_fileio_to_fio_error.
4519 2015-04-09 Yao Qi <yao.qi@linaro.org>
4521 * linux-low.c (linux_insert_point): Call
4522 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4523 (linux_remove_point): Call remove_memory_breakpoint if type is
4525 * linux-x86-low.c (x86_insert_point): Don't call
4526 insert_memory_breakpoint.
4527 (x86_remove_point): Don't call remove_memory_breakpoint.
4529 2015-04-01 Pedro Alves <palves@redhat.com>
4530 Cleber Rosa <crosa@redhat.com>
4532 * server.c (gdbserver_usage): Reorganize and extend the usage
4535 2015-03-24 Pedro Alves <palves@redhat.com>
4537 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4538 output. Also dump TRAP_TRACE.
4539 (linux_low_filter_event): In debug output, distinguish a
4540 resume_stop SIGSTOP from a delayed SIGSTOP.
4542 2015-03-24 Gary Benson <gbenson@redhat.com>
4544 * linux-x86-low.c (x86_linux_new_thread): Moved to
4546 (x86_linux_prepare_to_resume): Likewise.
4548 2015-03-24 Gary Benson <gbenson@redhat.com>
4550 * Makefile.in (x86-linux-dregs.o): New rule.
4551 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4552 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4553 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4554 (x86_linux_dr_get): Likewise.
4555 (x86_linux_dr_set): Likewise.
4556 (update_debug_registers_callback): Likewise.
4557 (x86_linux_dr_set_addr): Likewise.
4558 (x86_linux_dr_get_addr): Likewise.
4559 (x86_linux_dr_set_control): Likewise.
4560 (x86_linux_dr_get_control): Likewise.
4561 (x86_linux_dr_get_status): Likewise.
4562 (x86_linux_update_debug_registers): Likewise.
4564 2015-03-24 Gary Benson <gbenson@redhat.com>
4566 * linux-x86-low.c (x86_linux_update_debug_registers):
4567 New function, factored out from...
4568 (x86_linux_prepare_to_resume): ...this.
4570 2015-03-24 Gary Benson <gbenson@redhat.com>
4572 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4573 (x86_linux_dr_set): Likewise.
4574 (update_debug_registers_callback): Likewise.
4575 (x86_linux_dr_set_addr): Likewise.
4576 (x86_linux_dr_get_addr): Likewise.
4577 (x86_linux_dr_set_control): Likewise.
4578 (x86_linux_dr_get_control): Likewise.
4579 (x86_linux_dr_get_status): Likewise.
4580 (x86_linux_prepare_to_resume): Likewise.
4582 2015-03-24 Gary Benson <gbenson@redhat.com>
4584 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4585 Use perror_with_name. Pass string through gettext.
4586 (x86_linux_dr_set): Likewise.
4588 2015-03-24 Gary Benson <gbenson@redhat.com>
4590 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4591 (x86_linux_dr_set_addr): ...this.
4592 (x86_dr_low_get_addr): Rename to...
4593 (x86_linux_dr_get_addr): ...this.
4594 (x86_dr_low_set_control): Rename to...
4595 (x86_linux_dr_set_control): ...this.
4596 (x86_dr_low_get_control): Rename to...
4597 (x86_linux_dr_get_control): ...this.
4598 (x86_dr_low_get_status): Rename to...
4599 (x86_linux_dr_get_status): ...this.
4600 (x86_dr_low): Update with new function names.
4602 2015-03-24 Gary Benson <gbenson@redhat.com>
4604 * Makefile.in (x86-linux.o): New rule.
4605 * configure.srv: Add x86-linux.o to relevant targets.
4606 * linux-low.c (lwp_set_arch_private_info): New function.
4607 (lwp_arch_private_info): Likewise.
4608 * linux-x86-low.c: Include nat/x86-linux.h.
4609 (arch_lwp_info): Removed structure.
4610 (update_debug_registers_callback):
4611 Use lwp_set_debug_registers_changed.
4612 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4613 and lwp_set_debug_registers_changed.
4614 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4616 2015-03-24 Gary Benson <gbenson@redhat.com>
4618 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4619 * linux-arm-low.c (arm_new_thread): Likewise.
4620 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4621 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4622 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4623 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4625 2015-03-24 Gary Benson <gbenson@redhat.com>
4627 * linux-low.c (ptid_of_lwp): New function.
4628 (lwp_is_stopped): Likewise.
4629 (lwp_stop_reason): Likewise.
4630 * linux-x86-low.c (update_debug_registers_callback):
4632 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4635 2015-03-24 Gary Benson <gbenson@redhat.com>
4637 * linux-low.h (linux_stop_lwp): Remove declaration.
4639 2015-03-24 Gary Benson <gbenson@redhat.com>
4641 * linux-low.h: Include nat/linux-nat.h.
4642 * linux-low.c (iterate_over_lwps_args): New structure.
4643 (iterate_over_lwps_filter): New function.
4644 (iterate_over_lwps): Likewise.
4645 * linux-x86-low.c (update_debug_registers_callback):
4646 Update signature to what iterate_over_lwps expects.
4647 Remove PID check that iterate_over_lwps now performs.
4648 (x86_dr_low_set_addr): Use iterate_over_lwps.
4649 (x86_dr_low_set_control): Likewise.
4651 2015-03-24 Gary Benson <gbenson@redhat.com>
4653 * linux-x86-low.c (x86_debug_reg_state): New function.
4654 (x86_linux_prepare_to_resume): Use the above.
4656 2015-03-24 Gary Benson <gbenson@redhat.com>
4658 * linux-low.c (current_lwp_ptid): New function.
4659 * linux-x86-low.c: Include nat/linux-nat.h.
4660 (x86_dr_low_get_addr): Use current_lwp_ptid.
4661 (x86_dr_low_get_control): Likewise.
4662 (x86_dr_low_get_status): Likewise.
4664 2015-03-20 Pedro Alves <palves@redhat.com>
4666 * tracepoint.c (cmd_qtstatus): Make "str" const.
4668 2015-03-20 Pedro Alves <palves@redhat.com>
4670 * server.c (handle_general_set): Make "req_str" const.
4672 2015-03-19 Pedro Alves <palves@redhat.com>
4674 * linux-low.c (linux_resume_one_lwp): Rename to ...
4675 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4676 instead call perror_with_name.
4677 (check_ptrace_stopped_lwp_gone): New function.
4678 (linux_resume_one_lwp): Reimplement as wrapper around
4679 linux_resume_one_lwp_throw that swallows errors if the LWP is
4682 2015-03-19 Pedro Alves <palves@redhat.com>
4684 * linux-low.c (count_events_callback, select_event_lwp_callback):
4685 No longer check whether the thread has resume_stop as last resume
4688 2015-03-19 Pedro Alves <palves@redhat.com>
4690 * linux-low.c (count_events_callback, select_event_lwp_callback):
4691 Use the lwp's status_pending_p field, not the thread's.
4693 2015-03-19 Pedro Alves <palves@redhat.com>
4695 * linux-low.c (select_event_lwp_callback): Update comments to
4696 no longer mention SIGTRAP.
4698 2015-03-18 Gary Benson <gbenson@redhat.com>
4700 * server.c (handle_query): Do not report vFile:fstat as supported.
4702 2015-03-11 Gary Benson <gbenson@redhat.com>
4704 * hostio.c (sys/types.h): New include.
4705 (sys/stat.h): Likewise.
4706 (common-remote-fileio.h): Likewise.
4707 (handle_fstat): New function.
4708 (handle_vFile): Handle vFile:fstat packets.
4710 2015-03-11 Gary Benson <gbenson@redhat.com>
4712 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4713 struct stat.st_blocks and struct stat.st_blksize.
4714 * configure: Regenerate.
4715 * config.in: Likewise.
4716 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4717 (OBS): Add common-remote-fileio.o.
4718 (common-remote-fileio.o): New rule.
4720 2015-03-09 Pedro Alves <palves@redhat.com>
4722 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4723 'struct sockaddr' pointer in 'accept' call.
4725 2015-03-09 Pedro Alves <palves@redhat.com>
4728 2015-03-07 Pedro Alves <palves@redhat.com>
4729 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4730 or <winsock2.h> here. Instead include "gdb_socket.h".
4731 (remote_open): Use union gdb_sockaddr_u.
4732 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4733 or <winsock2.h> here. Instead include "gdb_socket.h".
4734 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4735 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4737 (init_named_socket, gdb_agent_helper_thread): Use union
4740 2015-03-07 Pedro Alves <palves@redhat.com>
4742 * configure.ac (build_warnings): Move
4743 -Wdeclaration-after-statement to the C-specific set.
4744 * configure: Regenerate.
4746 2015-03-07 Pedro Alves <palves@redhat.com>
4748 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4749 or <winsock2.h> here. Instead include "gdb_socket.h".
4750 (remote_open): Use union gdb_sockaddr_u.
4751 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4752 or <winsock2.h> here. Instead include "gdb_socket.h".
4753 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4754 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4756 (init_named_socket, gdb_agent_helper_thread): Use union
4759 2015-03-07 Pedro Alves <palves@redhat.com>
4761 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4764 2015-03-06 Yao Qi <yao.qi@linaro.org>
4766 * linux-aarch64-low.c (aarch64_insert_point): Use
4767 show_debug_regs as a boolean.
4768 (aarch64_remove_point): Likewise.
4770 2015-03-05 Pedro Alves <palves@redhat.com>
4772 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4773 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4774 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4775 * nto-low.c (nto_target_ops): Likewise.
4776 * spu-low.c (spu_target_ops): Likewise.
4777 * win32-low.c (win32_target_ops): Likewise.
4779 2015-03-04 Pedro Alves <palves@redhat.com>
4781 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4782 Decide whether a breakpoint triggered based on the SIGTRAP's
4784 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4785 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4786 (linux_low_filter_event): Check for breakpoints before checking
4788 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4790 (linux_stopped_by_sw_breakpoint)
4791 (linux_supports_stopped_by_sw_breakpoint)
4792 (linux_stopped_by_hw_breakpoint)
4793 (linux_supports_stopped_by_hw_breakpoint): New functions.
4794 (linux_target_ops): Install new target methods.
4796 2015-03-04 Pedro Alves <palves@redhat.com>
4798 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4799 * server.c (swbreak_feature, hwbreak_feature): New globals.
4800 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4801 (captured_main): Clear swbreak_feature and hwbreak_feature.
4802 * server.h (swbreak_feature, hwbreak_feature): Declare.
4803 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4804 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4805 supports_stopped_by_hw_breakpoint>: New fields.
4806 (target_supports_stopped_by_sw_breakpoint)
4807 (target_stopped_by_sw_breakpoint)
4808 (target_supports_stopped_by_hw_breakpoint)
4809 (target_stopped_by_hw_breakpoint): Declare.
4811 2015-03-04 Pedro Alves <palves@redhat.com>
4813 enum lwp_stop_reason -> enum target_stop_reason
4814 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4815 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4816 (linux_wait_1, stuck_in_jump_pad_callback)
4817 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4818 (linux_stopped_by_watchpoint):
4819 * linux-low.h (enum lwp_stop_reason): Delete.
4820 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4821 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4823 2015-03-04 Yao Qi <yao.qi@linaro.org>
4825 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4827 2015-03-03 Gary Benson <gbenson@redhat.com>
4829 * hostio.c (handle_vFile): Fix prefix lengths.
4831 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4833 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4836 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4838 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4839 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4840 (clean): Add "rm -f" for above C files.
4841 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4842 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4843 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4844 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4845 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4846 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4847 (init_registers_s390x_vx_linux64)
4848 (init_registers_s390x_tevx_linux64)
4849 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4850 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4852 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4853 (s390_store_vxrs_high): New functions.
4854 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4856 (s390_arch_setup): Add logic for selecting one of the new target
4857 descriptions. Activate the new vector regsets if applicable.
4858 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4859 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4860 and init_registers_s390x_tevx_linux64.
4862 2015-03-01 Pedro Alves <palves@redhat.com>
4864 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4867 2015-02-27 Pedro Alves <palves@redhat.com>
4869 * linux-x86-low.c (u_debugreg_offset): New function.
4870 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4872 2015-02-27 Pedro Alves <palves@redhat.com>
4874 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4875 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4876 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4877 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4878 (ps_lsetfpregs, ps_getpid)
4879 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4880 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4881 (ps_lsetxregs, ps_plog): Declare.
4883 2015-02-27 Pedro Alves <palves@redhat.com>
4885 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4886 IP_AGENT_EXPORT_FUNC.
4887 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4888 IP_AGENT_EXPORT_FUNC.
4889 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4890 (IP_AGENT_EXPORT): Delete.
4891 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4892 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4893 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4894 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4895 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4896 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4897 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4898 (traceframe_read_count, traceframe_write_count)
4899 (traceframes_created, trace_state_variables, get_raw_reg)
4900 (get_trace_state_variable_value, set_trace_state_variable_value)
4901 (ust_loaded, helper_thread_id, cmd_buf): Use
4902 IPA_SYM_EXPORTED_NAME.
4903 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4904 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4905 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4906 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4907 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4908 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4909 EXTERN_C_PUSH/EXTERN_C_POP.
4910 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4911 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4912 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4913 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4914 (traceframe_write_count, traceframe_read_count)
4915 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4916 (about_to_request_buffer_space, get_trace_state_variable_value)
4917 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4918 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4919 EXTERN_C_PUSH/EXTERN_C_POP.
4920 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4921 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4922 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4923 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4924 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4925 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4926 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4927 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4929 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4930 (IP_AGENT_EXPORT_VAR_DECL): Define.
4932 (gdb_agent_get_raw_reg): Declare.
4934 2015-02-27 Tom Tromey <tromey@redhat.com>
4935 Pedro Alves <palves@redhat.com>
4937 Rename symbols whose names are reserved C++ keywords throughout.
4939 2015-02-27 Pedro Alves <palves@redhat.com>
4941 * Makefile.in (COMPILER): New, get it from autoconf.
4942 (CXX): Get from autoconf instead.
4943 (COMPILE.pre): Use COMPILER.
4944 (CC-LD): Rename to ...
4945 (CC_LD): ... this. Use COMPILER.
4946 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4947 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4948 * acinclude.m4: Include build-with-cxx.m4.
4949 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4950 Disable -Werror by default if building in C++ mode.
4951 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4952 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4953 the C++ compiler. Save/restore CXXFLAGS too.
4954 * configure: Regenerate.
4956 2015-02-27 Pedro Alves <palves@redhat.com>
4958 * acinclude.m4: Include libiberty.m4.
4959 * configure.ac: Call libiberty_INIT.
4960 * config.in, configure: Regenerate.
4962 2015-02-26 Pedro Alves <palves@redhat.com>
4964 * linux-low.c (linux_wait_1): When incrementing the PC past a
4965 program breakpoint always use the_low_target.breakpoint_len as
4966 increment, rather than the maximum between that and
4967 the_low_target.decr_pc_after_break.
4969 2015-02-23 Pedro Alves <palves@redhat.com>
4971 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4972 thread was doing a step-over; always adjust the PC if
4973 we stepped over a permanent breakpoint.
4974 (linux_wait_1): If we stepped over breakpoint that was on top of a
4975 permanent breakpoint, manually advance the PC past it.
4977 2015-02-23 Pedro Alves <palves@redhat.com>
4979 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4981 (x86_fill_gregset, x86_store_gregset): Use it when handling
4984 2015-02-20 Pedro Alves <palves@redhat.com>
4986 * thread-db.c: Include "nat/linux-procfs.h".
4987 (thread_db_init): Skip listing new threads if the kernel supports
4988 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4990 2015-02-20 Pedro Alves <palves@redhat.com>
4992 * linux-low.c (status_pending_p_callback): Use ptid_match.
4994 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4996 PR breakpoints/16812
4997 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4998 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4999 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5001 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5003 PR breakpoints/15956
5004 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5006 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5008 * linux-low.c (linux_low_btrace_conf): Print size.
5009 * server.c (handle_btrace_conf_general_set): New.
5010 (hanle_general_set): Call handle_btrace_conf_general_set.
5011 (handle_query): Report Qbtrace-conf:bts:size as supported.
5013 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5015 * linux-low.c (linux_low_enable_btrace): Update parameters.
5016 (linux_low_btrace_conf): New.
5017 (linux_target_ops)<to_btrace_conf>: Initialize.
5018 * server.c (current_btrace_conf): New.
5019 (handle_btrace_enable): Rename to ...
5020 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5021 to target_enable_btrace. Update comment. Update users.
5022 (handle_qxfer_btrace_conf): New.
5023 (qxfer_packets): Add btrace-conf entry.
5024 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5025 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5026 (target_ops)<read_btrace_conf>: New.
5027 (target_enable_btrace): Update parameters.
5028 (target_read_btrace_conf): New.
5030 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5032 * server.c (handle_btrace_general_set): Remove call to
5033 target_supports_btrace.
5034 (supported_btrace_packets): New.
5035 (handle_query): Call supported_btrace_packets.
5036 * target.h: include btrace-common.h.
5037 (btrace_target_info): Removed.
5038 (supports_btrace, target_supports_btrace): Update parameters.
5040 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5042 * Makefile.in (SFILES): Add common/btrace-common.c.
5043 (OBS): Add common/btrace-common.o.
5044 (btrace-common.o): Add build rules.
5045 * linux-low: Include btrace-common.h.
5046 (linux_low_read_btrace): Use struct btrace_data. Call
5047 btrace_data_init and btrace_data_fini.
5049 2015-02-06 Pedro Alves <palves@redhat.com>
5051 * thread-db.c (find_new_threads_callback): Add debug output.
5053 2015-02-04 Pedro Alves <palves@redhat.com>
5055 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5056 (resume_stopped_resumed_lwps): New function.
5057 (linux_wait_for_event_filtered): Use it.
5059 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5061 * Makefile.in (SFILES): Add linux-personality.c.
5062 (linux-personality.o): New rule.
5063 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5064 list of objects to be built.
5065 * linux-low.c: Include nat/linux-personality.h.
5066 (linux_create_inferior): Remove code to disable address space
5067 randomization (moved to ../nat/linux-personality.c). Create
5068 cleanup to disable address space randomization.
5070 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5072 * Makefile.in (posix-strerror.o): New rule.
5073 (mingw-strerror.o): Likewise.
5074 * configure: Regenerated.
5075 * configure.ac: Source file ../common/common.host. Initialize new
5076 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5078 2015-01-14 Yao Qi <yao@codesourcery.com>
5080 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5081 (ppc-linux.o): New rule.
5082 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5083 * configure.ac: AC_CHECK_FUNCS(getauxval).
5084 * config.in: Re-generated.
5085 * configure: Re-generated.
5086 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5087 ppc64_64bit_inferior_p
5089 2015-01-14 Yao Qi <yao@codesourcery.com>
5091 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5092 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5093 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5094 (PT_ORIG_R3, PT_TRAP): Likewise.
5095 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5096 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5097 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5099 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5101 * i387-fp.c (i387_cache_to_xsave): In look over
5102 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5103 zmmh_low_space field by use of zmmh_high_space.
5105 2015-01-09 Pedro Alves <palves@redhat.com>
5107 * linux-low.c (step_over_bkpt): Move higher up in the file.
5108 (handle_extended_wait): Don't store the stop_pc here.
5109 (get_stop_pc): Adjust comments and rename to ...
5110 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5111 stopped for a software breakpoint or hardware breakpoint.
5112 (thread_still_has_status_pending_p): New function.
5113 (status_pending_p_callback): Use
5114 thread_still_has_status_pending_p. If the event is no longer
5115 interesting, resume the LWP.
5116 (handle_tracepoints): Add assert.
5117 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5118 (wstatus_maybe_breakpoint): New function.
5119 (cancel_breakpoint): Delete function.
5120 (check_stopped_by_watchpoint): New function, factored out from
5121 linux_low_filter_event.
5122 (lp_status_maybe_breakpoint): Delete function.
5123 (linux_low_filter_event): Remove filter_ptid argument.
5124 Leave thread group exits pending here. Store the LWP's stop PC.
5125 Always leave events pending.
5126 (linux_wait_for_event_filtered): Pull all events out of the
5127 kernel, and leave them all pending.
5128 (count_events_callback, select_event_lwp_callback): Consider all
5130 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5131 (select_event_lwp): Only give preference to the stepping LWP in
5132 all-stop mode. Adjust comments.
5133 (ignore_event): New function.
5134 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5135 references to cancel_breakpoints. Adjust to renames. Also give
5136 equal priority to all LWPs that have had events in non-stop mode.
5137 If reporting a software breakpoint event, unadjust the LWP's PC.
5138 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5139 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5141 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5142 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5143 (linux_stopped_by_watchpoint): Adjust.
5144 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5145 * linux-low.h (enum lwp_stop_reason): New.
5146 (struct lwp_info) <stop_pc>: Adjust comment.
5147 <stopped_by_watchpoint>: Delete field.
5148 <stop_reason>: New field.
5149 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5150 * mem-break.c (software_breakpoint_inserted_here)
5151 (hardware_breakpoint_inserted_here): New function.
5152 * mem-break.h (software_breakpoint_inserted_here)
5153 (hardware_breakpoint_inserted_here): Declare.
5154 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5155 (cancel_breakpoints): Delete.
5156 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5157 (upload_fast_traceframes): Remove references to
5160 2015-01-09 Pedro Alves <palves@redhat.com>
5162 * thread-db.c (find_new_threads_callback): Ignore thread if the
5163 kernel thread ID is -1.
5165 2015-01-09 Pedro Alves <palves@redhat.com>
5167 * linux-low.c (linux_attach_fail_reason_string): Move to
5168 nat/linux-ptrace.c, and rename.
5169 (linux_attach_lwp): Update comment.
5170 (attach_proc_task_lwp_callback): New function.
5171 (linux_attach): Adjust to rename and use
5172 linux_proc_attach_tgid_threads.
5173 (linux_attach_fail_reason_string): Delete declaration.
5175 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5177 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5178 * server.c (gdbserver_version): Likewise.
5180 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5182 * remote-utils.c: Include ctype.h.
5183 (input_interrupt): Explicitly handle the case when the char
5184 received is the NUL byte. Improve the printing of non-ASCII
5187 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5189 * linux-low.c (linux_low_filter_event): Update call to
5190 linux_enable_event_reporting following the addition of
5191 a new parameter to that function.
5193 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5196 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5197 (AARCH64_FPCR_REGNO): Likewise.
5198 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5199 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5200 (aarch64_store_fpregset): Likewise.
5202 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5204 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5205 Remove FIXME comment about assumption about N.
5207 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5209 * configure.ac: If large-file support is disabled in GDBserver,
5210 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5211 * configure: Regenerate.
5213 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5215 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5216 warning upon ENODATA from ptrace.
5217 * linux-s390-low.c (s390_store_tdb): New.
5218 (s390_regsets): Add regset for NT_S390_TDB.
5220 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5222 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5223 without a fill_function.
5224 * linux-s390-low.c (s390_fill_last_break): Remove.
5225 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5226 (s390_arch_setup): Use regset's size instead of fill_function for
5229 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5231 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5232 the regset's store function when ptrace returned an error.
5233 * regcache.c (get_thread_regcache): Invalidate register cache
5234 before fetching inferior's registers.
5236 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5238 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5239 while-loop as for-loop.
5240 (regsets_store_inferior_registers): Likewise.
5242 2014-11-28 Yao Qi <yao@codesourcery.com>
5244 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5245 * config.in, configure: Re-generate.
5246 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5249 2014-11-21 Yao Qi <yao@codesourcery.com>
5251 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5252 (AC_CHECK_HEADERS): Remove malloc.h.
5253 * configure: Re-generated.
5254 * config.in: Re-generated.
5255 * server.h: Don't include alloca.h and malloc.h.
5256 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5257 Don't include malloc.h.
5259 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5261 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5262 corresponding ERRNO check in same block.
5264 2014-11-12 Pedro Alves <palves@redhat.com>
5266 * server.c (cont_thread): Update comment.
5267 (start_inferior, attach_inferior): No longer clear cont_thread.
5268 (handle_v_cont): No longer set cont_thread.
5269 (captured_main): Clear cont_thread each time a GDB connects.
5271 2014-11-12 Pedro Alves <palves@redhat.com>
5273 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5274 thread, and don't resume all threads if the Hc thread has exited.
5276 2014-11-12 Pedro Alves <palves@redhat.com>
5278 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5279 the process group instead of to a specific LWP.
5281 2014-10-15 Pedro Alves <palves@redhat.com>
5284 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5286 (arm_set_thread_context): Delete.
5287 (the_low_target): Adjust.
5288 * win32-i386-low.c (debug_registers_changed)
5289 (debug_registers_used): Delete.
5290 (update_debug_registers_callback): New function.
5291 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5292 needing to update their debug registers.
5293 (win32_get_current_dr): New function.
5294 (x86_dr_low_get_addr, x86_dr_low_get_control)
5295 (x86_dr_low_get_status): Fetch the debug register from the thread
5297 (i386_initial_stuff): Adjust.
5298 (i386_get_thread_context): Remove current_event parameter. Don't
5299 clear debug_registers_changed nor copy DR values to
5301 (i386_set_thread_context): Delete.
5302 (i386_prepare_to_resume): New function.
5303 (i386_thread_added): Mark the thread as needing to update irs
5305 (the_low_target): Remove i386_set_thread_context and install
5306 i386_prepare_to_resume.
5307 * win32-low.c (win32_get_thread_context): Adjust.
5308 (win32_set_thread_context): Use SetThreadContext
5310 (win32_prepare_to_resume): New function.
5311 (win32_require_context): New function, factored out from ...
5312 (thread_rec): ... this.
5313 (continue_one_thread): Call win32_prepare_to_resume on each thread
5314 we're about to continue.
5315 (win32_resume): Call win32_prepare_to_resume on the event thread.
5316 * win32-low.h (struct win32_thread_info)
5317 <debug_registers_changed>: New field.
5318 (struct win32_target_ops): Change prototype of set_thread_context,
5319 delete set_thread_context and add prepare_to_resume.
5320 (win32_require_context): New declaration.
5322 2014-10-08 Gary Benson <gbenson@redhat.com>
5324 * server.h: Do not include common-exceptions.h.
5326 2014-10-08 Gary Benson <gbenson@redhat.com>
5328 * server.h: Do not include cleanups.h.
5330 2014-09-30 James Hogan <james.hogan@imgtec.com>
5332 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5335 2014-09-23 Yao Qi <yao@codesourcery.com>
5337 * linux-low.c (lp_status_maybe_breakpoint): New function.
5338 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5339 (count_events_callback): Likewise.
5340 (select_event_lwp_callback): Likewise.
5341 (cancel_breakpoints_callback): Likewise.
5343 2014-09-19 Don Breazeal <donb@codesourcery.com>
5345 * linux-low.c (handle_extended_wait): Call
5346 linux_ptrace_get_extended_event.
5347 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5348 linux_is_extended_waitstatus.
5350 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5352 * Makefile.in (CPPFLAGS): Define.
5353 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5354 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5356 2014-09-16 Gary Benson <gbenson@redhat.com>
5358 * inferiors.h (current_inferior): Renamed as...
5359 (current_thread): New variable. All uses updated.
5360 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5361 (maybe_move_out_of_jump_pad): Likewise.
5362 (cancel_breakpoint): Likewise.
5363 (linux_low_filter_event): Likewise.
5364 (wait_for_sigstop): Likewise.
5365 (linux_resume_one_lwp): Likewise.
5366 (need_step_over_p): Likewise.
5367 (start_step_over): Likewise.
5368 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5369 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5370 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5371 and save_inferior as saved_thread.
5372 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5374 (regcache_invalidate_thread): Likewise.
5375 * remote-utils.c (prepare_resume_reply): Likewise.
5376 * thread-db.c (thread_db_get_tls_address): Likewise.
5377 (disable_thread_event_reporting): Likewise.
5378 (remove_thread_event_breakpoints): Likewise.
5379 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5381 * target.h (set_desired_inferior): Renamed as...
5382 (set_desired_thread): New declaration. All uses updated.
5383 * server.c (myresume): Updated comment to reference thread instead
5385 (handle_serial_event): Likewise.
5386 (handle_target_event): Likewise.
5388 2014-09-12 Tom Tromey <tromey@redhat.com>
5389 Gary Benson <gbenson@redhat.com>
5391 * regcache.h: Include common-regcache.h.
5392 (regcache_read_pc): Don't declare.
5393 * regcache.c (get_thread_regcache_for_ptid): New function.
5395 2014-09-11 Tom Tromey <tromey@redhat.com>
5396 Gary Benson <gbenson@redhat.com>
5398 * symbol.c: New file.
5399 * Makefile.in (SFILES): Add symbol.c.
5400 (OBS): Add symbol.o.
5402 2014-09-11 Gary Benson <gbenson@redhat.com>
5404 * target.c (target_stop_ptid, target_continue_ptid): New
5407 2014-09-11 Tom Tromey <tromey@redhat.com>
5408 Gary Benson <gbenson@redhat.com>
5410 * target.h: Include target/target.h.
5411 * target.c (target_read_memory, target_read_uint32)
5412 (target_write_memory): New functions.
5414 2014-09-11 Gary Benson <gbenson@redhat.com>
5416 * server.h (debug_hw_points): Don't declare.
5417 * server.c (debug_hw_points): Don't define. Replace all uses
5418 with show_debug_regs.
5419 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5420 all uses with show_debug_regs.
5422 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5424 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5425 endianness into account.
5426 (ppc_supply_ptrace_register): Likewise.
5428 2014-09-03 James Hogan <james.hogan@imgtec.com>
5430 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5431 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5433 2014-09-03 Gary Benson <gbenson@redhat.com>
5435 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5436 ALL_DEBUG_ADDRESS_REGISTERS.
5438 2014-09-02 Gary Benson <gbenson@redhat.com>
5440 * i386-low.h: Renamed as...
5441 * x86-low.h: New file. All type, function and variable name
5442 prefixes changed from "i386_" to "x86_". All references updated.
5443 * i386-low.c: Renamed as...
5444 * x86-low.c: New file. All type, function and variable name
5445 prefixes changed from "i386_" to "x86_". All references updated.
5447 2014-09-02 Gary Benson <gbenson@redhat.com>
5449 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5450 (x86_linux_new_thread): Likewise.
5452 2014-08-29 Gary Benson <gbenson@redhat.com>
5454 * server.h (setjmp.h): Do not include.
5455 (toplevel): Do not declare.
5456 (common-exceptions.h): Include.
5457 (cleanups.h): Likewise.
5458 * server.c (toplevel): Do not define.
5459 (exit_code): New static global.
5460 (detach_or_kill_for_exit_cleanup): New function.
5461 (main): New function. Original main renamed to...
5462 (captured_main): New function.
5463 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5465 2014-08-29 Gary Benson <gbenson@redhat.com>
5467 * Makefile.in (SFILES): Add common/common-exceptions.c.
5468 (OBS): Add common-exceptions.o.
5469 (common-exceptions.o): New rule.
5470 * utils.c (prepare_to_throw_exception): New function.
5472 2014-08-29 Gary Benson <gbenson@redhat.com>
5474 * config.in: Regenerate.
5475 * configure: Likewise.
5477 2014-08-29 Gary Benson <gbenson@redhat.com>
5479 * Makefile.in (SFILES): Add common/cleanups.c.
5481 (cleanups.o): New rule.
5483 2014-08-29 Gary Benson <gbenson@redhat.com>
5485 * utils.c (internal_vwarning): New function.
5487 2014-08-28 Gary Benson <gbenson@redhat.com>
5489 * utils.h (fatal): Remove declaration.
5490 * utils.c (fatal): Remove function.
5492 2014-08-28 Gary Benson <gbenson@redhat.com>
5494 * tracepoint.c (gdb_agent_init): Replace fatal with
5496 (initialize_tracepoint): Likewise.
5498 2014-08-28 Gary Benson <gbenson@redhat.com>
5500 * remote-utils.c (remote_prepare): Replace fatal with error.
5502 2014-08-28 Gary Benson <gbenson@redhat.com>
5504 * linux-low.c (linux_async): Replace fatal with warning.
5506 (linux_start_non_stop): Return -1 if linux_async failed.
5508 2014-08-28 Gary Benson <gbenson@redhat.com>
5510 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5512 (i386_dr_low_get_addr): Remove vague comment.
5513 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5516 2014-08-28 Gary Benson <gbenson@redhat.com>
5518 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5519 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5521 (linux_resume_one_lwp): Likewise.
5522 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5524 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5525 with internal_error.
5526 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5527 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5528 (find_register_by_name): Replace fatal with internal_error.
5529 (find_regno): Likewise.
5530 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5531 * thread-db.c (thread_db_create_event): Likewise.
5532 (thread_db_load_search): Likewise.
5533 (try_thread_db_load_1): Likewise.
5534 * tracepoint.c (get_jump_space_head): Replace fatal with
5536 (claim_trampoline_space): Likewise.
5537 (have_fast_tracepoint_trampoline_buffer): Likewise.
5538 (cmd_qtstart): Likewise.
5539 (stop_tracing): Likewise.
5540 (fast_tracepoint_collecting): Likewise.
5541 (target_malloc): Likewise.
5542 (download_tracepoint): Likewise.
5543 (download_trace_state_variables): Replace check with gdb_assert.
5544 (upload_fast_traceframes): Replace fatal with internal_error.
5546 2014-08-19 Tom Tromey <tromey@redhat.com>
5547 Gary Benson <gbenson@redhat.com>
5549 * Makefile.in (SFILES): Add common/common-debug.c.
5550 (OBS): Add common-debug.o.
5551 (common-debug.o): New rule.
5552 * debug.h (debug_printf): Don't declare.
5553 * debug.c (debug_printf): Renamed and rewritten as...
5554 (debug_vprintf): New function.
5556 2014-08-19 Gary Benson <gbenson@redhat.com>
5558 * utils.h: Do not include print-utils.h.
5560 2014-08-19 Tom Tromey <tromey@redhat.com>
5561 Gary Benson <gbenson@redhat.com>
5563 * server.h: Add static assertion.
5564 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5566 2014-08-19 Tom Tromey <tromey@redhat.com>
5567 Gary Benson <gbenson@redhat.com>
5569 * Makefile.in (SFILES): Add common/errors.c.
5570 (OBS): Add errors.o.
5571 (IPA_OBS): Add errors-ipa.o.
5572 (errors.o): New rule.
5573 (errors-ipa.o): Likewise.
5574 * utils.h (perror_with_name, error, warning): Don't declare.
5575 * utils.c (warning): Renamed and rewritten as...
5576 (vwarning): New function.
5577 (error): Renamed and rewritten as...
5578 (verror): New function.
5579 (internal_error): Renamed and rewritten as...
5580 (internal_verror): New function.
5582 2014-08-07 Gary Benson <gbenson@redhat.com>
5584 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5585 * configure: Regenerate.
5586 * config.in: Likewise.
5587 * server.h: Do not include errno.h.
5588 * event-loop.c: Likewise.
5589 * hostio-errno.c: Likewise.
5590 * linux-low.c: Likewise.
5591 * remote-utils.c: Likewise.
5592 * spu-low.c: Likewise.
5593 * utils.c: Likewise.
5594 * gdbreplay.c: Unconditionally include errno.h.
5596 2014-08-07 Gary Benson <gbenson@redhat.com>
5598 * server.h: Do not include string.h.
5599 * event-loop.c: Likewise.
5600 * linux-low.c: Likewise.
5601 * regcache.c: Likewise.
5602 * remote-utils.c: Likewise.
5603 * spu-low.c: Likewise.
5604 * utils.c: Likewise.
5606 2014-08-07 Gary Benson <gbenson@redhat.com>
5608 * server.h: Do not include gdb_assert.h.
5610 2014-08-07 Gary Benson <gbenson@redhat.com>
5612 * server.h: Do not include common-utils.h.
5614 2014-08-07 Gary Benson <gbenson@redhat.com>
5616 * server.h: Do not include ptid.h.
5617 * notif.h: Likewise.
5619 2014-08-07 Gary Benson <gbenson@redhat.com>
5621 * server.h: Do not include gdb_locale.h.
5623 2014-08-07 Gary Benson <gbenson@redhat.com>
5625 * server.h: Do not include gdb/signals.h.
5626 * win32-low.c: Likewise.
5628 2014-08-07 Gary Benson <gbenson@redhat.com>
5630 * server.h: Do not include pathmax.h.
5632 2014-08-07 Gary Benson <gbenson@redhat.com>
5634 * server.h: Do not include libiberty.h.
5635 * linux-bfin-low.c: Likewise.
5637 2014-08-07 Gary Benson <gbenson@redhat.com>
5639 * server.h: Do not include ansidecl.h.
5641 2014-08-07 Gary Benson <gbenson@redhat.com>
5643 * linux-x86-low.c: Do not include stddef.h.
5644 * lynx-ppc-low.c: Likewise.
5645 * tracepoint.c: Likewise.
5647 2014-08-07 Gary Benson <gbenson@redhat.com>
5649 * server.h: Do not include stdarg.h.
5650 * nto-low.c: Likewise.
5652 2014-08-07 Gary Benson <gbenson@redhat.com>
5654 * server.h: Do not include stdlib.h.
5655 * inferiors.c: Likewise.
5656 * linux-low.c: Likewise.
5657 * regcache.c: Likewise.
5658 * spu-low.c: Likewise.
5659 * tracepoint.c: Likewise.
5660 * utils.c: Likewise.
5662 2014-08-07 Gary Benson <gbenson@redhat.com>
5664 * server.h: Do not include stdio.h.
5665 * linux-low.c: Likewise.
5666 * remote-utils.c: Likewise.
5667 * spu-low.c: Likewise.
5668 * utils.c: Likewise.
5669 * wincecompat.c: Likewise.
5671 2014-08-06 Gary Benson <gbenson@redhat.com>
5673 * regcache.c (init_register_cache): Move conditionals inside if.
5675 2014-08-06 Gary Benson <gbenson@redhat.com>
5677 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5679 2014-07-31 Gary Benson <gbenson@redhat.com>
5681 * ax.h: Do not include server.h.
5682 * gdbthread.h: Likewise.
5683 * lynx-low.h: Likewise.
5684 * notif.h: Likewise.
5686 2014-07-30 Gary Benson <gbenson@redhat.com>
5688 * server.h: Include common-defs.h.
5689 Do not include config.h or build-gnulib-gdbserver/config.h.
5691 2014-07-30 Gary Benson <gbenson@redhat.com>
5693 * hostio-errno.c: Move server.h to top of includes list.
5694 * inferiors.c: Likewise.
5695 * linux-x86-low.c: Likewise.
5696 * notif.c: Include server.h.
5698 2014-07-24 Tom Tromey <tromey@redhat.com>
5699 Gary Benson <gbenson@redhat.com>
5701 * server.h (CORE_ADDR): Now unsigned.
5703 2014-07-16 Pedro Alves <palves@redhat.com>
5705 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5707 2014-07-15 Pedro Alves <palves@redhat.com>
5709 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5712 2014-07-11 Pedro Alves <palves@redhat.com>
5714 * linux-low.c (kill_wait_lwp): New function, based on
5715 kill_one_lwp_callback, but use my_waitpid directly.
5716 (kill_one_lwp_callback, linux_kill): Use it.
5718 2014-06-23 Pedro Alves <palves@redhat.com>
5720 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5721 before setting DR0..DR3.
5723 2014-06-20 Gary Benson <gbenson@redhat.com>
5725 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5726 * configure: Regenerated.
5727 * config.in: Likewise.
5729 2014-06-20 Gary Benson <gbenson@redhat.com>
5731 * Makefile.in (SFILES): Update locations for files moved
5733 (object file files): Reordered.
5735 2014-06-20 Gary Benson <gbenson@redhat.com>
5737 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5738 (i386_dr_low_set_addr): Likewise.
5739 (i386_dr_low_get_addr): Likewise.
5740 (i386_dr_low_can_set_control): Likewise.
5741 (i386_dr_low_set_control): Likewise.
5742 (i386_dr_low_get_control): Likewise.
5743 (i386_dr_low_get_status): Likewise.
5744 (i386_get_debug_register_length): Likewise.
5745 * linux-x86-low.c (i386_dr_low_set_addr):
5746 Changed signature. Made static.
5747 (i386_dr_low_get_addr): Likewise.
5748 (i386_dr_low_set_control): Likewise.
5749 (i386_dr_low_get_control): Likewise.
5750 (i386_dr_low_get_status): Likewise.
5751 (i386_dr_low): New global variable.
5752 * win32-i386-low.c (i386_dr_low_set_addr):
5753 Changed signature. Made static.
5754 (i386_dr_low_get_addr): Likewise.
5755 (i386_dr_low_set_control): Likewise.
5756 (i386_dr_low_get_control): Likewise.
5757 (i386_dr_low_get_status): Likewise.
5758 (i386_dr_low): New global variable.
5760 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5762 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5763 * Makefile.in (AR, AR_FLAGS): Define.
5764 * configure: Regenerate.
5766 2014-06-19 Gary Benson <gbenson@redhat.com>
5768 * Makefile.in (i386-dregs.o): New rule.
5769 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5770 * i386-low.c (target.h): Remove include.
5771 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5772 (DR_CONTROL_SHIFT): Likewise.
5773 (DR_CONTROL_SIZE): Likewise.
5774 (DR_RW_EXECUTE): Likewise.
5775 (DR_RW_WRITE): Likewise.
5776 (DR_RW_READ): Likewise.
5777 (DR_RW_IORW): Likewise.
5778 (DR_LEN_1): Likewise.
5779 (DR_LEN_2): Likewise.
5780 (DR_LEN_4): Likewise.
5781 (DR_LEN_8): Likewise.
5782 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5783 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5784 (DR_ENABLE_SIZE): Likewise.
5785 (DR_LOCAL_SLOWDOWN): Likewise.
5786 (DR_GLOBAL_SLOWDOWN): Likewise.
5787 (DR_CONTROL_RESERVED): Likewise.
5788 (I386_DR_CONTROL_MASK): Likewise.
5789 (I386_DR_VACANT): Likewise.
5790 (I386_DR_LOCAL_ENABLE): Likewise.
5791 (I386_DR_GLOBAL_ENABLE): Likewise.
5792 (I386_DR_DISABLE): Likewise.
5793 (I386_DR_SET_RW_LEN): Likewise.
5794 (I386_DR_GET_RW_LEN): Likewise.
5795 (I386_DR_WATCH_HIT): Likewise.
5796 (i386_wp_op_t): Likewise.
5797 (i386_show_dr): Likewise.
5798 (i386_length_and_rw_bits): Likewise.
5799 (i386_insert_aligned_watchpoint): Likewise.
5800 (i386_remove_aligned_watchpoint): Likewise.
5801 (i386_handle_nonaligned_watchpoint): Likewise.
5802 i386_update_inferior_debug_regs(): Likewise.
5803 (i386_dr_insert_watchpoint): Likewise.
5804 (i386_dr_remove_watchpoint): Likewise.
5805 (i386_dr_region_ok_for_watchpoint): Likewise.
5806 (i386_dr_stopped_data_address): Likewise.
5807 (i386_dr_stopped_by_watchpoint): Likewise.
5809 2014-06-19 Gary Benson <gbenson@redhat.com>
5811 * i386-low.c (i386_dr_show): Renamed to
5812 i386_show_dr and made static. All uses updated.
5813 (i386_dr_length_and_rw_bits): Renamed to
5814 i386_length_and_rw_bits and made static.
5816 (i386_dr_insert_aligned_watchpoint): Renamed to
5817 i386_insert_aligned_watchpoint and made static.
5819 (i386_dr_remove_aligned_watchpoint): Renamed to
5820 i386_remove_aligned_watchpoint and made static.
5822 (i386_dr_update_inferior_debug_regs): Renamed to
5823 i386_update_inferior_debug_regs and made static.
5826 2014-06-18 Gary Benson <gbenson@redhat.com>
5828 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5829 (i386_dr_low_can_set_control): Likewise.
5830 (i386_get_debug_register_length): Likewise.
5831 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5832 (i386_dr_low_can_set_control): Likewise.
5833 (i386_get_debug_register_length): Likewise.
5835 2014-06-17 Gary Benson <gbenson@redhat.com>
5837 * i386-low.h (i386-dregs.h): New include.
5838 (DR_FIRSTADDR): Now in i386-dregs.h.
5839 (DR_LASTADDR): Likewise.
5840 (DR_NADDR): Likewise.
5841 (DR_STATUS): Likewise.
5842 (DR_CONTROL): Likewise.
5843 (i386_debug_reg_state): Likewise.
5844 (i386_dr_insert_watchpoint): Likewise.
5845 (i386_dr_remove_watchpoint): Likewise.
5846 (i386_dr_region_ok_for_watchpoint): Likewise.
5847 (i386_dr_stopped_data_address): Likewise.
5848 (i386_dr_stopped_by_watchpoint): Likewise.
5849 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5851 2014-06-18 Gary Benson <gbenson@redhat.com>
5853 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5854 i386_dr_insert_watchpoint.
5855 (i386_low_remove_watchpoint): Renamed to
5856 i386_dr_remove_watchpoint.
5857 (i386_low_region_ok_for_watchpoint): Renamed to
5858 i386_dr_region_ok_for_watchpoint.
5859 (i386_low_stopped_data_address): Renamed to
5860 i386_dr_stopped_data_address.
5861 (i386_low_stopped_by_watchpoint): Renamed to
5862 i386_dr_stopped_by_watchpoint.
5863 * i386-low.c (i386_show_dr): Renamed to
5864 i386_dr_show and made nonstatic. All uses updated.
5865 (i386_length_and_rw_bits): Renamed to
5866 i386_dr_length_and_rw_bits and made nonstatic.
5868 (i386_insert_aligned_watchpoint): Renamed to
5869 i386_dr_insert_aligned_watchpoint and made nonstatic.
5871 (i386_remove_aligned_watchpoint): Renamed to
5872 i386_dr_remove_aligned_watchpoint and made nonstatic.
5874 (i386_update_inferior_debug_regs): Renamed to
5875 i386_dr_update_inferior_debug_regs and made nonstatic.
5877 (i386_low_insert_watchpoint): Renamed to
5878 i386_dr_insert_watchpoint. All uses updated.
5879 (i386_low_remove_watchpoint): Renamed to
5880 i386_dr_remove_watchpoint. All uses updated.
5881 (i386_low_region_ok_for_watchpoint): Renamed to
5882 i386_dr_region_ok_for_watchpoint. All uses updated.
5883 (i386_low_stopped_data_address): Renamed to
5884 i386_dr_stopped_data_address. All uses updated.
5885 (i386_low_stopped_by_watchpoint): Renamed to
5886 i386_dr_stopped_by_watchpoint. All uses updated.
5888 2014-06-18 Gary Benson <gbenson@redhat.com>
5890 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5891 (i386_dr_low_can_set_control): Likewise.
5892 (i386_insert_aligned_watchpoint): New check.
5894 2014-06-18 Gary Benson <gbenson@redhat.com>
5896 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5899 2014-06-18 Gary Benson <gbenson@redhat.com>
5901 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5902 instead of fatal and error.
5903 (i386_handle_nonaligned_watchpoint): Likewise.
5905 2014-06-18 Gary Benson <gbenson@redhat.com>
5907 * i386-low.c (i386_get_debug_register_length): New macro.
5908 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5909 (i386_show_dr): Use debug_printf instead of fprintf. Use
5910 phex to format values.
5912 2014-06-18 Gary Benson <gbenson@redhat.com>
5914 * i386-low.h: Comment changes.
5915 * i386-low.c: Likewise.
5917 2014-06-18 Gary Benson <gbenson@redhat.com>
5919 * i386-low.c: Whitespace changes.
5921 2014-06-12 Tom Tromey <tromey@redhat.com>
5923 * utils.c (freeargv): Remove.
5925 2014-06-12 Tom Tromey <tromey@redhat.com>
5927 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5928 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5929 (parse_debug_format_options): Likewise.
5930 (gdbserver_usage): Likewise.
5931 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5932 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5933 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5935 ($(LIBGNU)): Depend on libiberty.
5936 (all-lib): Recurse into all subdirs.
5937 (install-only): Invoke "install" target in subdirs.
5938 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5940 * configure: Rebuild.
5941 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5942 for vasprintf, vsnprintf, or gettimeofday.
5943 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5946 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5948 * development.sh: Delete.
5949 * Makefile.in (config.status): Adjust dependency on development.sh.
5950 * configure.ac: Adjust development.sh source call.
5951 * configure: Regenerate.
5953 2014-06-02 Pedro Alves <palves@redhat.com>
5955 * ax.c (gdb_free_agent_expr): New function.
5956 * ax.h (gdb_free_agent_expr): New declaration.
5957 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5959 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5961 (clear_breakpoint_conditions_and_commands): New function.
5962 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5963 (clear_breakpoint_conditions_and_commands): New declaration.
5965 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5967 * linux-aarch64-low.c (asm/ptrace.h): Include.
5969 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5971 Fix TLS access for -static -pthread.
5972 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5973 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5974 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5976 2014-05-20 Pedro Alves <palves@redhat.com>
5978 * linux-aarch64-low.c (aarch64_insert_point)
5979 (aarch64_remove_point): No longer check whether the type is
5980 supported here. Adjust to new interface.
5981 (the_low_target): Install aarch64_supports_z_point_type as
5982 supports_z_point_type method.
5983 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5984 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5985 instead of a Z packet char. Adjust.
5986 (arm_supports_z_point_type): New function.
5987 (arm_insert_point, arm_remove_point): Adjust to new interface.
5988 (the_low_target): Install arm_supports_z_point_type.
5989 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5990 (cris_insert_point, cris_remove_point): Adjust to new interface.
5991 Don't check whether the type is supported here.
5992 (the_low_target): Install cris_supports_z_point_type.
5993 * linux-low.c (linux_supports_z_point_type): New function.
5994 (linux_insert_point, linux_remove_point): Adjust to new interface.
5995 * linux-low.h (struct linux_target_ops) <insert_point,
5996 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5997 raw_breakpoint pointer parameter.
5998 <supports_z_point_type>: New method.
5999 * linux-mips-low.c (mips_supports_z_point_type): New function.
6000 (mips_insert_point, mips_remove_point): Adjust to new interface.
6001 Use mips_supports_z_point_type.
6002 (the_low_target): Install mips_supports_z_point_type.
6003 * linux-ppc-low.c (the_low_target): Install NULL as
6004 supports_z_point_type method.
6005 * linux-s390-low.c (the_low_target): Install NULL as
6006 supports_z_point_type method.
6007 * linux-sparc-low.c (the_low_target): Install NULL as
6008 supports_z_point_type method.
6009 * linux-x86-low.c (x86_supports_z_point_type): New function.
6010 (x86_insert_point): Adjust to new insert_point interface. Use
6011 insert_memory_breakpoint. Adjust to new
6012 i386_low_insert_watchpoint interface.
6013 (x86_remove_point): Adjust to remove_point interface. Use
6014 remove_memory_breakpoint. Adjust to new
6015 i386_low_remove_watchpoint interface.
6016 (the_low_target): Install x86_supports_z_point_type.
6017 * lynx-low.c (lynx_target_ops): Install NULL as
6018 supports_z_point_type callback.
6019 * nto-low.c (nto_supports_z_point_type): New.
6020 (nto_insert_point, nto_remove_point): Adjust to new interface.
6021 (nto_target_ops): Install nto_supports_z_point_type.
6022 * mem-break.c: Adjust intro comment.
6023 (struct raw_breakpoint) <raw_type, size>: New fields.
6024 <inserted>: Update comment.
6025 <shlib_disabled>: Delete field.
6026 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6027 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6028 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6029 (raw_bkpt_type_to_target_hw_bp_type): New function.
6030 (find_enabled_raw_code_breakpoint_at): New function.
6031 (find_raw_breakpoint_at): New type and size parameters. Use them.
6032 (insert_memory_breakpoint): New function, based off
6033 set_raw_breakpoint_at.
6034 (remove_memory_breakpoint): New function.
6035 (set_raw_breakpoint_at): Reimplement.
6036 (set_breakpoint): New, based on set_breakpoint_at.
6037 (set_breakpoint_at): Reimplement.
6038 (delete_raw_breakpoint): Go through the_target->remove_point
6039 instead of assuming memory breakpoints.
6040 (find_gdb_breakpoint_at): Delete.
6041 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6042 (find_gdb_breakpoint): New function.
6043 (set_gdb_breakpoint_at): Delete.
6044 (z_type_supported): New function.
6045 (set_gdb_breakpoint_1): New function, loosely based off
6046 set_gdb_breakpoint_at.
6047 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6048 (delete_gdb_breakpoint_at): Delete.
6049 (delete_gdb_breakpoint_1): New function, loosely based off
6050 delete_gdb_breakpoint_at.
6051 (delete_gdb_breakpoint): New function.
6052 (clear_gdb_breakpoint_conditions): Rename to ...
6053 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6055 (add_condition_to_breakpoint): Make static.
6056 (add_breakpoint_condition): Take a struct breakpoint pointer
6057 instead of an address. Adjust.
6058 (gdb_condition_true_at_breakpoint): Rename to ...
6059 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6061 (gdb_condition_true_at_breakpoint): Reimplement.
6062 (add_breakpoint_commands): Take a struct breakpoint pointer
6063 instead of an address. Adjust.
6064 (gdb_no_commands_at_breakpoint): Rename to ...
6065 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6066 parameter. Return true if no breakpoint was found. Change debug
6068 (gdb_no_commands_at_breakpoint): Reimplement.
6069 (run_breakpoint_commands): Rename to ...
6070 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6071 and change return type to boolean.
6072 (run_breakpoint_commands): New function.
6073 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6074 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6075 breakpoint. Go through the_target->remove_point instead of
6076 assuming memory breakpoint.
6077 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6078 software and hardware breakpoints.
6079 (reinsert_raw_breakpoint): Go through the_target->insert_point
6080 instead of assuming memory breakpoint.
6081 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6082 software and hardware breakpoints.
6083 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6084 Check both software and hardware breakpoints.
6085 (validate_inserted_breakpoint): Assert the breakpoint is a
6086 software breakpoint. Set the inserted flag to -1 instead of
6087 setting shlib_disabled.
6088 (delete_disabled_breakpoints): Adjust.
6089 (validate_breakpoints): Only validate software breakpoints.
6090 Adjust to inserted flag change.
6091 (check_mem_read, check_mem_write): Skip breakpoint types other
6092 than software breakpoints. Adjust to inserted flag change.
6093 * mem-break.h (enum raw_bkpt_type): New enum.
6094 (raw_breakpoint, struct process_info): Forward declare.
6095 (Z_packet_to_target_hw_bp_type): Delete declaration.
6096 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6097 (set_gdb_breakpoint, delete_gdb_breakpoint)
6098 (clear_breakpoint_conditions): New declarations.
6099 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6100 (breakpoint_inserted_here): Update comment.
6101 (add_breakpoint_condition, add_breakpoint_commands): Replace
6102 address parameter with a breakpoint pointer parameter.
6103 (gdb_breakpoint_here): Update comment.
6104 (delete_gdb_breakpoint_at): Delete.
6105 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6106 * server.c (process_point_options): Take a struct breakpoint
6107 pointer instead of an address. Adjust.
6108 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6109 delete_gdb_breakpoint.
6110 * spu-low.c (spu_target_ops): Install NULL as
6111 supports_z_point_type method.
6112 * target.h: Include mem-break.h.
6113 (struct target_ops) <prepare_to_access_memory>: Update comment.
6114 <supports_z_point_type>: New field.
6115 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6116 instead of a char. Also take a raw breakpoint pointer.
6117 * win32-arm-low.c (the_low_target): Install NULL as
6118 supports_z_point_type.
6119 * win32-i386-low.c (i386_supports_z_point_type): New function.
6120 (i386_insert_point, i386_remove_point): Adjust to new interface.
6121 (the_low_target): Install i386_supports_z_point_type.
6122 * win32-low.c (win32_supports_z_point_type): New function.
6123 (win32_insert_point, win32_remove_point): Adjust to new interface.
6124 (win32_target_ops): Install win32_supports_z_point_type.
6125 * win32-low.h (struct win32_target_ops):
6126 <supports_z_point_type>: New method.
6127 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6128 instead of a char. Also take a raw breakpoint pointer.
6130 2014-05-20 Pedro Alves <palves@redhat.com>
6132 * mem-break.h: Include break-common.h.
6133 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6134 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6135 (Z_packet_to_target_hw_bp_type): New declaration.
6136 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6137 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6138 (Z_PACKET_ACCESS_WP): Delete macros.
6139 (Z_packet_to_hw_type): Delete function.
6140 * i386-low.h: Don't include break-common.h here.
6141 (Z_packet_to_hw_type): Delete declaration.
6142 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6143 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6144 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6145 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6146 * linux-aarch64-low.c: Don't include break-common.h here.
6147 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6148 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6149 (Z_packet_to_target_hw_bp_type): Delete function.
6150 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6152 (mips_insert_point, mips_remove_point): Use
6153 Z_packet_to_target_hw_bp_type.
6155 2014-05-20 Pedro Alves <palves@redhat.com>
6157 * linux-aarch64-low.c: Include break-common.h.
6158 (enum target_point_type): Delete.
6159 (Z_packet_to_point_type): Rename to ...
6160 (Z_packet_to_target_hw_bp_type): ... this, and return a
6161 target_hw_bp_type instead.
6162 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6163 instead of an enum target_point_type.
6164 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6166 (aarch64_dr_state_insert_one_point)
6167 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6168 (aarch64_handle_aligned_watchpoint)
6169 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6170 Take an enum target_hw_bp_type instead of an enum
6172 (aarch64_supports_z_point_type): New function.
6173 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6174 use Z_packet_to_target_hw_bp_type.
6176 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6178 * configure.ac: Only use -Werror by default when DEVELOPMENT
6180 * configure: Regenerate.
6182 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6184 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6185 * linux-x86-low.c (X86_64_USER_REGS): New.
6186 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6188 2014-04-28 Yao Qi <yao@codesourcery.com>
6190 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6193 2014-04-25 Pedro Alves <palves@redhat.com>
6196 * linux-low.c (linux_attach_fail_reason_string): New function.
6197 (linux_attach_lwp): Delete.
6198 (linux_attach_lwp_1): Rename to ...
6199 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6200 argument. Remove "initial" parameter. Return int instead of
6201 void. Don't error or warn here.
6202 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6203 failure to attach to the tgid. Call warning when failing to
6205 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6206 argument. Remove "initial" parameter. Return int instead of
6207 void. Don't error or warn here.
6208 (linux_attach_fail_reason_string): New declaration.
6209 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6210 interface change. Use linux_attach_fail_reason_string.
6212 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6213 Walfred Tedeschi <walfred.tedeschi@intel.com>
6215 * Makefile.in: Added rules to handle new files
6216 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6217 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6218 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6219 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6220 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6221 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6223 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6224 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6225 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6226 i386/x32-avx512.xml.
6227 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6228 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6229 i386/x32-avx512-linux.xml.
6230 * i387-fp.c (num_avx512_k_registers): New constant for number
6232 (num_avx512_zmmh_low_registers): New constant for number of
6233 lower ZMM registers (0-15).
6234 (num_avx512_zmmh_high_registers): New constant for number of
6235 higher ZMM registers (16-31).
6236 (num_avx512_ymmh_registers): New contant for number of higher
6237 YMM registers (ymm16-31 added by avx521 on x86_64).
6238 (num_avx512_xmm_registers): New constant for number of higher
6239 XMM registers (xmm16-31 added by AVX512 on x86_64).
6240 (struct i387_xsave): Add space for AVX512 registers.
6241 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6242 Add code to handle AVX512 registers.
6243 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6244 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6245 prototypei from generated file.
6246 (tdesc_amd64_avx512_linux): Likewise.
6247 (init_registers_x32_avx512_linux): Likewise.
6248 (tdesc_x32_avx512_linux): Likewise.
6249 (init_registers_i386_avx512_linux): Likewise.
6250 (tdesc_i386_avx512_linux): Likewise.
6251 (x86_64_regmap): Add AVX512 registers.
6252 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6254 (initialize_low_arch): Add code to initialize AVX512 registers.
6256 2014-04-23 Pedro Alves <palves@redhat.com>
6258 * mem-break.c (find_gdb_breakpoint_at): Make static.
6259 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6261 2014-04-23 Pedro Alves <palves@redhat.com>
6263 * i386-low.c: Don't include break-common.h here.
6264 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6265 prototype to take target_hw_bp_type as argument instead of a Z
6267 * i386-low.h: Include break-common.h here.
6268 (Z_packet_to_hw_type): Declare.
6269 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6271 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6272 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6273 (x86_remove_point): Convert the packet number to a
6274 target_hw_bp_type before calling i386_low_remove_watchpoint.
6275 * win32-i386-low.c (i386_insert_point): Convert the packet number
6276 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6277 (i386_remove_point): Convert the packet number to a
6278 target_hw_bp_type before calling i386_low_remove_watchpoint.
6280 2014-04-23 Pedro Alves <palves@redhat.com>
6282 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6284 2014-04-10 Pedro Alves <palves@redhat.com>
6286 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6287 Check if the condition or command is NULL before checking if the
6288 breakpoint is known. On success, return true.
6289 * mem-break.h (add_breakpoint_condition): Document return.
6290 (add_breakpoint_commands): Add describing comment.
6291 * server.c (skip_to_semicolon): New function.
6292 (process_point_options): Use it.
6294 2014-04-09 Pedro Alves <palves@redhat.com>
6296 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6299 2014-02-27 Pedro Alves <palves@redhat.com>
6302 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6304 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6306 (last_thread_of_process_p): Take a PID argument instead of a
6308 (linux_wait_for_lwp): Delete.
6309 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6311 (linux_low_filter_event): New function, party factored out from
6312 linux_wait_for_event.
6313 (linux_wait_for_event): Rename to ...
6314 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6315 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6316 sigsuspend. Check for zombie leaders.
6317 (linux_wait_for_event): Reimplement as wrapper around
6318 linux_wait_for_event_filtered.
6319 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6320 a normal or signal exit is seen, it's the whole process exiting.
6321 (wait_for_sigstop): No longer a for_each_inferior callback.
6322 Rewrite on top of linux_wait_for_event_filtered.
6323 (stop_all_lwps): Call wait_for_sigstop directly.
6324 * server.c (resume, handle_target_event): Handle
6325 TARGET_WAITKIND_NO_RESUMED.
6327 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6329 * win32-low.c (psapi_get_dll_name,
6330 * win32_CreateToolhelp32Snapshot): Delete.
6331 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6332 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6334 (handle_load_dll): Add function description.
6335 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6337 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6339 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6341 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6342 base address when calling win32_add_one_solib.
6343 (handle_load_dll): Delete local variable load_addr.
6344 Remove 0x1000 offset applied to DLL base address when calling
6345 win32_add_one_solib.
6346 (handle_unload_dll): Add comment.
6348 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6350 * win32-low.c (win32_add_all_dlls): Renames
6351 win32_ensure_ntdll_loaded. Rewrite function documentation.
6352 Adjust implementation to always load all DLLs.
6353 Add 0x1000 offset to DLL base address when calling
6354 win32_add_one_solib.
6355 (child_initialization_done): New static global.
6356 (do_initial_child_stuff): Set child_initialization_done to
6357 zero during child initialization, and 1 after. Replace call
6358 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6360 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6361 (handle_unload_dll): Add function documentation.
6362 (get_child_debug_event): Ignore load and unload DLL events
6363 during child initialization.
6365 2014-02-20 Doug Evans <dje@google.com>
6367 Remove global all_lwps.
6368 * inferiors.h (ptid_of): Move here from linux-low.h.
6369 (pid_of, lwpid_of): Ditto.
6370 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6371 parameter is a struct thread_info * now.
6372 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6373 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6374 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6376 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6377 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6378 * linux-arm-low.c (update_registers_callback): Update, "entry"
6379 parameter is a struct thread_info * now.
6380 Fetch lwpid from current_inferior directly.
6381 (arm_insert_point): Pass &all_threads to find_inferior instead of
6383 (arm_remove_point): Ditto.
6384 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6385 (arm_prepare_to_resume): Fetch pid from thread.
6386 (arm_read_description): Fetch lwpid from current_inferior directly.
6387 * linux-low.c (all_lwps): Delete.
6388 (delete_lwp): Delete call to remove_inferior.
6389 (handle_extended_wait): Fetch lwpid from thread.
6390 (add_lwp): Don't set lwp->entry.id. Remove call to
6391 add_inferior_to_list.
6392 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6393 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6394 (kill_one_lwp_callback): Ditto.
6395 (linux_kill): Don't dereference NULL pointer.
6396 Fetch ptid,lwpid from thread.
6397 (get_detach_signal): Fetch ptid from thread.
6398 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6399 Simplify call to regcache_invalidate_thread.
6400 (delete_lwp_callback): Update, "entry" parameter is a
6401 struct thread_info * now. Fetch pid from thread.
6402 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6403 (status_pending_p_callback): Update, "entry" parameter is a
6404 struct thread_info * now. Fetch ptid from thread.
6405 (find_lwp_pid): Update, "entry" parameter is a
6406 struct thread_info * now.
6407 (linux_wait_for_lwp): Fetch pid from thread.
6408 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6409 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6410 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6411 (dequeue_one_deferred_signal): Ditto.
6412 (cancel_breakpoint): Fetch ptid from current_inferior.
6413 (linux_wait_for_event): Pass &all_threads to find_inferior,
6414 not &all_lwps. Fetch ptid, lwpid from thread.
6415 (count_events_callback): Update, "entry" parameter is a
6416 struct thread_info * now.
6417 (select_singlestep_lwp_callback): Ditto.
6418 (select_event_lwp_callback): Ditto.
6419 (cancel_breakpoints_callback): Ditto.
6420 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6422 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6423 (unsuspend_one_lwp): Update, "entry" parameter is a
6424 struct thread_info * now.
6425 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6427 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6428 Fetch lwpid from thread, not lwp.
6429 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6430 Pass &all_threads to find_inferior, not &all_lwps.
6431 (send_sigstop): Fetch lwpid from thread, not lwp.
6432 (send_sigstop_callback): Update, "entry" parameter is a
6433 struct thread_info * now.
6434 (suspend_and_send_sigstop_callback): Ditto.
6435 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6436 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6437 struct thread_info * now.
6438 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6440 (lwp_running): Update, "entry" parameter is a
6441 struct thread_info * now.
6442 (stop_all_lwps): Fetch ptid from thread.
6443 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6444 (linux_resume_one_lwp): Fetch lwpid from thread.
6445 (linux_set_resume_request): Update, "entry" parameter is a
6446 struct thread_info * now. Fetch pid, lwpid from thread.
6447 (resume_status_pending_p): Update, "entry" parameter is a
6448 struct thread_info * now.
6449 (need_step_over_p): Ditto. Fetch lwpid from thread.
6450 (start_step_over): Fetch lwpid from thread.
6451 (linux_resume_one_thread): Update, "entry" parameter is a
6452 struct thread_info * now. Fetch lwpid from thread.
6453 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6454 (proceed_one_lwp): Update, "entry" parameter is a
6455 struct thread_info * now. Fetch lwpid from thread.
6456 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6457 struct thread_info * now.
6458 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6459 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6460 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6462 (regsets_store_inferior_registers): Ditto.
6463 (fetch_register, store_register): Ditto.
6464 (linux_read_memory, linux_write_memory): Ditto.
6465 (linux_request_interrupt): Ditto.
6466 (linux_read_auxv): Ditto.
6467 (linux_xfer_siginfo): Ditto.
6468 (linux_qxfer_spu): Ditto.
6469 (linux_qxfer_libraries_svr4): Ditto.
6470 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6471 moved to inferiors.h.
6473 (get_thread_lwp): Update.
6474 (struct lwp_info): Delete member "entry". Simplify comment for
6477 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6478 current_inferior directly.
6479 (update_watch_registers_callback): Update, "entry" parameter is a
6480 struct thread_info * now. Fetch pid from thread.
6481 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6482 (mips_insert_point): Fetch lwpid from current_inferior.
6483 Pass &all_threads to find_inferior, not &all_lwps.
6484 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6485 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6487 (mips_stopped_data_address): Ditto.
6488 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6490 * linux-tile-low.c (tile_arch_setup): Ditto.
6491 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6492 (update_debug_registers_callback): Update, "entry" parameter is a
6493 struct thread_info * now. Fetch pid from thread.
6494 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6495 Pass &all_threads to find_inferior, not &all_lwps.
6496 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6497 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6498 Pass &all_threads to find_inferior, not &all_lwps.
6499 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6500 (i386_dr_low_get_status): Ditto.
6501 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6502 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6503 (x86_linux_read_description): Ditto.
6504 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6506 2014-02-20 Doug Evans <dje@google.com>
6508 * inferiors.c (get_first_inferior): Fix buglet.
6510 2014-02-19 Doug Evans <dje@google.com>
6512 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6513 * inferiors.c (add_thread): Change result type to struct thread_info *.
6514 All callers updated.
6515 (add_lwp): Call add_thread here instead of in callers.
6516 All callers updated.
6517 * linux-low.h (get_lwp_thread): Rewrite.
6518 (struct lwp_info): New member "thread".
6520 2014-02-19 Doug Evans <dje@google.com>
6522 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6523 All callers updated.
6525 2014-02-19 Doug Evans <dje@google.com>
6527 * inferiors.c (add_thread): Fix whitespace.
6529 2014-02-19 Doug Evans <dje@google.com>
6531 * dll.c (clear_dlls): Replace accessing list implemention details
6533 * gdbthread.h (get_first_thread): Declare.
6534 * inferiors.c (for_each_inferior_with_data): New function.
6535 (get_first_thread): New function.
6536 (find_thread_ptid): Simplify.
6537 (get_first_inferior): New function.
6538 (clear_list): Delete.
6539 (one_inferior_p): New function.
6540 (clear_inferior_list): New function.
6541 (clear_inferiors): Update.
6542 * inferiors.h (for_each_inferior_with_data): Declare.
6543 (clear_inferior_list): Declare.
6544 (one_inferior_p): Declare.
6545 (get_first_inferior): Declare.
6546 * linux-low.c (linux_wait_for_event): Replace accessing list
6547 implemention details with API function.
6548 * server.c (target_running): Ditto.
6549 (accumulate_file_name_length): New function.
6550 (emit_dll_description): New function.
6551 (handle_qxfer_libraries): Replace accessing list implemention
6552 details with API function.
6553 (handle_qxfer_threads_worker): New function.
6554 (handle_qxfer_threads_proper): Replace accessing list implemention
6555 details with API function.
6556 (handle_query): Ditto.
6557 (visit_actioned_threads_callback_ftype): New typedef.
6558 (visit_actioned_threads_data): New struct.
6559 (visit_actioned_threads): Rewrite to be find_inferior callback.
6560 (resume): Call find_inferior.
6561 (handle_status): Replace accessing list implemention
6562 details with API function.
6563 (process_serial_event): Replace accessing list implemention details
6565 * target.c (set_desired_inferior): Replace accessing list implemention
6566 details with API function.
6567 * tracepoint.c (same_process_p): New function.
6568 (gdb_agent_about_to_close): Replace accessing list implemention
6569 details with API function.
6570 * win32-low.c (child_delete_thread): Replace accessing list
6571 implemention details with API function.
6572 (match_dll_by_basename): New function.
6573 (dll_is_loaded_by_basename): New function.
6574 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6575 details call to dll_is_loaded_by_basename.
6577 2014-02-19 Doug Evans <dje@google.com>
6579 * dll.h (struct dll_info): Add comment.
6580 * gdbthread.h (struct thread_info): Add comment.
6581 (current_ptid): Simplify.
6582 * inferiors.c (add_process): Update.
6583 (remove_process): Update.
6584 * inferiors.h (struct process_info): Rename member "head" to "entry".
6585 * linux-low.c (delete_lwp): Update.
6587 (last_thread_of_process_p): Update.
6588 (kill_one_lwp_callback, linux_kill): Update.
6589 (status_pending_p_callback): Update.
6590 (wait_for_sigstop): Update. Simplify read of ptid.
6591 (start_step_over): Update.
6592 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6593 (get_lwp_thread): Update.
6594 (struct lwp_info): Rename member "head" to "entry".
6595 * regcache.h (inferior_list_entry): Delete.
6596 * server.c (kill_inferior_callback): Update.
6597 (detach_or_kill_inferior_callback): Update.
6598 (print_started_pid): Update.
6599 (print_attached_pid): Update.
6600 (process_serial_event): Simplify read of ptid.
6601 * thread-db.c (thread_db_create_event): Update.
6602 (thread_db_get_tls_address): Update.
6603 * win32-low.c (current_inferior_ptid): Simplify.
6605 2014-02-19 Tom Tromey <tromey@redhat.com>
6607 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6609 (target_supports_btrace): Update.
6611 2014-02-14 Yao Qi <yao@codesourcery.com>
6613 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6614 (rsp-low-ipa.o): New target.
6616 2014-02-12 Tom Tromey <tromey@redhat.com>
6618 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6619 convert_ascii_to_int.
6620 * regcache.c (registers_to_string): Likewise.
6621 * remote-utils.c (decode_M_packet): Likewise.
6622 * server.c (process_serial_event): Likewise.
6624 2014-02-12 Tom Tromey <tromey@redhat.com>
6626 * server.c (handle_query, handle_v_run): Use hex2bin, not
6628 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6630 2014-02-12 Tom Tromey <tromey@redhat.com>
6632 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6633 convert_int_to_ascii.
6634 * regcache.c (registers_to_string, collect_register_as_string):
6636 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6638 * server.c (process_serial_event): Likewise.
6639 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6640 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6642 2014-02-12 Tom Tromey <tromey@redhat.com>
6644 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6645 bin2hex, not hexify.
6646 * tracepoint.c (cmd_qtstatus): Likewise.
6648 2014-02-12 Tom Tromey <tromey@redhat.com>
6650 * remote-utils.c (monitor_output): Pass explicit length to
6653 2014-02-12 Tom Tromey <tromey@redhat.com>
6655 * tracepoint.c: Include rsp-low.h.
6656 * server.c: Include rsp-low.h.
6657 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6658 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6660 * remote-utils.c: Include rsp-low.h.
6661 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6662 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6663 (convert_int_to_ascii, convert_ascii_to_int): Move to
6665 * regcache.c: Include rsp-low.h.
6666 * ax.c: Include rsp-low.h.
6667 * Makefile.in (SFILES): Add common/rsp-low.c.
6668 (OBS): Add rsp-low.o.
6669 (rsp-low.o): New target.
6671 2014-02-12 Tom Tromey <tromey@redhat.com>
6673 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6674 Include print-utils.h.
6675 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6676 (plongest, thirty_two, phex_nz): Remove.
6677 * Makefile.in (SFILES): Add common/print-utils.c.
6678 (OBS): Add print-utils.o.
6679 (print-utils-ipa.o): New target.
6680 (print-utils.o): New target.
6681 (IPA_OBJS): Add print-utils-ipa.o.
6683 2014-02-06 Tom Tromey <tromey@redhat.com>
6685 * Makefile.in (SFILES): Fix indentation.
6687 2014-02-05 Doug Evans <dje@google.com>
6689 * linux-low.c (linux_wait_for_event): Improve comment.
6690 (linux_wait_1): Keep current_inferior in sync with event_child.
6692 2014-01-22 Doug Evans <dje@google.com>
6694 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6696 2014-01-22 Doug Evans <dje@google.com>
6698 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6699 * configure: Regenerate.
6700 * config.in: Regenerate.
6701 * Makefile.in (SFILES): Add debug.c.
6703 * debug.c: New file.
6704 * debug.h: New file.
6705 * linux-aarch64-low.c (*): Update all debugging printfs to use
6706 debug_printf instead of fprintf.
6707 * linux-arm-low.c (*): Ditto.
6708 * linux-cris-low.c (*): Ditto.
6709 * linux-crisv32-low.c (*): Ditto.
6710 * linux-m32r-low.c (*): Ditto.
6711 * linux-sparc-low.c (*): Ditto.
6712 * linux-x86.c (*): Ditto.
6713 * linux-low.c (*): Ditto.
6714 (linux_wait_1): Add calls to debug_enter, debug_exit.
6715 (linux_wait): Remove redundant debugging printf.
6716 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6717 (linux_resume, unstop_all_lwps): Ditto.
6718 * mem-break.c (*): Update all debugging printfs to use
6719 debug_printf instead of fprintf.
6720 * remote-utils.c (*): Ditto.
6721 * thread-db.c (*): Ditto.
6722 * server.c #include <ctype.h>, "gdb_vecs.h".
6723 (debug_threads): Moved to debug.c.
6724 (*): Update all debugging printfs to use debug_printf instead of
6726 (start_inferior): Replace call to fflush with call to debug_flush.
6727 (monitor_show_help): Mention set debug-format.
6728 (parse_debug_format_options): New function.
6729 (handle_monitor_command): Handle "monitor set debug-format".
6730 (gdbserver_usage): Mention --debug-format.
6731 (main): Parse --debug-format.
6732 * server.h (debug_threads): Declaration moved to debug.h.
6734 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6735 trace_debug_1 that uses debug_printf.
6736 (tracepoint_look_up_symbols): Update all debugging printfs to use
6737 debug_printf instead of fprintf.
6739 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6741 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6744 2014-01-17 Pedro Alves <palves@redhat.com>
6747 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6748 defined after including gdb_proc_service.h.
6750 2014-01-16 Doug Evans <dje@google.com>
6752 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6753 (match_dll): Use it.
6755 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6757 * target.h (target_ops) <read_btrace>: Change parameters and
6758 return type to allow error reporting.
6759 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6760 trace reading errors on.
6761 * linux-low.c (linux_low_read_btrace): Pass trace reading
6763 (linux_low_disable_btrace): New.
6765 2014-01-15 Doug Evans <dje@google.com>
6767 * inferiors.c (thread_id_to_gdb_id): Delete.
6768 * inferiors.h (thread_id_to_gdb_id): Delete.
6770 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6772 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6773 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6776 2014-01-08 Pedro Alves <palves@redhat.com>
6778 * server.c (handle_status): Don't discard previous queued stop
6779 replies or thread's pending status here.
6780 (main) <disconnection>: Do it here instead.
6782 2014-01-08 Pedro Alves <palves@redhat.com>
6784 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6785 * server.c (visit_actioned_threads, handle_pending_status): New
6787 (handle_v_cont): Factor out parts to ...
6788 (resume): ... this new function. If in all-stop, and a thread
6789 being resumed has a pending status, report it without actually
6791 (myresume): Adjust to use the new 'resume' function.
6792 (clear_pending_status_callback, set_pending_status_callback)
6793 (find_status_pending_thread_callback): New functions.
6794 (handle_status): Handle the case of multiple threads having
6795 interesting statuses to report. Report threads' real last signal
6796 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6797 with an interesting thread to report the status for, instead of
6798 always reporting the status of the first thread.
6800 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6802 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6803 * gdbreplay.c (gdbreplay_version): Likewise.
6805 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6807 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6808 iov.iov_len with the real length in use.
6810 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6812 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6813 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6814 for all targets that use win32-low.c.
6815 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6816 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6818 2013-12-13 Pedro Alves <palves@redhat.com>
6820 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6821 if equal to TARGET_WAITKIND_LOADED.
6822 * win32-low.c (cached_status): New static global.
6823 (win32_wait): Add declaration.
6824 (do_initial_child_stuff): Flush all initial pending debug events
6825 up to the initial breakpoint.
6826 (win32_wait): If CACHED_STATUS was set, return that instead
6827 of doing a real wait. Remove the code resuming the execution
6828 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6829 during the initial phase. Also remove the code changing
6830 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6831 TARGET_WAITKIND_STOPPED.
6833 2013-12-11 Yao Qi <yao@codesourcery.com>
6835 * notif.c (handle_notif_ack): Return 0 if no notification
6838 2013-11-20 Doug Evans <dje@google.com>
6840 * linux-low.c (linux_set_resume_request): Fix comment.
6842 2013-11-20 Doug Evans <dje@google.com>
6844 * linux-low.c (resume_status_pending_p): Tweak comment.
6846 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6848 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6849 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6850 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6851 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6852 (srv_amd64_regobj): Add amd64-mpx.o.
6853 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6854 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6855 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6856 * i387-fp.c (num_pl_bnd_register) Added constant.
6857 (num_pl_bnd_cfg_registers) Added constant.
6858 (struct i387_xsave) Added reserved area and MPX fields.
6859 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6860 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6862 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6863 (init_registers_amd64_mpx_linux): Declare new function.
6864 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6865 (x86_64_regmap): Add MPX registers.
6866 (x86_linux_read_description): Add MPX case.
6867 (initialize_low_arch): Initialize MPX targets.
6869 2013-11-18 Tom Tromey <tromey@redhat.com>
6871 * configure: Rebuild.
6872 * configure.ac: Don't check for stdlib.h.
6873 * gdbreplay.c: Unconditionally include stdlib.h.
6875 2013-11-18 Tom Tromey <tromey@redhat.com>
6877 * config.in: Rebuild.
6878 * configure: Rebuild.
6879 * configure.ac: Don't use AC_HEADER_DIRENT.
6881 2013-11-18 Tom Tromey <tromey@redhat.com>
6883 * server.h: Don't check HAVE_STRING_H.
6884 * gdbreplay.c: Don't check HAVE_STRING_H.
6885 * configure: Rebuild.
6887 2013-11-18 Tom Tromey <tromey@redhat.com>
6889 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6892 2013-11-08 Tom Tromey <tromey@redhat.com>
6894 * configure, config.in: Rebuild.
6895 * configure.ac: Remove unused configury.
6897 2013-11-08 Tom Tromey <tromey@redhat.com>
6899 * acinclude.m4: Include common.m4, codeset.m4.
6900 * configure, config.in: Rebuild.
6901 * configure.ac: Use GDB_AC_COMMON.
6903 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6905 * linux-s390-low.c (HWCAP_S390_TE): New define.
6906 (s390_arch_setup): Consider the TE field in the HWCAP for
6907 determining 'have_regset_tdb'.
6909 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6912 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6915 2013-10-02 Pedro Alves <palves@redhat.com>
6917 * server.c (process_serial_event): Don't output "GDBserver
6918 exiting" if GDB is connected through stdio.
6919 * target.c (mywait): Likewise, be silent if GDB is connected
6922 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6924 * lynx-low.c (lynx_add_threads_after_attach): New function.
6925 (lynx_attach): Remove call to add_thread. Add call to
6926 lynx_add_threads_after_attach instead.
6928 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6930 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6931 * config.in, configure: Regenerated.
6933 2013-09-18 Yao Qi <yao@codesourcery.com>
6936 * server.c (start_inferior): Clear 'resume_info'.
6938 2013-09-16 Jiong Wang <jiwang@tilera.com>
6940 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6943 2013-09-16 Jiong Wang <jiwang@tilera.com>
6945 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6946 linux-tile-low.o to srv_tgtobj.
6948 2013-09-16 Will Newton <will.newton@linaro.org>
6950 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6953 2013-09-06 Pedro Alves <palves@redhat.com>
6955 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6956 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6957 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6958 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6959 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6960 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6962 2013-09-06 Pedro Alves <palves@redhat.com>
6964 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6965 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6967 2013-09-06 Pedro Alves <palves@redhat.com>
6969 * linux-amd64-ipa.c: Include tracepoint.h.
6970 * linux-i386-ipa.c: Include tracepoint.h.
6972 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6974 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6975 (ps_get_thread_area): New function.
6977 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6979 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6980 (initialize_low_arch): Call init_registers_crisv32 rather than
6981 init_register_crisv32.
6983 2013-09-05 Pedro Alves <palves@redhat.com>
6985 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6987 * hostio.h: ... this new file.
6988 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6989 win32-low.c: Include hostio.h.
6991 2013-09-05 Pedro Alves <palves@redhat.com>
6993 * server.h (gdb_client_data, handler_func, callback_handler_func)
6994 (delete_file_handler, add_file_handler, append_callback_event)
6995 (delete_callback_event, start_event_loop, initialize_event_loop):
6996 Move to event-loop.h and include it.
6997 * event-loop.h: New file.
6999 2013-09-05 Pedro Alves <palves@redhat.com>
7001 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7002 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7003 (loaded_dll, unloaded_dll): Move to ...
7004 * dll.h: ... this new file.
7005 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7007 2013-09-05 Pedro Alves <palves@redhat.com>
7009 * server.h (current_process, get_thread_process, all_processes)
7010 (add_inferior_to_list, for_each_inferior, current_inferior)
7011 (remove_inferior, add_process, remove_process, find_process_pid)
7012 (have_started_inferiors_p, have_attached_inferiors_p)
7013 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7014 (clear_inferiors, find_inferior, find_inferior_id)
7015 (inferior_target_data, set_inferior_target_data)
7016 (inferior_regcache_data, set_inferior_regcache_data): Move to
7017 inferiors.h, and include it.
7018 * inferiors.h: New file.
7020 2013-09-05 Pedro Alves <palves@redhat.com>
7022 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7026 2013-09-05 Pedro Alves <palves@redhat.com>
7028 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7030 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7031 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7032 (handle_tracepoint_general_set, handle_tracepoint_query)
7033 (tracepoint_finished_step, tracepoint_was_hit)
7034 (release_while_stepping_state_list, current_traceframe)
7035 (in_readonly_region, traceframe_read_mem)
7036 (fetch_traceframe_registers, traceframe_read_sdata)
7037 (traceframe_read_info, struct fast_tpoint_collect_status)
7038 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7039 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7040 (supply_fast_tracepoint_registers)
7041 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7042 (ipa_tdesc, claim_trampoline_space)
7043 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7044 (agent_mem_read, agent_get_trace_state_variable_value)
7045 (agent_set_trace_state_variable_value, agent_tsv_read)
7046 (agent_mem_read_string, get_raw_reg_func_addr)
7047 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7048 * tracepoint.h: ... this new file.
7050 2013-09-05 Pedro Alves <palves@redhat.com>
7052 * server.h (perror_with_name, error, fatal, warning, paddress)
7053 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7055 * utils.h: New file.
7057 2013-09-05 Pedro Alves <palves@redhat.com>
7059 * server.h (remote_debug, noack_mode, transport_is_reliable)
7060 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7061 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7062 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7063 (write_enn, initialize_async_io, enable_async_io)
7064 (disable_async_io, check_remote_input_interrupt_request)
7065 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7066 (dead_thread_notify, prepare_resume_reply)
7067 (decode_address_to_semicolon, decode_address, decode_m_packet)
7068 (decode_M_packet, decode_X_packet, decode_xfer_write)
7069 (decode_search_memory_packet, unhexify, hexify)
7070 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7071 (look_up_one_symbol, relocate_instruction)
7072 (monitor_output): Move to remote-utils.h, and include it.
7073 * remote-utils.h: New file.
7075 2013-09-05 Pedro Alves <palves@redhat.com>
7077 * server.h (_): Delete.
7079 2013-09-02 Pedro Alves <palves@redhat.com>
7081 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7082 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7084 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7086 2013-09-02 Pierre Muller <muller@sourceware.org>
7088 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7089 or WriteProcessMemory complete successfully and handle
7090 ERROR_PARTIAL_COPY error.
7092 2013-09-02 Pedro Alves <palves@redhat.com>
7094 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7095 error instead of EIO.
7097 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7100 * linux-low.c: Include filestuff.h.
7101 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7102 * lynx-low.c: Include filestuff.h.
7103 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7104 * server.c: Include filestuff.h.
7105 (main): Call notice_open_fds.
7106 * spu-low.c: Include filestuff.h.
7107 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7109 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7111 * Makefile.in: Explain why ../target and ../nat are not
7112 listed as include file search paths.
7113 (linux-waitpid.o): New object file rule.
7114 * configure.srv (srv_native_linux_obj): New variable.
7115 Replace all occurrences of linux native object files with
7116 $srv_native_linux_obj.
7117 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7118 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7119 (linux_enable_event_reporting): Remove declaration.
7120 (my_waitpid): Moved to common/linux-waitpid.c.
7121 (linux_wait_for_event): Pass ptid when calling
7122 linux_enable_event_reporting.
7123 (linux_supports_tracefork_flag): Remove.
7124 (linux_enable_event_reporting): Likewise.
7125 (linux_tracefork_grandchild): Remove.
7126 (STACK_SIZE): Moved to common/linux-ptrace.c.
7127 (linux_tracefork_child): Remove.
7128 (linux_test_for_tracefork): Remove.
7129 (linux_look_up_symbols): Call linux_supports_traceclone.
7130 (initialize_low): Remove call to linux_test_for_tracefork.
7131 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7132 common/linux-ptrace.h.
7133 (PTRACE_TYPE_ARG4): Likewise.
7134 Include linux-ptrace.h.
7136 2013-08-21 Pedro Alves <palves@redhat.com>
7138 * config.in: Renegerate.
7140 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7142 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7143 (SFILES): Remove $(srcdir)/common/target-common.c and
7144 add $(srcdir)/target/waitstatus.c.
7145 (OBS): Remove target-common.o and add waitstatus.o.
7146 (server_h): Remove $(srcdir)/../common/target-common.h and
7147 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7148 and $(srcdir)/../target/waitstatus.h.
7149 (target-common.o): Remove.
7150 (waitstatus.o): New target object file.
7151 * target.h: Do not include target-common.h and
7152 include target/resume.h, target/wait.h and
7153 target/waitstatus.h.
7155 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7157 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7158 to PTRACE_TYPE_ARG3.
7159 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7160 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7162 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7163 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7165 2013-07-27 Jie Zhang <jie@codesourcery.com>
7166 Daniel Jacobowitz <dan@codesourcery.com>
7167 Yao Qi <yao@codesourcery.com>
7169 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7170 (mips-linux-watch.o): New rule.
7171 (mips_linux_watch_h): New variable.
7172 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7174 * linux-mips-low.c: Include mips-linux-watch.h.
7175 (struct arch_process_info, struct arch_lwp_info): New.
7176 (update_watch_registers_callback): New function.
7177 (mips_linux_new_process, mips_linux_new_thread) New functions.
7178 (mips_linux_prepare_to_resume, mips_insert_point): New
7180 (mips_remove_point, mips_stopped_by_watchpoint): New
7182 (rsp_bp_type_to_target_hw_bp_type): New function.
7183 (mips_stopped_data_address): New function.
7184 (the_low_target): Add watchpoint support functions.
7186 2013-07-27 Yao Qi <yao@codesourcery.com>
7188 * i386-low.c: Include break-common.h.
7189 (enum target_hw_bp_type): Remove.
7191 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7193 * Makefile.in (SFILES): /common/target-common.c.
7194 (OBS): Add target-common.o.
7195 (server_h): Add $(srcdir)/../common/target-common.h.
7196 (target-common.o): New target.
7197 * server.c (queue_stop_reply_callback): Free
7198 status string after use.
7199 * target.c (target_waitstatus_to_string): Remove.
7200 * target.h: Include target-common.h.
7201 (resume_kind): Likewise.
7202 (target_waitkind): Likewise.
7203 (target_waitstatus): Likewise.
7204 (TARGET_WNOHANG): Likewise.
7206 2013-07-04 Yao Qi <yao@codesourcery.com>
7208 * Makefile.in (host_alias): Use @host_noncanonical@.
7209 (target_alias): Use @target_noncanonical@.
7210 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7211 ACX_NONCANONICAL_HOST.
7212 * configure: Regenerated.
7215 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7217 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7218 * configure: Rebuild.
7219 * Makefile.in (version_host, version_target): Get from configure.
7220 (version.c): Use $(version_host) and $(version_target).
7222 2013-07-03 Pedro Alves <palves@redhat.com>
7224 * Makefile.in (config.status): Depend on development.sh.
7225 * acinclude.m4: Include libmcheck.m4.
7226 * configure: Regenerate.
7228 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7230 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7231 attribute inside the parentheses.
7232 (winapi_DebugSetProcessKillOnExit): Ditto.
7233 (winapi_DebugBreakProcess): Ditto.
7234 (winapi_GenerateConsoleCtrlEvent): Ditto.
7236 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7238 * notif.h (notif_event): Add a dummy member to avoid compiler
7241 2013-07-01 Pedro Alves <palves@redhat.com>
7243 * hostio.c (HOSTIO_PATH_MAX): Define.
7244 (require_filename, handle_open, handle_unlink, handle_readlink):
7247 2013-07-01 Pedro Alves <palves@redhat.com>
7249 * server.h: Include "pathmax.h".
7250 * linux-low.c: Don't include sys/param.h.
7251 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7253 * win32-low.c: Don't include sys/param.h.
7254 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7256 2013-07-01 Pedro Alves <palves@redhat.com>
7258 * event-loop.c: Don't check HAVE_UNISTD_H before including
7260 * gdbreplay.c: Likewise.
7261 * remote-utils.c: Likewise.
7262 * server.c: Likewise.
7263 * configure.ac: Don't check for unistd.h.
7264 * configure: Regenerate.
7266 2013-06-28 Tom Tromey <tromey@redhat.com>
7268 * Makefile.in (version.c): Use version.in, not
7271 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7273 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7274 * configure: Rebuild.
7275 * Makefile.in (version_host, version_target): Get from configure.
7276 (version.c): Use $(version_host) and $(version_target).
7278 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7280 Fix trace-status to output user name without trailing colon.
7281 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7283 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7285 Fix trace-status to output proper start-time and stop-time.
7286 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7287 output start time and stop time in hex as gdb expects.
7289 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7291 * tracepoint.c (build_traceframe_info_xml): Output trace state
7292 variables present in the trace buffer.
7294 2013-06-24 Tom Tromey <tromey@redhat.com>
7296 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7298 (version.o): Remove.
7299 * gdbreplay.c: Include version.h.
7300 (version, host_name): Don't declare.
7301 * server.h: Include version.h.
7302 (version, host_name): Don't declare.
7304 2013-06-12 Pedro Alves <palves@redhat.com>
7306 * linux-x86-low.c (linux_is_elf64): Delete global.
7307 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7308 with local linux_pid_exe_is_elf_64_file use.
7310 2013-06-11 Pedro Alves <palves@redhat.com>
7312 * linux-low.c (regset_disabled, disable_regset): New functions.
7313 (regsets_fetch_inferior_registers)
7314 (regsets_store_inferior_registers): Use them.
7315 (initialize_regsets_info); Don't allocate the disabled_regsets
7317 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7320 2013-06-11 Pedro Alves <palves@redhat.com>
7322 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7325 2013-06-11 Pedro Alves <palves@redhat.com>
7327 * linux-x86-low.c (initialize_low_arch): Call
7328 init_registers_x32_avx_linux.
7330 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7332 Fix compatibility with Android Bionic.
7333 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7336 2013-06-07 Pedro Alves <palves@redhat.com>
7339 * Makefile.in (OBS): Add tdesc.o.
7340 (IPA_OBJS): Add tdesc-ipa.o.
7341 (tdesc-ipa.o): New rule.
7342 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7344 * linux-low.c (new_inferior): Delete.
7345 (disabled_regsets, num_regsets): Delete.
7346 (linux_add_process): Adjust to set the new per-process
7348 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7349 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7350 was a stop. When calling arch_setup, switch the current inferior
7351 to the thread that got an event.
7352 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7353 (regsets_fetch_inferior_registers)
7354 (regsets_store_inferior_registers): New regsets_info parameter.
7356 (linux_register_in_regsets): New regs_info parameter. Adjust to
7358 (register_addr, fetch_register, store_register): New usrregs_info
7359 parameter. Adjust to use it.
7360 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7361 parameter regs_info. Adjust to use it.
7362 (linux_fetch_registers): Get the current inferior's regs_info, and
7364 (linux_store_registers): Ditto.
7365 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7366 (initialize_low): Don't initialize the target_regsets here. Call
7367 initialize_low_arch.
7368 * linux-low.h (target_regsets): Delete declaration.
7369 (struct regsets_info): New.
7370 (struct usrregs_info): New.
7371 (struct regs_info): New.
7372 (struct process_info_private) <new_inferior>: New field.
7373 (struct linux_target_ops): Delete the num_regs, regmap, and
7374 regset_bitmap fields. New field regs_info.
7375 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7376 * i387-fp.c (num_xmm_registers): Delete.
7377 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7378 calls to new interface.
7379 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7380 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7381 Infer the number of xmm registers from the regcache's target
7383 * i387-fp.h (num_xmm_registers): Delete.
7384 * inferiors.c (add_thread): Don't install the thread's regcache
7386 * proc-service.c (gregset_info): Fetch the current inferior's
7387 regs_info. Adjust to use it.
7388 * regcache.c: Include tdesc.h.
7389 (register_bytes, reg_defs, num_registers)
7390 (gdbserver_expedite_regs): Delete.
7391 (get_thread_regcache): If the thread doesn't have a regcache yet,
7392 create one, instead of aborting gdbserver.
7393 (regcache_invalidate_one): Rename to ...
7394 (regcache_invalidate_thread): ... this.
7395 (regcache_invalidate_one): New.
7396 (regcache_invalidate): Only invalidate registers of the current
7398 (init_register_cache): Add target_desc parameter, and use it.
7399 (new_register_cache): Ditto. Assert the target description has a
7400 non zero registers_size.
7401 (regcache_cpy): Add assertions. Adjust.
7402 (realloc_register_cache, set_register_cache): Delete.
7403 (registers_to_string, registers_from_string): Adjust.
7404 (find_register_by_name, find_regno, find_register_by_number)
7405 (register_cache_size): Add target_desc parameter, and use it.
7406 (free_register_cache_thread, free_register_cache_thread_one)
7407 (regcache_release, register_cache_size): New.
7408 (register_size): Add target_desc parameter, and use it.
7409 (register_data, supply_register, supply_register_zeroed)
7410 (supply_regblock, supply_register_by_name, collect_register)
7411 (collect_register_as_string, collect_register_by_name): Adjust.
7412 * regcache.h (struct target_desc): Forward declare.
7413 (struct regcache) <tdesc>: New field.
7414 (init_register_cache, new_register_cache): Add target_desc
7416 (regcache_invalidate_thread): Declare.
7417 (regcache_invalidate_one): Delete declaration.
7418 (regcache_release): Declare.
7419 (find_register_by_number, register_cache_size, register_size)
7420 (find_regno): Add target_desc parameter.
7421 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7423 * remote-utils.c: Include tdesc.h.
7424 (outreg, prepare_resume_reply): Adjust.
7425 * server.c: Include tdesc.h.
7426 (gdbserver_xmltarget): Delete declaration.
7427 (get_features_xml, process_serial_event): Adjust.
7428 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7430 (struct process_info) <tdesc>: New field.
7431 (ipa_tdesc): Declare.
7432 * tdesc.c: New file.
7433 * tdesc.h: New file.
7434 * tracepoint.c: Include tdesc.h.
7435 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7436 (get_context_regcache): Adjust to pass ipa_tdesc down.
7437 (do_action_at_tracepoint): Adjust to get the register cache size
7438 from the context regcache's description.
7439 (traceframe_walk_blocks): Adjust to get the register cache size
7440 from the current trace frame's description.
7441 (traceframe_get_pc): Adjust to get current trace frame's
7442 description and pass it down.
7443 (gdb_collect): Adjust to get the register cache size from the
7445 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7446 (gdbserver_xmltarget): Delete.
7447 (initialize_low_tracepoint): Set the ipa's target description.
7448 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7449 (initialize_low_tracepoint): Set the ipa's target description.
7450 * linux-x86-low.c: Include tdesc.h.
7451 [__x86_64__] (is_64bit_tdesc): New.
7452 (ps_get_thread_area, x86_get_thread_area): Use it.
7453 (i386_cannot_store_register): Rename to ...
7454 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7455 (i386_cannot_fetch_register): Rename to ...
7456 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7457 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7459 (target_regsets): Rename to ...
7460 (x86_regsets): ... this.
7461 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7463 (x86_siginfo_fixup): Use is_64bit_tdesc.
7464 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7465 (tdesc_x32_avx_linux, tdesc_x32_linux)
7466 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7468 (x86_linux_update_xmltarget): Delete.
7469 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7470 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7471 (AMD64_LINUX_USER64_CS): New.
7472 (x86_linux_read_description): New, based on
7473 x86_linux_update_xmltarget.
7474 (same_process_callback): New.
7475 (x86_arch_setup_process_callback): New.
7476 (x86_linux_update_xmltarget): New.
7477 (x86_regsets_info): New.
7478 (amd64_linux_regs_info): New.
7479 (i386_linux_usrregs_info): New.
7480 (i386_linux_regs_info): New.
7481 (x86_linux_regs_info): New.
7482 (x86_arch_setup): Reimplement.
7483 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7484 (x86_emit_ops): Ditto.
7485 (the_low_target): Adjust. Install x86_linux_regs_info,
7486 x86_cannot_fetch_register, and x86_cannot_store_register.
7487 (initialize_low_arch): New.
7488 * linux-ia64-low.c (tdesc_ia64): Declare.
7489 (ia64_fetch_register): Adjust.
7490 (ia64_usrregs_info, regs_info): New globals.
7491 (ia64_regs_info): New function.
7492 (the_low_target): Adjust.
7493 (initialize_low_arch): New function.
7494 * linux-sparc-low.c (tdesc_sparc64): Declare.
7495 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7497 (sparc_arch_setup): New function.
7498 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7499 (the_low_target): Adjust.
7500 (initialize_low_arch): New function.
7501 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7502 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7503 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7504 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7505 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7506 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7507 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7508 (tdesc_powerpc_isa205_vsx64l): Declare.
7509 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7510 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7511 (ppc_set_pc, ppc_get_hwcap): Adjust.
7512 (ppc_usrregs_info): Forward declare.
7513 (!__powerpc64__) ppc_regmap_adjusted: New global.
7514 (ppc_arch_setup): Adjust to the current process'es target
7516 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7517 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7518 (ppc_store_evrregset): Adjust.
7519 (target_regsets): Rename to ...
7520 (ppc_regsets): ... this, and make static.
7521 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7522 (ppc_regs_info): New function.
7523 (the_low_target): Adjust.
7524 (initialize_low_arch): New function.
7525 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7526 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7527 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7528 (tdesc_s390x_linux64v2): Declare.
7529 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7530 (s390_fill_gregset, s390_store_last_break): Adjust.
7531 (target_regsets): Rename to ...
7532 (s390_regsets): ... this, and make static.
7533 (s390_get_pc, s390_set_pc): Adjust.
7534 (s390_get_hwcap): New target_desc parameter, and use it.
7535 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7536 (s390_arch_setup): Adjust to set the current process'es target
7537 description. Don't adjust the regmap.
7538 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7539 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7540 (regs_info_3264): New globals.
7541 (s390_regs_info): New function.
7542 (the_low_target): Adjust.
7543 (initialize_low_arch): New function.
7544 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7545 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7546 [__mips64] (init_registers_mips_linux)
7547 (init_registers_mips_dsp_linux): Delete defines.
7548 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7549 (have_dsp): New global.
7550 (mips_read_description): New, based on mips_arch_setup.
7551 (mips_arch_setup): Reimplement.
7552 (get_usrregs_info): New function.
7553 (mips_cannot_fetch_register, mips_cannot_store_register)
7554 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7555 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7556 (target_regsets): Rename to ...
7557 (mips_regsets): ... this, and make static.
7558 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7559 (dsp_regs_info, regs_info): New globals.
7560 (mips_regs_info): New function.
7561 (the_low_target): Adjust.
7562 (initialize_low_arch): New function.
7563 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7564 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7566 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7567 (arm_read_description): New, with bits factored from
7569 (arm_arch_setup): Reimplement.
7570 (target_regsets): Rename to ...
7571 (arm_regsets): ... this, and make static.
7572 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7573 (arm_regs_info): New function.
7574 (the_low_target): Adjust.
7575 (initialize_low_arch): New function.
7576 * linux-m68k-low.c (tdesc_m68k): Declare.
7577 (target_regsets): Rename to ...
7578 (m68k_regsets): ... this, and make static.
7579 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7580 (m68k_regs_info): New function.
7581 (m68k_arch_setup): New function.
7582 (the_low_target): Adjust.
7583 (initialize_low_arch): New function.
7584 * linux-sh-low.c (tdesc_sharch): Declare.
7585 (target_regsets): Rename to ...
7586 (sh_regsets): ... this, and make static.
7587 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7588 (sh_regs_info, sh_arch_setup): New functions.
7589 (the_low_target): Adjust.
7590 (initialize_low_arch): New function.
7591 * linux-bfin-low.c (tdesc_bfin): Declare.
7592 (bfin_arch_setup): New function.
7593 (bfin_usrregs_info, regs_info): New globals.
7594 (bfin_regs_info): New function.
7595 (the_low_target): Adjust.
7596 (initialize_low_arch): New function.
7597 * linux-cris-low.c (tdesc_cris): Declare.
7598 (cris_arch_setup): New function.
7599 (cris_usrregs_info, regs_info): New globals.
7600 (cris_regs_info): New function.
7601 (the_low_target): Adjust.
7602 (initialize_low_arch): New function.
7603 * linux-cris-low.c (tdesc_crisv32): Declare.
7604 (cris_arch_setup): New function.
7605 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7606 (cris_regs_info): New function.
7607 (the_low_target): Adjust.
7608 (initialize_low_arch): New function.
7609 * linux-m32r-low.c (tdesc_m32r): Declare.
7610 (m32r_arch_setup): New function.
7611 (m32r_usrregs_info, regs_info): New globals.
7612 (m32r_regs_info): Adjust.
7613 (initialize_low_arch): New function.
7614 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7615 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7616 (tic6x_usrregs_info): Forward declare.
7617 (tic6x_read_description): New function, based on ...
7618 (tic6x_arch_setup): ... this. Reimplement.
7619 (target_regsets): Rename to ...
7620 (tic6x_regsets): ... this, and make static.
7621 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7622 (tic6x_regs_info): New function.
7623 (the_low_target): Adjust.
7624 (initialize_low_arch): New function.
7625 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7626 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7627 (target_regsets): Rename to ...
7628 (xtensa_regsets): ... this, and make static.
7629 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7631 (xtensa_arch_setup, xtensa_regs_info): New functions.
7632 (the_low_target): Adjust.
7633 (initialize_low_arch): New function.
7634 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7635 (nios2_arch_setup): Set the current process'es tdesc.
7636 (target_regsets): Rename to ...
7637 (nios2_regsets): ... this.
7638 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7639 (nios2_regs_info): New function.
7640 (the_low_target): Adjust.
7641 (initialize_low_arch): New function.
7642 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7643 (aarch64_arch_setup): Set the current process'es tdesc.
7644 (target_regsets): Rename to ...
7645 (aarch64_regsets): ... this.
7646 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7647 (aarch64_regs_info): New function.
7648 (the_low_target): Adjust.
7649 (initialize_low_arch): New function.
7650 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7652 (target_regsets): Rename to ...
7653 (tile_regsets): ... this.
7654 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7655 (tile_regs_info): New function.
7656 (tile_arch_setup): Set the current process'es tdesc.
7657 (the_low_target): Adjust.
7658 (initialize_low_arch): New function.
7659 * spu-low.c (tdesc_spu): Declare.
7660 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7661 * win32-arm-low.c (tdesc_arm): Declare.
7662 (arm_arch_setup): New function.
7663 (the_low_target): Install arm_arch_setup instead of
7665 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7666 (init_windows_x86): Rename to ...
7667 (i386_arch_setup): ... this. Set `win32_tdesc'.
7668 (the_low_target): Adjust.
7669 * win32-low.c (win32_tdesc): New global.
7670 (child_add_thread): Don't create the thread cache here.
7671 (do_initial_child_stuff): Set the new process'es tdesc.
7672 * win32-low.h (struct target_desc): Forward declare.
7673 (win32_tdesc): Declare.
7674 * lynx-i386-low.c (tdesc_i386): Declare global.
7675 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7676 * lynx-low.c (lynx_tdesc): New global.
7677 (lynx_add_process): Set the new process'es tdesc.
7678 * lynx-low.h (struct target_desc): Forward declare.
7679 (lynx_tdesc): Declare global.
7680 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7681 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7682 * nto-low.c (nto_tdesc): New global.
7683 (do_attach): Set the new process'es tdesc.
7684 * nto-low.h (struct target_desc): Forward declare.
7685 (nto_tdesc): Declare.
7686 * nto-x86-low.c (tdesc_i386): Declare.
7687 (nto_x86_arch_setup): Set `nto_tdesc'.
7689 2013-06-04 Gary Benson <gbenson@redhat.com>
7691 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7692 to qSupported response when appropriate.
7693 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7694 with nonzero-length annex.
7695 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7696 arguments supplied in annex.
7698 2013-05-31 Doug Evans <dje@google.com>
7701 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7702 64 bits in 64-cross-32 environment.
7704 2013-05-28 Pedro Alves <palves@redhat.com>
7706 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7707 (aarch64-without-fpu.c): Delete rule.
7708 * configure.srv (aarch64*-*-linux*): Remove references to
7709 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7710 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7713 2013-05-24 Pedro Alves <palves@redhat.com>
7715 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7716 instead of strchr/decode_address. Error if the range isn't split
7717 with a ','. Don't assume there's be a ':' in the action.
7719 2013-05-23 Yao Qi <yao@codesourcery.com>
7720 Pedro Alves <palves@redhat.com>
7722 * linux-low.c (lwp_in_step_range): New function.
7723 (linux_wait_1): If the thread was range stepping and stopped
7724 outside the stepping range, report the stop to GDB. Otherwise,
7725 continue stepping. Add range stepping debug output.
7726 (linux_set_resume_request): Copy the step range from the resume
7728 (linux_supports_range_stepping): New.
7729 (linux_target_ops) <supports_range_stepping>: Set to
7730 linux_supports_range_stepping.
7731 * linux-low.h (struct linux_target_ops)
7732 <supports_range_stepping>: New field.
7733 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7734 * linux-x86-low.c (x86_supports_range_stepping): New.
7735 (the_low_target) <supports_range_stepping>: Set to
7736 x86_supports_range_stepping.
7737 * server.c (handle_v_cont): Handle 'r' action.
7738 (handle_v_requests): Append ";r" if the target supports range
7740 * target.h (struct thread_resume) <step_range_start,
7741 step_range_end>: New fields.
7742 (struct target_ops) <supports_range_stepping>:
7744 (target_supports_range_stepping): New macro.
7746 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7748 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7749 confusion in comment.
7751 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7753 * lynx-low.c (struct process_info_private): New type.
7754 (lynx_add_process): New function.
7755 (lynx_create_inferior, lynx_attach): Replace calls to
7756 add_process by calls to lynx_add_process.
7757 (lynx_resume): If PTID is null, then try using
7758 current_process()->private->last_wait_event_ptid.
7760 (lynx_clear_inferiors): Delete. The contents of that function
7761 has been inlined in lynx_mourn;
7762 (lynx_wait_1): Save the ptid in the process's private data.
7763 (lynx_mourn): Free the process' private data. Replace call
7764 to lynx_clear_inferiors by call to clear_inferiors.
7766 2013-05-17 Yao Qi <yao@codesourcery.com>
7768 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7771 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7773 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7774 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7775 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7776 PT_TEXT_END_ADDR guards. Update comments.
7777 (linux_target_op) <read_offsets>: Conditionally define to
7778 linux_read_offsets if the target is UCLIBC and if it defines
7779 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7781 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7782 Andrew Jenner <andrew@codesourcery.com>
7784 * Makefile.in (SFILES): Add linux-nios2-low.c.
7785 (clean): Add action to delete nios2-linux.c.
7786 (nios2-linux.c): New rule.
7787 * configure.srv: Add nios2*-*-linux*.
7788 * linux-nios2-low.c: New.
7790 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7792 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7794 2013-04-25 Hui Zhu <hui@codesourcery.com>
7797 * ax.c (ax_printf): Add fflush.
7799 2013-04-22 Tom Tromey <tromey@redhat.com>
7801 * Makefile.in (SFILES): Add filestuff.c.
7802 (OBS): Add filestuff.o.
7803 (filestuff.o): New target.
7804 * config.in, configure: Rebuild.
7805 * configure.ac: Check for fdwalk, pipe2.
7807 2013-04-17 Pedro Alves <palves@redhat.com>
7809 * configure.ac (USE_THREAD_DB): Delete variable.
7810 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7811 Don't AC_SUBST USE_THREAD_DB.
7812 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7813 * config.in, configure: Regenerate.
7815 2013-04-16 Pedro Alves <palves@redhat.com>
7817 * linux-low.h (struct lwp_info) <thread_known>: Move under
7818 the USE_THREAD_DB #ifdef.
7820 2013-04-16 Pedro Alves <palves@redhat.com>
7822 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7823 (linux-low.o): Delete rule.
7824 * linux-low.h: Always include "gdb_thread_db.h" instead of
7825 conditionally including thread_db.h.
7826 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7829 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7831 * Makefile.in (install-only): Fix make install regression.
7833 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7835 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7836 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7838 * gdbserver.1: Remove.
7840 2013-03-22 Pedro Alves <palves@redhat.com>
7842 * linux-low.c (handle_extended_wait): Don't call
7843 linux_enable_event_reporting.
7845 2013-03-15 Tony Theodore <tonyt@logyst.com>
7848 * Makefile.in (SHELL): Use @SHELL@.
7850 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7852 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7855 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7857 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7858 Remove extraneous NULL element.
7860 2013-03-13 Yao Qi <yao@codesourcery.com>
7862 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7863 'V' block in trace frame.
7865 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7867 * target.h (struct target_ops): Add btrace ops.
7868 (target_supports_btrace): New macro.
7869 (target_enable_btrace): New macro.
7870 (target_disable_btrace): New macro.
7871 (target_read_btrace): New macro.
7872 * gdbthread.h (struct thread_info): Add btrace field.
7873 * server.c: Include btrace-common.h.
7874 (handle_btrace_general_set): New function.
7875 (handle_btrace_enable): New function.
7876 (handle_btrace_disable): New function.
7877 (handle_general_set): Call handle_btrace_general_set.
7878 (handle_qxfer_btrace): New function.
7879 (struct qxfer qxfer_packets[]): Add btrace entry.
7880 * inferiors.c (remove_thread): Disable btrace.
7881 * linux-low: Include linux-btrace.h.
7882 (linux_low_enable_btrace): New function.
7883 (linux_low_read_btrace): New function.
7884 (linux_target_ops): Add btrace ops.
7885 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7886 Add srv_linux_btrace=yes.
7887 (x86_64-*-linux*): Add linux-btrace.o.
7888 Add srv_linux_btrace=yes.
7889 * configure.ac: Define HAVE_LINUX_BTRACE.
7890 * config.in: Regenerated.
7891 * configure: Regenerated.
7893 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7895 * server.c (handle_qxfer): Preserve error message if -3 is
7897 (qxfer): Document the -3 return value.
7899 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7901 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7902 (linux_btrace_h): New variable.
7903 (linux-btrace.o): New rule.
7905 2013-03-08 Stan Shebs <stan@codesourcery.com>
7906 Hafiz Abid Qadeer <abidh@codesourcery.com>
7908 * tracepoint.c (trace_buffer_size): New global.
7909 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7910 (init_trace_buffer): Change to one-argument function. Allocate
7911 trace buffer memory.
7912 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7913 handle QTBuffer:size packet.
7914 (cmd_bigqtbuffer_size): New function.
7915 (initialize_tracepoint): Call init_trace_buffer with
7916 DEFAULT_TRACE_BUFFER_SIZE.
7917 * server.c (handle_query): Add QTBuffer:size in the
7920 2013-03-07 Yao Qi <yao@codesourcery.com>
7922 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7923 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7925 (cmd_qtsp): Adjust condition. Do post increment.
7926 Set cur_action and cur_step_action back to 0.
7928 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7931 * linux-low.c (linux_write_memory): Return early success if LEN is
7934 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7936 * configure.srv: Add x86_64-*-cygwin* as target.
7938 2013-02-28 Tom Tromey <tromey@redhat.com>
7940 * configure.ac: Invoke AC_SYS_LARGEFILE.
7941 * configure, config.in: Rebuild.
7943 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7945 * win32-low.c: Throughout, fix format strings and casts of
7946 printf-like functions to avoid type related warnings on all
7948 (get_child_debug_event): Print dwDebugEventCode as hex since
7949 that's how it's usually documented.
7951 2013-02-28 Yao Qi <yao@codesourcery.com>
7953 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7956 2013-02-27 Jiong Wang <jiwang@tilera.com>
7958 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7959 (reg-tilegx32.c): New rule.
7960 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7961 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7962 different register info initializer according to elf class.
7963 (init_registers_tilgx32): New function. The tilegx32 register info
7965 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7966 (tile_store_gregset): Likewise.
7968 2013-02-27 Yao Qi <yao@codesourcery.com>
7970 * server.c (process_point_options): Print debug message when
7971 debug_threads is true.
7973 2013-02-26 Yao Qi <yao@codesourcery.com>
7975 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7977 2013-02-19 Pedro Alves <palves@redhat.com>
7978 Kai Tietz <ktietz@redhat.com>
7982 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7983 instead of strtoul to extract address from packet.
7984 (process_serial_event) <'z'>: Likewise.
7986 2013-02-18 Yao Qi <yao@codesourcery.com>
7988 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7990 2013-02-14 Pedro Alves <palves@redhat.com>
7994 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7995 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7997 2013-02-14 Pedro Alves <palves@redhat.com>
7999 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8001 2013-02-14 Pedro Alves <palves@redhat.com>
8003 * tracepoint.c (save_string): Delete.
8004 (add_tracepoint_action): Use savestring instead of save_string.
8006 2013-02-12 Pedro Alves <palves@redhat.com>
8008 * linux-xtensa-low.c: Ditto.
8009 * xtensa-xtregs.c: Ditto.
8011 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8013 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8016 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8018 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8019 aarch64_num_wp_regs and aarch64_num_bp_regs to
8020 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8022 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8024 * linux-aarch64-low.c (ps_get_thread_area): Replace
8025 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8027 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8028 Marcus Shawcroft <marcus.shawcroft@arm.com>
8029 Nigel Stephens <nigel.stephens@arm.com>
8030 Yufeng Zhang <yufeng.zhang@arm.com>
8032 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8033 (aarch64.c, aarch64-without-fpu.c): New targets.
8034 * configure.srv (aarch64*-*-linux*): New.
8035 * linux-aarch64-low.c: New file.
8037 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8039 * linux-low.c (handle_extended_wait, linux_create_inferior)
8040 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8041 (dequeue_one_deferred_signal, linux_resume_one_thread)
8042 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8043 (linux_tracefork_grandchild, linux_test_for_tracefork)
8044 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8045 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8046 where the argument is 0.
8048 2013-01-25 Yao Qi <yao@codesourcery.com>
8050 * event-loop.c: Include "queue.h".
8051 (gdb_event_p): New typedef.
8052 (struct gdb_event) <next_event>: Remove.
8053 (event_queue): Change to QUEUE(gdb_event_p).
8054 (async_queue_event): Remove.
8055 (gdb_event_xfree): New.
8056 (initialize_event_loop): New.
8057 (process_event): Use API from QUEUE.
8058 (wait_for_event): Likewise.
8059 * server.c (main): Call initialize_event_loop.
8060 * server.h (initialize_event_loop): Declare.
8062 2013-01-18 Yao Qi <yao@codesourcery.com>
8064 * ax.h (struct eval_agent_expr_context): New.
8065 (gdb_eval_agent_expr): Update declaration.
8066 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8067 TFRAME. Add new argument CTX.
8068 * server.h (struct eval_agent_expr_context): Declare.
8069 (agent_mem_read, agent_tsv_read): Update declaration.
8070 (agent_mem_read_string): Likewise.
8071 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8072 (add_traceframe_block): Add new argument TPOINT.
8073 Increase TPOINT->traceframe_usage.
8074 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8075 eval_tracepoint_agent_expr.
8076 (condition_true_at_tracepoint): Likewise.
8077 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8078 (agent_mem_read_string, agent_tsv_read): Likewise.
8080 2013-01-16 Yao Qi <yao@codesourcery.com>
8082 * linux-low.c (linux_resume_one_lwp): Don't check
8083 'lwp->bp_reinsert != 0'.
8085 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8086 Pedro Alves <palves@redhat.com>
8088 * lynx-low.c (ptrace_request_to_str): Define a temporary
8089 macro and use it to simplify this function's implementation.
8091 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8093 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8096 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8098 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8100 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8102 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8104 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8106 * lynx-low.c (lynx_resume): Use the resume_info parameter
8107 to determine the ptid for the lynx_ptrace call, unless
8108 it is equal to minus_one_ptid, in which case we use the
8109 ptid of the current_inferior.
8110 (lynx_wait_1): After having received a thread create/exit
8111 event, resume the inferior's execution using the signaling
8112 thread's ptid, rather than the old ptid.
8114 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8116 * lynx-low.c (lynx_resume): Delete variable ret.
8118 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8120 * gdbreplay.c (gdbreplay_version): Update copyright year.
8121 * server.c (gdbserver_version): Likewise.
8123 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8125 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8128 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8130 * lynx-low.c (ptrace_request_to_str): Add handling for
8133 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8135 * lynx-low.c (lynx_attach): Delete variable new_process.
8137 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8139 * lynx-low.c (lynx_create_inferior): Delete variable
8142 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8144 * lynx-low.c (ptrace_request_to_str): Do not handle
8145 PTRACE_GETTHREADLIST if this macro does not exist.
8147 2012-12-15 Yao Qi <yao@codesourcery.com>
8149 * Makefile.in (OBS): Add notif.o.
8150 * notif.c, notif.h: New.
8151 * server.c: Include "notif.h".
8152 (struct vstop_notif) <next>: Remove.
8154 (queue_stop_reply): Update.
8155 (push_event, send_next_stop_reply): Remove.
8156 (discard_queued_stop_replies): Update.
8157 (notif_stop): New variable.
8158 (handle_v_stopped): Remove.
8159 (handle_v_requests): Don't call handle_v_stopped. Call
8160 handle_ack_notif instead.
8161 (queue_stop_reply_callback): Call notif_event_enque instead
8162 of queue_stop_reply.
8163 (handle_status): Don't call send_next_stop_reply, call
8164 notif_write_event instead.
8165 (kill_inferior_callback): Likewise.
8166 (detach_or_kill_inferior_callback): Likewise.
8167 (main): Call initialize_notif.
8168 (process_serial_event): Call QUEUE_is_empty.
8169 (handle_target_event): Call notif_push instead of push event.
8170 * server.h (push_event): Remove declaration.
8172 2012-12-10 Tom Tromey <tromey@redhat.com>
8174 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8175 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8178 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8179 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8180 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8181 (amd64-linux-ipa.o, ax.o): Rewrite.
8182 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8183 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8184 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8185 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8186 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8187 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8188 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8189 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8190 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8191 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8192 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8193 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8194 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8195 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8196 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8197 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8198 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8199 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8200 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8201 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8202 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8203 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8204 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8205 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8206 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8207 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8208 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8209 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8210 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8211 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8212 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8213 (reg-tilegx.o): Remove.
8214 (all_object_files): New macro.
8215 Include .deps files.
8216 * aclocal.m4, configure: Rebuild.
8217 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8218 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8219 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8221 2012-12-05 Tom Tromey <tromey@redhat.com>
8224 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8226 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8228 * configure.ac: Check for linux/perf_event.h.
8229 * config.in: Regenerated.
8230 * configure: Regenerated.
8232 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8234 * hostio.c (handle_readlink): Decrease buffer size
8235 parameter passed to readlink by one byte.
8237 2012-11-26 Yao Qi <yao@codesourcery.com>
8239 * configure.ac (build_warnings): Append '-Wempty-body'.
8240 * configure: Regenerated.
8241 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8244 2012-11-15 Pierre Muller <muller@sourceware.org>
8246 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8247 * config.in: Regenerate.
8248 * configure: Regenerate.
8249 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8250 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8251 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8252 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8254 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8255 instead of <sys/wait.h> header.
8256 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8258 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8260 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8261 (various make rules): Remove -DGDBSERVER
8263 2012-11-09 Yao Qi <yao@codesourcery.com>
8265 * spu-low.c (current_ptid): Move it to ..
8266 * gdbthread.h: ... here. New.
8267 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8268 * server.c (myresume, process_serial_event): Likewise.
8269 * thread-db.c (thread_db_find_new_threads): Likewise.
8270 * tracepoint.c (run_inferior_command): Likewise.
8272 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8274 * server.c (handle_search_memory_1): Include access length in
8277 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8279 * linux-crisv32-low.c: Fix compile errors.
8281 2012-09-04 Yao Qi <yao@codesourcery.com>
8283 * tracepoint.c (cmd_qtsv): Adjust debug message.
8284 Don't check CUR_TPOINT.
8286 2012-08-28 Yao Qi <yao@codesourcery.com>
8288 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8289 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8290 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8291 Remove declarations of xmalloc, xreallloc, xstrdup and
8293 * Makefile.in (libiberty_h): New.
8294 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8295 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8297 2012-08-23 Yao Qi <yao@codesourcery.com>
8299 * server.h: Remove declaration of 'xsnprintf'.
8301 2012-08-22 Keith Seitz <keiths@redhat.com>
8303 * server.h: Include build-gnulib-gbserver/config.h.
8304 * gdbreplay.c: Likewise.
8306 2012-08-08 Doug Evans <dje@google.com>
8308 * Makefile.in (SFILES): Add gdb_vecs.c.
8309 (OBS): Add gdb_vecs.o.
8310 (gdb_vecs_h, host_defs_h): New variables.
8311 (thread-db.o): Add $(gdb_vecs_h) dependency.
8312 (gdb_vecs.o): New rule.
8313 * thread-db.c: #include "gdb_vecs.h".
8314 (thread_db_load_search): Use a vector to iterate over path elements.
8315 Handle text appearing after "$pdir".
8317 * configure.ac: Add check for strstr.
8318 * config.in: Regenerate.
8319 * configure: Regenerate.
8321 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8323 * hostio.c (handle_pread): If pread fails, fall back to attempting
8325 (handle_pwrite): Likewise for pwrite.
8327 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8329 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8330 between unsupported TYPE and unimplementable ADDR/LEN combination.
8331 (arm_insert_point): Act on new return value.
8333 2012-07-31 Pedro Alves <palves@redhat.com>
8335 * server.c (process_point_options): Only skip tokens if we find
8336 one that is unrecognized. Don't treat 'X' specially while
8337 skipping unrecognized tokens.
8339 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8341 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8342 to 4-byte-align HW breakpoint addresses for Thumb.
8344 2012-07-27 Yao Qi <yao@codesourcery.com>
8348 * server.h: Declare gdb_agent_about_to_close.
8349 * target.c (kill_inferior): Include "agent.h".
8350 New. Send command 'kill'.
8351 * target.h (kill_inferior): Removed macro.
8352 * tracepoint.c (gdb_agent_about_to_close): New.
8353 (gdb_agent_helper_thread): Handle command 'close'.
8354 Wait endlessly until the inferior stops.
8355 Install gdb_agent_remove_socket to atexit hook.
8356 (agent_socket_name): New static variable.
8357 (gdb_agent_socket_init): Replace local variable 'name' with
8358 'agent_socket_name'.
8359 (gdb_agent_remove_socket): New.
8361 2012-07-27 Yao Qi <yao@codesourcery.com>
8363 * server.c (process_point_options): Stop at 'X' when parsing.
8365 2012-07-19 Michael Eager <eager@eagercon.com>
8367 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8369 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8370 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8371 hardware breakpoint.
8373 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8375 * gdbserver/linux-low.c (initialize_low): Call
8376 linux_ptrace_init_warnings.
8378 2012-07-02 Doug Evans <dje@google.com>
8380 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8383 2012-07-02 Stan Shebs <stan@codesourcery.com>
8385 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8386 (ax.o): Add it to build rule.
8388 (OBS): Add format.o.
8389 (IPA_OBS): Add format.o.
8390 * server.c (handle_query): Claim support for breakpoint commands.
8391 (process_point_options): Add command case.
8392 (process_serial_event): Leave running if there are printfs in
8394 * mem-break.h (any_persistent_commands): Declare.
8395 (add_breakpoint_commands): Declare.
8396 (gdb_no_commands_at_breakpoint): Declare.
8397 (run_breakpoint_commands): Declare.
8398 * mem-break.c (struct point_command_list): New struct.
8399 (struct breakpoint): New field command_list.
8400 (any_persistent_commands): New function.
8401 (add_commands_to_breakpoint): New function.
8402 (add_breakpoint_commands): New function.
8403 (gdb_no_commands_at_breakpoint): New function.
8404 (run_breakpoint_commands): New function.
8405 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8407 * ax.c: Include format.h.
8408 (ax_printf): New function.
8409 (gdb_eval_agent_expr): Add printf opcode.
8411 2012-06-13 Yao Qi <yao@codesourcery.com>
8413 * server.c (start_inferior): Remove duplicated writes to fields
8414 'last_resume_kind' and 'last_status' of 'current_inferior'.
8416 2012-06-12 Yao Qi <yao@codesourcery.com>
8417 Pedro Alves <palves@redhat.com>
8419 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8421 * server.c (handle_v_cont): Extend comment.
8423 2012-06-11 Yao Qi <yao@codesourcery.com>
8425 * linux-low.c (linux_attach): Add 'static'.
8427 2012-06-06 Yao Qi <yao@codesourcery.com>
8429 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8431 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8433 Fix gcc -flto compilation warning.
8434 * server.c (main): Make variable multi_mode and attach volatile.
8436 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8438 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8439 if the platform doesn't know about it.
8441 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8443 * Makefile.in (SFILES): Add linux-tile-low.c.
8444 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8445 * configure.srv: Handle tilegx-*-linux*.
8446 * linux-tile-low.c: New file.
8448 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8450 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8452 2012-05-24 Pedro Alves <palves@redhat.com>
8456 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8458 2012-05-24 Pedro Alves <palves@redhat.com>
8462 Replace target_signal with gdb_signal throughout.
8464 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8466 * linux-low.c (linux_store_registers): Avoid the copying sequence
8467 when no data has been retrieved by ptrace.
8469 2012-05-22 Will Deacon <will.deacon@arm.com>
8471 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8472 Include asm/ptrace.h.
8473 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8476 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8478 * linux-low.c (linux_store_registers): Don't re-retrieve data
8479 with ptrace that has already been obtained from /proc. Always
8480 copy any data retrieved with ptrace to the buffer supplied.
8482 2012-05-11 Yao Qi <yao@codesourcery.com>
8483 Pedro Alves <palves@redhat.com>
8485 * linux-low.c (enum stopping_threads_kind): New.
8486 (stopping_threads): Change type to `enum stopping_threads_kind'.
8487 (handle_extended_wait): If stopping and suspending threads, leave
8488 the new_lwp suspended too.
8489 (linux_wait_for_event): Adjust.
8490 (stop_all_lwps): Set `stopping_threads' to
8491 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8492 whether we're suspending threads or just stopping them. Assert no
8495 2012-04-29 Yao Qi <yao@codesourcery.com>
8497 * server.h: Move some code to ...
8498 * gdbthread.h: ... here. New.
8499 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8500 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8501 (nto-low.o, win32-low.o): Likewise.
8502 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8503 * regcache.c, remote-utils.c, server.c: Likewise.
8504 * target.c, tracepoint.c, win32-low.c: Likewise.
8506 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8508 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8509 (PTRACE_ARG4_TYPE): Likewise.
8510 (PTRACE_XFER_TYPE): Likewise.
8511 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8512 ptrace to PTRACE_ARG3_TYPE.
8513 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8514 (PTRACE_ARG4_TYPE): Likewise.
8515 (PTRACE_XFER_TYPE): Likewise.
8516 (linux_detach_one_lwp): Cast fourth argument of
8517 ptrace to long then PTRACE_ARG4_TYPE.
8518 (regsets_fetch_inferior_registers): Cast third argument of
8519 ptrace to long then PTRACE_ARG3_TYPE.
8520 (regsets_store_inferior_registers): Likewise.
8522 2012-04-20 Pedro Alves <palves@redhat.com>
8524 * configure: Regenerate.
8526 2012-04-19 Pedro Alves <palves@redhat.com>
8528 * Makefile.in (GNULIB_BUILDDIR): New.
8529 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8530 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8531 (all, install-only, uninstall, clean-info, all-lib, clean): No
8532 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8533 (maintainer-clean realclean distclean): Use subdir_do.
8535 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8536 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8537 * acinclude.m4: Include acx_configure_dir.m4.
8538 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8539 calls. Call AC_PROG_RANLIB. Configure gnulib using
8542 (GNULIB_STDINT_H): Adjust.
8543 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8544 * gdbreplay.c: Include build-gnulib/config.h.
8545 * server.h: Likewise.
8546 * aclocal.m4: Regenerate.
8547 * config.in: Regenerate.
8548 * configure: Regenerate.
8550 2012-04-19 Pedro Alves <palves@redhat.com>
8552 * Makefile.in (LIBGNU, INCGNU): Adjust.
8553 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8554 (all, install-only, uninstall, clean-info, all-lib, clean)
8555 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8556 * configure.ac: Adjust AC_OUTPUT output.
8557 * aclocal.m4: Regenerate.
8558 * configure: Regenerate.
8560 2012-04-19 Pedro Alves <palves@redhat.com>
8562 * Makefile.in (generated_files): New.
8563 (server_h): Remove the explicit dependency on config.h, and depend
8564 on $generated_files.
8566 2012-04-19 Pedro Alves <palves@redhat.com>
8568 * Makefile.in (INCGNU): Add -Ignulib.
8570 2012-04-19 Pedro Alves <palves@redhat.com>
8572 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8573 (INCGNU): ... this, and spell out -I here.
8574 (GNULIB_LIB): Rename to ...
8576 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8578 2012-04-19 Pedro Alves <palves@redhat.com>
8580 * config.in: Regenerate.
8582 2012-04-19 Pedro Alves <palves@redhat.com>
8584 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8585 * server.h (memmem): Remove declaration.
8586 * config.in: Regenerate.
8587 * configure: Regenerate.
8589 2012-04-19 Yao Qi <yao@codesourcery.com>
8591 * Makefile.in (SFILES): Add common/vec.c.
8595 2012-04-19 Yao Qi <yao@codesourcery.com>
8597 * remote-utils.c (prepare_resume_reply): Replace with macro
8598 target_core_of_thread.
8599 * server.c (handle_qxfer_threads_proper): Likewise.
8600 * target.h (traget_core_of_thread): New macro.
8602 2012-04-18 Pedro Alves <palves@redhat.com>
8604 * aclocal.m4: Regenerate.
8605 * configure: Regenerate.
8607 2012-04-16 Yao Qi <yao@codesourcery.com>
8609 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8610 duplicated on address.
8612 2012-04-16 Yao Qi <yao@codesourcery.com>
8614 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8615 (struct tracepoint_action_ops) <send>: New field.
8616 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8617 (agent_expr_send, x_tracepoint_action_send): New.
8618 (l_tracepoint_action_send): New.
8619 (cmd_qtdp): Download and install tracepoint
8620 according to `use_agent'.
8621 (run_inferior_command): Add one more parameter `len'.
8623 (tracepoint_send_agent): New.
8624 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8626 2012-04-16 Yao Qi <yao@codesourcery.com>
8628 * tracepoint.c (download_tracepoints): Moved to ...
8629 (cmd_qtstart): ... here.
8631 2012-04-14 Yao Qi <yao@codesourcery.com>
8633 * tracepoint.c: Include inttypes.h.
8634 (struct collect_memory_action): Use sized types.
8635 (struct tracepoint): Likewise.
8636 (cmd_qtdp, stop_tracing): Update print specifiers.
8637 (cmd_qtp, response_tracepoint): Likewise.
8638 (collect_data_at_tracepoint): Likewise.
8639 (collect_data_at_step): Likewise.
8641 2012-04-14 Yao Qi <yao@codesourcery.com>
8643 Import gnulib module inttypes.
8644 * aclocal.m4, config.in, configure: Regenerated.
8646 2012-04-14 Yao Qi <yao@codesourcery.com>
8648 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8649 Makefile and config.status at last.
8651 2012-04-13 Yao Qi <yao@codesourcery.com>
8653 * tracepoint.c: Include stdint.h unconditionally.
8655 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8657 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8658 on BFD_HAVE_SYS_PROCFS_TYPE.
8659 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8660 * configure: Regenerate.
8661 * config.in: Likewise.
8663 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8665 * Makefile.in (clean): Also remove x32.c x32-linux.c
8666 x32-avx.c x32-avx-linux.c.
8667 (x32.o): New target.
8669 (x32-linux.o): Likewise.
8670 (x32-linux.c): Likewise.
8671 (x32-avx.o): Likewise.
8672 (x32-avx.c): Likewise.
8673 (x32-avx-linux.o): Likewise.
8674 (x32-avx-linux.c): Likewise.
8676 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8677 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8678 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8679 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8680 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8681 i386/x32-avx-linux.xml.
8683 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8684 (init_registers_x32_avx_linux): Likwise.
8685 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8686 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8688 2012-04-13 Pedro Alves <palves@redhat.com>
8690 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8691 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8692 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8693 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8696 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8698 * linux-x86-low.c (compat_x32_clock_t): New.
8699 (compat_x32_siginfo_t): Likewise.
8700 (compat_x32_siginfo_from_siginfo): Likewise.
8701 (siginfo_from_compat_x32_siginfo): Likewise.
8702 (linux_is_elf64): Likewise.
8703 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8704 and siginfo_from_compat_x32_siginfo for x32.
8705 (x86_arch_setup): Set linux_is_elf64.
8707 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8710 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8712 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8713 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8714 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8715 compatible with process.
8717 2012-04-12 Yao Qi <yao@codesourcery.com>
8719 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8720 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8721 (install-only, install-info, clean): Handle sub dir gnulib.
8722 (all-lib, am--refresh): New targets.
8723 (memmem.o): Remove target.
8724 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8725 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8726 (AC_REPLACE_FUNCS): Remove memmem.
8727 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8728 (AC_OUTPUT): Generate Makefile in gnulib/.
8729 * aclocal.m4, config.in, configure: Regenerated.
8731 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8733 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8735 2012-04-05 Pedro Alves <palves@redhat.com>
8737 -Werror=strict-aliasing
8739 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8742 2012-04-04 Pedro Alves <palves@redhat.com>
8744 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8745 (sparc_store_gregset_from_stack, sparc_store_gregset)
8746 (sparc_breakpoint_at): Fix formatting.
8748 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8750 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8752 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8753 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8754 * config.in: Regenerate.
8755 * configure: Likewise.
8757 2012-03-29 Pedro Alves <palves@redhat.com>
8759 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8760 Correct ptrace arguments.
8762 2012-03-28 Pedro Alves <palves@redhat.com>
8764 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8765 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8766 (IA64_FR1_REGNUM): New defines.
8767 (ia64_fetch_register): New.
8768 (the_low_target): Install it.
8769 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8771 * linux-low.c (linux_fetch_registers): Try the
8772 the_low_target.fetch_register hook first.
8774 * linux-arm-low.c (the_low_target): Adjust.
8775 * linux-bfin-low.c (the_low_target): Adjust.
8776 * linux-cris-low.c (the_low_target): Adjust.
8777 * linux-crisv32-low.c (the_low_target): Adjust.
8778 * linux-m32r-low.c (the_low_target): Adjust.
8779 * linux-m68k-low.c (the_low_target): Adjust.
8780 * linux-mips-low.c (the_low_target): Adjust.
8781 * linux-ppc-low.c (the_low_target): Adjust.
8782 * linux-s390-low.c (the_low_target): Adjust.
8783 * linux-sh-low.c (the_low_target): Adjust.
8784 * linux-sparc-low.c (the_low_target): Adjust.
8785 * linux-tic6x-low.c (the_low_target): Adjust.
8786 * linux-x86-low.c (the_low_target): Adjust.
8787 * linux-xtensa-low.c (the_low_target): Adjust.
8789 2012-03-26 Pedro Alves <palves@redhat.com>
8791 * server.c (handle_qxfer_libraries): Don't bail early if
8792 the_target->qxfer_libraries_svr4 is not NULL.
8794 2012-03-26 Pedro Alves <palves@redhat.com>
8796 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8798 2012-03-23 Pedro Alves <palves@redhat.com>
8800 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8801 "library-list-svr4" element's start tag when the the DSO list is
8804 2012-03-23 Pedro Alves <palves@redhat.com>
8806 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8807 a variable whose type size is the same as the inferior's pointer
8810 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8812 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8814 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8815 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8816 * linux-low.h: Include <signal.h>.
8817 (struct siginfo): Remove forward declaration.
8818 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8821 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8823 * .gitignore: Ignore more files.
8825 2012-03-19 Pedro Alves <palves@redhat.com>
8826 Jan Kratochvil <jan.kratochvil@redhat.com>
8828 * server.c (cont_thread, general_thread): Add describing comments.
8829 (start_inferior): Clear `cont_thread'.
8830 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8833 2012-03-15 Yao Qi <yao@codesourcery.com>
8835 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8837 (cmd_qtdp): ... here.
8839 2012-03-15 Yao Qi <yao@codesourcery.com>
8841 * tracepoint.c (struct tracepoint_action_ops): New.
8842 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8843 (m_tracepoint_action_download): New.
8844 (r_tracepoint_action_download): New.
8845 (x_tracepoint_action_download): New.
8846 (l_tracepoint_action_download): New.
8847 (add_tracepoint_action): Install `action->ops' according type.
8848 (download_tracepoint_1): Move code `download' function pointer
8849 of various tracepoint_action_ops.
8851 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8853 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8854 linux_ptrace_attach_warnings.
8856 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8858 * Makefile.in (linux-ptrace.o): New.
8859 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8860 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8861 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8862 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8863 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8865 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8867 2012-03-08 Yao Qi <yao@codesourcery.com>
8868 Pedro Alves <palves@redhat.com>
8870 Fix PR server/13392.
8871 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8873 * tracepoint.c (remove_tracepoint): New.
8874 (cmd_qtdp): Call remove_tracepoint when failed to install.
8876 2012-03-07 Pedro Alves <palves@redhat.com>
8878 * linux-low.c (get_detach_signal): New.
8879 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8880 Pass on pending signals to PTRACE_DETACH. Check the result of the
8882 * server.c (program_signals, program_signals_p): New.
8883 (handle_general_set): Handle QProgramSignals.
8884 * server.h (program_signals, program_signals_p): Declare.
8886 2012-03-05 Pedro Alves <palves@redhat.com>
8887 Jan Kratochvil <jan.kratochvil@redhat.com>
8889 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8892 2012-03-03 Yao Qi <yao@codesourcery.com>
8894 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8895 agent_look_up_symbols.
8897 2012-03-03 Yao Qi <yao@codesourcery.com>
8899 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8900 (linux-x86-low.o): Likewise.
8901 * server.h: Remove in_process_agent_loaded.
8902 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8906 2012-03-03 Yao Qi <yao@codesourcery.com>
8908 * tracepoint.c (gdb_agent_capability): New global.
8909 (in_process_agent_loaded_ust): Renamed to
8910 `in_process_agent_supports_ust'.
8912 (in_process_agent_supports_ust): Call agent_capability_check.
8913 (clear_installed_tracepoints): Assert that agent supports
8916 2012-03-03 Yao Qi <yao@codesourcery.com>
8918 * linux-low.c (linux_supports_agent): New.
8919 (linux_target_ops): Initialize field `supports_agent' with
8920 linux_supports_agent.
8921 * target.h (struct target_ops) <supports_agent>: New.
8922 (target_supports_agent): New macro.
8923 * server.c (handle_general_set): Handle packet 'QAgent'.
8924 (handle_query): Send `QAgent+'.
8925 * Makefile.in (server.o): Depends on agent.h.
8927 2012-03-03 Yao Qi <yao@codesourcery.com>
8929 * Makefile.in (OBS): Add agent.o.
8930 Add new rule for agent.o.
8931 Track dependence of tracepoint.c on agent.h.
8932 * tracepoint.c (run_inferior_command_1):
8933 (run_inferior_command): Call agent_run_command.
8934 (gdb_ust_connect_sync_socket): Deleted. Move it to
8936 (resume_thread, stop_thread): Likewise.
8937 (gdb_ust_socket_init): Renamed to ...
8938 (gdb_agent_socket_init): ... New.
8939 (gdb_ust_thread): Renamed to ...
8940 (gdb_agent_helper_thread): ... New.
8941 (gdb_ust_init): Move some code to ...
8942 (gdb_agent_init): ... here. New.
8943 [HAVE_UST]: Call gdb_ust_init.
8944 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8945 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8946 * config.in, configure: Regenerated.
8948 2012-03-02 Pedro Alves <palves@redhat.com>
8950 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8951 * linux-low.c (struct simple_pid_list): New.
8952 (stopped_pids): New a struct simple_pid_list pointer.
8953 (add_to_pid_list, pull_pid_from_list): New.
8954 (handle_extended_wait): Don't assume the first signal new children
8955 report is SIGSTOP. Adjust call to pull_pid_from_list.
8956 (linux_wait_for_lwp): Adjust.
8958 2012-03-02 Yao Qi <yao@codesourcery.com>
8960 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8963 2012-03-02 Yao Qi <yao@codesourcery.com>
8965 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8966 `stop_pc' and `tpoint'. Update caller.
8968 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8970 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8971 * linux-low.c (use_linux_regsets): New macro.
8972 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8973 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8974 (linux_register_in_regsets): New function.
8975 (usr_fetch_inferior_registers): Skip registers covered by
8977 (usr_store_inferior_registers): Likewise.
8978 (usr_fetch_inferior_registers): New macro.
8979 (usr_store_inferior_registers): Likewise.
8980 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8981 (linux_store_registers): Likewise.
8982 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8984 (init_registers_mips64_dsp_linux): Likewise.
8985 (init_registers_mips_linux): New macro.
8986 (init_registers_mips_dsp_linux): Likewise.
8987 (mips_dsp_num_regs): Likewise.
8988 (DSP_BASE, DSP_CONTROL): New fallback macros.
8989 (mips_base_regs): New macro.
8990 (mips_regmap): Use it. Fix the size.
8991 (mips_dsp_regmap): New variable.
8992 (mips_dsp_regset_bitmap): Likewise.
8993 (mips_arch_setup): New function.
8994 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8996 (mips_cannot_store_register): Likewise.
8997 (the_low_target): Update .arch_setup, .num_regs and .regmap
8998 initializers. Add .regset_bitmap initializer.
8999 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9001 * linux-bfin-low.c (the_low_target): Likewise.
9002 * linux-cris-low.c (the_low_target): Likewise.
9003 * linux-crisv32-low.c (the_low_target): Likewise.
9004 * linux-ia64-low.c (the_low_target): Likewise.
9005 * linux-m32r-low.c (the_low_target): Likewise.
9006 * linux-m68k-low.c (the_low_target): Likewise.
9007 * linux-ppc-low.c (the_low_target): Likewise.
9008 * linux-s390-low.c (the_low_target): Likewise.
9009 * linux-sh-low.c (the_low_target): Likewise.
9010 * linux-sparc-low.c (the_low_target): Likewise.
9011 * linux-tic6x-low.c (the_low_target): Likewise.
9012 * linux-x86-low.c (the_low_target): Likewise.
9013 * linux-xtensa-low.c (the_low_target): Likewise.
9014 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9015 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9016 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9018 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9019 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9021 2012-02-29 Yao Qi <yao@codesourcery.com>
9022 Pedro Alves <palves@redhat.com>
9024 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9025 `step_over_finished' is true.
9027 2012-02-27 Pedro Alves <palves@redhat.com>
9029 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9030 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9032 2012-02-27 Pedro Alves <palves@redhat.com>
9035 * linux-low.c (pid_is_stopped): New.
9036 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9038 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9040 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9043 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9045 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9047 2012-02-24 Luis Machado <lgustavo@codesourcery>
9049 * server.c (handle_query): Advertise support for target-side
9050 breakpoint condition evaluation.
9051 (process_point_options): New function.
9052 (process_serial_event): When inserting a breakpoint, check for
9053 a target-side condition that should be evaluated.
9055 * mem-break.c: Include regcache.h and ax.h.
9056 (point_cond_list_t): New data structure.
9057 (breakpoint) <cond_list>: New field.
9058 (find_gdb_breakpoint_at): Make non-static.
9059 (delete_gdb_breakpoint_at): Clear any target-side
9061 (clear_gdb_breakpoint_conditions): New function.
9062 (add_condition_to_breakpoint): Likewise.
9063 (add_breakpoint_condition): Likewise.
9064 (gdb_condition_true_at_breakpoint): Likewise.
9065 (gdb_breakpoint_here): Return result directly instead
9066 of going through a local variable.
9068 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9069 (clear_gdb_breakpoint_conditions): Likewise.
9070 (add_breakpoint_condition): Likewise.
9071 (gdb_condition_true_at_breakpoint): Likewise.
9073 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9074 (need_step_over_p): Take target-side breakpoint condition into
9077 2012-02-24 Luis Machado <lgustavo@codesourcery>
9079 * server.h: Include tracepoint.h.
9080 (agent_mem_read, agent_get_trace_state_variable_value,
9081 agent_set_trace_state_variable_value,
9082 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9083 get_set_tsv_func_addr): New prototypes.
9085 * ax.h: New include file.
9086 * ax.c: New source file.
9088 * tracepoint.c: Include ax.h.
9089 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9090 agent_expr, eval_result_type): Move to ax.h.
9091 (parse_agent_expr): Rename to ...
9092 (gdb_parse_agent_expr): ... this, make it non-static and move
9094 (unparse_agent_expr) Rename to ...
9095 (gdb_unparse_agent_expr): ... this, make it non-static and move
9097 (eval_agent_expr): Rename to ...
9098 (eval_tracepoint_agent_expr): ... this.
9099 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9100 forward declarations.
9101 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9102 (agent_get_trace_state_variable_value): New function.
9103 (agent_set_trace_state_variable_value): New function.
9104 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9105 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9106 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9107 (condition_true_at_tracepoint): Likewise.
9108 (parse_agent_expr): Rename to ...
9109 (gdb_parse_agent_expr): ... this and move to ax.c.
9110 (unparse_agent_expr): Rename to ...
9111 (gdb_unparse_agent_expr): ... this and move to ax.c.
9112 (gdb_agent_op_name): Move to ax.c.
9113 (eval_agent_expr): Rename to ...
9114 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9116 (eval_tracepoint_agent_expr): New function.
9117 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9119 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9121 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9122 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9123 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9124 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9125 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9126 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9127 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9128 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9129 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9130 (compile_bytecodes): Remove forward declaration.
9131 (is_goto_target): Move to ax.c.
9132 (compile_bytecodes): Move to ax.c and call
9133 agent_get_trace_state_variable_value (...) and
9134 agent_set_trace_state_variable_value (...).
9136 * Makefile.in: Update ax.c and IPA dependencies.
9138 2012-02-24 Pedro Alves <palves@redhat.com>
9140 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9141 (cmd_bigqtbuffer_circular): ... this. Only handle
9142 'QTBuffer:circular:'.
9143 (handle_tracepoint_general_set): Adjust.
9145 2012-02-16 Yao Qi <yao@codesourcery.com>
9147 * inferiors.c: Move code to ...
9148 * dll.c: .... here. New.
9149 * server.h: Declare clear_dlls.
9150 * Makefile.in (SFILES): Add dll.c.
9154 2012-02-11 Yao Qi <yao@codesourcery.com>
9156 * server.c: (handle_monitor_command): Add a new parameter
9158 (handle_query): Update caller.
9160 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9162 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9163 * configure, config.in: Regenerate.
9164 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9167 2012-02-02 Pedro Alves <palves@redhat.com>
9169 Try SIGKILL first, then PTRACE_KILL.
9170 * linux-low.c (linux_kill_one_lwp): New.
9171 (linux_kill_one_lwp): Rename to ...
9172 (kill_one_lwp_callback): ... this. Use the new
9175 2012-02-02 Pedro Alves <palves@redhat.com>
9177 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9180 2012-01-27 Pedro Alves <palves@redhat.com>
9182 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9183 (elf_64_file_p): Make static.
9184 (linux_pid_exe_is_elf_64_file): New.
9185 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9186 Delete declarations.
9187 (linux_pid_exe_is_elf_64_file): Declare.
9188 * linux-x86-low.c (x86_arch_setup): Use
9189 linux_pid_exe_is_elf_64_file.
9191 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9193 * linux-low.c (linux_wait_for_event_1): Rename to ...
9194 (linux_wait_for_event): ... here and merge it with former
9195 linux_wait_for_event - new variable wait_ptid, use it.
9196 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9198 2012-01-23 Pedro Alves <palves@redhat.com>
9200 * server.c (main): Avoid yet another case of infinite loop while
9201 detaching/killing after a longjmp.
9203 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9206 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9208 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9210 * hostio.c (handle_readlink): New function.
9211 (handle_vFile): Call it to handle "vFile:readlink" packets.
9213 2012-01-20 Pedro Alves <palves@redhat.com>
9214 Ulrich Weigand <ulrich.weigand@linaro.org>
9216 * server.c (handle_v_requests): Only support vAttach and vRun to
9217 start multiple processes when in extended protocol mode.
9219 2012-01-17 Pedro Alves <palves@redhat.com>
9221 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9222 memalign plus mprotect to allocate the scratch buffer.
9224 2012-01-13 Pedro Alves <palves@redhat.com>
9226 * server.c (attach_inferior): Clear `cont_thread'.
9228 2012-01-13 Pedro Alves <palves@redhat.com>
9230 * server.c (main): Avoid infinite loop while detaching/killing
9233 2012-01-09 Doug Evans <dje@google.com>
9235 * server.c (start_inferior): Set last_ptid in --wrapper case.
9237 2012-01-06 Yao Qi <yao@codesourcery.com>
9239 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9241 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9243 2012-01-04 Yao Qi <yao@codesourcery.com>
9245 * tracepoint.c (cmd_qtdp): Print debug message
9246 for static tracepoint.
9248 2012-01-04 Yao Qi <yao@codesourcery.com>
9250 * tracepoint.c (trace_vdebug): Differentiate debug message
9251 between gdbserver and IPA.
9253 2012-01-03 Yao Qi <yao@codesourcery.com>
9255 * tracepoint.c (tracepoint_was_hit): Don't collect for
9258 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9260 * terminal.h: Reformat copyright header.
9262 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9264 * server.c (gdbserver_version): Update copyright year.
9265 * gdbreplay.c (gdbreplay_version): Likewise.
9267 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9269 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9272 2011-12-18 Hui Zhu <teawater@gmail.com>
9273 * linux-low.c (linux_create_inferior): Save return value to ret.
9275 2011-12-18 Hui Zhu <teawater@gmail.com>
9277 * linux-low.c (linux_create_inferior): Save return value to ret.
9279 2011-12-16 Doug Evans <dje@google.com>
9281 * linux-low.c (linux_create_inferior): If stdio connection,
9282 redirect stdin from /dev/null, stdout to stderr.
9283 * remote-utils.c (remote_is_stdio): New static global.
9284 (remote_connection_is_stdio): New function.
9285 (remote_prepare): Handle stdio connection.
9286 (remote_open): Ditto.
9287 (remote_close): Don't close stdin for stdio connections.
9288 (read_prim,write_prim): New functions. Replace all calls to
9289 read/write to these.
9290 * server.c (main): Watch for "-" argument. Move call to
9291 remote_prepare before start_inferior.
9292 * server.h (STDIO_CONNECTION_NAME): New macro.
9293 (remote_connection_is_stdio): Declare.
9295 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9296 in debugging output.
9298 2011-12-15 Yao Qi <yao@codesourcery.com>
9300 * tracepoint.c: Include sys/syscall.h.
9301 (gdb_ust_thread): Remove preprocessor conditional.
9303 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9305 * linux-low.c (linux_detach_one_lwp): Call
9306 the_low_target.prepare_to_resume before detaching.
9308 2011-12-14 Yao Qi <yao@codesourcery.com>
9310 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9313 2011-12-14 Yao Qi <yao@codesourcery.com>
9315 * i386-low.c (i386_low_stopped_data_address): Initialize local
9318 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9322 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9323 DR_CONTROL unless necessary. Extend comments.
9324 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9325 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9327 2011-12-13 Yao Qi <yao@codesourcery.com>
9329 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9331 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9333 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9335 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9336 Print new debug message for such case.
9338 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9340 Fix overlapping memcpy.
9341 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9342 the read_inferior_memory transfer.
9343 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9344 write_inferior_memory transfer.
9345 (set_fast_tracepoint_jump): New variable buf. Use it for the
9346 read_inferior_memory and write_inferior_memory transfers.
9347 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9348 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9349 Use it for the write_inferior_memory transfer.
9350 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9353 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9355 * linux-low.c (fetch_register, store_register): Make code
9356 consistent, fix formatting.
9358 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9360 * linux-low.c (usr_store_inferior_registers): Factor out code
9361 to handle individual registers into...
9362 (store_register): ... this new function.
9364 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9366 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9367 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9368 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9369 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9370 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9371 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9372 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9373 (srv_xmlfiles): Add new XML files.
9375 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9377 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9378 (init_registers_s390_linux32v1): Add prototype.
9379 (init_registers_s390_linux32v2): Likewise.
9380 (init_registers_s390_linux64v1): Likewise.
9381 (init_registers_s390_linux64v2): Likewise.
9382 (init_registers_s390x_linux64v1): Likewise.
9383 (init_registers_s390x_linux64v2): Likewise.
9384 (s390_num_regs): Increment to 52.
9385 (s390_regmap): Add orig_r2 register.
9386 (s390_num_regs_3264): Increment to 68.
9387 (s390_regmap_3264): Add orig_r2 register.
9388 (s390_collect_ptrace_register): Handle orig_r2 register.
9389 (s390_supply_ptrace_register): Likewise.
9390 (s390_fill_last_break): New function.
9391 (s390_store_last_break): Likewise.
9392 (s390_fill_system_call): New function.
9393 (s390_store_system_call): Likewise.
9394 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9396 (s390_check_regset): New function.
9397 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9398 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9399 Update target_regsets for available register sets.
9401 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9402 Jan Kratochvil <jan.kratochvil@redhat.com>
9404 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9405 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9407 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9408 * linux-low.h (struct process_info_private): New member r_debug.
9409 * server.c (handle_qxfer_libraries): Call
9410 the_target->qxfer_libraries_svr4.
9411 (handle_qxfer_libraries_svr4): New function.
9412 (qxfer_packets): New entry "libraries-svr4".
9413 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9414 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9415 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9416 PACKET_qXfer_libraries_svr4.
9418 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9420 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9421 PSW address/mask between 8-byte and 16-byte formats.
9422 (s390_supply_ptrace_register): Likewise.
9423 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9424 basic addressing mode bit.
9426 2011-11-24 Stan Shebs <stan@codesourcery.com>
9428 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9430 2011-11-17 Stan Shebs <stan@codesourcery.com>
9432 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9433 (tracing_start_time): New global.
9434 (tracing_stop_time): New global.
9435 (tracing_user_name): New global.
9436 (tracing_notes): New global.
9437 (tracing_stop_note): New global.
9438 (cmd_qtstart): Set traceframe_usage, start_time.
9439 (stop_tracing): Set stop_time.
9440 (cmd_qtstatus): Report additional status.
9441 (cmd_qtp): New function.
9442 (handle_tracepoint_query): Call it.
9443 (cmd_qtnotes): New function.
9444 (handle_tracepoint_general_set): Call it.
9445 (get_timestamp): Rename from tsv_get_timestamp.
9447 2011-11-14 Stan Shebs <stan@codesourcery.com>
9448 Kwok Cheung Yeung <kcy@codesourcery.com>
9450 * linux-x86-low.c (small_jump_insn): New.
9451 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9452 trampoline and error message, build a trampoline and issue a small
9453 jump instruction to it.
9454 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9455 trampoline and error message.
9456 (x86_get_min_fast_tracepoint_insn_len): New.
9457 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9458 * linux-low.h (struct linux_target_ops): Add arguments to
9459 install_fast_tracepoint_jump_pad operation, add new operation.
9460 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9462 (linux_get_min_fast_tracepoint_insn_len): New function.
9463 (linux_target_op): Add new operation.
9464 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9465 (gdb_trampoline_buffer_end): Ditto.
9466 (gdb_trampoline_buffer_error): Ditto.
9467 (struct ipa_sym_addresses): Add fields for new IPA variables.
9468 (symbol_list): Add entries for new IPA variables.
9469 (struct tracepoint): Add fields to hold the address range of the
9470 trampoline used by the tracepoint.
9471 (trampoline_buffer_head): New static variable.
9472 (trampoline_buffer_tail): Ditto.
9473 (claim_trampoline_space): New function.
9474 (have_fast_tracepoint_trampoline_buffer): New function.
9475 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9477 (install_fast_tracepoint): Ditto, also add error buffer argument.
9478 (cmd_qtminftpilen): New function.
9479 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9480 (fast_tracepoint_from_trampoline_address): New function.
9481 (fast_tracepoint_collecting): Handle trampoline as part of jump
9483 (set_trampoline_buffer_space): New function.
9484 (initialize_tracepoint): Initialize new IPA variables.
9485 * target.h (struct target_ops): Add arguments to
9486 install_fast_tracepoint_jump_pad operation, add new
9487 get_min_fast_tracepoint_insn_len operation.
9488 (target_get_min_fast_tracepoint_insn_len): New.
9489 (install_fast_tracepoint_jump_pad): Add arguments.
9490 * server.h (IPA_BUFSIZ): Define.
9491 * linux-i386-ipa.c: Include extra header files.
9492 (initialize_fast_tracepoint_trampoline_buffer): New function.
9493 (initialize_low_tracepoint): Call it.
9494 * server.h (set_trampoline_buffer_space): Declare.
9495 (claim_trampoline_space): Ditto.
9496 (have_fast_tracepoint_trampoline_buffer): Ditto.
9498 2011-11-14 Yao Qi <yao@codesourcery.com>
9500 * server.c (handle_query): Handle InstallInTrace for qSupported.
9501 * tracepoint.c (add_tracepoint): Sort list.
9502 (install_tracepoint, download_tracepoint): New.
9503 (cmd_qtdp): Call them to install and download tracepoints.
9504 (sort_tracepoints): Removed.
9505 (cmd_qtstart): Update.
9507 2011-11-14 Yao Qi <yao@codesourcery.com>
9509 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9510 * mem-break.h: Declare.
9511 * tracepoint.c (cmd_qtstart): Move some code to ...
9512 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9514 (download_tracepoints): Move some code to ...
9515 (download_tracepoint_1): ... here. New.
9517 2011-11-08 Yao Qi <yao@codesourcery.com>
9519 * remote-utils.c (relocate_instruction): A comment fix.
9521 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9523 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9524 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9525 dr_status_mirror and dr_control_mirror from debug_reg_state.
9526 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9527 (i386_initial_stuff): Remove use of deleted globals.
9528 (i386_get_thread_context, i386_set_thread_context,
9529 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9530 from debug_reg_state.
9532 2011-11-05 Yao Qi <yao@codesourcery.com>
9534 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9535 address as TPOINT's.
9537 2011-11-02 Stan Shebs <stan@codesourcery.com>
9539 * tracepoint.c (agent_mem_read_string): New function.
9540 (eval_agent_expr): Call it for tracenz.
9541 * server.c (handle_query): Report support for tracenz.
9543 2011-11-02 Yao Qi <yao@codesourcery.com>
9545 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9547 2011-11-02 Yao Qi <yao@codesourcery.com>
9549 * target.h: Fix a typo in comment.
9551 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9553 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9554 clobber the breakpoints' shadows with fast tracepoint jumps.
9555 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9556 * target.c (write_inferior_memory): Also pass MYADDR down to
9559 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9561 * configure.ac: Check support for personality routine.
9562 * configure: Regenerate.
9563 * config.in: Likewise.
9564 * linux-low.c: Include <sys/personality.h>.
9565 Define ADDR_NO_RANDOMIZE if necessary.
9566 (linux_create_inferior): Disable address space randomization when
9567 forking inferior, if requested.
9568 (linux_supports_disable_randomization): New function.
9569 (linux_target_ops): Install it.
9570 * server.h (disable_randomization): Declare.
9571 * server.c (disable_randomization): New global variable.
9572 (handle_general_set): Handle QDisableRandomization.
9573 (handle_query): Likewise for qSupported.
9574 (main): Support --disable-randomization and --no-disable-randomization
9575 command line arguments.
9576 * target.h (struct target_ops): Add supports_disable_randomization.
9577 (target_supports_disable_randomization): New macro.
9579 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9581 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9583 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9584 [!PT_GETDSBT] (target_loadmap): New definition.
9585 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9586 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9587 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9588 and PT_GETDSBT to LINUX_LOADMAP.
9589 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9590 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9592 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9594 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9595 (arm_linux_hwbp_cap): New static variable.
9596 (arm_linux_get_hwbp_cap): Replace by ...
9597 (arm_linux_init_hwbp_cap): ... this new function.
9598 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9599 (arm_linux_get_hw_watchpoint_count): Likewise.
9600 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9601 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9602 (arm_prepare_to_resume): Use perror_with_name instead of error.
9604 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9606 * linux-arm-low.c: Include <signal.h>.
9607 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9608 (struct arm_linux_hwbp_cap): New data type.
9609 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9610 (struct arm_linux_hw_breakpoint): New data type.
9611 (MAX_BPTS, MAX_WPTS): Define.
9612 (struct arch_process_info, struct arch_lwp_info): New data types.
9613 (arm_linux_get_hwbp_cap): New function.
9614 (arm_linux_get_hw_breakpoint_count): Likewise.
9615 (arm_linux_get_hw_watchpoint_count): Likewise.
9616 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9617 (arm_hwbp_control_initialize): Likewise.
9618 (arm_hwbp_control_is_enabled): Likewise.
9619 (arm_hwbp_control_is_initialized): Likewise.
9620 (arm_hwbp_control_disable): Likewise.
9621 (arm_linux_hw_breakpoint_equal): Likewise.
9622 (arm_linux_hw_point_initialize): Likewise.
9623 (struct update_registers_data): New data structure.
9624 (update_registers_callback: New function.
9625 (arm_insert_point): Likewise.
9626 (arm_remove_point): Likewise.
9627 (arm_stopped_by_watchpoint): Likewise.
9628 (arm_stopped_data_address): Likewise.
9629 (arm_new_process): Likewise.
9630 (arm_new_thread): Likewise.
9631 (arm_prepare_to_resume): Likewise.
9632 (the_low_target): Register arm_insert_point, arm_remove_point,
9633 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9634 arm_new_thread, and arm_prepare_to_resume.
9636 2011-09-15 Stan Shebs <stan@codesourcery.com>
9638 * server.h (struct emit_ops): Add compare-goto fields.
9639 * tracepoint.c (gdb_agent_op_sizes): New table.
9640 (emit_eq_goto): New function.
9641 (emit_ne_goto): New function.
9642 (emit_lt_goto): New function.
9643 (emit_le_goto): New function.
9644 (emit_gt_goto): New function.
9645 (emit_ge_goto): New function.
9646 (is_goto_target): New function.
9647 (compile_bytecodes): Recognize special cases of compare-goto
9648 combinations and call specialized emitters for them.
9649 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9650 (amd64_emit_ne_goto): New function.
9651 (amd64_emit_lt_goto): New function.
9652 (amd64_emit_le_goto): New function.
9653 (amd64_emit_gt_goto): New function.
9654 (amd64_emit_ge_goto): New function.
9655 (amd64_emit_ops): Add the new functions.
9656 (i386_emit_eq_goto): New function.
9657 (i386_emit_ne_goto): New function.
9658 (i386_emit_lt_goto): New function.
9659 (i386_emit_le_goto): New function.
9660 (i386_emit_gt_goto): New function.
9661 (i386_emit_ge_goto): New function.
9662 (i386_emit_ops): Add the new functions.
9664 2011-09-08 Stan Shebs <stan@codesourcery.com>
9666 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9667 (i386_emit_epilogue): Restore %ebx.
9669 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9671 * server.c (step_thread): Remove definition.
9672 (process_serial_event): Don't handle Hs.
9673 * server.h (step_thread): Remove declaration.
9674 * target.c (set_desired_inferior): Remove use of step_thread.
9676 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9678 * linux-low.c: Include linux-procfs.h.
9679 (linux_attach_lwp_1): Update comments.
9680 (linux_attach): Scan for existing threads when attaching to a
9681 process that is the tgid.
9682 * Makefile.in: Update dependencies.
9684 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9686 * configure.srv: Add linux-procfs.o dependencies.
9688 2011-08-14 Yao Qi <yao@codesourcery.com>
9690 * target.h (struct target_ops): Fix indent.
9691 * win32-low.c (win32_target_ops): Fix comment.
9693 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9694 Yao Qi <yao@codesourcery.com>
9696 * Makefile.in (clean): Remove tic6x-*.c files.
9697 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9698 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9699 (tic6x-c64xp-linux.c): Likewise.
9700 * configure.srv: Add support for tic6x-*-uclinux.
9701 * linux-tic6x-low.c: New.
9702 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9704 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9705 Yao Qi <yao@codesourcery.com>
9707 * target.h (struct target_ops): Add read_loadmap.
9708 * linux-low.c (struct target_loadseg): New type.
9709 (struct target_loadmap): New type.
9710 (linux_read_loadmap): New function.
9711 (linux_target_ops): Add linux_read_loadmap.
9712 * server.c (handle_query): Support qXfer:fdpic:read packet.
9713 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9716 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9718 * win32-low.c: Include <stdint.h>.
9720 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9722 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9723 to the inferior here.
9724 (i386_remove_aligned_watchpoint): Ditto.
9725 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9726 fit part of the watchpoint in the debug registers.
9727 (i386_update_inferior_debug_regs): New.
9728 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9729 registers, and only update the inferior on success.
9730 (i386_low_remove_watchpoint): Ditto.
9732 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9734 * linux-low.c (compare_ints, unique, list_threads, show_process,
9735 linux_core_of_thread): Delete.
9736 (linux_target_ops): Change linux_core_of_thread to
9737 linux_common_core_of_thread.
9738 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9739 * utils.c (malloc_failure): Change type of argument.
9740 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9741 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9742 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9743 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9744 (IPA_OBJS): Add common-utils-ipa.o.
9745 (ptid_h, linux_osdata_h): New macros.
9746 (server_h): Add common/common-utils.h, common/xml-utils.h,
9747 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9749 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9750 ptid.o, buffer.o): New rules.
9751 (linux-low.o): Add common/linux-osdata.h as a dependency.
9752 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9753 * configure.ac: Add AC_HEADER_DIRENT check.
9754 * config.in: Regenerate.
9755 * configure: Regenerate.
9756 * remote-utils.c (xml_escape_text): Delete.
9757 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9758 buffer_xml_printf): Move to common/buffer.c.
9759 * server.c (main): Remove call to initialize_inferiors.
9760 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9761 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9762 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9763 internal_error, gdb_assert, gdb_assert_fail): Delete.
9764 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9765 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9767 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9768 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9769 initialize_inferiors): Delete.
9771 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9773 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9776 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9778 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9780 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9782 2011-05-26 Yao Qi <yao@codesourcery.com>
9784 * Makefile.in (thread-db.o): Track dependence to
9785 common/gdb_thread_db.h.
9786 * thread-db.c: include gdb_thread_db.h from right place.
9788 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9790 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9791 __FILE__ and __LINE__ to internal_error.
9793 2011-05-13 Doug Evans <dje@google.com>
9795 * thread-db.c (try_thread_db_load_from_sdir): New function.
9796 (try_thread_db_load_from_dir): New function.
9797 (thread_db_load_search): Handle $sdir, ignore $pdir.
9798 Remove trying of system directories if search of
9799 libthread-db-search-path fails, that is now done via $sdir.
9801 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9803 * server.c (handle_query): Add EnableDisableTracepoints to the list
9804 of supported features.
9805 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9807 (cmd_qtenable_disable): New.
9808 (cmd_qtstart): Install tracepoints even if disabled.
9809 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9810 receiving a QTEnable or QTDisable packet.
9811 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9812 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9814 (gdb_probe): Skip data collection if static tracepoint is disabled.
9816 2011-05-10 Doug Evans <dje@google.com>
9818 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9820 2011-05-04 Doug Evans <dje@google.com>
9822 * linux-low.c (linux_join): Skip process lookup.
9823 * spu-low.c (spu_join): Ditto.
9824 * server.c (join_inferiors_callback): Delete.
9825 (process_serial_event): For 'D' packet (detach) call join_inferior
9828 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9830 * README: Don't mention xscale*-*-linux*.
9831 * configure.srv (xscale*-*-linux*): Don't handle target.
9833 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9835 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9837 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9838 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9839 (i386_emit_void_call_2): Likewise.
9841 2011-04-26 Yao Qi <yao@codesourcery.com>
9843 * linux-low.c: Move common macros to linux-ptrace.h.
9844 Include linux-ptrace.h.
9845 * Makefile.in (linux_ptrace_h): New.
9846 (linux-low.o): Depends on linux-ptrace.h.
9848 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9850 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9851 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9852 (remote_prepare): New function with most of the TCP code from ...
9853 (remote_open): ... here. Detect PORT here unconditionally. Move also
9854 setting transport_is_reliable.
9855 * server.c (run_once): New variable.
9856 (gdbserver_usage): Document it.
9857 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9858 the first run if RUN_ONCE.
9859 * server.h (run_once, remote_prepare): New declarations.
9861 2011-04-19 Tom Tromey <tromey@redhat.com>
9863 * win32-low.c (handle_load_dll): Remove duplicate "the".
9865 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9867 Remove support for old Cygwin 1.5 versions.
9868 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9869 function to avoid warning.
9870 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9873 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9875 * gdbserver/server.h (Macro _): Define it if not available.
9877 2011-03-14 Michael Snyder <msnyder@vmware.com>
9879 * hostio.c (handle_close): Remove unnecessary null test.
9881 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9883 * Makefile.in (maintainer-clean realclean distclean): Remove
9884 "make ... subdir_do" command.
9886 2011-03-10 Michael Snyder <msnyder@vmware.com>
9888 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9890 * server.c (handle_v_run): Free alloced buffer on early return.
9892 2011-03-09 Yao Qi <yao@codesourcery.com>
9895 2011-03-04 Yao Qi <yao@codesourcery.com>
9897 * Makefile.in: Remove GNU make feature --directory.
9899 2011-03-05 Yao Qi <yao@codesourcery.com>
9901 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9902 (subdir_do): New make target. Copied from gdb/Makefile.
9903 (maintainer-clean, realclean, distclean, clean): Call corresponding
9904 make targets in common/Makefile.
9906 2011-02-11 Yao Qi <yao@codesourcery.com>
9908 * configure.ac: Call AC_PROG_RANLIB.
9909 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9910 * configure: Regenerate.
9912 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9914 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9916 2011-03-06 Yao Qi <yao@codesourcery.com>
9918 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9920 2011-03-05 Yao Qi <yao@codesourcery.com>
9922 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9923 (subdir_do): New make target. Copied from gdb/Makefile.
9924 (maintainer-clean, realclean, distclean, clean): Call corresponding
9925 make targets in common/Makefile.
9927 2011-03-04 Yao Qi <yao@codesourcery.com>
9929 * Makefile.in: Remove GNU make feature --directory.
9931 2011-03-04 Michael Snyder <msnyder@vmware.com>
9933 * server.c (queue_stop_reply): Call xmalloc not malloc.
9935 2011-03-02 Michael Snyder <msnyder@vmware.com>
9937 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9939 2011-02-28 Michael Snyder <msnyder@vmware.com>
9941 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9942 (cmd_qtframe): Ditto.
9943 (cmd_qtbuffer): Ditto.
9944 (cmd_bigqtbuffer): Ditto.
9946 * utils.c (decimal2str): Initialize 'width' to nine, then
9949 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9951 * hostio.c (require_data): Free *data, not data.
9953 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9955 * hostio.c (require_data): Use free, not xfree.
9957 2011-02-27 Michael Snyder <msnyder@vmware.com>
9959 * server.c (handle_query): Discard unused value.
9961 * hostio.c (require_data): Free malloc memory before returning
9964 2011-02-26 Michael Snyder <msnyder@vmware.com>
9966 * linux-low.c (list_threads): Call closedir for dirent.
9968 2011-02-27 Michael Snyder <msnyder@vmware.com>
9970 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9971 a case statement falls through.
9973 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9975 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9978 2011-02-26 Michael Snyder <msnyder@vmware.com>
9980 * utils.c (decimal2str): Eliminate dead code and dead param.
9981 (pulongest): Drop dead param from call to decimal2str.
9984 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9986 Revert the following patch (not approved yet):
9987 2011-02-21 Hui Zhu <teawater@gmail.com>
9988 * tracepoint.c (tp_printf): New function.
9989 (eval_agent_expr): Handle gdb_agent_op_printf.
9991 2011-02-21 Hui Zhu <teawater@gmail.com>
9993 * tracepoint.c (tp_printf): New function.
9994 (eval_agent_expr): Handle gdb_agent_op_printf.
9996 2011-02-18 Tom Tromey <tromey@redhat.com>
9998 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9999 (tracepoint.o): Likewise.
10000 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10001 (gdb_agent_op_names): Likewise.
10003 2011-02-18 Tom Tromey <tromey@redhat.com>
10005 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10006 gdb_agent_op_rot>: New constants.
10007 (gdb_agent_op_names): Add pick and roll.
10008 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10011 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10013 * aclocal.m4: Regenerated with aclocal-1.11.1.
10015 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10017 * server.c (handle_qxfer_traceframe_info): New.
10018 (qxfer_packets): Register "traceframe-info".
10019 (handle_query): Report support for qXfer:traceframe-info:read+.
10020 * tracepoint.c (match_blocktype): New.
10021 (traceframe_find_block_type): Rename to ...
10022 (traceframe_walk_blocks): ... this. Add callback filter argument,
10024 (traceframe_find_block_type): New, reimplemented on top of
10025 traceframe_walk_blocks.
10026 (build_traceframe_info_xml): New.
10027 (traceframe_read_info): New.
10028 * server.h (traceframe_read_info): Declare.
10030 2011-02-11 Yao Qi <yao@codesourcery.com>
10032 * configure.ac: Call AC_PROG_RANLIB.
10033 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10034 * configure: Regenerate.
10036 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10038 * server.c (gdb_read_memory): Change return semantics to allow
10040 (handle_search_memory_1): Adjust.
10041 (process_serial_event) <'m' packet>: Handle partial transfers.
10042 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10044 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10046 * regcache.c (init_register_cache): Initialize
10047 regcache->register_status.
10048 (free_register_cache): Release regcache->register_status.
10049 (regcache_cpy): Copy register_status.
10050 (registers_to_string): Print 'x's for unavailable registers.
10051 (supply_register): Mark the register's status valid or
10052 unavailable, depending on whether a buffer was passed in or not.
10053 (supply_register_zeroed): New.
10054 (supply_regblock): Mark the registers' status valid or
10055 unavailable, depending on whether a buffer was passed in or not.
10056 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10057 (struct regcache): New `register_status' field.
10058 (supply_register_zeroed): Declare.
10059 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10060 supply_register_zeroed, rather than passing a NULL buffer to
10062 * tracepoint.c (fetch_traceframe_registers): Update comment.
10064 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10066 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10069 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10071 * server.h (decode_xfer_write): Change prototype.
10072 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10073 and don't extract the annex here.
10074 * server.c (decode_xfer_read): Remove `annex' parameter,
10075 and don't extract the annex here.
10076 (decode_xfer): New.
10077 (struct qxfer): New.
10078 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10079 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10080 (handle_qxfer_statictrace): New functions, abstracted out from
10081 handle_query, and made to use the struct qxfer interface.
10082 (handle_threads_qxfer_proper): Rename to ...
10083 (handle_qxfer_threads_proper): ... this.
10084 (handle_threads_qxfer): Rename to ...
10085 (handle_qxfer_threads): ... this. Adjust.
10086 (qxfer_packets): New array.
10087 (handle_qxfer): New function.
10088 (handle_query): Use handle_qxfer.
10090 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10092 * gdbreplay.c: Shorten lines of >= 80 columns.
10093 * linux-low.c: Ditto.
10094 * linux-ppc-low.c: Ditto.
10095 * linux-s390-low.c: Ditto.
10096 * linux-sparc-low.c: Ditto.
10097 * linux-x86-low.c: Ditto.
10098 * linux-xtensa-low.c: Ditto.
10099 * mem-break.c: Ditto.
10100 * nto-low.c: Ditto.
10101 * regcache.h: Ditto.
10102 * remote-utils.c: Ditto.
10105 * thread-db.c: Ditto.
10106 * tracepoint.c: Ditto.
10108 * win32-low.h: Ditto.
10110 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10112 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10115 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10117 * server.c (gdbserver_version): Update copyright year in version
10119 * gdbreplay.c (gdbreplay_version): Ditto.
10121 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10123 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10124 * linux-bfin-low.c: New file.
10125 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10126 PT_DATA_ADDR for BFIN targets.
10127 * Makefile.in (SFILES): Add linux-bfin-low.c.
10128 (clean): Remove reg-bfin.c.
10129 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10130 * README: Mention supported Blackfin targets.
10132 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10134 * .gitignore: New file.
10136 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10138 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10140 2010-10-22 Jie Zhang <jie@codesourcery.com>
10142 * Makefile.in: Add FLAGS_TO_PASS variable.
10143 (install): Remove dependency of install-only and recursively
10144 invoke make for install-only.
10146 2010-10-04 Doug Evans <dje@google.com>
10148 * Makefile.in (uninstall): Use $(DESTDIR).
10150 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10154 * linux-x86-low.c (compat_siginfo_from_siginfo)
10155 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10156 si_code is < 0. Check for si_code == SI_TIMER before checking for
10159 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10161 * lynx-i386-low.c: New file.
10162 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10164 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10166 * lynx-low.c (ptrace_request_to_str): Remove handling for
10167 request values that have been removed in LynxOS 5.x.
10169 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10171 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10174 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10176 * configure.ac: Add --enable-inprocess-agent option.
10177 * configure: Rebuilt.
10179 2010-09-06 Yao Qi <yao@codesourcery.com>
10181 * linux-low.c (linux_kill): Remove unused variable.
10182 (linux_stabilize_threads): Likewise.
10183 * server.c (start_inferior): Likewise.
10184 (queue_stop_reply_callback): Likewise.
10185 * tracepoint.c (do_action_at_tracepoint): Likewise.
10187 2010-09-06 Yao Qi <yao@codesourcery.com>
10189 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10192 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10194 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10196 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10198 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10201 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10203 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10204 gdbserver/lynx-ppc-low.c: New files.
10205 * Makefile.in (lynx_low_h): New variable.
10206 (lynx-low.o, lynx-ppc-low.o): New rules.
10207 * configure.ac: On LynxOS, link with -lnetinet.
10208 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10209 * configure: regenerate.
10211 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10213 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10214 * configure.ac: Add check for vasprintf and vsnprintf.
10215 * configure, config.in: Regenerate.
10216 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10218 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10220 * gdbreplay.c: Move include of alloca.h up, next to include of
10222 * server.h: Add include of malloc.h.
10223 * mem-break.c: Remove include of malloc.h.
10224 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10226 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10228 * Makefile.in (memmem.o): Build with -Wno-error.
10230 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10232 * utils.c (xsnprintf): Make non-static.
10233 * server.h: Add xsnprintf declaration.
10234 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10235 replace calls to snprintf by calls to xsnprintf throughout.
10237 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10239 * configure.ac: Add configure check for alloca.
10240 * configure, config.in: Regenerate.
10241 * server.h: Include alloca.h if it exists.
10242 * gdbreplay.c: Include alloca.h if it exists.
10244 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10246 * linux-low.c (__SIGRTMIN): Define if not already defined.
10247 (linux_create_inferior): Check for __ANDROID__ rather than
10249 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10250 are already deferred.
10251 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10252 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10253 stopped and already has a pending signal to report.
10254 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10255 a pending signal to report or is moving out of a jump pad.
10256 (linux_init_signals): Check for __ANDROID__ rather than
10259 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10261 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10262 debug_threads check. Avoid a linear search when not doing debug
10265 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10267 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10268 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10269 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10270 (process_event): Change local fd's type to gdb_fildes_t.
10271 (create_file_handler): Adjust prototype.
10272 (delete_file_handler): Adjust prototype.
10273 (handle_file_event): Adjust prototype. Use pfildes.
10274 (create_file_event): Adjsut prototype.
10275 * remote-utils.c (remote_desc, listen_desc): Change type to
10277 * server.h: New gdb_fildes_t typedef.
10278 [USE_WIN32API]: Include winsock2.h.
10279 (delete_file_handler, add_file_handler): Adjust prototypes.
10280 (pfildes): Declare.
10281 * utils.c (pfildes): New.
10283 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10285 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10286 * configure: Regenerate.
10288 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10290 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10291 (linux_done_accessing_memory): ... this.
10292 (linux_target_ops): Adjust.
10293 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10294 * nto-low.c (nto_target_ops): Adjust comment.
10295 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10296 * spu-low.c (spu_target_ops): Adjust comment.
10297 * target.h (target_ops): Rename unprepare_to_access_memory field
10298 to done_accessing_memory.
10299 (unprepare_to_access_memory): Rename to ...
10300 (done_accessing_memory): ... this.
10302 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10304 * linux-low.c (linux_prepare_to_access_memory): New.
10305 (linux_unprepare_to_access_memory): New.
10306 (linux_target_ops): Install them.
10307 * server.c (read_memory): Rename to ...
10308 (gdb_read_memory): ... this. Use
10309 prepare_to_access_memory/prepare_to_access_memory.
10310 (write_memory): Rename to ...
10311 (gdb_write_memory): ... this. Use
10312 prepare_to_access_memory/prepare_to_access_memory.
10313 (handle_search_memory_1): Adjust.
10314 (process_serial_event): Adjust.
10315 * target.h (struct target_ops): New fields
10316 prepare_to_access_memory and unprepare_to_access_memory.
10317 (prepare_to_access_memory, unprepare_to_access_memory): New.
10318 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10319 prepare_to_access_memory/prepare_to_access_memory.
10320 * nto-low.c (nto_target_ops): Adjust.
10321 * spu-low.c (spu_target_ops): Adjust.
10322 * win32-low.c (win32_target_ops): Adjust.
10324 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10326 * Makefile.in (WARN_CFLAGS): Get it from configure.
10327 (WERROR_CFLAGS): New.
10328 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10329 * configure.ac: Introduce --enable-werror, which adds -Werror to
10330 the compiler command line. Enabled by default. Disable with
10331 --disable-werror. Add -Wdeclaration-after-statement
10332 Wpointer-arith and -Wformat-nonliteral to warning flags.
10333 * configure: Regenerate.
10335 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10337 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10339 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10341 * gdbreplay.c (remote_error): New.
10343 (expect): Use gdbchar. Check for error reading from GDB.
10344 Clarify sync error output.
10345 (play): Check for errors writing to GDB.
10346 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10347 * remote-utils.c (getpkt): Check for errors writing to the remote
10350 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10352 * linux-low.c (linux_wait_1): Move non-debugging code out of
10353 `debug_threads' control.
10355 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10357 * linux-low.c (linux_wait_1): Don't set last_status here.
10358 * server.c (push_event, queue_stop_reply_callback): Assert we're
10359 not pushing a TARGET_WAITKIND_IGNORE event.
10360 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10361 (myresume, handle_target_event): Set the thread's last_resume_kind
10362 and last_status from the target returned status.
10364 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10368 * linux-x86-low.c (update_debug_registers_callback): New.
10369 (i386_dr_low_set_addr): Use it.
10370 (i386_dr_low_get_addr): New.
10371 (i386_dr_low_set_control): Use update_debug_registers_callback.
10372 (i386_dr_low_get_control): New.
10373 (i386_dr_low_get_status): Adjust.
10374 * linux-low.c (linux_stop_lwp): New.
10375 * linux-low.h (linux_stop_lwp): Declare.
10377 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10378 argument instead of a i386_debug_reg_state.
10379 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10380 a i386_debug_reg_state.
10381 (i386_insert_aligned_watchpoint): Adjust.
10382 (i386_remove_aligned_watchpoint): Adjust.
10383 (i386_low_stopped_data_address): Read the debug registers from the
10384 inferior instead of from the mirrors.
10385 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10386 (i386_dr_low_get_addr): Declare.
10387 (i386_dr_low_get_control): Declare.
10388 (i386_dr_low_get_status): Change prototype.
10390 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10391 (i386_dr_low_get_addr): New.
10392 (i386_dr_low_get_control): New.
10393 (i386_dr_low_get_status): Adjust prototype. Return
10395 (i386_initial_stuff): Clear dr_status_mirror and
10397 (i386_get_thread_context): Adjust.
10398 (i386_set_thread_context): Adjust.
10399 (i386_thread_added): Adjust.
10401 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10403 * linux-low.h (linux_thread_area): Delete declaration.
10405 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10407 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10408 after its termination.
10410 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10412 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10413 (gdb_wants_all_stopped): Delete.
10414 (linux_wait_1): Don't call them.
10415 * server.c (handle_v_cont): Tag all threads as want-stopped.
10416 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10417 stopped as "client-wants-stopped".
10419 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10421 * Makefile.in (signals_h): New.
10422 (server_h): Depend on it.
10423 (server.o): Don't depend on $(signals_def).
10424 (signals.o): Depend on $(signals_def).
10426 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10428 * Makefile.in (signals_def): New.
10429 (server_h): Append include/gdb/signals.h and signals_def.
10430 (server.o): Append signals_def.
10432 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10434 * server.c (handle_target_event): Use target_signal_to_host for
10435 resume_info.sig initialization.
10436 * target.h (struct thread_resume) <sig>: New comment.
10438 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10440 * server.c (handle_query): strcpy() the returned string from paddress()
10441 instead of sprintf().
10442 * utils.c (paddress): Return phex_nz().
10444 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10446 * server.c (handle_v_cont): Call mourn_inferior if process
10448 (myresume): Likewise.
10450 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10452 Static tracepoints, and integration with UST.
10454 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10455 * mem-break.c (uninsert_all_breakpoints)
10456 (reinsert_all_breakpoints): New.
10457 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10458 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10459 (gdb_agent_ust_loaded, helper_thread_id)
10460 (gdb_agent_helper_thread_id): New macros.
10461 (struct ipa_sym_addresses): Add addr_ust_loaded,
10462 addr_helper_thread_id, addr_cmd_buf.
10463 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10464 (in_process_agent_loaded_ust): New.
10465 (write_e_ust_not_loaded): New.
10466 (maybe_write_ipa_ust_not_loaded): New.
10467 (struct collect_static_trace_data_action): New.
10468 (enum tracepoint_type) <static_tracepoint>: New.
10469 (struct tracepoint) <handle>: Mention static tracepoints.
10470 (struct static_tracepoint_ctx): New.
10471 (CMD_BUF_SIZE): New.
10472 (add_tracepoint_action): Handle static tracepoint actions.
10473 (unprobe_marker_at): New.
10474 (clear_installed_tracepoints): Handle static tracepoints.
10475 (cmd_qtdp): Handle static tracepoints.
10476 (probe_marker_at): New.
10477 (cmd_qtstart): Handle static tracepoints.
10478 (response_tracepoint): Handle static tracepoints.
10479 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10480 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10481 (get_context_regcache): Handle static tracepoints.
10482 (do_action_at_tracepoint): Handle static tracepoint actions.
10483 (traceframe_find_block_type): Handle static trace data blocks.
10484 (traceframe_read_sdata): New.
10485 (download_tracepoints): Download static tracepoint actions.
10486 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10487 (GDB_PROBE_NAME): New.
10489 (GET_UST_SYM): New.
10492 (ust_marker_to_static_tracepoint): New.
10494 (collect_ust_data_at_tracepoint): New.
10495 (gdb_ust_probe): New.
10496 (UNIX_PATH_MAX, SOCK_DIR): New.
10497 (gdb_ust_connect_sync_socket): New.
10498 (resume_thread, stop_thread): New.
10499 (run_inferior_command): New.
10500 (init_named_socket): New.
10501 (gdb_ust_socket_init): New.
10502 (cstr_to_hexstr): New.
10504 (first_marker, next_marker): New.
10505 (response_ust_marker): New.
10506 (cmd_qtfstm, cmd_qtsstm): New.
10507 (unprobe_marker_at, probe_marker_at): New.
10508 (cmd_qtstmat, gdb_ust_thread): New.
10509 (gdb_ust_init): New.
10510 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10511 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10512 (ST_REGENTRY): New.
10513 (x86_64_st_collect_regmap): New.
10514 (X86_64_NUM_ST_COLLECT_GREGS): New.
10515 (AMD64_RIP_REGNUM): New.
10516 (supply_static_tracepoint_registers): New.
10517 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10518 (ST_REGENTRY): New.
10519 (i386_st_collect_regmap): New.
10520 (i386_NUM_ST_COLLECT_GREGS): New.
10521 (supply_static_tracepoint_registers): New.
10522 * server.c (handle_query): Handle qXfer:statictrace:read.
10523 <qSupported>: Report support for StaticTracepoints, and
10524 qXfer:statictrace:read features.
10525 * server.h (traceframe_read_sdata)
10526 (supply_static_tracepoint_registers): Declare.
10527 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10528 (unpack_varlen_hex): Include in IPA build.
10529 * Makefile.in (ustlibs, ustinc): New.
10530 (IPA_OBJS): Add remote-utils-ipa.o.
10531 ($(IPA_LIB)): Link -ldl and -lpthread.
10533 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10534 * config.in, configure: Regenerate.
10536 2010-06-20 Ian Lance Taylor <iant@google.com>
10537 Pedro Alves <pedro@codesourcery.com>
10539 * linux-x86-low.c (always_true): Delete.
10540 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10541 trying to fool the compiler with always_true.
10543 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10545 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10546 conditions in gdbserver.
10548 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10550 * spu-low.c (spu_read_memory): Wrap around local store limit.
10551 (spu_write_memory): Likewise.
10553 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10555 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10556 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10558 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10560 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10561 uses with LONGEST uses.
10563 2010-06-14 Stan Shebs <stan@codesourcery.com>
10564 Pedro Alves <pedro@codesourcery.com>
10568 * linux-x86-low.c: Include limits.h.
10570 (always_true): New.
10573 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10574 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10575 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10576 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10577 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10578 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10579 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10580 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10581 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10582 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10583 (amd64_emit_void_call_2): New.
10584 (amd64_emit_ops): New.
10585 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10586 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10587 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10588 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10589 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10590 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10591 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10592 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10593 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10594 (i386_emit_stack_adjust, i386_emit_int_call_1)
10595 (i386_emit_void_call_2): New.
10596 (i386_emit_ops): New.
10597 (x86_emit_ops): New.
10598 (the_low_target): Install x86_emit_ops.
10599 * server.h (struct emit_ops): New.
10600 (get_raw_reg_func_addr): Declare.
10601 (current_insn_ptr, emit_error): Declare.
10602 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10603 (set_trace_state_variable_value): New defines.
10604 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10605 addr_get_trace_state_variable_value and
10606 addr_set_trace_state_variable_value.
10607 (symbol_list): New fields for get_raw_reg,
10608 get_trace_state_variable_value and set_trace_state_variable_value.
10609 (condfn): New typedef.
10610 (struct tracepoint): New field `compiled_cond'.
10611 (do_action_at_tracepoint): Clear compiled_cond.
10612 (get_trace_state_variable_value, set_trace_state_variable_value):
10614 (condition_true_at_tracepoint): If there's a compiled condition,
10616 (current_insn_ptr, emit_error): New globals.
10617 (struct bytecode_address): New.
10618 (get_raw_reg_func_addr): New.
10619 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10620 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10621 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10622 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10623 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10624 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10625 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10626 (compile_tracepoint_condition, compile_bytecodes): New.
10627 * target.h (emit_ops): Forward declare.
10628 (struct target_ops): New field emit_ops.
10629 (target_emit_ops): New.
10630 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10631 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10632 * linux-low.c (linux_emit_ops): New.
10633 (linux_target_ops): Install it.
10634 * linux-low.h (struct linux_target_ops): New field emit_ops.
10636 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10638 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10639 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10641 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10642 Stan Shebs <stan@codesourcery.com>
10644 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10645 (all): Depend on $(extra_libraries).
10646 (install-only): Install the IPA.
10647 (IPA_OBJS, IPA_LIB): New.
10648 (clean): Remove the IPA lib.
10649 (IPAGENT_CFLAGS): New.
10650 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10651 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10652 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10653 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10654 * configure.ac: Check for atomic builtins support in the compiler.
10655 (IPA_DEPFILES, extra_libraries): Define.
10656 * configure.srv (ipa_obj): Add description.
10657 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10658 (i[34567]86-*-linux*): Set ipa_obj.
10659 (x86_64-*-linux*): Set ipa_obj.
10660 * linux-low.c (stabilizing_threads): New.
10661 (supports_fast_tracepoints): New.
10662 (linux_detach): Stabilize threads before detaching.
10663 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10664 the lwp is either not stabilizing, or is moving out of a jump pad.
10665 (linux_fast_tracepoint_collecting): New.
10666 (maybe_move_out_of_jump_pad): New.
10667 (enqueue_one_deferred_signal): New.
10668 (dequeue_one_deferred_signal): New.
10669 (linux_wait_for_event_1): If moving out of a jump pad, defer
10670 pending signals to later.
10671 (linux_stabilize_threads): New.
10672 (linux_wait_1): Check if threads need moving out of jump pads, and
10674 (stuck_in_jump_pad_callback): New.
10675 (move_out_of_jump_pad_callback): New.
10676 (lwp_running): New.
10677 (linux_resume_one_lwp): Handle moving out of jump pads.
10678 (linux_set_resume_request): Dequeue deferred signals.
10679 (need_step_over_p): Also step over fast tracepoint jumps.
10680 (start_step_over): Also uninsert fast tracepoint jumps.
10681 (finish_step_over): Also reinsert fast tracepoint jumps.
10682 (linux_install_fast_tracepoint_jump): New.
10683 (linux_target_ops): Install linux_stabilize_threads and
10684 linux_install_fast_tracepoint_jump_pad.
10685 * linux-low.h (linux_target_ops) <get_thread_area,
10686 install_fast_tracepoint_jump_pad>: New fields.
10687 (struct lwp_info) <collecting_fast_tracepoint,
10688 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10689 (linux_get_thread_area): Declare.
10690 * linux-x86-low.c (jump_insn): New.
10691 (x86_get_thread_area): New.
10692 (append_insns): New.
10693 (push_opcode): New.
10694 (amd64_install_fast_tracepoint_jump_pad): New.
10695 (i386_install_fast_tracepoint_jump_pad): New.
10696 (x86_install_fast_tracepoint_jump_pad): New.
10697 (the_low_target): Install x86_get_thread_area and
10698 x86_install_fast_tracepoint_jump_pad.
10699 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10700 (struct fast_tracepoint_jump): New.
10701 (fast_tracepoint_jump_insn): New.
10702 (fast_tracepoint_jump_shadow): New.
10703 (find_fast_tracepoint_jump_at): New.
10704 (fast_tracepoint_jump_here): New.
10705 (delete_fast_tracepoint_jump): New.
10706 (set_fast_tracepoint_jump): New.
10707 (uninsert_fast_tracepoint_jumps_at): New.
10708 (reinsert_fast_tracepoint_jumps_at): New.
10709 (set_breakpoint_at): Use write_inferior_memory.
10710 (uninsert_raw_breakpoint): Use write_inferior_memory.
10711 (check_mem_read): Mask out fast tracepoint jumps.
10712 (check_mem_write): Mask out fast tracepoint jumps.
10713 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10714 (set_fast_tracepoint_jump): Declare.
10715 (delete_fast_tracepoint_jump)
10716 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10717 (reinsert_fast_tracepoint_jumps_at): Declare.
10718 * regcache.c: Don't compile many functions when building the
10719 in-process agent library.
10720 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10721 the register buffer in the heap.
10722 (free_register_cache): If the register buffer isn't owned by the
10723 regcache, don't free it.
10724 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10725 pre-existing register caches.
10726 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10728 (convert_ascii_to_int): : Constify `from' parameter type.
10729 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10730 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10731 the needed buffer in-place.
10732 (relocate_instruction): New.
10733 * server.c (handle_query) <qSymbols>: If the target supports
10734 tracepoints, give it a chance of looking up symbols. Report
10735 support for fast tracepoints.
10736 (handle_status): Stabilize threads.
10737 (process_serial_event): Adjust.
10738 * server.h (struct fast_tracepoint_jump): Forward declare.
10739 (struct process_info) <fast_tracepoint_jumps>: New field.
10740 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10741 (decode_X_packet, decode_M_packet): Adjust.
10742 (relocate_instruction): Declare.
10743 (in_process_agent_loaded): Declare.
10744 (tracepoint_look_up_symbols): Declare.
10745 (struct fast_tpoint_collect_status): Declare.
10746 (fast_tracepoint_collecting): Declare.
10747 (force_unlock_trace_buffer): Declare.
10748 (handle_tracepoint_bkpts): Declare.
10749 (initialize_low_tracepoint)
10750 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10751 * target.h (struct target_ops) <stabilize_threads,
10752 install_fast_tracepoint_jump_pad>: New fields.
10753 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10754 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10755 [HAVE_STDINT_H]: Include stdint.h.
10756 (trace_debug_1): Rename to ...
10757 (trace_vdebug): ... this.
10758 (trace_debug): Rename to ...
10759 (trace_debug_1): ... this. Add `level' parameter.
10760 (trace_debug): New.
10761 (ATTR_USED, ATTR_NOINLINE): New.
10762 (IP_AGENT_EXPORT): New.
10763 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10764 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10765 (about_to_request_buffer_space, trace_buffer_is_full)
10766 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10767 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10768 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10769 (traceframe_write_count, traceframes_created)
10770 (trace_state_variables)
10771 New renaming defines.
10772 (struct ipa_sym_addresses): New.
10773 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10774 (symbol_list): New.
10775 (ipa_sym_addrs): New.
10776 (all_tracepoint_symbols_looked_up): New.
10777 (in_process_agent_loaded): New.
10778 (write_e_ipa_not_loaded): New.
10779 (maybe_write_ipa_not_loaded): New.
10780 (tracepoint_look_up_symbols): New.
10781 (debug_threads) [IN_PROCESS_AGENT]: New.
10782 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10783 (UNKNOWN_SIDE_EFFECTS): New.
10784 (stop_tracing): New.
10785 (flush_trace_buffer): New.
10786 (stop_tracing_bkpt): New.
10787 (flush_trace_buffer_bkpt): New.
10788 (read_inferior_integer): New.
10789 (read_inferior_uinteger): New.
10790 (read_inferior_data_pointer): New.
10791 (write_inferior_data_pointer): New.
10792 (write_inferior_integer): New.
10793 (write_inferior_uinteger): New.
10794 (struct collect_static_trace_data_action): Delete.
10795 (enum tracepoint_type): New.
10796 (struct tracepoint) <type>: New field `type'.
10797 <actions_str, step_actions, step_actions_str>: Only include in
10799 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10800 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10801 (tracepoints): Use IP_AGENT_EXPORT.
10802 (last_tracepoint): Don't include in the IPA.
10803 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10804 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10805 (alloced_trace_state_variables): New.
10806 (trace_state_variables): Use IP_AGENT_EXPORT.
10807 (traceframe_t): Delete unused variable.
10808 (circular_trace_buffer): Don't include in the IPA.
10809 (trace_buffer_start): Delete.
10810 (struct trace_buffer_control): New.
10811 (trace_buffer_free): Delete.
10812 (struct ipa_trace_buffer_control): New.
10813 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10814 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10816 (trace_buffer_ctrl): New.
10817 (TRACE_BUFFER_CTRL_CURR): New.
10818 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10819 Reimplement as macros.
10820 (trace_buffer_wrap): Delete.
10821 (traceframe_write_count, traceframe_read_count)
10822 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10823 (struct tracepoint_hit_ctx) <type>: New field.
10824 (struct fast_tracepoint_ctx): New.
10825 (memory_barrier): New.
10827 (record_tracepoint_error): Update atomically in the IPA.
10828 (clear_inferior_trace_buffer): New.
10829 (about_to_request_buffer_space): New.
10830 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10831 updating the same buffer.
10832 (add_tracepoint): Default the tracepoint's type to trap
10833 tracepoint, and orig_size to -1.
10834 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10835 internal variables.
10836 (create_trace_state_variable): New parameter `gdb'. Handle it.
10837 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10838 (cmd_qtdp): Handle fast tracepoints.
10839 (cmd_qtdv): Adjust.
10840 (max_jump_pad_size): New.
10841 (gdb_jump_pad_head): New.
10842 (get_jump_space_head): New.
10843 (claim_jump_space): New.
10844 (sort_tracepoints): New.
10845 (MAX_JUMP_SIZE): New.
10846 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10848 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10849 support. Upload fast traceframes, and delete internal IPA
10851 (stop_tracing_handler): New.
10852 (flush_trace_buffer_handler): New.
10853 (cmd_qtstop): Upload fast tracepoints.
10854 (response_tracepoint): Handle fast tracepoints.
10855 (tracepoint_finished_step): Upload fast traceframes. Set the
10856 tracepoint hit context's tracepoint type.
10857 (handle_tracepoint_bkpts): New.
10858 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10859 type. Add comment about fast tracepoints.
10860 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10861 non-existing action_str field.
10862 (get_context_regcache): Handle fast tracepoints.
10863 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10865 (fast_tracepoint_from_jump_pad_address): New.
10866 (fast_tracepoint_from_ipa_tpoint_address): New.
10867 (collecting_t): New.
10868 (force_unlock_trace_buffer): New.
10869 (fast_tracepoint_collecting): New.
10871 (gdb_collect): New.
10872 (write_inferior_data_ptr): New.
10873 (target_tp_heap): New.
10874 (target_malloc): New.
10875 (download_agent_expr): New.
10877 (download_tracepoints): New.
10878 (download_trace_state_variables): New.
10879 (upload_fast_traceframes): New.
10880 (IPA_FIRST_TRACEFRAME): New.
10881 (IPA_NEXT_TRACEFRAME_1): New.
10882 (IPA_NEXT_TRACEFRAME): New.
10883 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10884 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10885 (gdb_jump_pad_buffer_end): New.
10886 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10887 (initialize_tracepoint): Adjust.
10888 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10889 buffer. Initialize the low module.
10890 * utils.c (PREFIX, TOOLNAME): New.
10891 (malloc_failure): Use PREFIX.
10892 (error): In the IPA, an error causes an exit.
10893 (fatal, warning): Use PREFIX.
10894 (internal_error): Use TOOLNAME.
10895 (NUMCELLS): Increase to 10.
10896 * configure, config.in: Regenerate.
10898 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10900 * server.c (handle_query) <qSupported>: Do two passes over the
10901 qSupported string to avoid nesting strtok.
10903 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10905 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10907 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10908 -Wl,--dynamic-list.
10909 * configure: Regenerate.
10910 * proc-service.list: New.
10912 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10914 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10917 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10919 * gdbreplay.c (remote_open): Check error return from socket() call by
10920 its equality to -1 not by it being negative.
10921 * remote-utils.c (remote_open): Likewise.
10923 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10925 * config.h: Regenerate.
10927 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10929 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10930 doesn't provide PTRACE_GET_THREAD_AREA.
10932 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10934 * linux-m68k-low.c: Include <asm/ptrace.h>
10935 (ps_get_thread_area): Implement.
10937 2010-05-03 Doug Evans <dje@google.com>
10939 * event-loop.c (struct callback_event): New struct.
10940 (callback_list): New global.
10941 (append_callback_event, delete_callback_event): New functions.
10942 (process_callback): New function.
10943 (start_event_loop): Call it.
10944 * remote-utils.c (NOT_SCHEDULED): Define.
10945 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10946 moved out of readchar.
10947 (readchar): Rewrite. Call reschedule before returning.
10948 (reset_readchar): New function.
10949 (remote_close): Call it.
10950 (process_remaining, reschedule): New functions.
10951 * server.h (callback_handler_func): New typedef.
10952 (append_callback_event, delete_callback_event): Declare.
10954 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10956 * proc-service.c (ps_pglobal_lookup): Use
10957 thread_db_look_up_one_symbol.
10958 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10959 parameter. Use it instead of all_symbols_looked_up.
10960 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10962 (all_symbols_looked_up): Don't declare.
10963 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10964 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10966 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10967 Set all_symbols_looked_up here.
10968 (thread_db_look_up_one_symbol): New.
10969 (thread_db_get_tls_address): Adjust.
10970 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10971 thread_db object on the heap, and tentatively set it in the
10973 (thread_db_init): Don't set all_symbols_looked_up here.
10974 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10976 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10978 * linux-low.c (linux_kill, linux_detach): Adjust.
10979 (status_pending_p_callback): Remove redundant statement. Check
10980 for !TARGET_WAITIKIND_IGNORE, instead of
10981 TARGET_WAITKIND_STOPPED.
10982 (handle_tracepoints): Make sure LWP is locked. Adjust.
10983 (linux_wait_for_event_1): Adjust.
10984 (linux_cancel_breakpoints): New.
10985 (unsuspend_one_lwp): New.
10986 (unsuspend_all_lwps): New.
10987 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10988 (send_sigstop_callback): Change return type to int, add new
10989 `except' parameter and handle it.
10990 (suspend_and_send_sigstop_callback): New.
10991 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10992 pass them down. If SUSPEND, also increment the lwp's suspend
10994 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10995 (need_step_over_p): Don't consider suspended LWPs.
10996 (start_step_over): Adjust.
10997 (proceed_one_lwp): Change return type to int, add new `except'
10998 parameter and handle it.
10999 (unsuspend_and_proceed_one_lwp): New.
11000 (proceed_all_lwps): Use find_inferior instead of
11002 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11003 also decrement the suspend count of LWPs. Pass `except' down,
11004 instead of hacking its suspend count.
11005 (linux_pause_all): Add `freeze' parameter. Adjust.
11006 (linux_unpause_all): New.
11007 (linux_target_ops): Install linux_unpause_all.
11008 * server.c (handle_status): Adjust.
11009 * target.h (struct target_ops): New fields `unpause_all' and
11010 `cancel_breakpoints'. Add new parameter to `pause_all'.
11011 (pause_all): Add new `freeze' parameter.
11012 (unpause_all): New.
11013 (cancel_breakpoints): New.
11014 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11015 cancel breakpoints.
11016 (cmd_qtstart): Pause threads.
11017 (stop_tracing): Pause threads, and cancel breakpoints.
11018 * win32-low.c (win32_target_ops): Adjust.
11020 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11022 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11023 the inferior right away from here...
11024 (linux_wait_1): ... to here, and adjust to check the thread's
11025 last_resume_kind instead of the lwp's step or stop_expected flags.
11027 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11029 * README: Use consistent `GDB' and `GDBserver' spellings.
11031 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11033 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11034 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11035 (linux_detach_one_lwp): Assume the lwp is stopped.
11036 (any_thread_of): Delete.
11037 (linux_detach): Stop all lwps here. Don't blindly delete all
11039 (delete_lwp_callback): New.
11040 (linux_mourn): Delete all lwps of the process that is gone.
11041 (linux_wait_1): Don't delete the last lwp of the process here.
11042 * mem-break.h (mark_breakpoints_out): Declare.
11043 * mem-break.c (mark_breakpoints_out): New.
11044 (free_all_breakpoints): Use it.
11045 * server.c (handle_target_event): If the process is gone, mark
11047 * thread-db.c (struct thread_db) <create_bp>: New field.
11048 (thread_db_enable_reporting): Fix prototype. Store a thread event
11049 breakpoint reference in the thread_db struct.
11050 (thread_db_load_search): Clear the thread_db object.
11051 (try_thread_db_load_1): Ditto.
11052 (switch_to_process): New.
11053 (disable_thread_event_reporting): Use it.
11054 (remove_thread_event_breakpoints): New.
11055 (thread_db_detach, thread_db_mourn): Use it.
11057 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11059 * linux-low.c (linux_enable_event_reporting): New.
11060 (linux_wait_for_event_1, handle_extended_wait): Use it.
11062 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11064 * linux-low.c (linux_kill_one_lwp, linux_kill)
11065 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11066 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11067 SIGSTOP even if the LWP is stopped.
11068 (send_sigstop_callback): New.
11069 (stop_all_lwps): Use send_sigstop_callback instead.
11070 (linux_resume_one_thread): Adjust.
11071 (proceed_one_lwp): Still proceed an LWP that the client has
11072 requested to stop, if we haven't reported it as stopped yet. Make
11073 sure that LWPs the client want stopped, have a pending SIGSTOP.
11075 2010-04-26 Doug Evans <dje@google.com>
11077 * server.c (handle_general_set): Make static.
11079 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11080 Print received char after testing for error/eof instead of before.
11081 (input_interrupt): Tweak comment.
11083 2010-04-23 Doug Evans <dje@google.com>
11085 * server.c (start_inferior): Print inferior argv if --debug.
11087 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11089 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11090 * nto-x86-low.c: Include server.h
11092 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11094 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11095 be consistent with other sources of this directory.
11096 (init_registers_amd64): Correct name of source file of this function
11099 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11101 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11102 64-bit executables.
11104 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11106 * win32-i386-low.c: Add 64-bit support.
11107 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11108 (init_registers_amd64): Declare.
11109 (mappings): Add 64-bit version of array.
11110 (init_windows_x86): New function.
11111 (the_low_target): Change init_arch field to init_windows_x86.
11113 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11115 * win32-low.c: Adapt to support also 64-bit architecture.
11116 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11117 (get_image_name): Use SIZE_T type for local variable `done'.
11118 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11119 (toolhelp_get_dll_name): Idem.
11120 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11121 Use uintptr_t typecast to avoid warning.
11122 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11123 (handle_exception): Use phex_nz to avoid warning.
11124 (win32_wait): Remove unused local variable `process'.
11126 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11128 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11131 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11133 * configure.ac: Use `ws2_32' library for srv_mingw.
11134 * configure: Regenerate.
11135 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11136 * remote-utils.c: Likewise.
11138 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11140 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11141 if __x86_64__ is defined.
11143 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11145 * configure: Regenerate.
11147 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11149 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11150 * target.h (target_ops): New get_tib_address field.
11151 * win32-low.h (win32_thread_info): Add thread_local_base field.
11152 * win32-low.c (child_add_thread): Add tlb argument.
11153 Set thread_local_base field to TLB.
11154 (get_child_debug_event): Adapt to child_add_thread change.
11155 (win32_get_tib_address): New function.
11156 (win32_target_ops): Set get_tib_address field to
11157 win32_get_tib_address.
11158 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11160 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11162 * linux-low.c (linux_mourn): Also remove the process.
11163 * server.c (handle_target_event): Don't remove the process here.
11164 * nto-low.c (nto_mourn): New.
11165 (nto_target_ops): Install it.
11166 * spu-low.c (spu_mourn): New.
11167 (spu_target_ops): Install it.
11168 * win32-low.c (win32_mourn): New.
11169 (win32_target_ops): Install it.
11171 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11173 * server.h (buffer_xml_printf): Remove redundant `;'.
11175 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11177 * regcache.c (set_register_cache): Invalidate regcaches before
11178 changing the register cache layout.
11179 (regcache_invalidate_one): Allow a NULL regcache.
11180 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11181 regcaches before changing the register cache layout or the target
11184 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11186 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11187 variable warning on Linux/x86-64.
11189 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11191 GDBserver disconnected tracing support.
11193 * linux-low.c (linux_remove_process): Delete.
11194 (add_lwp): Don't set last_resume_kind here.
11195 (linux_kill): Use `mourn'.
11196 (linux_detach): Use `thread_db_detach', and `mourn'.
11197 (linux_mourn): New.
11198 (linux_attach_lwp_1): Adjust comment.
11199 (linux_attach): last_resume_kind moved the thread_info; adjust.
11200 (status_pending_p_callback): Adjust.
11201 (linux_wait_for_event_1): Adjust.
11202 (count_events_callback, select_singlestep_lwp_callback)
11203 (select_event_lwp_callback, cancel_breakpoints_callback)
11204 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11205 (proceed_one_lwp): Adjust.
11206 (linux_async): Add debug output.
11207 (linux_thread_stopped): New.
11208 (linux_pause_all): New.
11209 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11211 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11212 (thread_db_free): Delete declaration.
11213 (thread_db_detach, thread_db_mourn): Declare.
11214 * thread-db.c (thread_db_init): Use thread_db_mourn.
11215 (thread_db_free): Delete, split in two.
11216 (disable_thread_event_reporting): New.
11217 (thread_db_detach): New.
11218 (thread_db_mourn): New.
11220 * server.h (struct thread_info) <last_resume_kind>: New field.
11221 <attached>: Add comment.
11222 <gdb_detached>: New field.
11223 (handler_func): Change return type to int.
11224 (handle_serial_event, handle_target_event): Ditto.
11225 (gdb_connected): Declare.
11227 (disconnected_tracing): Declare.
11228 (stop_tracing): Declare.
11230 * server.c (handle_query) <qSupported>: Report support for
11231 disconnected tracing.
11232 (queue_stop_reply_callback): Account for running threads.
11233 (gdb_wants_thread_stopped): New.
11234 (gdb_wants_all_threads_stopped): New.
11235 (gdb_reattached_process): New.
11236 (handle_status): Clear the `gdb_detached' flag of all processes.
11237 In all-stop, stop all threads.
11238 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11239 (process_serial_event): If the remote connection breaks, or if an
11240 exit was forced with "monitor exit", force an event loop exit.
11241 Handle disconnected tracing on detach.
11242 (handle_serial_event): Adjust.
11243 (handle_target_event): If GDB isn't connected, forward events back
11244 to the inferior, unless the last process exited, in which case,
11245 exit gdbserver. Adjust interface.
11247 * remote-utils.c (remote_open): Don't block in accept. Instead
11248 register an event loop source on the listen socket file
11249 descriptor. Refactor bits into ...
11250 (listen_desc): ... this new global.
11251 (gdb_connected): ... this new function.
11252 (enable_async_notification): ... this new function.
11253 (handle_accept_event): ... this new function.
11254 (remote_close): Clear remote_desc.
11256 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11258 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11260 (mourn_inferior): Define.
11261 (target_process_qsupported): Avoid the dangling else problem.
11262 (thread_stopped): Define.
11263 (pause_all): Define.
11264 (target_waitstatus_to_string): Declare.
11265 * target.c (target_waitstatus_to_string): New.
11267 * tracepoint.c (tracing): Make extern.
11268 (disconnected_tracing): New.
11269 (stop_tracing): Make extern. Handle tracing stops due to GDB
11271 (cmd_qtdisconnected): New.
11272 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11273 (handle_tracepoint_general_set): Handle QTDisconnected.
11275 * event-loop.c (event_handler_func): Change return type to int.
11276 (process_event): Bail out if the event handler wants the event
11278 (handle_file_event): Ditto.
11279 (start_event_loop): Bail out if the event handler wants the event
11282 * nto-low.c (nto_target_ops): Adjust.
11283 * spu-low.c (spu_wait): Don't remove the process here.
11284 (spu_target_ops): Adjust.
11285 * win32-low.c (win32_wait): Don't remove the process here.
11286 (win32_target_ops): Adjust.
11288 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11290 * regcache.c (realloc_register_cache): Invalidate inferior's
11291 regcache before recreating it.
11293 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11295 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11297 2010-04-09 Stan Shebs <stan@codesourcery.com>
11298 Pedro Alves <pedro@codesourcery.com>
11300 * server.h (LONGEST): New.
11301 (struct thread_info) <while_stepping>: New field.
11302 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11304 (initialize_tracepoint, handle_tracepoint_general_set)
11305 (handle_tracepoint_query, tracepoint_finished_step)
11306 (tracepoint_was_hit, release_while_stepping_state_list):
11307 (current_traceframe): Declare.
11308 * server.c (handle_general_set): Handle tracepoint packets.
11309 (read_memory): New.
11310 (write_memory): New.
11311 (handle_search_memory_1): Use read_memory.
11312 (handle_query): Report support for conditional tracepoints, trace
11313 state variables, and tracepoint sources. Handle tracepoint
11315 (main): Initialize the tracepoints module.
11316 (process_serial_event): Handle traceframe reads/writes.
11318 * linux-low.c (handle_tracepoints): New.
11319 (linux_wait_1): Call it.
11320 (linux_resume_one_lwp): Handle while-stepping.
11321 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11322 (linux_target_ops): Install them.
11323 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11325 * linux-x86-low.c (x86_supports_tracepoints): New.
11326 (the_low_target). Install it.
11328 * mem-break.h (delete_breakpoint): Declare.
11329 * mem-break.c (delete_breakpoint): Make external.
11331 * target.h (struct target_ops): Add `supports_tracepoints',
11332 `read_pc', and `write_pc' fields.
11333 (target_supports_tracepoints): Define.
11334 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11337 * regcache.h (struct regcache) <registers_owned>: New field.
11338 (init_register_cache, regcache_cpy): Declare.
11339 (regcache_read_pc, regcache_write_pc): Declare.
11340 (register_cache_size): Declare.
11341 (supply_regblock): Declare.
11342 * regcache.c (init_register_cache): New.
11343 (new_register_cache): Use it.
11344 (regcache_cpy): New.
11345 (register_cache_size): New.
11346 (supply_regblock): New.
11347 (regcache_read_pc, regcache_write_pc): New.
11349 * tracepoint.c: New.
11351 * Makefile.in (OBS): Add tracepoint.o.
11352 (tracepoint.o): New rule.
11354 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11356 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11358 (i386-mmx.c): Likewise.
11359 (i386-mmx-linux.o): Likewise.
11360 (i386-mmx-linux.c): Likewise.
11362 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11363 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11364 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11365 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11367 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11368 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11369 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11371 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11373 * Makefile.in (clean): Updated.
11375 (i386-avx.c): Likewise.
11376 (i386-avx-linux.o): Likewise.
11377 (i386-avx-linux.c): Likewise.
11378 (amd64-avx.o): Likewise.
11379 (amd64-avx.c): Likewise.
11380 (amd64-avx-linux.o): Likewise.
11381 (amd64-avx-linux.c): Likewise.
11383 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11384 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11385 (srv_amd64_regobj): Add amd64-avx.o.
11386 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11387 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11388 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11389 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11390 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11391 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11392 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11394 * i387-fp.c: Include "i386-xstate.h".
11396 (i387_cache_to_xsave): Likewise.
11397 (i387_xsave_to_cache): Likewise.
11398 (x86_xcr0): Likewise.
11400 * i387-fp.h (i387_cache_to_xsave): Likewise.
11401 (i387_xsave_to_cache): Likewise.
11402 (x86_xcr0): Likewise.
11404 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11405 * linux-crisv32-low.c (target_regsets): Likewise.
11406 * linux-m68k-low.c (target_regsets): Likewise.
11407 * linux-mips-low.c (target_regsets): Likewise.
11408 * linux-ppc-low.c (target_regsets): Likewise.
11409 * linux-s390-low.c (target_regsets): Likewise.
11410 * linux-sh-low.c (target_regsets): Likewise.
11411 * linux-sparc-low.c (target_regsets): Likewise.
11412 * linux-xtensa-low.c (target_regsets): Likewise.
11414 * linux-low.c: Include <sys/uio.h>.
11415 (regsets_fetch_inferior_registers): Support nt_type.
11416 (regsets_store_inferior_registers): Likewise.
11417 (linux_process_qsupported): New.
11418 (linux_target_ops): Add linux_process_qsupported.
11420 * linux-low.h (regset_info): Add nt_type.
11421 (linux_target_ops): Add process_qsupported.
11423 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11425 (init_registers_i386_avx_linux): New.
11426 (init_registers_amd64_avx_linux): Likewise.
11427 (xmltarget_i386_linux_no_xml): Likewise.
11428 (xmltarget_amd64_linux_no_xml): Likewise.
11429 (PTRACE_GETREGSET): Likewise.
11430 (PTRACE_SETREGSET): Likewise.
11431 (x86_fill_xstateregset): Likewise.
11432 (x86_store_xstateregset): Likewise.
11433 (use_xml): Likewise.
11434 (x86_linux_update_xmltarget): Likewise.
11435 (x86_linux_process_qsupported): Likewise.
11436 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11437 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11438 init_registers_i386_linux here. Call
11439 x86_linux_update_xmltarget.
11440 (the_low_target): Add x86_linux_process_qsupported.
11442 * server.c (handle_query): Call target_process_qsupported.
11444 * target.h (target_ops): Add process_qsupported.
11445 (target_process_qsupported): New.
11447 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11449 * inferiors.c (add_thread): Set last_status kind to
11450 TARGET_WAITKIND_IGNORE.
11451 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11452 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11453 (linux_wait_1): Move `thread' local definition to block that uses
11454 it. Don't NULL initialize `event_child'.
11455 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11456 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11457 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11459 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11461 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11462 an extended waitstatus, or by a watchpoint.
11463 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11464 thread was stepping or has been stopped by a watchpoint.
11466 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11468 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11469 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11470 of another, then delete the previous, and validate all
11472 (validate_inserted_breakpoint): New.
11473 (delete_disabled_breakpoints): New.
11474 (validate_breakpoints): New.
11475 (check_mem_read): Validate breakpoints before trusting their
11476 shadow. Delete disabled breakpoints.
11477 (check_mem_write): Validate breakpoints before trusting they
11478 should be inserted. Delete disabled breakpoints.
11479 * mem-break.h (validate_breakpoints):
11480 * server.c (handle_query): Validate breakpoints when we see a
11483 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11485 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11486 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11487 if we could tell there's a GDB breakpoint at stop_pc.
11488 (need_step_over_p): Don't do a step over if we find a GDB
11489 breakpoint at the resume PC.
11491 * mem-break.c (struct raw_breakpoint): New.
11492 (enum bkpt_type): New type `gdb_breakpoint'.
11493 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11494 fields. New field `raw'.
11495 (find_raw_breakpoint_at): New.
11496 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11497 breakpoint instead.
11498 (set_breakpoint_at): Adjust.
11499 (delete_raw_breakpoint): New.
11500 (release_breakpoint): New.
11501 (delete_breakpoint): Rename to...
11502 (delete_breakpoint_1): ... this. Add proc parameter. Use
11503 release_breakpoint. Return ENOENT.
11504 (delete_breakpoint): Reimplement.
11505 (find_breakpoint_at): Delete.
11506 (find_gdb_breakpoint_at): New.
11507 (delete_breakpoint_at): Delete.
11508 (set_gdb_breakpoint_at): New.
11509 (delete_gdb_breakpoint_at): New.
11510 (gdb_breakpoint_here): New.
11511 (set_reinsert_breakpoint): Use release_breakpoint.
11512 (uninsert_breakpoint): Rename to ...
11513 (uninsert_raw_breakpoint): ... this.
11514 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11515 (reinsert_raw_breakpoint): Change parameter type to
11517 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11519 (check_breakpoints): Adjust. Use release_breakpoint.
11520 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11521 (breakpoint_inserted_here): Ditto.
11522 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11523 Don't trust the breakpoint's shadow if it is not inserted.
11524 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11525 (delete_all_breakpoints): Adjust.
11526 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11527 use delete_breakpoint_1.
11529 * mem-break.h (breakpoints_supported): Delete declaration.
11530 (set_gdb_breakpoint_at): Declare.
11531 (gdb_breakpoint_here): Declare.
11532 (delete_breakpoint_at): Delete.
11533 (delete_gdb_breakpoint_at): Declare.
11535 * server.h (struct raw_breakpoint): Forward declare.
11536 (struct process_info): New field `raw_breakpoints'.
11538 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11541 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11543 * linux-low.c (status_pending_p_callback): Fix comment.
11544 (linux_wait_for_event_1): Move most of the internal breakpoint
11545 handling from here...
11546 (linux_wait_1): ... to here.
11547 (count_events_callback): New.
11548 (select_singlestep_lwp_callback): New.
11549 (select_event_lwp_callback): New.
11550 (cancel_breakpoints_callback): New.
11551 (select_event_lwp): New.
11552 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11553 priority to all LWPs that have had events that should be reported
11554 to the client. Cancel breakpoints when about to reporting the
11555 event to the client, not while stopping lwps. No longer cancel
11556 finished single-steps here.
11557 (cancel_finished_single_step): Delete.
11558 (cancel_finished_single_steps): Delete.
11560 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11562 * mem-break.c (enum bkpt_type): New.
11563 (struct breakpoint): New field `type'.
11564 (set_breakpoint_at): Change return type to struct breakpoint
11565 pointer. Set type to `other_breakpoint' by default.
11566 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11567 in the breakpoint list.
11568 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11569 (reinsert_breakpoint): Rename to ...
11570 (reinsert_raw_breakpoint): ... this.
11571 (reinsert_breakpoints_at): Adjust.
11572 * mem-break.h (struct breakpoint): Declare.
11573 (set_breakpoint_at): Change return type to struct breakpoint
11576 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11578 * server.c (handle_query): Assign, not compare.
11580 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11582 Teach linux gdbserver to step-over-breakpoints.
11584 * linux-low.c (can_hardware_single_step): New.
11585 (supports_breakpoints): New.
11586 (handle_extended_wait): If stopping threads, read the stop pc of
11587 the new cloned LWP.
11589 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11590 low target doesn't support retrieving the PC.
11591 (add_lwp): Set last_resume_kind to resume_continue.
11592 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11593 (linux_attach): Don't clear stop_expected. Set the lwp's
11594 last_resume_kind to resume_stop.
11595 (linux_detach_one_lwp): Don't check for removed breakpoints.
11596 (check_removed_breakpoint): Delete.
11597 (status_pending_p): Rename to ...
11598 (status_pending_p_callback): ... this. Don't check for removed
11599 breakpoints. Don't consider threads that are stopped from GDB's
11601 (linux_wait_for_lwp): Always read the stop_pc here.
11602 (cancel_breakpoint): New.
11603 (step_over_bkpt): New global.
11604 (linux_wait_for_event_1): Implement stepping over breakpoints.
11605 (gdb_wants_lwp_stopped): New.
11606 (gdb_wants_all_stopped): New.
11607 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11608 single-step traps here. Store the thread's last reported target
11610 (send_sigstop): Don't clear stop_expected. Always set it,
11612 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11613 (cancel_finished_single_step): New.
11614 (cancel_finished_single_steps): New.
11615 (wait_for_sigstop): Don't cancel finished single-step traps here.
11616 (linux_resume_one_lwp): Don't check for removed breakpoints.
11617 Don't set `step' on non-hardware step archs.
11618 (linux_set_resume_request): Ignore resume_stop requests if already
11619 stopping or stopped. Set the lwp's last_resume_kind.
11620 (resume_status_pending_p): Don't check for removed breakpoints.
11621 (need_step_over_p): New.
11622 (start_step_over): New.
11623 (finish_step_over): New.
11624 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11625 requests. Clear the thread's last reported target waitstatus.
11626 Don't use the `suspended' flag. Don't consider pending breakpoints.
11627 (linux_resume): Start a step-over if necessary.
11628 (proceed_one_lwp): New.
11629 (proceed_all_lwps): New.
11630 (unstop_all_lwps): New.
11631 * linux-low.h (struct lwp_info): Rewrite comment for the
11632 `suspended' flag. Add the `stop_pc' field. Delete the
11633 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11634 Add `'last_resume_kind' and `need_step_over' fields.
11635 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11636 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11637 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11638 (set_raw_breakpoint_at): New.
11639 (set_breakpoint_at): Rewrite to use it.
11640 (reinsert_breakpoint_handler): Delete.
11641 (set_reinsert_breakpoint): New.
11642 (reinsert_breakpoint_by_bp): Delete.
11643 (delete_reinsert_breakpoints): New.
11644 (uninsert_breakpoint): Rewrite.
11645 (uninsert_breakpoints_at): New.
11646 (reinsert_breakpoint): Rewrite.
11647 (reinsert_breakpoints_at): New.
11648 (check_breakpoints): Rewrite.
11649 (breakpoint_here): New.
11650 (breakpoint_inserted_here): New.
11651 (check_mem_read): Adjust.
11652 * mem-break.h (breakpoints_supported, breakpoint_here)
11653 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11654 (reinsert_breakpoint_by_bp): Delete declaration.
11655 (delete_reinsert_breakpoints): Declare.
11656 (reinsert_breakpoint): Delete declaration.
11657 (reinsert_breakpoints_at): Declare.
11658 (uninsert_breakpoint): Delete declaration.
11659 (uninsert_breakpoints_at): Declare.
11660 (check_breakpoints): Adjust prototype.
11661 * server.h: Adjust include order.
11662 (struct thread_info): Declare here. Add a `last_status' field.
11664 2010-03-23 Michael Snyder <msnyder@vmware.com>
11666 * server.c (crc32): New function.
11667 (handle_query): Add handling for 'qCRC:' request.
11669 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11671 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11672 lwp had been stopped by a watchpoint.
11674 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11676 * server.h (internal_error): Declare.
11677 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11678 * utils.c (internal_error): New function.
11680 2010-03-15 Andreas Schwab <schwab@redhat.com>
11682 * configure.srv: Fix typo setting srv_regobj.
11684 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11686 * linux-low.c (fetch_register): Avoid passing a non string literal
11688 (usr_store_inferior_registers): Ditto.
11690 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11692 * linux-low.c (linux_write_memory): Bail out early if peeking
11695 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11697 * linux-low.h (struct lwp_info): New fields
11698 `stopped_by_watchpoint' and `stopped_data_address'.
11699 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11700 here, and cache them in the lwp object.
11701 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11703 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11705 (linux_stopped_by_watchpoint): Rewrite.
11706 (linux_stopped_data_address): Rewrite.
11708 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11710 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11711 switching the current inferior, not before.
11713 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11715 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11716 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11717 i386-linux.c and amd64-linux.c.
11718 (reg-i386.o): Removed.
11719 (reg-i386.c): Likewise.
11720 (reg-i386-linux.o): Likewise.
11721 (reg-i386-linux.c): Likewise.
11722 (reg-x86-64.o): Likewise.
11723 (reg-x86-64.c): Likewise.
11724 (reg-x86-64-linux.o): Likewise.
11725 (reg-x86-64-linux.c): Likewise.
11727 (i386.c): Likewise.
11728 (i386-linux.o): Likewise.
11729 (i386-linux.c): Likewise.
11730 (amd64.o): Likewise.
11731 (amd64.c): Likewise.
11732 (amd64-linux.o): Likewise.
11733 (amd64-linux.c): Likewise.
11735 * configure.srv (srv_i386_regobj): New.
11736 (srv_i386_linux_regobj): Likewise.
11737 (srv_amd64_regobj): Likewise.
11738 (srv_amd64_linux_regobj): Likewise.
11739 (srv_i386_32bit_xmlfiles): Likewise.
11740 (srv_i386_64bit_xmlfiles): Likewise.
11741 (srv_i386_xmlfiles): Likewise.
11742 (srv_amd64_xmlfiles): Likewise.
11743 (srv_i386_linux_xmlfiles): Likewise.
11744 (srv_amd64_linux_xmlfiles): Likewise.
11745 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11746 srv_xmlfiles to $srv_i386_xmlfiles.
11747 (i[34567]86-*-mingw32ce*): Likewise.
11748 (i[34567]86-*-mingw*): Likewise.
11749 (i[34567]86-*-nto*): Likewise.
11750 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11751 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11752 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11753 (x86_64-*-linux*): Likewise.
11755 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11756 (init_registers_amd64_linux): New.
11757 (x86_arch_setup): Replace init_registers_x86_64_linux with
11758 init_registers_amd64_linux.
11760 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11762 * configure.ac: Check for libdl. If it is not available link against
11763 static libthread_db.
11764 * configure: Regenerate.
11766 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11770 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11771 handing a read watchpoint.
11772 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11774 2010-02-12 Doug Evans <dje@google.com>
11776 * linux-low.c (linux_supports_tracefork_flag): Document.
11777 (linux_look_up_symbols): Add comment.
11779 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11781 * regcache.c (supply_register): Clear regcache if buf is NULL.
11783 2010-02-02 Nicolas Roche <roche@sourceware.org>
11784 Joel Brobecker <brobecker@adacore.com>
11786 * inferiors.c (find_inferior): Add function documentation.
11787 (unloaded_dll): Handle the case where the unloaded dll has not
11788 been previously registered in the dll list.
11790 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11792 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11793 (thumb2_breakpoint): New.
11794 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11796 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11798 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11799 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11802 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11804 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11806 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11808 * linux-s390-low.c (s390_collect_ptrace_register)
11809 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11811 2010-01-21 Doug Evans <dje@google.com>
11813 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11814 (PTRACE_ARG4_TYPE): New macro.
11815 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11816 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11817 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11818 (usr_store_inferior_registers): Ditto.
11819 (linux_read_memory, linux_write_memory): Ditto.
11820 (linux_test_for_tracefork): Ditto.
11822 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11823 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11825 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11827 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11830 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11832 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11833 prototype to take a regcache. Adjust.
11835 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11837 * regcache.h (struct thread_info): Forward declare.
11838 (struct regcache): New.
11839 (new_register_cache): Adjust prototype.
11840 (get_thread_regcache): Declare.
11841 (free_register_cache): Adjust prototype.
11842 (registers_to_string, registers_from_string): Ditto.
11843 (supply_register, supply_register_by_name, collect_register)
11844 (collect_register_as_string, collect_register_by_name): Ditto.
11845 * regcache.c (struct inferior_regcache_data): Delete.
11846 (get_regcache): Rename to ...
11847 (get_thread_regcache): ... this. Adjust. Switch inferior before
11848 fetching registers.
11849 (regcache_invalidate_one): Adjust.
11850 (regcache_invalidate): Fix prototype.
11851 (new_register_cache): Return the new register cache.
11852 (free_register_cache): Change prototype.
11853 (realloc_register_cache): Adjust.
11854 (registers_to_string): Change prototype to take a regcache. Adjust.
11855 (registers_from_string): Ditto.
11856 (register_data): Ditto.
11857 (supply_register): Ditto.
11858 (supply_register_by_name): Ditto.
11859 (collect_register): Ditto.
11860 (collect_register_as_string): Ditto.
11861 (collect_register_by_name): Ditto.
11862 * server.c (process_serial_event): Adjust.
11863 * linux-low.h (regset_fill_func, regset_store_func): Change
11865 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11867 * linux-low.c (get_stop_pc): Adjust.
11868 (check_removed_breakpoint): Adjust.
11869 (linux_wait_for_event): Adjust.
11870 (linux_resume_one_lwp): Adjust.
11871 (fetch_register): Add regcache parameter. Adjust.
11872 (usr_store_inferior_registers): Ditto.
11873 (regsets_fetch_inferior_registers): Ditto.
11874 (regsets_store_inferior_registers): Ditto.
11875 (linux_fetch_registers, linux_store_registers): Ditto.
11876 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11878 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11880 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11881 prototype to take a regcache.
11882 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11883 * remote-utils.c (convert_ascii_to_int, outreg)
11884 (prepare_resume_reply): Change prototype to take a regcache.
11886 * target.h (struct target_ops) <fetch_registers, store_registers>:
11887 Change prototype to take a regcache.
11888 (fetch_inferior_registers, store_inferior_registers): Change
11889 prototype to take a regcache. Adjust.
11890 * proc-service.c (ps_lgetregs): Adjust.
11891 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11892 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11893 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11894 take a regcache. Adjust.
11895 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11896 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11897 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11898 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11899 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11900 (cris_cannot_fetch_register):
11901 (cris_breakpoint_at): Change prototype to take a regcache.
11903 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11904 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11905 to take a regcache. Adjust.
11906 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11908 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11909 take a regcache. Adjust.
11910 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11911 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11912 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11913 * linux-mips-low.c (mips_get_pc):
11914 (mips_set_pc): Change prototype to take a regcache. Adjust.
11915 (mips_reinsert_addr): Adjust.
11916 (mips_collect_register): Change prototype to take a regcache.
11918 (mips_supply_register):
11919 (mips_collect_register_32bit, mips_supply_register_32bit)
11920 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11921 (mips_store_fpregset): Ditto.
11922 * linux-ppc-low.c (ppc_supply_ptrace_register)
11923 (ppc_supply_ptrace_register): Ditto.
11924 (parse_spufs_run): Adjust.
11925 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11926 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11927 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11928 take a regcache. Adjust.
11929 * linux-s390-low.c (s390_collect_ptrace_register)
11930 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11931 (s390_set_pc): Change prototype to take a regcache. Adjust.
11932 (s390_arch_setup): Adjust.
11933 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11934 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11935 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11936 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11937 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11939 (sparc_breakpoint_at): Adjust.
11940 * linux-xtensa-low.c (xtensa_fill_gregset):
11941 (xtensa_store_gregset):
11942 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11943 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11944 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11945 prototype to take a regcache. Adjust.
11946 * win32-arm-low.c (arm_fetch_inferior_register)
11947 (arm_store_inferior_register): Change prototype to take a
11949 * win32-i386-low.c (i386_fetch_inferior_register)
11950 (i386_store_inferior_register): Change prototype to take a
11952 * win32-low.c (child_fetch_inferior_registers)
11953 (child_store_inferior_registers): Change prototype to take a
11955 (win32_wait): Adjust.
11956 (win32_fetch_inferior_registers): Change prototype to take a
11958 (win32_store_inferior_registers): Adjust.
11959 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11960 store_inferior_register>: Change prototype to take a regcache.
11962 2010-01-20 Doug Evans <dje@google.com>
11964 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11966 (linux_wait_for_event1, linux_init_signals): Ditto.
11967 (W_STOPCODE): Provide definition if missing.
11969 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11971 * linux-low.c (linux_core_of_thread): New.
11972 (compare_ints, show_process, list_threads): New.
11973 (linux_qxfer_osdata): Report threads and cores.
11974 (linux_target_op): Register linux_core_of_thread.
11975 * remote-utils.c (prepare_resume_reply): Report the core.
11976 (buffer_xml_printf): Support %d specifier.
11977 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11979 (handle_query): Handle qXfer:threads. Announce availability
11981 * target.h (struct target_ops): New field core_of_thread.
11983 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11985 * Makefile.in (clean): Remove new generated files.
11986 (reg-s390.o, reg-s390.c): Remove rules.
11987 (reg-s390x.o, reg-s390x.c): Likewise.
11988 (s390-linux32.o, s390-linux32.c): Add rules.
11989 (s390-linux64.o, s390-linux64.c): Likewise.
11990 (s390x-linux64.o, s390x-linux64.c): Likewise.
11991 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11992 * linux-s390-low.c: Include <elf.h>.
11993 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11994 (init_registers_s390): Remove prototype.
11995 (init_registers_s390x): Likewise.
11996 (init_registers_s390_linux32): Add prototype.
11997 (init_registers_s390_linux64): Likewise.
11998 (init_registers_s390x_linux64): Likewise.
11999 (s390_num_regs_3264): New define.
12000 (s390_regmap_3264): New global variable.
12001 (s390_cannot_fetch_register): Remove obsolete check.
12002 (s390_cannot_store_register): Likewise.
12003 (s390_collect_ptrace_register): Handle upper/lower register halves.
12004 (s390_supply_ptrace_register): Likewise.
12005 (s390_fill_gregset): Update to register number changes.
12006 (s390_get_hwcap): New routine.
12007 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12008 Install appropriate regmap and register set.
12010 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12012 * server.c (gdbserver_version): Update copyright year to 2010.
12013 * gdbreplay.c (gdbreplay_version): Likewise.
12015 2009-12-28 Doug Evans <dje@google.com>
12017 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12018 elf/external.h. Include <elf.h> instead but only if necessary.
12020 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12022 * linux-low.c (linux_remove_process): Remove `detaching'
12023 parameter. Don't release/detach from thread_db here.
12024 (linux_kill): Release/detach from thread_db here, ...
12025 (linux_detach): ... and here, before actually detaching.
12026 (linux_wait_1): ... and here, when a process exits.
12027 * thread-db.c (any_thread_of): New.
12028 (thread_db_free): Switch the current inferior to a thread of the
12031 2009-12-21 Doug Evans <dje@google.com>
12033 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12035 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12036 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12037 warning ifndef __NR_tkill. Move setting of errno there too.
12038 Delete unnecessary resetting of errno after syscall.
12039 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12041 * configure.ac: Check for dladdr.
12042 * config.in: Regenerate.
12043 * configure: Regenerate.
12044 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12045 (try_thread_db_load): Update.
12047 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12049 2009-12-18 Doug Evans <dje@google.com>
12051 * event-loop.c: Include unistd.h if it exists.
12053 * linux-low.c (my_waitpid): Move definition away from being in
12054 between linux_tracefork_child/linux_test_for_tracefork.
12056 * gdb_proc_service.h (psaddr_t): Fix type.
12057 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12058 signature to match glibc.
12060 2009-12-16 Doug Evans <dje@google.com>
12062 * linux-low.c (linux_read_memory): Fix argument to read.
12064 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12066 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12067 events, don't leave current_inferior pointing at null.
12069 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12071 * win32-low.c (LOG): Delete.
12072 (OUTMSG): Output to stderr.
12073 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12074 on compile time LOG macro.
12075 (win32_wait): Fix debug output.
12077 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12079 * win32-low.c (win32_add_one_solib): If the dll name is
12080 "ntdll.dll", prepend the system directory to the dll path.
12082 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12084 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12086 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12087 Vladimir Prus <vladimir@codesourcery.com>
12089 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12090 * configure.ac: Check for __mcoldfire__ and set
12091 gdb_cv_m68k_is_coldfire.
12092 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12093 reg-cf.o and reg-m68k.o.
12094 * configure: Regenerated.
12096 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12098 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12099 Pass it to thread_db_free.
12100 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12101 proper `detaching' argument to linux_remove_process.
12102 * linux-low.h (thread_db_free): Add `detaching' parameter.
12103 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12105 (thread_db_free): Add `detaching' parameter. Only
12106 call td_ta_clear_event if detaching from process.
12108 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12110 * thread-db.c (thread_db_free): Fix typo.
12112 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12115 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12117 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12119 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12120 with an i686 compiler.
12121 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12123 * configure: Rebuilt.
12125 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12129 * server.c (handle_search_memory_1): Correct read_addr initialization
12130 in loop for searching subsequent chunks.
12132 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12134 * configure.ac: New --with-libthread-db option.
12135 * thread-db.c: Allow direct dependence on libthread_db.
12136 (thread_db_free): Adjust.
12137 * config.in: Regenerate.
12138 * configure: Likewise.
12140 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12143 * thread-db.c (attach_thread): New function.
12144 (maybe_attach_thread): Return success/failure.
12145 (find_new_threads_callback): Adjust.
12146 (thread_db_find_new_threads): Loop until no new threads.
12148 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12150 * proc-service.c (ps_lgetregs): Formatting.
12152 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12154 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12155 * configure.ac: Adjust.
12156 * linux-low.h (struct process_info_private): Move members to struct
12158 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12159 * linux-low.c (linux_remove_process): Adjust.
12160 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12161 * server.c (handle_query): Move code ...
12162 (handle_monitor_command): ... here. New function.
12163 * target.h (struct target_ops): New member.
12164 * thread-db.c (struct thread_db): New.
12165 (libthread_db_search_path): New variable.
12166 (thread_db_create_event, thread_db_enable_reporting)
12167 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12168 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12169 (try_thread_db_load_1, dladdr_to_soname): New functions.
12170 (try_thread_db_load, thread_db_load_search): New functions.
12171 (thread_db_init): Search for libthread_db.
12172 (thread_db_free): New function.
12173 (thread_db_handle_monitor_command): Likewise.
12174 * config.in: Regenerate.
12175 * configure: Regenerate.
12177 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12179 * spu-low.c (spu_kill): Wait for inferior to terminate.
12180 Call clear_inferiors.
12181 (spu_detach): Call clear_inferiors.
12183 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12185 * aclocal.m4: Regenerate.
12186 * config.in: Likewise.
12187 * configure: Likewise.
12189 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12191 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12192 (parse_spufs_run): New function.
12193 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12194 (ppc_breakpoint_at): Handle SPU breakpoints.
12196 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12198 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12199 (SPUFS_MAGIC): Define.
12200 (spu_enumerate_spu_ids): New function.
12201 (linux_qxfer_spu): New function.
12202 (linux_target_ops): Install linux_qxfer_spu.
12204 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12206 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12207 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12208 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12209 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12210 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12211 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12212 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12213 (init_registers_powerpc_cell32l): Add prototype.
12214 (init_registers_powerpc_cell64l): Likewise.
12215 (ppc_arch_setup): Detect Cell/B.E. architecture.
12217 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12219 * Makefile.in (datarootdir): New variable.
12221 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12223 * linux-low.c (linux_write_memory): Update debugging output.
12224 * Makefile.in (clean): Add new descriptions.
12225 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12226 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12227 * configure.srv: Add new files for arm*-*-linux*.
12228 * linux-arm-low.c: Add new declarations.
12229 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12230 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12231 (HWCAP_VFPv3D16): New.
12232 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12233 instead of __IWMMXT__.
12234 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12235 (arm_arch_setup): New.
12236 (target_regsets): Remove #ifdef. Add VFP regset.
12237 (the_low_target): Use arm_arch_setup.
12239 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12241 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12242 the main thread again.
12244 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12246 Adding Neutrino gdbserver.
12247 * configure: Regenerated.
12248 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12249 * configure.srv (i[34567]86-*-nto*): New target.
12250 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12251 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12252 (nto_comctrl) [__QNX__]: New function.
12253 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12255 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12257 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12260 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12261 Pedro Alves <pedro@codesourcery.com>
12263 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12264 don't support CONTEXT_EXTENDED_REGISTERS.
12265 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12266 (the_low_target): Install them.
12267 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12268 failing with ERROR_PIPE_NOT_CONNECTED.
12270 2009-06-30 Doug Evans <dje@google.com>
12271 Pierre Muller <muller@ics.u-strasbg.fr>
12273 Add h/w watchpoint support to x86-linux, win32-i386.
12274 * Makefile.in (SFILES): Add i386-low.c
12275 (i386_low_h): Define.
12276 (i386-low.o): Add dependencies.
12277 (linux-x86-low.o): Add i386-low.h dependency.
12278 (win32-i386-low.o): Ditto.
12279 * i386-low.c: New file.
12280 * i386-low.h: New file.
12281 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12282 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12283 * linux-low.c (linux_add_process): Initialize arch_private.
12284 (linux_remove_process): Free arch_private.
12285 (add_lwp): Initialize arch_private.
12286 (delete_lwp): Free arch_private.
12287 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12289 * linux-low.h (process_info_private): New member arch_private.
12290 (lwp_info): New member arch_private.
12291 (linux_target_ops): New members new_process, new_thread,
12293 (ptid_of): New macro.
12294 * linux-x86-low.c: Include stddef.h, i386-low.h.
12295 (arch_process_info): New struct.
12296 (arch_lwp_info): New struct.
12297 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12298 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12299 (i386_dr_low_get_status): New function.
12300 (x86_insert_point, x86_remove_point): New functions.
12301 (x86_stopped_by_watchpoint): New function.
12302 (x86_stopped_data_address): New function.
12303 (x86_linux_new_process, x86_linux_new_thread): New functions.
12304 (x86_linux_prepare_to_resume): New function.
12305 (the_low_target): Add entries for insert_point, remove_point,
12306 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12308 * server.c (debug_hw_points): New global.
12309 (monitor_show_help): Document set debug-hw-points.
12310 (handle_query): Process "set debug-hw-points".
12311 * server.h (debug_hw_points): Declare.
12312 (paddress): Declare.
12313 * utils.c (NUMCELLS, CELLSIZE): New macros.
12314 (get_sell, xsnprintf, paddress): New functions.
12315 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12316 remove_point, stopped_by_watchpoint, stopped_data_address.
12317 * win32-i386-low.c: Include i386-low.h.
12318 (debug_reg_state): Replaces dr.
12319 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12320 (i386_dr_low_get_status): New function.
12321 (i386_insert_point, i386_remove_point): New functions.
12322 (i386_stopped_by_watchpoint): New function.
12323 (i386_stopped_data_address): New function.
12324 (i386_initial_stuff): Update.
12325 (get_thread_context,set_thread_context,i386_thread_added): Update.
12326 (the_low_target): Add entries for insert_point,
12327 remove_point, stopped_by_watchpoint, stopped_data_address.
12328 * win32-low.c (win32_insert_watchpoint): New function.
12329 (win32_remove_watchpoint): New function.
12330 (win32_stopped_by_watchpoint): New function.
12331 (win32_stopped_data_address): New function.
12332 (win32_target_ops): Add entries for insert_watchpoint,
12333 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12334 * win32-low.h (win32_target_ops): New members insert_point,
12335 remove_point, stopped_by_watchpoint, stopped_data_address.
12337 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12339 * server.c (process_serial_event): Re-return unsupported, not
12340 error, if the type isn't recognized. Re-allow supporting only
12341 insert or remove packets. Also call require_running for
12342 breakpoints. Add missing break statement to default case. Tidy.
12343 * target.h (struct target_ops): Rename insert_watchpoint to
12344 insert_point, and remove_watchpoint to remove_point.
12346 * linux-low.h (struct linux_target_ops): Likewise.
12347 * linux-low.c (linux_insert_watchpoint): Rename to ...
12348 (linux_insert_point): ... this. Adjust.
12349 (linux_remove_watchpoint): Rename to ...
12350 (linux_remove_point): ... this. Adjust.
12351 (linux_target_ops): Adjust.
12352 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12353 (cris_insert_point): ... this.
12354 (cris_remove_watchpoint): Rename to ...
12355 (cris_remove_point): ... this.
12356 (the_low_target): Adjust.
12358 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12360 * server.c (handle_v_kill): Pass signal_pid to
12361 kill_inferior if multi_process is zero.
12363 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12365 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12366 * target.h (target_ops): Comment for *_watchpoint to make it clear
12367 the functions can get types '0' and '1'.
12369 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12371 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12372 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12373 * regcache.c (get_regcache): Likewise.
12374 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12375 * win32-low.c (child_fetch_inferior_registers): Remove check for
12378 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12379 Pedro Alves <pedro@codesourcery.com>
12381 * target.h (struct target_ops) <supports_multi_process>: New
12383 (target_supports_multi_process): New.
12384 * server.c (handle_query): Even if GDB reports support, only
12385 enable multi-process if the target also supports it. Report
12386 multi-process support only if the target backend supports it.
12387 * linux-low.c (linux_supports_multi_process): New function.
12388 (linux_target_ops): Install it as target_supports_multi_process
12391 2009-05-24 Doug Evans <dje@google.com>
12393 Global renaming of find_thread_pid to find_thread_ptid.
12394 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12395 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12396 All callers updated.
12398 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12399 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12402 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12403 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12404 (linux_resume_one_lwp): Ditto.
12406 2009-05-23 Doug Evans <dje@google.com>
12408 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12409 from struct inferior_list_entry * to struct lwp_info *.
12410 All callers updated.
12412 2009-05-13 Doug Evans <dje@google.com>
12414 * linux-x86-low.c: Don't include assert.h.
12415 (x86_siginfo_fixup): Use fatal, not assert.
12416 (x86_arch_setup): Fix comment.
12418 2009-05-12 Doug Evans <dje@google.com>
12420 Biarch support for i386/amd64 gdbserver.
12421 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12422 Add linux-x86-low.c.
12423 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12424 (linux-x86-low.o): Add.
12425 * linux-x86-64-low.c: Delete.
12426 * linux-i386-low.c: Delete.
12427 * linux-x86-low.c: New file.
12428 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12430 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12432 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12433 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12434 (linux_child_pid_to_exec_file): New function.
12435 (elf_64_header_p, elf_64_file_p): New functions.
12436 (siginfo_fixup): New function.
12437 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12438 give target a chance to convert layout.
12439 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12440 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12442 2009-05-07 Doug Evans <dje@google.com>
12444 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12445 (regsets_store_inferior_registers): Ditto.
12447 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12451 * linux-low.c (must_set_ptrace_flags): Delete.
12452 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12454 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12455 `lwp->must_set_ptrace_flags' instead.
12456 (linux_wait_for_event_1): Set ptrace options here.
12457 (linux_wait_1): ... not here.
12459 2009-04-30 Doug Evans <dje@google.com>
12461 * inferiors.c (started_inferior_callback): New function.
12462 (attached_inferior_callback): New function.
12463 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12464 * server.c (print_started_pid, print_attached_pid): New functions.
12465 (detach_or_kill_for_exit): New function.
12466 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12467 * server.h (have_started_inferiors_p): Declare.
12468 (have_attached_inferiors_p): Declare.
12470 * inferiors.c (remove_process): Fix memory leak, free process.
12471 * linux-low.c (linux_remove_process): New function.
12472 (linux_kill): Call it instead of remove_process.
12473 (linux_detach, linux_wait_1): Ditto.
12475 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12477 * configure.srv: Add x86 Windows CE target.
12479 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12481 * inferiors.c (get_thread_process): Make global.
12482 * server.h (get_thread_process): Add prototype.
12483 * thread-db.c (find_one_thread): Use get_thread_process
12484 instead of current_process.
12485 (thread_db_get_tls_address): Do not crash if called when
12486 thread layer is not yet initialized.
12488 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12490 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12491 * spu-low.c (current_tid): Rename to ...
12492 (current_ptid): ... this.
12493 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12494 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12495 ptid_get_lwp (current_ptid) instead of current_tid.
12496 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12497 instead of current_tid. Use find_process_pid to verify pid
12498 argument is valid. Pass proper argument to remove_process.
12499 (spu_thread_alive): Compare current_ptid instead of current_tid.
12500 (spu_resume): Likewise.
12502 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12504 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12507 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12509 Implement the multiprocess extensions, and add linux multiprocess
12512 * server.h (ULONGEST): Declare.
12513 (struct ptid, ptid_t): New.
12514 (minus_one_ptid, null_ptid): Declare.
12515 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12516 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12517 (struct inferior_list_entry): Change `id' type from unsigned from
12519 (struct sym_cache, struct breakpoint, struct
12520 process_info_private): Forward declare.
12521 (struct process_info): Declare.
12522 (current_process): Declare.
12523 (all_processes): Declare.
12524 (initialize_inferiors): Declare.
12525 (add_thread): Adjust to use ptid_t.
12526 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12527 (add_process, remove_process, find_thread_pid): Declare.
12528 (find_inferior_id): Adjust to use ptid_t.
12529 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12530 (multi_process): Declare.
12531 (push_event): Adjust to use ptid_t.
12532 (read_ptid, write_ptid): Declare.
12533 (prepare_resume_reply): Adjust to use ptid_t.
12534 (clear_symbol_cache): Declare.
12535 * inferiors.c (all_processes): New.
12536 (null_ptid, minus_one_ptid): New.
12537 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12538 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12539 (add_thread): Change unsigned long to ptid. Remove gdb_id
12541 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12542 (gdb_id_to_thread): Rename to ...
12543 (find_thread_pid): ... this. Change unsigned long to ptid.
12544 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12545 (loaded_dll, pull_pid_from_list): Adjust.
12546 (add_process, remove_process, find_process_pid)
12547 (get_thread_process, current_process, initialize_inferiors): New.
12548 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12549 (struct target_waitstatus) <related_pid>: Ditto.
12550 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12551 return type to int.
12552 (struct target_ops) <join>: Add `pid' argument.
12553 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12554 (struct target_ops) <wait>: Add `ptid' field. Change return type
12556 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12557 (mywait): Add `ptid' argument. Change return type to ptid_t.
12558 (target_pid_to_str): Declare.
12559 * target.c (set_desired_inferior): Adjust to use ptids.
12560 (mywait): Add new `ptid' argument. Adjust.
12561 (target_pid_to_str): New.
12562 * mem-break.h (free_all_breakpoints): Declare.
12563 * mem-break.c (breakpoints): Delelete.
12564 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12565 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12566 to use per-process breakpoint list.
12567 (free_all_breakpoints): New.
12568 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12569 (symbol_cache, all_symbols_looked_up): Delete.
12571 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12573 (prepare_resume_reply): Change ptid argument's type from unsigned
12574 long to ptid_t. Adjust. Implement W;process and X;process.
12575 (free_sym_cache, clear_symbol_cache): New.
12576 (look_up_one_symbol): Adjust to per-process symbol cache. *
12577 * server.c (cont_thread, general_thread, step_thread): Change type
12579 (attached): Delete.
12580 (multi_process): New.
12581 (last_ptid): Change type to ptid_t.
12582 (struct vstop_notif) <ptid>: Change type to ptid_t.
12583 (queue_stop_reply, push_event): Change `ptid' argument's type to
12585 (discard_queued_stop_replies): Add `pid' argument.
12586 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12587 changes. Don't reference the `attached' global.
12588 (attach_inferior): Adjust to mywait interface changes.
12589 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12590 features. Handle and report "multiprocess+". Handle
12592 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12594 (handle_v_kill): New.
12595 (handle_v_stopped): Adjust to use target_pid_to_str.
12596 (handle_v_requests): Allow multiple attaches and runs when
12597 multiprocess extensions are in effect. Handle "vKill".
12598 (myresume): Adjust to use ptids.
12599 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12600 (handle_status): Adjust to discard_queued_stop_replies interface
12602 (first_thread_of, kill_inferior_callback)
12603 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12604 (main): Call initialize_inferiors. Adjust to use ptids, killing
12605 and detaching from all inferiors. Handle multiprocess packet
12607 * linux-low.h: Include gdb_proc_service.h.
12608 (struct process_info_private): New.
12609 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12610 <lwpid_of>: Use ptid_get_lwp.
12611 (get_lwp_thread): Adjust.
12612 (struct lwp_info): Add `dead' member.
12613 (find_lwp_pid): Declare.
12614 * linux-low.c (thread_db_active): Delete.
12615 (new_inferior): Adjust comment.
12616 (inferior_pid): Delete.
12617 (linux_add_process): New.
12618 (handle_extended_wait): Adjust.
12619 (add_lwp): Change unsigned long to ptid.
12620 (linux_create_inferior): Add process to processes table. Adjust
12621 to use ptids. Don't set new_inferior here.
12622 (linux_attach_lwp): Rename to ...
12623 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12624 it. Adjust to use ptids.
12625 (linux_attach_lwp): New.
12626 (linux_attach): Add process to processes table. Don't set
12628 (struct counter): New.
12629 (second_thread_of_pid_p, last_thread_of_process_p): New.
12630 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12631 multiple processes.
12632 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12633 processes. Remove process from process table.
12634 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12635 to multiple processes.
12636 (any_thread_of): New.
12637 (linux_detach): Add `pid' argument, and handle it. Remove process
12638 from processes table.
12639 (linux_join): Add `pid' argument. Handle it.
12640 (linux_thread_alive): Change unsighed long argument to ptid_t.
12641 Consider dead lwps as not being alive.
12642 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12643 threads we're not interested in.
12644 (same_lwp, find_lwp_pid): New.
12645 (linux_wait_for_lwp): Change `pid' argument's type from int to
12647 (linux_wait_for_event): Rename to ...
12648 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12649 from int to ptid_t. Adjust.
12650 (linux_wait_for_event): New.
12651 (linux_wait_1): Add `ptid' argument. Change return type to
12652 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12653 that exit from the process table.
12654 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12656 (mark_lwp_dead): New.
12657 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12658 stopping all threads, mark its main lwp as dead.
12659 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12661 (fetch_register, usr_store_inferior_registers)
12662 (regsets_fetch_inferior_registers)
12663 (regsets_store_inferior_registers, linux_read_memory)
12664 (linux_write_memory): Inline `inferior_pid'.
12665 (linux_look_up_symbols): Adjust to use per-process
12666 `thread_db_active'.
12667 (linux_request_interrupt): Adjust to use ptids.
12668 (linux_read_auxv): Inline `inferior_pid'.
12669 (initialize_low): Don't reference thread_db_active.
12670 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12671 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12672 (ps_getpid): Return the pid of the current inferior.
12673 * thread-db.c (proc_handle, thread_agent): Delete.
12674 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12676 (find_one_thread): Change argument type to ptid_t. Adjust to
12678 (maybe_attach_thread): Adjust to per-process data and ptids.
12679 (thread_db_find_new_threads): Ditto.
12680 (thread_db_init): Ditto.
12681 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12682 processes table. Adjust to use ptids.
12683 (spu_kill, spu_detach): Adjust interface. Remove process from
12685 (spu_join, spu_thread_alive): Adjust interface.
12686 (spu_wait): Adjust interface. Remove process from processes
12687 table. Adjust to use ptids.
12688 * win32-low.c (current_inferior_tid): Delete.
12689 (current_inferior_ptid): New.
12690 (debug_event_ptid): New.
12691 (thread_rec): Take a ptid. Adjust.
12692 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12693 (child_delete_thread): Ditto.
12694 (do_initial_child_stuff): Add `attached' argument. Add process to
12696 (child_fetch_inferior_registers, child_store_inferior_registers):
12698 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12699 (win32_attach): Pass 1 to do_initial_child_stuff.
12700 (win32_kill): Adjust interface. Remove process from processes
12702 (win32_detach): Ditto.
12703 (win32_join): Adjust interface.
12704 (win32_thread_alive): Take a ptid.
12705 (win32_resume): Adjust to use ptids.
12706 (get_child_debug_event): Ditto.
12707 (win32_wait): Adjust interface. Remove exiting process from
12710 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12712 Non-stop mode support.
12714 * server.h (non_stop): Declare.
12715 (gdb_client_data, handler_func): Declare.
12716 (delete_file_handler, add_file_handler, start_event_loop):
12718 (handle_serial_event, handle_target_event, push_event)
12719 (putpkt_notif): Declare.
12720 * target.h (enum resume_kind): New.
12721 (struct thread_resume): Replace `step' field by `kind' field.
12722 (TARGET_WNOHANG): Define.
12723 (struct target_ops) <wait>: Add `options' argument.
12724 <supports_non_stop, async, start_non_stop>: New fields.
12725 (target_supports_non_stop, target_async): New.
12726 (start_non_stop): Declare.
12727 (mywait): Add `options' argument.
12728 * target.c (mywait): Add `options' argument. Print child exit
12729 notifications here.
12730 (start_non_stop): New.
12731 * server.c (non_stop, own_buf, mem_buf): New globals.
12732 (struct vstop_notif): New.
12733 (notif_queue): New global.
12734 (queue_stop_reply, push_event, discard_queued_stop_replies)
12735 (send_next_stop_reply): New.
12736 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12738 (attach_inferior): In non-stop mode, don't wait for the target
12740 (handle_general_set): Handle QNonStop.
12741 (handle_query): When handling qC, return the current general
12742 thread, instead of the first thread of the list.
12743 (handle_query): If the backend supports non-stop mode, include
12744 QNonStop+ in the qSupported query response.
12745 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12747 (handle_v_attach, handle_v_run): Handle non-stop mode.
12748 (handle_v_stopped): New.
12749 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12750 (myresume): Adjust to use resume_kind. Handle non-stop.
12751 (queue_stop_reply_callback): New.
12752 (handle_status): Handle non-stop mode.
12753 (main): Clear non_stop flag on reconnection. Use the event-loop.
12754 Refactor serial protocol handling from here ...
12755 (process_serial_event): ... to this new function. When GDB
12756 selects any thread, select one here. In non-stop mode, wait until
12757 GDB acks all pending events before exiting.
12758 (handle_serial_event, handle_target_event): New.
12759 * remote-utils.c (remote_open): Install remote_desc in the event
12761 (remote_close): Remove remote_desc from the event loop.
12762 (putpkt_binary): Rename to...
12763 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12764 (putpkt_binary): New as wrapper around putpkt_binary_1.
12765 (putpkt_notif): New.
12766 (prepare_resume_reply): In non-stop mode, don't change the
12768 * event-loop.c: New.
12769 * Makefile.in (OBJ): Add event-loop.o.
12770 (event-loop.o): New rule.
12772 * linux-low.h (pid_of): Moved here.
12774 (get_lwp_thread): Use lwpid_of.
12775 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12776 * linux-low.c (pid_of): Delete.
12777 (inferior_pid): Use lwpid_of.
12778 (linux_event_pipe): New.
12779 (target_is_async_p): New.
12781 (handle_extended_wait): Use lwpid_of.
12782 (add_lwp): Don't set lwpid field.
12783 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12784 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12785 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12786 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12787 first. Adjust to linux_wait_for_event interface changes. Use
12789 (linux_detach): Don't delete the main lwp here.
12790 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12791 (status_pending_p): Don't consider explicitly suspended lwps.
12792 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12793 pointer. Add OPTIONS argument. Change return type to int. Use
12794 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12795 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12796 pointer. Add status pointer argument. Return a pid instead of a
12797 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12798 changes. In non-stop mode, don't switch to a random thread.
12799 (linux_wait): Rename to...
12800 (linux_wait_1): ... this. Add target_options argument, and handle
12801 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12802 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12803 clean exit and signal exit code. Don't stop all threads in
12804 non-stop mode. In all-stop mode, only stop all threads when
12805 reporting a stop to GDB. Handle explicit thread stop requests.
12806 (async_file_flush, async_file_mark): New.
12808 (send_sigstop): Use lwpid_of.
12809 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12810 interface changes. In non-stop mode, don't switch to a random
12812 (linux_resume_one_lwp): Use lwpid_of.
12813 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12814 (linux_resume_one_thread): ... this. Handle resume_stop. In
12815 non-stop mode, don't look for pending flag in all threads.
12816 (resume_status_pending_p): Don't consider explicitly suspended
12818 (my_waitpid): Reimplement. Emulate __WALL.
12819 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12821 (sigchld_handler, linux_supports_non_stop, linux_async)
12822 (linux_start_non_stop): New.
12823 (linux_target_ops): Register linux_supports_non_stop, linux_async
12824 and linux_start_non_stop.
12825 (initialize_low): Install SIGCHLD handler.
12826 * thread-db.c (thread_db_create_event, find_one_thread)
12827 (thread_db_get_tls_address): Use lwpid_of.
12828 * win32-low.c (win32_detach): Adjust to use resume_kind.
12829 (win32_wait): Add `options' argument.
12830 * spu-low.c (spu_resume): Adjust to use resume_kind.
12831 (spu_wait): Add `options' argument.
12833 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12835 Decouple target code from remote protocol.
12837 * target.h (enum target_waitkind): New.
12838 (struct target_waitstatus): New.
12839 (struct target_ops) <wait>: Return an unsigned long. Take a
12840 target_waitstatus pointer instead of a char pointer.
12841 (mywait): Likewise.
12842 * target.c (mywait): Change prototype to return an unsigned long.
12843 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12844 * server.h (thread_from_wait, old_thread_from_wait): Delete
12846 (prepare_resume_reply): Change prototype to take a
12848 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12849 (last_status, last_ptid): New.
12850 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12851 pid instead of a signal.
12852 (attach_inferior): Remove "status" and "signal" parameters.
12854 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12856 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12857 (handle_v_requests, myresume): Remove "status" and "signal"
12858 parameters. Adjust.
12859 (handle_status): New.
12860 (main): Delete local `status'. Adjust.
12861 * remote-utils.c: Include target.h.
12862 (prepare_resume_reply): Change prototype to take a
12863 target_waitstatus. Adjust.
12865 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12867 * spu-low.c (spu_wait): Adjust.
12868 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12870 (win32_wait): Adjust.
12872 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12874 * target.h (struct thread_resume): Delete leave_stopped member.
12875 (struct target_ops): Add a `n' argument to the `resume' callback.
12876 * server.c (start_inferior): Adjust.
12877 (handle_v_cont, myresume): Adjust.
12878 * linux-low.c (check_removed_breakpoint): Adjust to resume
12879 interface change, and to removed leave_stopped field.
12880 (resume_ptr): Delete.
12881 (struct thread_resume_array): New.
12882 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12883 resume interface change.
12884 (linux_continue_one_thread, linux_queue_one_thread)
12885 (resume_status_pending_p): Check if the resume field is NULL
12886 instead of checking the leave_stopped member.
12887 (linux_resume): Adjust to the target resume interface change.
12888 * spu-low.c (spu_resume): Adjust to the target resume interface
12890 * win32-low.c (win32_detach, win32_resume): Ditto.
12892 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12894 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12896 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12898 (linux_continue_one_thread): Only preserve the stepping flag if
12899 there's a pending breakpoint.
12901 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12903 * server.c (main): After the inferior having exited, call
12904 remote_close before exiting gdbserver.
12906 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12908 Fix size of FPSCR in Power 7 processors.
12909 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12910 (PPC_FEATURE_HAS_DFP): New #define.
12911 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12914 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12916 * server.c (handle_query) Whitespace and formatting.
12918 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12920 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12921 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12922 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12923 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12924 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12925 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12926 Makefile.in, configure.ac: Fix whitespace throughout.
12927 * configure: Regenerate.
12929 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12931 * inferiors.c (find_inferior): Make it safe for the callback
12932 function to delete the currently iterated inferior.
12934 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12936 * Makefile.in (linuw_low_h): Move higher.
12937 (thread-db.o): Depend on $(linux_low_h).
12939 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12941 Rename "process" to "lwp" throughout.
12943 * linux-low.c (all_processes): Rename to...
12944 (all_lwps): ... this.
12945 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12946 (add_process): Rename to ...
12947 (add_lwp): ... this. Adjust.
12948 (linux_create_inferior): Adjust.
12949 (linux_attach_lwp): Adjust.
12950 (linux_attach): Adjust.
12951 (linux_kill_one_process): Rename to ...
12952 (linux_kill_one_lwp): ... this. Adjust.
12953 (linux_kill): Adjust.
12954 (linux_detach_one_process): Rename to ...
12955 (linux_detach_one_lwp): ... this. Adjust.
12956 (linux_detach): Adjust.
12957 (check_removed_breakpoint): Adjust.
12958 (status_pending_p): Adjust.
12959 (linux_wait_for_process): Rename to ...
12960 (linux_wait_for_lwp): ... this. Adjust.
12961 (linux_wait_for_event): Adjust.
12962 (send_sigstop): Adjust.
12963 (wait_for_sigstop): Adjust.
12964 (stop_all_processes): Rename to ...
12965 (stop_all_lwps): ... this.
12966 (linux_resume_one_process): Rename to ...
12967 (linux_resume_one_lwp): ... this. Adjust.
12968 (linux_set_resume_request, linux_continue_one_thread)
12969 (linux_queue_one_thread, resume_status_pending_p)
12970 (usr_store_inferior_registers, regsets_store_inferior_registers)
12971 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12973 * linux-low.h (get_process): Rename to ...
12974 (get_lwp): ... this. Adjust.
12975 (get_thread_process): Rename to ...
12976 (get_thread_lwp): ... this. Adjust.
12977 (get_process_thread): Rename to ...
12978 (get_lwp_thread): ... this. Adjust.
12979 (struct process_info): Rename to ...
12980 (struct lwp_info): ... this.
12981 (all_processes): Rename to ...
12982 (all_lwps): ... this.
12983 * proc-service.c (ps_lgetregs): Adjust.
12984 * thread-db.c (thread_db_create_event, find_one_thread)
12985 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12987 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12989 * server.c (handle_query): Handle "qAttached".
12991 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12993 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12994 GPLv3, update license URL.
12996 2009-03-01 Doug Evans <dje@google.com>
12998 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12999 (server_h): Add gdb_signals.h.
13000 (signals.o): Update.
13001 * server.h (target_signal_from_host,target_signal_to_host_p)
13002 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13004 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13006 * remote-utils.c (getpkt): Also generate remote-debug
13007 information if noack_mode is set.
13009 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13011 * server.c (handle_query): Report qXfer:siginfo:read and
13012 qXfer:siginfo:write as supported and handle them.
13013 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13014 * linux-low.c (linux_xfer_siginfo): New.
13015 (linux_target_ops): Set it.
13017 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13019 * server.c (gdbserver_usage): Mention --remote-debug.
13020 (main): Accept '--remote-debug' switch.
13022 2009-01-18 Doug Evans <dje@google.com>
13024 * regcache.c (new_register_cache): No need to check result of xcalloc.
13025 * server.c (handle_search_memory): Back out calls to xmalloc,
13026 result is checked and error is returned to user upon failure.
13027 (handle_query): Ditto. Add more checks for result of malloc.
13028 (handle_v_cont): Check result of malloc, report error back to
13030 (handle_v_run): Ditto. Call freeargv.
13031 * server.h (freeargv): Declare.
13032 * utils.c (freeargv): New fn.
13034 2009-01-15 Doug Evans <dje@google.com>
13036 * gdbreplay.c (perror_with_name): Make arg const char *.
13037 * server.h (target_signal_to_name): Make return type const char *.
13038 * thread-db.c (thread_db_err_str): Make return type const char *.
13039 * utils.c (perror_with_name): Make arg const char *.
13041 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13043 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13044 when handling a EXIT_PROCESS_DEBUG_EVENT.
13046 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13048 * gdbreplay.c (gdbreplay_version): Update copyright year.
13049 * server.c (gdbserver_version): Likewise.
13051 2009-01-05 Doug Evans <dje@google.com>
13053 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13054 (handle_extended_wait): Improve comment.
13056 2008-12-13 Doug Evans <dje@google.com>
13058 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13059 * server.h (ATTR_MALLOC): New macro.
13060 (xmalloc,xcalloc,xstrdup): Declare.
13061 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13062 * inferiors.c: Ditto.
13063 * linux-low.c: Ditto.
13064 * mem-break.c: Ditto.
13065 * regcache.c: Ditto.
13066 * remote-utils.c: Ditto.
13069 * win32-low.c: Ditto.
13071 2008-12-12 Doug Evans <dje@google.com>
13073 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13074 in debugging printf.
13076 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13078 2008-12-09 Doug Evans <dje@google.com>
13080 * linux-low.h (struct process_info): Delete member tid, unused.
13081 * thread-db.c (find_one_thread): Update.
13082 (maybe_attach_thread): Update.
13084 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13086 * target.h (struct target_ops): Add qxfer_osdata member.
13087 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13089 (linux_qxfer_osdata): New functions.
13090 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13092 * server.c (handle_query): Handle "qXfer:osdata:read:".
13093 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13094 (buffer_xml_printf): New functions.
13095 * server.h (struct buffer): New.
13096 (buffer_grow_str, buffer_grow_str0): New macros.
13097 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13098 (buffer_xml_printf): Declare.
13100 2008-11-24 Doug Evans <dje@google.com>
13102 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13104 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13106 * server.c (handle_v_run): Always use the supplied argument list.
13108 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13110 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13111 (xtensa_regmap_table): Add entry for scompare1.
13113 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13115 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13116 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13117 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13118 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13119 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13120 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13121 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13122 XML target descriptions.
13123 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13124 when inferior is running on an ISA 2.05 or later processor. Add
13125 special case to return offset for full 64-bit slot of FPSCR when
13128 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13130 * Makefile.in (SFILES, clean): Added sparc64 files.
13131 (reg-sparc64.o, reg-sparc64.c): New.
13132 * configure.srv (sparc*-*-linux*): New configuration.
13133 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13134 syscall arguments for SPARC.
13135 (regsets_store_inferior_registers): Likewise.
13136 * linux-sparc-low.c: New file.
13138 2008-10-21 Doug Evans <dje@google.com>
13140 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13141 (READLINE_DIR,READLINE_DEP): Delete.
13142 (INTERNAL_CFLAGS): Update.
13143 (LINTFLAGS): Update.
13145 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13147 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13148 whole argv from the last run, not just argv[0].
13150 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13152 * regcache.c (new_register_cache): Return NULL if the register
13153 cache size isn't known yet.
13154 (free_register_cache): Avoid dereferencing a NULL regcache.
13156 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13158 * configure.srv: Merge MIPS and MIPS64.
13160 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13162 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13164 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13166 * Makefile.in: Add required vsx dependencies.
13168 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13169 Declare init_registers_powerpc_vsx32l.
13170 Declare init_registers_powerpc_vsx64l.
13171 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13172 (ppc_arch_setup): Check for VSX in hwcap.
13173 (ppc_fill_vsxregset): New function.
13174 (ppc_store_vsxregset): New function.
13175 Add new VSX entry in regset_info target_regsets.
13177 * configure.srv: Add new VSX dependencies.
13179 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13181 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13182 (remote_open): Set or clear transport_is_reliable.
13183 (putpkt_binary): Don't expect acks in noack mode.
13184 (getpkt): Don't send ack/nac in noack mode.
13185 * server.c (handle_general_set): Handle QStartNoAckMode.
13186 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13188 (main): Reset noack_mode on every connection.
13189 * server.h (noack_mode): Declare.
13191 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13193 * Makefile.in (GDBREPLAY_OBS): New variable.
13194 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13196 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13197 Daniel Jacobowitz <dan@codesourcery.com>
13199 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13200 (usr_store_inferior_registers): Likewise.
13201 (regsets_store_inferior_registers): Likewise.
13203 2008-07-31 Rolf Jansen <rj@surtec.com>
13204 Pedro Alves <pedro@codesourcery.com>
13206 * configure.ac: Check for memmem declaration.
13207 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13208 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13209 (disable_packet_qfThreadInfo): Unconditionally compile.
13210 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13211 * configure, config.in: Regenerate.
13213 2008-07-28 Doug Kwan <dougkwan@google.com>
13215 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13216 (linux_write_memory): Remove declaration of errno.
13218 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13220 * linux-low.c (handle_extended_wait): Do not use "status"
13221 variable uninitialized.
13223 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13225 * server.c (handle_v_attach): Inhibit reporting dll changes.
13227 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13229 * remote-utils.c (prepare_resume_reply): If requested, don't
13230 output "thread:TID" in the T stop reply.
13232 * server.c (disable_packet_vCont, disable_packet_Tthread)
13233 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13234 (handle_query): If requested, disable support for qC, qfThreadInfo
13236 (handle_v_requests): If requested, disable support for vCont.
13237 (gdbserver_show_disableable): New.
13238 (main): Handle --disable-packet and --disable-packet=LIST.
13240 * server.h (disable_packet_vCont, disable_packet_Tthread)
13241 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13243 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13245 * server.c (gdbserver_usage): Mention --version.
13247 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13249 * Makefile.in (gdbreplay.o): New rule.
13251 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13253 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13254 message, not gdbserver.
13256 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13257 Nathan Sidwell <nathan@codesourcery.com>
13258 Joseph Myers <joseph@codesourcery.com>
13260 * acinclude.m4: Include ../../config/acx.m4.
13261 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13262 * configure, config.in: Regenerate.
13263 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13264 * server.c (gdbserver_version): Print PKGVERSION.
13265 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13266 (main): Adjust gdbserver_usage calls.
13267 * gdbreplay.c (version, host_name): Add declarations.
13268 (gdbreplay_version, gdbreplay_usage): New.
13269 (main): Accept --version and --help options.
13271 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13273 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13274 (arm_breakpoint_at): Handle Thumb.
13275 (the_low_target): Add comment.
13277 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13279 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13281 2008-05-09 Doug Evans <dje@google.com>
13283 * server.h (decode_search_memory_packet): Declare.
13284 * remote-utils.c (decode_search_memory_packet): New fn.
13285 * server.c (handle_search_memory_1): New fn.
13286 (handle_search_memory): New fn.
13287 (handle_query): Process qSearch:memory packets.
13289 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13291 * regcache.c (registers_length): Remove.
13292 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13293 full register packet.
13294 * regcache.h (registers_length): Remove prototype.
13295 * server.h (PBUFSIZ): Define to 16384.
13297 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13299 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13300 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13301 powerpc-64l.o, and powerpc-altivec64l.o.
13302 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13303 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13304 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13305 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13306 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13309 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13310 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13311 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13312 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13313 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13314 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13315 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13316 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13317 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13318 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13321 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13322 (init_registers_powerpc_32l): ... this new prototype.
13323 (init_registers_powerpc_32): Remove, replace by ...
13324 (init_registers_powerpc_altivec32l): ... this new prototype.
13325 (init_registers_powerpc_e500): Remove, replace by ...
13326 (init_registers_powerpc_e500l): ... this new prototype.
13327 (init_registers_ppc64): Remove, replace by ...
13328 (init_registers_powerpc_64l): ... this new prototype.
13329 (init_registers_powerpc_64): Remove, replace by ...
13330 (init_registers_powerpc_altivec64l): ... this new prototype.
13331 (ppc_num_regs): Set to 73.
13332 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13333 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13334 (ppc_cannot_store_register): Handle orig_r3 and trap.
13335 (ppc_arch_setup): Update init_registers_... calls.
13336 (ppc_fill_gregset): Handle orig_r3 and trap.
13338 * inferiors.c (clear_inferiors): Reset current_inferior.
13340 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13342 * acinclude.m4: Add override.m4.
13343 * configure: Regenerate.
13345 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13347 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13348 initial call to init_register_ppc64.
13350 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13352 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13353 single powerpc*-*-linux* case.
13354 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13356 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13358 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13359 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13361 * linux-ppc-low.c: Include <elf.h>.
13362 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13363 (ppc_hwcap): New global variable.
13364 (ppc_regmap): Remove __SPE__ #ifdef sections.
13365 (ppc_regmap_e500): New global variable.
13366 (ppc_cannot_store_register): Update __SPE__ special case.
13367 (ppc_get_hwcap): New function.
13368 (ppc_arch_setup): Use it to determine whether inferior supports
13369 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13370 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13371 Do not access registers if target does not support AltiVec.
13372 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13373 Do not access registers if target does not support SPE.
13374 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13376 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13378 * linux-low.c (disabled_regsets, num_regsets): New.
13379 (use_regsets_p): Delete.
13380 (linux_wait_for_process): Clear disabled_regsets.
13381 (regsets_fetch_inferior_registers): Check and set it.
13382 (regsets_store_inferior_registers): Likewise.
13383 (linux_fetch_registers, linux_store_registers): Do not use
13385 (initialize_low): Allocate disabled_regsets.
13387 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13389 * Makefile.in (LIBOBJS): New.
13390 (OBS): Use LIBOBJS.
13391 (memmem.o): New rule.
13392 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13393 * configure: Regenerated.
13395 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13397 * server.c (handle_query): Never return "unsupported" for
13398 qXfer:features:read queries.
13400 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13402 * server.c (get_features_xml): Fix inverted condition.
13403 (handle_query): Always support qXfer:feature:read.
13405 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13407 * server.c (wrapper_argv): New.
13408 (start_inferior): Handle wrapper_argv. If set, expect an extra
13410 (gdbserver_usage): Document --wrapper.
13411 (main): Parse --wrapper.
13413 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13415 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13416 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13417 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13418 (ppc_set_pc): Likewise.
13419 (ppc_arch_setup): New function.
13420 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13421 of collect_register.
13422 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13424 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13426 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13427 instead of linux-ppc64-low.o.
13428 * linux-ppc64-low.c: Remove file.
13429 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13430 (linux-ppc64-low.o): Remove rule.
13432 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13433 (init_registers_powerpc_64): Likewise.
13434 (ppc_regmap): Conditionally define depending on __powerpc64__.
13435 (ppc_cannot_store_register): Do not special-case "fpscr" when
13436 compiled on __powerpc64__.
13437 (ppc_collect_ptrace_register): New function.
13438 (ppc_supply_ptrace_register): New function.
13439 (ppc_breakpoint): Change type to "unsigned int".
13440 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13441 (the_low_target): Conditionally provide initializers for the
13442 arch_setup member depending on __powerpc64__. Install
13443 collect_ptrace_register and supply_ptrace_register members.
13445 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13447 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13448 * server.c (gdbserver_xmltarget): Define.
13449 (get_features_xml): Use it to replace "target.xml" and arch_string.
13451 * configure.srv: Remove srv_xmltarget. Add XML files that were
13452 mentioned there to srv_xmlfiles instead. Remove conditional tests
13453 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13454 srv_xmlfiles and srv_regobj to include all possible choices.
13455 * configure.ac (srv_xmltarget): Remove.
13456 (srv_xmlfiles): Do not add "target.xml".
13457 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13458 checks for supplementary target information.
13459 * configure: Regenerate.
13460 * Makefile.in (XML_TARGET): Remove.
13461 (target.xml): Remove rule.
13462 (clean): Do not clean up target.xml.
13463 (.PRECIOUS): Do not mention target.xml.
13465 * target.h (struct target_ops): Remove arch_string member.
13466 * linux-low.c (linux_arch_string): Remove.
13467 (linux_target_ops): Remove arch_string initializer.
13468 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13469 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13470 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13471 * spu-low.c (spu_arch_string): Remove.
13472 (spu_target_ops): Remove arch_string initializer.
13473 * win32-low.c (win32_arch_string): Remove.
13474 (win32_target_ops): Remove arch_string initializer.
13475 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13476 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13477 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13479 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13481 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13482 by collect_ptrace_register and supply_ptrace_register hooks.
13483 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13484 instead of checking for the_low_target.left_pad_xfer.
13485 (usr_store_inferior_registers): Use collect_ptrace_register callback
13486 instead of checking for the_low_target.left_pad_xfer.
13488 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13489 (s390_supply_ptrace_register): Likewise.
13490 (s390_fill_gregset): Call s390_collect_ptrace_register.
13491 (the_low_target): Update.
13493 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13494 (ppc_supply_ptrace_register): Likewise.
13495 (the_low_target): Update.
13497 * linux-i386-low.c (the_low_target): Update.
13498 * linux-x86-64-low.c (the_low_target): Update.
13500 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13502 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13503 reg-s390.o and reg-s390x.o.
13505 * linux-low.c (new_inferior): New global variable.
13506 (linux_create_inferior, linux_attach): Set it.
13507 (linux_wait_for_process): Call the_low_target.arch_setup after the
13508 target has stopped for the first time.
13509 (initialize_low): Do not call the_low_target.arch_setup.
13511 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13512 (s390_set_pc): Likewise.
13513 (s390_arch_setup): New function.
13514 (the_low_target): Use s390_arch_setup as arch_setup routine.
13516 * regcache.c (realloc_register_cache): New function.
13517 (set_register_cache): Call it for each existing regcache.
13519 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13521 * server.h (init_registers): Remove prototype.
13523 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13524 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13525 instead of init_registers ().
13526 * linux-arm-low.c (init_registers_arm): Add prototype.
13527 (init_registers_arm_with_iwmmxt): Likewise.
13528 (the_low_target): Add initializer for arch_setup field.
13529 * linux-cris-low.c (init_registers_cris): Add prototype.
13530 (the_low_target): Add initializer for arch_setup field.
13531 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13532 (the_low_target): Add initializer for arch_setup field.
13533 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13534 (the_low_target): Add initializer for arch_setup field.
13535 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13536 (the_low_target): Add initializer for arch_setup field.
13537 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13538 (the_low_target): Add initializer for arch_setup field.
13539 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13540 (the_low_target): Add initializer for arch_setup field.
13541 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13542 (init_registers_mips64_linux): Likewise.
13543 (the_low_target): Add initializer for arch_setup field.
13544 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13545 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13546 (the_low_target): Add initializer for arch_setup field.
13547 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13548 (init_registers_powerpc_64): Likewise.
13549 (the_low_target): Add initializer for arch_setup field.
13550 * linux-s390-low.c (init_registers_s390): Add prototype.
13551 (init_registers_s390x): Likewise.
13552 (the_low_target): Add initializer for arch_setup field.
13553 * linux-sh-low.c (init_registers_sh): Add prototype.
13554 (the_low_target): Add initializer for arch_setup field.
13555 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13556 (the_low_target): Add initializer for arch_setup field.
13557 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13558 (the_low_target): Add initializer for arch_setup field.
13560 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13561 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13562 instead of init_registers ().
13563 * win32-arm-low.c (init_registers_arm): Add prototype.
13564 (the_low_target): Add initializer for arch_setup field.
13565 * win32-i386-low.c (init_registers_i386): Add prototype.
13566 (the_low_target): Add initializer for arch_setup field.
13568 * spu-low.c (init_registers_spu): Add prototype.
13569 (initialize_low): Call initialie_registers_spu () instead of
13570 initialize_registers ().
13572 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13574 * server.c (handle_v_requests): When handling the vRun and vAttach
13575 packets, if already debugging a process, don't kill it. Return an
13578 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13580 * server.c (handle_query): Correct length check.
13582 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13584 * win32-low.c (do_initial_child_stuff): Add process handle
13585 parameter. Set current_process_handle and current_process_id from the
13586 parameters. Clear globals.
13587 (win32_create_inferior): Don't set current_process_handle and
13588 current_process_id here. Instead pass them on the call to
13589 do_initial_child_stuff.
13590 (win32_attach): Likewise.
13591 (win32_clear_inferiors): New.
13592 (win32_kill): Don't close the current process handle or the
13593 current thread handle here. Instead call win32_clear_inferiors.
13594 (win32_detach): Don't open a new handle to the process. Call
13595 win32_clear_inferiors.
13596 (win32_join): Don't rely on current_process_handle; open a new
13597 handle using the process id.
13598 (win32_wait): Call win32_clear_inferiors when the inferior process
13601 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13603 * server.c (monitor_show_help): Add "exit".
13605 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13607 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13608 (clean): Add reg-xtensa.c.
13609 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13610 * configure.srv (xtensa*-*-linux*) New target.
13611 * linux-xtensa-low.c: New.
13612 * xtensa-xtregs.c: New.
13614 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13616 * hostio.c: Don't include errno.h.
13617 (errno_to_fileio_errno): Move to hostio-errno.
13618 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13619 error number outputting to the target->hostio_last_error callback.
13620 (hostio_packet_error): Use FILEIO_EINVAL directly.
13621 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13622 calls to hostio_error.
13623 * hostio-errno.c: New.
13624 * server.h (hostio_last_error_from_errno): Declare.
13625 * target.h (target_ops): Add hostio_last_error member.
13626 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13627 as hostio_last_error handler.
13628 * spu-low.c (spu_target_ops): Likewise.
13629 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13630 (wince_hostio_last_error): New functions.
13631 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13632 as hostio_last_error handler.
13633 (win32_target_ops) [!_WIN32_WCE]: Register
13634 hostio_last_error_from_errno as hostio_last_error handler.
13635 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13636 (hostio-errno.o): New rule.
13637 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13638 * configure.srv (srv_hostio_err_objs): New variable. Default to
13640 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13641 * configure: Regenerate.
13643 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13645 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13646 (linux_kill, linux_detach): Clean up the process list.
13647 * remote-utils.c (remote_open): Improve port number parsing.
13648 (putpkt_binary, input_interrupt): Only send interrupts if the target
13650 * server.c (extended_protocol): Make static.
13651 (attached): Define earlier.
13652 (exit_requested, response_needed, program_argv): New variables.
13653 (target_running): New.
13654 (start_inferior): Clear attached here.
13655 (attach_inferior): Set attached here.
13656 (require_running): Define.
13657 (handle_query): Use require_running and target_running. Implement
13659 (handle_v_attach, handle_v_run): New.
13660 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13661 (gdbserver_usage): Update.
13662 (main): Redo argument parsing. Handle --debug and --multi. Handle
13663 --attach along with other options or after the port. Save
13664 program_argv. Support no initial program. Resynchronize
13665 communication with GDB after an error. Handle "monitor exit".
13666 Use require_running and target_running. Always allow the extended
13667 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13668 restart in extended mode.
13669 * README: Refer to the GDB manual. Update --attach usage.
13671 2007-12-20 Andreas Schwab <schwab@suse.de>
13673 * linux-low.c (STACK_SIZE): Define.
13674 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13675 (linux_test_for_tracefork): Likewise.
13677 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13679 * linux-low.c (linux_wait_for_event): Update messages. Do not
13680 reinsert auto-delete breakpoints.
13681 * mem-break.c (struct breakpoint): Change return type of handler to
13683 (set_breakpoint_at): Update handler type.
13684 (reinsert_breakpoint_handler): Return 1 instead of calling
13686 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13688 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13689 * mem-break.h (set_breakpoint_at): Update handler type.
13690 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13691 * win32-low.c (auto_delete_breakpoint): New.
13692 (get_child_debug_event): Use it.
13694 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13696 * configure.ac: Check for pread and pwrite.
13697 * hostio.c (handle_pread): Fall back to lseek and read.
13698 (handle_pwrite): Fall back to lseek and write.
13699 * config.in, configure: Regenerated.
13701 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13703 * server.c (myresume): Add own_buf argument.
13704 (main): Update calls.
13706 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13708 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13709 * remote-utils.c (remote_open): Do not call disable_async_io.
13710 (block_async_io): Delete.
13711 (unblock_async_io): Make static.
13712 (initialize_async_io): New.
13713 * server.c (handle_v_cont): Handle async I/O here.
13714 (myresume): Likewise. Move other common resume tasks here...
13715 (main): ... from here. Call initialize_async_io. Disable async
13716 I/O before the main loop.
13717 * server.h (initialize_async_io): Declare.
13718 (block_async_io, unblock_async_io): Delete prototypes.
13719 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13721 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13723 * remote-utils.c (readchar): Allow binary data in received messages.
13725 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13727 * win32-low.c (attaching): New global.
13728 (win32_create_inferior): Clear the `attaching' global.
13729 (win32_attach): Set the `attaching' global.
13730 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13731 attaching. Only set a breakpoint at the entry point if not
13734 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13736 * server.c (main): Don't report dll events on the initial
13737 connection on attaches.
13739 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13741 * server.c (main): Relax numerical bases supported for the pid of
13742 the --attach command line argument.
13744 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13746 * win32-low.c (win32_attach): Call OpenProcess before
13747 DebugActiveProcess, not after. Add last error output to error
13750 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13752 * win32-low.c (win32_get_thread_context)
13753 (win32_set_thread_context): New functions.
13754 (thread_rec): Use win32_get_thread_context.
13755 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13756 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13759 2007-12-03 Leo Zayas
13760 Pedro Alves <pedro_alves@portugalmail.pt>
13762 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13764 (child_add_thread): Minor cleanup.
13765 (child_continue): Resume artificially suspended threads before
13766 calling ContinueDebugEvent.
13767 (suspend_one_thread): New.
13768 (fake_breakpoint_event): New.
13769 (get_child_debug_event): Change return type to int. Check here if
13770 gdb sent an interrupt request. If a soft interrupt was requested,
13771 fake a breakpoint event. Return 0 if there is no event to handle,
13773 (win32_wait): Don't check here if gdb sent an interrupt request.
13774 Ensure there is a valid event to handle.
13775 (win32_request_interrupt): Add soft interruption method as last
13778 2007-12-03 Leo Zayas
13779 Pedro Alves <pedro_alves@portugalmail.pt>
13781 * win32-low.h (win32_thread_info): Add descriptions to the
13782 structure members. Replace `suspend_count' counter by a
13784 * win32-low.c (thread_rec): Update condition of when to get the
13785 context from the inferior. Rely on ContextFlags being set if it
13786 has already been retrieved. Only suspend the inferior thread if
13787 we haven't already. Warn if that fails.
13788 (continue_one_thread): s/suspend_count/suspended/. Only call
13789 ResumeThread once. Warn if that fails.
13791 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13793 * win32-low.c (win32_wait): Don't read from the inferior when it
13794 has already exited.
13796 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13798 * Makefile.in (win32_low_h): New variable.
13799 (win32-low.o): Add dependency on $(win32_low_h).
13800 (win32-arm-low.o, win32-i386-low.o): New rules.
13802 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13804 * hostio.c: Correct copyright year.
13806 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13808 * Makefile.in (OBS): Add hostio.o.
13809 (hostio.o): New rule.
13810 * server.h (handle_vFile): Declare.
13811 * hostio.c: New file.
13812 * server.c (handle_v_requests): Take packet_len and new_packet_len
13813 for binary packets. Call handle_vFile.
13814 (main): Update call to handle_v_requests.
13816 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13818 * linux-low.c: Include <sched.h>.
13820 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13822 * linux-low.c (linux_tracefork_grandchild): New.
13823 (linux_tracefork_child): Use clone.
13824 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13826 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13828 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13830 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13832 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13834 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13836 * inferiors.c (change_inferior_id): Delete.
13837 (add_pid_to_list, pull_pid_from_list): New.
13838 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13839 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13840 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13841 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13842 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13843 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13844 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13845 (using_threads): Always set to 1.
13846 (handle_extended_wait): New.
13847 (add_process): Do not set TID.
13848 (linux_create_inferior): Set must_set_ptrace_flags.
13849 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13850 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13851 (linux_thread_alive): Rename TID argument to LWPID.
13852 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13853 (linux_wait_for_event): Do not use TID or check using_threads. Update
13854 call to dead_thread_notify. Call handle_extended_wait.
13855 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13856 (send_sigstop): Delete sigstop_sent.
13857 (wait_for_sigstop): Avoid TID.
13858 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13859 (linux_test_for_tracefork): New.
13860 (linux_lookup_signals): Use thread_db_active and
13861 linux_supports_tracefork_flag.
13862 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13863 * linux-low.h (get_process_thread): Avoid TID.
13864 (struct process_ifo): Move thread_known and tid to the end. Remove
13866 (linux_attach_lwp, thread_db_init): Update prototypes.
13867 * server.h (change_inferior_id): Delete prototype.
13868 (add_pid_to_list, pull_pid_from_list): New prototypes.
13869 * thread-db.c (thread_db_use_events): New.
13870 (find_first_thread): Rename to...
13871 (find_one_thread): ...this. Update callers and messages. Do not
13872 call fatal. Check thread_db_use_events. Do not call
13873 change_inferior_id or new_thread_notify.
13874 (maybe_attach_thread): Update. Do not call new_thread_notify.
13875 (thread_db_init): Set thread_db_use_events. Check use_events.
13876 * utils.c (fatal, warning): Correct message prefix.
13878 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13880 * Makefile.in (clean): Remove new files.
13881 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13882 (powerpc-64.o, powerpc-64.c): New rules.
13883 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13884 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13886 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13888 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13889 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13890 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13891 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13892 (target_regsets): Add AltiVec and SPE register sets.
13893 * configure.ac: Check for AltiVec and SPE.
13894 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13895 (ppc_fill_vrregset, ppc_store_vrregset): New.
13896 (target_regsets): Add AltiVec register set.
13897 * configure: Regenerated.
13899 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13901 * linux-low.c (O_LARGEFILE): Define.
13902 (linux_read_memory): Use /proc/PID/mem.
13903 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13904 * configure, config.in: Regenerated.
13906 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13908 * linux-low.c (linux_wait_for_event): Do not pass signals while
13911 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13913 * win32-low.c (create_process): New.
13914 (win32_create_inferior): Use create_process instead of
13915 CreateProcess. If create_process failed retry appending an ".exe"
13916 suffix. Store the GetLastError result immediatelly after
13917 create_process calls and use it on the call to error.
13919 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13921 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13923 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13925 * configure.ac: Switch license to GPLv3.
13927 2007-08-01 Michael Snyder <msnyder@access-company.com>
13929 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13931 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13933 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13935 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13936 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13937 CloseToolhelp32Snapshot.
13938 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13939 CloseToolhelp32Snapshot.
13941 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13943 * server.c (main): Check for inferior exit before main loop.
13945 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13947 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13948 instead of on tmp_desc.
13950 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13951 Daniel Jacobowitz <dan@codesourcery.com>
13953 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13954 (add_thread): Minor cleanups.
13955 (clear_inferiors): Move lower in the file. Clear the DLL
13957 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13958 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13959 (xml_escape_text): New.
13960 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13962 (handle_v_cont): Report errors.
13963 (gdbserver_version): Update.
13964 (main): Correct size of own_buf. Do not report initial DLL events.
13965 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13966 (unloaded_dll, xml_escape_text): New.
13967 * win32-low.c (enum target_waitkind): Update comments.
13968 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13969 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13970 (win32_EnumProcessModules, win32_GetModuleInformation)
13971 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13972 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13973 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13974 (win32_Module32First, win32_Module32Next, load_toolhelp)
13975 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13976 (get_child_debug_event): Handle DLL events.
13977 (win32_wait): Likewise.
13979 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13981 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13982 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13984 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13986 * win32-low.c (handle_output_debug_string): Ignore event if not
13989 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13991 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13993 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13995 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13997 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13999 * inferiors.c (change_inferior_id): Add comment.
14000 * linux-low.c (check_removed_breakpoint): Add an early
14001 prototype. Improve debug output.
14002 (linux_attach): Doc update.
14003 (linux_detach_one_process, linux_detach): Clean up before releasing
14005 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14006 * linux-low.h (struct process_info): Doc improvement.
14007 * mem-break.c (delete_all_breakpoints): New.
14008 * mem-break.h (delete_all_breakpoints): New prototype.
14009 * thread-db.c (find_first_thread): New.
14010 (thread_db_create_event): Call it instead of
14011 thread_db_find_new_threads. Clean up unused variables.
14012 (maybe_attach_thread): Remove first thread handling.
14013 (thread_db_find_new_threads): Use find_first_thread.
14014 (thread_db_get_tls_address): Likewise.
14016 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14018 * thread-db.c (thread_db_find_new_threads): Add prototype.
14019 (thread_db_create_event): Check for the main thread before adding
14021 (maybe_attach_thread): Only enable event reporting if TID == 0.
14022 (thread_db_get_tls_address): Check for new threads.
14024 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14026 * linux-low.c (linux_create_inferior): Try execv before execvp.
14027 * spu-low.c (spu_create_inferior): Likewise.
14029 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14031 * linux-low.c (linux_create_inferior): Change execv to execvp.
14032 * spu-low.c (spu_create_inferior): Likewies.
14034 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14036 * Makefile.in (clean): Clean new files instead of deleted ones.
14037 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14038 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14040 * configure.srv: Specify XML files and new regformats for MIPS and
14042 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14043 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14044 an entry for the restart register.
14045 (mips_cannot_fetch_register, mips_cannot_store_register)
14046 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14047 register names to match the XML descriptions.
14048 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14049 restart register instead of $0.
14051 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14052 Markus Deuling <deuling@de.ibm.com>
14054 * remote-utils.c (decode_xfer_write): New function.
14055 * server.h (decode_xfer_write): Add prototype.
14056 * server.c (handle_query): Add PACKET_LEN argument. Support
14057 qXfer:spu:read and qXfer:spu:write packets.
14058 (main): Pass packet_len to handle_query.
14059 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14060 * target.h (target_ops): Add qxfer_spu.
14062 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14064 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14065 accessing non-seekable spufs files.
14067 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14069 * server.c (handle_query): Add reply for qC packet.
14071 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14072 Leo Zayas <lerele@champenstudios@com>
14074 * server.h (check_remote_input_interrupt_request): New function.
14075 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14076 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14077 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14078 (check_remote_input_interrupt_request): New function.
14079 * server.h (check_remote_input_interrupt_request): Declare.
14080 * win32-low.c (winapi_DebugBreakProcess,
14081 winapi_GenerateConsoleCtrlEvent): New typedefs.
14082 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14084 (win32_wait): Check for remote interrupt request
14085 with check_remote_input_interrupt_request.
14086 (win32_request_interrupt): New function.
14087 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14089 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14091 * win32-low.c (debug_registers_changed,
14092 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14093 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14094 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14095 (thread_rec): Get context using the low target.
14096 (child_add_thread): Call thread_added on the low target,
14097 which does the same thing.
14099 (do_initial_child_stuff): Remove debug registers references.
14100 Set context using the low target. Resume threads after
14101 setting the contexts.
14102 (child_continue): Remove dead variable. Remove debug
14103 registers references.
14104 (child_fetch_inferior_registers): Go through the low target.
14105 (do_child_store_inferior_registers): Remove.
14106 (child_store_inferior_registers): Go through the low target.
14107 (win32_resume): Remove debug registers references.
14108 Set context using the low target.
14109 (handle_exception): Change return type to void. Don't record
14110 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14111 first chance exception.
14112 (get_child_debug_event): Change return type to void. Remove
14113 goto loop. Always return after waiting for debug event.
14114 (win32_wait): Convert to switch statement. Handle spurious
14117 * win32-i386-low.c (debug_registers_changed,
14118 debug_registers_used): New.
14119 (initial_stuff): Rename to ...
14120 (i386_initial_stuff): ... this. Clear debug registers
14122 (store_debug_registers): Delete.
14123 (i386_get_thread_context): New.
14124 (load_debug_registers): Delete.
14125 (i386_set_thread_context): New.
14126 (i386_thread_added): New.
14127 (single_step): Rename to ...
14128 (i386_single_step): ... this.
14129 (do_fetch_inferior_registers): Rename to ...
14130 (i386_fetch_inferior_register): ... this.
14131 (i386_store_inferior_register): New.
14132 (the_low_target): Adapt to new interface.
14134 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14135 (arm_get_thread_context): New.
14136 (arm_set_thread_context): New.
14138 (do_fetch_inferior_registers): Rename to ...
14139 (arm_fetch_inferior_register): ... this.
14140 (arm_store_inferior_register): New.
14141 (arm_wince_breakpoint): Reimplement as unsigned long.
14142 (arm_wince_breakpoint_len): Define.
14143 (the_low_target): Adapt to new interface.
14145 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14146 load_debug_registers. Add get_thread_context, set_thread_context,
14147 thread_added and store_inferior_register. Rename
14148 fetch_inferior_registers to fetch_inferior_register.
14149 (regptr): Remove declaration.
14151 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14153 * linux-low.c (linux_detach): Change return type to int. Return 0.
14154 * spu-low.c (spu_detach): Likewise.
14156 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14158 * target.h (target_ops): Change return type of detach to int.
14160 (join_inferior): New.
14161 * server.c (main): Don't skip detach support on mingw32.
14162 If the inferior doesn't support detaching return error.
14163 Call join_inferior instead of using waitpid.
14164 * linux-low.c (linux_join): New.
14165 (linux_target_op): Add linux_join.
14166 * spu-low.c (spu_join): New.
14167 (spu_target_ops): Add spu_join.
14168 * win32-low.c (win32_detach): Adapt to new interface.
14169 Reopen current_process_handle before detaching. Issue a child
14170 resume before detaching.
14172 (win32_target_op): Add win32_join.
14174 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14176 * win32-low.c (win32-attach): Fix return value.
14177 * target.h (target_ops): Describe ATTACH return values.
14179 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14181 * win32-low.c (GETPROCADDRESS): Define.
14182 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14183 (winapi_DebugSetProcessKillOnExit): Likewise.
14184 (win32_create_inferior): Force usage of ansi CreateProcessA.
14185 (win32_attach): Use GETPROCADDRESS.
14186 (win32_detach): Likewise.
14188 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14190 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14192 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14194 * win32-low.c: Commit leftover changes from 2007-03-29.
14196 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14198 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14199 fields short instead of int. Add explicit padding.
14200 (i387_cache_to_fsave): Remove unnecessary casts.
14201 (i387_fsave_to_cache): Doc fix.
14202 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14204 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14206 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14207 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14209 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14211 * configure.srv (arm*-*-mingw32ce*): Move near the other
14214 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14216 * configure.ac: Add errno checking.
14217 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14218 sys/file.h and malloc.h.
14219 (AC_CHECK_DECLS): Add perror.
14220 (srv_mingwce): Handle.
14221 * configure.srv (i[34567]86-*-cygwin*): Add
14222 win32-i386-low.o to srv_tgtobj.
14223 (i[34567]86-*-mingw*): Likewise.
14224 (arm*-*-mingw32ce*): Add case.
14225 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14226 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14227 [__MINGW32CE__] (strerror): New function.
14228 [__MINGW32CE__] (errno): Define to GetLastError.
14229 [__MINGW32CE__] (COUNTOF): New macro.
14230 (remote_open): Remove extra close call.
14231 * mem-break.c (delete_breakpoint_at): New function.
14232 * mem-break.h (delete_breakpoint_at): Declare.
14233 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14234 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14235 [USE_WIN32API] (read, write): Add char* casts.
14236 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14237 * server.h: Include wincecompat.h on Windows CE.
14238 [HAVE_ERRNO_H]: Check.
14239 (perror): Declare if not declared.
14240 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14241 (perror_with_name): Remove errno declaration.
14242 * wincecompat.h: New.
14243 * wincecompat.c: New.
14244 * win32-low.h: New.
14245 * win32-arm-low.c: New.
14246 * win32-i386-low.c: New.
14247 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14248 (OUTMSG2): Make it safe.
14250 (COUNTOF): New macro.
14251 (NUM_REGS): Get it from the low target.
14252 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14253 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14254 (thread_rec): Let low target handle debug registers.
14255 (child_add_thread): Likewise.
14256 (child_init_thread_list): Likewise.
14257 (continue_one_thread): Likewise.
14259 (do_child_fetch_inferior_registers): Move to ...
14260 * win32-i386-low.c: ... here, and rename to ...
14261 (do_fetch_inferior_registers): ... this.
14262 * win32-low.c (child_fetch_inferior_registers):
14263 Go through the low target.
14264 (do_child_store_inferior_registers): Use regptr.
14265 (strwinerror): New function.
14266 (win32_create_inferior): Handle Windows CE.
14267 Use strwinerror instead of strerror on Windows error
14268 codes. Add program to the error output.
14269 Don't close the main thread handle on Windows CE.
14270 (win32_attach): Use coredll.dll on Windows CE.
14271 (win32_kill): Close current process and current
14273 (win32_detach): Use coredll.dll on Windows CE.
14274 (win32_resume): Let low target handle debug registers, and
14276 (handle_exception): Add/Remove initial breakpoint. Avoid
14277 non-existant WSTOPSIG on Windows CE.
14278 (win32_read_inferior_memory): Cast to remove warning.
14279 (win32_arch_string): Go through the low target.
14280 (initialize_low): Call set_breakpoint_data with the low
14281 target's breakpoint.
14282 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14283 FOP_REGNUM, mappings): Move to ...
14284 * win32-i386-low.c: ... here.
14285 * win32-low.c (win32_thread_info): Move to ...
14286 * win32-low.h: ... here.
14287 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14288 win32-arm-low.c and wincecompat.c.
14289 (all:): Add $EXEEXT.
14290 (install-only:): Likewise.
14291 (gdbserver:): Likewise.
14292 (gdbreplay:): Likewise.
14293 * config.in: Regenerate.
14294 * configure: Regenerate.
14296 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14298 * win32-low.c: Rename typedef thread_info to
14299 win32_thread_info throughout.
14301 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14303 * win32-i386-low.c: Rename to ...
14304 * win32-low.c: ... this.
14305 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14306 * Makefile.in: Likewise.
14308 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14310 * remote-utils.c (monitor_output): Constify msg parameter.
14311 * server.h (monitor_output): Likewise.
14312 * win32-i386-low.c (handle_output_debug_string): New.
14313 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14314 handle_output_debug_string.
14315 (get_child_debug_event): Likewise.
14317 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14319 * server.c (main): Correct strtoul check.
14321 2007-03-27 Jon Ringle <jon@ringle.org>
14323 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14325 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14327 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14329 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14331 * terminal.h: Check HAVE_SGTTY_H.
14333 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14335 * remote-utils.c (remote_open): Print out the assigned port number.
14337 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14339 * remote-utils.c (monitor_output): New function.
14340 * server.c (debug_threads): Define here.
14341 (monitor_show_help): New function.
14342 (handle_query): Handle qRcmd.
14343 (main): Do not handle 'd' packet.
14344 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14345 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14348 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14350 * Makefile.in (EXEEXT): New.
14351 (clean): Use $(EXEEXT).
14353 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14355 * target.h (target_ops): Rename send_signal to request_interrupt,
14356 and remove enum target_signal parameter.
14357 * linux-low.c (linux_request_interrupt): Rename from
14358 linux_send_signal, and always send SIGINT.
14359 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14360 and always send SIGINT.
14361 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14363 (input_interrupt): Likewise.
14365 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14367 * server.c (get_features_xml): Check if target implemented
14369 * win32-i386-low.c (win32_arch_string): New.
14370 (win32_target_ops): Add win32_arch_string as arch_string member.
14372 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14374 * spu-low.c (spu_arch_string): New.
14375 (spu_target_ops): Add spu_arch_string.
14377 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14379 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14380 * configure.ac: Do not check for terminal.h.
14381 * configure, config.in: Regenerated.
14383 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14385 * Makefile.in (OBS): Add $(XML_BUILTIN).
14386 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14388 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14389 (arm-with-iwmmxt.c): New.
14390 * config.in, configure: Regenerate.
14391 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14392 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14393 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14394 (arm*-*-linux*): Add iWMMXt and regset support.
14395 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14396 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14397 (arm_store_wmmxregset, target_regsets): New.
14398 * server.c (get_features_xml): Take annex argument. Check builtin
14400 (handle_query): Handle multiple annexes.
14402 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14404 * remote-utils.c [USE_WIN32API] (read, write): Define.
14405 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14408 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14410 * linux-i386-low.c (the_low_target): Set arch_string.
14411 * linux-x86-64-low.c (the_low_target): Likewise.
14412 * linux-low.c (linux_arch_string): New.
14413 (linux_target_ops): Add it.
14414 * linux-low.h (struct linux_target_ops): Add arch_string.
14415 * server.c (write_qxfer_response): Use const void * for DATA.
14416 (get_features_xml): New.
14417 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14418 * target.h (struct target_ops): Add arch_string method.
14420 2007-01-03 Denis Pilat <denis.pilat@st.com>
14421 Daniel Jacobowitz <dan@codesourcery.com>
14423 * linux-low.c (linux_kill): Handle being called with no threads.
14424 * win32-i386-low.c (win32_kill): Likewise.
14425 (get_child_debug_event): Clear current_process_handle.
14427 2006-12-30 Denis PILAT <denis.pilat@st.com>
14428 Daniel Jacobowitz <dan@codesourcery.com>
14430 * remote-utils.c (remote_open): Check the type of specified
14431 serial port devices before opening them.
14432 * server.c (main): Kill the inferior if an error occurs during
14433 the first remote_open.
14435 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14437 * README: Update supported targets.
14439 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14441 * Makefile.in (clean): Remove reg-mips64.c.
14442 (reg-mips64.c, reg-mips64.o): New rules.
14443 * configure.srv: Handle mips64. Include regset support for mips.
14444 * linux-mips-low.c (union mips_register): New.
14445 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14446 (mips_breakpoint, mips_breakpoint_at): Use int.
14447 (mips_collect_register, mips_supply_register)
14448 (mips_collect_register_32bit, mips_supply_register_32bit)
14449 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14450 (mips_store_fpregset, target_regsets): New.
14451 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14453 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14455 * configure.srv: Add target "spu*-*-*".
14456 * Makefile.in (clean): Remove reg-spu.c.
14457 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14458 * spu-low.c: New file.
14460 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14462 * configure.ac: Correct td_thr_tls_get_addr test.
14463 * configure: Regenerated.
14465 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14467 * linux-low.c (linux_wait_for_event): Reformat. Use the
14468 pass_signals array.
14469 * remote-utils.c (decode_address_to_semicolon): New.
14470 * server.c (pass_signals, handle_general_set): New.
14471 (handle_query): Mention QPassSignals for qSupported.
14472 (main): Call handle_general_set.
14473 * server.h (pass_signals, decode_address_to_semicolon): New.
14475 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14477 * server.c (handle_query): Correct error handling for read_auxv.
14479 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14481 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14482 and srv_linux_thread_db to yes.
14483 * linux-s390-low.c (s390_fill_gregset): New function.
14484 (target_regsets): Define data structure.
14486 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14488 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14489 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14490 * config.in, configure: Regenerated.
14491 * inferiors.c (gdb_id_to_thread): New function.
14492 (gdb_id_to_thread_id): Use it.
14493 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14494 * linux-low.h (struct process_info): Add th member.
14495 (thread_db_get_tls_address): New prototype.
14496 * remote-utils.c (decode_address): Make non-static.
14497 * server.c (handle_query): Handle qGetTLSAddr.
14498 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14499 * target.h (struct target_ops): Add get_tls_address.
14500 * thread-db.c (maybe_attach_thread): Save the thread handle.
14501 (thread_db_get_tls_address): New.
14503 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14505 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14506 (linux_resume_one_process): Take a siginfo_t *. Update all
14507 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14508 (struct pending_signals): Add a siginfo_t.
14509 (linux_wait_for_process): Always set last_status.
14510 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14511 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14512 * linux-low.h (struct process_info): Add last_status.
14514 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14516 * remote-utils.c (try_rle): New function.
14517 (putpkt_binary): Use it.
14519 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14521 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14522 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14523 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14524 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14525 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14528 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14530 * server.c (terminal_fd): New variable.
14531 (old_foreground_pgrp): Likewise.
14532 (restore_old_foreground_pgrp): New function.
14533 (start_inferior): Record the terminal file descriptor in terminal_fd
14534 and its original foreground group in old_foreground_pgrp. Register
14535 restore_old_foreground_pgrp with atexit().
14537 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14539 * server.c (handle_query): Correct qPart to qXfer.
14541 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14543 * configure.ac: Check for more headers which are missing on
14544 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14545 * configure.srv: Add Cygwin and mingw32.
14546 * remote-utils.c: Don't include headers unconditionally which
14547 are missing on mingw32. Include <winsock.h> for mingw32.
14548 (remote_open): Adjust for mingw32 support. Flush
14549 standard error after writing to it.
14550 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14551 (unblock_async_io, enable_async_io, disable_async_io)
14552 (readchar, getpkt): Update for Winsock support.
14553 (prepare_resume_reply): Expect a protocol signal number.
14554 * server.c: Disable <sys/wait.h> on mingw32.
14555 (start_inferior): Adjust for mingw32 support. Flush
14556 standard error after writing to it.
14557 (attach_inferior): Likewise. Use protocol signal
14559 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14561 * win32-i386-low.c: New file.
14562 * Makefile.in (XM_CLIBS): Set.
14563 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14564 (win32-i386-low.o): New dependency rule.
14565 * linux-low.c (linux_wait): Use target signal numbers.
14566 * target.h (struct target_ops): Doc fix.
14567 * server.h (target_signal_to_name): New prototype.
14568 * gdbreplay.c: Don't include headers unconditionally which
14569 are missing on mingw32. Include <winsock.h> for mingw32.
14570 (remote_close, remote_open): Adjust for Winsock support.
14571 * configure, config.in: Regenerated.
14573 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14575 * server.c (decode_xfer_read, write_qxfer_response): New.
14576 (handle_query): Take a packet length argument. Handle
14577 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14578 the qSupported response.
14579 (main): Update call to handle_query.
14581 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14583 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14584 (putpkt_binary): Renamed from putpkt and adjusted for binary
14586 (putpkt): New wrapper for putpkt_binary.
14587 (readchar): Don't mask off the high bit.
14588 (decode_X_packet): New function.
14589 * server.c (main): Call putpkt_binary if a handler sets the packet
14590 length. Save the length of the incoming packet. Handle 'X'.
14591 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14593 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14595 * server.c (handle_query): Handle qSupported.
14597 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14599 * remote-utils.c (all_symbols_looked_up): New variable.
14600 (look_up_one_symbol): Check it.
14601 * server.h (look_up_one_symbol): New declaration.
14602 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14604 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14606 * Makefile.in (linux-arm-low.o): Update dependencies.
14607 * linux-arm-low.c: Include "gdb_proc_service.h".
14608 (PTRACE_GET_THREAD_AREA): Define.
14609 (ps_get_thread_area): New function.
14611 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14613 * configure.srv (m68k*-*-uclinux*): New target.
14614 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14615 (linux_resume_one_process): Remove extraneous cast.
14616 (linux_read_offsets): New.
14617 (linux_target_op): Add linux_read_offsets on mmuless systems.
14618 * server.c (handle_query): Add qOffsets logic.
14619 * target.h (struct target_ops): Add read_offsets.
14621 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14623 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14624 (PTRACE_GET_THREAD_AREA): Define.
14625 (ps_get_thread_area): New function.
14626 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14627 (linux-x86-64-low.o): Update.
14629 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14631 * configure.ac: Remove checks for prfpregset_t.
14632 * gdb_proc_service.h: New file.
14633 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14634 new "gdb_proc_service.h".
14635 * proc-service.c: Likewise.
14636 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14637 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14638 * Makefile.in (gdb_proc_service_h): Updated.
14639 * configure, config.in: Regenerated.
14641 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14643 * remote-utils.c (prepare_resume_reply): Move declaration
14644 of gdb_id_from_wait to the top of the block.
14646 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14648 * linux-low.c (regsets_store_inferior_registers): Read the regset
14649 from the target before filling it.
14651 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14653 * server.c (attach_inferior): Return SIGTRAP for a successful
14656 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14658 * Makefile.in (OBS): Add version.o.
14659 (STAGESTUFF): Delete.
14660 (version.o): Add dependencies.
14661 (version.c): Replace rule.
14662 (clean): Remove version.c.
14663 * server.c (gdbserver_version): New.
14664 (gdbserver_usage): Use printf.
14665 (main): Handle --version and --help.
14666 * server.h (version, host_name): Add declarations.
14668 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14680 * linux-x86-64-low.c:
14682 * linux-s390-low.c:
14683 * linux-ppc64-low.c:
14685 * linux-mips-low.c:
14686 * linux-m68k-low.c:
14687 * linux-m32r-low.c:
14690 * linux-ia64-low.c:
14691 * linux-i386-low.c:
14692 * linux-crisv32-low.c:
14704 * gdbserver.1: Add (C) after Copyright. Update the FSF
14707 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14709 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14710 (arm_breakpoint_at): Recognize both breakpoints.
14711 (the_low_target): Use the correct breakpoint instruction.
14713 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14715 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14716 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14717 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14718 (the_low_target): Update.
14720 2005-10-25 Andreas Schwab <schwab@suse.de>
14722 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14724 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14725 (ia64_num_regs): Reduce to 462.
14727 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14729 * acinclude.m4: Correct quoting.
14730 * aclocal.m4: Regenerated.
14732 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14733 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14734 (thread_db_init): Call thread_db_err_str.
14735 * configure.ac: Check for TD_VERSION.
14736 * config.in, configure: Regenerated.
14738 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14740 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14742 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14744 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14745 is not available. Define HAVE_PTRACE_GETREGS if it is.
14746 * config.in, configure: Regenerated.
14747 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14748 * linux-i386-low.c, linux-m68k-low.c: Update to use
14749 HAVE_PTRACE_GETREGS.
14750 * linux-low.c (regsets_fetch_inferior_registers)
14751 (regsets_store_inferior_registers): Only return 0 if we processed
14753 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14754 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14756 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14758 * inferiors.c (struct thread_info): Add gdb_id.
14759 (add_thread): Add gdb_id argument.
14760 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14761 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14762 calls to add_thread.
14763 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14764 * server.c (handle_query): Use thread_to_gdb_id.
14765 (handle_v_cont, main): Use gdb_id_to_thread_id.
14766 * server.h (add_thread): Update prototype.
14767 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14770 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14772 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14773 left-padded registers.
14774 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14775 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14777 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14779 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14780 * configure: Regenerate.
14781 * config.in: Regenerate.
14782 * server.h (NEED_DECLARATION_STRERROR):
14783 Replace with !HAVE_DECL_STRERROR.
14785 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14787 * linux-low.c (linux_wait, linux_send_signal): Don't test
14788 an unsigned long variable for > 0 if it could be MAX_ULONG.
14789 * server.c (myresume): Likewise.
14790 * target.c (set_desired_inferior): Likewise.
14792 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14794 * configure.ac: Simplify and improve check for socklen_t.
14795 * configure, config.in: Regenerate.
14797 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14799 * acconfig.h: Remove.
14800 * configure.ac: Add a test for socklen_t. Use three-argument
14801 AC_DEFINE throughout.
14802 * config.in: Regenerated using autoheader 2.59.
14803 * configure: Regenerated.
14805 * gdbreplay.c (socklen_t): Provide a default.
14806 (remote_open): Use socklen_t.
14807 * remote-utils.c (socklen_t): Provide a default.
14808 (remote_open): Use socklen_t.
14809 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14812 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14814 * linux-low.c (linux_read_memory, linux_write_memory)
14815 (linux_read_auxv): Likewise.
14816 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14817 (check_mem_write): Likewise.
14818 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14820 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14821 (registers_from_string, register_data): Likewise.
14822 * server.c (handle_query, main): Likewise.
14823 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14824 (decode_M_packet): Likewise.
14825 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14826 * target.h (struct target_ops): Update read_memory, write_memory,
14828 (read_inferior_memory, write_inferior_memory): Update.
14829 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14830 to unsigned char *.
14831 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14832 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14833 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14834 linux-s390-low.c, linux-sh-low.c: Update for changes in
14835 read_inferior_memory and the_low_target->breakpoint.
14837 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14839 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14840 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14841 * configure.srv: Add powerpc64-*-linux*.
14842 * linux-ppc64-low.c: New file.
14844 2005-05-23 Orjan Friberg <orjanf@axis.com>
14846 * linux-cris-low.c: New file with support for CRIS.
14847 * linux-crisv32-low.c: Ditto for CRISv32.
14848 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14849 (clean): Add reg-cris.c and reg-crisv32.c.
14850 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14851 reg-crisv32.o, and reg-crisv32.c to make rules.
14852 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14853 recognized targets.
14855 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14857 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14858 of sizeof (PTRACE_XFER_TYPE).
14859 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14861 2005-05-12 Orjan Friberg <orjanf@axis.com>
14863 * target.h (struct target_ops): Add insert_watchpoint,
14864 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14865 pointers for hardware watchpoint support.
14866 * linux-low.h (struct linux_target_ops): Ditto.
14867 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14868 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14869 to linux_target_ops.
14870 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14872 * server.c (main): Recognize 'Z' and 'z' packets.
14874 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14876 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14877 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14878 (the_low_target): Add new members.
14880 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14882 * proc-service.c (ps_lgetregs): Search all_processes instead of
14885 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14887 * server.c (start_inferior): Change return type to int.
14888 (attach_inferior): Change sigptr to int *.
14889 (handle_v_cont, handle_v_requests): Change signal to int *.
14890 (main): Change signal to int.
14892 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14894 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14895 * configure.srv: Add m32r*-*-linux*.
14896 * linux-m32r-low.c: New file.
14898 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14900 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14902 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14904 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14905 Take unsigned long arguments for PIDs.
14906 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14907 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14908 (wait_for_sigstop, linux_resume_one_process)
14909 (regsets_fetch_inferior_registers, linux_send_signal)
14910 (linux_read_auxv): Likewise. Update the types of variables holding
14911 PIDs. Update format string specifiers.
14912 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14913 * remote-utils.c (prepare_resume_reply): Likewise.
14914 * server.c (cont_thread, general_thread, step_thread)
14915 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14917 (handle_query): Update format specifiers.
14918 (handle_v_cont, main): Use strtoul for thread IDs.
14919 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14920 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14921 (general_thread, step_thread, thread_from_wait)
14922 (old_thread_from_wait): Update.
14923 * target.h (struct thread_resume): Use unsigned long for THREAD.
14924 (struct target_ops): Use unsigned long for arguments to attach and
14927 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14929 * acinclude.m4: Include bfd/bfd.m4 directly.
14930 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14931 <agriffis@toolchain.org>.
14932 * aclocal.m4, configure: Regenerated.
14934 2005-01-07 Andrew Cagney <cagney@gnu.org>
14936 * configure.ac: Rename configure.in, require autoconf 2.59.
14937 * configure: Re-generate.
14939 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14941 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14942 LIBS when finished.
14943 * aclocal.m4: Regenerated.
14944 * configure: Regenerated.
14946 2004-11-21 Andreas Schwab <schwab@suse.de>
14948 * linux-m68k-low.c (m68k_num_gregs): Define.
14949 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14950 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14951 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14952 (m68k_breakpoint_at): New. Add to the_low_target.
14954 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14955 srv_linux_thread_db to yes.
14957 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14959 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14960 (ARCH_SET_FS): Likewise.
14961 (ARCH_GET_FS): Likewise.
14962 (ARCH_GET_GS): Likewise.
14964 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14966 * linux-i386-low.c (ps_get_thread_area): New.
14967 * linux-x86-64-low.c (ps_get_thread_area): New.
14968 * linux-low.c: Include <sys/syscall.h>.
14969 (linux_kill_one_process): Don't kill the first thread here.
14970 (linux_kill): Kill the first thread here.
14971 (kill_lwp): New function.
14972 (send_sigstop, linux_send_signal): Use it.
14973 * proc-service.c: Clean up #ifdefs.
14974 (fpregset_info): Delete.
14975 (ps_lgetregs): Update and enable implementation.
14976 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14978 * remote-utils.c (struct sym_cache, symbol_cache): New.
14979 (input_interrupt): Print a clearer message.
14980 (async_io_enabled): New variable.
14981 (enable_async_io, disable_async_io): Use it. Update comments.
14982 (look_up_one_symbol): Use the symbol cache.
14983 * thread-db.c (thread_db_look_up_symbols): New function.
14984 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14986 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14988 * configure.in: Test for -rdynamic.
14989 * configure: Regenerated.
14990 * Makefile (INTERNAL_LDFLAGS): New.
14991 (gdbserver, gdbreplay): Use it.
14993 2004-09-02 Andrew Cagney <cagney@gnu.org>
14995 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14997 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14999 * linux-low.c (linux_wait): Clear all_processes list also.
15001 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15003 * linux-low.c: Include <errno.h>. Remove extern declaration of
15006 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15008 * gdbreplay.c, server.h, utils.c: Update copyright years.
15010 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15012 * server.c (main): Print child status or termination signal from
15013 variable 'signal', not 'sig'.
15015 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15017 * linux-low.c (linux_read_memory): Change return type to
15018 int. Check for and return error from ptrace().
15019 * target.c (read_inferior_memory): Change return type to int. Pass
15020 back return status from the_target->read_memory().
15021 * target.h (struct target_ops): Adapt *read_memory() prototype.
15023 (read_inferior_memory): Adapt prototype.
15024 * server.c (main): Return an error packet if
15025 read_inferior_memory() returns an error.
15027 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15029 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15030 Unify with other clean targets.
15032 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15034 * server.c (handle_v_cont): Call set_desired_inferior.
15036 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15038 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15040 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15042 * linux-low.c (linux_wait): Unblock async I/O.
15043 (linux_resume): Block and enable async I/O.
15044 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15045 * server.h (block_async_io, unblock_async_io): Add prototypes.
15047 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15049 * remote-utils.c (remote_open): Print a status notice after
15050 opening a TCP port.
15051 * server.c (attach_inferior): Print a status notice after
15054 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15056 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15058 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15060 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15062 * server.c, target.h: Update copyright years.
15064 2004-02-25 Roland McGrath <roland@redhat.com>
15066 * target.h (struct target_ops): New member `read_auxv'.
15067 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15068 * linux-low.c (linux_read_auxv): New function.
15069 (linux_target_ops): Initialize `read_auxv' member to that.
15071 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15073 Committed by Jim Blandy <jimb@redhat.com>.
15075 * linux-s390-low.c (s390_num_regs): Update.
15076 (s390_regmap): Remove control registers. Use __s390x__ predefine
15077 instead of GPR_SIZE to distiguish s390 and s390x targets.
15079 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15081 * linux-low.c: Update copyright year.
15082 (check_removed_breakpoint): Clear pending_is_breakpoint.
15083 (linux_set_resume_request, linux_queue_one_thread)
15084 (resume_status_pending_p): New functions.
15085 (linux_continue_one_thread): Use process->resume.
15086 (linux_resume): Only resume threads if there are no pending events.
15087 * linux-low.h (struct process_info): Add resume request
15090 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15092 * regcache.c (new_register_cache): Clear the allocated register
15093 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15095 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15097 * linux-low.c (linux_resume): Take a struct thread_resume *
15099 (linux_wait): Update call.
15100 (resume_ptr): New static variable.
15101 (linux_continue_one_thread): Renamed from
15102 linux_continue_one_process. Use resume_ptr.
15103 (linux_resume): Use linux_continue_one_thread.
15104 * server.c (handle_v_cont, handle_v_requests): New functions.
15105 (myresume): New function.
15106 (main): Handle 'v' case.
15107 * target.h (struct thread_resume): New type.
15108 (struct target_ops): Change argument of "resume" to struct
15110 (myresume): Delete macro.
15112 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15114 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15115 (uninstall): Support DESTDIR.
15117 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15119 * configure.srv: Add xscale*linux copy of arm*linux entry.
15121 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15123 * linux-arm-low.c (arm_reinsert_addr): New function.
15124 (the_low_target): Add arm_reinsert_addr.
15126 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15128 * mem-break.c: Remove whitespace at end of file.
15130 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15132 * configure.in: Check whether we need to prototype strerror.
15133 * server.h: Optionally prototype strerror.
15134 * gdbreplay.c (perror_with_name): Use strerror.
15135 * linux-low.c (linux_attach_lwp): Use strerror.
15136 * utils.c (perror_with_name): Use strerror.
15137 * config.in, configure: Regenerated.
15139 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15141 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15142 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15144 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15146 * Makefile.in (SFILES): Update.
15147 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15148 low-sun3.c: Remove files.
15150 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15152 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15153 (linux_detach_one_process, linux_detach): New functions.
15154 (linux_target_ops): Add linux_detach.
15155 * server.c (main): Handle 'D' packet.
15156 * target.h (struct target_ops): Add "detach" member.
15157 (detach_inferior): Define.
15159 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15161 From Kelley Cook <kelleycook@wideopenwest.com>:
15162 * configure.srv: Accept i[34567]86 variants.
15164 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15166 * linux-low.c (linux_wait_for_event): Correct comment typos.
15167 (linux_resume_one_process): Call check_removed_breakpoint.
15168 (linux_send_signal): New function.
15169 (linux_target_ops): Add linux_send_signal.
15170 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15172 * target.h (struct target_ops): Add send_signal.
15174 2003-05-29 Jim Blandy <jimb@redhat.com>
15176 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15177 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15178 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15179 away part of the register's value.
15181 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15183 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15184 (linux_wait_for_event, linux_init_signals): Likewise.
15186 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15188 * configure.in: Check for stdlib.h.
15189 * configure: Regenerated.
15190 * config.in: Regenerated.
15192 2003-01-04 Andreas Schwab <schwab@suse.de>
15194 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15196 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15198 * Makefile.in: Remove obsolete code.
15200 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15202 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15203 defined(PT_FPR0_HI).
15205 2002-11-17 Stuart Hughes <seh@zee2.com>
15207 * linux-arm-low.c (arm_num_regs): Increase.
15208 (arm_regmap): Include status register.
15210 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15212 * linux-low.c (register_addr): Remove incorrect -1 check.
15214 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15216 * linux-low.c (linux_create_inferior): Call setpgid. Return
15218 (unstopped_p, linux_signal_pid): Remove.
15219 (linux_target_ops): Remove linux_signal_pid.
15220 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15221 global instead of target method.
15222 * target.h (struct target_ops): Remove signal_pid. Update comment
15223 for create_inferior.
15224 * server.c (signal_pid): New variable.
15225 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15226 gdbserver. Set the child to be the foreground process group.
15227 (attach_inferior): Set signal_pid.
15229 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15231 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15233 2002-08-20 Jim Blandy <jimb@redhat.com>
15235 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15238 2002-08-01 Andrew Cagney <cagney@redhat.com>
15240 * Makefile.in: Make chill references obsolete.
15242 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15244 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15245 * configure: Regenerate.
15246 * config.in: Regenerate.
15248 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15250 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15251 (perror_with_name, remote_close, remote_open, expect, play): Static.
15253 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15255 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15256 byte offsets instead of an array of indexes.
15257 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15259 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15261 * regcache.c: Add comment.
15263 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15265 * thread-db.c: New file.
15266 * proc-service.c: New file.
15267 * acinclude.m4: New file.
15268 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15269 proc-service.o, and thread-db.o.
15270 (linux-low.o): Add USE_THREAD_DB.
15271 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15272 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15273 * aclocal.m4: Regenerated.
15274 * config.in: Regenerated.
15275 * configure: Regenerated.
15276 * configure.in: Check for proc_service.h, sys/procfs.h,
15277 thread_db.h, and linux/elf.h headrs.
15278 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15279 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15280 Check for -lthread_db and thread support.
15281 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15282 PowerPC, and SuperH.
15283 * i387-fp.c: Constify arguments.
15284 * i387-fp.h: Likewise.
15285 * inferiors.c: (struct thread_info): Renamed from
15286 `struct inferior_info'. Remove PID member. Use generic inferior
15287 list header. All uses updated.
15288 (inferiors, signal_pid): Removed.
15289 (all_threads): New variable.
15290 (get_thread): Define.
15291 (add_inferior_to_list): New function.
15292 (for_each_inferior): New function.
15293 (change_inferior_id): New function.
15294 (add_inferior): Removed.
15295 (remove_inferior): New function.
15296 (add_thread): New function.
15297 (free_one_thread): New function.
15298 (remove_thread): New function.
15299 (clear_inferiors): Use for_each_inferior and free_one_thread.
15300 (find_inferior): New function.
15301 (find_inferior_id): New function.
15302 (inferior_target_data): Update argument type.
15303 (set_inferior_target_data): Likewise.
15304 (inferior_regcache_data): Likewise.
15305 (set_inferior_regcache_data): Likewise.
15306 * linux-low.c (linux_bp_reinsert): Remove.
15307 (all_processes, stopping_threads, using_thrads)
15308 (struct pending_signals, debug_threads, pid_of): New.
15309 (inferior_pid): Replace with macro.
15310 (struct inferior_linux_data): Remove.
15311 (get_stop_pc, add_process): New functions.
15312 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15313 Use add_process and add_thread.
15314 (linux_attach_lwp): New function, based on old linux_attach. Use
15315 add_process and add_thread. Set stop_expected for new threads.
15316 (linux_attach): New function.
15317 (linux_kill_one_process): New function.
15318 (linux_kill): Kill all LWPs.
15319 (linux_thread_alive): Use find_inferior_id.
15320 (check_removed_breakpoints, status_pending_p): New functions.
15321 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15322 Update. Use WNOHANG. Wait for cloned processes also. Update process
15323 struct for the found process.
15324 (linux_wait_for_event): New function.
15325 (linux_wait): Use it. Support LWPs.
15326 (send_sigstop, wait_for_sigstop, stop_all_processes)
15327 (linux_resume_one_process, linux_continue_one_process): New functions.
15328 (linux_resume): Support LWPs.
15329 (REGISTER_RAW_SIZE): Remove.
15330 (fetch_register): Use register_size instead. Call supply_register.
15331 (usr_store_inferior_registers): Likewise. Call collect_register.
15332 Fix recursive case.
15333 (regsets_fetch_inferior_registers): Improve error message.
15334 (regsets_store_inferior_registers): Add debugging.
15335 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15336 (unstopped_p, linux_signal_pid): New functions.
15337 (linux_target_ops): Add linux_signal_pid.
15338 (linux_init_signals): New function.
15339 (initialize_low): Call it. Initialize using_threads.
15340 * regcache.c (inferior_regcache_data): Add valid
15342 (get_regcache): Fetch registers lazily. Add fetch argument
15343 and update all callers.
15344 (regcache_invalidate_one, regcache_invalidate): New
15346 (new_register_cache): Renamed from create_register_cache.
15347 Return the new regcache.
15348 (free_register_cache): Change argument to a void *.
15349 (registers_to_string, registers_from_string): Call get_regcache
15350 with fetch flag set.
15351 (register_data): Make static. Pass fetch flag to get_regcache.
15352 (supply_register): Call get_regcache with fetch flag clear.
15353 (collect_register): Call get_regcache with fetch flag set.
15354 (collect_register_as_string): New function.
15355 * regcache.h: Update.
15356 * remote-utils.c (putpkt): Flush after debug output and use
15358 Handle input interrupts while waiting for an ACK.
15359 (input_interrupt): Use signal_pid method.
15360 (getpkt): Flush after debug output and use stderr.
15361 (outreg): Use collect_register_as_string.
15362 (new_thread_notify, dead_thread_notify): New functions.
15363 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15364 and general_thread.
15365 (look_up_one_symbol): Flush after debug output.
15366 * server.c (step_thread, server_waiting): New variables.
15367 (start_inferior): Don't use signal_pid. Update call to mywait.
15368 (attach_inferior): Update call to mywait.
15369 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15370 (main): Don't fetch/store registers explicitly. Use
15371 set_desired_inferior. Support proposed ``Hs'' packet. Update
15373 * server.h: Update.
15374 (struct inferior_list, struct_inferior_list_entry): New.
15375 * target.c (set_desired_inferior): New.
15376 (write_inferior_memory): Constify.
15377 (mywait): New function.
15378 * target.h: Update.
15379 (struct target_ops): New signal_pid method.
15380 (mywait): Removed macro, added prototype.
15382 * linux-low.h (regset_func): Removed.
15383 (regset_fill_func, regset_store_func): New.
15384 (enum regset_type): New.
15385 (struct regset_info): Add type field. Use new operation types.
15386 (struct linux_target_ops): stop_pc renamed to get_pc.
15387 Add decr_pc_after_break and breakpoint_at.
15388 (get_process, get_thread_proess, get_process_thread)
15389 (strut process_info, all_processes, linux_attach_lwp)
15390 (thread_db_init): New.
15392 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15393 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15394 (the_low_target): Add new members.
15395 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15396 (i386_store_fpxregset): Constify.
15397 (target_regsets): Add new kind identifier.
15398 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15399 (i386_set_pc): Add debugging.
15400 (i386_breakpoint_at): New function.
15401 (the_low_target): Add new members.
15402 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15403 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15404 (mips_breakpoint_at): New.
15405 (the_low_target): Add new members.
15406 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15407 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15408 (the_low_target): Add new members.
15409 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15410 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15411 (the_low_target): Add new members.
15412 * linux-x86-64-low.c (target_regsets): Add new kind
15415 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15417 From Martin Pool <mbp@samba.org>:
15418 * server.c (gdbserver_usage): New function.
15421 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15423 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15424 stop_at -> stop_pc.
15426 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15428 * Makefile.in: Remove obsolete code.
15430 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15432 * linux-low.c (regsets_fetch_inferior_registers),
15433 (regsets_store_inferior_registers): Removed cast to int from
15435 * regcache.h: Added declaration of struct inferior_info.
15437 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15439 * inferiors.c (struct inferior_info): Add regcache_data.
15440 (add_inferior): Call create_register_cache.
15441 (clear_inferiors): Call free_register_cache.
15442 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15443 * regcache.c (struct inferior_regcache_data): New.
15444 (registers): Remove.
15445 (get_regcache): New function.
15446 (create_register_cache, free_register_cache): New functions.
15447 (set_register_cache): Don't initialize the register cache here.
15448 (registers_to_string, registers_from_string, register_data): Call
15450 * regcache.h: Add prototypes.
15451 * server.h: Likewise.
15453 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15455 * mem-break.c: New file.
15456 * mem-break.h: New file.
15457 * Makefile.in: Add mem-break.o rule; update server.h
15459 * inferiors.c (struct inferior_info): Add target_data
15461 (clear_inferiors): Free target_data member if set.
15462 (inferior_target_data, set_inferior_target_data): New functions.
15463 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15464 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15465 * linux-low.c (linux_bp_reinsert): New variable.
15466 (struct inferior_linux_data): New.
15467 (linux_create_inferior): Use set_inferior_target_data.
15468 (linux_attach): Likewise. Call add_inferior.
15469 (linux_wait_for_one_inferior): New function.
15470 (linux_wait): Call it.
15471 (linux_write_memory): Add const.
15472 (initialize_low): Call set_breakpoint_data.
15473 * linux-low.h (struct linux_target_ops): Add breakpoint
15475 * server.c (attach_inferior): Remove extra add_inferior
15477 * server.h: Include mem-break.h. Update inferior.c
15479 * target.c (read_inferior_memory)
15480 (write_inferior_memory): New functions.
15481 * target.h (read_inferior_memory)
15482 (write_inferior_memory): Change macros to prototypes.
15483 (struct target_ops): Update comments. Add const to write_memory
15486 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15488 * linux-low.c (usr_store_inferior_registers): Support
15489 registers which are allowed to fail to store.
15490 * linux-low.h (linux_target_ops): Likewise.
15491 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15492 (ppc_cannot_store_register): FPSCR may not be storable.
15494 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15496 * server.h: Include <string.h> if HAVE_STRING_H.
15497 * ChangeLog: Correct paths in last ChangeLog entry.
15499 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15501 * linux-low.h: Remove obsolete prototypes.
15502 (struct linux_target_ops): New.
15503 (extern the_low_target): New.
15504 * linux-low.c (num_regs, regmap): Remove declarations.
15505 (register_addr): Use the_low_target explicitly.
15506 (fetch_register): Likewise.
15507 (usr_fetch_inferior_registers): Likewise.
15508 (usr_store_inferior_registers): Likewise.
15509 * linux-arm-low.c (num_regs): Remove.
15510 (arm_num_regs): Define.
15511 (arm_regmap): Renamed from regmap, made static.
15512 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15514 (arm_cannot_store_register): Renamed from cannot_store_register,
15516 (the_low_target): New.
15517 * linux-i386-low.c (num_regs): Remove.
15518 (i386_num_regs): Define.
15519 (i386_regmap): Renamed from regmap, made static.
15520 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15522 (i386_cannot_store_register): Renamed from cannot_store_register,
15524 (the_low_target): New.
15525 * linux-ia64-low.c (num_regs): Remove.
15526 (ia64_num_regs): Define.
15527 (ia64_regmap): Renamed from regmap, made static.
15528 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15530 (ia64_cannot_store_register): Renamed from cannot_store_register,
15532 (the_low_target): New.
15533 * linux-m68k-low.c (num_regs): Remove.
15534 (m68k_num_regs): Define.
15535 (m68k_regmap): Renamed from regmap, made static.
15536 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15538 (m68k_cannot_store_register): Renamed from cannot_store_register,
15540 (the_low_target): New.
15541 * linux-mips-low.c (num_regs): Remove.
15542 (mips_num_regs): Define.
15543 (mips_regmap): Renamed from regmap, made static.
15544 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15546 (mips_cannot_store_register): Renamed from cannot_store_register,
15548 (the_low_target): New.
15549 * linux-ppc-low.c (num_regs): Remove.
15550 (ppc_num_regs): Define.
15551 (ppc_regmap): Renamed from regmap, made static.
15552 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15554 (ppc_cannot_store_register): Renamed from cannot_store_register,
15556 (the_low_target): New.
15557 * linux-s390-low.c (num_regs): Remove.
15558 (s390_num_regs): Define.
15559 (s390_regmap): Renamed from regmap, made static.
15560 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15562 (s390_cannot_store_register): Renamed from cannot_store_register,
15564 (the_low_target): New.
15565 * linux-sh-low.c (num_regs): Remove.
15566 (sh_num_regs): Define.
15567 (sh_regmap): Renamed from regmap, made static.
15568 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15570 (sh_cannot_store_register): Renamed from cannot_store_register,
15572 (the_low_target): New.
15573 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15574 (the_low_target): New.
15576 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15578 * Makefile.in: Add stamp-h target.
15579 * configure.in: Create stamp-h.
15580 * configure: Regenerated.
15582 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15584 * inferiors.c: New file.
15585 * target.c: New file.
15586 * target.h: New file.
15587 * Makefile.in: Add target.o and inferiors.o. Update
15589 * linux-low.c (inferior_pid): New static variable,
15590 moved from server.c.
15591 (linux_create_inferior): Renamed from create_inferior.
15592 Call add_inferior. Return 0 on success instead of a PID.
15593 (linux_attach): Renamed from myattach.
15594 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15595 (linux_thread_alive): Renamed from mythread_alive.
15596 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15598 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15599 (regsets_store_inferior_registers): Correct error message.
15600 Add missing ``return 0''.
15601 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15602 (linux_store_registers): Renamed from store_inferior_registers.
15603 (linux_read_memory): Renamed from read_inferior_memory.
15604 (linux_write_memory): Renamed from write_inferior_memory.
15605 (linux_target_ops): New structure.
15606 (initialize_low): Call set_target_ops ().
15607 * remote-utils.c (unhexify): New function.
15608 (hexify): New function.
15609 (input_interrupt): Send signals to ``signal_pid''.
15610 * server.c (inferior_pid): Remove.
15611 (start_inferior): Update create_inferior call.
15612 (attach_inferior): Call add_inferior.
15613 (handle_query): New function.
15614 (main): Call handle_query for `q' packets.
15615 * server.h: Include "target.h". Remove obsolete prototypes.
15616 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15618 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15620 * Makefile.in: Add WARN_CFLAGS. Update configury
15622 * configure.in: Check for <string.h>
15623 * configure: Regenerate.
15624 * config.in: Regenerate.
15625 * gdbreplay.c: Include needed system headers.
15626 (remote_open): Remove strchr prototype.
15627 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15628 * regcache.c (supply_register): Change buf argument to const void *.
15629 (supply_register_by_name): Likewise.
15630 (collect_register): Change buf argument to void *.
15631 (collect_register_by_name): Likewise.
15632 * regcache.h: Add missing prototypes.
15633 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15634 * server.c (handle_query): New function.
15635 (attached): New static variable, moved out of main.
15636 (main): Quiet longjmp clobber warnings.
15637 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15638 * utils.c (error): Remove NORETURN.