1 2017-09-20 Tom Tromey <tom@tromey.com>
3 * target.c (target_terminal::terminal_state): Define.
4 (target_terminal::init): Rename from target_terminal_init.
5 (target_terminal::inferior): Rename from
6 target_terminal_inferior.
7 (target_terminal::ours): Rename from target_terminal_ours.
8 (target_terminal::ours_for_output, target_terminal::info): New.
10 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
12 * server.c (accumulate_file_name_length): Remove.
13 (emit_dll_description): Adjust to std::string change.
14 (handle_qxfer_libraries): Use std::string to hold document.
16 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
18 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
19 return type of xml_escape_text.
20 * server.c (emit_dll_description): Likewise.
22 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
24 * server.c (captured_main): Accept argument for --selftest.
25 Update run_tests call.
26 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
27 when registering selftests.
29 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
31 * regcache.c (get_thread_regcache): Update code to use "std::vector"
32 instead of "VEC" for "target_desc.reg_defs".
33 (regcache_cpy): Likewise.
34 (registers_to_string): Likewise.
35 (registers_from_string): Likewise.
36 (find_regno): Likewise.
37 (supply_regblock): Likewise.
38 (regcache_raw_read_unsigned): Likewise.
39 * tdesc.c (init_target_desc): Likewise.
40 (tdesc_create_reg): Likewise.
41 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
42 (struct target_desc) <reg_defs>: Convert to "std::vector".
43 (target_desc): Do not initialize "reg_defs".
44 (~target_desc): Update code to use "std::vector" instead of "VEC"
45 for "target_desc.reg_defs".
46 (operator==): Likewise.
48 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
50 * inferiors.h (thread_to_gdb_id): Remove.
51 * inferiors.c (thread_to_gdb_id): Remove.
52 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
53 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
54 lynx_store_registers, lynx_read_memory, lynx_write_memory):
56 * nto-low.c (nto_fetch_registers, nto_store_registers,
57 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
59 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
61 * inferiors.h (gdb_id_to_thread_id): Remove.
62 * inferiors.c (gdb_id_to_thread_id): Remove.
63 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
64 removal. Move pid declaration closer to where it's used.
66 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
68 * server.c (handle_detach): New function.
69 (process_serial_event): Move code out, call handle_detach.
71 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
73 * server.c (require_running): Rename to ...
74 (require_running_or_return): ... this ...
75 (require_running_or_break): ... and this.
76 (handle_query, process_serial_event): Adjust.
78 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
80 * linux-low.c (linux_set_resume_request): Remove unused
83 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
85 * server.c (first_thread_of): Remove.
86 (process_serial_event): Replace usage of first_thread_of with
87 find_any_thread_of_pid.
88 * tracepoint.c (same_process_p): Remove.
89 (gdb_agent_about_to_close): Replace usage of same_process_p with
90 find_any_thread_of_pid.
91 * linux-x86-low.c (same_process_callback): Remove.
92 (x86_arch_setup_process_callback): Replace usage of
93 same_process_callback with find_any_thread_of_pid.
94 * thread-db.c (any_thread_of): Remove.
95 (switch_to_process): Replace usage of any_thread_of with
96 find_any_thread_of_pid.
97 * inferiors.c (thread_pid_matches_callback): Remove.
98 (find_thread_process): Adjust to use find_any_thread_of_pid.
100 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
102 * regcache.c (get_thread_regcache): Guard calls to "memset"
105 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
107 * linux-low.c (handle_extended_wait): Use
108 "allocate_target_description" instead of "XNEW".
109 * linux-x86-low.c (initialize_low_arch): Likewise.
111 2017-09-05 Yao Qi <yao.qi@linaro.org>
113 * configure.srv (srv_i386_regobj): Remove.
114 (srv_amd64_regobj): Remove.
115 (srv_regobj): Set it to "" for x86 non-linux targets.
116 * linux-x86-tdesc.c (i386_linux_read_description):
117 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
118 (init_registers_i386): Remove the declaration.
119 (tdesc_i386): Remove the declaration.
120 (lynx_i386_arch_setup): Call i386_create_target_description.
121 * nto-x86-low.c: Likewise.
122 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
123 [!__x86_64__]: include arch/i386.h.
124 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
126 2017-09-05 Yao Qi <yao.qi@linaro.org>
128 * configure.srv (srv_amd64_linux_xmlfiles): Remove
129 i386/amd64-XXX-linux from it.
131 2017-09-05 Yao Qi <yao.qi@linaro.org>
133 * configure.srv: Empty srv_amd64_linux_regobj if $development is
135 (ipa_amd64_linux_regobj): Remove.
136 (ipa_x32_linux_regobj): Remove.
138 2017-09-05 Yao Qi <yao.qi@linaro.org>
140 * Makefile.in (arch-amd64.o): New rule.
141 * configure.srv: Append arch-amd64.o.
142 * linux-amd64-ipa.c: Include common/x86-xstate.h.
143 (get_ipa_tdesc): Call amd64_linux_read_description.
144 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
145 and init_registers_amd64_XXX.
146 * linux-x86-low.c (x86_linux_read_description): Call
147 amd64_linux_read_description.
148 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
149 (initialize_low_arch): Don't call init_registers_x32_XXX and
150 init_registers_amd64_XXX.
151 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
153 [__x86_64__] (amd64_tdesc_test): New function.
154 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
155 and init_registers_amd64_XXX.
156 * linux-x86-tdesc.c: Include arch/amd64.h.
157 (xcr0_to_tdesc_idx): New function.
158 (i386_linux_read_description): New function.
159 (amd64_get_ipa_tdesc_idx): New function.
160 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
161 (amd64_get_ipa_tdesc): Declare.
163 2017-09-05 Yao Qi <yao.qi@linaro.org>
165 * configure.srv (srv_i386_linux_xmlfiles): Remove
166 i386/i386-XXX-linux.xml from it.
168 2017-09-05 Yao Qi <yao.qi@linaro.org>
170 * configure.srv: Set srv_i386_linux_regobj empty if $development
172 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
173 initialize_low_tdesc.
174 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
175 with #if initialize_low_tdesc.
176 * linux-x86-tdesc-selftest.c: New file.
177 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
179 2017-09-05 Yao Qi <yao.qi@linaro.org>
181 * Makefile.in (arch-i386.o): New rule.
182 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
183 (x86_64-*-linux*): Likewise.
184 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
186 (i386_linux_read_description): Remove code and call
187 i386_create_target_description.
188 * tdesc.c (allocate_target_description): New function.
189 * tdesc.h (set_tdesc_architecture): Remove declaration.
190 (set_tdesc_osabi): Likewise.
192 2017-09-05 Yao Qi <yao.qi@linaro.org>
194 * linux-x86-tdesc.c: Don't include <inttypes.h>.
195 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
196 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
198 * server.c (get_features_xml): Call tdesc_get_features_xml.
199 * tdesc.c (set_tdesc_architecture): New function.
200 (set_tdesc_osabi): New function.
201 (tdesc_get_features_xml): New function.
202 (tdesc_create_feature): Add an argument.
203 * tdesc.h (struct target_desc) <features>: New field.
204 <arch, osabi>: New field.
205 (~target_desc): xfree features, arch, and osabi.
206 (target_desc::oerator==): Don't compare .xmltarget.
207 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
208 (set_tdesc_osabi): Likewise.
209 (tdesc_get_features_xml): Likewise.
211 2017-09-05 Yao Qi <yao.qi@linaro.org>
213 * linux-x86-tdesc.c: Include selftest.h.
214 (i386_tdesc_test): New function.
215 (initialize_low_tdesc): Call selftests::register_test.
216 * tdesc.h: Include regdef.h.
217 (target_desc): Override operator == and !=.
219 2017-09-05 Yao Qi <yao.qi@linaro.org>
221 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
223 * linux-i386-ipa.c: Include common/x86-xstate.h
224 (get_ipa_tdesc): Call i386_linux_read_description.
225 (initialize_low_tracepoint): Don't call init_registers_XXX
226 functions, call initialize_low_tdesc instead.
227 * linux-x86-low.c (x86_linux_read_description): Call
228 i386_linux_read_description.
229 (initialize_low_arch): Don't call init_registers_i386_XXX
230 functions, call initialize_low_tdesc.
231 * linux-x86-tdesc.c: New file.
232 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
233 (i386_get_ipa_tdesc_idx): Declare.
234 (i386_get_ipa_tdesc): Declare.
235 (initialize_low_tdesc): Declare.
237 2017-09-05 Yao Qi <yao.qi@linaro.org>
239 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
242 2017-09-05 Yao Qi <yao.qi@linaro.org>
244 * Makefile.in (IPA_OBJS): Add vec-ipa.o
245 * regcache.c (get_thread_regcache): Use VEC_length.
246 (init_register_cache): Likewise.
247 (regcache_cpy): Likewise.
248 (registers_to_string): Iterate reg_defs via VEC_iterate.
249 (find_regno): Likewise.
250 (find_register_by_number): Use VEC_index.
251 (register_size): Call find_register_by_number.
252 (register_data): Call find_register_by_number.
253 (supply_regblock): Use VEC_length.
254 (regcache_raw_read_unsigned): Likewise.
255 * tdesc.c (init_target_desc): Iterate reg_defs via
257 (default_description): Update initializer.
258 (copy_target_description): Don't update field num_registers.
259 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
260 <num_registers>: Remove.
262 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
264 * Makefile.in (.SECONDARY): Define target.
266 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
268 * linux-low.c (linux_wait_1): Adjust.
269 * server.c (queue_stop_reply_callback): Adjust.
271 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
273 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
274 QEnvironmentUnset and QEnvironmentReset packets.
275 (handle_query): Inform remote that QEnvironmentHexEncoded,
276 QEnvironmentUnset and QEnvironmentReset are supported.
278 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
280 * inferiors.h (inferior_target_data): Rename to ...
281 (thread_target_data): ... this.
282 (inferior_regcache_data): Rename to ...
283 (thread_regcache_data): ... this.
284 (set_inferior_regcache_data): Rename to ...
285 (set_thread_regcache_data): ... this.
286 * inferiors.c (inferior_target_data): Rename to ...
287 (thread_target_data): ... this.
288 (inferior_regcache_data): Rename to ...
289 (thread_regcache_data): ... this.
290 (set_inferior_regcache_data): Rename to ...
291 (set_thread_regcache_data): ... this.
292 (free_one_thread): Update.
293 * linux-low.h (get_thread_lwp): Update.
294 * regcache.c (get_thread_regcache): Update.
295 (regcache_invalidate_thread): Update.
296 (free_register_cache_thread): Update.
297 * win32-i386-low.c (update_debug_registers_callback): Update.
298 (win32_get_current_dr): Update.
299 * win32-low.c (thread_rec): Update.
300 (delete_thread_info): Update.
301 (continue_one_thread): Update.
302 (suspend_one_thread): Update.
304 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
306 * inferiors.c (set_inferior_target_data): Remove.
307 * inferiors.h (set_inferior_target_data): Remove.
309 2017-08-18 Yao Qi <yao.qi@linaro.org>
311 * Makefile.in (OBS): Add selftest.o.
312 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
313 * configure, config.in: Re-generated.
314 * server.c: Include common/sefltest.h.
315 (captured_main): Handle option --selftest.
317 2017-08-09 Yao Qi <yao.qi@linaro.org>
319 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
320 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
321 i386-avx-mpx.o and i386-mmx.o.
322 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
323 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
324 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
325 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
326 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
327 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
328 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
329 i386/amd64-avx-mpx.xml.
331 2017-08-09 Yao Qi <yao.qi@linaro.org>
333 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
334 and x32-avx-avx512.o.
335 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
336 i386/x32-avx-avx512.xml.
338 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
340 * tracepoint.h (enum class fast_tpoint_collect_result): New
342 (fast_tracepoint_collecting): Change return type to
343 fast_tpoint_collect_result.
344 * tracepoint.c (fast_tracepoint_collecting): Likewise.
345 * linux-low.h: Include tracepoint.h.
346 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
347 fast_tpoint_collect_result.
348 * linux-low.c (handle_tracepoints): Adjust.
349 (linux_fast_tracepoint_collecting): Change return type to
350 fast_tpoint_collect_result.
351 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
352 linux_wait_1, stuck_in_jump_pad_callback,
353 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
354 proceed_one_lwp): Adjust to type change.
356 2017-07-10 Yao Qi <yao.qi@linaro.org>
358 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
360 2017-06-29 Yao Qi <yao.qi@linaro.org>
362 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
364 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
366 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
368 * Makefile.in (IPA_OBJS): Sort and format one item per line.
370 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
372 * linux-low.c (linux_create_inferior): Adjust code to access the
373 environment information via 'gdb_environ' class.
374 * lynx-low.c (lynx_create_inferior): Likewise.
375 * server.c (our_environ): Make it an instance of 'gdb_environ'.
376 (get_environ): Return a pointer to 'our_environ'.
377 (captured_main): Initialize 'our_environ'.
378 * server.h (get_environ): Adjust prototype.
379 * spu-low.c (spu_create_inferior): Adjust code to access the
380 environment information via 'gdb_environ' class.
382 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
384 * linux-low.c (linux_read_memory, linux_write_memory): Remove
385 usage of "register" keyword.
387 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
389 * configure: Re-generate.
391 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
393 * configure: Re-generate.
395 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
397 * Makefile.in (COMPILE.pre): Add "-x c++".
399 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
401 * fork-child.c: Conditionally include <signal.h>.
403 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
405 * server.c (handle_general_set): Handle new packet
407 (handle_query): Add "QStartupWithShell" to the list of supported
409 (gdbserver_usage): Add help text explaining the
410 new "--startup-with-shell" and "--no-startup-with-shell" CLI
412 (captured_main): Recognize and act upon the presence of the new
415 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
416 Pedro Alves <palves@redhat.com>
418 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
419 * configure: Regenerate.
420 * configure.srv (srv_linux_obj): Add "fork-child.o" and
422 (i[34567]86-*-lynxos*): Likewise.
423 (spu*-*-*): Likewise.
424 * fork-child.c: New file.
425 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
427 (linux_ptrace_fun): New function.
428 (linux_create_inferior): Adjust function prototype to reflect
429 change on "target.h". Adjust function code to use
431 (linux_request_interrupt): Delete "signal_pid".
432 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
433 (lynx_ptrace_fun): New function.
434 (lynx_create_inferior): Adjust function prototype to reflect
435 change on "target.h". Adjust function code to use
437 * nto-low.c (nto_create_inferior): Adjust function prototype and
438 code to reflect change on "target.h". Update comments.
439 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
440 "common-terminal.h" and "environ.h".
441 (terminal_fd): Moved to fork-child.c.
442 (old_foreground_pgrp): Likewise.
443 (restore_old_foreground_pgrp): Likewise.
444 (last_status): Make it global.
445 (last_ptid): Likewise.
446 (our_environ): New variable.
447 (startup_with_shell): Likewise.
448 (program_name): Likewise.
449 (program_argv): Rename to...
450 (program_args): ...this.
451 (wrapper_argv): New variable.
452 (start_inferior): Delete function.
453 (get_exec_wrapper): New function.
454 (get_exec_file): Likewise.
455 (get_environ): Likewise.
456 (prefork_hook): Likewise.
457 (post_fork_inferior): Likewise.
458 (postfork_hook): Likewise.
459 (postfork_child_hook): Likewise.
460 (handle_v_run): Update code to deal with arguments coming from the
461 remote host. Update calls from "start_inferior" to
463 (captured_main): Likewise. Initialize environment variable. Call
465 * server.h (post_fork_inferior): New prototype.
466 (get_environ): Likewise.
467 (last_status): Declare.
468 (last_ptid): Likewise.
469 (signal_pid): Likewise.
470 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
471 (spu_ptrace_fun): New function.
472 (spu_create_inferior): Adjust function prototype to reflect change
473 on "target.h". Adjust function code to use "fork_inferior".
474 * target.c (target_terminal_init): New function.
475 (target_terminal_inferior): Likewise.
476 (target_terminal_ours): Likewise.
477 * target.h: Include <vector>.
478 (struct target_ops) <create_inferior>: Update prototype.
479 (create_inferior): Update macro.
480 * utils.c (gdb_flush_out_err): New function.
481 * win32-low.c (win32_create_inferior): Adjust function prototype
482 and code to reflect change on "target.h".
484 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
486 * inferiors.c (switch_to_thread): New function.
488 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
490 * Makefile.in (SFILE): Add "common/job-control.c".
491 (OBS): Add "job-control.o".
493 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
495 * Makefile: Remove "@host_makefile_frag@".
497 2017-05-05 Pedro Alves <palves@redhat.com>
499 * configure: Regenerate.
501 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
503 * configure: Regenerate.
505 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
507 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
508 software_single_step change of return type to
509 std::vector<CORE_ADDR>.
510 * linux-low.c (install_software_single_step_breakpoints):
512 * linux-low.h (install_software_single_step_breakpoints):
515 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
517 * remote-utils.c: Include "gdb_termios.h" instead of
519 * terminal.h: Delete file.
521 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
523 * server.c: Include <vector>.
524 <program_argv, wrapper_argv>: Convert to std::vector.
525 (start_inferior): Rewrite function to use C++.
526 (handle_v_run): Likewise. Update code that calculates the argv
527 based on the vRun packet; use C++.
528 (captured_main): Likewise.
530 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
532 * server.c (handle_v_cont): Initialize thread_resume::thread
535 2017-04-05 Pedro Alves <palves@redhat.com>
537 * configure: Regenerate.
539 2017-04-05 Pedro Alves <palves@redhat.com>
541 * gdbreplay.c (sync_error): Constify.
542 * linux-x86-low.c (push_opcode): Constify.
544 2017-04-05 Pedro Alves <palves@redhat.com>
546 * win32-low.c (get_child_debug_event)
547 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
548 Report TARGET_WAITKIND_SPURIOUS instead.
550 2017-04-05 Pedro Alves <palves@redhat.com>
552 * remote-utils.c (remote_prepare, remote_open): Constify.
553 * remote-utils.h (remote_prepare, remote_open): Constify.
554 * server.c (captured_main): Constify 'port' handling.
556 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
558 * Makefile.in (clean): Clear .deps.
560 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
562 * .gitignore: Remove generated files, replace with wildcard.
563 * (clean): Replace removal of generated files with wildcard.
564 (version.c): Replace with...
565 (version-generated.c): ...this.
566 (xml-builtin.c): Replace with...
567 (xml-builtin-generated.c): ...this.
568 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
569 (%.c: *regformats*): Replace with...
570 (%-generated.c: *regformats*): ...this.
572 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
574 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
575 (xtensa_fill_gregset): Call collect_register_by_name for
577 (xtensa_store_gregset): Call supply_register_by_name for
580 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
582 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
583 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
584 (xtensa_store_gregset): Call supply_register for all registers in
585 a0_regnum..a0_regnum + C0_NREGS range.
587 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
589 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
590 (ax-ipa.o: ax.c): Remove.
591 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
592 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
593 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
594 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
595 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
597 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
599 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
600 (print-utils-ipa.o: ../common/print-utils.c): Remove.
601 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
602 (errors-ipa.o: ../common/errors.c): Remove.
603 (format-ipa.o: ../common/format.c): Remove.
604 (common-utils-ipa.o: ../common/common-utils.c): Remove.
606 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
608 * Makefile.in (%-ipa.o: %.c): New rule.
609 (tracepoint-ipa.o: tracepoint.c): Remove.
610 (utils-ipa.o: utils.c): Remove.
611 (remote-utils-ipa.o: remote-utils.c): Remove.
612 (regcache-ipa.o: regcache.c): Remove.
613 (i386-linux-ipa.o: i386-linux.c): Remove.
614 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
615 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
616 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
617 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
618 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
619 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
620 (amd64-linux-ipa.o: amd64-linux.c): Remove.
621 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
622 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
623 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
624 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
625 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
626 (aarch64-ipa.o: aarch64.c): Remove.
627 (s390-linux32-ipa.o: s390-linux32.c): Remove.
628 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
629 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
630 (s390-linux64-ipa.o: s390-linux64.c): Remove.
631 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
632 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
633 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
634 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
635 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
636 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
637 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
638 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
639 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
640 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
641 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
642 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
643 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
644 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
645 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
646 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
647 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
648 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
649 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
650 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
651 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
652 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
653 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
654 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
655 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
656 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
657 (tdesc-ipa.o: tdesc.c): Remove.
658 (x32-linux-ipa.o: x32-linux.c): Remove.
659 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
660 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
662 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
664 * Makefile.in (%.o: ../arch/%.c): New rule.
665 (arm.o: ../arch/arm.c): Remove.
666 (arm-linux.o: ../arch/arm-linux.c): Remove.
667 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
668 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
670 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
672 * Makefile.in (%.o: ../nat/%.c): New rule.
673 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
674 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
675 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
676 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
677 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
678 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
679 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
680 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
681 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
682 (linux-personality.o: ../nat/linux-personality.c): Remove.
683 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
684 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
685 (x86-linux.o: ../nat/x86-linux.c): Remove.
686 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
687 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
689 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
691 * Makefile.in (%.o: ../common/%.c): New rule.
692 (signals.o: ../common/signals.c): Remove.
693 (print-utils.o: ../common/print-utils.c): Remove.
694 (rsp-low.o: ../common/rsp-low.c): Remove.
695 (common-utils.o: ../common/common-utils.c): Remove.
696 (posix-strerror.o: ../common/posix-strerror.c): Remove.
697 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
698 (vec.o: ../common/vec.c): Remove.
699 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
700 (xml-utils.o: ../common/xml-utils.c): Remove.
701 (ptid.o: ../common/ptid.c): Remove.
702 (buffer.o: ../common/buffer.c): Remove.
703 (format.o: ../common/format.c): Remove.
704 (filestuff.o: ../common/filestuff.c): Remove.
705 (agent.o: ../common/agent.c): Remove.
706 (errors.o: ../common/errors.c): Remove.
707 (environ.o: ../common/environ.c): Remove.
708 (common-debug.o: ../common/common-debug.c): Remove.
709 (cleanups.o: ../common/cleanups.c): Remove.
710 (common-exceptions.o: ../common/common-exceptions.c): Remove.
711 (fileio.o: ../common/fileio.c): Remove.
712 (common-regcache.o: ../common/common-regcache.c): Remove.
713 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
714 (new-op.o: ../common/new-op.c): Remove.
715 (btrace-common.o: ../common/btrace-common.c): Remove.
717 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
719 * Makefile.in (%.o: ../target/%.c): New rule.
720 (waitstatus.o: ../target/waitstatus.c): Remove.
722 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
725 (%.c: ../regformats/%.dat,
726 (%.c: ../regformats/arm/%.dat,
727 (%.c: ../regformats/i386/%.dat,
728 (%.c: ../regformats/rs6000/%.dat): New rules.
731 (arm-with-iwmmxt.c): Remove.
732 (arm-with-vfpv2.c): Remove.
733 (arm-with-vfpv3.c): Remove.
734 (arm-with-neon.c): Remove.
735 (reg-bfin.c): Remove.
736 (reg-cris.c): Remove.
737 (reg-crisv32.c): Remove.
739 (i386-linux.c): Remove.
740 (i386-avx.c): Remove.
741 (i386-avx-linux.c): Remove.
742 (i386-avx-avx512.c): Remove.
743 (i386-avx-avx512-linux.c): Remove.
744 (i386-mpx.c): Remove.
745 (i386-mpx-linux.c): Remove.
746 (i386-avx-mpx-avx512-pku.c): Remove.
747 (i386-avx-mpx-avx512-pku-linux.c): Remove.
748 (i386-avx-mpx.c): Remove.
749 (i386-avx-mpx-linux.c): Remove.
750 (i386-mmx.c): Remove.
751 (i386-mmx-linux.c): Remove.
752 (reg-ia64.c): Remove.
753 (reg-m32r.c): Remove.
754 (reg-m68k.c): Remove.
756 (mips-linux.c): Remove.
757 (mips-dsp-linux.c): Remove.
758 (mips64-linux.c): Remove.
759 (mips64-dsp-linux.c): Remove.
760 (nios2-linux.c): Remove.
761 (powerpc-32.c): Remove.
762 (powerpc-32l.c): Remove.
763 (powerpc-altivec32l.c): Remove.
764 (powerpc-cell32l.c): Remove.
765 (powerpc-vsx32l.c): Remove.
766 (powerpc-isa205-32l.c): Remove.
767 (powerpc-isa205-altivec32l.c): Remove.
768 (powerpc-isa205-vsx32l.c): Remove.
769 (powerpc-e500l.c): Remove.
770 (powerpc-64l.c): Remove.
771 (powerpc-altivec64l.c): Remove.
772 (powerpc-cell64l.c): Remove.
773 (powerpc-vsx64l.c): Remove.
774 (powerpc-isa205-64l.c): Remove.
775 (powerpc-isa205-altivec64l.c): Remove.
776 (powerpc-isa205-vsx64l.c): Remove.
777 (s390-linux32.c): Remove.
778 (s390-linux32v1.c): Remove.
779 (s390-linux32v2.c): Remove.
780 (s390-linux64.c): Remove.
781 (s390-linux64v1.c): Remove.
782 (s390-linux64v2.c): Remove.
783 (s390-te-linux64.c): Remove.
784 (s390-vx-linux64.c): Remove.
785 (s390-tevx-linux64.c): Remove.
786 (s390x-linux64.c): Remove.
787 (s390x-linux64v1.c): Remove.
788 (s390x-linux64v2.c): Remove.
789 (s390x-te-linux64.c): Remove.
790 (s390x-vx-linux64.c): Remove.
791 (s390x-tevx-linux64.c): Remove.
792 (tic6x-c64xp-linux.c): Remove.
793 (tic6x-c64x-linux.c): Remove.
794 (tic6x-c62x-linux.c): Remove.
796 (reg-sparc64.c): Remove.
799 (amd64-linux.c): Remove.
800 (amd64-avx.c): Remove.
801 (amd64-avx-linux.c): Remove.
802 (amd64-avx-avx512.c): Remove.
803 (amd64-avx-avx512-linux.c): Remove.
804 (amd64-mpx.c): Remove.
805 (amd64-mpx-linux.c): Remove.
806 (amd64-avx-mpx-avx512-pku.c): Remove.
807 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
808 (amd64-avx-mpx.c): Remove.
809 (amd64-avx-mpx-linux.c): Remove.
811 (x32-linux.c): Remove.
813 (x32-avx-linux.c): Remove.
814 (x32-avx-avx512.c): Remove.
815 (x32-avx-avx512-linux.c): Remove.
816 (reg-xtensa.c): Remove.
817 (reg-tilegx.c): Remove.
818 (reg-tilegx32.c): Remove.
820 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
822 * Makefile.in (SFILES): Add "common/environ.c".
823 (OBJS): Add "common/environ.h".
825 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
827 * configure.ac: Check if the fs_base and gs_base members of
828 `struct user_regs_struct' exist.
829 * config.in: Regenerated.
830 * configure: Likewise.
832 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
834 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
836 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
837 (get_next_pcs_syscall_next_pc): Likewise.
839 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
841 * win32-i386-low.c: Fix incorrect reference to a couple source files.
842 * nto-x86-low.c: Likewise.
844 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
846 * Makefile.in: Include disable-implicit-rules.mk.
848 2016-11-23 Pedro Alves <palves@redhat.com>
850 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
851 (debug_vprintf): Use std::chrono::steady_clock instead of
852 gettimeofday. Use '.' instead of ':'.
853 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
854 (get_timestamp): Use std::chrono::steady_clock instead of
857 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
859 * Makefile.in: Fix whitespace formatting.
861 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
863 * Makefile.in (SFILES, OBS): Flatten list and order
866 2016-11-23 Pedro Alves <palves@redhat.com>
868 * event-loop.c (handle_file_event): Use warning.
869 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
870 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
873 2016-11-23 Pedro Alves <palves@redhat.com>
875 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
877 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
878 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
879 debug_printf and debug_flush for debug output.
880 * server.c (handle_general_set): Likewise.
881 * thread-db.c (try_thread_db_load): Use debug_printf for debug
884 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
886 * Makefile.in (.c.o): Replace rule with ...
887 (%.o: %.c): ... this one.
889 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
891 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
892 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
894 * configure.ac: Remove checks for the make program.
895 * configure: Re-generate.
897 2016-10-28 Pedro Alves <palves@redhat.com>
899 * Makefile.in (CXX_DIALECT): Get from configure.
900 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
901 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
902 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
903 * config.in: Regenerate.
904 * configure: Regenerate.
906 2016-10-27 Yao Qi <yao.qi@linaro.org>
908 * linux-low.c (linux_supports_range_stepping): Return true if
909 can_software_single_step return true.
911 2016-10-27 Yao Qi <yao.qi@linaro.org>
913 * inferiors.c (find_inferior_in_random): New function.
914 * inferiors.h (find_inferior_in_random): Declare.
915 * linux-low.c (linux_wait_for_event_filtered): Call
916 find_inferior_in_random instead of find_inferior.
918 2016-10-27 Yao Qi <yao.qi@linaro.org>
920 * linux-low.c (linux_wait_1): If single-step breakpoints are
921 inserted, remove them.
923 2016-10-26 Pedro Alves <palves@redhat.com>
925 * linux-low.c (handle_extended_wait): Link parent/child fork
927 (linux_wait_1): Unlink them.
928 (linux_set_resume_request): Ignore resume requests for
929 already-resumed and unhandled fork child threads.
930 * linux-low.h (struct lwp_info) <fork_relative>: New field.
931 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
933 (handle_v_requests) <vCont>: Don't call require_running.
934 * server.h (in_queued_stop_replies): New declaration.
936 2016-10-24 Yao Qi <yao.qi@linaro.org>
939 * linux-aarch64-low.c (append_insns): Cast the return value to
942 2016-10-10 Yao Qi <yao.qi@linaro.org>
944 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
946 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
948 * target.c (target_supports_multi_process): New function, moved
950 * target.h (target_supports_multi_process): ... here. Remove
953 2016-10-05 Tom Tromey <tom@tromey.com>
956 * tracepoint.c (handle_tracepoint_bkpts): Check
957 ipa_error_tracepoint, not ipa_stopping_tracepoint.
959 2016-10-05 Yao Qi <yao.qi@linaro.org>
961 * configure.srv: Update the path of arm-*.xml files.
963 2016-10-05 Terry Guo <terry.guo@arm.com>
964 Yao Qi <yao.qi@linaro.org>
966 * Makefile.in: Adjust the path of rules.
967 * configure.srv: Update the path of xml files.
968 * regformats/arm-with-iwmmxt.dat: Regenerated.
969 * regformats/arm-with-neon.dat: Likewise.
970 * regformats/arm-with-vfpv2.dat: Likewise.
971 * regformats/arm-with-vfpv3.dat Likewise.
973 2016-09-30 Yao Qi <yao.qi@linaro.org>
976 * target.c (target_stop_and_wait): Don't call
977 target_continue_no_signal, use resume_stop instead.
979 2016-09-26 Yao Qi <yao.qi@linaro.org>
981 * linux-low.c (linux_wait_1): Call debug_exit.
983 2016-09-23 Pedro Alves <palves@redhat.com>
985 * Makefile.in (SFILES): Add common/new-op.c.
986 (OBS): Add common/new-op.o.
987 (new-op.o): New rule.
989 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
991 * .gitinore: Ignore more files.
993 2016-09-21 Yao Qi <yao.qi@linaro.org>
995 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
998 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1000 * server.c (start_inferior): Call target_mourn_inferior instead of
1001 mourn_inferior; pass ptid_t argument to it.
1003 (handle_target_event): Likewise.
1004 * target.c (target_mourn_inferior): New function.
1005 * target.h (mourn_inferior): Delete macro.
1007 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1009 * linux-low.c (lwp_is_stepping): New function.
1011 2016-09-06 Carl Love <cel@us.ibm.com>
1013 * server.c (start_inferior): Fixed comment, requested comment change
1014 didn't get updated correctly. Removed reference to ptrace () call as
1015 it is only true on Linux systems.
1017 2016-09-06 Carl Love <cel@us.ibm.com>
1019 * server.c (start_inferior): Do not call
1020 function target_post_create_inferior () if the
1021 inferior process has already exited.
1023 2016-09-05 Pedro Alves <palves@redhat.com>
1025 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1026 (COMPILE.pre, CC_LD): Use CXX directly.
1027 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1028 * acinclude.m4: Don't include build-with-cxx.m4.
1029 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1030 * configure: Regenerate.
1032 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1035 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1036 call writing data to own_buf.
1038 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1040 * target.c (mywait): Call target_wait instead of
1042 (target_wait): New function.
1044 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1046 * server.c (start_inferior): New variable 'ptid'. Replace calls
1047 to the_target->resume by target_continue{,_no_signal}, depending
1049 * target.c (target_stop_and_wait): Call target_continue_no_signal
1050 instead of the_target->resume.
1051 (target_continue): New function.
1053 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1055 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1057 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1060 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1062 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1063 * linux-arm-low.c (ps_get_thread_area): Likewise.
1064 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1065 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1066 * linux-mips-low.c (ps_get_thread_area): Likewise.
1067 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1068 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1069 * linux-x86-low.c (ps_get_thread_area): Likewise.
1070 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1072 2016-08-19 Pedro Alves <palves@redhat.com>
1074 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1076 2016-08-19 Pedro Alves <palves@redhat.com>
1078 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1079 comment. Use memcpy instead of casting through unsigned long.
1081 2016-08-19 Pedro Alves <palves@redhat.com>
1083 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1084 allocating around 0x80000000.
1086 2016-08-19 Pedro Alves <palves@redhat.com>
1089 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1090 (x32-avx512-linux-ipa.o): New rules.
1091 * configure.ac (x86_64-*-linux*): New x32 check.
1092 * configure.srv (ipa_x32_linux_regobj): New.
1093 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1094 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1096 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1098 * configure: Regenerate.
1100 2016-08-09 Pedro Alves <palves@redhat.com>
1103 * Makefile.in (OBS): Add signals-state-save-restore.o.
1104 (signals-state-save-restore.o): New rule.
1105 * config.in: Regenerate.
1106 * configure: Regenerate.
1107 * linux-low.c: Include "signals-state-save-restore.h".
1108 (linux_create_inferior): Call
1109 restore_original_signals_state.
1110 * server.c: Include "dispositions-save-restore.h".
1111 (captured_main): Call save_original_signals_state.
1113 2016-08-05 Pedro Alves <palves@redhat.com>
1115 * configure: Regenerate.
1117 2016-08-04 Yao Qi <yao.qi@linaro.org>
1119 * linux-low.c (regsets_fetch_inferior_registers): Check
1120 errno is ESRCH or not.
1122 2016-08-02 Yao Qi <yao.qi@linaro.org>
1124 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1125 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1126 (thread_db_load_search): Update.
1127 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1128 td_ta_set_event and td_ta_event_getmsg.
1130 2016-07-26 Pedro Alves <palves@redhat.com>
1133 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1134 of unsigned long for 64-bit registers and use uint32_t instead of
1135 unsigned int for 32-bit registers.
1137 2016-07-26 Pedro Alves <palves@redhat.com>
1139 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1142 2016-07-21 Tom Tromey <tom@tromey.com>
1144 * configure: Rebuild.
1146 2016-07-21 Yao Qi <yao.qi@linaro.org>
1148 * mem-break.c (find_gdb_breakpoint): Cast bp to
1149 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1151 2016-07-21 Yao Qi <yao.qi@linaro.org>
1153 * server.c (handle_v_requests): Support s and S actions
1154 if target_supports_software_single_step return true.
1156 2016-07-21 Yao Qi <yao.qi@linaro.org>
1158 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1159 is resume_step, call maybe_hw_step.
1160 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1162 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1164 (proceed_one_lwp): If resume request is resume_step, install
1165 reinsert breakpoints and call maybe_hw_step.
1167 2016-07-21 Yao Qi <yao.qi@linaro.org>
1169 * linux-low.c (proceed_one_lwp): Declare.
1170 (linux_resume_one_thread): Remove local variable 'step'.
1171 Lift code enqueue signal. Call proceed_one_lwp instead of
1172 linux_resume_one_lwp.
1174 2016-07-21 Yao Qi <yao.qi@linaro.org>
1176 * linux-low.c (linux_resume_one_thread): Call
1177 enqueue_pending_signal.
1179 2016-07-21 Yao Qi <yao.qi@linaro.org>
1181 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1182 * inferiors.c (do_restore_current_thread_cleanup): New function.
1183 (make_cleanup_restore_current_thread): Likewise.
1184 * linux-low.c (install_software_single_step_breakpoints): Call
1185 make_cleanup_restore_current_thread. Switch current_thread to
1188 2016-07-21 Yao Qi <yao.qi@linaro.org>
1190 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1191 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1192 (clone_one_breakpoint): Likewise.
1193 (delete_reinsert_breakpoints): Change parameter to thread.
1195 (has_reinsert_breakpoints): Likewise.
1196 (uninsert_reinsert_breakpoints): Likewise.
1197 (reinsert_reinsert_breakpoints): Likewise.
1198 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1199 (delete_reinsert_breakpoints): Likewise.
1200 (reinsert_reinsert_breakpoints): Likewise.
1201 (uninsert_reinsert_breakpoints): Likewise.
1202 (has_reinsert_breakpoints): Likewise.
1204 2016-07-21 Yao Qi <yao.qi@linaro.org>
1206 * inferiors.c (get_thread_process): Make parameter const.
1207 * inferiors.h (get_thread_process): Update declaration.
1208 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1209 Add new parameters child_thread and parent_thread. Callers
1211 * mem-break.h (clone_all_breakpoints): Update declaration.
1213 2016-07-21 Yao Qi <yao.qi@linaro.org>
1215 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1216 <command_list, handler>: Remove.
1217 (struct gdb_breakpoint): New.
1218 (struct other_breakpoint): New.
1219 (struct reinsert_breakpoint): New.
1220 (is_gdb_breakpoint): New function.
1221 (any_persistent_commands): Update command_list if
1222 is_gdb_breakpoint returns true.
1223 (set_breakpoint): Create breakpoints according to their types.
1224 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1225 (set_gdb_breakpoint_1): Likewise.
1226 (set_gdb_breakpoint): Likewise.
1227 (clear_breakpoint_conditions): Change parameter type to
1228 'struct gdb_breakpoint *'.
1229 (clear_breakpoint_commands): Likewise.
1230 (clear_breakpoint_conditions_and_commands): Likewise.
1231 (add_condition_to_breakpoint): Likewise.
1232 (add_breakpoint_condition): Likewise.
1233 (add_commands_to_breakpoint): Likewise.
1234 (check_breakpoints): Check other_breakpoint.
1235 (clone_one_breakpoint): Clone breakpopint according to its type.
1236 * mem-break.h (struct gdb_breakpoint): Declare.
1237 (set_gdb_breakpoint): Update declaration.
1238 (clear_breakpoint_conditions_and_commands): Likewise.
1239 (add_breakpoint_condition): Likewise.
1240 (add_breakpoint_commands): Likewise.
1241 * server.c (process_point_options): Change parameter type to
1242 'struct gdb_breakpoint *'.
1244 2016-07-21 Yao Qi <yao.qi@linaro.org>
1246 * mem-break.c (set_breakpoint_at): Rename it to ...
1247 (set_breakpoint_type_at): ... it.
1248 (set_breakpoint_at): Call set_breakpoint_type_at.
1249 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1250 * mem-break.h (set_breakpoint_at): Update comments.
1252 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1254 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1256 (nios2_store_gregset): Likewise.
1258 2016-07-01 Pedro Alves <palves@redhat.com>
1259 Antoine Tremblay <antoine.tremblay@ericsson.com>
1261 * linux-low.c: Change interface to take the target lwp_info
1262 pointer directly and return void. Handle detaching from a zombie
1264 (linux_detach_lwp_callback): New function.
1265 (linux_detach): Detach from the leader thread after detaching from
1268 2016-06-28 Yao Qi <yao.qi@linaro.org>
1270 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1271 for variable new_offset.
1272 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1273 (aarch64_ftrace_insn_reloc_cb): Likewise.
1274 (aarch64_ftrace_insn_reloc_tb): Likewise.
1275 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1276 PRIx64 instead of PRIx32.
1278 2016-06-28 Yao Qi <yao.qi@linaro.org>
1280 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1281 (the_low_target): Install arm_get_syscall_trapinfo.
1283 2016-06-28 Yao Qi <yao.qi@linaro.org>
1285 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1287 (the_low_target): Install aarch64_get_syscall_trapinfo.
1289 2016-06-28 Yao Qi <yao.qi@linaro.org>
1291 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1293 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1294 Remove parameter sysno.
1295 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1298 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1300 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1301 (s390_emit_ne_goto): Likewise.
1302 (s390_emit_lt_goto): Likewise.
1303 (s390_emit_le_goto): Likewise.
1304 (s390_emit_gt_goto): Likewise.
1305 (s390_emit_ge_goto): Likewise.
1306 (s390x_emit_eq_goto): Likewise.
1307 (s390x_emit_ne_goto): Likewise.
1308 (s390x_emit_lt_goto): Likewise.
1309 (s390x_emit_le_goto): Likewise.
1310 (s390x_emit_gt_goto): Likewise.
1311 (s390x_emit_ge_goto): Likewise.
1312 (s390_emit_ops_impl): Mark variable static.
1313 (s390x_emit_ops): Likewise.
1315 2016-06-17 Yao Qi <yao.qi@linaro.org>
1317 * linux-low.c (handle_extended_wait): Call
1318 uninsert_reinsert_breakpoints for the parent process. Remove
1319 reinsert breakpoints from the child process. Reinsert them to
1320 the parent process when vfork is done.
1321 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1322 (reinsert_reinsert_breakpoints): New function.
1323 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1324 (reinsert_reinsert_breakpoints): Declare.
1326 2016-06-17 Yao Qi <yao.qi@linaro.org>
1328 * linux-low.c (handle_extended_wait): If the parent is doing
1329 step-over, remove the reinsert breakpoints from the forked child.
1331 2016-06-17 Yao Qi <yao.qi@linaro.org>
1333 * linux-low.c (unsuspend_all_lwps): Declare.
1334 (linux_low_filter_event): If thread exited, call finish_step_over.
1335 If step-over is finished, unsuspend other threads.
1337 2016-06-17 Yao Qi <yao.qi@linaro.org>
1339 * linux-low.c (linux_resume_one_lwp_throw): Assert
1340 has_reinsert_breakpoints returns false.
1341 * mem-break.c (delete_disabled_breakpoints): Assert
1342 bp type isn't reinsert_breakpoint.
1344 2016-06-17 Yao Qi <yao.qi@linaro.org>
1346 * linux-low.c (maybe_hw_step): New function.
1347 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1348 (finish_step_over): Switch current_thread to lwp temporarily,
1349 and assert has_reinsert_breakpoints returns true.
1350 (proceed_one_lwp): Call maybe_hw_step.
1351 * mem-break.c (has_reinsert_breakpoints): New function.
1352 * mem-break.h (has_reinsert_breakpoints): Declare.
1354 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1356 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1358 2016-05-17 Yao Qi <yao.qi@linaro.org>
1360 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1361 instead of find_inferior.
1363 2016-05-05 Yao Qi <yao.qi@linaro.org>
1365 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1366 Initialize res to zero.
1368 2016-05-05 Yao Qi <yao.qi@linaro.org>
1370 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1373 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1375 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1376 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1377 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1379 2016-04-28 Par Olsson <par.olsson@windriver.com>
1380 Simon Marchi <simon.marchi@ericsson.com>
1382 * tracepoint.c (write_inferior_int8): New function.
1383 (cmd_qtenable_disable): Write enable flag using
1384 write_inferior_int8.
1386 2016-04-25 Yao Qi <yao.qi@linaro.org>
1388 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1389 (need_step_over_p): Return zero if the LWP has pending signals
1390 can be delivered on software single step target.
1392 2016-04-25 Yao Qi <yao.qi@linaro.org>
1394 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1395 return instead of error.
1397 2016-04-22 Yao Qi <yao.qi@linaro.org>
1399 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1402 2016-04-22 Yao Qi <yao.qi@linaro.org>
1404 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1405 signal when stepping over breakpoint with software single
1408 2016-04-21 Pedro Alves <palves@redhat.com>
1410 * linux-s390-low.c (s390_collect_ptrace_register)
1411 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1413 (s390_check_regset): Use void * instead of gdb_byte *.
1415 2016-04-20 Pedro Alves <palves@redhat.com>
1417 * configure: Renegerate.
1419 2016-04-20 Yao Qi <yao.qi@linaro.org>
1421 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1422 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1424 (arm_store_gregset): Likewise.
1426 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1428 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1429 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1430 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1431 (amd64-avx-mpx-linux.c): New rules.
1432 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1433 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1434 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1435 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1436 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1437 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1438 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1439 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1440 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1441 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1442 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1443 * linux-x86-low.c (x86_linux_read_description): Add case for
1444 X86_XSTATE_AVX_MPX_MASK.
1445 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1446 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1447 init_registers_i386_avx_mpx_linux.
1448 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1449 (initialize_low_tracepoint): Call
1450 init_registers_i386_avx_mpx_linux.
1451 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1452 (initialize_low_tracepoint): Call
1453 init_registers_amd64_avx_mpx_linux.
1454 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1455 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1456 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1459 2016-04-18 Pedro Alves <palves@redhat.com>
1461 * configure: Regenerate.
1463 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1465 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1466 (aarch64_emit_sub): Likewise.
1468 2016-04-12 Pedro Alves <palves@redhat.com>
1470 * utils.c (prepare_to_throw_exception): Delete.
1472 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1474 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1476 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1478 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1480 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1482 * linux-aarch64-ipa.c: Add <elf.h> include.
1483 * linux-ppc-ipa.c: Add <elf.h> include.
1484 * linux-s390-ipa.c: Add <elf.h> include.
1486 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1488 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1489 (get_raw_reg_ptr): Likewise.
1490 (get_trace_state_variable_value_ptr): Likewise.
1491 (set_trace_state_variable_value_ptr): Likewise.
1492 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1495 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1496 Marcin Kościelnicki <koriakin@0x04.net>
1499 * linux-ppc-low.c (emit_insns): New function.
1500 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1501 (ppc_emit_prologue): New function.
1502 (ppc_emit_epilogue): New function.
1503 (ppc_emit_add): New function.
1504 (ppc_emit_sub): New function.
1505 (ppc_emit_mul): New function.
1506 (ppc_emit_lsh): New function.
1507 (ppc_emit_rsh_signed): New function.
1508 (ppc_emit_rsh_unsigned): New function.
1509 (ppc_emit_ext): New function.
1510 (ppc_emit_zero_ext): New function.
1511 (ppc_emit_log_not): New function.
1512 (ppc_emit_bit_and): New function.
1513 (ppc_emit_bit_or): New function.
1514 (ppc_emit_bit_xor): New function.
1515 (ppc_emit_bit_not): New function.
1516 (ppc_emit_equal): New function.
1517 (ppc_emit_less_signed): New function.
1518 (ppc_emit_less_unsigned): New function.
1519 (ppc_emit_ref): New function.
1520 (ppc_emit_const): New function.
1521 (ppc_emit_reg): New function.
1522 (ppc_emit_pop): New function.
1523 (ppc_emit_stack_flush): New function.
1524 (ppc_emit_swap): New function.
1525 (ppc_emit_stack_adjust): New function.
1526 (ppc_emit_call): New function.
1527 (ppc_emit_int_call_1): New function.
1528 (ppc_emit_void_call_2): New function.
1529 (ppc_emit_if_goto): New function.
1530 (ppc_emit_goto): New function.
1531 (ppc_emit_eq_goto): New function.
1532 (ppc_emit_ne_goto): New function.
1533 (ppc_emit_lt_goto): New function.
1534 (ppc_emit_le_goto): New function.
1535 (ppc_emit_gt_goto): New function.
1536 (ppc_emit_ge_goto): New function.
1537 (ppc_write_goto_address): New function.
1538 (ppc_emit_ops_impl): New static variable.
1539 (ppc64v1_emit_prologue): New function.
1540 (ppc64v2_emit_prologue): New function.
1541 (ppc64_emit_epilogue): New function.
1542 (ppc64_emit_add): New function.
1543 (ppc64_emit_sub): New function.
1544 (ppc64_emit_mul): New function.
1545 (ppc64_emit_lsh): New function.
1546 (ppc64_emit_rsh_signed): New function.
1547 (ppc64_emit_rsh_unsigned): New function.
1548 (ppc64_emit_ext): New function.
1549 (ppc64_emit_zero_ext): New function.
1550 (ppc64_emit_log_not): New function.
1551 (ppc64_emit_bit_and): New function.
1552 (ppc64_emit_bit_or): New function.
1553 (ppc64_emit_bit_xor): New function.
1554 (ppc64_emit_bit_not): New function.
1555 (ppc64_emit_equal): New function.
1556 (ppc64_emit_less_signed): New function.
1557 (ppc64_emit_less_unsigned): New function.
1558 (ppc64_emit_ref): New function.
1559 (ppc64_emit_const): New function.
1560 (ppc64v1_emit_reg): New function.
1561 (ppc64v2_emit_reg): New function.
1562 (ppc64_emit_pop): New function.
1563 (ppc64_emit_stack_flush): New function.
1564 (ppc64_emit_swap): New function.
1565 (ppc64v1_emit_call): New function.
1566 (ppc64v2_emit_call): New function.
1567 (ppc64v1_emit_int_call_1): New function.
1568 (ppc64v2_emit_int_call_1): New function.
1569 (ppc64v1_emit_void_call_2): New function.
1570 (ppc64v2_emit_void_call_2): New function.
1571 (ppc64_emit_if_goto): New function.
1572 (ppc64_emit_eq_goto): New function.
1573 (ppc64_emit_ne_goto): New function.
1574 (ppc64_emit_lt_goto): New function.
1575 (ppc64_emit_le_goto): New function.
1576 (ppc64_emit_gt_goto): New function.
1577 (ppc64_emit_ge_goto): New function.
1578 (ppc64v1_emit_ops_impl): New static variable.
1579 (ppc64v2_emit_ops_impl): New static variable.
1580 (ppc_emit_ops): New function.
1581 (linux_low_target): Wire in ppc_emit_ops.
1583 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1584 Marcin Kościelnicki <koriakin@0x04.net>
1587 * Makefile.in: Add powerpc-*-ipa.o
1588 * configure.srv: Add ipa_obj for powerpc*-linux.
1589 * linux-ppc-ipa.c: New file.
1590 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1592 (PPC_FIELD): New macro.
1593 (PPC_SEXT): New macro.
1594 (PPC_OP6): New macro.
1595 (PPC_BO): New macro.
1596 (PPC_LI): New macro.
1597 (PPC_BD): New macro.
1598 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1599 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1600 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1601 (ppc_get_thread_area): New function.
1602 (is_elfv2_inferior): New function.
1603 (gen_ds_form): New function.
1604 (GEN_STD): New macro.
1605 (GEN_STDU): New macro.
1606 (GEN_LD): New macro.
1607 (GEN_LDU): New macro.
1608 (gen_d_form): New function.
1609 (GEN_ADDI): New macro.
1610 (GEN_ADDIS): New macro.
1611 (GEN_LI): New macro.
1612 (GEN_LIS): New macro.
1613 (GEN_ORI): New macro.
1614 (GEN_ORIS): New macro.
1615 (GEN_LWZ): New macro.
1616 (GEN_STW): New macro.
1617 (GEN_STWU): New macro.
1618 (gen_xfx_form): New function.
1619 (GEN_MFSPR): New macro.
1620 (GEN_MTSPR): New macro.
1621 (GEN_MFCR): New macro.
1622 (GEN_MTCR): New macro.
1623 (GEN_SYNC): New macro.
1624 (GEN_LWSYNC): New macro.
1625 (gen_x_form): New function.
1626 (GEN_OR): New macro.
1627 (GEN_MR): New macro.
1628 (GEN_LWARX): New macro.
1629 (GEN_STWCX): New macro.
1630 (GEN_CMPW): New macro.
1631 (gen_md_form): New function.
1632 (GEN_RLDICL): New macro.
1633 (GEN_RLDICR): New macro.
1634 (gen_i_form): New function.
1636 (GEN_BL): New macro.
1637 (gen_b_form): New function.
1638 (GEN_BNE): New macro.
1639 (GEN_LOAD): New macro.
1640 (GEN_STORE): New macro.
1641 (gen_limm): New function.
1642 (gen_atomic_xchg): New function.
1643 (gen_call): New function.
1644 (ppc_relocate_instruction): New function.
1645 (ppc_install_fast_tracepoint_jump_pad): New function.
1646 (ppc_get_min_fast_tracepoint_insn_len): New function.
1647 (ppc_get_ipa_tdesc_idx): New function.
1648 (the_low_target): Wire in the new functions.
1649 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1651 * linux-ppc-tdesc.h: New file.
1653 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1655 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1656 (alloc_jump_pad_buffer): New function.
1657 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1658 (alloc_jump_pad_buffer): New function.
1659 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1660 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1661 (alloc_jump_pad_buffer): New function.
1662 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1663 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1664 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1665 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1667 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1669 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1670 * linux-amd64-ipa.c: Likewise.
1671 * linux-i386-ipa.c: Likewise.
1672 * linux-s390-ipa.c: Likewise.
1673 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1674 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1675 set_trace_state_variable_value_ptr.
1676 (struct ipa_sym_addresses): Likewise.
1677 (symbol_list): Likewise.
1678 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1679 accessing gdb_collect directly.
1680 (gdb_collect_ptr_type): New typedef.
1681 (get_raw_reg_ptr_type): New typedef.
1682 (get_trace_state_variable_value_ptr_type): New typedef.
1683 (set_trace_state_variable_value_ptr_type): New typedef.
1684 (gdb_collect_ptr): New global.
1685 (get_raw_reg_ptr): New global.
1686 (get_trace_state_variable_value_ptr): New global.
1687 (set_trace_state_variable_value_ptr): New global.
1688 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1689 accessing get_raw_reg directly.
1690 (get_get_tsv_func_addr): Likewise for
1691 get_trace_state_variable_value_ptr.
1692 (get_set_tsv_func_addr): Likewise for
1693 set_trace_state_variable_value_ptr.
1694 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1696 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1698 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1700 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1702 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1704 (relocate_instruction): Remove own_buf.
1705 * server.c (own_buf): Make global.
1706 (handle_v_requests): Make global.
1707 * server.h (own_buf): New declaration.
1708 (handle_v_requests): New prototype.
1710 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1713 * linux-s390-low.c (add_insns): New function.
1714 (s390_emit_prologue): New function.
1715 (s390_emit_epilogue): New function.
1716 (s390_emit_add): New function.
1717 (s390_emit_sub): New function.
1718 (s390_emit_mul): New function.
1719 (s390_emit_lsh): New function.
1720 (s390_emit_rsh_signed): New function.
1721 (s390_emit_rsh_unsigned): New function.
1722 (s390_emit_ext): New function.
1723 (s390_emit_log_not): New function.
1724 (s390_emit_bit_and): New function.
1725 (s390_emit_bit_or): New function.
1726 (s390_emit_bit_xor): New function.
1727 (s390_emit_bit_not): New function.
1728 (s390_emit_equal): New function.
1729 (s390_emit_less_signed): New function.
1730 (s390_emit_less_unsigned): New function.
1731 (s390_emit_ref): New function.
1732 (s390_emit_if_goto): New function.
1733 (s390_emit_goto): New function.
1734 (s390_write_goto_address): New function.
1735 (s390_emit_litpool): New function.
1736 (s390_emit_const): New function.
1737 (s390_emit_call): New function.
1738 (s390_emit_reg): New function.
1739 (s390_emit_pop): New function.
1740 (s390_emit_stack_flush): New function.
1741 (s390_emit_zero_ext): New function.
1742 (s390_emit_swap): New function.
1743 (s390_emit_stack_adjust): New function.
1744 (s390_emit_set_r2): New function.
1745 (s390_emit_int_call_1): New function.
1746 (s390_emit_void_call_2): New function.
1747 (s390_emit_eq_goto): New function.
1748 (s390_emit_ne_goto): New function.
1749 (s390_emit_lt_goto): New function.
1750 (s390_emit_le_goto): New function.
1751 (s390_emit_gt_goto): New function.
1752 (s390_emit_ge_goto): New function.
1753 (s390x_emit_prologue): New function.
1754 (s390x_emit_epilogue): New function.
1755 (s390x_emit_add): New function.
1756 (s390x_emit_sub): New function.
1757 (s390x_emit_mul): New function.
1758 (s390x_emit_lsh): New function.
1759 (s390x_emit_rsh_signed): New function.
1760 (s390x_emit_rsh_unsigned): New function.
1761 (s390x_emit_ext): New function.
1762 (s390x_emit_log_not): New function.
1763 (s390x_emit_bit_and): New function.
1764 (s390x_emit_bit_or): New function.
1765 (s390x_emit_bit_xor): New function.
1766 (s390x_emit_bit_not): New function.
1767 (s390x_emit_equal): New function.
1768 (s390x_emit_less_signed): New function.
1769 (s390x_emit_less_unsigned): New function.
1770 (s390x_emit_ref): New function.
1771 (s390x_emit_if_goto): New function.
1772 (s390x_emit_const): New function.
1773 (s390x_emit_call): New function.
1774 (s390x_emit_reg): New function.
1775 (s390x_emit_pop): New function.
1776 (s390x_emit_stack_flush): New function.
1777 (s390x_emit_zero_ext): New function.
1778 (s390x_emit_swap): New function.
1779 (s390x_emit_stack_adjust): New function.
1780 (s390x_emit_int_call_1): New function.
1781 (s390x_emit_void_call_2): New function.
1782 (s390x_emit_eq_goto): New function.
1783 (s390x_emit_ne_goto): New function.
1784 (s390x_emit_lt_goto): New function.
1785 (s390x_emit_le_goto): New function.
1786 (s390x_emit_gt_goto): New function.
1787 (s390x_emit_ge_goto): New function.
1788 (s390_emit_ops): New function.
1789 (struct linux_target_ops): Fill in emit_ops hook.
1791 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1794 * Makefile.in: Add s390 IPA files.
1795 * configure.srv: Build IPA for s390.
1796 * linux-s390-ipa.c: New file.
1797 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1798 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1799 (tdesc_s390_linux32): Likewise.
1800 (init_registers_s390_linux32v1): Likewise.
1801 (tdesc_s390_linux32v1): Likewise.
1802 (init_registers_s390_linux32v2): Likewise.
1803 (tdesc_s390_linux32v2): Likewise.
1804 (init_registers_s390_linux64): Likewise.
1805 (tdesc_s390_linux64): Likewise.
1806 (init_registers_s390_linux64v1): Likewise.
1807 (tdesc_s390_linux64v1): Likewise.
1808 (init_registers_s390_linux64v2): Likewise.
1809 (tdesc_s390_linux64v2): Likewise.
1810 (init_registers_s390_te_linux64): Likewise.
1811 (tdesc_s390_te_linux64): Likewise.
1812 (init_registers_s390_vx_linux64): Likewise.
1813 (tdesc_s390_vx_linux64): Likewise.
1814 (init_registers_s390_tevx_linux64): Likewise.
1815 (tdesc_s390_tevx_linux64): Likewise.
1816 (init_registers_s390x_linux64): Likewise.
1817 (tdesc_s390x_linux64): Likewise.
1818 (init_registers_s390x_linux64v1): Likewise.
1819 (tdesc_s390x_linux64v1): Likewise.
1820 (init_registers_s390x_linux64v2): Likewise.
1821 (tdesc_s390x_linux64v2): Likewise.
1822 (init_registers_s390x_te_linux64): Likewise.
1823 (tdesc_s390x_te_linux64): Likewise.
1824 (init_registers_s390x_vx_linux64): Likewise.
1825 (tdesc_s390x_vx_linux64): Likewise.
1826 (init_registers_s390x_tevx_linux64): Likewise.
1827 (tdesc_s390x_tevx_linux64): Likewise.
1828 (have_hwcap_s390_vx): New static variable.
1829 (s390_arch_setup): Fill have_hwcap_s390_vx.
1830 (s390_get_thread_area): New function.
1831 (s390_ft_entry_gpr_esa): New const.
1832 (s390_ft_entry_gpr_zarch): New const.
1833 (s390_ft_entry_misc): New const.
1834 (s390_ft_entry_fr): New const.
1835 (s390_ft_entry_vr): New const.
1836 (s390_ft_main_31): New const.
1837 (s390_ft_main_64): New const.
1838 (s390_ft_exit_fr): New const.
1839 (s390_ft_exit_vr): New const.
1840 (s390_ft_exit_misc): New const.
1841 (s390_ft_exit_gpr_esa): New const.
1842 (s390_ft_exit_gpr_zarch): New const.
1843 (append_insns): New function.
1844 (s390_relocate_instruction): New function.
1845 (s390_install_fast_tracepoint_jump_pad): New function.
1846 (s390_get_min_fast_tracepoint_insn_len): New function.
1847 (s390_get_ipa_tdesc_idx): New function.
1848 (struct linux_target_ops): Wire in the above functions.
1849 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1850 * linux-s390-tdesc.h: New file.
1852 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1854 * linux-s390-low.c (s390_supports_tracepoints): New function.
1855 (struct linux_target_ops): Fill supports_tracepoints hook.
1857 2016-03-18 Yao Qi <yao.qi@linaro.org>
1859 * linux-low.c (lwp_signal_can_be_delivered): New function.
1860 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1862 2016-03-18 Yao Qi <yao.qi@linaro.org>
1864 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1865 0 if signal is enqueued. Remove 'signal' from one debugging
1866 message. Move one debugging message to some lines below.
1867 Remove code setting 'signal' to 0.
1869 2016-03-18 Yao Qi <yao.qi@linaro.org>
1871 * linux-low.c (linux_low_filter_event): Remove redundant
1872 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1874 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1876 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1877 (struct linux_target_ops): Wire in the above.
1879 2016-03-03 Yao Qi <yao.qi@linaro.org>
1881 * linux-low.c: Update comments to start_step_over.
1883 2016-03-03 Yao Qi <yao.qi@linaro.org>
1886 * linux-low.c (handle_extended_wait): Set child suspended
1887 if event_lwp->bp_reinsert isn't zero.
1889 2016-03-02 Yao Qi <yao.qi@linaro.org>
1891 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1892 enqueue_pending_signal.
1894 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1896 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1899 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1901 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1902 (s390_regmap_3264) [!__s390x__]: New global.
1903 (s390_collect_ptrace_register): Skip map entries containing -1.
1904 (s390_supply_ptrace_register): Ditto.
1905 (s390_fill_gprs_high): New function.
1906 (s390_store_gprs_high): New function.
1907 (s390_regsets): Add NT_S390_HIGH_GPRS.
1908 (s390_get_hwcap): Enable on 31-bit.
1909 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1910 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1911 Detect NT_S390_HIGH_GPRS.
1912 (s390_usrregs_info_3264): Enable on 31-bit.
1913 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1914 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1916 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1919 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1920 * configure.srv: Ditto.
1921 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1922 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1923 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1924 (init_registers_amd64_linux): Remove prototype.
1925 (tdesc_amd64_linux): Remove declaration.
1926 (get_ipa_tdesc): New function.
1927 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1928 initialize remaining tdescs.
1929 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1930 (init_registers_i386_linux): Remove prototype.
1931 (tdesc_i386_linux): Remove declaration.
1932 (get_ipa_tdesc): New function.
1933 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1934 initialize remaining tdescs.
1935 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1936 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1937 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1938 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1939 (x86_get_ipa_tdesc_idx): New function.
1940 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1941 * linux-x86-tdesc.h: New file.
1942 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1943 (target_get_ipa_tdesc_idx): New macro.
1944 * tracepoint.c (ipa_tdesc_idx): New macro.
1945 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1946 (symbol_list): Add ipa_tdesc_idx.
1947 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1948 (ipa_tdesc): Remove.
1949 (ipa_tdesc_idx): New variable.
1950 (get_context_regcache): Use get_ipa_tdesc.
1951 (gdb_collect): Ditto.
1953 * tracepoint.h (get_ipa_tdesc): New prototype.
1954 (ipa_tdesc): Remove.
1956 2016-02-24 Pedro Alves <palves@redhat.com>
1958 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1959 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1960 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1961 Factor out common code between the USE_SIGTRAP_SIGINFO and
1962 !USE_SIGTRAP_SIGINFO blocks.
1963 (linux_low_filter_event): Call save_stop_reason instead of
1964 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1966 (linux_wait_1): Update comments.
1968 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1970 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1971 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1972 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1973 ppc_insert_point, ppc_remove_point.
1975 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1977 * linux-s390-low.c (s390_supports_z_point_type): New function.
1978 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1980 2016-02-16 Yao Qi <yao.qi@linaro.org>
1982 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1983 PC. Get pc from regcache_read_pc.
1985 2016-02-12 Yao Qi <yao.qi@linaro.org>
1987 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1988 or linux_get_pc_32bit.
1989 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1991 2016-02-12 Yao Qi <yao.qi@linaro.org>
1993 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1994 arm_linux_get_next_pcs_fixup.
1996 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1998 * tracepoint.c (x_tracepoint_action_download): Change
1999 write_inferior_data_ptr to write_inferior_data_pointer.
2000 (cmd_qtstart): Likewise.
2001 (write_inferior_data_ptr): Remove.
2002 (download_agent_expr): Change write_inferior_data_ptr to
2003 write_inferior_data_pointer.
2004 (download_tracepoint_1): Likewise.
2005 (download_tracepoint): Likewise.
2006 (download_trace_state_variables): Likewise.
2008 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2009 Marcin Kościelnicki <koriakin@0x04.net>
2011 * tracepoint.c (struct tracepoint_action_ops): Remove.
2012 (struct tracepoint_action): Remove ops.
2013 (m_tracepoint_action_download, r_tracepoint_action_download)
2014 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2015 size and offset accordingly.
2016 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2017 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2018 (tracepoint_action_send, tracepoint_action_download): New functions.
2019 Helpers for trace action handlers.
2020 (add_tracepoint_action): Remove setup actions ops.
2021 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2023 2016-02-10 Yao Qi <yao.qi@linaro.org>
2025 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2027 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2029 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2031 * configure: Regenerate.
2033 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2035 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2036 void * to gdb_byte *.
2037 * linux-low.c (siginfo_fixup): Likewise.
2038 (linux_xfer_siginfo): Likewise.
2039 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2041 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2043 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2045 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2047 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2049 * linux-x86-low.c [__x86_64__]: Include
2050 "nat/amd64-linux-siginfo.h".
2051 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2052 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2053 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2054 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2055 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2056 (cpt_si_fd, si_timerid, si_overrun): Move from
2057 nat/amd64-linux-siginfo.c.
2058 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2060 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2062 * server.c (skip_to_semicolon): Remove.
2063 (process_point_options): Use strchrnul instead of
2066 2016-01-26 Yao Qi <yao.qi@linaro.org>
2068 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2069 * linux-low.c (install_software_single_step_breakpoints): Don't
2070 call regcache_read_pc.
2071 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2074 2016-01-26 Yao Qi <yao.qi@linaro.org>
2076 * linux-low.c (install_software_single_step_breakpoints): Call
2077 regcache_read_pc instead of get_pc.
2079 2016-01-26 Yao Qi <yao.qi@linaro.org>
2081 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2082 (unblock_async_io): Rename to ...
2083 (block_unblock_async_io): ... it. New function.
2084 (enable_async_io): Don't install SIGIO handler. Unblock it
2086 (disable_async_io): Don't ignore SIGIO. Block it instead.
2087 (initialize_async_io): Install SIGIO handler. Don't call
2090 2016-01-26 Yao Qi <yao.qi@linaro.org>
2092 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2093 first character is '\003', call *the_target->request_interrupt.
2095 2016-01-25 Yao Qi <yao.qi@linaro.org>
2097 * remote-utils.c (new_thread_notify): Remove.
2098 (dead_thread_notify): Likewise.
2099 * remote-utils.h (new_thread_notify): Remove declaration.
2100 (dead_thread_notify): Likewise.
2102 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2104 * gdb.trace/pending.exp: Fix expected message on continue.
2106 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2108 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2109 it works properly on big-endian machines where sizeof (CORE_ADDR)
2112 2016-01-21 Pedro Alves <palves@redhat.com>
2114 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2115 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2116 * configure: Regenerate.
2118 2016-01-21 Yao Qi <yao.qi@linaro.org>
2120 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2121 is_thumb and set it according to CPSR saved on the stack.
2122 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2123 arm_sigreturn_next_pc.
2125 2016-01-18 Yao Qi <yao.qi@linaro.org>
2127 * linux-low.c (linux_set_pc_64bit): New function.
2128 (linux_get_pc_64bit): New function.
2129 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2131 * linux-sparc-low.c (debug_threads): Remove declaration.
2132 (sparc_get_pc): Remove.
2133 (the_low_target): Use linux_get_pc_64bit instead of
2135 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2136 (the_low_target): Use linux_get_pc_64bit and
2139 2016-01-18 Yao Qi <yao.qi@linaro.org>
2141 * linux-arm-low.c (debug_threads): Remove declaration.
2142 (arm_get_pc, arm_set_pc): Remove.
2143 (the_low_target): Use linux_get_pc_32bit and
2145 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2146 (the_low_target): Use linux_get_pc_32bit and
2148 * linux-cris-low.c (debug_threads): Remove declaration.
2149 (cris_get_pc, cris_set_pc,): Remove.
2150 (the_low_target): Use linux_get_pc_32bit and
2152 * linux-crisv32-low.c (debug_threads): Remove declaration.
2153 (cris_get_pc, cris_set_pc): Remove.
2154 (the_low_target): Use linux_get_pc_32bit and
2156 * linux-low.c: Include inttypes.h.
2157 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2158 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2159 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2160 (the_low_target): Use linux_get_pc_32bit and
2162 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2163 (the_low_target): Use linux_get_pc_32bit and
2165 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2166 (the_low_target): Use linux_get_pc_32bit and
2168 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2169 (the_low_target): Use linux_get_pc_32bit and
2171 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2172 (the_low_target): Use linux_get_pc_32bit and
2175 2016-01-18 Gary Benson <gbenson@redhat.com>
2177 * configure.ac (AC_FUNC_FORK): New check.
2178 * config.in: Regenerate.
2179 * configure: Likewise.
2181 2016-01-14 Yao Qi <yao.qi@linaro.org>
2183 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2184 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2185 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2186 arm_get_next_pcs_ctor.
2188 2016-01-12 Josh Stone <jistone@redhat.com>
2189 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2191 * inferiors.h: Include "gdb_vecs.h".
2192 (struct process_info): Add syscalls_to_catch.
2193 * inferiors.c (remove_process): Free syscalls_to_catch.
2194 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2195 syscall_return stops.
2196 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2197 * server.c (handle_general_set): Handle QCatchSyscalls.
2198 (handle_query): Report support for QCatchSyscalls.
2199 * target.h (struct target_ops): Add supports_catch_syscall.
2200 (target_supports_catch_syscall): New macro.
2201 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2202 (struct lwp_info): Add syscall_state.
2203 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2204 Maintain syscall_state and syscalls_to_catch across exec.
2205 (get_syscall_trapinfo): New function, proxy to the_low_target.
2206 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2207 (linux_low_filter_event): Toggle syscall_state entry/return for
2208 syscall traps, and set it ignored for all others.
2209 (gdb_catching_syscalls_p): New function.
2210 (gdb_catch_this_syscall_p): New function.
2211 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2212 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2213 (linux_supports_catch_syscall): New function.
2214 (linux_target_ops): Install it.
2215 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2216 (the_low_target): Install it.
2218 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2220 * acinclude.m4: Include new ../warning.m4 file.
2221 * configure: Regenerated.
2222 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2224 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2226 * ax.c (is_goto_target): Mark static.
2227 * linux-low.c (register_addr): Likewise.
2228 (linux_fetch_registers, linux_store_registers): Likewise.
2229 * mem-break.c (any_persistent_commands): Fix old prototype.
2230 (add_commands_to_breakpoint): Mark static.
2231 * regcache.c (find_register_by_name): Delete unused func.
2232 * remote-utils.c (hex_or_minus_one): Mark static.
2233 * server.c (monitor_show_help): Mark static.
2234 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2235 handle_v_requests): Likewise.
2237 2016-01-12 Pedro Alves <palves@redhat.com>
2239 Remove use of the registered trademark symbol throughout.
2241 2016-01-08 Yao Qi <yao.qi@linaro.org>
2243 * remote-utils.c (getpkt): If c is '\003', call target hook
2246 2016-01-06 Yao Qi <yao.qi@linaro.org>
2248 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2249 linux-aarch32-low.c.
2250 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2251 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2252 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2253 (thumb2_breakpoint): Declare.
2254 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2255 linux-aarch32-low.h.
2256 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2257 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2258 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2260 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2262 * gdbreplay.c (gdbreplay_version): Change copyright year in
2264 * server.c (gdbserver_version): Likewise.
2266 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2268 * server.c (crc32_table): Delete.
2269 (crc32): Use libiberty's xcrc32 function.
2271 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2273 * lynx-low.c (lynx_delete_thread_callback): New function.
2274 (lynx_mourn): Properly delete our process and all of its
2275 threads. Remove call to clear_inferiors.
2277 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2279 * target.c (thread_search_callback): Add check that
2280 the thread_stopped target callback is not NULL before
2283 2015-12-21 Yao Qi <yao.qi@linaro.org>
2285 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2288 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2290 * server.c (handle_query): Call target_supports_software_single_step.
2292 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2294 * linux-low.c (single_step): New function.
2295 (linux_resume_one_lwp_throw): Call single_step.
2296 (start_step_over): Likewise.
2298 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2300 * Makefile.in (SFILES): Append arch/arm-linux.c,
2301 arch/arm-get-next-pcs.c.
2302 (arm-linux.o): New rule.
2303 (arm-get-next-pcs.o): New rule.
2304 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2306 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2307 to linux-aarch32-low.c.
2308 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2309 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2310 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2311 (thumb2_breakpoint_len): Likewise.
2312 (arm_is_thumb_mode): Make non-static.
2313 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2314 from linux-aarch32-low.c.
2315 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2316 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2317 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2318 (thumb2_breakpoint_len): Likewise.
2319 (arm_is_thumb_mode): New declaration.
2320 * linux-arm-low.c: Include arch/arm-linux.h
2321 aarch/arm-get-next-pcs.h, sys/syscall.h.
2322 (get_next_pcs_ops): New struct.
2323 (get_next_pcs_addr_bits_remove): New function.
2324 (get_next_pcs_is_thumb): New function.
2325 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2326 (arm_sigreturn_next_pc): Likewise.
2327 (get_next_pcs_syscall_next_pc): Likewise.
2328 (arm_gdbserver_get_next_pcs): Likewise.
2329 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2331 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2332 * server.h: Include gdb_vecs.h.
2334 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2336 * Makefile.in (SFILES): Append common/common-regcache.c.
2337 (OBS): Append common-regcache.o.
2338 (common-regcache.o): New rule.
2339 * regcache.c (init_register_cache): Initialize cache to
2341 (regcache_raw_read_unsigned): New function.
2342 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2343 register_status enum.
2345 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2347 * linux-aarch64-low.c (the_low_targets): Rename
2348 breakpoint_reinsert_addr to get_next_pcs.
2349 * linux-arm-low.c (the_low_targets): Likewise.
2350 * linux-bfin-low.c (the_low_targets): Likewise.
2351 * linux-cris-low.c (the_low_targets): Likewise.
2352 * linux-crisv32-low.c (the_low_targets): Likewise.
2353 * linux-low.c (can_software_single_step): Likewise.
2354 (install_software_single_step_breakpoints): New function.
2355 (start_step_over): Use install_software_single_step_breakpoints.
2356 * linux-low.h: New CORE_ADDR vector.
2357 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2359 * linux-mips-low.c (the_low_targets): Likewise.
2360 * linux-nios2-low.c (the_low_targets): Likewise.
2361 * linux-sparc-low.c (the_low_targets): Likewise.
2363 2015-12-17 Pedro Alves <palves@redhat.com>
2365 * linux-low.c (linux_kill_one_lwp): Remove references to
2367 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2369 (linux_init_signals): Delete.
2370 (initialize_low): Adjust.
2371 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2373 2015-12-16 Pedro Alves <palves@redhat.com>
2375 * configure.ac (compiler warning flags): When testing a
2376 -Wno-foo option, check whether -Wfoo works instead.
2377 * configure: Regenerate.
2379 2015-12-11 Don Breazeal <donb@codesourcery.com>
2381 * server.c (process_serial_event): Don't exit from gdbserver
2382 in remote mode if there are still active inferiors.
2384 2015-12-11 Yao Qi <yao.qi@linaro.org>
2386 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2387 arm_breakpoint_at if the process is 32-bit.
2389 2015-12-11 Yao Qi <yao.qi@linaro.org>
2391 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2394 2015-12-07 Yao Qi <yao.qi@linaro.org>
2396 * configure.srv: Append arm.o to srv_tgtobj for
2397 aarch64*-*-linux* target.
2398 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2399 from linux-arm-low.c.
2400 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2401 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2402 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2403 (thumb2_breakpoint_len): Likewise.
2404 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2405 (arm_breakpoint_kinds): Likewise.
2406 (arm_breakpoint_kind_from_pc): Likewise.
2407 (arm_sw_breakpoint_from_kind): Likewise.
2408 (arm_breakpoint_kind_from_current_state): Likewise.
2409 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2410 (arm_sw_breakpoint_from_kind): Declare.
2411 (arm_breakpoint_kind_from_current_state): Declare.
2412 (arm_breakpoint_at): Declare.
2413 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2414 arm_sw_breakpoint_from_kind if process is 32-bit.
2415 (aarch64_breakpoint_kind_from_pc): New function.
2416 (aarch64_breakpoint_kind_from_current_state): New function.
2417 (the_low_target): Initialize fields breakpoint_kind_from_pc
2418 and breakpoint_kind_from_current_state.
2419 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2420 linux-aarch32-low.c.
2421 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2422 (arm_breakpoint, arm_breakpoint_len): Likewise.
2423 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2424 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2425 (arm_is_thumb_mode): Likewise.
2426 (arm_breakpoint_at): Likewise.
2427 (arm_breakpoint_kind_from_pc): Likewise.
2428 (arm_sw_breakpoint_from_kind): Likewise.
2429 (arm_breakpoint_kind_from_current_state): Likewise.
2432 2015-08-04 Yao Qi <yao.qi@linaro.org>
2434 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2435 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2436 * server.c (extended_protocol): Remove "static".
2437 * server.h (extended_protocol): Declare it.
2439 2015-12-04 Josh Stone <jistone@redhat.com>
2441 * target.h (struct target_ops) <arch_setup>: Rename to ...
2442 (struct target_ops) <post_create_inferior>: ... this.
2443 (target_arch_setup): Rename to ...
2444 (target_post_create_inferior): ... this, calling post_create_inferior.
2445 * server.c (start_inferior): Update target_arch_setup calls to
2446 target_post_create_inferior.
2447 * linux-low.c (linux_low_ptrace_options): Forward declare.
2448 (linux_arch_setup): Update its comment for general use.
2449 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2450 (struct linux_target_ops): Use linux_post_create_inferior.
2451 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2452 to post_create_inferior.
2453 * nto-low.c (struct nto_target_ops): Likewise.
2454 * spu-low.c (struct spu_target_ops): Likewise.
2455 * win32-low.c (struct win32_target_ops): Likewise.
2457 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2459 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2461 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2463 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2464 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2465 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2466 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2467 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2468 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2469 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2470 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2471 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2472 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2473 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2474 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2476 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2478 * linux-low.c (linux_look_up_symbols): Don't call
2479 linux_supports_traceclone.
2480 * linux-low.h (thread_db_init): Remove use_events argument.
2481 * thread-db.c (thread_db_use_event): Remove global variable.
2482 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2483 (struct thread_db) <td_create_bp>: Remove field.
2484 (thread_db_create_event): Remove function.
2485 (thread_db_enable_reporting): Likewise.
2486 (find_one_thread): Don't check for thread_db_use_events.
2487 (attach_thread): Likewise.
2488 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2489 (try_thread_db_load_1): Don't check for thread_db_use_events.
2490 (thread_db_init): Remove use_events argument and thread events
2492 (remove_thread_event_breakpoints): Remove function.
2493 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2495 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2497 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2499 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2500 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2501 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2502 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2503 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2505 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2507 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2508 * linux-low.c (can_hardware_single_step): Use
2509 supports_hardware_single_step.
2510 (can_software_single_step): New function.
2511 (start_step_over): Call can_software_single_step.
2512 (linux_supports_hardware_single_step): New function.
2513 (struct target_ops) <supports_software_single_step>: Initialize.
2514 * linux-low.h (struct linux_target_ops)
2515 <supports_hardware_single_step>: Initialize.
2516 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2517 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2518 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2519 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2520 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2521 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2522 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2523 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2524 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2525 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2527 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2528 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2530 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2531 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2532 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2534 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2535 * target.h (struct target_ops): <supports_software_single_step>:
2537 (target_supports_software_single_step): New macro.
2539 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2541 * linux-low.c (linux_wait_1): Fix pc advance condition.
2542 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2543 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2545 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2547 * linux-arm-low.c (arm_is_thumb_mode): New function.
2548 (arm_breakpoint_at): Use arm_is_thumb_mode.
2549 (arm_breakpoint_kind_from_current_state): New function.
2550 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2552 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2553 (linux_breakpoint_kind_from_current_state): New function.
2554 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2555 * linux-low.h (struct linux_target_ops)
2556 <breakpoint_kind_from_current_state>: New field.
2557 * target.h (struct target_ops): Likewise.
2558 (target_breakpoint_kind_from_current_state): New macro.
2560 2015-11-30 Pedro Alves <palves@redhat.com>
2562 * linux-low.c (linux_resume): Wake up the event loop before
2565 2015-11-30 Pedro Alves <palves@redhat.com>
2567 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2569 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2571 * target.c (struct thread_search): New structure.
2572 (thread_search_callback): New function.
2573 (prev_general_thread): New global.
2574 (prepare_to_access_memory, done_accessing_memory): New functions.
2575 * target.h (prepare_to_access_memory, done_accessing_memory):
2576 Replace macros with function declarations.
2578 2015-11-30 Pedro Alves <palves@redhat.com>
2581 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2582 report TARGET_WAITKIND_NO_RESUMED.
2583 * remote-utils.c (prepare_resume_reply): Handle
2584 TARGET_WAITKIND_NO_RESUMED.
2585 * server.c (report_no_resumed): New global.
2586 (handle_query) <qSupported>: Handle "no-resumed+". Report
2587 "no-resumed+" support.
2588 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2589 return error if the client doesn't support no-resumed events.
2590 (push_stop_notification): New function.
2591 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2592 events if the client supports them.
2594 2015-11-30 Pedro Alves <palves@redhat.com>
2596 * linux-low.c (thread_still_has_status_pending_p): Don't check
2598 (lwp_resumed): New function.
2599 (status_pending_p_callback): Return early if the LWP is not
2600 supposed to be resumed.
2602 2015-11-30 Pedro Alves <palves@redhat.com>
2604 * linux-low.c (handle_extended_wait): Assert that the LWP's
2605 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2606 thread create events, leave the new child's status pending.
2607 (linux_low_filter_event): If GDB wants to hear about thread exit
2608 events, leave the LWP marked dead and don't delete it.
2609 (linux_wait_for_event_filtered): Don't check for thread exit.
2610 (filter_exit_event): New function.
2611 (linux_wait_1): Use it, when returning an exit event.
2612 (linux_resume_one_lwp_throw): Assert that the LWP's
2613 waitstatus is TARGET_WAITKIND_IGNORE.
2614 * remote-utils.c (prepare_resume_reply): Handle
2615 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2616 * server.c (report_thread_events): New global.
2617 (handle_general_set): Handle QThreadEvents.
2618 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2619 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2620 TARGET_WAITKIND_THREAD_EXITED.
2621 * server.h (report_thread_events): Declare.
2623 2015-11-30 Pedro Alves <palves@redhat.com>
2625 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2626 the thread's last_resume_kind was resume_stop.
2628 2015-11-30 Pedro Alves <palves@redhat.com>
2630 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2633 2015-11-30 Pedro Alves <palves@redhat.com>
2635 * server.c (handle_v_requests): Handle vCtrlC.
2637 2015-11-30 Pedro Alves <palves@redhat.com>
2639 * gdbthread.h (find_any_thread_of_pid): Declare.
2640 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2642 * server.c (handle_query): If current_thread is NULL, look for
2643 another thread of the selected process.
2645 2015-11-26 Daniel Colascione <dancol@dancol.org>
2646 Simon Marchi <simon.marchi@ericsson.com>
2648 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2649 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2651 * target.h (struct target_ops) <thread_name>: New field.
2652 (target_thread_name): New macro.
2654 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2656 * regcache.h (regcache_invalidate_pid): Add declaration.
2657 * regcache.c (regcache_invalidate_pid): New function, extracted
2658 from regcache_invalidate.
2659 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2660 Add trivial documentation comment.
2661 * lynx-low.c: Use regcache_invalidate_pid instead of
2662 regcache_invalidate.
2664 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2666 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2667 and Elf64_auxv_t if the target is Android.
2669 2015-11-22 Doug Evans <xdje42@gmail.com>
2671 * target.h: #include <sys/types.h>.
2673 2015-11-19 Pedro Alves <palves@redhat.com>
2675 * linux-low.c (linux_process_qsupported): Change prototype.
2677 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2679 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2680 and adjust to loop over all features.
2681 * server.c (handle_query) <qSupported>: Adjust to call
2682 target_process_qsupported once, passing it a vector of unprocessed
2684 * target.h (struct target_ops) <process_qsupported>: Change
2686 (target_process_qsupported): Adjust.
2688 2015-11-19 Pedro Alves <palves@redhat.com>
2690 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2692 * configure: Regenerate.
2694 2015-11-19 Pedro Alves <palves@redhat.com>
2696 * configure: Regenerate.
2698 2015-11-19 Yao Qi <yao.qi@linaro.org>
2700 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2703 2015-11-19 Yao Qi <yao.qi@linaro.org>
2705 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2706 (struct aarch64_operand): Move enum out.
2708 2015-11-19 Yao Qi <yao.qi@linaro.org>
2710 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2711 struct user_fpsimd_state *.
2712 (aarch64_store_fpregset): Likewise.
2714 2015-11-19 Yao Qi <yao.qi@linaro.org>
2716 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2717 struct user_pt_regs *.
2718 (aarch64_store_gregset): Likewise.
2720 2015-11-18 Pedro Alves <palves@redhat.com>
2722 * Makefile.in (all_object_files): Add $IPA_OBJS.
2724 2015-11-17 Pedro Alves <palves@redhat.com>
2726 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2727 GDB_SIGNAL_0 and gdb_signal_to_string.
2729 2015-11-17 Pedro Alves <palves@redhat.com>
2731 * win32-low.c (handle_output_debug_string): Remove parameter.
2732 (win32_kill): Remove our_status local and adjust call to
2733 handle_output_debug_string.
2734 (get_child_debug_event): Adjust call to
2735 handle_output_debug_string.
2737 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2739 * linux-mips-low.c (mips_fill_gregset): Add cast.
2740 (mips_store_gregset): Likewise.
2741 (mips_fill_fpregset): Likewise.
2742 (mips_store_fpregset): Likewise.
2744 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2746 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2749 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2751 * linux-mips-low.c (mips_linux_new_thread): Change type of
2752 watch_type to enum target_hw_bp_type.
2754 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2756 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2757 Change return type to arm_hwbp_type.
2759 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2761 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2762 (arm_store_gregset): Likewise.
2763 * linux-arm-low.c (arm_get_hwcap): Likewise.
2764 (arm_read_description): Likewise.
2766 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2768 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2770 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2772 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2773 (ppc_fill_vsxregset): Likewise.
2774 (ppc_store_vsxregset): Likewise.
2775 (ppc_fill_vrregset): Likewise.
2776 (ppc_store_vrregset): Likewise.
2777 (ppc_fill_evrregset): Likewise.
2778 (ppc_store_evrregset): Likewise.
2780 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2782 * linux-ppc-low.c (ppc_usrregs_info): Remove
2783 forward-declaration.
2784 (ppc_arch_setup): Move lower in file.
2786 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2788 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2789 (ps_pdwrite): Likewise.
2791 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2793 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2794 to after assert checks.
2796 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2798 * proc-service.c (ps_pdread): Add/adjust casts.
2799 (ps_pdwrite): Add/adjust casts.
2801 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2803 * server.c (handle_search_memory_1): Cast return value of
2806 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2808 * server.c (write_qxfer_response): Change type of data to
2811 2015-10-29 Pedro Alves <palves@redhat.com>
2813 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2815 2015-10-29 Pedro Alves <palves@redhat.com>
2817 * tracepoint.c (clear_installed_tracepoints): Add casts.
2819 2015-10-29 Pedro Alves <palves@redhat.com>
2821 * server.c (handle_v_cont, process_serial_event): Add enum
2822 gdb_signal casts to signal parsing code.
2824 2015-10-29 Pedro Alves <palves@redhat.com>
2826 * linux-low.h (NULL_REGSET): Define.
2827 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2828 * linux-arm-low.c (arm_regsets): Likewise.
2829 * linux-crisv32-low.c (cris_regsets): Likewise.
2830 * linux-m68k-low.c (m68k_regsets): Likewise.
2831 * linux-mips-low.c (mips_regsets): Likewise.
2832 * linux-nios2-low.c (nios2_regsets): Likewise.
2833 * linux-ppc-low.c (ppc_regsets): Likewise.
2834 * linux-s390-low.c (s390_regsets): Likewise.
2835 * linux-sh-low.c (sh_regsets): Likewise.
2836 * linux-sparc-low.c (sparc_regsets): Likewise.
2837 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2838 * linux-tile-low.c (tile_regsets): Likewise.
2839 * linux-x86-low.c (x86_regsets): Likewise.
2840 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2842 2015-10-29 Pedro Alves <palves@redhat.com>
2844 * linux-low.h (NULL_REGSET): Define.
2845 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2846 * linux-arm-low.c (arm_regsets): Likewise.
2847 * linux-crisv32-low.c (cris_regsets): Likewise.
2848 * linux-m68k-low.c (m68k_regsets): Likewise.
2849 * linux-mips-low.c (mips_regsets): Likewise.
2850 * linux-nios2-low.c (nios2_regsets): Likewise.
2851 * linux-ppc-low.c (ppc_regsets): Likewise.
2852 * linux-s390-low.c (s390_regsets): Likewise.
2853 * linux-sh-low.c (sh_regsets): Likewise.
2854 * linux-sparc-low.c (sparc_regsets): Likewise.
2855 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2856 * linux-tile-low.c (tile_regsets): Likewise.
2857 * linux-x86-low.c (x86_regsets): Likewise.
2858 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2860 2015-10-26 Doug Evans <dje@google.com>
2862 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2864 2015-10-26 Doug Evans <dje@google.com>
2866 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2868 2015-10-26 Doug Evans <dje@google.com>
2870 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2872 (attach_thread, find_new_threads_callback): Ditto.
2874 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2876 * mem-break.h (set_breakpoint_data): Remove.
2878 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2880 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2881 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2882 (initialize_low): Remove set_breakpoint_data call.
2883 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2884 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2885 (initialize_low): Remove set_breakpoint_data call.
2886 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2887 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2888 (initialize_low): Remove set_breakpoint_data call.
2890 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2892 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2893 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2894 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2895 * target.h (target_breakpoint_kind_from_pc): New macro.
2897 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2899 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2900 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2901 the default breakpoint kind.
2903 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2905 * linux-arm-low.c (arm_supports_z_point_type): Add software
2908 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2910 * linux-arm-low.c: Refactor breakpoint definitions.
2911 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2912 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2914 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2916 * Makefile.in: Add arm.c/o.
2917 * configure.srv: Likewise.
2918 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2919 (arm_breakpoint_kind_from_pc): New function.
2920 (arm_sw_breakpoint_from_kind): Return proper kind.
2921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2923 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2925 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2927 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2928 (struct raw_breakpoint) <size>: Remove.
2929 (struct raw_breakpoint) <kind>: Add.
2930 (bp_size): New function.
2931 (bp_opcode): Likewise.
2932 (find_raw_breakpoint_at): Adjust for kind.
2933 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2934 (remove_memory_breakpoint): Adjust for kind call bp_size.
2935 (set_raw_breakpoint_at): Adjust for kind.
2936 (set_breakpoint): Likewise.
2937 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2938 (delete_raw_breakpoint): Adjust for kind.
2939 (delete_breakpoint): Likewise.
2940 (find_gdb_breakpoint): Likewise.
2941 (set_gdb_breakpoint_1): Likewise.
2942 (set_gdb_breakpoint): Likewise.
2943 (delete_gdb_breakpoint_1): Likewise.
2944 (delete_gdb_breakpoint): Likewise.
2945 (uninsert_raw_breakpoint): Likewise.
2946 (reinsert_raw_breakpoint): Likewise.
2947 (set_breakpoint_data): Remove.
2948 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2949 (check_mem_read): Adjust for kind call bp_size.
2950 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2951 (clone_one_breakpoint): Adjust for kind.
2952 * mem-break.h (set_gdb_breakpoint): Likewise.
2953 (delete_gdb_breakpoint): Likewise.
2954 * server.c (process_serial_event): Likewise.
2956 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2958 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2959 (struct linux_target_ops) <breakpoint>: Remove.
2960 (struct linux_target_ops) <breakpoint_len>: Remove.
2961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2963 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2964 (arm_sw_breakpoint_from_kind): New function.
2965 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2966 (struct linux_target_ops) <breakpoint>: Remove.
2967 (struct linux_target_ops) <breakpoint_len>: Remove.
2968 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2969 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2970 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2971 (struct linux_target_ops) <breakpoint>: Remove.
2972 (struct linux_target_ops) <breakpoint_len>: Remove.
2973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2975 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2976 (struct linux_target_ops) <breakpoint>: Remove.
2977 (struct linux_target_ops) <breakpoint_len>: Remove.
2978 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2979 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2980 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2981 and sw_breakpoint_from_kind to increment the pc.
2982 (linux_breakpoint_kind_from_pc): New function.
2983 (linux_sw_breakpoint_from_kind): New function.
2984 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2985 (initialize_low): Call breakpoint_kind_from_pc and
2986 sw_breakpoint_from_kind to replace breakpoint_data/len.
2987 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2989 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2990 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2991 (struct linux_target_ops) <breakpoint>: Remove.
2992 (struct linux_target_ops) <breakpoint_len>: Remove.
2993 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2994 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2995 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2996 (struct linux_target_ops) <breakpoint>: Remove.
2997 (struct linux_target_ops) <breakpoint_len>: Remove.
2998 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2999 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3000 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3001 (struct linux_target_ops) <breakpoint>: Remove.
3002 (struct linux_target_ops) <breakpoint_len>: Remove.
3003 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3004 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3005 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3006 (struct linux_target_ops) <breakpoint>: Remove.
3007 (struct linux_target_ops) <breakpoint_len>: Remove.
3008 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3009 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3010 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3011 (struct linux_target_ops) <breakpoint>: Remove.
3012 (struct linux_target_ops) <breakpoint_len>: Remove.
3013 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3014 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3015 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3016 (struct linux_target_ops) <breakpoint>: Remove.
3017 (struct linux_target_ops) <breakpoint_len>: Remove.
3018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3019 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3020 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3021 (struct linux_target_ops) <breakpoint>: Remove.
3022 (struct linux_target_ops) <breakpoint_len>: Remove.
3023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3025 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3026 (struct linux_target_ops) <breakpoint>: Remove.
3027 (struct linux_target_ops) <breakpoint_len>: Remove.
3028 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3029 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3030 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3031 (struct linux_target_ops) <breakpoint>: Remove.
3032 (struct linux_target_ops) <breakpoint_len>: Remove.
3033 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3034 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3035 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3036 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3037 (struct linux_target_ops) <breakpoint>: Remove.
3038 (struct linux_target_ops) <breakpoint_len>: Remove.
3039 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3040 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3041 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3042 (struct linux_target_ops) <breakpoint>: Remove.
3043 (struct linux_target_ops) <breakpoint_len>: Remove.
3044 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3045 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3047 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3049 * linux-cris-low.c (cris_get_pc): Remove void arg.
3051 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3053 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3056 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3058 * inferiors.c (thread_pid_matches_callback): New function.
3059 (find_thread_process): New function.
3060 (remove_thread): Reset current_thread.
3061 (remove_process): Assert threads have been removed first.
3063 2015-10-15 Yao Qi <yao.qi@linaro.org>
3065 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3067 (aarch64_remove_point): Likewise.
3068 * regcache.c (regcache_register_size): New function.
3070 2015-10-12 Yao Qi <yao.qi@linaro.org>
3072 * linux-aarch64-low.c: Update all callers as emit_load_store
3073 is renamed to aarch64_emit_load_store.
3075 2015-10-12 Yao Qi <yao.qi@linaro.org>
3077 * linux-aarch64-low.c: Update all callers of function renaming
3078 from emit_insn to aarch64_emit_insn.
3080 2015-10-12 Yao Qi <yao.qi@linaro.org>
3082 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3083 arch/aarch64-insn.h.
3084 (struct aarch64_memory_operand): Likewise.
3086 (emit_insn): Move to arch/aarch64-insn.c.
3087 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3088 (emit_load_store): Move to arch/aarch64-insn.c.
3089 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3090 (can_encode_int32): Remove.
3092 2015-10-12 Yao Qi <yao.qi@linaro.org>
3094 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3095 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3096 (aarch64_relocate_instruction): Likewise.
3097 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3098 (struct aarch64_insn_visitor): Likewise.
3100 2015-10-12 Yao Qi <yao.qi@linaro.org>
3102 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3103 (struct aarch64_insn_visitor): New.
3104 (struct aarch64_insn_relocation_data): New.
3105 (aarch64_ftrace_insn_reloc_b): New function.
3106 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3107 (aarch64_ftrace_insn_reloc_cb): Likewise.
3108 (aarch64_ftrace_insn_reloc_tb): Likewise.
3109 (aarch64_ftrace_insn_reloc_adr): Likewise.
3110 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3111 (aarch64_ftrace_insn_reloc_others): Likewise.
3113 (aarch64_relocate_instruction): Use visitor.
3115 2015-10-12 Yao Qi <yao.qi@linaro.org>
3117 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3118 int. Add argument buf.
3119 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3120 aarch64_relocate_instruction.
3122 2015-10-12 Yao Qi <yao.qi@linaro.org>
3124 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3125 argument insn. Remove local variable insn. Don't call
3127 (aarch64_install_fast_tracepoint_jump_pad): Call
3130 2015-09-30 Yao Qi <yao.qi@linaro.org>
3132 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3133 (emit_load_store_pair): Likewise.
3135 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3137 * dll.c (match_dll): Add cast(s).
3138 (unloaded_dll): Likewise.
3139 * linux-low.c (second_thread_of_pid_p): Likewise.
3140 (delete_lwp_callback): Likewise.
3141 (count_events_callback): Likewise.
3142 (select_event_lwp_callback): Likewise.
3143 (linux_set_resume_request): Likewise.
3144 * server.c (accumulate_file_name_length): Likewise.
3145 (emit_dll_description): Likewise.
3146 (handle_qxfer_threads_worker): Likewise.
3147 (visit_actioned_threads): Likewise.
3148 * thread-db.c (any_thread_of): Likewise.
3149 * tracepoint.c (same_process_p): Likewise.
3150 (match_blocktype): Likewise.
3151 (build_traceframe_info_xml): Likewise.
3153 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3155 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3157 (gdb_unparse_agent_expr): Likewise.
3158 * hostio.c (require_data): Likewise.
3159 (handle_pread): Likewise.
3160 * linux-low.c (disable_regset): Likewise.
3161 (fetch_register): Likewise.
3162 (store_register): Likewise.
3163 (get_dynamic): Likewise.
3164 (linux_qxfer_libraries_svr4): Likewise.
3165 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3166 (set_fast_tracepoint_jump): Likewise.
3167 (uninsert_fast_tracepoint_jumps_at): Likewise.
3168 (reinsert_fast_tracepoint_jumps_at): Likewise.
3169 (validate_inserted_breakpoint): Likewise.
3170 (clone_agent_expr): Likewise.
3171 * regcache.c (init_register_cache): Likewise.
3172 * remote-utils.c (putpkt_binary_1): Likewise.
3173 (decode_M_packet): Likewise.
3174 (decode_X_packet): Likewise.
3175 (look_up_one_symbol): Likewise.
3176 (relocate_instruction): Likewise.
3177 (monitor_output): Likewise.
3178 * server.c (handle_search_memory): Likewise.
3179 (handle_qxfer_exec_file): Likewise.
3180 (handle_qxfer_libraries): Likewise.
3181 (handle_qxfer): Likewise.
3182 (handle_query): Likewise.
3183 (handle_v_cont): Likewise.
3184 (handle_v_run): Likewise.
3185 (captured_main): Likewise.
3186 * target.c (write_inferior_memory): Likewise.
3187 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3188 * tracepoint.c (init_trace_buffer): Likewise.
3189 (add_tracepoint_action): Likewise.
3190 (add_traceframe): Likewise.
3191 (add_traceframe_block): Likewise.
3192 (cmd_qtdpsrc): Likewise.
3193 (cmd_qtdv): Likewise.
3194 (cmd_qtstatus): Likewise.
3195 (response_source): Likewise.
3196 (response_tsv): Likewise.
3197 (cmd_qtnotes): Likewise.
3198 (gdb_collect): Likewise.
3199 (initialize_tracepoint): Likewise.
3201 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3203 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3204 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3205 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3207 (enum aarch64_condition_codes): New enum.
3208 (w0): New static global.
3211 (struct aarch64_memory_operand) <type>: New
3212 MEMORY_OPERAND_POSTINDEX type.
3213 (postindex_memory_operand): New helper function.
3214 (emit_ret): New function.
3215 (emit_load_store_pair): New function, factored out of emit_stp
3216 with support for MEMORY_OPERAND_POSTINDEX.
3217 (emit_stp): Rewrite using emit_load_store_pair.
3218 (emit_ldp): New function.
3219 (emit_load_store): Likewise.
3220 (emit_ldr): Mention post-index instruction in comment.
3221 (emit_ldrh): New function.
3222 (emit_ldrb): New function.
3223 (emit_ldrsw): Mention post-index instruction in comment.
3224 (emit_str): Likewise.
3225 (emit_subs): New function.
3226 (emit_cmp): Likewise.
3227 (emit_and): Likewise.
3228 (emit_orr): Likewise.
3229 (emit_orn): Likewise.
3230 (emit_eor): Likewise.
3231 (emit_mvn): Likewise.
3232 (emit_lslv): Likewise.
3233 (emit_lsrv): Likewise.
3234 (emit_asrv): Likewise.
3235 (emit_mul): Likewise.
3236 (emit_sbfm): Likewise.
3237 (emit_sbfx): Likewise.
3238 (emit_ubfm): Likewise.
3239 (emit_ubfx): Likewise.
3240 (emit_csinc): Likewise.
3241 (emit_cset): Likewise.
3242 (emit_nop): Likewise.
3243 (emit_ops_insns): New helper function.
3244 (emit_pop): Likewise.
3245 (emit_push): Likewise.
3246 (aarch64_emit_prologue): New function.
3247 (aarch64_emit_epilogue): Likewise.
3248 (aarch64_emit_add): Likewise.
3249 (aarch64_emit_sub): Likewise.
3250 (aarch64_emit_mul): Likewise.
3251 (aarch64_emit_lsh): Likewise.
3252 (aarch64_emit_rsh_signed): Likewise.
3253 (aarch64_emit_rsh_unsigned): Likewise.
3254 (aarch64_emit_ext): Likewise.
3255 (aarch64_emit_log_not): Likewise.
3256 (aarch64_emit_bit_and): Likewise.
3257 (aarch64_emit_bit_or): Likewise.
3258 (aarch64_emit_bit_xor): Likewise.
3259 (aarch64_emit_bit_not): Likewise.
3260 (aarch64_emit_equal): Likewise.
3261 (aarch64_emit_less_signed): Likewise.
3262 (aarch64_emit_less_unsigned): Likewise.
3263 (aarch64_emit_ref): Likewise.
3264 (aarch64_emit_if_goto): Likewise.
3265 (aarch64_emit_goto): Likewise.
3266 (aarch64_write_goto_address): Likewise.
3267 (aarch64_emit_const): Likewise.
3268 (aarch64_emit_call): Likewise.
3269 (aarch64_emit_reg): Likewise.
3270 (aarch64_emit_pop): Likewise.
3271 (aarch64_emit_stack_flush): Likewise.
3272 (aarch64_emit_zero_ext): Likewise.
3273 (aarch64_emit_swap): Likewise.
3274 (aarch64_emit_stack_adjust): Likewise.
3275 (aarch64_emit_int_call_1): Likewise.
3276 (aarch64_emit_void_call_2): Likewise.
3277 (aarch64_emit_eq_goto): Likewise.
3278 (aarch64_emit_ne_goto): Likewise.
3279 (aarch64_emit_lt_goto): Likewise.
3280 (aarch64_emit_le_goto): Likewise.
3281 (aarch64_emit_gt_goto): Likewise.
3282 (aarch64_emit_ge_got): Likewise.
3283 (aarch64_emit_ops_impl): New static global variable.
3284 (aarch64_emit_ops): New target function, return
3285 &aarch64_emit_ops_impl.
3286 (struct linux_target_ops): Install it.
3288 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3290 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3291 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3293 * linux-aarch64-ipa.c: New file.
3294 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3296 (aarch64_get_thread_area): New target method.
3297 (extract_signed_bitfield): New helper function.
3298 (aarch64_decode_ldr_literal): New function.
3299 (enum aarch64_opcodes): New enum.
3300 (struct aarch64_register): New struct.
3301 (struct aarch64_operand): New struct.
3302 (x0): New static global.
3311 (aarch64_register): New helper function.
3312 (register_operand): Likewise.
3313 (immediate_operand): Likewise.
3314 (struct aarch64_memory_operand): New struct.
3315 (offset_memory_operand): New helper function.
3316 (preindex_memory_operand): Likewise.
3317 (enum aarch64_system_control_registers): New enum.
3318 (ENCODE): New macro.
3319 (emit_insn): New helper function.
3320 (emit_b): New function.
3321 (emit_bcond): Likewise.
3322 (emit_cb): Likewise.
3323 (emit_tb): Likewise.
3324 (emit_blr): Likewise.
3325 (emit_stp): Likewise.
3326 (emit_ldp_q_offset): Likewise.
3327 (emit_stp_q_offset): Likewise.
3328 (emit_load_store): Likewise.
3329 (emit_ldr): Likewise.
3330 (emit_ldrsw): Likewise.
3331 (emit_str): Likewise.
3332 (emit_ldaxr): Likewise.
3333 (emit_stxr): Likewise.
3334 (emit_stlr): Likewise.
3335 (emit_data_processing_reg): Likewise.
3336 (emit_data_processing): Likewise.
3337 (emit_add): Likewise.
3338 (emit_sub): Likewise.
3339 (emit_mov): Likewise.
3340 (emit_movk): Likewise.
3341 (emit_mov_addr): Likewise.
3342 (emit_mrs): Likewise.
3343 (emit_msr): Likewise.
3344 (emit_sevl): Likewise.
3345 (emit_wfe): Likewise.
3346 (append_insns): Likewise.
3347 (can_encode_int32_in): New helper function.
3348 (aarch64_relocate_instruction): New function.
3349 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3350 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3351 (struct linux_target_ops): Install aarch64_get_thread_area,
3352 aarch64_install_fast_tracepoint_jump_pad and
3353 aarch64_get_min_fast_tracepoint_insn_len.
3355 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3357 * Makefile.in (aarch64-insn.o): New rule.
3358 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3360 2015-09-21 Yao Qi <yao.qi@linaro.org>
3362 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3364 2015-09-21 Yao Qi <yao.qi@linaro.org>
3366 * tracepoint.c (max_jump_pad_size): Remove.
3368 2015-09-18 Yao Qi <yao.qi@linaro.org>
3370 * linux-aarch64-low.c: Don't include sys/uio.h.
3371 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3373 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3375 * tracepoint.c (eval_result_type): Change prototype.
3376 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3378 2015-09-15 Pedro Alves <palves@redhat.com>
3380 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3381 Check whether to report exec events instead of checking whether
3382 multiprocess is enabled.
3384 2015-09-15 Pedro Alves <palves@redhat.com>
3387 * remote-utils.c (prepare_resume_reply): Merge
3388 TARGET_WAITKIND_VFORK_DONE switch case with the
3389 TARGET_WAITKIND_FORKED case.
3391 2015-09-15 Yao Qi <yao.qi@linaro.org>
3393 * server.c (handle_query): Check string comparison using
3394 "else if" instead of "if".
3396 2015-09-15 Yao Qi <yao.qi@linaro.org>
3398 * server.c (vCont_supported): New global variable.
3399 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3400 matches. Append ";vContSupported+" to own_buf.
3401 (handle_v_requests): Append ";s;S" to own_buf if target supports
3402 hardware single step or vCont_supported is false.
3403 (capture_main): Set vCont_supported to zero.
3405 2015-09-15 Yao Qi <yao.qi@linaro.org>
3407 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3409 (linux_supports_hardware_single_step): ... New function.
3410 (linux_target_ops): Update.
3411 * lynx-low.c (lynx_target_ops): Set field
3412 supports_hardware_single_step to target_can_do_hardware_single_step.
3413 * nto-low.c (nto_target_ops): Likewise.
3414 * spu-low.c (spu_target_ops): Likewise.
3415 * win32-low.c (win32_target_ops): Likewise.
3416 * target.c (target_can_do_hardware_single_step): New function.
3417 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3418 Remove. <supports_hardware_single_step>: New field.
3419 (target_supports_conditional_breakpoints): Remove.
3420 (target_supports_hardware_single_step): New macro.
3421 (target_can_do_hardware_single_step): Declare.
3422 * server.c (handle_query): Use target_supports_hardware_single_step
3423 instead of target_supports_conditional_breakpoints.
3425 2015-09-15 Yao Qi <yao.qi@linaro.org>
3427 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3429 (struct linux_target_ops the_low_target): Install
3430 aarch64_linux_siginfo_fixup.
3432 2015-09-11 Don Breazeal <donb@codesourcery.com>
3433 Luis Machado <lgustavo@codesourcery.com>
3435 * linux-low.c (linux_mourn): Static declaration.
3436 (linux_arch_setup): Move in front of
3437 handle_extended_wait.
3438 (linux_arch_setup_thread): New function.
3439 (handle_extended_wait): Handle exec events. Call
3440 linux_arch_setup_thread. Make event_lwp argument a
3441 pointer-to-a-pointer.
3442 (check_zombie_leaders): Do not check stopped threads.
3443 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3444 (linux_low_filter_event): Add lwp and thread for exec'ing
3445 non-leader thread if leader thread has been deleted.
3446 Refactor code into linux_arch_setup_thread and call it.
3447 Pass child lwp pointer by reference to handle_extended_wait.
3448 (linux_wait_for_event_filtered): Update comment.
3449 (linux_wait_1): Prevent clobbering exec event status.
3450 (linux_supports_exec_events): New function.
3451 (linux_target_ops) <supports_exec_events>: Initialize new member.
3452 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3454 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3455 * server.c (report_exec_events): New global variable.
3456 (handle_query): Handle qSupported query for exec-events feature.
3457 (captured_main): Initialize report_exec_events.
3458 * server.h (report_exec_events): Declare new global variable.
3459 * target.h (struct target_ops) <supports_exec_events>: New
3461 (target_supports_exec_events): New macro.
3462 * win32-low.c (win32_target_ops) <supports_exec_events>:
3463 Initialize new member.
3465 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3467 * linux-low.c (linux_low_enable_btrace): Remove.
3468 (linux_target_ops): Replace linux_low_enable_btrace with
3469 linux_enable_btrace.
3471 2015-09-03 Yao Qi <yao.qi@linaro.org>
3473 * linux-aarch64-low.c (aarch64_insert_point): Call
3474 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3477 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3479 * linux-low.c (check_stopped_by_breakpoint): Use
3480 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3482 2015-08-27 Pedro Alves <palves@redhat.com>
3484 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3486 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3488 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3489 the XNEW-family equivalent.
3490 (compile_bytecodes): Likewise.
3491 * dll.c (loaded_dll): Likewise.
3492 * event-loop.c (append_callback_event): Likewise.
3493 (create_file_handler): Likewise.
3494 (create_file_event): Likewise.
3495 * hostio.c (handle_open): Likewise.
3496 * inferiors.c (add_thread): Likewise.
3497 (add_process): Likewise.
3498 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3499 * linux-arm-low.c (arm_new_process): Likewise.
3500 (arm_new_thread): Likewise.
3501 * linux-low.c (add_to_pid_list): Likewise.
3502 (linux_add_process): Likewise.
3503 (handle_extended_wait): Likewise.
3504 (add_lwp): Likewise.
3505 (enqueue_one_deferred_signal): Likewise.
3506 (enqueue_pending_signal): Likewise.
3507 (linux_resume_one_lwp_throw): Likewise.
3508 (linux_resume_one_thread): Likewise.
3509 (linux_read_memory): Likewise.
3510 (linux_write_memory): Likewise.
3511 * linux-mips-low.c (mips_linux_new_process): Likewise.
3512 (mips_linux_new_thread): Likewise.
3513 (mips_add_watchpoint): Likewise.
3514 * linux-x86-low.c (initialize_low_arch): Likewise.
3515 * lynx-low.c (lynx_add_process): Likewise.
3516 * mem-break.c (set_raw_breakpoint_at): Likewise.
3517 (set_breakpoint): Likewise.
3518 (add_condition_to_breakpoint): Likewise.
3519 (add_commands_to_breakpoint): Likewise.
3520 (clone_agent_expr): Likewise.
3521 (clone_one_breakpoint): Likewise.
3522 * regcache.c (new_register_cache): Likewise.
3523 * remote-utils.c (look_up_one_symbol): Likewise.
3524 * server.c (queue_stop_reply): Likewise.
3525 (start_inferior): Likewise.
3526 (queue_stop_reply_callback): Likewise.
3527 (handle_target_event): Likewise.
3528 * spu-low.c (fetch_ppc_memory): Likewise.
3529 (store_ppc_memory): Likewise.
3530 * target.c (set_target_ops): Likewise.
3531 * thread-db.c (thread_db_load_search): Likewise.
3532 (try_thread_db_load_1): Likewise.
3533 * tracepoint.c (add_tracepoint): Likewise.
3534 (add_tracepoint_action): Likewise.
3535 (create_trace_state_variable): Likewise.
3536 (cmd_qtdpsrc): Likewise.
3537 (cmd_qtro): Likewise.
3538 (add_while_stepping_state): Likewise.
3539 * win32-low.c (child_add_thread): Likewise.
3540 (get_image_name): Likewise.
3542 2015-08-25 Yao Qi <yao.qi@linaro.org>
3544 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3546 2015-08-25 Yao Qi <yao.qi@linaro.org>
3548 * Makefile.in (aarch64-linux.o): New rule.
3549 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3551 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3552 (aarch64_init_debug_reg_state): Make it extern.
3553 (aarch64_linux_prepare_to_resume): Remove.
3555 2015-08-25 Yao Qi <yao.qi@linaro.org>
3557 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3558 lwp_arch_private_info and ptid_of_lwp.
3560 2015-08-25 Yao Qi <yao.qi@linaro.org>
3562 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3563 Find proc_info by find_process_pid. All callers updated.
3565 2015-08-25 Yao Qi <yao.qi@linaro.org>
3567 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3569 (debug_reg_change_callback): Remove.
3570 (aarch64_notify_debug_reg_change): Remove.
3572 2015-08-25 Yao Qi <yao.qi@linaro.org>
3574 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3575 Call current_lwp_ptid.
3577 2015-08-25 Yao Qi <yao.qi@linaro.org>
3579 * linux-aarch64-low.c (debug_reg_change_callback): Use
3582 2015-08-25 Yao Qi <yao.qi@linaro.org>
3584 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3586 2015-08-25 Yao Qi <yao.qi@linaro.org>
3588 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3590 2015-08-25 Yao Qi <yao.qi@linaro.org>
3592 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3595 2015-08-25 Yao Qi <yao.qi@linaro.org>
3597 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3599 (debug_reg_change_callback): Remove argument entry and add argument
3600 lwp. Remove local variable thread. Don't print thread id in the
3601 debugging output. Don't check whether pid of thread equals to pid.
3602 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3603 iterate_over_lwps instead find_inferior.
3605 2015-08-24 Pedro Alves <palves@redhat.com>
3607 * inferiors.c (get_first_process): New function.
3608 * inferiors.h (get_first_process): New declaration.
3609 * remote-utils.c (read_ptid): Default to the first process in the
3610 list, instead of to the current thread's process.
3612 2015-08-24 Pedro Alves <palves@redhat.com>
3614 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3615 * event-loop.c: Likewise.
3616 * remote-utils.c: Likewise.
3617 * tracepoint.c: Likewise.
3619 2015-08-24 Pedro Alves <palves@redhat.com>
3621 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3624 2015-08-21 Pedro Alves <palves@redhat.com>
3626 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3627 instead of literal 1.
3629 2015-08-21 Pedro Alves <palves@redhat.com>
3631 * tdesc.c (default_description): Explicitly zero-initialize.
3633 2015-08-21 Pedro Alves <palves@redhat.com>
3636 * inferiors.c (remove_thread): Discard any pending stop reply for
3638 * server.c (remove_all_on_match_pid): Rename to ...
3639 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3641 (discard_queued_stop_replies): Change parameter to a ptid. Now
3643 (handle_v_kill, kill_inferior_callback, captured_main)
3644 (process_serial_event): Adjust.
3645 * server.h (discard_queued_stop_replies): Declare.
3647 2015-08-21 Pedro Alves <palves@redhat.com>
3649 * linux-low.c (wait_for_sigstop): Always switch to no thread
3650 selected if the previously current thread dies.
3651 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3652 process instead of the current thread's.
3653 * remote-utils.c (input_interrupt): Don't check if there's no
3655 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3656 current thread to the general thread fails, error out.
3657 (handle_qxfer_auxv, handle_qxfer_libraries)
3658 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3659 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3660 (handle_query): Check if there's a thread selected instead of
3661 checking whether there's any thread in the thread list.
3662 (handle_qxfer_threads, handle_qxfer_btrace)
3663 (handle_qxfer_btrace_conf): Don't error out early if there's no
3664 thread in the thread list.
3665 (handle_v_cont, myresume): Don't set the current thread to the
3667 (process_serial_event) <Hg handling>: Also set thread_id if the
3668 previous general thread is still alive.
3669 (process_serial_event) <g/G handling>: If setting the current
3670 thread to the general thread fails, error out.
3671 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3672 thread's lwp instead of the current thread's.
3673 * target.c (set_desired_thread): If the desired thread was not
3674 found, leave the current thread pointing to NULL. Return an int
3675 (boolean) indicating success.
3676 * target.h (set_desired_thread): Change return type to int.
3678 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3680 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3681 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3683 (ps_get_thread_area): New function.
3685 2015-08-19 Gary Benson <gbenson@redhat.com>
3687 * hostio.c (handle_pread): Do not attempt to read more data
3688 than hostio_reply_with_data can fit in a packet.
3690 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3692 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3694 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3696 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3698 2015-08-06 Pedro Alves <palves@redhat.com>
3700 * tracepoint.c (expr_eval_result): Now an int.
3702 2015-08-06 Pedro Alves <palves@redhat.com>
3704 * gdbthread.h (struct regcache): Forward declare.
3705 (struct thread_info) <regcache_data>: Now a struct regcache
3707 * inferiors.c (inferior_regcache_data)
3708 (set_inferior_regcache_data): Now work with struct regcache
3710 * inferiors.h (struct regcache): Forward declare.
3711 (inferior_regcache_data, set_inferior_regcache_data): Now work
3712 with struct regcache pointers.
3713 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3714 (free_register_cache_thread): Remove struct regcache pointer
3717 2015-08-06 Pedro Alves <palves@redhat.com>
3719 * server.c (captured_main): On error, print the exception message
3720 to stderr, and if run_once is set, throw a quit.
3722 2015-08-06 Pedro Alves <palves@redhat.com>
3724 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3727 2015-08-06 Pedro Alves <palves@redhat.com>
3729 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3730 reading beyond the passed in buffer length.
3732 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3734 * tracepoint.c (symbol_list) <required>: Remove.
3736 2015-08-06 Pedro Alves <palves@redhat.com>
3738 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3739 count if stopping and suspending threads.
3740 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3741 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3742 (linux_detach): Complete an ongoing step-over.
3743 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3745 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3746 (linux_wait_1): If passing a signal to the inferior after
3747 finishing a step-over, unsuspend and re-resume all lwps. If we
3748 see a single-step event but the thread should be continuing, don't
3749 pass the trap to gdb.
3750 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3751 internal_error instead of gdb_assert.
3752 (enqueue_pending_signal): New function.
3753 (check_ptrace_stopped_lwp_gone): Add debug output.
3754 (start_step_over): Use internal_error instead of gdb_assert.
3755 (complete_ongoing_step_over): New function.
3756 (linux_resume_one_thread): Don't resume a suspended thread.
3757 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3760 2015-08-06 Pedro Alves <palves@redhat.com>
3762 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3763 (linux_thread_alive): Use lwp_is_marked_dead.
3764 (extended_event_reported): Delete.
3765 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3766 instead of extended_event_reported.
3767 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3769 (lwp_is_marked_dead): New function.
3770 (lwp_running): Use lwp_is_marked_dead.
3771 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3774 2015-08-06 Pedro Alves <palves@redhat.com>
3776 * linux-low.c (linux_wait_1): Move fork event output out of the
3777 !report_to_gdb check. Pass event_child->waitstatus to
3778 target_waitstatus_to_string instead of ourstatus.
3780 2015-08-04 Yao Qi <yao.qi@linaro.org>
3782 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3783 if current_thread is 32 bit.
3785 2015-08-04 Yao Qi <yao.qi@linaro.org>
3787 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3788 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3789 * server.c (extended_protocol): Remove "static".
3790 * server.h (extended_protocol): Declare it.
3792 2015-08-04 Yao Qi <yao.qi@linaro.org>
3794 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3795 both aarch64 and aarch32.
3796 (aarch64_set_pc): Likewise.
3798 2015-08-04 Yao Qi <yao.qi@linaro.org>
3800 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3801 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3802 arm-with-neon.xml to srv_xmlfiles.
3803 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3804 (is_64bit_tdesc): New function.
3805 (aarch64_linux_read_description): New function.
3806 (aarch64_arch_setup): Call aarch64_linux_read_description.
3807 (regs_info): Rename to regs_info_aarch64.
3808 (aarch64_regs_info): Return right regs_info.
3809 (initialize_low_arch): Call initialize_low_arch_aarch32.
3811 2015-08-04 Yao Qi <yao.qi@linaro.org>
3813 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3814 * linux-aarch32-low.c: New file.
3815 * linux-aarch32-low.h: New file.
3816 * linux-arm-low.c (arm_fill_gregset): Move it to
3817 linux-aarch32-low.c.
3818 (arm_store_gregset): Likewise.
3819 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3820 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3821 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3822 (regs_info): Rename to regs_info_arm.
3823 (arm_regs_info): Return regs_info_aarch32 if
3824 have_ptrace_getregset is 1 and target description is
3825 arm_with_neon or arm_with_vfpv3.
3826 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3827 Call initialize_low_arch_aarch32 instead.
3829 2015-08-04 Yao Qi <yao.qi@linaro.org>
3831 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3832 * linux-low.c: ... here.
3833 * linux-low.h (have_ptrace_getregset): Declare it.
3835 2015-08-04 Pedro Alves <palves@redhat.com>
3837 * thread-db.c (struct thread_db): Use new typedefs.
3838 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3840 (disable_thread_event_reporting): Cast result of dlsym to
3841 destination function pointer type.
3842 (thread_db_mourn): Use td_ta_delete_ftype.
3844 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3846 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3848 (CDX_BREAKPOINT): Define for R2.
3849 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3850 (the_low_target): Add comments.
3852 2015-07-30 Yao Qi <yao.qi@linaro.org>
3854 * linux-arm-low.c (arm_hwcap): Remove it.
3855 (arm_read_description): New local variable arm_hwcap. Don't
3856 set arm_hwcap to zero.
3858 2015-07-30 Yao Qi <yao.qi@linaro.org>
3860 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3861 Use regcache->tdesc instead.
3862 (arm_store_wmmxregset): Likewise.
3863 (arm_fill_vfpregset): Likewise.
3864 (arm_store_vfpregset): Likewise.
3866 2015-07-30 Yao Qi <yao.qi@linaro.org>
3868 * linux-arm-low.c: Include arch/arm.h.
3869 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3870 (arm_store_gregset): Likewise.
3872 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3874 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3875 ptrace's 4th parameter.
3877 2015-07-27 Yao Qi <yao.qi@linaro.org>
3879 * configure.srv (case aarch64*-*-linux*): Don't set
3882 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3884 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3886 * linux-arm-low.c: Likewise.
3887 * linux-cris-low.c: Likewise.
3888 * linux-crisv32-low.c: Likewise.
3889 * linux-low.c: Likewise.
3890 * linux-m68k-low.c: Likewise.
3891 * linux-mips-low.c: Likewise.
3892 * linux-nios2-low.c: Likewise.
3893 * linux-s390-low.c: Likewise.
3894 * linux-sparc-low.c: Likewise.
3895 * linux-tic6x-low.c: Likewise.
3896 * linux-tile-low.c: Likewise.
3897 * linux-x86-low.c: Likewise.
3899 2015-07-24 Pedro Alves <palves@redhat.com>
3901 * config.in: Regenerate.
3902 * configure: Regenerate.
3904 2015-07-24 Pedro Alves <palves@redhat.com>
3906 * acinclude.m4: Include ../ptrace.m4.
3907 * configure.ac: Call GDB_AC_PTRACE.
3908 * config.in, configure: Regenerate.
3910 2015-07-24 Yao Qi <yao.qi@linaro.org>
3912 * linux-low.c (linux_create_inferior): Remove setting to
3913 proc->priv->new_inferior.
3914 (linux_attach): Likewise.
3915 (linux_low_filter_event): Likewise.
3916 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3918 2015-07-24 Yao Qi <yao.qi@linaro.org>
3920 * linux-low.c (linux_arch_setup): New function.
3921 (linux_low_filter_event): If proc->tdesc is NULL and
3922 proc->attached is true, call the_low_target.arch_setup.
3923 Otherwise, keep status pending, and return.
3924 (linux_resume_one_lwp_throw): Don't call get_pc if
3925 thread->while_stepping isn't NULL. Don't call
3926 get_thread_regcache if proc->tdesc is NULL.
3927 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3928 (linux_target_ops): Install arch_setup.
3929 * server.c (start_inferior): Call the_target->arch_setup.
3930 * target.h (struct target_ops) <arch_setup>: New field.
3931 (target_arch_setup): New marco.
3932 * lynx-low.c (lynx_target_ops): Update.
3933 * nto-low.c (nto_target_ops): Update.
3934 * spu-low.c (spu_target_ops): Update.
3935 * win32-low.c (win32_target_ops): Update.
3937 2015-07-24 Yao Qi <yao.qi@linaro.org>
3939 * linux-low.c (linux_add_process): Don't set
3940 proc->priv->new_inferior.
3941 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3942 (linux_attach): Likewise.
3944 2015-07-24 Yao Qi <yao.qi@linaro.org>
3946 * server.c (start_inferior): Code refactor.
3948 2015-07-24 Yao Qi <yao.qi@linaro.org>
3950 * server.c (process_serial_event): Set general_thread.
3952 2015-07-21 Yao Qi <yao.qi@linaro.org>
3954 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3955 aarch64_linux_get_debug_reg_capacity.
3957 2015-07-17 Yao Qi <yao.qi@linaro.org>
3959 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3960 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3961 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3962 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3963 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3964 (AARCH64_HWP_ALIGNMENT): Likewise.
3965 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3966 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3967 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3968 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3969 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3970 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3971 (struct aarch64_debug_reg_state): Likewise.
3972 (struct arch_lwp_info): Likewise.
3973 (aarch64_align_watchpoint): Likewise.
3974 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3975 (aarch64_watchpoint_length): Likewise.
3976 (aarch64_point_encode_ctrl_reg): Likewise
3977 (aarch64_point_is_aligned): Likewise.
3978 (aarch64_align_watchpoint): Likewise.
3979 (aarch64_linux_set_debug_regs):
3980 (aarch64_dr_state_insert_one_point): Likewise.
3981 (aarch64_dr_state_remove_one_point): Likewise.
3982 (aarch64_handle_breakpoint): Likewise.
3983 (aarch64_handle_aligned_watchpoint): Likewise.
3984 (aarch64_handle_unaligned_watchpoint): Likewise.
3985 (aarch64_handle_watchpoint): Likewise.
3987 2015-07-17 Yao Qi <yao.qi@linaro.org>
3989 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3990 and don't aarch64_get_debug_reg_state. All callers update.
3991 (aarch64_handle_aligned_watchpoint): Likewise.
3992 (aarch64_handle_unaligned_watchpoint): Likewise.
3993 (aarch64_handle_watchpoint): Likewise.
3994 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3995 (aarch64_remove_point): Likewise.
3997 2015-07-17 Yao Qi <yao.qi@linaro.org>
3999 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4001 (aarch64_handle_unaligned_watchpoint): Likewise.
4003 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4005 Revert the previous 3 commits:
4006 Move gdb_regex* to common/
4007 Move linux_find_memory_regions_full & co.
4008 gdbserver build-id attribute generator
4010 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4011 Jan Kratochvil <jan.kratochvil@redhat.com>
4013 gdbserver build-id attribute generator.
4014 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4015 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4016 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4018 (get_dynamic): Use find_pdhr to traverse program headers.
4019 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4020 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4021 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4022 (get_hex_build_id): New.
4023 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4024 to reply XML document.
4026 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4027 Jan Kratochvil <jan.kratochvil@redhat.com>
4029 * target.c: Include target/target-utils.h and fcntl.h.
4030 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4031 (target_fileio_read_stralloc): New functions.
4033 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4035 * Makefile.in (OBS): Add gdb_regex.o.
4037 * config.in: Rebuilt.
4038 * configure: Rebuilt.
4040 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4041 Jan Kratochvil <jan.kratochvil@redhat.com>
4043 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4044 * Makefile.in (OBS): Add target-utils.o.
4045 (linux-maps.o, target-utils.o): New.
4046 * configure.srv (srv_linux_obj): Add linux-maps.o.
4048 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4050 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4052 (the_low_target): Install it.
4054 2015-07-14 Pedro Alves <palves@redhat.com>
4056 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4057 Instead, ignore ECHILD, and throw an error for other errnos.
4059 2015-07-10 Pedro Alves <palves@redhat.com>
4061 * event-loop.c (struct callback_event) <data>: Change type to
4062 gdb_client_data instance instead of gdb_client_data pointer.
4063 (append_callback_event): Adjust.
4065 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4067 * linux-aarch64-low.c: Add comments for each linux_target_ops
4068 method. Remove comments already covered in target_ops and
4069 linux_target_ops definitions.
4070 (the_low_target): Add comments for each unimplemented method.
4072 2015-07-09 Yao Qi <yao.qi@linaro.org>
4074 * linux-aarch64-low.c (aarch64_regmap): Remove.
4075 (aarch64_usrregs_info): Remove.
4076 (regs_info): Set field usrregs to NULL.
4078 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4080 * linux-low.c: Include "rsp-low.h"
4081 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4082 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4083 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4084 (handle_btrace_enable_pt): New.
4085 (handle_btrace_general_set): Support "pt".
4086 (handle_btrace_conf_general_set): Support "pt:size".
4088 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4090 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4093 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4095 * linux-aarch64-low.c: Remove comment about endianness.
4096 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4097 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4100 2015-06-24 Gary Benson <gbenson@redhat.com>
4102 * linux-i386-ipa.c (stdint.h): Do not include.
4103 * lynx-i386-low.c (stdint.h): Likewise.
4104 * lynx-ppc-low.c (stdint.h): Likewise.
4105 * mem-break.c (stdint.h): Likewise.
4106 * thread-db.c (stdint.h): Likewise.
4107 * tracepoint.c (stdint.h): Likewise.
4108 * win32-low.c (stdint.h): Likewise.
4110 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4112 * server.c (write_qxfer_response): Update call to
4113 remote_escape_output.
4115 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4116 Jan Kratochvil <jan.kratochvil@redhat.com>
4118 Merge multiple hex conversions.
4119 * gdbreplay.c (tohex): Rename to 'fromhex'.
4120 (logchar): Use fromhex.
4122 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4124 * server.c (handle_qxfer_libraries): Set `version' attribute for
4127 2015-06-10 Gary Benson <gbenson@redhat.com>
4129 * target.h (struct target_ops) <multifs_open>: New field.
4130 <multifs_unlink>: Likewise.
4131 <multifs_readlink>: Likewise.
4132 * linux-low.c (nat/linux-namespaces.h): New include.
4133 (linux_target_ops): Initialize the_target->multifs_open,
4134 the_target->multifs_unlink and the_target->multifs_readlink.
4135 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4136 * hostio.c (hostio_fs_pid): New static variable.
4137 (hostio_handle_new_gdb_connection): New function.
4138 (handle_setfs): Likewise.
4139 (handle_open): Use the_target->multifs_open as appropriate.
4140 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4141 (handle_readlink): Use the_target->multifs_readlink as
4143 (handle_vFile): Handle vFile:setfs packets.
4144 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4145 after target_handle_new_gdb_connection.
4147 2015-06-10 Gary Benson <gbenson@redhat.com>
4149 * configure.ac (AC_CHECK_FUNCS): Add setns.
4150 * config.in: Regenerate.
4151 * configure: Likewise.
4152 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4153 (linux-namespaces.o): New rule.
4154 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4156 2015-06-09 Gary Benson <gbenson@redhat.com>
4158 * hostio.c (handle_open): Process mode argument with
4159 fileio_to_host_mode.
4161 2015-06-01 Yao Qi <yao.qi@linaro.org>
4163 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4164 * linux-x86-low.c: Likewise.
4166 2015-05-28 Don Breazeal <donb@codesourcery.com>
4168 * linux-low.c (handle_extended_wait): Initialize
4169 thread_info.last_resume_kind for new fork children.
4171 2015-05-15 Pedro Alves <palves@redhat.com>
4173 * target.h (target_handle_new_gdb_connection): Rewrite using if
4174 wrapped in do/while.
4176 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4178 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4179 * configure, config.in: Regenerate.
4180 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4183 2015-05-12 Don Breazeal <donb@codesourcery.com>
4185 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4186 PTRACE_EVENT_VFORK_DONE.
4187 (linux_low_ptrace_options, extended_event_reported): Add vfork
4189 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4190 and "vforkdone" for RSP 'T' Stop Reply Packet.
4191 * server.h (report_vfork_events): Declare
4194 2015-05-12 Don Breazeal <donb@codesourcery.com>
4196 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4197 (the_low_target) <new_fork>: Initialize new member.
4198 * linux-arm-low.c (arm_new_fork): New function.
4199 (the_low_target) <new_fork>: Initialize new member.
4200 * linux-low.c (handle_extended_wait): Call new target function
4202 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4203 * linux-mips-low.c (mips_add_watchpoint): New function
4204 extracted from mips_insert_point.
4205 (the_low_target) <new_fork>: Initialize new member.
4206 (mips_linux_new_fork): New function.
4207 (mips_insert_point): Call mips_add_watchpoint.
4208 * linux-x86-low.c (x86_linux_new_fork): New function.
4209 (the_low_target) <new_fork>: Initialize new member.
4211 2015-05-12 Don Breazeal <donb@codesourcery.com>
4213 * linux-low.c (handle_extended_wait): Implement return value,
4214 rename argument 'event_child' to 'event_lwp', handle
4215 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4216 (linux_low_ptrace_options): New function.
4217 (linux_low_filter_event): Call linux_low_ptrace_options,
4218 use different argument fo linux_enable_event_reporting,
4219 use return value from handle_extended_wait.
4220 (extended_event_reported): New function.
4221 (linux_wait_1): Call extended_event_reported and set
4222 status to report fork events.
4223 (linux_write_memory): Add pid to debug message.
4224 (reset_lwp_ptrace_options_callback): New function.
4225 (linux_handle_new_gdb_connection): New function.
4226 (linux_target_ops): Initialize new structure member.
4227 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4228 * lynx-low.c: Initialize new structure member.
4229 * remote-utils.c (prepare_resume_reply): Implement stop reason
4230 "fork" for "T" stop message.
4231 * server.c (handle_query): Call handle_new_gdb_connection.
4232 * server.h (report_fork_events): Declare global flag.
4233 * target.h (struct target_ops) <handle_new_gdb_connection>:
4235 (target_handle_new_gdb_connection): New macro.
4236 * win32-low.c: Initialize new structure member.
4238 2015-05-12 Don Breazeal <donb@codesourcery.com>
4240 * mem-break.c (APPEND_TO_LIST): Define macro.
4241 (clone_agent_expr): New function.
4242 (clone_one_breakpoint): New function.
4243 (clone_all_breakpoints): New function.
4244 * mem-break.h: Declare new functions.
4246 2015-05-12 Don Breazeal <donb@codesourcery.com>
4248 * linux-low.c (linux_supports_fork_events): New function.
4249 (linux_supports_vfork_events): New function.
4250 (linux_target_ops): Initialize new structure members.
4251 (initialize_low): Call linux_check_ptrace_features.
4252 * lynx-low.c (lynx_target_ops): Initialize new structure
4254 * server.c (report_fork_events, report_vfork_events):
4256 (handle_query): Add new features to qSupported packet and
4258 (captured_main): Initialize new global variables.
4259 * target.h (struct target_ops) <supports_fork_events>:
4261 <supports_vfork_events>: New member.
4262 (target_supports_fork_events): New macro.
4263 (target_supports_vfork_events): New macro.
4264 * win32-low.c (win32_target_ops): Initialize new structure
4267 2015-05-12 Gary Benson <gbenson@redhat.com>
4269 * server.c (handle_qxfer_exec_file): Use current process
4272 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4274 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4275 Remove HAVE_PTRACE_GETREGS conditionals.
4276 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4277 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4279 2015-05-08 Yao Qi <yao.qi@linaro.org>
4281 * linux-low.c (linux_supports_conditional_breakpoints): New
4283 (linux_target_ops): Install new target method.
4284 * lynx-low.c (lynx_target_ops): Install NULL hook for
4285 supports_conditional_breakpoints.
4286 * nto-low.c (nto_target_ops): Likewise.
4287 * spu-low.c (spu_target_ops): Likewise.
4288 * win32-low.c (win32_target_ops): Likewise.
4289 * server.c (handle_query): Check
4290 target_supports_conditional_breakpoints.
4291 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4293 (target_supports_conditional_breakpoints): New macro.
4295 2015-05-06 Pedro Alves <palves@redhat.com>
4298 * server.c (start_inferior): If the process exits, mourn it.
4300 2015-04-21 Gary Benson <gbenson@redhat.com>
4302 * hostio.c (fileio_open_flags_to_host): Factored out to
4303 fileio_to_host_openflags in common/fileio.c. Single use
4306 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4308 * linux-xtensa-low.c (xtensa_fill_gregset)
4309 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4312 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4314 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4315 (regs_info): Replace usrregs pointer with NULL.
4317 2015-04-17 Gary Benson <gbenson@redhat.com>
4319 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4320 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4321 * server.c (handle_qxfer_exec_file): New function.
4322 (qxfer_packets): Add exec-file entry.
4323 (handle_query): Report qXfer:exec-file:read as supported packet.
4325 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4327 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4329 2015-04-09 Gary Benson <gbenson@redhat.com>
4331 * hostio-errno.c (errno_to_fileio_error): Remove function.
4332 Update caller to use remote_fileio_to_fio_error.
4334 2015-04-09 Yao Qi <yao.qi@linaro.org>
4336 * linux-low.c (linux_insert_point): Call
4337 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4338 (linux_remove_point): Call remove_memory_breakpoint if type is
4340 * linux-x86-low.c (x86_insert_point): Don't call
4341 insert_memory_breakpoint.
4342 (x86_remove_point): Don't call remove_memory_breakpoint.
4344 2015-04-01 Pedro Alves <palves@redhat.com>
4345 Cleber Rosa <crosa@redhat.com>
4347 * server.c (gdbserver_usage): Reorganize and extend the usage
4350 2015-03-24 Pedro Alves <palves@redhat.com>
4352 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4353 output. Also dump TRAP_TRACE.
4354 (linux_low_filter_event): In debug output, distinguish a
4355 resume_stop SIGSTOP from a delayed SIGSTOP.
4357 2015-03-24 Gary Benson <gbenson@redhat.com>
4359 * linux-x86-low.c (x86_linux_new_thread): Moved to
4361 (x86_linux_prepare_to_resume): Likewise.
4363 2015-03-24 Gary Benson <gbenson@redhat.com>
4365 * Makefile.in (x86-linux-dregs.o): New rule.
4366 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4367 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4368 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4369 (x86_linux_dr_get): Likewise.
4370 (x86_linux_dr_set): Likewise.
4371 (update_debug_registers_callback): Likewise.
4372 (x86_linux_dr_set_addr): Likewise.
4373 (x86_linux_dr_get_addr): Likewise.
4374 (x86_linux_dr_set_control): Likewise.
4375 (x86_linux_dr_get_control): Likewise.
4376 (x86_linux_dr_get_status): Likewise.
4377 (x86_linux_update_debug_registers): Likewise.
4379 2015-03-24 Gary Benson <gbenson@redhat.com>
4381 * linux-x86-low.c (x86_linux_update_debug_registers):
4382 New function, factored out from...
4383 (x86_linux_prepare_to_resume): ...this.
4385 2015-03-24 Gary Benson <gbenson@redhat.com>
4387 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4388 (x86_linux_dr_set): Likewise.
4389 (update_debug_registers_callback): Likewise.
4390 (x86_linux_dr_set_addr): Likewise.
4391 (x86_linux_dr_get_addr): Likewise.
4392 (x86_linux_dr_set_control): Likewise.
4393 (x86_linux_dr_get_control): Likewise.
4394 (x86_linux_dr_get_status): Likewise.
4395 (x86_linux_prepare_to_resume): Likewise.
4397 2015-03-24 Gary Benson <gbenson@redhat.com>
4399 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4400 Use perror_with_name. Pass string through gettext.
4401 (x86_linux_dr_set): Likewise.
4403 2015-03-24 Gary Benson <gbenson@redhat.com>
4405 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4406 (x86_linux_dr_set_addr): ...this.
4407 (x86_dr_low_get_addr): Rename to...
4408 (x86_linux_dr_get_addr): ...this.
4409 (x86_dr_low_set_control): Rename to...
4410 (x86_linux_dr_set_control): ...this.
4411 (x86_dr_low_get_control): Rename to...
4412 (x86_linux_dr_get_control): ...this.
4413 (x86_dr_low_get_status): Rename to...
4414 (x86_linux_dr_get_status): ...this.
4415 (x86_dr_low): Update with new function names.
4417 2015-03-24 Gary Benson <gbenson@redhat.com>
4419 * Makefile.in (x86-linux.o): New rule.
4420 * configure.srv: Add x86-linux.o to relevant targets.
4421 * linux-low.c (lwp_set_arch_private_info): New function.
4422 (lwp_arch_private_info): Likewise.
4423 * linux-x86-low.c: Include nat/x86-linux.h.
4424 (arch_lwp_info): Removed structure.
4425 (update_debug_registers_callback):
4426 Use lwp_set_debug_registers_changed.
4427 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4428 and lwp_set_debug_registers_changed.
4429 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4431 2015-03-24 Gary Benson <gbenson@redhat.com>
4433 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4434 * linux-arm-low.c (arm_new_thread): Likewise.
4435 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4436 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4437 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4438 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4440 2015-03-24 Gary Benson <gbenson@redhat.com>
4442 * linux-low.c (ptid_of_lwp): New function.
4443 (lwp_is_stopped): Likewise.
4444 (lwp_stop_reason): Likewise.
4445 * linux-x86-low.c (update_debug_registers_callback):
4447 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4450 2015-03-24 Gary Benson <gbenson@redhat.com>
4452 * linux-low.h (linux_stop_lwp): Remove declaration.
4454 2015-03-24 Gary Benson <gbenson@redhat.com>
4456 * linux-low.h: Include nat/linux-nat.h.
4457 * linux-low.c (iterate_over_lwps_args): New structure.
4458 (iterate_over_lwps_filter): New function.
4459 (iterate_over_lwps): Likewise.
4460 * linux-x86-low.c (update_debug_registers_callback):
4461 Update signature to what iterate_over_lwps expects.
4462 Remove PID check that iterate_over_lwps now performs.
4463 (x86_dr_low_set_addr): Use iterate_over_lwps.
4464 (x86_dr_low_set_control): Likewise.
4466 2015-03-24 Gary Benson <gbenson@redhat.com>
4468 * linux-x86-low.c (x86_debug_reg_state): New function.
4469 (x86_linux_prepare_to_resume): Use the above.
4471 2015-03-24 Gary Benson <gbenson@redhat.com>
4473 * linux-low.c (current_lwp_ptid): New function.
4474 * linux-x86-low.c: Include nat/linux-nat.h.
4475 (x86_dr_low_get_addr): Use current_lwp_ptid.
4476 (x86_dr_low_get_control): Likewise.
4477 (x86_dr_low_get_status): Likewise.
4479 2015-03-20 Pedro Alves <palves@redhat.com>
4481 * tracepoint.c (cmd_qtstatus): Make "str" const.
4483 2015-03-20 Pedro Alves <palves@redhat.com>
4485 * server.c (handle_general_set): Make "req_str" const.
4487 2015-03-19 Pedro Alves <palves@redhat.com>
4489 * linux-low.c (linux_resume_one_lwp): Rename to ...
4490 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4491 instead call perror_with_name.
4492 (check_ptrace_stopped_lwp_gone): New function.
4493 (linux_resume_one_lwp): Reimplement as wrapper around
4494 linux_resume_one_lwp_throw that swallows errors if the LWP is
4497 2015-03-19 Pedro Alves <palves@redhat.com>
4499 * linux-low.c (count_events_callback, select_event_lwp_callback):
4500 No longer check whether the thread has resume_stop as last resume
4503 2015-03-19 Pedro Alves <palves@redhat.com>
4505 * linux-low.c (count_events_callback, select_event_lwp_callback):
4506 Use the lwp's status_pending_p field, not the thread's.
4508 2015-03-19 Pedro Alves <palves@redhat.com>
4510 * linux-low.c (select_event_lwp_callback): Update comments to
4511 no longer mention SIGTRAP.
4513 2015-03-18 Gary Benson <gbenson@redhat.com>
4515 * server.c (handle_query): Do not report vFile:fstat as supported.
4517 2015-03-11 Gary Benson <gbenson@redhat.com>
4519 * hostio.c (sys/types.h): New include.
4520 (sys/stat.h): Likewise.
4521 (common-remote-fileio.h): Likewise.
4522 (handle_fstat): New function.
4523 (handle_vFile): Handle vFile:fstat packets.
4525 2015-03-11 Gary Benson <gbenson@redhat.com>
4527 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4528 struct stat.st_blocks and struct stat.st_blksize.
4529 * configure: Regenerate.
4530 * config.in: Likewise.
4531 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4532 (OBS): Add common-remote-fileio.o.
4533 (common-remote-fileio.o): New rule.
4535 2015-03-09 Pedro Alves <palves@redhat.com>
4537 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4538 'struct sockaddr' pointer in 'accept' call.
4540 2015-03-09 Pedro Alves <palves@redhat.com>
4543 2015-03-07 Pedro Alves <palves@redhat.com>
4544 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4545 or <winsock2.h> here. Instead include "gdb_socket.h".
4546 (remote_open): Use union gdb_sockaddr_u.
4547 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4548 or <winsock2.h> here. Instead include "gdb_socket.h".
4549 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4550 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4552 (init_named_socket, gdb_agent_helper_thread): Use union
4555 2015-03-07 Pedro Alves <palves@redhat.com>
4557 * configure.ac (build_warnings): Move
4558 -Wdeclaration-after-statement to the C-specific set.
4559 * configure: Regenerate.
4561 2015-03-07 Pedro Alves <palves@redhat.com>
4563 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4564 or <winsock2.h> here. Instead include "gdb_socket.h".
4565 (remote_open): Use union gdb_sockaddr_u.
4566 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4567 or <winsock2.h> here. Instead include "gdb_socket.h".
4568 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4569 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4571 (init_named_socket, gdb_agent_helper_thread): Use union
4574 2015-03-07 Pedro Alves <palves@redhat.com>
4576 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4579 2015-03-06 Yao Qi <yao.qi@linaro.org>
4581 * linux-aarch64-low.c (aarch64_insert_point): Use
4582 show_debug_regs as a boolean.
4583 (aarch64_remove_point): Likewise.
4585 2015-03-05 Pedro Alves <palves@redhat.com>
4587 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4588 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4589 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4590 * nto-low.c (nto_target_ops): Likewise.
4591 * spu-low.c (spu_target_ops): Likewise.
4592 * win32-low.c (win32_target_ops): Likewise.
4594 2015-03-04 Pedro Alves <palves@redhat.com>
4596 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4597 Decide whether a breakpoint triggered based on the SIGTRAP's
4599 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4600 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4601 (linux_low_filter_event): Check for breakpoints before checking
4603 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4605 (linux_stopped_by_sw_breakpoint)
4606 (linux_supports_stopped_by_sw_breakpoint)
4607 (linux_stopped_by_hw_breakpoint)
4608 (linux_supports_stopped_by_hw_breakpoint): New functions.
4609 (linux_target_ops): Install new target methods.
4611 2015-03-04 Pedro Alves <palves@redhat.com>
4613 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4614 * server.c (swbreak_feature, hwbreak_feature): New globals.
4615 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4616 (captured_main): Clear swbreak_feature and hwbreak_feature.
4617 * server.h (swbreak_feature, hwbreak_feature): Declare.
4618 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4619 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4620 supports_stopped_by_hw_breakpoint>: New fields.
4621 (target_supports_stopped_by_sw_breakpoint)
4622 (target_stopped_by_sw_breakpoint)
4623 (target_supports_stopped_by_hw_breakpoint)
4624 (target_stopped_by_hw_breakpoint): Declare.
4626 2015-03-04 Pedro Alves <palves@redhat.com>
4628 enum lwp_stop_reason -> enum target_stop_reason
4629 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4630 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4631 (linux_wait_1, stuck_in_jump_pad_callback)
4632 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4633 (linux_stopped_by_watchpoint):
4634 * linux-low.h (enum lwp_stop_reason): Delete.
4635 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4636 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4638 2015-03-04 Yao Qi <yao.qi@linaro.org>
4640 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4642 2015-03-03 Gary Benson <gbenson@redhat.com>
4644 * hostio.c (handle_vFile): Fix prefix lengths.
4646 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4648 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4651 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4653 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4654 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4655 (clean): Add "rm -f" for above C files.
4656 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4657 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4658 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4659 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4660 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4661 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4662 (init_registers_s390x_vx_linux64)
4663 (init_registers_s390x_tevx_linux64)
4664 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4665 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4667 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4668 (s390_store_vxrs_high): New functions.
4669 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4671 (s390_arch_setup): Add logic for selecting one of the new target
4672 descriptions. Activate the new vector regsets if applicable.
4673 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4674 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4675 and init_registers_s390x_tevx_linux64.
4677 2015-03-01 Pedro Alves <palves@redhat.com>
4679 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4682 2015-02-27 Pedro Alves <palves@redhat.com>
4684 * linux-x86-low.c (u_debugreg_offset): New function.
4685 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4687 2015-02-27 Pedro Alves <palves@redhat.com>
4689 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4690 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4691 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4692 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4693 (ps_lsetfpregs, ps_getpid)
4694 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4695 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4696 (ps_lsetxregs, ps_plog): Declare.
4698 2015-02-27 Pedro Alves <palves@redhat.com>
4700 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4701 IP_AGENT_EXPORT_FUNC.
4702 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4703 IP_AGENT_EXPORT_FUNC.
4704 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4705 (IP_AGENT_EXPORT): Delete.
4706 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4707 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4708 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4709 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4710 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4711 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4712 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4713 (traceframe_read_count, traceframe_write_count)
4714 (traceframes_created, trace_state_variables, get_raw_reg)
4715 (get_trace_state_variable_value, set_trace_state_variable_value)
4716 (ust_loaded, helper_thread_id, cmd_buf): Use
4717 IPA_SYM_EXPORTED_NAME.
4718 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4719 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4720 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4721 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4722 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4723 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4724 EXTERN_C_PUSH/EXTERN_C_POP.
4725 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4726 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4727 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4728 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4729 (traceframe_write_count, traceframe_read_count)
4730 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4731 (about_to_request_buffer_space, get_trace_state_variable_value)
4732 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4733 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4734 EXTERN_C_PUSH/EXTERN_C_POP.
4735 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4736 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4737 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4738 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4739 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4740 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4741 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4742 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4744 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4745 (IP_AGENT_EXPORT_VAR_DECL): Define.
4747 (gdb_agent_get_raw_reg): Declare.
4749 2015-02-27 Tom Tromey <tromey@redhat.com>
4750 Pedro Alves <palves@redhat.com>
4752 Rename symbols whose names are reserved C++ keywords throughout.
4754 2015-02-27 Pedro Alves <palves@redhat.com>
4756 * Makefile.in (COMPILER): New, get it from autoconf.
4757 (CXX): Get from autoconf instead.
4758 (COMPILE.pre): Use COMPILER.
4759 (CC-LD): Rename to ...
4760 (CC_LD): ... this. Use COMPILER.
4761 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4762 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4763 * acinclude.m4: Include build-with-cxx.m4.
4764 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4765 Disable -Werror by default if building in C++ mode.
4766 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4767 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4768 the C++ compiler. Save/restore CXXFLAGS too.
4769 * configure: Regenerate.
4771 2015-02-27 Pedro Alves <palves@redhat.com>
4773 * acinclude.m4: Include libiberty.m4.
4774 * configure.ac: Call libiberty_INIT.
4775 * config.in, configure: Regenerate.
4777 2015-02-26 Pedro Alves <palves@redhat.com>
4779 * linux-low.c (linux_wait_1): When incrementing the PC past a
4780 program breakpoint always use the_low_target.breakpoint_len as
4781 increment, rather than the maximum between that and
4782 the_low_target.decr_pc_after_break.
4784 2015-02-23 Pedro Alves <palves@redhat.com>
4786 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4787 thread was doing a step-over; always adjust the PC if
4788 we stepped over a permanent breakpoint.
4789 (linux_wait_1): If we stepped over breakpoint that was on top of a
4790 permanent breakpoint, manually advance the PC past it.
4792 2015-02-23 Pedro Alves <palves@redhat.com>
4794 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4796 (x86_fill_gregset, x86_store_gregset): Use it when handling
4799 2015-02-20 Pedro Alves <palves@redhat.com>
4801 * thread-db.c: Include "nat/linux-procfs.h".
4802 (thread_db_init): Skip listing new threads if the kernel supports
4803 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4805 2015-02-20 Pedro Alves <palves@redhat.com>
4807 * linux-low.c (status_pending_p_callback): Use ptid_match.
4809 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4811 PR breakpoints/16812
4812 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4813 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4814 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4816 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4818 PR breakpoints/15956
4819 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4821 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4823 * linux-low.c (linux_low_btrace_conf): Print size.
4824 * server.c (handle_btrace_conf_general_set): New.
4825 (hanle_general_set): Call handle_btrace_conf_general_set.
4826 (handle_query): Report Qbtrace-conf:bts:size as supported.
4828 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4830 * linux-low.c (linux_low_enable_btrace): Update parameters.
4831 (linux_low_btrace_conf): New.
4832 (linux_target_ops)<to_btrace_conf>: Initialize.
4833 * server.c (current_btrace_conf): New.
4834 (handle_btrace_enable): Rename to ...
4835 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4836 to target_enable_btrace. Update comment. Update users.
4837 (handle_qxfer_btrace_conf): New.
4838 (qxfer_packets): Add btrace-conf entry.
4839 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4840 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4841 (target_ops)<read_btrace_conf>: New.
4842 (target_enable_btrace): Update parameters.
4843 (target_read_btrace_conf): New.
4845 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4847 * server.c (handle_btrace_general_set): Remove call to
4848 target_supports_btrace.
4849 (supported_btrace_packets): New.
4850 (handle_query): Call supported_btrace_packets.
4851 * target.h: include btrace-common.h.
4852 (btrace_target_info): Removed.
4853 (supports_btrace, target_supports_btrace): Update parameters.
4855 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4857 * Makefile.in (SFILES): Add common/btrace-common.c.
4858 (OBS): Add common/btrace-common.o.
4859 (btrace-common.o): Add build rules.
4860 * linux-low: Include btrace-common.h.
4861 (linux_low_read_btrace): Use struct btrace_data. Call
4862 btrace_data_init and btrace_data_fini.
4864 2015-02-06 Pedro Alves <palves@redhat.com>
4866 * thread-db.c (find_new_threads_callback): Add debug output.
4868 2015-02-04 Pedro Alves <palves@redhat.com>
4870 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4871 (resume_stopped_resumed_lwps): New function.
4872 (linux_wait_for_event_filtered): Use it.
4874 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4876 * Makefile.in (SFILES): Add linux-personality.c.
4877 (linux-personality.o): New rule.
4878 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4879 list of objects to be built.
4880 * linux-low.c: Include nat/linux-personality.h.
4881 (linux_create_inferior): Remove code to disable address space
4882 randomization (moved to ../nat/linux-personality.c). Create
4883 cleanup to disable address space randomization.
4885 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4887 * Makefile.in (posix-strerror.o): New rule.
4888 (mingw-strerror.o): Likewise.
4889 * configure: Regenerated.
4890 * configure.ac: Source file ../common/common.host. Initialize new
4891 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4893 2015-01-14 Yao Qi <yao@codesourcery.com>
4895 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4896 (ppc-linux.o): New rule.
4897 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4898 * configure.ac: AC_CHECK_FUNCS(getauxval).
4899 * config.in: Re-generated.
4900 * configure: Re-generated.
4901 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4902 ppc64_64bit_inferior_p
4904 2015-01-14 Yao Qi <yao@codesourcery.com>
4906 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4907 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4908 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4909 (PT_ORIG_R3, PT_TRAP): Likewise.
4910 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4911 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4912 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4914 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4916 * i387-fp.c (i387_cache_to_xsave): In look over
4917 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4918 zmmh_low_space field by use of zmmh_high_space.
4920 2015-01-09 Pedro Alves <palves@redhat.com>
4922 * linux-low.c (step_over_bkpt): Move higher up in the file.
4923 (handle_extended_wait): Don't store the stop_pc here.
4924 (get_stop_pc): Adjust comments and rename to ...
4925 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4926 stopped for a software breakpoint or hardware breakpoint.
4927 (thread_still_has_status_pending_p): New function.
4928 (status_pending_p_callback): Use
4929 thread_still_has_status_pending_p. If the event is no longer
4930 interesting, resume the LWP.
4931 (handle_tracepoints): Add assert.
4932 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4933 (wstatus_maybe_breakpoint): New function.
4934 (cancel_breakpoint): Delete function.
4935 (check_stopped_by_watchpoint): New function, factored out from
4936 linux_low_filter_event.
4937 (lp_status_maybe_breakpoint): Delete function.
4938 (linux_low_filter_event): Remove filter_ptid argument.
4939 Leave thread group exits pending here. Store the LWP's stop PC.
4940 Always leave events pending.
4941 (linux_wait_for_event_filtered): Pull all events out of the
4942 kernel, and leave them all pending.
4943 (count_events_callback, select_event_lwp_callback): Consider all
4945 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4946 (select_event_lwp): Only give preference to the stepping LWP in
4947 all-stop mode. Adjust comments.
4948 (ignore_event): New function.
4949 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4950 references to cancel_breakpoints. Adjust to renames. Also give
4951 equal priority to all LWPs that have had events in non-stop mode.
4952 If reporting a software breakpoint event, unadjust the LWP's PC.
4953 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4954 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4956 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4957 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4958 (linux_stopped_by_watchpoint): Adjust.
4959 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4960 * linux-low.h (enum lwp_stop_reason): New.
4961 (struct lwp_info) <stop_pc>: Adjust comment.
4962 <stopped_by_watchpoint>: Delete field.
4963 <stop_reason>: New field.
4964 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4965 * mem-break.c (software_breakpoint_inserted_here)
4966 (hardware_breakpoint_inserted_here): New function.
4967 * mem-break.h (software_breakpoint_inserted_here)
4968 (hardware_breakpoint_inserted_here): Declare.
4969 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4970 (cancel_breakpoints): Delete.
4971 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4972 (upload_fast_traceframes): Remove references to
4975 2015-01-09 Pedro Alves <palves@redhat.com>
4977 * thread-db.c (find_new_threads_callback): Ignore thread if the
4978 kernel thread ID is -1.
4980 2015-01-09 Pedro Alves <palves@redhat.com>
4982 * linux-low.c (linux_attach_fail_reason_string): Move to
4983 nat/linux-ptrace.c, and rename.
4984 (linux_attach_lwp): Update comment.
4985 (attach_proc_task_lwp_callback): New function.
4986 (linux_attach): Adjust to rename and use
4987 linux_proc_attach_tgid_threads.
4988 (linux_attach_fail_reason_string): Delete declaration.
4990 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4992 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4993 * server.c (gdbserver_version): Likewise.
4995 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4997 * remote-utils.c: Include ctype.h.
4998 (input_interrupt): Explicitly handle the case when the char
4999 received is the NUL byte. Improve the printing of non-ASCII
5002 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5004 * linux-low.c (linux_low_filter_event): Update call to
5005 linux_enable_event_reporting following the addition of
5006 a new parameter to that function.
5008 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5011 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5012 (AARCH64_FPCR_REGNO): Likewise.
5013 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5014 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5015 (aarch64_store_fpregset): Likewise.
5017 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5019 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5020 Remove FIXME comment about assumption about N.
5022 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5024 * configure.ac: If large-file support is disabled in GDBserver,
5025 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5026 * configure: Regenerate.
5028 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5030 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5031 warning upon ENODATA from ptrace.
5032 * linux-s390-low.c (s390_store_tdb): New.
5033 (s390_regsets): Add regset for NT_S390_TDB.
5035 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5037 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5038 without a fill_function.
5039 * linux-s390-low.c (s390_fill_last_break): Remove.
5040 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5041 (s390_arch_setup): Use regset's size instead of fill_function for
5044 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5046 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5047 the regset's store function when ptrace returned an error.
5048 * regcache.c (get_thread_regcache): Invalidate register cache
5049 before fetching inferior's registers.
5051 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5053 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5054 while-loop as for-loop.
5055 (regsets_store_inferior_registers): Likewise.
5057 2014-11-28 Yao Qi <yao@codesourcery.com>
5059 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5060 * config.in, configure: Re-generate.
5061 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5064 2014-11-21 Yao Qi <yao@codesourcery.com>
5066 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5067 (AC_CHECK_HEADERS): Remove malloc.h.
5068 * configure: Re-generated.
5069 * config.in: Re-generated.
5070 * server.h: Don't include alloca.h and malloc.h.
5071 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5072 Don't include malloc.h.
5074 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5076 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5077 corresponding ERRNO check in same block.
5079 2014-11-12 Pedro Alves <palves@redhat.com>
5081 * server.c (cont_thread): Update comment.
5082 (start_inferior, attach_inferior): No longer clear cont_thread.
5083 (handle_v_cont): No longer set cont_thread.
5084 (captured_main): Clear cont_thread each time a GDB connects.
5086 2014-11-12 Pedro Alves <palves@redhat.com>
5088 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5089 thread, and don't resume all threads if the Hc thread has exited.
5091 2014-11-12 Pedro Alves <palves@redhat.com>
5093 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5094 the process group instead of to a specific LWP.
5096 2014-10-15 Pedro Alves <palves@redhat.com>
5099 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5101 (arm_set_thread_context): Delete.
5102 (the_low_target): Adjust.
5103 * win32-i386-low.c (debug_registers_changed)
5104 (debug_registers_used): Delete.
5105 (update_debug_registers_callback): New function.
5106 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5107 needing to update their debug registers.
5108 (win32_get_current_dr): New function.
5109 (x86_dr_low_get_addr, x86_dr_low_get_control)
5110 (x86_dr_low_get_status): Fetch the debug register from the thread
5112 (i386_initial_stuff): Adjust.
5113 (i386_get_thread_context): Remove current_event parameter. Don't
5114 clear debug_registers_changed nor copy DR values to
5116 (i386_set_thread_context): Delete.
5117 (i386_prepare_to_resume): New function.
5118 (i386_thread_added): Mark the thread as needing to update irs
5120 (the_low_target): Remove i386_set_thread_context and install
5121 i386_prepare_to_resume.
5122 * win32-low.c (win32_get_thread_context): Adjust.
5123 (win32_set_thread_context): Use SetThreadContext
5125 (win32_prepare_to_resume): New function.
5126 (win32_require_context): New function, factored out from ...
5127 (thread_rec): ... this.
5128 (continue_one_thread): Call win32_prepare_to_resume on each thread
5129 we're about to continue.
5130 (win32_resume): Call win32_prepare_to_resume on the event thread.
5131 * win32-low.h (struct win32_thread_info)
5132 <debug_registers_changed>: New field.
5133 (struct win32_target_ops): Change prototype of set_thread_context,
5134 delete set_thread_context and add prepare_to_resume.
5135 (win32_require_context): New declaration.
5137 2014-10-08 Gary Benson <gbenson@redhat.com>
5139 * server.h: Do not include common-exceptions.h.
5141 2014-10-08 Gary Benson <gbenson@redhat.com>
5143 * server.h: Do not include cleanups.h.
5145 2014-09-30 James Hogan <james.hogan@imgtec.com>
5147 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5150 2014-09-23 Yao Qi <yao@codesourcery.com>
5152 * linux-low.c (lp_status_maybe_breakpoint): New function.
5153 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5154 (count_events_callback): Likewise.
5155 (select_event_lwp_callback): Likewise.
5156 (cancel_breakpoints_callback): Likewise.
5158 2014-09-19 Don Breazeal <donb@codesourcery.com>
5160 * linux-low.c (handle_extended_wait): Call
5161 linux_ptrace_get_extended_event.
5162 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5163 linux_is_extended_waitstatus.
5165 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5167 * Makefile.in (CPPFLAGS): Define.
5168 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5169 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5171 2014-09-16 Gary Benson <gbenson@redhat.com>
5173 * inferiors.h (current_inferior): Renamed as...
5174 (current_thread): New variable. All uses updated.
5175 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5176 (maybe_move_out_of_jump_pad): Likewise.
5177 (cancel_breakpoint): Likewise.
5178 (linux_low_filter_event): Likewise.
5179 (wait_for_sigstop): Likewise.
5180 (linux_resume_one_lwp): Likewise.
5181 (need_step_over_p): Likewise.
5182 (start_step_over): Likewise.
5183 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5184 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5185 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5186 and save_inferior as saved_thread.
5187 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5189 (regcache_invalidate_thread): Likewise.
5190 * remote-utils.c (prepare_resume_reply): Likewise.
5191 * thread-db.c (thread_db_get_tls_address): Likewise.
5192 (disable_thread_event_reporting): Likewise.
5193 (remove_thread_event_breakpoints): Likewise.
5194 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5196 * target.h (set_desired_inferior): Renamed as...
5197 (set_desired_thread): New declaration. All uses updated.
5198 * server.c (myresume): Updated comment to reference thread instead
5200 (handle_serial_event): Likewise.
5201 (handle_target_event): Likewise.
5203 2014-09-12 Tom Tromey <tromey@redhat.com>
5204 Gary Benson <gbenson@redhat.com>
5206 * regcache.h: Include common-regcache.h.
5207 (regcache_read_pc): Don't declare.
5208 * regcache.c (get_thread_regcache_for_ptid): New function.
5210 2014-09-11 Tom Tromey <tromey@redhat.com>
5211 Gary Benson <gbenson@redhat.com>
5213 * symbol.c: New file.
5214 * Makefile.in (SFILES): Add symbol.c.
5215 (OBS): Add symbol.o.
5217 2014-09-11 Gary Benson <gbenson@redhat.com>
5219 * target.c (target_stop_ptid, target_continue_ptid): New
5222 2014-09-11 Tom Tromey <tromey@redhat.com>
5223 Gary Benson <gbenson@redhat.com>
5225 * target.h: Include target/target.h.
5226 * target.c (target_read_memory, target_read_uint32)
5227 (target_write_memory): New functions.
5229 2014-09-11 Gary Benson <gbenson@redhat.com>
5231 * server.h (debug_hw_points): Don't declare.
5232 * server.c (debug_hw_points): Don't define. Replace all uses
5233 with show_debug_regs.
5234 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5235 all uses with show_debug_regs.
5237 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5239 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5240 endianness into account.
5241 (ppc_supply_ptrace_register): Likewise.
5243 2014-09-03 James Hogan <james.hogan@imgtec.com>
5245 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5246 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5248 2014-09-03 Gary Benson <gbenson@redhat.com>
5250 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5251 ALL_DEBUG_ADDRESS_REGISTERS.
5253 2014-09-02 Gary Benson <gbenson@redhat.com>
5255 * i386-low.h: Renamed as...
5256 * x86-low.h: New file. All type, function and variable name
5257 prefixes changed from "i386_" to "x86_". All references updated.
5258 * i386-low.c: Renamed as...
5259 * x86-low.c: New file. All type, function and variable name
5260 prefixes changed from "i386_" to "x86_". All references updated.
5262 2014-09-02 Gary Benson <gbenson@redhat.com>
5264 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5265 (x86_linux_new_thread): Likewise.
5267 2014-08-29 Gary Benson <gbenson@redhat.com>
5269 * server.h (setjmp.h): Do not include.
5270 (toplevel): Do not declare.
5271 (common-exceptions.h): Include.
5272 (cleanups.h): Likewise.
5273 * server.c (toplevel): Do not define.
5274 (exit_code): New static global.
5275 (detach_or_kill_for_exit_cleanup): New function.
5276 (main): New function. Original main renamed to...
5277 (captured_main): New function.
5278 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5280 2014-08-29 Gary Benson <gbenson@redhat.com>
5282 * Makefile.in (SFILES): Add common/common-exceptions.c.
5283 (OBS): Add common-exceptions.o.
5284 (common-exceptions.o): New rule.
5285 * utils.c (prepare_to_throw_exception): New function.
5287 2014-08-29 Gary Benson <gbenson@redhat.com>
5289 * config.in: Regenerate.
5290 * configure: Likewise.
5292 2014-08-29 Gary Benson <gbenson@redhat.com>
5294 * Makefile.in (SFILES): Add common/cleanups.c.
5296 (cleanups.o): New rule.
5298 2014-08-29 Gary Benson <gbenson@redhat.com>
5300 * utils.c (internal_vwarning): New function.
5302 2014-08-28 Gary Benson <gbenson@redhat.com>
5304 * utils.h (fatal): Remove declaration.
5305 * utils.c (fatal): Remove function.
5307 2014-08-28 Gary Benson <gbenson@redhat.com>
5309 * tracepoint.c (gdb_agent_init): Replace fatal with
5311 (initialize_tracepoint): Likewise.
5313 2014-08-28 Gary Benson <gbenson@redhat.com>
5315 * remote-utils.c (remote_prepare): Replace fatal with error.
5317 2014-08-28 Gary Benson <gbenson@redhat.com>
5319 * linux-low.c (linux_async): Replace fatal with warning.
5321 (linux_start_non_stop): Return -1 if linux_async failed.
5323 2014-08-28 Gary Benson <gbenson@redhat.com>
5325 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5327 (i386_dr_low_get_addr): Remove vague comment.
5328 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5331 2014-08-28 Gary Benson <gbenson@redhat.com>
5333 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5334 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5336 (linux_resume_one_lwp): Likewise.
5337 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5339 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5340 with internal_error.
5341 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5342 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5343 (find_register_by_name): Replace fatal with internal_error.
5344 (find_regno): Likewise.
5345 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5346 * thread-db.c (thread_db_create_event): Likewise.
5347 (thread_db_load_search): Likewise.
5348 (try_thread_db_load_1): Likewise.
5349 * tracepoint.c (get_jump_space_head): Replace fatal with
5351 (claim_trampoline_space): Likewise.
5352 (have_fast_tracepoint_trampoline_buffer): Likewise.
5353 (cmd_qtstart): Likewise.
5354 (stop_tracing): Likewise.
5355 (fast_tracepoint_collecting): Likewise.
5356 (target_malloc): Likewise.
5357 (download_tracepoint): Likewise.
5358 (download_trace_state_variables): Replace check with gdb_assert.
5359 (upload_fast_traceframes): Replace fatal with internal_error.
5361 2014-08-19 Tom Tromey <tromey@redhat.com>
5362 Gary Benson <gbenson@redhat.com>
5364 * Makefile.in (SFILES): Add common/common-debug.c.
5365 (OBS): Add common-debug.o.
5366 (common-debug.o): New rule.
5367 * debug.h (debug_printf): Don't declare.
5368 * debug.c (debug_printf): Renamed and rewritten as...
5369 (debug_vprintf): New function.
5371 2014-08-19 Gary Benson <gbenson@redhat.com>
5373 * utils.h: Do not include print-utils.h.
5375 2014-08-19 Tom Tromey <tromey@redhat.com>
5376 Gary Benson <gbenson@redhat.com>
5378 * server.h: Add static assertion.
5379 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5381 2014-08-19 Tom Tromey <tromey@redhat.com>
5382 Gary Benson <gbenson@redhat.com>
5384 * Makefile.in (SFILES): Add common/errors.c.
5385 (OBS): Add errors.o.
5386 (IPA_OBS): Add errors-ipa.o.
5387 (errors.o): New rule.
5388 (errors-ipa.o): Likewise.
5389 * utils.h (perror_with_name, error, warning): Don't declare.
5390 * utils.c (warning): Renamed and rewritten as...
5391 (vwarning): New function.
5392 (error): Renamed and rewritten as...
5393 (verror): New function.
5394 (internal_error): Renamed and rewritten as...
5395 (internal_verror): New function.
5397 2014-08-07 Gary Benson <gbenson@redhat.com>
5399 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5400 * configure: Regenerate.
5401 * config.in: Likewise.
5402 * server.h: Do not include errno.h.
5403 * event-loop.c: Likewise.
5404 * hostio-errno.c: Likewise.
5405 * linux-low.c: Likewise.
5406 * remote-utils.c: Likewise.
5407 * spu-low.c: Likewise.
5408 * utils.c: Likewise.
5409 * gdbreplay.c: Unconditionally include errno.h.
5411 2014-08-07 Gary Benson <gbenson@redhat.com>
5413 * server.h: Do not include string.h.
5414 * event-loop.c: Likewise.
5415 * linux-low.c: Likewise.
5416 * regcache.c: Likewise.
5417 * remote-utils.c: Likewise.
5418 * spu-low.c: Likewise.
5419 * utils.c: Likewise.
5421 2014-08-07 Gary Benson <gbenson@redhat.com>
5423 * server.h: Do not include gdb_assert.h.
5425 2014-08-07 Gary Benson <gbenson@redhat.com>
5427 * server.h: Do not include common-utils.h.
5429 2014-08-07 Gary Benson <gbenson@redhat.com>
5431 * server.h: Do not include ptid.h.
5432 * notif.h: Likewise.
5434 2014-08-07 Gary Benson <gbenson@redhat.com>
5436 * server.h: Do not include gdb_locale.h.
5438 2014-08-07 Gary Benson <gbenson@redhat.com>
5440 * server.h: Do not include gdb/signals.h.
5441 * win32-low.c: Likewise.
5443 2014-08-07 Gary Benson <gbenson@redhat.com>
5445 * server.h: Do not include pathmax.h.
5447 2014-08-07 Gary Benson <gbenson@redhat.com>
5449 * server.h: Do not include libiberty.h.
5450 * linux-bfin-low.c: Likewise.
5452 2014-08-07 Gary Benson <gbenson@redhat.com>
5454 * server.h: Do not include ansidecl.h.
5456 2014-08-07 Gary Benson <gbenson@redhat.com>
5458 * linux-x86-low.c: Do not include stddef.h.
5459 * lynx-ppc-low.c: Likewise.
5460 * tracepoint.c: Likewise.
5462 2014-08-07 Gary Benson <gbenson@redhat.com>
5464 * server.h: Do not include stdarg.h.
5465 * nto-low.c: Likewise.
5467 2014-08-07 Gary Benson <gbenson@redhat.com>
5469 * server.h: Do not include stdlib.h.
5470 * inferiors.c: Likewise.
5471 * linux-low.c: Likewise.
5472 * regcache.c: Likewise.
5473 * spu-low.c: Likewise.
5474 * tracepoint.c: Likewise.
5475 * utils.c: Likewise.
5477 2014-08-07 Gary Benson <gbenson@redhat.com>
5479 * server.h: Do not include stdio.h.
5480 * linux-low.c: Likewise.
5481 * remote-utils.c: Likewise.
5482 * spu-low.c: Likewise.
5483 * utils.c: Likewise.
5484 * wincecompat.c: Likewise.
5486 2014-08-06 Gary Benson <gbenson@redhat.com>
5488 * regcache.c (init_register_cache): Move conditionals inside if.
5490 2014-08-06 Gary Benson <gbenson@redhat.com>
5492 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5494 2014-07-31 Gary Benson <gbenson@redhat.com>
5496 * ax.h: Do not include server.h.
5497 * gdbthread.h: Likewise.
5498 * lynx-low.h: Likewise.
5499 * notif.h: Likewise.
5501 2014-07-30 Gary Benson <gbenson@redhat.com>
5503 * server.h: Include common-defs.h.
5504 Do not include config.h or build-gnulib-gdbserver/config.h.
5506 2014-07-30 Gary Benson <gbenson@redhat.com>
5508 * hostio-errno.c: Move server.h to top of includes list.
5509 * inferiors.c: Likewise.
5510 * linux-x86-low.c: Likewise.
5511 * notif.c: Include server.h.
5513 2014-07-24 Tom Tromey <tromey@redhat.com>
5514 Gary Benson <gbenson@redhat.com>
5516 * server.h (CORE_ADDR): Now unsigned.
5518 2014-07-16 Pedro Alves <palves@redhat.com>
5520 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5522 2014-07-15 Pedro Alves <palves@redhat.com>
5524 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5527 2014-07-11 Pedro Alves <palves@redhat.com>
5529 * linux-low.c (kill_wait_lwp): New function, based on
5530 kill_one_lwp_callback, but use my_waitpid directly.
5531 (kill_one_lwp_callback, linux_kill): Use it.
5533 2014-06-23 Pedro Alves <palves@redhat.com>
5535 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5536 before setting DR0..DR3.
5538 2014-06-20 Gary Benson <gbenson@redhat.com>
5540 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5541 * configure: Regenerated.
5542 * config.in: Likewise.
5544 2014-06-20 Gary Benson <gbenson@redhat.com>
5546 * Makefile.in (SFILES): Update locations for files moved
5548 (object file files): Reordered.
5550 2014-06-20 Gary Benson <gbenson@redhat.com>
5552 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5553 (i386_dr_low_set_addr): Likewise.
5554 (i386_dr_low_get_addr): Likewise.
5555 (i386_dr_low_can_set_control): Likewise.
5556 (i386_dr_low_set_control): Likewise.
5557 (i386_dr_low_get_control): Likewise.
5558 (i386_dr_low_get_status): Likewise.
5559 (i386_get_debug_register_length): Likewise.
5560 * linux-x86-low.c (i386_dr_low_set_addr):
5561 Changed signature. Made static.
5562 (i386_dr_low_get_addr): Likewise.
5563 (i386_dr_low_set_control): Likewise.
5564 (i386_dr_low_get_control): Likewise.
5565 (i386_dr_low_get_status): Likewise.
5566 (i386_dr_low): New global variable.
5567 * win32-i386-low.c (i386_dr_low_set_addr):
5568 Changed signature. Made static.
5569 (i386_dr_low_get_addr): Likewise.
5570 (i386_dr_low_set_control): Likewise.
5571 (i386_dr_low_get_control): Likewise.
5572 (i386_dr_low_get_status): Likewise.
5573 (i386_dr_low): New global variable.
5575 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5577 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5578 * Makefile.in (AR, AR_FLAGS): Define.
5579 * configure: Regenerate.
5581 2014-06-19 Gary Benson <gbenson@redhat.com>
5583 * Makefile.in (i386-dregs.o): New rule.
5584 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5585 * i386-low.c (target.h): Remove include.
5586 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5587 (DR_CONTROL_SHIFT): Likewise.
5588 (DR_CONTROL_SIZE): Likewise.
5589 (DR_RW_EXECUTE): Likewise.
5590 (DR_RW_WRITE): Likewise.
5591 (DR_RW_READ): Likewise.
5592 (DR_RW_IORW): Likewise.
5593 (DR_LEN_1): Likewise.
5594 (DR_LEN_2): Likewise.
5595 (DR_LEN_4): Likewise.
5596 (DR_LEN_8): Likewise.
5597 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5598 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5599 (DR_ENABLE_SIZE): Likewise.
5600 (DR_LOCAL_SLOWDOWN): Likewise.
5601 (DR_GLOBAL_SLOWDOWN): Likewise.
5602 (DR_CONTROL_RESERVED): Likewise.
5603 (I386_DR_CONTROL_MASK): Likewise.
5604 (I386_DR_VACANT): Likewise.
5605 (I386_DR_LOCAL_ENABLE): Likewise.
5606 (I386_DR_GLOBAL_ENABLE): Likewise.
5607 (I386_DR_DISABLE): Likewise.
5608 (I386_DR_SET_RW_LEN): Likewise.
5609 (I386_DR_GET_RW_LEN): Likewise.
5610 (I386_DR_WATCH_HIT): Likewise.
5611 (i386_wp_op_t): Likewise.
5612 (i386_show_dr): Likewise.
5613 (i386_length_and_rw_bits): Likewise.
5614 (i386_insert_aligned_watchpoint): Likewise.
5615 (i386_remove_aligned_watchpoint): Likewise.
5616 (i386_handle_nonaligned_watchpoint): Likewise.
5617 i386_update_inferior_debug_regs(): Likewise.
5618 (i386_dr_insert_watchpoint): Likewise.
5619 (i386_dr_remove_watchpoint): Likewise.
5620 (i386_dr_region_ok_for_watchpoint): Likewise.
5621 (i386_dr_stopped_data_address): Likewise.
5622 (i386_dr_stopped_by_watchpoint): Likewise.
5624 2014-06-19 Gary Benson <gbenson@redhat.com>
5626 * i386-low.c (i386_dr_show): Renamed to
5627 i386_show_dr and made static. All uses updated.
5628 (i386_dr_length_and_rw_bits): Renamed to
5629 i386_length_and_rw_bits and made static.
5631 (i386_dr_insert_aligned_watchpoint): Renamed to
5632 i386_insert_aligned_watchpoint and made static.
5634 (i386_dr_remove_aligned_watchpoint): Renamed to
5635 i386_remove_aligned_watchpoint and made static.
5637 (i386_dr_update_inferior_debug_regs): Renamed to
5638 i386_update_inferior_debug_regs and made static.
5641 2014-06-18 Gary Benson <gbenson@redhat.com>
5643 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5644 (i386_dr_low_can_set_control): Likewise.
5645 (i386_get_debug_register_length): Likewise.
5646 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5647 (i386_dr_low_can_set_control): Likewise.
5648 (i386_get_debug_register_length): Likewise.
5650 2014-06-17 Gary Benson <gbenson@redhat.com>
5652 * i386-low.h (i386-dregs.h): New include.
5653 (DR_FIRSTADDR): Now in i386-dregs.h.
5654 (DR_LASTADDR): Likewise.
5655 (DR_NADDR): Likewise.
5656 (DR_STATUS): Likewise.
5657 (DR_CONTROL): Likewise.
5658 (i386_debug_reg_state): Likewise.
5659 (i386_dr_insert_watchpoint): Likewise.
5660 (i386_dr_remove_watchpoint): Likewise.
5661 (i386_dr_region_ok_for_watchpoint): Likewise.
5662 (i386_dr_stopped_data_address): Likewise.
5663 (i386_dr_stopped_by_watchpoint): Likewise.
5664 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5666 2014-06-18 Gary Benson <gbenson@redhat.com>
5668 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5669 i386_dr_insert_watchpoint.
5670 (i386_low_remove_watchpoint): Renamed to
5671 i386_dr_remove_watchpoint.
5672 (i386_low_region_ok_for_watchpoint): Renamed to
5673 i386_dr_region_ok_for_watchpoint.
5674 (i386_low_stopped_data_address): Renamed to
5675 i386_dr_stopped_data_address.
5676 (i386_low_stopped_by_watchpoint): Renamed to
5677 i386_dr_stopped_by_watchpoint.
5678 * i386-low.c (i386_show_dr): Renamed to
5679 i386_dr_show and made nonstatic. All uses updated.
5680 (i386_length_and_rw_bits): Renamed to
5681 i386_dr_length_and_rw_bits and made nonstatic.
5683 (i386_insert_aligned_watchpoint): Renamed to
5684 i386_dr_insert_aligned_watchpoint and made nonstatic.
5686 (i386_remove_aligned_watchpoint): Renamed to
5687 i386_dr_remove_aligned_watchpoint and made nonstatic.
5689 (i386_update_inferior_debug_regs): Renamed to
5690 i386_dr_update_inferior_debug_regs and made nonstatic.
5692 (i386_low_insert_watchpoint): Renamed to
5693 i386_dr_insert_watchpoint. All uses updated.
5694 (i386_low_remove_watchpoint): Renamed to
5695 i386_dr_remove_watchpoint. All uses updated.
5696 (i386_low_region_ok_for_watchpoint): Renamed to
5697 i386_dr_region_ok_for_watchpoint. All uses updated.
5698 (i386_low_stopped_data_address): Renamed to
5699 i386_dr_stopped_data_address. All uses updated.
5700 (i386_low_stopped_by_watchpoint): Renamed to
5701 i386_dr_stopped_by_watchpoint. All uses updated.
5703 2014-06-18 Gary Benson <gbenson@redhat.com>
5705 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5706 (i386_dr_low_can_set_control): Likewise.
5707 (i386_insert_aligned_watchpoint): New check.
5709 2014-06-18 Gary Benson <gbenson@redhat.com>
5711 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5714 2014-06-18 Gary Benson <gbenson@redhat.com>
5716 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5717 instead of fatal and error.
5718 (i386_handle_nonaligned_watchpoint): Likewise.
5720 2014-06-18 Gary Benson <gbenson@redhat.com>
5722 * i386-low.c (i386_get_debug_register_length): New macro.
5723 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5724 (i386_show_dr): Use debug_printf instead of fprintf. Use
5725 phex to format values.
5727 2014-06-18 Gary Benson <gbenson@redhat.com>
5729 * i386-low.h: Comment changes.
5730 * i386-low.c: Likewise.
5732 2014-06-18 Gary Benson <gbenson@redhat.com>
5734 * i386-low.c: Whitespace changes.
5736 2014-06-12 Tom Tromey <tromey@redhat.com>
5738 * utils.c (freeargv): Remove.
5740 2014-06-12 Tom Tromey <tromey@redhat.com>
5742 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5743 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5744 (parse_debug_format_options): Likewise.
5745 (gdbserver_usage): Likewise.
5746 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5747 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5748 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5750 ($(LIBGNU)): Depend on libiberty.
5751 (all-lib): Recurse into all subdirs.
5752 (install-only): Invoke "install" target in subdirs.
5753 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5755 * configure: Rebuild.
5756 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5757 for vasprintf, vsnprintf, or gettimeofday.
5758 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5761 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5763 * development.sh: Delete.
5764 * Makefile.in (config.status): Adjust dependency on development.sh.
5765 * configure.ac: Adjust development.sh source call.
5766 * configure: Regenerate.
5768 2014-06-02 Pedro Alves <palves@redhat.com>
5770 * ax.c (gdb_free_agent_expr): New function.
5771 * ax.h (gdb_free_agent_expr): New declaration.
5772 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5774 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5776 (clear_breakpoint_conditions_and_commands): New function.
5777 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5778 (clear_breakpoint_conditions_and_commands): New declaration.
5780 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5782 * linux-aarch64-low.c (asm/ptrace.h): Include.
5784 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5786 Fix TLS access for -static -pthread.
5787 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5788 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5789 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5791 2014-05-20 Pedro Alves <palves@redhat.com>
5793 * linux-aarch64-low.c (aarch64_insert_point)
5794 (aarch64_remove_point): No longer check whether the type is
5795 supported here. Adjust to new interface.
5796 (the_low_target): Install aarch64_supports_z_point_type as
5797 supports_z_point_type method.
5798 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5799 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5800 instead of a Z packet char. Adjust.
5801 (arm_supports_z_point_type): New function.
5802 (arm_insert_point, arm_remove_point): Adjust to new interface.
5803 (the_low_target): Install arm_supports_z_point_type.
5804 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5805 (cris_insert_point, cris_remove_point): Adjust to new interface.
5806 Don't check whether the type is supported here.
5807 (the_low_target): Install cris_supports_z_point_type.
5808 * linux-low.c (linux_supports_z_point_type): New function.
5809 (linux_insert_point, linux_remove_point): Adjust to new interface.
5810 * linux-low.h (struct linux_target_ops) <insert_point,
5811 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5812 raw_breakpoint pointer parameter.
5813 <supports_z_point_type>: New method.
5814 * linux-mips-low.c (mips_supports_z_point_type): New function.
5815 (mips_insert_point, mips_remove_point): Adjust to new interface.
5816 Use mips_supports_z_point_type.
5817 (the_low_target): Install mips_supports_z_point_type.
5818 * linux-ppc-low.c (the_low_target): Install NULL as
5819 supports_z_point_type method.
5820 * linux-s390-low.c (the_low_target): Install NULL as
5821 supports_z_point_type method.
5822 * linux-sparc-low.c (the_low_target): Install NULL as
5823 supports_z_point_type method.
5824 * linux-x86-low.c (x86_supports_z_point_type): New function.
5825 (x86_insert_point): Adjust to new insert_point interface. Use
5826 insert_memory_breakpoint. Adjust to new
5827 i386_low_insert_watchpoint interface.
5828 (x86_remove_point): Adjust to remove_point interface. Use
5829 remove_memory_breakpoint. Adjust to new
5830 i386_low_remove_watchpoint interface.
5831 (the_low_target): Install x86_supports_z_point_type.
5832 * lynx-low.c (lynx_target_ops): Install NULL as
5833 supports_z_point_type callback.
5834 * nto-low.c (nto_supports_z_point_type): New.
5835 (nto_insert_point, nto_remove_point): Adjust to new interface.
5836 (nto_target_ops): Install nto_supports_z_point_type.
5837 * mem-break.c: Adjust intro comment.
5838 (struct raw_breakpoint) <raw_type, size>: New fields.
5839 <inserted>: Update comment.
5840 <shlib_disabled>: Delete field.
5841 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5842 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5843 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5844 (raw_bkpt_type_to_target_hw_bp_type): New function.
5845 (find_enabled_raw_code_breakpoint_at): New function.
5846 (find_raw_breakpoint_at): New type and size parameters. Use them.
5847 (insert_memory_breakpoint): New function, based off
5848 set_raw_breakpoint_at.
5849 (remove_memory_breakpoint): New function.
5850 (set_raw_breakpoint_at): Reimplement.
5851 (set_breakpoint): New, based on set_breakpoint_at.
5852 (set_breakpoint_at): Reimplement.
5853 (delete_raw_breakpoint): Go through the_target->remove_point
5854 instead of assuming memory breakpoints.
5855 (find_gdb_breakpoint_at): Delete.
5856 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5857 (find_gdb_breakpoint): New function.
5858 (set_gdb_breakpoint_at): Delete.
5859 (z_type_supported): New function.
5860 (set_gdb_breakpoint_1): New function, loosely based off
5861 set_gdb_breakpoint_at.
5862 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5863 (delete_gdb_breakpoint_at): Delete.
5864 (delete_gdb_breakpoint_1): New function, loosely based off
5865 delete_gdb_breakpoint_at.
5866 (delete_gdb_breakpoint): New function.
5867 (clear_gdb_breakpoint_conditions): Rename to ...
5868 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5870 (add_condition_to_breakpoint): Make static.
5871 (add_breakpoint_condition): Take a struct breakpoint pointer
5872 instead of an address. Adjust.
5873 (gdb_condition_true_at_breakpoint): Rename to ...
5874 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5876 (gdb_condition_true_at_breakpoint): Reimplement.
5877 (add_breakpoint_commands): Take a struct breakpoint pointer
5878 instead of an address. Adjust.
5879 (gdb_no_commands_at_breakpoint): Rename to ...
5880 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5881 parameter. Return true if no breakpoint was found. Change debug
5883 (gdb_no_commands_at_breakpoint): Reimplement.
5884 (run_breakpoint_commands): Rename to ...
5885 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5886 and change return type to boolean.
5887 (run_breakpoint_commands): New function.
5888 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5889 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5890 breakpoint. Go through the_target->remove_point instead of
5891 assuming memory breakpoint.
5892 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5893 software and hardware breakpoints.
5894 (reinsert_raw_breakpoint): Go through the_target->insert_point
5895 instead of assuming memory breakpoint.
5896 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5897 software and hardware breakpoints.
5898 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5899 Check both software and hardware breakpoints.
5900 (validate_inserted_breakpoint): Assert the breakpoint is a
5901 software breakpoint. Set the inserted flag to -1 instead of
5902 setting shlib_disabled.
5903 (delete_disabled_breakpoints): Adjust.
5904 (validate_breakpoints): Only validate software breakpoints.
5905 Adjust to inserted flag change.
5906 (check_mem_read, check_mem_write): Skip breakpoint types other
5907 than software breakpoints. Adjust to inserted flag change.
5908 * mem-break.h (enum raw_bkpt_type): New enum.
5909 (raw_breakpoint, struct process_info): Forward declare.
5910 (Z_packet_to_target_hw_bp_type): Delete declaration.
5911 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5912 (set_gdb_breakpoint, delete_gdb_breakpoint)
5913 (clear_breakpoint_conditions): New declarations.
5914 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5915 (breakpoint_inserted_here): Update comment.
5916 (add_breakpoint_condition, add_breakpoint_commands): Replace
5917 address parameter with a breakpoint pointer parameter.
5918 (gdb_breakpoint_here): Update comment.
5919 (delete_gdb_breakpoint_at): Delete.
5920 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5921 * server.c (process_point_options): Take a struct breakpoint
5922 pointer instead of an address. Adjust.
5923 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5924 delete_gdb_breakpoint.
5925 * spu-low.c (spu_target_ops): Install NULL as
5926 supports_z_point_type method.
5927 * target.h: Include mem-break.h.
5928 (struct target_ops) <prepare_to_access_memory>: Update comment.
5929 <supports_z_point_type>: New field.
5930 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5931 instead of a char. Also take a raw breakpoint pointer.
5932 * win32-arm-low.c (the_low_target): Install NULL as
5933 supports_z_point_type.
5934 * win32-i386-low.c (i386_supports_z_point_type): New function.
5935 (i386_insert_point, i386_remove_point): Adjust to new interface.
5936 (the_low_target): Install i386_supports_z_point_type.
5937 * win32-low.c (win32_supports_z_point_type): New function.
5938 (win32_insert_point, win32_remove_point): Adjust to new interface.
5939 (win32_target_ops): Install win32_supports_z_point_type.
5940 * win32-low.h (struct win32_target_ops):
5941 <supports_z_point_type>: New method.
5942 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5943 instead of a char. Also take a raw breakpoint pointer.
5945 2014-05-20 Pedro Alves <palves@redhat.com>
5947 * mem-break.h: Include break-common.h.
5948 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5949 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5950 (Z_packet_to_target_hw_bp_type): New declaration.
5951 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5952 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5953 (Z_PACKET_ACCESS_WP): Delete macros.
5954 (Z_packet_to_hw_type): Delete function.
5955 * i386-low.h: Don't include break-common.h here.
5956 (Z_packet_to_hw_type): Delete declaration.
5957 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5958 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5959 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5960 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5961 * linux-aarch64-low.c: Don't include break-common.h here.
5962 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5963 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5964 (Z_packet_to_target_hw_bp_type): Delete function.
5965 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5967 (mips_insert_point, mips_remove_point): Use
5968 Z_packet_to_target_hw_bp_type.
5970 2014-05-20 Pedro Alves <palves@redhat.com>
5972 * linux-aarch64-low.c: Include break-common.h.
5973 (enum target_point_type): Delete.
5974 (Z_packet_to_point_type): Rename to ...
5975 (Z_packet_to_target_hw_bp_type): ... this, and return a
5976 target_hw_bp_type instead.
5977 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5978 instead of an enum target_point_type.
5979 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5981 (aarch64_dr_state_insert_one_point)
5982 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5983 (aarch64_handle_aligned_watchpoint)
5984 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5985 Take an enum target_hw_bp_type instead of an enum
5987 (aarch64_supports_z_point_type): New function.
5988 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5989 use Z_packet_to_target_hw_bp_type.
5991 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5993 * configure.ac: Only use -Werror by default when DEVELOPMENT
5995 * configure: Regenerate.
5997 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5999 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6000 * linux-x86-low.c (X86_64_USER_REGS): New.
6001 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6003 2014-04-28 Yao Qi <yao@codesourcery.com>
6005 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6008 2014-04-25 Pedro Alves <palves@redhat.com>
6011 * linux-low.c (linux_attach_fail_reason_string): New function.
6012 (linux_attach_lwp): Delete.
6013 (linux_attach_lwp_1): Rename to ...
6014 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6015 argument. Remove "initial" parameter. Return int instead of
6016 void. Don't error or warn here.
6017 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6018 failure to attach to the tgid. Call warning when failing to
6020 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6021 argument. Remove "initial" parameter. Return int instead of
6022 void. Don't error or warn here.
6023 (linux_attach_fail_reason_string): New declaration.
6024 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6025 interface change. Use linux_attach_fail_reason_string.
6027 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6028 Walfred Tedeschi <walfred.tedeschi@intel.com>
6030 * Makefile.in: Added rules to handle new files
6031 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6032 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6033 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6034 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6035 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6036 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6038 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6039 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6040 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6041 i386/x32-avx512.xml.
6042 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6043 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6044 i386/x32-avx512-linux.xml.
6045 * i387-fp.c (num_avx512_k_registers): New constant for number
6047 (num_avx512_zmmh_low_registers): New constant for number of
6048 lower ZMM registers (0-15).
6049 (num_avx512_zmmh_high_registers): New constant for number of
6050 higher ZMM registers (16-31).
6051 (num_avx512_ymmh_registers): New contant for number of higher
6052 YMM registers (ymm16-31 added by avx521 on x86_64).
6053 (num_avx512_xmm_registers): New constant for number of higher
6054 XMM registers (xmm16-31 added by AVX512 on x86_64).
6055 (struct i387_xsave): Add space for AVX512 registers.
6056 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6057 Add code to handle AVX512 registers.
6058 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6059 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6060 prototypei from generated file.
6061 (tdesc_amd64_avx512_linux): Likewise.
6062 (init_registers_x32_avx512_linux): Likewise.
6063 (tdesc_x32_avx512_linux): Likewise.
6064 (init_registers_i386_avx512_linux): Likewise.
6065 (tdesc_i386_avx512_linux): Likewise.
6066 (x86_64_regmap): Add AVX512 registers.
6067 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6069 (initialize_low_arch): Add code to initialize AVX512 registers.
6071 2014-04-23 Pedro Alves <palves@redhat.com>
6073 * mem-break.c (find_gdb_breakpoint_at): Make static.
6074 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6076 2014-04-23 Pedro Alves <palves@redhat.com>
6078 * i386-low.c: Don't include break-common.h here.
6079 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6080 prototype to take target_hw_bp_type as argument instead of a Z
6082 * i386-low.h: Include break-common.h here.
6083 (Z_packet_to_hw_type): Declare.
6084 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6086 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6087 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6088 (x86_remove_point): Convert the packet number to a
6089 target_hw_bp_type before calling i386_low_remove_watchpoint.
6090 * win32-i386-low.c (i386_insert_point): Convert the packet number
6091 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6092 (i386_remove_point): Convert the packet number to a
6093 target_hw_bp_type before calling i386_low_remove_watchpoint.
6095 2014-04-23 Pedro Alves <palves@redhat.com>
6097 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6099 2014-04-10 Pedro Alves <palves@redhat.com>
6101 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6102 Check if the condition or command is NULL before checking if the
6103 breakpoint is known. On success, return true.
6104 * mem-break.h (add_breakpoint_condition): Document return.
6105 (add_breakpoint_commands): Add describing comment.
6106 * server.c (skip_to_semicolon): New function.
6107 (process_point_options): Use it.
6109 2014-04-09 Pedro Alves <palves@redhat.com>
6111 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6114 2014-02-27 Pedro Alves <palves@redhat.com>
6117 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6119 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6121 (last_thread_of_process_p): Take a PID argument instead of a
6123 (linux_wait_for_lwp): Delete.
6124 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6126 (linux_low_filter_event): New function, party factored out from
6127 linux_wait_for_event.
6128 (linux_wait_for_event): Rename to ...
6129 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6130 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6131 sigsuspend. Check for zombie leaders.
6132 (linux_wait_for_event): Reimplement as wrapper around
6133 linux_wait_for_event_filtered.
6134 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6135 a normal or signal exit is seen, it's the whole process exiting.
6136 (wait_for_sigstop): No longer a for_each_inferior callback.
6137 Rewrite on top of linux_wait_for_event_filtered.
6138 (stop_all_lwps): Call wait_for_sigstop directly.
6139 * server.c (resume, handle_target_event): Handle
6140 TARGET_WAITKIND_NO_RESUMED.
6142 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6144 * win32-low.c (psapi_get_dll_name,
6145 * win32_CreateToolhelp32Snapshot): Delete.
6146 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6147 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6149 (handle_load_dll): Add function description.
6150 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6152 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6154 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6156 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6157 base address when calling win32_add_one_solib.
6158 (handle_load_dll): Delete local variable load_addr.
6159 Remove 0x1000 offset applied to DLL base address when calling
6160 win32_add_one_solib.
6161 (handle_unload_dll): Add comment.
6163 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6165 * win32-low.c (win32_add_all_dlls): Renames
6166 win32_ensure_ntdll_loaded. Rewrite function documentation.
6167 Adjust implementation to always load all DLLs.
6168 Add 0x1000 offset to DLL base address when calling
6169 win32_add_one_solib.
6170 (child_initialization_done): New static global.
6171 (do_initial_child_stuff): Set child_initialization_done to
6172 zero during child initialization, and 1 after. Replace call
6173 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6175 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6176 (handle_unload_dll): Add function documentation.
6177 (get_child_debug_event): Ignore load and unload DLL events
6178 during child initialization.
6180 2014-02-20 Doug Evans <dje@google.com>
6182 Remove global all_lwps.
6183 * inferiors.h (ptid_of): Move here from linux-low.h.
6184 (pid_of, lwpid_of): Ditto.
6185 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6186 parameter is a struct thread_info * now.
6187 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6188 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6189 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6191 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6192 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6193 * linux-arm-low.c (update_registers_callback): Update, "entry"
6194 parameter is a struct thread_info * now.
6195 Fetch lwpid from current_inferior directly.
6196 (arm_insert_point): Pass &all_threads to find_inferior instead of
6198 (arm_remove_point): Ditto.
6199 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6200 (arm_prepare_to_resume): Fetch pid from thread.
6201 (arm_read_description): Fetch lwpid from current_inferior directly.
6202 * linux-low.c (all_lwps): Delete.
6203 (delete_lwp): Delete call to remove_inferior.
6204 (handle_extended_wait): Fetch lwpid from thread.
6205 (add_lwp): Don't set lwp->entry.id. Remove call to
6206 add_inferior_to_list.
6207 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6208 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6209 (kill_one_lwp_callback): Ditto.
6210 (linux_kill): Don't dereference NULL pointer.
6211 Fetch ptid,lwpid from thread.
6212 (get_detach_signal): Fetch ptid from thread.
6213 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6214 Simplify call to regcache_invalidate_thread.
6215 (delete_lwp_callback): Update, "entry" parameter is a
6216 struct thread_info * now. Fetch pid from thread.
6217 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6218 (status_pending_p_callback): Update, "entry" parameter is a
6219 struct thread_info * now. Fetch ptid from thread.
6220 (find_lwp_pid): Update, "entry" parameter is a
6221 struct thread_info * now.
6222 (linux_wait_for_lwp): Fetch pid from thread.
6223 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6224 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6225 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6226 (dequeue_one_deferred_signal): Ditto.
6227 (cancel_breakpoint): Fetch ptid from current_inferior.
6228 (linux_wait_for_event): Pass &all_threads to find_inferior,
6229 not &all_lwps. Fetch ptid, lwpid from thread.
6230 (count_events_callback): Update, "entry" parameter is a
6231 struct thread_info * now.
6232 (select_singlestep_lwp_callback): Ditto.
6233 (select_event_lwp_callback): Ditto.
6234 (cancel_breakpoints_callback): Ditto.
6235 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6237 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6238 (unsuspend_one_lwp): Update, "entry" parameter is a
6239 struct thread_info * now.
6240 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6242 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6243 Fetch lwpid from thread, not lwp.
6244 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6245 Pass &all_threads to find_inferior, not &all_lwps.
6246 (send_sigstop): Fetch lwpid from thread, not lwp.
6247 (send_sigstop_callback): Update, "entry" parameter is a
6248 struct thread_info * now.
6249 (suspend_and_send_sigstop_callback): Ditto.
6250 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6251 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6252 struct thread_info * now.
6253 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6255 (lwp_running): Update, "entry" parameter is a
6256 struct thread_info * now.
6257 (stop_all_lwps): Fetch ptid from thread.
6258 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6259 (linux_resume_one_lwp): Fetch lwpid from thread.
6260 (linux_set_resume_request): Update, "entry" parameter is a
6261 struct thread_info * now. Fetch pid, lwpid from thread.
6262 (resume_status_pending_p): Update, "entry" parameter is a
6263 struct thread_info * now.
6264 (need_step_over_p): Ditto. Fetch lwpid from thread.
6265 (start_step_over): Fetch lwpid from thread.
6266 (linux_resume_one_thread): Update, "entry" parameter is a
6267 struct thread_info * now. Fetch lwpid from thread.
6268 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6269 (proceed_one_lwp): Update, "entry" parameter is a
6270 struct thread_info * now. Fetch lwpid from thread.
6271 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6272 struct thread_info * now.
6273 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6274 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6275 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6277 (regsets_store_inferior_registers): Ditto.
6278 (fetch_register, store_register): Ditto.
6279 (linux_read_memory, linux_write_memory): Ditto.
6280 (linux_request_interrupt): Ditto.
6281 (linux_read_auxv): Ditto.
6282 (linux_xfer_siginfo): Ditto.
6283 (linux_qxfer_spu): Ditto.
6284 (linux_qxfer_libraries_svr4): Ditto.
6285 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6286 moved to inferiors.h.
6288 (get_thread_lwp): Update.
6289 (struct lwp_info): Delete member "entry". Simplify comment for
6292 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6293 current_inferior directly.
6294 (update_watch_registers_callback): Update, "entry" parameter is a
6295 struct thread_info * now. Fetch pid from thread.
6296 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6297 (mips_insert_point): Fetch lwpid from current_inferior.
6298 Pass &all_threads to find_inferior, not &all_lwps.
6299 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6300 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6302 (mips_stopped_data_address): Ditto.
6303 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6305 * linux-tile-low.c (tile_arch_setup): Ditto.
6306 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6307 (update_debug_registers_callback): Update, "entry" parameter is a
6308 struct thread_info * now. Fetch pid from thread.
6309 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6310 Pass &all_threads to find_inferior, not &all_lwps.
6311 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6312 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6313 Pass &all_threads to find_inferior, not &all_lwps.
6314 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6315 (i386_dr_low_get_status): Ditto.
6316 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6317 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6318 (x86_linux_read_description): Ditto.
6319 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6321 2014-02-20 Doug Evans <dje@google.com>
6323 * inferiors.c (get_first_inferior): Fix buglet.
6325 2014-02-19 Doug Evans <dje@google.com>
6327 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6328 * inferiors.c (add_thread): Change result type to struct thread_info *.
6329 All callers updated.
6330 (add_lwp): Call add_thread here instead of in callers.
6331 All callers updated.
6332 * linux-low.h (get_lwp_thread): Rewrite.
6333 (struct lwp_info): New member "thread".
6335 2014-02-19 Doug Evans <dje@google.com>
6337 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6338 All callers updated.
6340 2014-02-19 Doug Evans <dje@google.com>
6342 * inferiors.c (add_thread): Fix whitespace.
6344 2014-02-19 Doug Evans <dje@google.com>
6346 * dll.c (clear_dlls): Replace accessing list implemention details
6348 * gdbthread.h (get_first_thread): Declare.
6349 * inferiors.c (for_each_inferior_with_data): New function.
6350 (get_first_thread): New function.
6351 (find_thread_ptid): Simplify.
6352 (get_first_inferior): New function.
6353 (clear_list): Delete.
6354 (one_inferior_p): New function.
6355 (clear_inferior_list): New function.
6356 (clear_inferiors): Update.
6357 * inferiors.h (for_each_inferior_with_data): Declare.
6358 (clear_inferior_list): Declare.
6359 (one_inferior_p): Declare.
6360 (get_first_inferior): Declare.
6361 * linux-low.c (linux_wait_for_event): Replace accessing list
6362 implemention details with API function.
6363 * server.c (target_running): Ditto.
6364 (accumulate_file_name_length): New function.
6365 (emit_dll_description): New function.
6366 (handle_qxfer_libraries): Replace accessing list implemention
6367 details with API function.
6368 (handle_qxfer_threads_worker): New function.
6369 (handle_qxfer_threads_proper): Replace accessing list implemention
6370 details with API function.
6371 (handle_query): Ditto.
6372 (visit_actioned_threads_callback_ftype): New typedef.
6373 (visit_actioned_threads_data): New struct.
6374 (visit_actioned_threads): Rewrite to be find_inferior callback.
6375 (resume): Call find_inferior.
6376 (handle_status): Replace accessing list implemention
6377 details with API function.
6378 (process_serial_event): Replace accessing list implemention details
6380 * target.c (set_desired_inferior): Replace accessing list implemention
6381 details with API function.
6382 * tracepoint.c (same_process_p): New function.
6383 (gdb_agent_about_to_close): Replace accessing list implemention
6384 details with API function.
6385 * win32-low.c (child_delete_thread): Replace accessing list
6386 implemention details with API function.
6387 (match_dll_by_basename): New function.
6388 (dll_is_loaded_by_basename): New function.
6389 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6390 details call to dll_is_loaded_by_basename.
6392 2014-02-19 Doug Evans <dje@google.com>
6394 * dll.h (struct dll_info): Add comment.
6395 * gdbthread.h (struct thread_info): Add comment.
6396 (current_ptid): Simplify.
6397 * inferiors.c (add_process): Update.
6398 (remove_process): Update.
6399 * inferiors.h (struct process_info): Rename member "head" to "entry".
6400 * linux-low.c (delete_lwp): Update.
6402 (last_thread_of_process_p): Update.
6403 (kill_one_lwp_callback, linux_kill): Update.
6404 (status_pending_p_callback): Update.
6405 (wait_for_sigstop): Update. Simplify read of ptid.
6406 (start_step_over): Update.
6407 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6408 (get_lwp_thread): Update.
6409 (struct lwp_info): Rename member "head" to "entry".
6410 * regcache.h (inferior_list_entry): Delete.
6411 * server.c (kill_inferior_callback): Update.
6412 (detach_or_kill_inferior_callback): Update.
6413 (print_started_pid): Update.
6414 (print_attached_pid): Update.
6415 (process_serial_event): Simplify read of ptid.
6416 * thread-db.c (thread_db_create_event): Update.
6417 (thread_db_get_tls_address): Update.
6418 * win32-low.c (current_inferior_ptid): Simplify.
6420 2014-02-19 Tom Tromey <tromey@redhat.com>
6422 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6424 (target_supports_btrace): Update.
6426 2014-02-14 Yao Qi <yao@codesourcery.com>
6428 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6429 (rsp-low-ipa.o): New target.
6431 2014-02-12 Tom Tromey <tromey@redhat.com>
6433 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6434 convert_ascii_to_int.
6435 * regcache.c (registers_to_string): Likewise.
6436 * remote-utils.c (decode_M_packet): Likewise.
6437 * server.c (process_serial_event): Likewise.
6439 2014-02-12 Tom Tromey <tromey@redhat.com>
6441 * server.c (handle_query, handle_v_run): Use hex2bin, not
6443 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6445 2014-02-12 Tom Tromey <tromey@redhat.com>
6447 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6448 convert_int_to_ascii.
6449 * regcache.c (registers_to_string, collect_register_as_string):
6451 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6453 * server.c (process_serial_event): Likewise.
6454 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6455 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6457 2014-02-12 Tom Tromey <tromey@redhat.com>
6459 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6460 bin2hex, not hexify.
6461 * tracepoint.c (cmd_qtstatus): Likewise.
6463 2014-02-12 Tom Tromey <tromey@redhat.com>
6465 * remote-utils.c (monitor_output): Pass explicit length to
6468 2014-02-12 Tom Tromey <tromey@redhat.com>
6470 * tracepoint.c: Include rsp-low.h.
6471 * server.c: Include rsp-low.h.
6472 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6473 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6475 * remote-utils.c: Include rsp-low.h.
6476 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6477 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6478 (convert_int_to_ascii, convert_ascii_to_int): Move to
6480 * regcache.c: Include rsp-low.h.
6481 * ax.c: Include rsp-low.h.
6482 * Makefile.in (SFILES): Add common/rsp-low.c.
6483 (OBS): Add rsp-low.o.
6484 (rsp-low.o): New target.
6486 2014-02-12 Tom Tromey <tromey@redhat.com>
6488 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6489 Include print-utils.h.
6490 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6491 (plongest, thirty_two, phex_nz): Remove.
6492 * Makefile.in (SFILES): Add common/print-utils.c.
6493 (OBS): Add print-utils.o.
6494 (print-utils-ipa.o): New target.
6495 (print-utils.o): New target.
6496 (IPA_OBJS): Add print-utils-ipa.o.
6498 2014-02-06 Tom Tromey <tromey@redhat.com>
6500 * Makefile.in (SFILES): Fix indentation.
6502 2014-02-05 Doug Evans <dje@google.com>
6504 * linux-low.c (linux_wait_for_event): Improve comment.
6505 (linux_wait_1): Keep current_inferior in sync with event_child.
6507 2014-01-22 Doug Evans <dje@google.com>
6509 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6511 2014-01-22 Doug Evans <dje@google.com>
6513 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6514 * configure: Regenerate.
6515 * config.in: Regenerate.
6516 * Makefile.in (SFILES): Add debug.c.
6518 * debug.c: New file.
6519 * debug.h: New file.
6520 * linux-aarch64-low.c (*): Update all debugging printfs to use
6521 debug_printf instead of fprintf.
6522 * linux-arm-low.c (*): Ditto.
6523 * linux-cris-low.c (*): Ditto.
6524 * linux-crisv32-low.c (*): Ditto.
6525 * linux-m32r-low.c (*): Ditto.
6526 * linux-sparc-low.c (*): Ditto.
6527 * linux-x86.c (*): Ditto.
6528 * linux-low.c (*): Ditto.
6529 (linux_wait_1): Add calls to debug_enter, debug_exit.
6530 (linux_wait): Remove redundant debugging printf.
6531 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6532 (linux_resume, unstop_all_lwps): Ditto.
6533 * mem-break.c (*): Update all debugging printfs to use
6534 debug_printf instead of fprintf.
6535 * remote-utils.c (*): Ditto.
6536 * thread-db.c (*): Ditto.
6537 * server.c #include <ctype.h>, "gdb_vecs.h".
6538 (debug_threads): Moved to debug.c.
6539 (*): Update all debugging printfs to use debug_printf instead of
6541 (start_inferior): Replace call to fflush with call to debug_flush.
6542 (monitor_show_help): Mention set debug-format.
6543 (parse_debug_format_options): New function.
6544 (handle_monitor_command): Handle "monitor set debug-format".
6545 (gdbserver_usage): Mention --debug-format.
6546 (main): Parse --debug-format.
6547 * server.h (debug_threads): Declaration moved to debug.h.
6549 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6550 trace_debug_1 that uses debug_printf.
6551 (tracepoint_look_up_symbols): Update all debugging printfs to use
6552 debug_printf instead of fprintf.
6554 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6556 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6559 2014-01-17 Pedro Alves <palves@redhat.com>
6562 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6563 defined after including gdb_proc_service.h.
6565 2014-01-16 Doug Evans <dje@google.com>
6567 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6568 (match_dll): Use it.
6570 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6572 * target.h (target_ops) <read_btrace>: Change parameters and
6573 return type to allow error reporting.
6574 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6575 trace reading errors on.
6576 * linux-low.c (linux_low_read_btrace): Pass trace reading
6578 (linux_low_disable_btrace): New.
6580 2014-01-15 Doug Evans <dje@google.com>
6582 * inferiors.c (thread_id_to_gdb_id): Delete.
6583 * inferiors.h (thread_id_to_gdb_id): Delete.
6585 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6587 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6588 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6591 2014-01-08 Pedro Alves <palves@redhat.com>
6593 * server.c (handle_status): Don't discard previous queued stop
6594 replies or thread's pending status here.
6595 (main) <disconnection>: Do it here instead.
6597 2014-01-08 Pedro Alves <palves@redhat.com>
6599 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6600 * server.c (visit_actioned_threads, handle_pending_status): New
6602 (handle_v_cont): Factor out parts to ...
6603 (resume): ... this new function. If in all-stop, and a thread
6604 being resumed has a pending status, report it without actually
6606 (myresume): Adjust to use the new 'resume' function.
6607 (clear_pending_status_callback, set_pending_status_callback)
6608 (find_status_pending_thread_callback): New functions.
6609 (handle_status): Handle the case of multiple threads having
6610 interesting statuses to report. Report threads' real last signal
6611 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6612 with an interesting thread to report the status for, instead of
6613 always reporting the status of the first thread.
6615 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6617 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6618 * gdbreplay.c (gdbreplay_version): Likewise.
6620 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6622 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6623 iov.iov_len with the real length in use.
6625 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6627 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6628 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6629 for all targets that use win32-low.c.
6630 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6631 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6633 2013-12-13 Pedro Alves <palves@redhat.com>
6635 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6636 if equal to TARGET_WAITKIND_LOADED.
6637 * win32-low.c (cached_status): New static global.
6638 (win32_wait): Add declaration.
6639 (do_initial_child_stuff): Flush all initial pending debug events
6640 up to the initial breakpoint.
6641 (win32_wait): If CACHED_STATUS was set, return that instead
6642 of doing a real wait. Remove the code resuming the execution
6643 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6644 during the initial phase. Also remove the code changing
6645 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6646 TARGET_WAITKIND_STOPPED.
6648 2013-12-11 Yao Qi <yao@codesourcery.com>
6650 * notif.c (handle_notif_ack): Return 0 if no notification
6653 2013-11-20 Doug Evans <dje@google.com>
6655 * linux-low.c (linux_set_resume_request): Fix comment.
6657 2013-11-20 Doug Evans <dje@google.com>
6659 * linux-low.c (resume_status_pending_p): Tweak comment.
6661 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6663 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6664 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6665 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6666 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6667 (srv_amd64_regobj): Add amd64-mpx.o.
6668 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6669 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6670 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6671 * i387-fp.c (num_pl_bnd_register) Added constant.
6672 (num_pl_bnd_cfg_registers) Added constant.
6673 (struct i387_xsave) Added reserved area and MPX fields.
6674 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6675 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6677 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6678 (init_registers_amd64_mpx_linux): Declare new function.
6679 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6680 (x86_64_regmap): Add MPX registers.
6681 (x86_linux_read_description): Add MPX case.
6682 (initialize_low_arch): Initialize MPX targets.
6684 2013-11-18 Tom Tromey <tromey@redhat.com>
6686 * configure: Rebuild.
6687 * configure.ac: Don't check for stdlib.h.
6688 * gdbreplay.c: Unconditionally include stdlib.h.
6690 2013-11-18 Tom Tromey <tromey@redhat.com>
6692 * config.in: Rebuild.
6693 * configure: Rebuild.
6694 * configure.ac: Don't use AC_HEADER_DIRENT.
6696 2013-11-18 Tom Tromey <tromey@redhat.com>
6698 * server.h: Don't check HAVE_STRING_H.
6699 * gdbreplay.c: Don't check HAVE_STRING_H.
6700 * configure: Rebuild.
6702 2013-11-18 Tom Tromey <tromey@redhat.com>
6704 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6707 2013-11-08 Tom Tromey <tromey@redhat.com>
6709 * configure, config.in: Rebuild.
6710 * configure.ac: Remove unused configury.
6712 2013-11-08 Tom Tromey <tromey@redhat.com>
6714 * acinclude.m4: Include common.m4, codeset.m4.
6715 * configure, config.in: Rebuild.
6716 * configure.ac: Use GDB_AC_COMMON.
6718 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6720 * linux-s390-low.c (HWCAP_S390_TE): New define.
6721 (s390_arch_setup): Consider the TE field in the HWCAP for
6722 determining 'have_regset_tdb'.
6724 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6727 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6730 2013-10-02 Pedro Alves <palves@redhat.com>
6732 * server.c (process_serial_event): Don't output "GDBserver
6733 exiting" if GDB is connected through stdio.
6734 * target.c (mywait): Likewise, be silent if GDB is connected
6737 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6739 * lynx-low.c (lynx_add_threads_after_attach): New function.
6740 (lynx_attach): Remove call to add_thread. Add call to
6741 lynx_add_threads_after_attach instead.
6743 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6745 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6746 * config.in, configure: Regenerated.
6748 2013-09-18 Yao Qi <yao@codesourcery.com>
6751 * server.c (start_inferior): Clear 'resume_info'.
6753 2013-09-16 Jiong Wang <jiwang@tilera.com>
6755 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6758 2013-09-16 Jiong Wang <jiwang@tilera.com>
6760 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6761 linux-tile-low.o to srv_tgtobj.
6763 2013-09-16 Will Newton <will.newton@linaro.org>
6765 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6768 2013-09-06 Pedro Alves <palves@redhat.com>
6770 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6771 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6772 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6773 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6774 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6775 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6777 2013-09-06 Pedro Alves <palves@redhat.com>
6779 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6780 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6782 2013-09-06 Pedro Alves <palves@redhat.com>
6784 * linux-amd64-ipa.c: Include tracepoint.h.
6785 * linux-i386-ipa.c: Include tracepoint.h.
6787 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6789 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6790 (ps_get_thread_area): New function.
6792 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6794 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6795 (initialize_low_arch): Call init_registers_crisv32 rather than
6796 init_register_crisv32.
6798 2013-09-05 Pedro Alves <palves@redhat.com>
6800 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6802 * hostio.h: ... this new file.
6803 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6804 win32-low.c: Include hostio.h.
6806 2013-09-05 Pedro Alves <palves@redhat.com>
6808 * server.h (gdb_client_data, handler_func, callback_handler_func)
6809 (delete_file_handler, add_file_handler, append_callback_event)
6810 (delete_callback_event, start_event_loop, initialize_event_loop):
6811 Move to event-loop.h and include it.
6812 * event-loop.h: New file.
6814 2013-09-05 Pedro Alves <palves@redhat.com>
6816 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6817 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6818 (loaded_dll, unloaded_dll): Move to ...
6819 * dll.h: ... this new file.
6820 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6822 2013-09-05 Pedro Alves <palves@redhat.com>
6824 * server.h (current_process, get_thread_process, all_processes)
6825 (add_inferior_to_list, for_each_inferior, current_inferior)
6826 (remove_inferior, add_process, remove_process, find_process_pid)
6827 (have_started_inferiors_p, have_attached_inferiors_p)
6828 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6829 (clear_inferiors, find_inferior, find_inferior_id)
6830 (inferior_target_data, set_inferior_target_data)
6831 (inferior_regcache_data, set_inferior_regcache_data): Move to
6832 inferiors.h, and include it.
6833 * inferiors.h: New file.
6835 2013-09-05 Pedro Alves <palves@redhat.com>
6837 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6841 2013-09-05 Pedro Alves <palves@redhat.com>
6843 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6845 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6846 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6847 (handle_tracepoint_general_set, handle_tracepoint_query)
6848 (tracepoint_finished_step, tracepoint_was_hit)
6849 (release_while_stepping_state_list, current_traceframe)
6850 (in_readonly_region, traceframe_read_mem)
6851 (fetch_traceframe_registers, traceframe_read_sdata)
6852 (traceframe_read_info, struct fast_tpoint_collect_status)
6853 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6854 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6855 (supply_fast_tracepoint_registers)
6856 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6857 (ipa_tdesc, claim_trampoline_space)
6858 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6859 (agent_mem_read, agent_get_trace_state_variable_value)
6860 (agent_set_trace_state_variable_value, agent_tsv_read)
6861 (agent_mem_read_string, get_raw_reg_func_addr)
6862 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6863 * tracepoint.h: ... this new file.
6865 2013-09-05 Pedro Alves <palves@redhat.com>
6867 * server.h (perror_with_name, error, fatal, warning, paddress)
6868 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6870 * utils.h: New file.
6872 2013-09-05 Pedro Alves <palves@redhat.com>
6874 * server.h (remote_debug, noack_mode, transport_is_reliable)
6875 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6876 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6877 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6878 (write_enn, initialize_async_io, enable_async_io)
6879 (disable_async_io, check_remote_input_interrupt_request)
6880 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6881 (dead_thread_notify, prepare_resume_reply)
6882 (decode_address_to_semicolon, decode_address, decode_m_packet)
6883 (decode_M_packet, decode_X_packet, decode_xfer_write)
6884 (decode_search_memory_packet, unhexify, hexify)
6885 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6886 (look_up_one_symbol, relocate_instruction)
6887 (monitor_output): Move to remote-utils.h, and include it.
6888 * remote-utils.h: New file.
6890 2013-09-05 Pedro Alves <palves@redhat.com>
6892 * server.h (_): Delete.
6894 2013-09-02 Pedro Alves <palves@redhat.com>
6896 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6897 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6899 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6901 2013-09-02 Pierre Muller <muller@sourceware.org>
6903 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6904 or WriteProcessMemory complete successfully and handle
6905 ERROR_PARTIAL_COPY error.
6907 2013-09-02 Pedro Alves <palves@redhat.com>
6909 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6910 error instead of EIO.
6912 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6915 * linux-low.c: Include filestuff.h.
6916 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6917 * lynx-low.c: Include filestuff.h.
6918 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6919 * server.c: Include filestuff.h.
6920 (main): Call notice_open_fds.
6921 * spu-low.c: Include filestuff.h.
6922 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6924 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6926 * Makefile.in: Explain why ../target and ../nat are not
6927 listed as include file search paths.
6928 (linux-waitpid.o): New object file rule.
6929 * configure.srv (srv_native_linux_obj): New variable.
6930 Replace all occurrences of linux native object files with
6931 $srv_native_linux_obj.
6932 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6933 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6934 (linux_enable_event_reporting): Remove declaration.
6935 (my_waitpid): Moved to common/linux-waitpid.c.
6936 (linux_wait_for_event): Pass ptid when calling
6937 linux_enable_event_reporting.
6938 (linux_supports_tracefork_flag): Remove.
6939 (linux_enable_event_reporting): Likewise.
6940 (linux_tracefork_grandchild): Remove.
6941 (STACK_SIZE): Moved to common/linux-ptrace.c.
6942 (linux_tracefork_child): Remove.
6943 (linux_test_for_tracefork): Remove.
6944 (linux_look_up_symbols): Call linux_supports_traceclone.
6945 (initialize_low): Remove call to linux_test_for_tracefork.
6946 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6947 common/linux-ptrace.h.
6948 (PTRACE_TYPE_ARG4): Likewise.
6949 Include linux-ptrace.h.
6951 2013-08-21 Pedro Alves <palves@redhat.com>
6953 * config.in: Renegerate.
6955 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6957 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6958 (SFILES): Remove $(srcdir)/common/target-common.c and
6959 add $(srcdir)/target/waitstatus.c.
6960 (OBS): Remove target-common.o and add waitstatus.o.
6961 (server_h): Remove $(srcdir)/../common/target-common.h and
6962 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6963 and $(srcdir)/../target/waitstatus.h.
6964 (target-common.o): Remove.
6965 (waitstatus.o): New target object file.
6966 * target.h: Do not include target-common.h and
6967 include target/resume.h, target/wait.h and
6968 target/waitstatus.h.
6970 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6972 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6973 to PTRACE_TYPE_ARG3.
6974 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6975 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6977 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6978 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6980 2013-07-27 Jie Zhang <jie@codesourcery.com>
6981 Daniel Jacobowitz <dan@codesourcery.com>
6982 Yao Qi <yao@codesourcery.com>
6984 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6985 (mips-linux-watch.o): New rule.
6986 (mips_linux_watch_h): New variable.
6987 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6989 * linux-mips-low.c: Include mips-linux-watch.h.
6990 (struct arch_process_info, struct arch_lwp_info): New.
6991 (update_watch_registers_callback): New function.
6992 (mips_linux_new_process, mips_linux_new_thread) New functions.
6993 (mips_linux_prepare_to_resume, mips_insert_point): New
6995 (mips_remove_point, mips_stopped_by_watchpoint): New
6997 (rsp_bp_type_to_target_hw_bp_type): New function.
6998 (mips_stopped_data_address): New function.
6999 (the_low_target): Add watchpoint support functions.
7001 2013-07-27 Yao Qi <yao@codesourcery.com>
7003 * i386-low.c: Include break-common.h.
7004 (enum target_hw_bp_type): Remove.
7006 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7008 * Makefile.in (SFILES): /common/target-common.c.
7009 (OBS): Add target-common.o.
7010 (server_h): Add $(srcdir)/../common/target-common.h.
7011 (target-common.o): New target.
7012 * server.c (queue_stop_reply_callback): Free
7013 status string after use.
7014 * target.c (target_waitstatus_to_string): Remove.
7015 * target.h: Include target-common.h.
7016 (resume_kind): Likewise.
7017 (target_waitkind): Likewise.
7018 (target_waitstatus): Likewise.
7019 (TARGET_WNOHANG): Likewise.
7021 2013-07-04 Yao Qi <yao@codesourcery.com>
7023 * Makefile.in (host_alias): Use @host_noncanonical@.
7024 (target_alias): Use @target_noncanonical@.
7025 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7026 ACX_NONCANONICAL_HOST.
7027 * configure: Regenerated.
7030 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7032 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7033 * configure: Rebuild.
7034 * Makefile.in (version_host, version_target): Get from configure.
7035 (version.c): Use $(version_host) and $(version_target).
7037 2013-07-03 Pedro Alves <palves@redhat.com>
7039 * Makefile.in (config.status): Depend on development.sh.
7040 * acinclude.m4: Include libmcheck.m4.
7041 * configure: Regenerate.
7043 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7045 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7046 attribute inside the parentheses.
7047 (winapi_DebugSetProcessKillOnExit): Ditto.
7048 (winapi_DebugBreakProcess): Ditto.
7049 (winapi_GenerateConsoleCtrlEvent): Ditto.
7051 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7053 * notif.h (notif_event): Add a dummy member to avoid compiler
7056 2013-07-01 Pedro Alves <palves@redhat.com>
7058 * hostio.c (HOSTIO_PATH_MAX): Define.
7059 (require_filename, handle_open, handle_unlink, handle_readlink):
7062 2013-07-01 Pedro Alves <palves@redhat.com>
7064 * server.h: Include "pathmax.h".
7065 * linux-low.c: Don't include sys/param.h.
7066 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7068 * win32-low.c: Don't include sys/param.h.
7069 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7071 2013-07-01 Pedro Alves <palves@redhat.com>
7073 * event-loop.c: Don't check HAVE_UNISTD_H before including
7075 * gdbreplay.c: Likewise.
7076 * remote-utils.c: Likewise.
7077 * server.c: Likewise.
7078 * configure.ac: Don't check for unistd.h.
7079 * configure: Regenerate.
7081 2013-06-28 Tom Tromey <tromey@redhat.com>
7083 * Makefile.in (version.c): Use version.in, not
7086 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7088 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7089 * configure: Rebuild.
7090 * Makefile.in (version_host, version_target): Get from configure.
7091 (version.c): Use $(version_host) and $(version_target).
7093 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7095 Fix trace-status to output user name without trailing colon.
7096 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7098 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7100 Fix trace-status to output proper start-time and stop-time.
7101 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7102 output start time and stop time in hex as gdb expects.
7104 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7106 * tracepoint.c (build_traceframe_info_xml): Output trace state
7107 variables present in the trace buffer.
7109 2013-06-24 Tom Tromey <tromey@redhat.com>
7111 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7113 (version.o): Remove.
7114 * gdbreplay.c: Include version.h.
7115 (version, host_name): Don't declare.
7116 * server.h: Include version.h.
7117 (version, host_name): Don't declare.
7119 2013-06-12 Pedro Alves <palves@redhat.com>
7121 * linux-x86-low.c (linux_is_elf64): Delete global.
7122 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7123 with local linux_pid_exe_is_elf_64_file use.
7125 2013-06-11 Pedro Alves <palves@redhat.com>
7127 * linux-low.c (regset_disabled, disable_regset): New functions.
7128 (regsets_fetch_inferior_registers)
7129 (regsets_store_inferior_registers): Use them.
7130 (initialize_regsets_info); Don't allocate the disabled_regsets
7132 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7135 2013-06-11 Pedro Alves <palves@redhat.com>
7137 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7140 2013-06-11 Pedro Alves <palves@redhat.com>
7142 * linux-x86-low.c (initialize_low_arch): Call
7143 init_registers_x32_avx_linux.
7145 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7147 Fix compatibility with Android Bionic.
7148 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7151 2013-06-07 Pedro Alves <palves@redhat.com>
7154 * Makefile.in (OBS): Add tdesc.o.
7155 (IPA_OBJS): Add tdesc-ipa.o.
7156 (tdesc-ipa.o): New rule.
7157 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7159 * linux-low.c (new_inferior): Delete.
7160 (disabled_regsets, num_regsets): Delete.
7161 (linux_add_process): Adjust to set the new per-process
7163 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7164 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7165 was a stop. When calling arch_setup, switch the current inferior
7166 to the thread that got an event.
7167 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7168 (regsets_fetch_inferior_registers)
7169 (regsets_store_inferior_registers): New regsets_info parameter.
7171 (linux_register_in_regsets): New regs_info parameter. Adjust to
7173 (register_addr, fetch_register, store_register): New usrregs_info
7174 parameter. Adjust to use it.
7175 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7176 parameter regs_info. Adjust to use it.
7177 (linux_fetch_registers): Get the current inferior's regs_info, and
7179 (linux_store_registers): Ditto.
7180 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7181 (initialize_low): Don't initialize the target_regsets here. Call
7182 initialize_low_arch.
7183 * linux-low.h (target_regsets): Delete declaration.
7184 (struct regsets_info): New.
7185 (struct usrregs_info): New.
7186 (struct regs_info): New.
7187 (struct process_info_private) <new_inferior>: New field.
7188 (struct linux_target_ops): Delete the num_regs, regmap, and
7189 regset_bitmap fields. New field regs_info.
7190 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7191 * i387-fp.c (num_xmm_registers): Delete.
7192 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7193 calls to new interface.
7194 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7195 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7196 Infer the number of xmm registers from the regcache's target
7198 * i387-fp.h (num_xmm_registers): Delete.
7199 * inferiors.c (add_thread): Don't install the thread's regcache
7201 * proc-service.c (gregset_info): Fetch the current inferior's
7202 regs_info. Adjust to use it.
7203 * regcache.c: Include tdesc.h.
7204 (register_bytes, reg_defs, num_registers)
7205 (gdbserver_expedite_regs): Delete.
7206 (get_thread_regcache): If the thread doesn't have a regcache yet,
7207 create one, instead of aborting gdbserver.
7208 (regcache_invalidate_one): Rename to ...
7209 (regcache_invalidate_thread): ... this.
7210 (regcache_invalidate_one): New.
7211 (regcache_invalidate): Only invalidate registers of the current
7213 (init_register_cache): Add target_desc parameter, and use it.
7214 (new_register_cache): Ditto. Assert the target description has a
7215 non zero registers_size.
7216 (regcache_cpy): Add assertions. Adjust.
7217 (realloc_register_cache, set_register_cache): Delete.
7218 (registers_to_string, registers_from_string): Adjust.
7219 (find_register_by_name, find_regno, find_register_by_number)
7220 (register_cache_size): Add target_desc parameter, and use it.
7221 (free_register_cache_thread, free_register_cache_thread_one)
7222 (regcache_release, register_cache_size): New.
7223 (register_size): Add target_desc parameter, and use it.
7224 (register_data, supply_register, supply_register_zeroed)
7225 (supply_regblock, supply_register_by_name, collect_register)
7226 (collect_register_as_string, collect_register_by_name): Adjust.
7227 * regcache.h (struct target_desc): Forward declare.
7228 (struct regcache) <tdesc>: New field.
7229 (init_register_cache, new_register_cache): Add target_desc
7231 (regcache_invalidate_thread): Declare.
7232 (regcache_invalidate_one): Delete declaration.
7233 (regcache_release): Declare.
7234 (find_register_by_number, register_cache_size, register_size)
7235 (find_regno): Add target_desc parameter.
7236 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7238 * remote-utils.c: Include tdesc.h.
7239 (outreg, prepare_resume_reply): Adjust.
7240 * server.c: Include tdesc.h.
7241 (gdbserver_xmltarget): Delete declaration.
7242 (get_features_xml, process_serial_event): Adjust.
7243 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7245 (struct process_info) <tdesc>: New field.
7246 (ipa_tdesc): Declare.
7247 * tdesc.c: New file.
7248 * tdesc.h: New file.
7249 * tracepoint.c: Include tdesc.h.
7250 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7251 (get_context_regcache): Adjust to pass ipa_tdesc down.
7252 (do_action_at_tracepoint): Adjust to get the register cache size
7253 from the context regcache's description.
7254 (traceframe_walk_blocks): Adjust to get the register cache size
7255 from the current trace frame's description.
7256 (traceframe_get_pc): Adjust to get current trace frame's
7257 description and pass it down.
7258 (gdb_collect): Adjust to get the register cache size from the
7260 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7261 (gdbserver_xmltarget): Delete.
7262 (initialize_low_tracepoint): Set the ipa's target description.
7263 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7264 (initialize_low_tracepoint): Set the ipa's target description.
7265 * linux-x86-low.c: Include tdesc.h.
7266 [__x86_64__] (is_64bit_tdesc): New.
7267 (ps_get_thread_area, x86_get_thread_area): Use it.
7268 (i386_cannot_store_register): Rename to ...
7269 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7270 (i386_cannot_fetch_register): Rename to ...
7271 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7272 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7274 (target_regsets): Rename to ...
7275 (x86_regsets): ... this.
7276 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7278 (x86_siginfo_fixup): Use is_64bit_tdesc.
7279 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7280 (tdesc_x32_avx_linux, tdesc_x32_linux)
7281 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7283 (x86_linux_update_xmltarget): Delete.
7284 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7285 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7286 (AMD64_LINUX_USER64_CS): New.
7287 (x86_linux_read_description): New, based on
7288 x86_linux_update_xmltarget.
7289 (same_process_callback): New.
7290 (x86_arch_setup_process_callback): New.
7291 (x86_linux_update_xmltarget): New.
7292 (x86_regsets_info): New.
7293 (amd64_linux_regs_info): New.
7294 (i386_linux_usrregs_info): New.
7295 (i386_linux_regs_info): New.
7296 (x86_linux_regs_info): New.
7297 (x86_arch_setup): Reimplement.
7298 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7299 (x86_emit_ops): Ditto.
7300 (the_low_target): Adjust. Install x86_linux_regs_info,
7301 x86_cannot_fetch_register, and x86_cannot_store_register.
7302 (initialize_low_arch): New.
7303 * linux-ia64-low.c (tdesc_ia64): Declare.
7304 (ia64_fetch_register): Adjust.
7305 (ia64_usrregs_info, regs_info): New globals.
7306 (ia64_regs_info): New function.
7307 (the_low_target): Adjust.
7308 (initialize_low_arch): New function.
7309 * linux-sparc-low.c (tdesc_sparc64): Declare.
7310 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7312 (sparc_arch_setup): New function.
7313 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7314 (the_low_target): Adjust.
7315 (initialize_low_arch): New function.
7316 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7317 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7318 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7319 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7320 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7321 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7322 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7323 (tdesc_powerpc_isa205_vsx64l): Declare.
7324 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7325 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7326 (ppc_set_pc, ppc_get_hwcap): Adjust.
7327 (ppc_usrregs_info): Forward declare.
7328 (!__powerpc64__) ppc_regmap_adjusted: New global.
7329 (ppc_arch_setup): Adjust to the current process'es target
7331 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7332 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7333 (ppc_store_evrregset): Adjust.
7334 (target_regsets): Rename to ...
7335 (ppc_regsets): ... this, and make static.
7336 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7337 (ppc_regs_info): New function.
7338 (the_low_target): Adjust.
7339 (initialize_low_arch): New function.
7340 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7341 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7342 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7343 (tdesc_s390x_linux64v2): Declare.
7344 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7345 (s390_fill_gregset, s390_store_last_break): Adjust.
7346 (target_regsets): Rename to ...
7347 (s390_regsets): ... this, and make static.
7348 (s390_get_pc, s390_set_pc): Adjust.
7349 (s390_get_hwcap): New target_desc parameter, and use it.
7350 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7351 (s390_arch_setup): Adjust to set the current process'es target
7352 description. Don't adjust the regmap.
7353 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7354 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7355 (regs_info_3264): New globals.
7356 (s390_regs_info): New function.
7357 (the_low_target): Adjust.
7358 (initialize_low_arch): New function.
7359 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7360 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7361 [__mips64] (init_registers_mips_linux)
7362 (init_registers_mips_dsp_linux): Delete defines.
7363 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7364 (have_dsp): New global.
7365 (mips_read_description): New, based on mips_arch_setup.
7366 (mips_arch_setup): Reimplement.
7367 (get_usrregs_info): New function.
7368 (mips_cannot_fetch_register, mips_cannot_store_register)
7369 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7370 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7371 (target_regsets): Rename to ...
7372 (mips_regsets): ... this, and make static.
7373 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7374 (dsp_regs_info, regs_info): New globals.
7375 (mips_regs_info): New function.
7376 (the_low_target): Adjust.
7377 (initialize_low_arch): New function.
7378 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7379 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7381 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7382 (arm_read_description): New, with bits factored from
7384 (arm_arch_setup): Reimplement.
7385 (target_regsets): Rename to ...
7386 (arm_regsets): ... this, and make static.
7387 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7388 (arm_regs_info): New function.
7389 (the_low_target): Adjust.
7390 (initialize_low_arch): New function.
7391 * linux-m68k-low.c (tdesc_m68k): Declare.
7392 (target_regsets): Rename to ...
7393 (m68k_regsets): ... this, and make static.
7394 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7395 (m68k_regs_info): New function.
7396 (m68k_arch_setup): New function.
7397 (the_low_target): Adjust.
7398 (initialize_low_arch): New function.
7399 * linux-sh-low.c (tdesc_sharch): Declare.
7400 (target_regsets): Rename to ...
7401 (sh_regsets): ... this, and make static.
7402 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7403 (sh_regs_info, sh_arch_setup): New functions.
7404 (the_low_target): Adjust.
7405 (initialize_low_arch): New function.
7406 * linux-bfin-low.c (tdesc_bfin): Declare.
7407 (bfin_arch_setup): New function.
7408 (bfin_usrregs_info, regs_info): New globals.
7409 (bfin_regs_info): New function.
7410 (the_low_target): Adjust.
7411 (initialize_low_arch): New function.
7412 * linux-cris-low.c (tdesc_cris): Declare.
7413 (cris_arch_setup): New function.
7414 (cris_usrregs_info, regs_info): New globals.
7415 (cris_regs_info): New function.
7416 (the_low_target): Adjust.
7417 (initialize_low_arch): New function.
7418 * linux-cris-low.c (tdesc_crisv32): Declare.
7419 (cris_arch_setup): New function.
7420 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7421 (cris_regs_info): New function.
7422 (the_low_target): Adjust.
7423 (initialize_low_arch): New function.
7424 * linux-m32r-low.c (tdesc_m32r): Declare.
7425 (m32r_arch_setup): New function.
7426 (m32r_usrregs_info, regs_info): New globals.
7427 (m32r_regs_info): Adjust.
7428 (initialize_low_arch): New function.
7429 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7430 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7431 (tic6x_usrregs_info): Forward declare.
7432 (tic6x_read_description): New function, based on ...
7433 (tic6x_arch_setup): ... this. Reimplement.
7434 (target_regsets): Rename to ...
7435 (tic6x_regsets): ... this, and make static.
7436 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7437 (tic6x_regs_info): New function.
7438 (the_low_target): Adjust.
7439 (initialize_low_arch): New function.
7440 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7441 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7442 (target_regsets): Rename to ...
7443 (xtensa_regsets): ... this, and make static.
7444 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7446 (xtensa_arch_setup, xtensa_regs_info): New functions.
7447 (the_low_target): Adjust.
7448 (initialize_low_arch): New function.
7449 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7450 (nios2_arch_setup): Set the current process'es tdesc.
7451 (target_regsets): Rename to ...
7452 (nios2_regsets): ... this.
7453 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7454 (nios2_regs_info): New function.
7455 (the_low_target): Adjust.
7456 (initialize_low_arch): New function.
7457 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7458 (aarch64_arch_setup): Set the current process'es tdesc.
7459 (target_regsets): Rename to ...
7460 (aarch64_regsets): ... this.
7461 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7462 (aarch64_regs_info): New function.
7463 (the_low_target): Adjust.
7464 (initialize_low_arch): New function.
7465 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7467 (target_regsets): Rename to ...
7468 (tile_regsets): ... this.
7469 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7470 (tile_regs_info): New function.
7471 (tile_arch_setup): Set the current process'es tdesc.
7472 (the_low_target): Adjust.
7473 (initialize_low_arch): New function.
7474 * spu-low.c (tdesc_spu): Declare.
7475 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7476 * win32-arm-low.c (tdesc_arm): Declare.
7477 (arm_arch_setup): New function.
7478 (the_low_target): Install arm_arch_setup instead of
7480 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7481 (init_windows_x86): Rename to ...
7482 (i386_arch_setup): ... this. Set `win32_tdesc'.
7483 (the_low_target): Adjust.
7484 * win32-low.c (win32_tdesc): New global.
7485 (child_add_thread): Don't create the thread cache here.
7486 (do_initial_child_stuff): Set the new process'es tdesc.
7487 * win32-low.h (struct target_desc): Forward declare.
7488 (win32_tdesc): Declare.
7489 * lynx-i386-low.c (tdesc_i386): Declare global.
7490 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7491 * lynx-low.c (lynx_tdesc): New global.
7492 (lynx_add_process): Set the new process'es tdesc.
7493 * lynx-low.h (struct target_desc): Forward declare.
7494 (lynx_tdesc): Declare global.
7495 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7496 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7497 * nto-low.c (nto_tdesc): New global.
7498 (do_attach): Set the new process'es tdesc.
7499 * nto-low.h (struct target_desc): Forward declare.
7500 (nto_tdesc): Declare.
7501 * nto-x86-low.c (tdesc_i386): Declare.
7502 (nto_x86_arch_setup): Set `nto_tdesc'.
7504 2013-06-04 Gary Benson <gbenson@redhat.com>
7506 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7507 to qSupported response when appropriate.
7508 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7509 with nonzero-length annex.
7510 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7511 arguments supplied in annex.
7513 2013-05-31 Doug Evans <dje@google.com>
7516 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7517 64 bits in 64-cross-32 environment.
7519 2013-05-28 Pedro Alves <palves@redhat.com>
7521 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7522 (aarch64-without-fpu.c): Delete rule.
7523 * configure.srv (aarch64*-*-linux*): Remove references to
7524 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7525 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7528 2013-05-24 Pedro Alves <palves@redhat.com>
7530 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7531 instead of strchr/decode_address. Error if the range isn't split
7532 with a ','. Don't assume there's be a ':' in the action.
7534 2013-05-23 Yao Qi <yao@codesourcery.com>
7535 Pedro Alves <palves@redhat.com>
7537 * linux-low.c (lwp_in_step_range): New function.
7538 (linux_wait_1): If the thread was range stepping and stopped
7539 outside the stepping range, report the stop to GDB. Otherwise,
7540 continue stepping. Add range stepping debug output.
7541 (linux_set_resume_request): Copy the step range from the resume
7543 (linux_supports_range_stepping): New.
7544 (linux_target_ops) <supports_range_stepping>: Set to
7545 linux_supports_range_stepping.
7546 * linux-low.h (struct linux_target_ops)
7547 <supports_range_stepping>: New field.
7548 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7549 * linux-x86-low.c (x86_supports_range_stepping): New.
7550 (the_low_target) <supports_range_stepping>: Set to
7551 x86_supports_range_stepping.
7552 * server.c (handle_v_cont): Handle 'r' action.
7553 (handle_v_requests): Append ";r" if the target supports range
7555 * target.h (struct thread_resume) <step_range_start,
7556 step_range_end>: New fields.
7557 (struct target_ops) <supports_range_stepping>:
7559 (target_supports_range_stepping): New macro.
7561 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7563 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7564 confusion in comment.
7566 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7568 * lynx-low.c (struct process_info_private): New type.
7569 (lynx_add_process): New function.
7570 (lynx_create_inferior, lynx_attach): Replace calls to
7571 add_process by calls to lynx_add_process.
7572 (lynx_resume): If PTID is null, then try using
7573 current_process()->private->last_wait_event_ptid.
7575 (lynx_clear_inferiors): Delete. The contents of that function
7576 has been inlined in lynx_mourn;
7577 (lynx_wait_1): Save the ptid in the process's private data.
7578 (lynx_mourn): Free the process' private data. Replace call
7579 to lynx_clear_inferiors by call to clear_inferiors.
7581 2013-05-17 Yao Qi <yao@codesourcery.com>
7583 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7586 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7588 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7589 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7590 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7591 PT_TEXT_END_ADDR guards. Update comments.
7592 (linux_target_op) <read_offsets>: Conditionally define to
7593 linux_read_offsets if the target is UCLIBC and if it defines
7594 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7596 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7597 Andrew Jenner <andrew@codesourcery.com>
7599 * Makefile.in (SFILES): Add linux-nios2-low.c.
7600 (clean): Add action to delete nios2-linux.c.
7601 (nios2-linux.c): New rule.
7602 * configure.srv: Add nios2*-*-linux*.
7603 * linux-nios2-low.c: New.
7605 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7607 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7609 2013-04-25 Hui Zhu <hui@codesourcery.com>
7612 * ax.c (ax_printf): Add fflush.
7614 2013-04-22 Tom Tromey <tromey@redhat.com>
7616 * Makefile.in (SFILES): Add filestuff.c.
7617 (OBS): Add filestuff.o.
7618 (filestuff.o): New target.
7619 * config.in, configure: Rebuild.
7620 * configure.ac: Check for fdwalk, pipe2.
7622 2013-04-17 Pedro Alves <palves@redhat.com>
7624 * configure.ac (USE_THREAD_DB): Delete variable.
7625 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7626 Don't AC_SUBST USE_THREAD_DB.
7627 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7628 * config.in, configure: Regenerate.
7630 2013-04-16 Pedro Alves <palves@redhat.com>
7632 * linux-low.h (struct lwp_info) <thread_known>: Move under
7633 the USE_THREAD_DB #ifdef.
7635 2013-04-16 Pedro Alves <palves@redhat.com>
7637 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7638 (linux-low.o): Delete rule.
7639 * linux-low.h: Always include "gdb_thread_db.h" instead of
7640 conditionally including thread_db.h.
7641 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7644 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7646 * Makefile.in (install-only): Fix make install regression.
7648 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7650 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7651 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7653 * gdbserver.1: Remove.
7655 2013-03-22 Pedro Alves <palves@redhat.com>
7657 * linux-low.c (handle_extended_wait): Don't call
7658 linux_enable_event_reporting.
7660 2013-03-15 Tony Theodore <tonyt@logyst.com>
7663 * Makefile.in (SHELL): Use @SHELL@.
7665 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7667 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7670 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7672 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7673 Remove extraneous NULL element.
7675 2013-03-13 Yao Qi <yao@codesourcery.com>
7677 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7678 'V' block in trace frame.
7680 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7682 * target.h (struct target_ops): Add btrace ops.
7683 (target_supports_btrace): New macro.
7684 (target_enable_btrace): New macro.
7685 (target_disable_btrace): New macro.
7686 (target_read_btrace): New macro.
7687 * gdbthread.h (struct thread_info): Add btrace field.
7688 * server.c: Include btrace-common.h.
7689 (handle_btrace_general_set): New function.
7690 (handle_btrace_enable): New function.
7691 (handle_btrace_disable): New function.
7692 (handle_general_set): Call handle_btrace_general_set.
7693 (handle_qxfer_btrace): New function.
7694 (struct qxfer qxfer_packets[]): Add btrace entry.
7695 * inferiors.c (remove_thread): Disable btrace.
7696 * linux-low: Include linux-btrace.h.
7697 (linux_low_enable_btrace): New function.
7698 (linux_low_read_btrace): New function.
7699 (linux_target_ops): Add btrace ops.
7700 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7701 Add srv_linux_btrace=yes.
7702 (x86_64-*-linux*): Add linux-btrace.o.
7703 Add srv_linux_btrace=yes.
7704 * configure.ac: Define HAVE_LINUX_BTRACE.
7705 * config.in: Regenerated.
7706 * configure: Regenerated.
7708 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7710 * server.c (handle_qxfer): Preserve error message if -3 is
7712 (qxfer): Document the -3 return value.
7714 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7716 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7717 (linux_btrace_h): New variable.
7718 (linux-btrace.o): New rule.
7720 2013-03-08 Stan Shebs <stan@codesourcery.com>
7721 Hafiz Abid Qadeer <abidh@codesourcery.com>
7723 * tracepoint.c (trace_buffer_size): New global.
7724 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7725 (init_trace_buffer): Change to one-argument function. Allocate
7726 trace buffer memory.
7727 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7728 handle QTBuffer:size packet.
7729 (cmd_bigqtbuffer_size): New function.
7730 (initialize_tracepoint): Call init_trace_buffer with
7731 DEFAULT_TRACE_BUFFER_SIZE.
7732 * server.c (handle_query): Add QTBuffer:size in the
7735 2013-03-07 Yao Qi <yao@codesourcery.com>
7737 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7738 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7740 (cmd_qtsp): Adjust condition. Do post increment.
7741 Set cur_action and cur_step_action back to 0.
7743 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7746 * linux-low.c (linux_write_memory): Return early success if LEN is
7749 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7751 * configure.srv: Add x86_64-*-cygwin* as target.
7753 2013-02-28 Tom Tromey <tromey@redhat.com>
7755 * configure.ac: Invoke AC_SYS_LARGEFILE.
7756 * configure, config.in: Rebuild.
7758 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7760 * win32-low.c: Throughout, fix format strings and casts of
7761 printf-like functions to avoid type related warnings on all
7763 (get_child_debug_event): Print dwDebugEventCode as hex since
7764 that's how it's usually documented.
7766 2013-02-28 Yao Qi <yao@codesourcery.com>
7768 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7771 2013-02-27 Jiong Wang <jiwang@tilera.com>
7773 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7774 (reg-tilegx32.c): New rule.
7775 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7776 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7777 different register info initializer according to elf class.
7778 (init_registers_tilgx32): New function. The tilegx32 register info
7780 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7781 (tile_store_gregset): Likewise.
7783 2013-02-27 Yao Qi <yao@codesourcery.com>
7785 * server.c (process_point_options): Print debug message when
7786 debug_threads is true.
7788 2013-02-26 Yao Qi <yao@codesourcery.com>
7790 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7792 2013-02-19 Pedro Alves <palves@redhat.com>
7793 Kai Tietz <ktietz@redhat.com>
7797 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7798 instead of strtoul to extract address from packet.
7799 (process_serial_event) <'z'>: Likewise.
7801 2013-02-18 Yao Qi <yao@codesourcery.com>
7803 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7805 2013-02-14 Pedro Alves <palves@redhat.com>
7809 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7810 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7812 2013-02-14 Pedro Alves <palves@redhat.com>
7814 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7816 2013-02-14 Pedro Alves <palves@redhat.com>
7818 * tracepoint.c (save_string): Delete.
7819 (add_tracepoint_action): Use savestring instead of save_string.
7821 2013-02-12 Pedro Alves <palves@redhat.com>
7823 * linux-xtensa-low.c: Ditto.
7824 * xtensa-xtregs.c: Ditto.
7826 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7828 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7831 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7833 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7834 aarch64_num_wp_regs and aarch64_num_bp_regs to
7835 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7837 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7839 * linux-aarch64-low.c (ps_get_thread_area): Replace
7840 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7842 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7843 Marcus Shawcroft <marcus.shawcroft@arm.com>
7844 Nigel Stephens <nigel.stephens@arm.com>
7845 Yufeng Zhang <yufeng.zhang@arm.com>
7847 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7848 (aarch64.c, aarch64-without-fpu.c): New targets.
7849 * configure.srv (aarch64*-*-linux*): New.
7850 * linux-aarch64-low.c: New file.
7852 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7854 * linux-low.c (handle_extended_wait, linux_create_inferior)
7855 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7856 (dequeue_one_deferred_signal, linux_resume_one_thread)
7857 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7858 (linux_tracefork_grandchild, linux_test_for_tracefork)
7859 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7860 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7861 where the argument is 0.
7863 2013-01-25 Yao Qi <yao@codesourcery.com>
7865 * event-loop.c: Include "queue.h".
7866 (gdb_event_p): New typedef.
7867 (struct gdb_event) <next_event>: Remove.
7868 (event_queue): Change to QUEUE(gdb_event_p).
7869 (async_queue_event): Remove.
7870 (gdb_event_xfree): New.
7871 (initialize_event_loop): New.
7872 (process_event): Use API from QUEUE.
7873 (wait_for_event): Likewise.
7874 * server.c (main): Call initialize_event_loop.
7875 * server.h (initialize_event_loop): Declare.
7877 2013-01-18 Yao Qi <yao@codesourcery.com>
7879 * ax.h (struct eval_agent_expr_context): New.
7880 (gdb_eval_agent_expr): Update declaration.
7881 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7882 TFRAME. Add new argument CTX.
7883 * server.h (struct eval_agent_expr_context): Declare.
7884 (agent_mem_read, agent_tsv_read): Update declaration.
7885 (agent_mem_read_string): Likewise.
7886 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7887 (add_traceframe_block): Add new argument TPOINT.
7888 Increase TPOINT->traceframe_usage.
7889 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7890 eval_tracepoint_agent_expr.
7891 (condition_true_at_tracepoint): Likewise.
7892 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7893 (agent_mem_read_string, agent_tsv_read): Likewise.
7895 2013-01-16 Yao Qi <yao@codesourcery.com>
7897 * linux-low.c (linux_resume_one_lwp): Don't check
7898 'lwp->bp_reinsert != 0'.
7900 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7901 Pedro Alves <palves@redhat.com>
7903 * lynx-low.c (ptrace_request_to_str): Define a temporary
7904 macro and use it to simplify this function's implementation.
7906 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7908 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7911 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7913 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7915 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7917 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7919 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7921 * lynx-low.c (lynx_resume): Use the resume_info parameter
7922 to determine the ptid for the lynx_ptrace call, unless
7923 it is equal to minus_one_ptid, in which case we use the
7924 ptid of the current_inferior.
7925 (lynx_wait_1): After having received a thread create/exit
7926 event, resume the inferior's execution using the signaling
7927 thread's ptid, rather than the old ptid.
7929 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7931 * lynx-low.c (lynx_resume): Delete variable ret.
7933 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7935 * gdbreplay.c (gdbreplay_version): Update copyright year.
7936 * server.c (gdbserver_version): Likewise.
7938 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7940 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7943 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7945 * lynx-low.c (ptrace_request_to_str): Add handling for
7948 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7950 * lynx-low.c (lynx_attach): Delete variable new_process.
7952 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7954 * lynx-low.c (lynx_create_inferior): Delete variable
7957 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7959 * lynx-low.c (ptrace_request_to_str): Do not handle
7960 PTRACE_GETTHREADLIST if this macro does not exist.
7962 2012-12-15 Yao Qi <yao@codesourcery.com>
7964 * Makefile.in (OBS): Add notif.o.
7965 * notif.c, notif.h: New.
7966 * server.c: Include "notif.h".
7967 (struct vstop_notif) <next>: Remove.
7969 (queue_stop_reply): Update.
7970 (push_event, send_next_stop_reply): Remove.
7971 (discard_queued_stop_replies): Update.
7972 (notif_stop): New variable.
7973 (handle_v_stopped): Remove.
7974 (handle_v_requests): Don't call handle_v_stopped. Call
7975 handle_ack_notif instead.
7976 (queue_stop_reply_callback): Call notif_event_enque instead
7977 of queue_stop_reply.
7978 (handle_status): Don't call send_next_stop_reply, call
7979 notif_write_event instead.
7980 (kill_inferior_callback): Likewise.
7981 (detach_or_kill_inferior_callback): Likewise.
7982 (main): Call initialize_notif.
7983 (process_serial_event): Call QUEUE_is_empty.
7984 (handle_target_event): Call notif_push instead of push event.
7985 * server.h (push_event): Remove declaration.
7987 2012-12-10 Tom Tromey <tromey@redhat.com>
7989 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7990 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7993 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7994 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7995 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7996 (amd64-linux-ipa.o, ax.o): Rewrite.
7997 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7998 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7999 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8000 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8001 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8002 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8003 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8004 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8005 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8006 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8007 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8008 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8009 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8010 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8011 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8012 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8013 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8014 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8015 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8016 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8017 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8018 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8019 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8020 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8021 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8022 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8023 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8024 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8025 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8026 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8027 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8028 (reg-tilegx.o): Remove.
8029 (all_object_files): New macro.
8030 Include .deps files.
8031 * aclocal.m4, configure: Rebuild.
8032 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8033 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8034 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8036 2012-12-05 Tom Tromey <tromey@redhat.com>
8039 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8041 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8043 * configure.ac: Check for linux/perf_event.h.
8044 * config.in: Regenerated.
8045 * configure: Regenerated.
8047 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8049 * hostio.c (handle_readlink): Decrease buffer size
8050 parameter passed to readlink by one byte.
8052 2012-11-26 Yao Qi <yao@codesourcery.com>
8054 * configure.ac (build_warnings): Append '-Wempty-body'.
8055 * configure: Regenerated.
8056 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8059 2012-11-15 Pierre Muller <muller@sourceware.org>
8061 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8062 * config.in: Regenerate.
8063 * configure: Regenerate.
8064 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8065 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8066 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8067 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8069 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8070 instead of <sys/wait.h> header.
8071 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8073 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8075 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8076 (various make rules): Remove -DGDBSERVER
8078 2012-11-09 Yao Qi <yao@codesourcery.com>
8080 * spu-low.c (current_ptid): Move it to ..
8081 * gdbthread.h: ... here. New.
8082 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8083 * server.c (myresume, process_serial_event): Likewise.
8084 * thread-db.c (thread_db_find_new_threads): Likewise.
8085 * tracepoint.c (run_inferior_command): Likewise.
8087 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8089 * server.c (handle_search_memory_1): Include access length in
8092 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8094 * linux-crisv32-low.c: Fix compile errors.
8096 2012-09-04 Yao Qi <yao@codesourcery.com>
8098 * tracepoint.c (cmd_qtsv): Adjust debug message.
8099 Don't check CUR_TPOINT.
8101 2012-08-28 Yao Qi <yao@codesourcery.com>
8103 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8104 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8105 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8106 Remove declarations of xmalloc, xreallloc, xstrdup and
8108 * Makefile.in (libiberty_h): New.
8109 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8110 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8112 2012-08-23 Yao Qi <yao@codesourcery.com>
8114 * server.h: Remove declaration of 'xsnprintf'.
8116 2012-08-22 Keith Seitz <keiths@redhat.com>
8118 * server.h: Include build-gnulib-gbserver/config.h.
8119 * gdbreplay.c: Likewise.
8121 2012-08-08 Doug Evans <dje@google.com>
8123 * Makefile.in (SFILES): Add gdb_vecs.c.
8124 (OBS): Add gdb_vecs.o.
8125 (gdb_vecs_h, host_defs_h): New variables.
8126 (thread-db.o): Add $(gdb_vecs_h) dependency.
8127 (gdb_vecs.o): New rule.
8128 * thread-db.c: #include "gdb_vecs.h".
8129 (thread_db_load_search): Use a vector to iterate over path elements.
8130 Handle text appearing after "$pdir".
8132 * configure.ac: Add check for strstr.
8133 * config.in: Regenerate.
8134 * configure: Regenerate.
8136 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8138 * hostio.c (handle_pread): If pread fails, fall back to attempting
8140 (handle_pwrite): Likewise for pwrite.
8142 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8144 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8145 between unsupported TYPE and unimplementable ADDR/LEN combination.
8146 (arm_insert_point): Act on new return value.
8148 2012-07-31 Pedro Alves <palves@redhat.com>
8150 * server.c (process_point_options): Only skip tokens if we find
8151 one that is unrecognized. Don't treat 'X' specially while
8152 skipping unrecognized tokens.
8154 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8156 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8157 to 4-byte-align HW breakpoint addresses for Thumb.
8159 2012-07-27 Yao Qi <yao@codesourcery.com>
8163 * server.h: Declare gdb_agent_about_to_close.
8164 * target.c (kill_inferior): Include "agent.h".
8165 New. Send command 'kill'.
8166 * target.h (kill_inferior): Removed macro.
8167 * tracepoint.c (gdb_agent_about_to_close): New.
8168 (gdb_agent_helper_thread): Handle command 'close'.
8169 Wait endlessly until the inferior stops.
8170 Install gdb_agent_remove_socket to atexit hook.
8171 (agent_socket_name): New static variable.
8172 (gdb_agent_socket_init): Replace local variable 'name' with
8173 'agent_socket_name'.
8174 (gdb_agent_remove_socket): New.
8176 2012-07-27 Yao Qi <yao@codesourcery.com>
8178 * server.c (process_point_options): Stop at 'X' when parsing.
8180 2012-07-19 Michael Eager <eager@eagercon.com>
8182 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8184 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8185 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8186 hardware breakpoint.
8188 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8190 * gdbserver/linux-low.c (initialize_low): Call
8191 linux_ptrace_init_warnings.
8193 2012-07-02 Doug Evans <dje@google.com>
8195 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8198 2012-07-02 Stan Shebs <stan@codesourcery.com>
8200 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8201 (ax.o): Add it to build rule.
8203 (OBS): Add format.o.
8204 (IPA_OBS): Add format.o.
8205 * server.c (handle_query): Claim support for breakpoint commands.
8206 (process_point_options): Add command case.
8207 (process_serial_event): Leave running if there are printfs in
8209 * mem-break.h (any_persistent_commands): Declare.
8210 (add_breakpoint_commands): Declare.
8211 (gdb_no_commands_at_breakpoint): Declare.
8212 (run_breakpoint_commands): Declare.
8213 * mem-break.c (struct point_command_list): New struct.
8214 (struct breakpoint): New field command_list.
8215 (any_persistent_commands): New function.
8216 (add_commands_to_breakpoint): New function.
8217 (add_breakpoint_commands): New function.
8218 (gdb_no_commands_at_breakpoint): New function.
8219 (run_breakpoint_commands): New function.
8220 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8222 * ax.c: Include format.h.
8223 (ax_printf): New function.
8224 (gdb_eval_agent_expr): Add printf opcode.
8226 2012-06-13 Yao Qi <yao@codesourcery.com>
8228 * server.c (start_inferior): Remove duplicated writes to fields
8229 'last_resume_kind' and 'last_status' of 'current_inferior'.
8231 2012-06-12 Yao Qi <yao@codesourcery.com>
8232 Pedro Alves <palves@redhat.com>
8234 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8236 * server.c (handle_v_cont): Extend comment.
8238 2012-06-11 Yao Qi <yao@codesourcery.com>
8240 * linux-low.c (linux_attach): Add 'static'.
8242 2012-06-06 Yao Qi <yao@codesourcery.com>
8244 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8246 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8248 Fix gcc -flto compilation warning.
8249 * server.c (main): Make variable multi_mode and attach volatile.
8251 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8253 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8254 if the platform doesn't know about it.
8256 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8258 * Makefile.in (SFILES): Add linux-tile-low.c.
8259 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8260 * configure.srv: Handle tilegx-*-linux*.
8261 * linux-tile-low.c: New file.
8263 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8265 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8267 2012-05-24 Pedro Alves <palves@redhat.com>
8271 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8273 2012-05-24 Pedro Alves <palves@redhat.com>
8277 Replace target_signal with gdb_signal throughout.
8279 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8281 * linux-low.c (linux_store_registers): Avoid the copying sequence
8282 when no data has been retrieved by ptrace.
8284 2012-05-22 Will Deacon <will.deacon@arm.com>
8286 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8287 Include asm/ptrace.h.
8288 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8291 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8293 * linux-low.c (linux_store_registers): Don't re-retrieve data
8294 with ptrace that has already been obtained from /proc. Always
8295 copy any data retrieved with ptrace to the buffer supplied.
8297 2012-05-11 Yao Qi <yao@codesourcery.com>
8298 Pedro Alves <palves@redhat.com>
8300 * linux-low.c (enum stopping_threads_kind): New.
8301 (stopping_threads): Change type to `enum stopping_threads_kind'.
8302 (handle_extended_wait): If stopping and suspending threads, leave
8303 the new_lwp suspended too.
8304 (linux_wait_for_event): Adjust.
8305 (stop_all_lwps): Set `stopping_threads' to
8306 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8307 whether we're suspending threads or just stopping them. Assert no
8310 2012-04-29 Yao Qi <yao@codesourcery.com>
8312 * server.h: Move some code to ...
8313 * gdbthread.h: ... here. New.
8314 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8315 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8316 (nto-low.o, win32-low.o): Likewise.
8317 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8318 * regcache.c, remote-utils.c, server.c: Likewise.
8319 * target.c, tracepoint.c, win32-low.c: Likewise.
8321 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8323 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8324 (PTRACE_ARG4_TYPE): Likewise.
8325 (PTRACE_XFER_TYPE): Likewise.
8326 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8327 ptrace to PTRACE_ARG3_TYPE.
8328 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8329 (PTRACE_ARG4_TYPE): Likewise.
8330 (PTRACE_XFER_TYPE): Likewise.
8331 (linux_detach_one_lwp): Cast fourth argument of
8332 ptrace to long then PTRACE_ARG4_TYPE.
8333 (regsets_fetch_inferior_registers): Cast third argument of
8334 ptrace to long then PTRACE_ARG3_TYPE.
8335 (regsets_store_inferior_registers): Likewise.
8337 2012-04-20 Pedro Alves <palves@redhat.com>
8339 * configure: Regenerate.
8341 2012-04-19 Pedro Alves <palves@redhat.com>
8343 * Makefile.in (GNULIB_BUILDDIR): New.
8344 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8345 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8346 (all, install-only, uninstall, clean-info, all-lib, clean): No
8347 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8348 (maintainer-clean realclean distclean): Use subdir_do.
8350 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8351 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8352 * acinclude.m4: Include acx_configure_dir.m4.
8353 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8354 calls. Call AC_PROG_RANLIB. Configure gnulib using
8357 (GNULIB_STDINT_H): Adjust.
8358 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8359 * gdbreplay.c: Include build-gnulib/config.h.
8360 * server.h: Likewise.
8361 * aclocal.m4: Regenerate.
8362 * config.in: Regenerate.
8363 * configure: Regenerate.
8365 2012-04-19 Pedro Alves <palves@redhat.com>
8367 * Makefile.in (LIBGNU, INCGNU): Adjust.
8368 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8369 (all, install-only, uninstall, clean-info, all-lib, clean)
8370 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8371 * configure.ac: Adjust AC_OUTPUT output.
8372 * aclocal.m4: Regenerate.
8373 * configure: Regenerate.
8375 2012-04-19 Pedro Alves <palves@redhat.com>
8377 * Makefile.in (generated_files): New.
8378 (server_h): Remove the explicit dependency on config.h, and depend
8379 on $generated_files.
8381 2012-04-19 Pedro Alves <palves@redhat.com>
8383 * Makefile.in (INCGNU): Add -Ignulib.
8385 2012-04-19 Pedro Alves <palves@redhat.com>
8387 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8388 (INCGNU): ... this, and spell out -I here.
8389 (GNULIB_LIB): Rename to ...
8391 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8393 2012-04-19 Pedro Alves <palves@redhat.com>
8395 * config.in: Regenerate.
8397 2012-04-19 Pedro Alves <palves@redhat.com>
8399 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8400 * server.h (memmem): Remove declaration.
8401 * config.in: Regenerate.
8402 * configure: Regenerate.
8404 2012-04-19 Yao Qi <yao@codesourcery.com>
8406 * Makefile.in (SFILES): Add common/vec.c.
8410 2012-04-19 Yao Qi <yao@codesourcery.com>
8412 * remote-utils.c (prepare_resume_reply): Replace with macro
8413 target_core_of_thread.
8414 * server.c (handle_qxfer_threads_proper): Likewise.
8415 * target.h (traget_core_of_thread): New macro.
8417 2012-04-18 Pedro Alves <palves@redhat.com>
8419 * aclocal.m4: Regenerate.
8420 * configure: Regenerate.
8422 2012-04-16 Yao Qi <yao@codesourcery.com>
8424 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8425 duplicated on address.
8427 2012-04-16 Yao Qi <yao@codesourcery.com>
8429 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8430 (struct tracepoint_action_ops) <send>: New field.
8431 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8432 (agent_expr_send, x_tracepoint_action_send): New.
8433 (l_tracepoint_action_send): New.
8434 (cmd_qtdp): Download and install tracepoint
8435 according to `use_agent'.
8436 (run_inferior_command): Add one more parameter `len'.
8438 (tracepoint_send_agent): New.
8439 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8441 2012-04-16 Yao Qi <yao@codesourcery.com>
8443 * tracepoint.c (download_tracepoints): Moved to ...
8444 (cmd_qtstart): ... here.
8446 2012-04-14 Yao Qi <yao@codesourcery.com>
8448 * tracepoint.c: Include inttypes.h.
8449 (struct collect_memory_action): Use sized types.
8450 (struct tracepoint): Likewise.
8451 (cmd_qtdp, stop_tracing): Update print specifiers.
8452 (cmd_qtp, response_tracepoint): Likewise.
8453 (collect_data_at_tracepoint): Likewise.
8454 (collect_data_at_step): Likewise.
8456 2012-04-14 Yao Qi <yao@codesourcery.com>
8458 Import gnulib module inttypes.
8459 * aclocal.m4, config.in, configure: Regenerated.
8461 2012-04-14 Yao Qi <yao@codesourcery.com>
8463 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8464 Makefile and config.status at last.
8466 2012-04-13 Yao Qi <yao@codesourcery.com>
8468 * tracepoint.c: Include stdint.h unconditionally.
8470 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8472 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8473 on BFD_HAVE_SYS_PROCFS_TYPE.
8474 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8475 * configure: Regenerate.
8476 * config.in: Likewise.
8478 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8480 * Makefile.in (clean): Also remove x32.c x32-linux.c
8481 x32-avx.c x32-avx-linux.c.
8482 (x32.o): New target.
8484 (x32-linux.o): Likewise.
8485 (x32-linux.c): Likewise.
8486 (x32-avx.o): Likewise.
8487 (x32-avx.c): Likewise.
8488 (x32-avx-linux.o): Likewise.
8489 (x32-avx-linux.c): Likewise.
8491 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8492 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8493 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8494 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8495 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8496 i386/x32-avx-linux.xml.
8498 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8499 (init_registers_x32_avx_linux): Likwise.
8500 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8501 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8503 2012-04-13 Pedro Alves <palves@redhat.com>
8505 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8506 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8507 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8508 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8511 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8513 * linux-x86-low.c (compat_x32_clock_t): New.
8514 (compat_x32_siginfo_t): Likewise.
8515 (compat_x32_siginfo_from_siginfo): Likewise.
8516 (siginfo_from_compat_x32_siginfo): Likewise.
8517 (linux_is_elf64): Likewise.
8518 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8519 and siginfo_from_compat_x32_siginfo for x32.
8520 (x86_arch_setup): Set linux_is_elf64.
8522 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8525 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8527 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8528 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8529 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8530 compatible with process.
8532 2012-04-12 Yao Qi <yao@codesourcery.com>
8534 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8535 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8536 (install-only, install-info, clean): Handle sub dir gnulib.
8537 (all-lib, am--refresh): New targets.
8538 (memmem.o): Remove target.
8539 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8540 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8541 (AC_REPLACE_FUNCS): Remove memmem.
8542 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8543 (AC_OUTPUT): Generate Makefile in gnulib/.
8544 * aclocal.m4, config.in, configure: Regenerated.
8546 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8548 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8550 2012-04-05 Pedro Alves <palves@redhat.com>
8552 -Werror=strict-aliasing
8554 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8557 2012-04-04 Pedro Alves <palves@redhat.com>
8559 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8560 (sparc_store_gregset_from_stack, sparc_store_gregset)
8561 (sparc_breakpoint_at): Fix formatting.
8563 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8565 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8567 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8568 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8569 * config.in: Regenerate.
8570 * configure: Likewise.
8572 2012-03-29 Pedro Alves <palves@redhat.com>
8574 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8575 Correct ptrace arguments.
8577 2012-03-28 Pedro Alves <palves@redhat.com>
8579 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8580 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8581 (IA64_FR1_REGNUM): New defines.
8582 (ia64_fetch_register): New.
8583 (the_low_target): Install it.
8584 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8586 * linux-low.c (linux_fetch_registers): Try the
8587 the_low_target.fetch_register hook first.
8589 * linux-arm-low.c (the_low_target): Adjust.
8590 * linux-bfin-low.c (the_low_target): Adjust.
8591 * linux-cris-low.c (the_low_target): Adjust.
8592 * linux-crisv32-low.c (the_low_target): Adjust.
8593 * linux-m32r-low.c (the_low_target): Adjust.
8594 * linux-m68k-low.c (the_low_target): Adjust.
8595 * linux-mips-low.c (the_low_target): Adjust.
8596 * linux-ppc-low.c (the_low_target): Adjust.
8597 * linux-s390-low.c (the_low_target): Adjust.
8598 * linux-sh-low.c (the_low_target): Adjust.
8599 * linux-sparc-low.c (the_low_target): Adjust.
8600 * linux-tic6x-low.c (the_low_target): Adjust.
8601 * linux-x86-low.c (the_low_target): Adjust.
8602 * linux-xtensa-low.c (the_low_target): Adjust.
8604 2012-03-26 Pedro Alves <palves@redhat.com>
8606 * server.c (handle_qxfer_libraries): Don't bail early if
8607 the_target->qxfer_libraries_svr4 is not NULL.
8609 2012-03-26 Pedro Alves <palves@redhat.com>
8611 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8613 2012-03-23 Pedro Alves <palves@redhat.com>
8615 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8616 "library-list-svr4" element's start tag when the the DSO list is
8619 2012-03-23 Pedro Alves <palves@redhat.com>
8621 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8622 a variable whose type size is the same as the inferior's pointer
8625 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8627 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8629 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8630 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8631 * linux-low.h: Include <signal.h>.
8632 (struct siginfo): Remove forward declaration.
8633 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8636 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8638 * .gitignore: Ignore more files.
8640 2012-03-19 Pedro Alves <palves@redhat.com>
8641 Jan Kratochvil <jan.kratochvil@redhat.com>
8643 * server.c (cont_thread, general_thread): Add describing comments.
8644 (start_inferior): Clear `cont_thread'.
8645 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8648 2012-03-15 Yao Qi <yao@codesourcery.com>
8650 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8652 (cmd_qtdp): ... here.
8654 2012-03-15 Yao Qi <yao@codesourcery.com>
8656 * tracepoint.c (struct tracepoint_action_ops): New.
8657 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8658 (m_tracepoint_action_download): New.
8659 (r_tracepoint_action_download): New.
8660 (x_tracepoint_action_download): New.
8661 (l_tracepoint_action_download): New.
8662 (add_tracepoint_action): Install `action->ops' according type.
8663 (download_tracepoint_1): Move code `download' function pointer
8664 of various tracepoint_action_ops.
8666 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8668 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8669 linux_ptrace_attach_warnings.
8671 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8673 * Makefile.in (linux-ptrace.o): New.
8674 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8675 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8676 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8677 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8678 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8680 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8682 2012-03-08 Yao Qi <yao@codesourcery.com>
8683 Pedro Alves <palves@redhat.com>
8685 Fix PR server/13392.
8686 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8688 * tracepoint.c (remove_tracepoint): New.
8689 (cmd_qtdp): Call remove_tracepoint when failed to install.
8691 2012-03-07 Pedro Alves <palves@redhat.com>
8693 * linux-low.c (get_detach_signal): New.
8694 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8695 Pass on pending signals to PTRACE_DETACH. Check the result of the
8697 * server.c (program_signals, program_signals_p): New.
8698 (handle_general_set): Handle QProgramSignals.
8699 * server.h (program_signals, program_signals_p): Declare.
8701 2012-03-05 Pedro Alves <palves@redhat.com>
8702 Jan Kratochvil <jan.kratochvil@redhat.com>
8704 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8707 2012-03-03 Yao Qi <yao@codesourcery.com>
8709 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8710 agent_look_up_symbols.
8712 2012-03-03 Yao Qi <yao@codesourcery.com>
8714 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8715 (linux-x86-low.o): Likewise.
8716 * server.h: Remove in_process_agent_loaded.
8717 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8721 2012-03-03 Yao Qi <yao@codesourcery.com>
8723 * tracepoint.c (gdb_agent_capability): New global.
8724 (in_process_agent_loaded_ust): Renamed to
8725 `in_process_agent_supports_ust'.
8727 (in_process_agent_supports_ust): Call agent_capability_check.
8728 (clear_installed_tracepoints): Assert that agent supports
8731 2012-03-03 Yao Qi <yao@codesourcery.com>
8733 * linux-low.c (linux_supports_agent): New.
8734 (linux_target_ops): Initialize field `supports_agent' with
8735 linux_supports_agent.
8736 * target.h (struct target_ops) <supports_agent>: New.
8737 (target_supports_agent): New macro.
8738 * server.c (handle_general_set): Handle packet 'QAgent'.
8739 (handle_query): Send `QAgent+'.
8740 * Makefile.in (server.o): Depends on agent.h.
8742 2012-03-03 Yao Qi <yao@codesourcery.com>
8744 * Makefile.in (OBS): Add agent.o.
8745 Add new rule for agent.o.
8746 Track dependence of tracepoint.c on agent.h.
8747 * tracepoint.c (run_inferior_command_1):
8748 (run_inferior_command): Call agent_run_command.
8749 (gdb_ust_connect_sync_socket): Deleted. Move it to
8751 (resume_thread, stop_thread): Likewise.
8752 (gdb_ust_socket_init): Renamed to ...
8753 (gdb_agent_socket_init): ... New.
8754 (gdb_ust_thread): Renamed to ...
8755 (gdb_agent_helper_thread): ... New.
8756 (gdb_ust_init): Move some code to ...
8757 (gdb_agent_init): ... here. New.
8758 [HAVE_UST]: Call gdb_ust_init.
8759 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8760 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8761 * config.in, configure: Regenerated.
8763 2012-03-02 Pedro Alves <palves@redhat.com>
8765 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8766 * linux-low.c (struct simple_pid_list): New.
8767 (stopped_pids): New a struct simple_pid_list pointer.
8768 (add_to_pid_list, pull_pid_from_list): New.
8769 (handle_extended_wait): Don't assume the first signal new children
8770 report is SIGSTOP. Adjust call to pull_pid_from_list.
8771 (linux_wait_for_lwp): Adjust.
8773 2012-03-02 Yao Qi <yao@codesourcery.com>
8775 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8778 2012-03-02 Yao Qi <yao@codesourcery.com>
8780 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8781 `stop_pc' and `tpoint'. Update caller.
8783 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8785 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8786 * linux-low.c (use_linux_regsets): New macro.
8787 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8788 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8789 (linux_register_in_regsets): New function.
8790 (usr_fetch_inferior_registers): Skip registers covered by
8792 (usr_store_inferior_registers): Likewise.
8793 (usr_fetch_inferior_registers): New macro.
8794 (usr_store_inferior_registers): Likewise.
8795 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8796 (linux_store_registers): Likewise.
8797 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8799 (init_registers_mips64_dsp_linux): Likewise.
8800 (init_registers_mips_linux): New macro.
8801 (init_registers_mips_dsp_linux): Likewise.
8802 (mips_dsp_num_regs): Likewise.
8803 (DSP_BASE, DSP_CONTROL): New fallback macros.
8804 (mips_base_regs): New macro.
8805 (mips_regmap): Use it. Fix the size.
8806 (mips_dsp_regmap): New variable.
8807 (mips_dsp_regset_bitmap): Likewise.
8808 (mips_arch_setup): New function.
8809 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8811 (mips_cannot_store_register): Likewise.
8812 (the_low_target): Update .arch_setup, .num_regs and .regmap
8813 initializers. Add .regset_bitmap initializer.
8814 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8816 * linux-bfin-low.c (the_low_target): Likewise.
8817 * linux-cris-low.c (the_low_target): Likewise.
8818 * linux-crisv32-low.c (the_low_target): Likewise.
8819 * linux-ia64-low.c (the_low_target): Likewise.
8820 * linux-m32r-low.c (the_low_target): Likewise.
8821 * linux-m68k-low.c (the_low_target): Likewise.
8822 * linux-ppc-low.c (the_low_target): Likewise.
8823 * linux-s390-low.c (the_low_target): Likewise.
8824 * linux-sh-low.c (the_low_target): Likewise.
8825 * linux-sparc-low.c (the_low_target): Likewise.
8826 * linux-tic6x-low.c (the_low_target): Likewise.
8827 * linux-x86-low.c (the_low_target): Likewise.
8828 * linux-xtensa-low.c (the_low_target): Likewise.
8829 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8830 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8831 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8833 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8834 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8836 2012-02-29 Yao Qi <yao@codesourcery.com>
8837 Pedro Alves <palves@redhat.com>
8839 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8840 `step_over_finished' is true.
8842 2012-02-27 Pedro Alves <palves@redhat.com>
8844 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8845 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8847 2012-02-27 Pedro Alves <palves@redhat.com>
8850 * linux-low.c (pid_is_stopped): New.
8851 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8853 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8855 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8858 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8860 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8862 2012-02-24 Luis Machado <lgustavo@codesourcery>
8864 * server.c (handle_query): Advertise support for target-side
8865 breakpoint condition evaluation.
8866 (process_point_options): New function.
8867 (process_serial_event): When inserting a breakpoint, check for
8868 a target-side condition that should be evaluated.
8870 * mem-break.c: Include regcache.h and ax.h.
8871 (point_cond_list_t): New data structure.
8872 (breakpoint) <cond_list>: New field.
8873 (find_gdb_breakpoint_at): Make non-static.
8874 (delete_gdb_breakpoint_at): Clear any target-side
8876 (clear_gdb_breakpoint_conditions): New function.
8877 (add_condition_to_breakpoint): Likewise.
8878 (add_breakpoint_condition): Likewise.
8879 (gdb_condition_true_at_breakpoint): Likewise.
8880 (gdb_breakpoint_here): Return result directly instead
8881 of going through a local variable.
8883 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8884 (clear_gdb_breakpoint_conditions): Likewise.
8885 (add_breakpoint_condition): Likewise.
8886 (gdb_condition_true_at_breakpoint): Likewise.
8888 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8889 (need_step_over_p): Take target-side breakpoint condition into
8892 2012-02-24 Luis Machado <lgustavo@codesourcery>
8894 * server.h: Include tracepoint.h.
8895 (agent_mem_read, agent_get_trace_state_variable_value,
8896 agent_set_trace_state_variable_value,
8897 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8898 get_set_tsv_func_addr): New prototypes.
8900 * ax.h: New include file.
8901 * ax.c: New source file.
8903 * tracepoint.c: Include ax.h.
8904 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8905 agent_expr, eval_result_type): Move to ax.h.
8906 (parse_agent_expr): Rename to ...
8907 (gdb_parse_agent_expr): ... this, make it non-static and move
8909 (unparse_agent_expr) Rename to ...
8910 (gdb_unparse_agent_expr): ... this, make it non-static and move
8912 (eval_agent_expr): Rename to ...
8913 (eval_tracepoint_agent_expr): ... this.
8914 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8915 forward declarations.
8916 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8917 (agent_get_trace_state_variable_value): New function.
8918 (agent_set_trace_state_variable_value): New function.
8919 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8920 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8921 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8922 (condition_true_at_tracepoint): Likewise.
8923 (parse_agent_expr): Rename to ...
8924 (gdb_parse_agent_expr): ... this and move to ax.c.
8925 (unparse_agent_expr): Rename to ...
8926 (gdb_unparse_agent_expr): ... this and move to ax.c.
8927 (gdb_agent_op_name): Move to ax.c.
8928 (eval_agent_expr): Rename to ...
8929 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8931 (eval_tracepoint_agent_expr): New function.
8932 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8934 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8936 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8937 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8938 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8939 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8940 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8941 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8942 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8943 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8944 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8945 (compile_bytecodes): Remove forward declaration.
8946 (is_goto_target): Move to ax.c.
8947 (compile_bytecodes): Move to ax.c and call
8948 agent_get_trace_state_variable_value (...) and
8949 agent_set_trace_state_variable_value (...).
8951 * Makefile.in: Update ax.c and IPA dependencies.
8953 2012-02-24 Pedro Alves <palves@redhat.com>
8955 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8956 (cmd_bigqtbuffer_circular): ... this. Only handle
8957 'QTBuffer:circular:'.
8958 (handle_tracepoint_general_set): Adjust.
8960 2012-02-16 Yao Qi <yao@codesourcery.com>
8962 * inferiors.c: Move code to ...
8963 * dll.c: .... here. New.
8964 * server.h: Declare clear_dlls.
8965 * Makefile.in (SFILES): Add dll.c.
8969 2012-02-11 Yao Qi <yao@codesourcery.com>
8971 * server.c: (handle_monitor_command): Add a new parameter
8973 (handle_query): Update caller.
8975 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8977 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8978 * configure, config.in: Regenerate.
8979 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8982 2012-02-02 Pedro Alves <palves@redhat.com>
8984 Try SIGKILL first, then PTRACE_KILL.
8985 * linux-low.c (linux_kill_one_lwp): New.
8986 (linux_kill_one_lwp): Rename to ...
8987 (kill_one_lwp_callback): ... this. Use the new
8990 2012-02-02 Pedro Alves <palves@redhat.com>
8992 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8995 2012-01-27 Pedro Alves <palves@redhat.com>
8997 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8998 (elf_64_file_p): Make static.
8999 (linux_pid_exe_is_elf_64_file): New.
9000 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9001 Delete declarations.
9002 (linux_pid_exe_is_elf_64_file): Declare.
9003 * linux-x86-low.c (x86_arch_setup): Use
9004 linux_pid_exe_is_elf_64_file.
9006 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9008 * linux-low.c (linux_wait_for_event_1): Rename to ...
9009 (linux_wait_for_event): ... here and merge it with former
9010 linux_wait_for_event - new variable wait_ptid, use it.
9011 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9013 2012-01-23 Pedro Alves <palves@redhat.com>
9015 * server.c (main): Avoid yet another case of infinite loop while
9016 detaching/killing after a longjmp.
9018 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9021 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9023 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9025 * hostio.c (handle_readlink): New function.
9026 (handle_vFile): Call it to handle "vFile:readlink" packets.
9028 2012-01-20 Pedro Alves <palves@redhat.com>
9029 Ulrich Weigand <ulrich.weigand@linaro.org>
9031 * server.c (handle_v_requests): Only support vAttach and vRun to
9032 start multiple processes when in extended protocol mode.
9034 2012-01-17 Pedro Alves <palves@redhat.com>
9036 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9037 memalign plus mprotect to allocate the scratch buffer.
9039 2012-01-13 Pedro Alves <palves@redhat.com>
9041 * server.c (attach_inferior): Clear `cont_thread'.
9043 2012-01-13 Pedro Alves <palves@redhat.com>
9045 * server.c (main): Avoid infinite loop while detaching/killing
9048 2012-01-09 Doug Evans <dje@google.com>
9050 * server.c (start_inferior): Set last_ptid in --wrapper case.
9052 2012-01-06 Yao Qi <yao@codesourcery.com>
9054 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9056 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9058 2012-01-04 Yao Qi <yao@codesourcery.com>
9060 * tracepoint.c (cmd_qtdp): Print debug message
9061 for static tracepoint.
9063 2012-01-04 Yao Qi <yao@codesourcery.com>
9065 * tracepoint.c (trace_vdebug): Differentiate debug message
9066 between gdbserver and IPA.
9068 2012-01-03 Yao Qi <yao@codesourcery.com>
9070 * tracepoint.c (tracepoint_was_hit): Don't collect for
9073 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9075 * terminal.h: Reformat copyright header.
9077 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9079 * server.c (gdbserver_version): Update copyright year.
9080 * gdbreplay.c (gdbreplay_version): Likewise.
9082 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9084 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9087 2011-12-18 Hui Zhu <teawater@gmail.com>
9088 * linux-low.c (linux_create_inferior): Save return value to ret.
9090 2011-12-18 Hui Zhu <teawater@gmail.com>
9092 * linux-low.c (linux_create_inferior): Save return value to ret.
9094 2011-12-16 Doug Evans <dje@google.com>
9096 * linux-low.c (linux_create_inferior): If stdio connection,
9097 redirect stdin from /dev/null, stdout to stderr.
9098 * remote-utils.c (remote_is_stdio): New static global.
9099 (remote_connection_is_stdio): New function.
9100 (remote_prepare): Handle stdio connection.
9101 (remote_open): Ditto.
9102 (remote_close): Don't close stdin for stdio connections.
9103 (read_prim,write_prim): New functions. Replace all calls to
9104 read/write to these.
9105 * server.c (main): Watch for "-" argument. Move call to
9106 remote_prepare before start_inferior.
9107 * server.h (STDIO_CONNECTION_NAME): New macro.
9108 (remote_connection_is_stdio): Declare.
9110 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9111 in debugging output.
9113 2011-12-15 Yao Qi <yao@codesourcery.com>
9115 * tracepoint.c: Include sys/syscall.h.
9116 (gdb_ust_thread): Remove preprocessor conditional.
9118 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9120 * linux-low.c (linux_detach_one_lwp): Call
9121 the_low_target.prepare_to_resume before detaching.
9123 2011-12-14 Yao Qi <yao@codesourcery.com>
9125 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9128 2011-12-14 Yao Qi <yao@codesourcery.com>
9130 * i386-low.c (i386_low_stopped_data_address): Initialize local
9133 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9137 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9138 DR_CONTROL unless necessary. Extend comments.
9139 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9140 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9142 2011-12-13 Yao Qi <yao@codesourcery.com>
9144 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9146 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9148 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9150 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9151 Print new debug message for such case.
9153 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9155 Fix overlapping memcpy.
9156 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9157 the read_inferior_memory transfer.
9158 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9159 write_inferior_memory transfer.
9160 (set_fast_tracepoint_jump): New variable buf. Use it for the
9161 read_inferior_memory and write_inferior_memory transfers.
9162 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9163 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9164 Use it for the write_inferior_memory transfer.
9165 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9168 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9170 * linux-low.c (fetch_register, store_register): Make code
9171 consistent, fix formatting.
9173 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9175 * linux-low.c (usr_store_inferior_registers): Factor out code
9176 to handle individual registers into...
9177 (store_register): ... this new function.
9179 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9181 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9182 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9183 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9184 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9185 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9186 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9187 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9188 (srv_xmlfiles): Add new XML files.
9190 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9192 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9193 (init_registers_s390_linux32v1): Add prototype.
9194 (init_registers_s390_linux32v2): Likewise.
9195 (init_registers_s390_linux64v1): Likewise.
9196 (init_registers_s390_linux64v2): Likewise.
9197 (init_registers_s390x_linux64v1): Likewise.
9198 (init_registers_s390x_linux64v2): Likewise.
9199 (s390_num_regs): Increment to 52.
9200 (s390_regmap): Add orig_r2 register.
9201 (s390_num_regs_3264): Increment to 68.
9202 (s390_regmap_3264): Add orig_r2 register.
9203 (s390_collect_ptrace_register): Handle orig_r2 register.
9204 (s390_supply_ptrace_register): Likewise.
9205 (s390_fill_last_break): New function.
9206 (s390_store_last_break): Likewise.
9207 (s390_fill_system_call): New function.
9208 (s390_store_system_call): Likewise.
9209 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9211 (s390_check_regset): New function.
9212 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9213 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9214 Update target_regsets for available register sets.
9216 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9217 Jan Kratochvil <jan.kratochvil@redhat.com>
9219 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9220 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9222 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9223 * linux-low.h (struct process_info_private): New member r_debug.
9224 * server.c (handle_qxfer_libraries): Call
9225 the_target->qxfer_libraries_svr4.
9226 (handle_qxfer_libraries_svr4): New function.
9227 (qxfer_packets): New entry "libraries-svr4".
9228 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9229 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9230 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9231 PACKET_qXfer_libraries_svr4.
9233 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9235 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9236 PSW address/mask between 8-byte and 16-byte formats.
9237 (s390_supply_ptrace_register): Likewise.
9238 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9239 basic addressing mode bit.
9241 2011-11-24 Stan Shebs <stan@codesourcery.com>
9243 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9245 2011-11-17 Stan Shebs <stan@codesourcery.com>
9247 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9248 (tracing_start_time): New global.
9249 (tracing_stop_time): New global.
9250 (tracing_user_name): New global.
9251 (tracing_notes): New global.
9252 (tracing_stop_note): New global.
9253 (cmd_qtstart): Set traceframe_usage, start_time.
9254 (stop_tracing): Set stop_time.
9255 (cmd_qtstatus): Report additional status.
9256 (cmd_qtp): New function.
9257 (handle_tracepoint_query): Call it.
9258 (cmd_qtnotes): New function.
9259 (handle_tracepoint_general_set): Call it.
9260 (get_timestamp): Rename from tsv_get_timestamp.
9262 2011-11-14 Stan Shebs <stan@codesourcery.com>
9263 Kwok Cheung Yeung <kcy@codesourcery.com>
9265 * linux-x86-low.c (small_jump_insn): New.
9266 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9267 trampoline and error message, build a trampoline and issue a small
9268 jump instruction to it.
9269 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9270 trampoline and error message.
9271 (x86_get_min_fast_tracepoint_insn_len): New.
9272 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9273 * linux-low.h (struct linux_target_ops): Add arguments to
9274 install_fast_tracepoint_jump_pad operation, add new operation.
9275 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9277 (linux_get_min_fast_tracepoint_insn_len): New function.
9278 (linux_target_op): Add new operation.
9279 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9280 (gdb_trampoline_buffer_end): Ditto.
9281 (gdb_trampoline_buffer_error): Ditto.
9282 (struct ipa_sym_addresses): Add fields for new IPA variables.
9283 (symbol_list): Add entries for new IPA variables.
9284 (struct tracepoint): Add fields to hold the address range of the
9285 trampoline used by the tracepoint.
9286 (trampoline_buffer_head): New static variable.
9287 (trampoline_buffer_tail): Ditto.
9288 (claim_trampoline_space): New function.
9289 (have_fast_tracepoint_trampoline_buffer): New function.
9290 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9292 (install_fast_tracepoint): Ditto, also add error buffer argument.
9293 (cmd_qtminftpilen): New function.
9294 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9295 (fast_tracepoint_from_trampoline_address): New function.
9296 (fast_tracepoint_collecting): Handle trampoline as part of jump
9298 (set_trampoline_buffer_space): New function.
9299 (initialize_tracepoint): Initialize new IPA variables.
9300 * target.h (struct target_ops): Add arguments to
9301 install_fast_tracepoint_jump_pad operation, add new
9302 get_min_fast_tracepoint_insn_len operation.
9303 (target_get_min_fast_tracepoint_insn_len): New.
9304 (install_fast_tracepoint_jump_pad): Add arguments.
9305 * server.h (IPA_BUFSIZ): Define.
9306 * linux-i386-ipa.c: Include extra header files.
9307 (initialize_fast_tracepoint_trampoline_buffer): New function.
9308 (initialize_low_tracepoint): Call it.
9309 * server.h (set_trampoline_buffer_space): Declare.
9310 (claim_trampoline_space): Ditto.
9311 (have_fast_tracepoint_trampoline_buffer): Ditto.
9313 2011-11-14 Yao Qi <yao@codesourcery.com>
9315 * server.c (handle_query): Handle InstallInTrace for qSupported.
9316 * tracepoint.c (add_tracepoint): Sort list.
9317 (install_tracepoint, download_tracepoint): New.
9318 (cmd_qtdp): Call them to install and download tracepoints.
9319 (sort_tracepoints): Removed.
9320 (cmd_qtstart): Update.
9322 2011-11-14 Yao Qi <yao@codesourcery.com>
9324 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9325 * mem-break.h: Declare.
9326 * tracepoint.c (cmd_qtstart): Move some code to ...
9327 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9329 (download_tracepoints): Move some code to ...
9330 (download_tracepoint_1): ... here. New.
9332 2011-11-08 Yao Qi <yao@codesourcery.com>
9334 * remote-utils.c (relocate_instruction): A comment fix.
9336 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9338 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9339 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9340 dr_status_mirror and dr_control_mirror from debug_reg_state.
9341 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9342 (i386_initial_stuff): Remove use of deleted globals.
9343 (i386_get_thread_context, i386_set_thread_context,
9344 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9345 from debug_reg_state.
9347 2011-11-05 Yao Qi <yao@codesourcery.com>
9349 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9350 address as TPOINT's.
9352 2011-11-02 Stan Shebs <stan@codesourcery.com>
9354 * tracepoint.c (agent_mem_read_string): New function.
9355 (eval_agent_expr): Call it for tracenz.
9356 * server.c (handle_query): Report support for tracenz.
9358 2011-11-02 Yao Qi <yao@codesourcery.com>
9360 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9362 2011-11-02 Yao Qi <yao@codesourcery.com>
9364 * target.h: Fix a typo in comment.
9366 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9368 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9369 clobber the breakpoints' shadows with fast tracepoint jumps.
9370 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9371 * target.c (write_inferior_memory): Also pass MYADDR down to
9374 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9376 * configure.ac: Check support for personality routine.
9377 * configure: Regenerate.
9378 * config.in: Likewise.
9379 * linux-low.c: Include <sys/personality.h>.
9380 Define ADDR_NO_RANDOMIZE if necessary.
9381 (linux_create_inferior): Disable address space randomization when
9382 forking inferior, if requested.
9383 (linux_supports_disable_randomization): New function.
9384 (linux_target_ops): Install it.
9385 * server.h (disable_randomization): Declare.
9386 * server.c (disable_randomization): New global variable.
9387 (handle_general_set): Handle QDisableRandomization.
9388 (handle_query): Likewise for qSupported.
9389 (main): Support --disable-randomization and --no-disable-randomization
9390 command line arguments.
9391 * target.h (struct target_ops): Add supports_disable_randomization.
9392 (target_supports_disable_randomization): New macro.
9394 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9396 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9398 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9399 [!PT_GETDSBT] (target_loadmap): New definition.
9400 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9401 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9402 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9403 and PT_GETDSBT to LINUX_LOADMAP.
9404 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9405 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9407 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9409 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9410 (arm_linux_hwbp_cap): New static variable.
9411 (arm_linux_get_hwbp_cap): Replace by ...
9412 (arm_linux_init_hwbp_cap): ... this new function.
9413 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9414 (arm_linux_get_hw_watchpoint_count): Likewise.
9415 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9416 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9417 (arm_prepare_to_resume): Use perror_with_name instead of error.
9419 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9421 * linux-arm-low.c: Include <signal.h>.
9422 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9423 (struct arm_linux_hwbp_cap): New data type.
9424 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9425 (struct arm_linux_hw_breakpoint): New data type.
9426 (MAX_BPTS, MAX_WPTS): Define.
9427 (struct arch_process_info, struct arch_lwp_info): New data types.
9428 (arm_linux_get_hwbp_cap): New function.
9429 (arm_linux_get_hw_breakpoint_count): Likewise.
9430 (arm_linux_get_hw_watchpoint_count): Likewise.
9431 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9432 (arm_hwbp_control_initialize): Likewise.
9433 (arm_hwbp_control_is_enabled): Likewise.
9434 (arm_hwbp_control_is_initialized): Likewise.
9435 (arm_hwbp_control_disable): Likewise.
9436 (arm_linux_hw_breakpoint_equal): Likewise.
9437 (arm_linux_hw_point_initialize): Likewise.
9438 (struct update_registers_data): New data structure.
9439 (update_registers_callback: New function.
9440 (arm_insert_point): Likewise.
9441 (arm_remove_point): Likewise.
9442 (arm_stopped_by_watchpoint): Likewise.
9443 (arm_stopped_data_address): Likewise.
9444 (arm_new_process): Likewise.
9445 (arm_new_thread): Likewise.
9446 (arm_prepare_to_resume): Likewise.
9447 (the_low_target): Register arm_insert_point, arm_remove_point,
9448 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9449 arm_new_thread, and arm_prepare_to_resume.
9451 2011-09-15 Stan Shebs <stan@codesourcery.com>
9453 * server.h (struct emit_ops): Add compare-goto fields.
9454 * tracepoint.c (gdb_agent_op_sizes): New table.
9455 (emit_eq_goto): New function.
9456 (emit_ne_goto): New function.
9457 (emit_lt_goto): New function.
9458 (emit_le_goto): New function.
9459 (emit_gt_goto): New function.
9460 (emit_ge_goto): New function.
9461 (is_goto_target): New function.
9462 (compile_bytecodes): Recognize special cases of compare-goto
9463 combinations and call specialized emitters for them.
9464 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9465 (amd64_emit_ne_goto): New function.
9466 (amd64_emit_lt_goto): New function.
9467 (amd64_emit_le_goto): New function.
9468 (amd64_emit_gt_goto): New function.
9469 (amd64_emit_ge_goto): New function.
9470 (amd64_emit_ops): Add the new functions.
9471 (i386_emit_eq_goto): New function.
9472 (i386_emit_ne_goto): New function.
9473 (i386_emit_lt_goto): New function.
9474 (i386_emit_le_goto): New function.
9475 (i386_emit_gt_goto): New function.
9476 (i386_emit_ge_goto): New function.
9477 (i386_emit_ops): Add the new functions.
9479 2011-09-08 Stan Shebs <stan@codesourcery.com>
9481 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9482 (i386_emit_epilogue): Restore %ebx.
9484 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9486 * server.c (step_thread): Remove definition.
9487 (process_serial_event): Don't handle Hs.
9488 * server.h (step_thread): Remove declaration.
9489 * target.c (set_desired_inferior): Remove use of step_thread.
9491 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9493 * linux-low.c: Include linux-procfs.h.
9494 (linux_attach_lwp_1): Update comments.
9495 (linux_attach): Scan for existing threads when attaching to a
9496 process that is the tgid.
9497 * Makefile.in: Update dependencies.
9499 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9501 * configure.srv: Add linux-procfs.o dependencies.
9503 2011-08-14 Yao Qi <yao@codesourcery.com>
9505 * target.h (struct target_ops): Fix indent.
9506 * win32-low.c (win32_target_ops): Fix comment.
9508 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9509 Yao Qi <yao@codesourcery.com>
9511 * Makefile.in (clean): Remove tic6x-*.c files.
9512 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9513 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9514 (tic6x-c64xp-linux.c): Likewise.
9515 * configure.srv: Add support for tic6x-*-uclinux.
9516 * linux-tic6x-low.c: New.
9517 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9519 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9520 Yao Qi <yao@codesourcery.com>
9522 * target.h (struct target_ops): Add read_loadmap.
9523 * linux-low.c (struct target_loadseg): New type.
9524 (struct target_loadmap): New type.
9525 (linux_read_loadmap): New function.
9526 (linux_target_ops): Add linux_read_loadmap.
9527 * server.c (handle_query): Support qXfer:fdpic:read packet.
9528 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9531 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9533 * win32-low.c: Include <stdint.h>.
9535 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9537 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9538 to the inferior here.
9539 (i386_remove_aligned_watchpoint): Ditto.
9540 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9541 fit part of the watchpoint in the debug registers.
9542 (i386_update_inferior_debug_regs): New.
9543 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9544 registers, and only update the inferior on success.
9545 (i386_low_remove_watchpoint): Ditto.
9547 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9549 * linux-low.c (compare_ints, unique, list_threads, show_process,
9550 linux_core_of_thread): Delete.
9551 (linux_target_ops): Change linux_core_of_thread to
9552 linux_common_core_of_thread.
9553 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9554 * utils.c (malloc_failure): Change type of argument.
9555 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9556 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9557 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9558 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9559 (IPA_OBJS): Add common-utils-ipa.o.
9560 (ptid_h, linux_osdata_h): New macros.
9561 (server_h): Add common/common-utils.h, common/xml-utils.h,
9562 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9564 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9565 ptid.o, buffer.o): New rules.
9566 (linux-low.o): Add common/linux-osdata.h as a dependency.
9567 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9568 * configure.ac: Add AC_HEADER_DIRENT check.
9569 * config.in: Regenerate.
9570 * configure: Regenerate.
9571 * remote-utils.c (xml_escape_text): Delete.
9572 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9573 buffer_xml_printf): Move to common/buffer.c.
9574 * server.c (main): Remove call to initialize_inferiors.
9575 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9576 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9577 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9578 internal_error, gdb_assert, gdb_assert_fail): Delete.
9579 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9580 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9582 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9583 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9584 initialize_inferiors): Delete.
9586 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9588 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9591 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9593 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9595 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9597 2011-05-26 Yao Qi <yao@codesourcery.com>
9599 * Makefile.in (thread-db.o): Track dependence to
9600 common/gdb_thread_db.h.
9601 * thread-db.c: include gdb_thread_db.h from right place.
9603 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9605 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9606 __FILE__ and __LINE__ to internal_error.
9608 2011-05-13 Doug Evans <dje@google.com>
9610 * thread-db.c (try_thread_db_load_from_sdir): New function.
9611 (try_thread_db_load_from_dir): New function.
9612 (thread_db_load_search): Handle $sdir, ignore $pdir.
9613 Remove trying of system directories if search of
9614 libthread-db-search-path fails, that is now done via $sdir.
9616 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9618 * server.c (handle_query): Add EnableDisableTracepoints to the list
9619 of supported features.
9620 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9622 (cmd_qtenable_disable): New.
9623 (cmd_qtstart): Install tracepoints even if disabled.
9624 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9625 receiving a QTEnable or QTDisable packet.
9626 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9627 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9629 (gdb_probe): Skip data collection if static tracepoint is disabled.
9631 2011-05-10 Doug Evans <dje@google.com>
9633 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9635 2011-05-04 Doug Evans <dje@google.com>
9637 * linux-low.c (linux_join): Skip process lookup.
9638 * spu-low.c (spu_join): Ditto.
9639 * server.c (join_inferiors_callback): Delete.
9640 (process_serial_event): For 'D' packet (detach) call join_inferior
9643 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9645 * README: Don't mention xscale*-*-linux*.
9646 * configure.srv (xscale*-*-linux*): Don't handle target.
9648 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9650 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9652 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9653 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9654 (i386_emit_void_call_2): Likewise.
9656 2011-04-26 Yao Qi <yao@codesourcery.com>
9658 * linux-low.c: Move common macros to linux-ptrace.h.
9659 Include linux-ptrace.h.
9660 * Makefile.in (linux_ptrace_h): New.
9661 (linux-low.o): Depends on linux-ptrace.h.
9663 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9665 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9666 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9667 (remote_prepare): New function with most of the TCP code from ...
9668 (remote_open): ... here. Detect PORT here unconditionally. Move also
9669 setting transport_is_reliable.
9670 * server.c (run_once): New variable.
9671 (gdbserver_usage): Document it.
9672 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9673 the first run if RUN_ONCE.
9674 * server.h (run_once, remote_prepare): New declarations.
9676 2011-04-19 Tom Tromey <tromey@redhat.com>
9678 * win32-low.c (handle_load_dll): Remove duplicate "the".
9680 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9682 Remove support for old Cygwin 1.5 versions.
9683 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9684 function to avoid warning.
9685 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9688 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9690 * gdbserver/server.h (Macro _): Define it if not available.
9692 2011-03-14 Michael Snyder <msnyder@vmware.com>
9694 * hostio.c (handle_close): Remove unnecessary null test.
9696 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9698 * Makefile.in (maintainer-clean realclean distclean): Remove
9699 "make ... subdir_do" command.
9701 2011-03-10 Michael Snyder <msnyder@vmware.com>
9703 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9705 * server.c (handle_v_run): Free alloced buffer on early return.
9707 2011-03-09 Yao Qi <yao@codesourcery.com>
9710 2011-03-04 Yao Qi <yao@codesourcery.com>
9712 * Makefile.in: Remove GNU make feature --directory.
9714 2011-03-05 Yao Qi <yao@codesourcery.com>
9716 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9717 (subdir_do): New make target. Copied from gdb/Makefile.
9718 (maintainer-clean, realclean, distclean, clean): Call corresponding
9719 make targets in common/Makefile.
9721 2011-02-11 Yao Qi <yao@codesourcery.com>
9723 * configure.ac: Call AC_PROG_RANLIB.
9724 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9725 * configure: Regenerate.
9727 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9729 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9731 2011-03-06 Yao Qi <yao@codesourcery.com>
9733 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9735 2011-03-05 Yao Qi <yao@codesourcery.com>
9737 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9738 (subdir_do): New make target. Copied from gdb/Makefile.
9739 (maintainer-clean, realclean, distclean, clean): Call corresponding
9740 make targets in common/Makefile.
9742 2011-03-04 Yao Qi <yao@codesourcery.com>
9744 * Makefile.in: Remove GNU make feature --directory.
9746 2011-03-04 Michael Snyder <msnyder@vmware.com>
9748 * server.c (queue_stop_reply): Call xmalloc not malloc.
9750 2011-03-02 Michael Snyder <msnyder@vmware.com>
9752 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9754 2011-02-28 Michael Snyder <msnyder@vmware.com>
9756 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9757 (cmd_qtframe): Ditto.
9758 (cmd_qtbuffer): Ditto.
9759 (cmd_bigqtbuffer): Ditto.
9761 * utils.c (decimal2str): Initialize 'width' to nine, then
9764 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9766 * hostio.c (require_data): Free *data, not data.
9768 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9770 * hostio.c (require_data): Use free, not xfree.
9772 2011-02-27 Michael Snyder <msnyder@vmware.com>
9774 * server.c (handle_query): Discard unused value.
9776 * hostio.c (require_data): Free malloc memory before returning
9779 2011-02-26 Michael Snyder <msnyder@vmware.com>
9781 * linux-low.c (list_threads): Call closedir for dirent.
9783 2011-02-27 Michael Snyder <msnyder@vmware.com>
9785 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9786 a case statement falls through.
9788 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9790 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9793 2011-02-26 Michael Snyder <msnyder@vmware.com>
9795 * utils.c (decimal2str): Eliminate dead code and dead param.
9796 (pulongest): Drop dead param from call to decimal2str.
9799 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9801 Revert the following patch (not approved yet):
9802 2011-02-21 Hui Zhu <teawater@gmail.com>
9803 * tracepoint.c (tp_printf): New function.
9804 (eval_agent_expr): Handle gdb_agent_op_printf.
9806 2011-02-21 Hui Zhu <teawater@gmail.com>
9808 * tracepoint.c (tp_printf): New function.
9809 (eval_agent_expr): Handle gdb_agent_op_printf.
9811 2011-02-18 Tom Tromey <tromey@redhat.com>
9813 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9814 (tracepoint.o): Likewise.
9815 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9816 (gdb_agent_op_names): Likewise.
9818 2011-02-18 Tom Tromey <tromey@redhat.com>
9820 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9821 gdb_agent_op_rot>: New constants.
9822 (gdb_agent_op_names): Add pick and roll.
9823 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9826 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9828 * aclocal.m4: Regenerated with aclocal-1.11.1.
9830 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9832 * server.c (handle_qxfer_traceframe_info): New.
9833 (qxfer_packets): Register "traceframe-info".
9834 (handle_query): Report support for qXfer:traceframe-info:read+.
9835 * tracepoint.c (match_blocktype): New.
9836 (traceframe_find_block_type): Rename to ...
9837 (traceframe_walk_blocks): ... this. Add callback filter argument,
9839 (traceframe_find_block_type): New, reimplemented on top of
9840 traceframe_walk_blocks.
9841 (build_traceframe_info_xml): New.
9842 (traceframe_read_info): New.
9843 * server.h (traceframe_read_info): Declare.
9845 2011-02-11 Yao Qi <yao@codesourcery.com>
9847 * configure.ac: Call AC_PROG_RANLIB.
9848 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9849 * configure: Regenerate.
9851 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9853 * server.c (gdb_read_memory): Change return semantics to allow
9855 (handle_search_memory_1): Adjust.
9856 (process_serial_event) <'m' packet>: Handle partial transfers.
9857 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9859 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9861 * regcache.c (init_register_cache): Initialize
9862 regcache->register_status.
9863 (free_register_cache): Release regcache->register_status.
9864 (regcache_cpy): Copy register_status.
9865 (registers_to_string): Print 'x's for unavailable registers.
9866 (supply_register): Mark the register's status valid or
9867 unavailable, depending on whether a buffer was passed in or not.
9868 (supply_register_zeroed): New.
9869 (supply_regblock): Mark the registers' status valid or
9870 unavailable, depending on whether a buffer was passed in or not.
9871 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9872 (struct regcache): New `register_status' field.
9873 (supply_register_zeroed): Declare.
9874 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9875 supply_register_zeroed, rather than passing a NULL buffer to
9877 * tracepoint.c (fetch_traceframe_registers): Update comment.
9879 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9881 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9884 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9886 * server.h (decode_xfer_write): Change prototype.
9887 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9888 and don't extract the annex here.
9889 * server.c (decode_xfer_read): Remove `annex' parameter,
9890 and don't extract the annex here.
9892 (struct qxfer): New.
9893 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9894 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9895 (handle_qxfer_statictrace): New functions, abstracted out from
9896 handle_query, and made to use the struct qxfer interface.
9897 (handle_threads_qxfer_proper): Rename to ...
9898 (handle_qxfer_threads_proper): ... this.
9899 (handle_threads_qxfer): Rename to ...
9900 (handle_qxfer_threads): ... this. Adjust.
9901 (qxfer_packets): New array.
9902 (handle_qxfer): New function.
9903 (handle_query): Use handle_qxfer.
9905 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9907 * gdbreplay.c: Shorten lines of >= 80 columns.
9908 * linux-low.c: Ditto.
9909 * linux-ppc-low.c: Ditto.
9910 * linux-s390-low.c: Ditto.
9911 * linux-sparc-low.c: Ditto.
9912 * linux-x86-low.c: Ditto.
9913 * linux-xtensa-low.c: Ditto.
9914 * mem-break.c: Ditto.
9916 * regcache.h: Ditto.
9917 * remote-utils.c: Ditto.
9920 * thread-db.c: Ditto.
9921 * tracepoint.c: Ditto.
9923 * win32-low.h: Ditto.
9925 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9927 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9930 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9932 * server.c (gdbserver_version): Update copyright year in version
9934 * gdbreplay.c (gdbreplay_version): Ditto.
9936 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9938 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9939 * linux-bfin-low.c: New file.
9940 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9941 PT_DATA_ADDR for BFIN targets.
9942 * Makefile.in (SFILES): Add linux-bfin-low.c.
9943 (clean): Remove reg-bfin.c.
9944 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9945 * README: Mention supported Blackfin targets.
9947 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9949 * .gitignore: New file.
9951 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9953 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9955 2010-10-22 Jie Zhang <jie@codesourcery.com>
9957 * Makefile.in: Add FLAGS_TO_PASS variable.
9958 (install): Remove dependency of install-only and recursively
9959 invoke make for install-only.
9961 2010-10-04 Doug Evans <dje@google.com>
9963 * Makefile.in (uninstall): Use $(DESTDIR).
9965 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9969 * linux-x86-low.c (compat_siginfo_from_siginfo)
9970 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9971 si_code is < 0. Check for si_code == SI_TIMER before checking for
9974 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9976 * lynx-i386-low.c: New file.
9977 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9979 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9981 * lynx-low.c (ptrace_request_to_str): Remove handling for
9982 request values that have been removed in LynxOS 5.x.
9984 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9986 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9989 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9991 * configure.ac: Add --enable-inprocess-agent option.
9992 * configure: Rebuilt.
9994 2010-09-06 Yao Qi <yao@codesourcery.com>
9996 * linux-low.c (linux_kill): Remove unused variable.
9997 (linux_stabilize_threads): Likewise.
9998 * server.c (start_inferior): Likewise.
9999 (queue_stop_reply_callback): Likewise.
10000 * tracepoint.c (do_action_at_tracepoint): Likewise.
10002 2010-09-06 Yao Qi <yao@codesourcery.com>
10004 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10007 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10009 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10011 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10013 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10016 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10018 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10019 gdbserver/lynx-ppc-low.c: New files.
10020 * Makefile.in (lynx_low_h): New variable.
10021 (lynx-low.o, lynx-ppc-low.o): New rules.
10022 * configure.ac: On LynxOS, link with -lnetinet.
10023 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10024 * configure: regenerate.
10026 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10028 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10029 * configure.ac: Add check for vasprintf and vsnprintf.
10030 * configure, config.in: Regenerate.
10031 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10033 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10035 * gdbreplay.c: Move include of alloca.h up, next to include of
10037 * server.h: Add include of malloc.h.
10038 * mem-break.c: Remove include of malloc.h.
10039 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10041 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10043 * Makefile.in (memmem.o): Build with -Wno-error.
10045 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10047 * utils.c (xsnprintf): Make non-static.
10048 * server.h: Add xsnprintf declaration.
10049 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10050 replace calls to snprintf by calls to xsnprintf throughout.
10052 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10054 * configure.ac: Add configure check for alloca.
10055 * configure, config.in: Regenerate.
10056 * server.h: Include alloca.h if it exists.
10057 * gdbreplay.c: Include alloca.h if it exists.
10059 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10061 * linux-low.c (__SIGRTMIN): Define if not already defined.
10062 (linux_create_inferior): Check for __ANDROID__ rather than
10064 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10065 are already deferred.
10066 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10067 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10068 stopped and already has a pending signal to report.
10069 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10070 a pending signal to report or is moving out of a jump pad.
10071 (linux_init_signals): Check for __ANDROID__ rather than
10074 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10076 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10077 debug_threads check. Avoid a linear search when not doing debug
10080 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10082 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10083 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10084 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10085 (process_event): Change local fd's type to gdb_fildes_t.
10086 (create_file_handler): Adjust prototype.
10087 (delete_file_handler): Adjust prototype.
10088 (handle_file_event): Adjust prototype. Use pfildes.
10089 (create_file_event): Adjsut prototype.
10090 * remote-utils.c (remote_desc, listen_desc): Change type to
10092 * server.h: New gdb_fildes_t typedef.
10093 [USE_WIN32API]: Include winsock2.h.
10094 (delete_file_handler, add_file_handler): Adjust prototypes.
10095 (pfildes): Declare.
10096 * utils.c (pfildes): New.
10098 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10100 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10101 * configure: Regenerate.
10103 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10105 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10106 (linux_done_accessing_memory): ... this.
10107 (linux_target_ops): Adjust.
10108 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10109 * nto-low.c (nto_target_ops): Adjust comment.
10110 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10111 * spu-low.c (spu_target_ops): Adjust comment.
10112 * target.h (target_ops): Rename unprepare_to_access_memory field
10113 to done_accessing_memory.
10114 (unprepare_to_access_memory): Rename to ...
10115 (done_accessing_memory): ... this.
10117 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10119 * linux-low.c (linux_prepare_to_access_memory): New.
10120 (linux_unprepare_to_access_memory): New.
10121 (linux_target_ops): Install them.
10122 * server.c (read_memory): Rename to ...
10123 (gdb_read_memory): ... this. Use
10124 prepare_to_access_memory/prepare_to_access_memory.
10125 (write_memory): Rename to ...
10126 (gdb_write_memory): ... this. Use
10127 prepare_to_access_memory/prepare_to_access_memory.
10128 (handle_search_memory_1): Adjust.
10129 (process_serial_event): Adjust.
10130 * target.h (struct target_ops): New fields
10131 prepare_to_access_memory and unprepare_to_access_memory.
10132 (prepare_to_access_memory, unprepare_to_access_memory): New.
10133 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10134 prepare_to_access_memory/prepare_to_access_memory.
10135 * nto-low.c (nto_target_ops): Adjust.
10136 * spu-low.c (spu_target_ops): Adjust.
10137 * win32-low.c (win32_target_ops): Adjust.
10139 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10141 * Makefile.in (WARN_CFLAGS): Get it from configure.
10142 (WERROR_CFLAGS): New.
10143 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10144 * configure.ac: Introduce --enable-werror, which adds -Werror to
10145 the compiler command line. Enabled by default. Disable with
10146 --disable-werror. Add -Wdeclaration-after-statement
10147 Wpointer-arith and -Wformat-nonliteral to warning flags.
10148 * configure: Regenerate.
10150 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10152 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10154 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10156 * gdbreplay.c (remote_error): New.
10158 (expect): Use gdbchar. Check for error reading from GDB.
10159 Clarify sync error output.
10160 (play): Check for errors writing to GDB.
10161 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10162 * remote-utils.c (getpkt): Check for errors writing to the remote
10165 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10167 * linux-low.c (linux_wait_1): Move non-debugging code out of
10168 `debug_threads' control.
10170 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10172 * linux-low.c (linux_wait_1): Don't set last_status here.
10173 * server.c (push_event, queue_stop_reply_callback): Assert we're
10174 not pushing a TARGET_WAITKIND_IGNORE event.
10175 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10176 (myresume, handle_target_event): Set the thread's last_resume_kind
10177 and last_status from the target returned status.
10179 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10183 * linux-x86-low.c (update_debug_registers_callback): New.
10184 (i386_dr_low_set_addr): Use it.
10185 (i386_dr_low_get_addr): New.
10186 (i386_dr_low_set_control): Use update_debug_registers_callback.
10187 (i386_dr_low_get_control): New.
10188 (i386_dr_low_get_status): Adjust.
10189 * linux-low.c (linux_stop_lwp): New.
10190 * linux-low.h (linux_stop_lwp): Declare.
10192 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10193 argument instead of a i386_debug_reg_state.
10194 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10195 a i386_debug_reg_state.
10196 (i386_insert_aligned_watchpoint): Adjust.
10197 (i386_remove_aligned_watchpoint): Adjust.
10198 (i386_low_stopped_data_address): Read the debug registers from the
10199 inferior instead of from the mirrors.
10200 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10201 (i386_dr_low_get_addr): Declare.
10202 (i386_dr_low_get_control): Declare.
10203 (i386_dr_low_get_status): Change prototype.
10205 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10206 (i386_dr_low_get_addr): New.
10207 (i386_dr_low_get_control): New.
10208 (i386_dr_low_get_status): Adjust prototype. Return
10210 (i386_initial_stuff): Clear dr_status_mirror and
10212 (i386_get_thread_context): Adjust.
10213 (i386_set_thread_context): Adjust.
10214 (i386_thread_added): Adjust.
10216 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10218 * linux-low.h (linux_thread_area): Delete declaration.
10220 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10222 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10223 after its termination.
10225 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10227 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10228 (gdb_wants_all_stopped): Delete.
10229 (linux_wait_1): Don't call them.
10230 * server.c (handle_v_cont): Tag all threads as want-stopped.
10231 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10232 stopped as "client-wants-stopped".
10234 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10236 * Makefile.in (signals_h): New.
10237 (server_h): Depend on it.
10238 (server.o): Don't depend on $(signals_def).
10239 (signals.o): Depend on $(signals_def).
10241 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10243 * Makefile.in (signals_def): New.
10244 (server_h): Append include/gdb/signals.h and signals_def.
10245 (server.o): Append signals_def.
10247 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10249 * server.c (handle_target_event): Use target_signal_to_host for
10250 resume_info.sig initialization.
10251 * target.h (struct thread_resume) <sig>: New comment.
10253 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10255 * server.c (handle_query): strcpy() the returned string from paddress()
10256 instead of sprintf().
10257 * utils.c (paddress): Return phex_nz().
10259 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10261 * server.c (handle_v_cont): Call mourn_inferior if process
10263 (myresume): Likewise.
10265 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10267 Static tracepoints, and integration with UST.
10269 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10270 * mem-break.c (uninsert_all_breakpoints)
10271 (reinsert_all_breakpoints): New.
10272 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10273 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10274 (gdb_agent_ust_loaded, helper_thread_id)
10275 (gdb_agent_helper_thread_id): New macros.
10276 (struct ipa_sym_addresses): Add addr_ust_loaded,
10277 addr_helper_thread_id, addr_cmd_buf.
10278 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10279 (in_process_agent_loaded_ust): New.
10280 (write_e_ust_not_loaded): New.
10281 (maybe_write_ipa_ust_not_loaded): New.
10282 (struct collect_static_trace_data_action): New.
10283 (enum tracepoint_type) <static_tracepoint>: New.
10284 (struct tracepoint) <handle>: Mention static tracepoints.
10285 (struct static_tracepoint_ctx): New.
10286 (CMD_BUF_SIZE): New.
10287 (add_tracepoint_action): Handle static tracepoint actions.
10288 (unprobe_marker_at): New.
10289 (clear_installed_tracepoints): Handle static tracepoints.
10290 (cmd_qtdp): Handle static tracepoints.
10291 (probe_marker_at): New.
10292 (cmd_qtstart): Handle static tracepoints.
10293 (response_tracepoint): Handle static tracepoints.
10294 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10295 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10296 (get_context_regcache): Handle static tracepoints.
10297 (do_action_at_tracepoint): Handle static tracepoint actions.
10298 (traceframe_find_block_type): Handle static trace data blocks.
10299 (traceframe_read_sdata): New.
10300 (download_tracepoints): Download static tracepoint actions.
10301 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10302 (GDB_PROBE_NAME): New.
10304 (GET_UST_SYM): New.
10307 (ust_marker_to_static_tracepoint): New.
10309 (collect_ust_data_at_tracepoint): New.
10310 (gdb_ust_probe): New.
10311 (UNIX_PATH_MAX, SOCK_DIR): New.
10312 (gdb_ust_connect_sync_socket): New.
10313 (resume_thread, stop_thread): New.
10314 (run_inferior_command): New.
10315 (init_named_socket): New.
10316 (gdb_ust_socket_init): New.
10317 (cstr_to_hexstr): New.
10319 (first_marker, next_marker): New.
10320 (response_ust_marker): New.
10321 (cmd_qtfstm, cmd_qtsstm): New.
10322 (unprobe_marker_at, probe_marker_at): New.
10323 (cmd_qtstmat, gdb_ust_thread): New.
10324 (gdb_ust_init): New.
10325 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10326 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10327 (ST_REGENTRY): New.
10328 (x86_64_st_collect_regmap): New.
10329 (X86_64_NUM_ST_COLLECT_GREGS): New.
10330 (AMD64_RIP_REGNUM): New.
10331 (supply_static_tracepoint_registers): New.
10332 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10333 (ST_REGENTRY): New.
10334 (i386_st_collect_regmap): New.
10335 (i386_NUM_ST_COLLECT_GREGS): New.
10336 (supply_static_tracepoint_registers): New.
10337 * server.c (handle_query): Handle qXfer:statictrace:read.
10338 <qSupported>: Report support for StaticTracepoints, and
10339 qXfer:statictrace:read features.
10340 * server.h (traceframe_read_sdata)
10341 (supply_static_tracepoint_registers): Declare.
10342 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10343 (unpack_varlen_hex): Include in IPA build.
10344 * Makefile.in (ustlibs, ustinc): New.
10345 (IPA_OBJS): Add remote-utils-ipa.o.
10346 ($(IPA_LIB)): Link -ldl and -lpthread.
10348 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10349 * config.in, configure: Regenerate.
10351 2010-06-20 Ian Lance Taylor <iant@google.com>
10352 Pedro Alves <pedro@codesourcery.com>
10354 * linux-x86-low.c (always_true): Delete.
10355 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10356 trying to fool the compiler with always_true.
10358 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10360 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10361 conditions in gdbserver.
10363 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10365 * spu-low.c (spu_read_memory): Wrap around local store limit.
10366 (spu_write_memory): Likewise.
10368 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10370 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10371 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10373 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10375 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10376 uses with LONGEST uses.
10378 2010-06-14 Stan Shebs <stan@codesourcery.com>
10379 Pedro Alves <pedro@codesourcery.com>
10383 * linux-x86-low.c: Include limits.h.
10385 (always_true): New.
10388 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10389 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10390 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10391 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10392 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10393 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10394 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10395 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10396 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10397 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10398 (amd64_emit_void_call_2): New.
10399 (amd64_emit_ops): New.
10400 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10401 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10402 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10403 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10404 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10405 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10406 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10407 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10408 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10409 (i386_emit_stack_adjust, i386_emit_int_call_1)
10410 (i386_emit_void_call_2): New.
10411 (i386_emit_ops): New.
10412 (x86_emit_ops): New.
10413 (the_low_target): Install x86_emit_ops.
10414 * server.h (struct emit_ops): New.
10415 (get_raw_reg_func_addr): Declare.
10416 (current_insn_ptr, emit_error): Declare.
10417 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10418 (set_trace_state_variable_value): New defines.
10419 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10420 addr_get_trace_state_variable_value and
10421 addr_set_trace_state_variable_value.
10422 (symbol_list): New fields for get_raw_reg,
10423 get_trace_state_variable_value and set_trace_state_variable_value.
10424 (condfn): New typedef.
10425 (struct tracepoint): New field `compiled_cond'.
10426 (do_action_at_tracepoint): Clear compiled_cond.
10427 (get_trace_state_variable_value, set_trace_state_variable_value):
10429 (condition_true_at_tracepoint): If there's a compiled condition,
10431 (current_insn_ptr, emit_error): New globals.
10432 (struct bytecode_address): New.
10433 (get_raw_reg_func_addr): New.
10434 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10435 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10436 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10437 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10438 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10439 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10440 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10441 (compile_tracepoint_condition, compile_bytecodes): New.
10442 * target.h (emit_ops): Forward declare.
10443 (struct target_ops): New field emit_ops.
10444 (target_emit_ops): New.
10445 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10446 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10447 * linux-low.c (linux_emit_ops): New.
10448 (linux_target_ops): Install it.
10449 * linux-low.h (struct linux_target_ops): New field emit_ops.
10451 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10453 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10454 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10456 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10457 Stan Shebs <stan@codesourcery.com>
10459 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10460 (all): Depend on $(extra_libraries).
10461 (install-only): Install the IPA.
10462 (IPA_OBJS, IPA_LIB): New.
10463 (clean): Remove the IPA lib.
10464 (IPAGENT_CFLAGS): New.
10465 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10466 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10467 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10468 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10469 * configure.ac: Check for atomic builtins support in the compiler.
10470 (IPA_DEPFILES, extra_libraries): Define.
10471 * configure.srv (ipa_obj): Add description.
10472 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10473 (i[34567]86-*-linux*): Set ipa_obj.
10474 (x86_64-*-linux*): Set ipa_obj.
10475 * linux-low.c (stabilizing_threads): New.
10476 (supports_fast_tracepoints): New.
10477 (linux_detach): Stabilize threads before detaching.
10478 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10479 the lwp is either not stabilizing, or is moving out of a jump pad.
10480 (linux_fast_tracepoint_collecting): New.
10481 (maybe_move_out_of_jump_pad): New.
10482 (enqueue_one_deferred_signal): New.
10483 (dequeue_one_deferred_signal): New.
10484 (linux_wait_for_event_1): If moving out of a jump pad, defer
10485 pending signals to later.
10486 (linux_stabilize_threads): New.
10487 (linux_wait_1): Check if threads need moving out of jump pads, and
10489 (stuck_in_jump_pad_callback): New.
10490 (move_out_of_jump_pad_callback): New.
10491 (lwp_running): New.
10492 (linux_resume_one_lwp): Handle moving out of jump pads.
10493 (linux_set_resume_request): Dequeue deferred signals.
10494 (need_step_over_p): Also step over fast tracepoint jumps.
10495 (start_step_over): Also uninsert fast tracepoint jumps.
10496 (finish_step_over): Also reinsert fast tracepoint jumps.
10497 (linux_install_fast_tracepoint_jump): New.
10498 (linux_target_ops): Install linux_stabilize_threads and
10499 linux_install_fast_tracepoint_jump_pad.
10500 * linux-low.h (linux_target_ops) <get_thread_area,
10501 install_fast_tracepoint_jump_pad>: New fields.
10502 (struct lwp_info) <collecting_fast_tracepoint,
10503 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10504 (linux_get_thread_area): Declare.
10505 * linux-x86-low.c (jump_insn): New.
10506 (x86_get_thread_area): New.
10507 (append_insns): New.
10508 (push_opcode): New.
10509 (amd64_install_fast_tracepoint_jump_pad): New.
10510 (i386_install_fast_tracepoint_jump_pad): New.
10511 (x86_install_fast_tracepoint_jump_pad): New.
10512 (the_low_target): Install x86_get_thread_area and
10513 x86_install_fast_tracepoint_jump_pad.
10514 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10515 (struct fast_tracepoint_jump): New.
10516 (fast_tracepoint_jump_insn): New.
10517 (fast_tracepoint_jump_shadow): New.
10518 (find_fast_tracepoint_jump_at): New.
10519 (fast_tracepoint_jump_here): New.
10520 (delete_fast_tracepoint_jump): New.
10521 (set_fast_tracepoint_jump): New.
10522 (uninsert_fast_tracepoint_jumps_at): New.
10523 (reinsert_fast_tracepoint_jumps_at): New.
10524 (set_breakpoint_at): Use write_inferior_memory.
10525 (uninsert_raw_breakpoint): Use write_inferior_memory.
10526 (check_mem_read): Mask out fast tracepoint jumps.
10527 (check_mem_write): Mask out fast tracepoint jumps.
10528 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10529 (set_fast_tracepoint_jump): Declare.
10530 (delete_fast_tracepoint_jump)
10531 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10532 (reinsert_fast_tracepoint_jumps_at): Declare.
10533 * regcache.c: Don't compile many functions when building the
10534 in-process agent library.
10535 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10536 the register buffer in the heap.
10537 (free_register_cache): If the register buffer isn't owned by the
10538 regcache, don't free it.
10539 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10540 pre-existing register caches.
10541 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10543 (convert_ascii_to_int): : Constify `from' parameter type.
10544 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10545 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10546 the needed buffer in-place.
10547 (relocate_instruction): New.
10548 * server.c (handle_query) <qSymbols>: If the target supports
10549 tracepoints, give it a chance of looking up symbols. Report
10550 support for fast tracepoints.
10551 (handle_status): Stabilize threads.
10552 (process_serial_event): Adjust.
10553 * server.h (struct fast_tracepoint_jump): Forward declare.
10554 (struct process_info) <fast_tracepoint_jumps>: New field.
10555 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10556 (decode_X_packet, decode_M_packet): Adjust.
10557 (relocate_instruction): Declare.
10558 (in_process_agent_loaded): Declare.
10559 (tracepoint_look_up_symbols): Declare.
10560 (struct fast_tpoint_collect_status): Declare.
10561 (fast_tracepoint_collecting): Declare.
10562 (force_unlock_trace_buffer): Declare.
10563 (handle_tracepoint_bkpts): Declare.
10564 (initialize_low_tracepoint)
10565 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10566 * target.h (struct target_ops) <stabilize_threads,
10567 install_fast_tracepoint_jump_pad>: New fields.
10568 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10569 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10570 [HAVE_STDINT_H]: Include stdint.h.
10571 (trace_debug_1): Rename to ...
10572 (trace_vdebug): ... this.
10573 (trace_debug): Rename to ...
10574 (trace_debug_1): ... this. Add `level' parameter.
10575 (trace_debug): New.
10576 (ATTR_USED, ATTR_NOINLINE): New.
10577 (IP_AGENT_EXPORT): New.
10578 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10579 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10580 (about_to_request_buffer_space, trace_buffer_is_full)
10581 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10582 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10583 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10584 (traceframe_write_count, traceframes_created)
10585 (trace_state_variables)
10586 New renaming defines.
10587 (struct ipa_sym_addresses): New.
10588 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10589 (symbol_list): New.
10590 (ipa_sym_addrs): New.
10591 (all_tracepoint_symbols_looked_up): New.
10592 (in_process_agent_loaded): New.
10593 (write_e_ipa_not_loaded): New.
10594 (maybe_write_ipa_not_loaded): New.
10595 (tracepoint_look_up_symbols): New.
10596 (debug_threads) [IN_PROCESS_AGENT]: New.
10597 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10598 (UNKNOWN_SIDE_EFFECTS): New.
10599 (stop_tracing): New.
10600 (flush_trace_buffer): New.
10601 (stop_tracing_bkpt): New.
10602 (flush_trace_buffer_bkpt): New.
10603 (read_inferior_integer): New.
10604 (read_inferior_uinteger): New.
10605 (read_inferior_data_pointer): New.
10606 (write_inferior_data_pointer): New.
10607 (write_inferior_integer): New.
10608 (write_inferior_uinteger): New.
10609 (struct collect_static_trace_data_action): Delete.
10610 (enum tracepoint_type): New.
10611 (struct tracepoint) <type>: New field `type'.
10612 <actions_str, step_actions, step_actions_str>: Only include in
10614 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10615 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10616 (tracepoints): Use IP_AGENT_EXPORT.
10617 (last_tracepoint): Don't include in the IPA.
10618 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10619 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10620 (alloced_trace_state_variables): New.
10621 (trace_state_variables): Use IP_AGENT_EXPORT.
10622 (traceframe_t): Delete unused variable.
10623 (circular_trace_buffer): Don't include in the IPA.
10624 (trace_buffer_start): Delete.
10625 (struct trace_buffer_control): New.
10626 (trace_buffer_free): Delete.
10627 (struct ipa_trace_buffer_control): New.
10628 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10629 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10631 (trace_buffer_ctrl): New.
10632 (TRACE_BUFFER_CTRL_CURR): New.
10633 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10634 Reimplement as macros.
10635 (trace_buffer_wrap): Delete.
10636 (traceframe_write_count, traceframe_read_count)
10637 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10638 (struct tracepoint_hit_ctx) <type>: New field.
10639 (struct fast_tracepoint_ctx): New.
10640 (memory_barrier): New.
10642 (record_tracepoint_error): Update atomically in the IPA.
10643 (clear_inferior_trace_buffer): New.
10644 (about_to_request_buffer_space): New.
10645 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10646 updating the same buffer.
10647 (add_tracepoint): Default the tracepoint's type to trap
10648 tracepoint, and orig_size to -1.
10649 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10650 internal variables.
10651 (create_trace_state_variable): New parameter `gdb'. Handle it.
10652 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10653 (cmd_qtdp): Handle fast tracepoints.
10654 (cmd_qtdv): Adjust.
10655 (max_jump_pad_size): New.
10656 (gdb_jump_pad_head): New.
10657 (get_jump_space_head): New.
10658 (claim_jump_space): New.
10659 (sort_tracepoints): New.
10660 (MAX_JUMP_SIZE): New.
10661 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10663 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10664 support. Upload fast traceframes, and delete internal IPA
10666 (stop_tracing_handler): New.
10667 (flush_trace_buffer_handler): New.
10668 (cmd_qtstop): Upload fast tracepoints.
10669 (response_tracepoint): Handle fast tracepoints.
10670 (tracepoint_finished_step): Upload fast traceframes. Set the
10671 tracepoint hit context's tracepoint type.
10672 (handle_tracepoint_bkpts): New.
10673 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10674 type. Add comment about fast tracepoints.
10675 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10676 non-existing action_str field.
10677 (get_context_regcache): Handle fast tracepoints.
10678 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10680 (fast_tracepoint_from_jump_pad_address): New.
10681 (fast_tracepoint_from_ipa_tpoint_address): New.
10682 (collecting_t): New.
10683 (force_unlock_trace_buffer): New.
10684 (fast_tracepoint_collecting): New.
10686 (gdb_collect): New.
10687 (write_inferior_data_ptr): New.
10688 (target_tp_heap): New.
10689 (target_malloc): New.
10690 (download_agent_expr): New.
10692 (download_tracepoints): New.
10693 (download_trace_state_variables): New.
10694 (upload_fast_traceframes): New.
10695 (IPA_FIRST_TRACEFRAME): New.
10696 (IPA_NEXT_TRACEFRAME_1): New.
10697 (IPA_NEXT_TRACEFRAME): New.
10698 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10699 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10700 (gdb_jump_pad_buffer_end): New.
10701 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10702 (initialize_tracepoint): Adjust.
10703 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10704 buffer. Initialize the low module.
10705 * utils.c (PREFIX, TOOLNAME): New.
10706 (malloc_failure): Use PREFIX.
10707 (error): In the IPA, an error causes an exit.
10708 (fatal, warning): Use PREFIX.
10709 (internal_error): Use TOOLNAME.
10710 (NUMCELLS): Increase to 10.
10711 * configure, config.in: Regenerate.
10713 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10715 * server.c (handle_query) <qSupported>: Do two passes over the
10716 qSupported string to avoid nesting strtok.
10718 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10720 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10722 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10723 -Wl,--dynamic-list.
10724 * configure: Regenerate.
10725 * proc-service.list: New.
10727 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10729 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10732 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10734 * gdbreplay.c (remote_open): Check error return from socket() call by
10735 its equality to -1 not by it being negative.
10736 * remote-utils.c (remote_open): Likewise.
10738 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10740 * config.h: Regenerate.
10742 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10744 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10745 doesn't provide PTRACE_GET_THREAD_AREA.
10747 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10749 * linux-m68k-low.c: Include <asm/ptrace.h>
10750 (ps_get_thread_area): Implement.
10752 2010-05-03 Doug Evans <dje@google.com>
10754 * event-loop.c (struct callback_event): New struct.
10755 (callback_list): New global.
10756 (append_callback_event, delete_callback_event): New functions.
10757 (process_callback): New function.
10758 (start_event_loop): Call it.
10759 * remote-utils.c (NOT_SCHEDULED): Define.
10760 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10761 moved out of readchar.
10762 (readchar): Rewrite. Call reschedule before returning.
10763 (reset_readchar): New function.
10764 (remote_close): Call it.
10765 (process_remaining, reschedule): New functions.
10766 * server.h (callback_handler_func): New typedef.
10767 (append_callback_event, delete_callback_event): Declare.
10769 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10771 * proc-service.c (ps_pglobal_lookup): Use
10772 thread_db_look_up_one_symbol.
10773 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10774 parameter. Use it instead of all_symbols_looked_up.
10775 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10777 (all_symbols_looked_up): Don't declare.
10778 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10779 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10781 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10782 Set all_symbols_looked_up here.
10783 (thread_db_look_up_one_symbol): New.
10784 (thread_db_get_tls_address): Adjust.
10785 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10786 thread_db object on the heap, and tentatively set it in the
10788 (thread_db_init): Don't set all_symbols_looked_up here.
10789 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10791 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10793 * linux-low.c (linux_kill, linux_detach): Adjust.
10794 (status_pending_p_callback): Remove redundant statement. Check
10795 for !TARGET_WAITIKIND_IGNORE, instead of
10796 TARGET_WAITKIND_STOPPED.
10797 (handle_tracepoints): Make sure LWP is locked. Adjust.
10798 (linux_wait_for_event_1): Adjust.
10799 (linux_cancel_breakpoints): New.
10800 (unsuspend_one_lwp): New.
10801 (unsuspend_all_lwps): New.
10802 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10803 (send_sigstop_callback): Change return type to int, add new
10804 `except' parameter and handle it.
10805 (suspend_and_send_sigstop_callback): New.
10806 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10807 pass them down. If SUSPEND, also increment the lwp's suspend
10809 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10810 (need_step_over_p): Don't consider suspended LWPs.
10811 (start_step_over): Adjust.
10812 (proceed_one_lwp): Change return type to int, add new `except'
10813 parameter and handle it.
10814 (unsuspend_and_proceed_one_lwp): New.
10815 (proceed_all_lwps): Use find_inferior instead of
10817 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10818 also decrement the suspend count of LWPs. Pass `except' down,
10819 instead of hacking its suspend count.
10820 (linux_pause_all): Add `freeze' parameter. Adjust.
10821 (linux_unpause_all): New.
10822 (linux_target_ops): Install linux_unpause_all.
10823 * server.c (handle_status): Adjust.
10824 * target.h (struct target_ops): New fields `unpause_all' and
10825 `cancel_breakpoints'. Add new parameter to `pause_all'.
10826 (pause_all): Add new `freeze' parameter.
10827 (unpause_all): New.
10828 (cancel_breakpoints): New.
10829 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10830 cancel breakpoints.
10831 (cmd_qtstart): Pause threads.
10832 (stop_tracing): Pause threads, and cancel breakpoints.
10833 * win32-low.c (win32_target_ops): Adjust.
10835 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10837 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10838 the inferior right away from here...
10839 (linux_wait_1): ... to here, and adjust to check the thread's
10840 last_resume_kind instead of the lwp's step or stop_expected flags.
10842 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10844 * README: Use consistent `GDB' and `GDBserver' spellings.
10846 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10848 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10849 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10850 (linux_detach_one_lwp): Assume the lwp is stopped.
10851 (any_thread_of): Delete.
10852 (linux_detach): Stop all lwps here. Don't blindly delete all
10854 (delete_lwp_callback): New.
10855 (linux_mourn): Delete all lwps of the process that is gone.
10856 (linux_wait_1): Don't delete the last lwp of the process here.
10857 * mem-break.h (mark_breakpoints_out): Declare.
10858 * mem-break.c (mark_breakpoints_out): New.
10859 (free_all_breakpoints): Use it.
10860 * server.c (handle_target_event): If the process is gone, mark
10862 * thread-db.c (struct thread_db) <create_bp>: New field.
10863 (thread_db_enable_reporting): Fix prototype. Store a thread event
10864 breakpoint reference in the thread_db struct.
10865 (thread_db_load_search): Clear the thread_db object.
10866 (try_thread_db_load_1): Ditto.
10867 (switch_to_process): New.
10868 (disable_thread_event_reporting): Use it.
10869 (remove_thread_event_breakpoints): New.
10870 (thread_db_detach, thread_db_mourn): Use it.
10872 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10874 * linux-low.c (linux_enable_event_reporting): New.
10875 (linux_wait_for_event_1, handle_extended_wait): Use it.
10877 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10879 * linux-low.c (linux_kill_one_lwp, linux_kill)
10880 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10881 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10882 SIGSTOP even if the LWP is stopped.
10883 (send_sigstop_callback): New.
10884 (stop_all_lwps): Use send_sigstop_callback instead.
10885 (linux_resume_one_thread): Adjust.
10886 (proceed_one_lwp): Still proceed an LWP that the client has
10887 requested to stop, if we haven't reported it as stopped yet. Make
10888 sure that LWPs the client want stopped, have a pending SIGSTOP.
10890 2010-04-26 Doug Evans <dje@google.com>
10892 * server.c (handle_general_set): Make static.
10894 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10895 Print received char after testing for error/eof instead of before.
10896 (input_interrupt): Tweak comment.
10898 2010-04-23 Doug Evans <dje@google.com>
10900 * server.c (start_inferior): Print inferior argv if --debug.
10902 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10904 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10905 * nto-x86-low.c: Include server.h
10907 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10909 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10910 be consistent with other sources of this directory.
10911 (init_registers_amd64): Correct name of source file of this function
10914 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10916 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10917 64-bit executables.
10919 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10921 * win32-i386-low.c: Add 64-bit support.
10922 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10923 (init_registers_amd64): Declare.
10924 (mappings): Add 64-bit version of array.
10925 (init_windows_x86): New function.
10926 (the_low_target): Change init_arch field to init_windows_x86.
10928 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10930 * win32-low.c: Adapt to support also 64-bit architecture.
10931 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10932 (get_image_name): Use SIZE_T type for local variable `done'.
10933 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10934 (toolhelp_get_dll_name): Idem.
10935 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10936 Use uintptr_t typecast to avoid warning.
10937 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10938 (handle_exception): Use phex_nz to avoid warning.
10939 (win32_wait): Remove unused local variable `process'.
10941 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10943 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10946 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10948 * configure.ac: Use `ws2_32' library for srv_mingw.
10949 * configure: Regenerate.
10950 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10951 * remote-utils.c: Likewise.
10953 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10955 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10956 if __x86_64__ is defined.
10958 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10960 * configure: Regenerate.
10962 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10964 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10965 * target.h (target_ops): New get_tib_address field.
10966 * win32-low.h (win32_thread_info): Add thread_local_base field.
10967 * win32-low.c (child_add_thread): Add tlb argument.
10968 Set thread_local_base field to TLB.
10969 (get_child_debug_event): Adapt to child_add_thread change.
10970 (win32_get_tib_address): New function.
10971 (win32_target_ops): Set get_tib_address field to
10972 win32_get_tib_address.
10973 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10975 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10977 * linux-low.c (linux_mourn): Also remove the process.
10978 * server.c (handle_target_event): Don't remove the process here.
10979 * nto-low.c (nto_mourn): New.
10980 (nto_target_ops): Install it.
10981 * spu-low.c (spu_mourn): New.
10982 (spu_target_ops): Install it.
10983 * win32-low.c (win32_mourn): New.
10984 (win32_target_ops): Install it.
10986 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10988 * server.h (buffer_xml_printf): Remove redundant `;'.
10990 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10992 * regcache.c (set_register_cache): Invalidate regcaches before
10993 changing the register cache layout.
10994 (regcache_invalidate_one): Allow a NULL regcache.
10995 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10996 regcaches before changing the register cache layout or the target
10999 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11001 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11002 variable warning on Linux/x86-64.
11004 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11006 GDBserver disconnected tracing support.
11008 * linux-low.c (linux_remove_process): Delete.
11009 (add_lwp): Don't set last_resume_kind here.
11010 (linux_kill): Use `mourn'.
11011 (linux_detach): Use `thread_db_detach', and `mourn'.
11012 (linux_mourn): New.
11013 (linux_attach_lwp_1): Adjust comment.
11014 (linux_attach): last_resume_kind moved the thread_info; adjust.
11015 (status_pending_p_callback): Adjust.
11016 (linux_wait_for_event_1): Adjust.
11017 (count_events_callback, select_singlestep_lwp_callback)
11018 (select_event_lwp_callback, cancel_breakpoints_callback)
11019 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11020 (proceed_one_lwp): Adjust.
11021 (linux_async): Add debug output.
11022 (linux_thread_stopped): New.
11023 (linux_pause_all): New.
11024 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11026 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11027 (thread_db_free): Delete declaration.
11028 (thread_db_detach, thread_db_mourn): Declare.
11029 * thread-db.c (thread_db_init): Use thread_db_mourn.
11030 (thread_db_free): Delete, split in two.
11031 (disable_thread_event_reporting): New.
11032 (thread_db_detach): New.
11033 (thread_db_mourn): New.
11035 * server.h (struct thread_info) <last_resume_kind>: New field.
11036 <attached>: Add comment.
11037 <gdb_detached>: New field.
11038 (handler_func): Change return type to int.
11039 (handle_serial_event, handle_target_event): Ditto.
11040 (gdb_connected): Declare.
11042 (disconnected_tracing): Declare.
11043 (stop_tracing): Declare.
11045 * server.c (handle_query) <qSupported>: Report support for
11046 disconnected tracing.
11047 (queue_stop_reply_callback): Account for running threads.
11048 (gdb_wants_thread_stopped): New.
11049 (gdb_wants_all_threads_stopped): New.
11050 (gdb_reattached_process): New.
11051 (handle_status): Clear the `gdb_detached' flag of all processes.
11052 In all-stop, stop all threads.
11053 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11054 (process_serial_event): If the remote connection breaks, or if an
11055 exit was forced with "monitor exit", force an event loop exit.
11056 Handle disconnected tracing on detach.
11057 (handle_serial_event): Adjust.
11058 (handle_target_event): If GDB isn't connected, forward events back
11059 to the inferior, unless the last process exited, in which case,
11060 exit gdbserver. Adjust interface.
11062 * remote-utils.c (remote_open): Don't block in accept. Instead
11063 register an event loop source on the listen socket file
11064 descriptor. Refactor bits into ...
11065 (listen_desc): ... this new global.
11066 (gdb_connected): ... this new function.
11067 (enable_async_notification): ... this new function.
11068 (handle_accept_event): ... this new function.
11069 (remote_close): Clear remote_desc.
11071 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11073 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11075 (mourn_inferior): Define.
11076 (target_process_qsupported): Avoid the dangling else problem.
11077 (thread_stopped): Define.
11078 (pause_all): Define.
11079 (target_waitstatus_to_string): Declare.
11080 * target.c (target_waitstatus_to_string): New.
11082 * tracepoint.c (tracing): Make extern.
11083 (disconnected_tracing): New.
11084 (stop_tracing): Make extern. Handle tracing stops due to GDB
11086 (cmd_qtdisconnected): New.
11087 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11088 (handle_tracepoint_general_set): Handle QTDisconnected.
11090 * event-loop.c (event_handler_func): Change return type to int.
11091 (process_event): Bail out if the event handler wants the event
11093 (handle_file_event): Ditto.
11094 (start_event_loop): Bail out if the event handler wants the event
11097 * nto-low.c (nto_target_ops): Adjust.
11098 * spu-low.c (spu_wait): Don't remove the process here.
11099 (spu_target_ops): Adjust.
11100 * win32-low.c (win32_wait): Don't remove the process here.
11101 (win32_target_ops): Adjust.
11103 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11105 * regcache.c (realloc_register_cache): Invalidate inferior's
11106 regcache before recreating it.
11108 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11110 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11112 2010-04-09 Stan Shebs <stan@codesourcery.com>
11113 Pedro Alves <pedro@codesourcery.com>
11115 * server.h (LONGEST): New.
11116 (struct thread_info) <while_stepping>: New field.
11117 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11119 (initialize_tracepoint, handle_tracepoint_general_set)
11120 (handle_tracepoint_query, tracepoint_finished_step)
11121 (tracepoint_was_hit, release_while_stepping_state_list):
11122 (current_traceframe): Declare.
11123 * server.c (handle_general_set): Handle tracepoint packets.
11124 (read_memory): New.
11125 (write_memory): New.
11126 (handle_search_memory_1): Use read_memory.
11127 (handle_query): Report support for conditional tracepoints, trace
11128 state variables, and tracepoint sources. Handle tracepoint
11130 (main): Initialize the tracepoints module.
11131 (process_serial_event): Handle traceframe reads/writes.
11133 * linux-low.c (handle_tracepoints): New.
11134 (linux_wait_1): Call it.
11135 (linux_resume_one_lwp): Handle while-stepping.
11136 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11137 (linux_target_ops): Install them.
11138 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11140 * linux-x86-low.c (x86_supports_tracepoints): New.
11141 (the_low_target). Install it.
11143 * mem-break.h (delete_breakpoint): Declare.
11144 * mem-break.c (delete_breakpoint): Make external.
11146 * target.h (struct target_ops): Add `supports_tracepoints',
11147 `read_pc', and `write_pc' fields.
11148 (target_supports_tracepoints): Define.
11149 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11152 * regcache.h (struct regcache) <registers_owned>: New field.
11153 (init_register_cache, regcache_cpy): Declare.
11154 (regcache_read_pc, regcache_write_pc): Declare.
11155 (register_cache_size): Declare.
11156 (supply_regblock): Declare.
11157 * regcache.c (init_register_cache): New.
11158 (new_register_cache): Use it.
11159 (regcache_cpy): New.
11160 (register_cache_size): New.
11161 (supply_regblock): New.
11162 (regcache_read_pc, regcache_write_pc): New.
11164 * tracepoint.c: New.
11166 * Makefile.in (OBS): Add tracepoint.o.
11167 (tracepoint.o): New rule.
11169 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11171 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11173 (i386-mmx.c): Likewise.
11174 (i386-mmx-linux.o): Likewise.
11175 (i386-mmx-linux.c): Likewise.
11177 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11178 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11179 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11180 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11182 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11183 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11184 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11186 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11188 * Makefile.in (clean): Updated.
11190 (i386-avx.c): Likewise.
11191 (i386-avx-linux.o): Likewise.
11192 (i386-avx-linux.c): Likewise.
11193 (amd64-avx.o): Likewise.
11194 (amd64-avx.c): Likewise.
11195 (amd64-avx-linux.o): Likewise.
11196 (amd64-avx-linux.c): Likewise.
11198 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11199 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11200 (srv_amd64_regobj): Add amd64-avx.o.
11201 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11202 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11203 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11204 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11205 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11206 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11207 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11209 * i387-fp.c: Include "i386-xstate.h".
11211 (i387_cache_to_xsave): Likewise.
11212 (i387_xsave_to_cache): Likewise.
11213 (x86_xcr0): Likewise.
11215 * i387-fp.h (i387_cache_to_xsave): Likewise.
11216 (i387_xsave_to_cache): Likewise.
11217 (x86_xcr0): Likewise.
11219 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11220 * linux-crisv32-low.c (target_regsets): Likewise.
11221 * linux-m68k-low.c (target_regsets): Likewise.
11222 * linux-mips-low.c (target_regsets): Likewise.
11223 * linux-ppc-low.c (target_regsets): Likewise.
11224 * linux-s390-low.c (target_regsets): Likewise.
11225 * linux-sh-low.c (target_regsets): Likewise.
11226 * linux-sparc-low.c (target_regsets): Likewise.
11227 * linux-xtensa-low.c (target_regsets): Likewise.
11229 * linux-low.c: Include <sys/uio.h>.
11230 (regsets_fetch_inferior_registers): Support nt_type.
11231 (regsets_store_inferior_registers): Likewise.
11232 (linux_process_qsupported): New.
11233 (linux_target_ops): Add linux_process_qsupported.
11235 * linux-low.h (regset_info): Add nt_type.
11236 (linux_target_ops): Add process_qsupported.
11238 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11240 (init_registers_i386_avx_linux): New.
11241 (init_registers_amd64_avx_linux): Likewise.
11242 (xmltarget_i386_linux_no_xml): Likewise.
11243 (xmltarget_amd64_linux_no_xml): Likewise.
11244 (PTRACE_GETREGSET): Likewise.
11245 (PTRACE_SETREGSET): Likewise.
11246 (x86_fill_xstateregset): Likewise.
11247 (x86_store_xstateregset): Likewise.
11248 (use_xml): Likewise.
11249 (x86_linux_update_xmltarget): Likewise.
11250 (x86_linux_process_qsupported): Likewise.
11251 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11252 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11253 init_registers_i386_linux here. Call
11254 x86_linux_update_xmltarget.
11255 (the_low_target): Add x86_linux_process_qsupported.
11257 * server.c (handle_query): Call target_process_qsupported.
11259 * target.h (target_ops): Add process_qsupported.
11260 (target_process_qsupported): New.
11262 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11264 * inferiors.c (add_thread): Set last_status kind to
11265 TARGET_WAITKIND_IGNORE.
11266 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11267 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11268 (linux_wait_1): Move `thread' local definition to block that uses
11269 it. Don't NULL initialize `event_child'.
11270 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11271 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11272 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11274 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11276 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11277 an extended waitstatus, or by a watchpoint.
11278 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11279 thread was stepping or has been stopped by a watchpoint.
11281 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11283 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11284 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11285 of another, then delete the previous, and validate all
11287 (validate_inserted_breakpoint): New.
11288 (delete_disabled_breakpoints): New.
11289 (validate_breakpoints): New.
11290 (check_mem_read): Validate breakpoints before trusting their
11291 shadow. Delete disabled breakpoints.
11292 (check_mem_write): Validate breakpoints before trusting they
11293 should be inserted. Delete disabled breakpoints.
11294 * mem-break.h (validate_breakpoints):
11295 * server.c (handle_query): Validate breakpoints when we see a
11298 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11300 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11301 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11302 if we could tell there's a GDB breakpoint at stop_pc.
11303 (need_step_over_p): Don't do a step over if we find a GDB
11304 breakpoint at the resume PC.
11306 * mem-break.c (struct raw_breakpoint): New.
11307 (enum bkpt_type): New type `gdb_breakpoint'.
11308 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11309 fields. New field `raw'.
11310 (find_raw_breakpoint_at): New.
11311 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11312 breakpoint instead.
11313 (set_breakpoint_at): Adjust.
11314 (delete_raw_breakpoint): New.
11315 (release_breakpoint): New.
11316 (delete_breakpoint): Rename to...
11317 (delete_breakpoint_1): ... this. Add proc parameter. Use
11318 release_breakpoint. Return ENOENT.
11319 (delete_breakpoint): Reimplement.
11320 (find_breakpoint_at): Delete.
11321 (find_gdb_breakpoint_at): New.
11322 (delete_breakpoint_at): Delete.
11323 (set_gdb_breakpoint_at): New.
11324 (delete_gdb_breakpoint_at): New.
11325 (gdb_breakpoint_here): New.
11326 (set_reinsert_breakpoint): Use release_breakpoint.
11327 (uninsert_breakpoint): Rename to ...
11328 (uninsert_raw_breakpoint): ... this.
11329 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11330 (reinsert_raw_breakpoint): Change parameter type to
11332 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11334 (check_breakpoints): Adjust. Use release_breakpoint.
11335 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11336 (breakpoint_inserted_here): Ditto.
11337 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11338 Don't trust the breakpoint's shadow if it is not inserted.
11339 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11340 (delete_all_breakpoints): Adjust.
11341 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11342 use delete_breakpoint_1.
11344 * mem-break.h (breakpoints_supported): Delete declaration.
11345 (set_gdb_breakpoint_at): Declare.
11346 (gdb_breakpoint_here): Declare.
11347 (delete_breakpoint_at): Delete.
11348 (delete_gdb_breakpoint_at): Declare.
11350 * server.h (struct raw_breakpoint): Forward declare.
11351 (struct process_info): New field `raw_breakpoints'.
11353 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11356 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11358 * linux-low.c (status_pending_p_callback): Fix comment.
11359 (linux_wait_for_event_1): Move most of the internal breakpoint
11360 handling from here...
11361 (linux_wait_1): ... to here.
11362 (count_events_callback): New.
11363 (select_singlestep_lwp_callback): New.
11364 (select_event_lwp_callback): New.
11365 (cancel_breakpoints_callback): New.
11366 (select_event_lwp): New.
11367 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11368 priority to all LWPs that have had events that should be reported
11369 to the client. Cancel breakpoints when about to reporting the
11370 event to the client, not while stopping lwps. No longer cancel
11371 finished single-steps here.
11372 (cancel_finished_single_step): Delete.
11373 (cancel_finished_single_steps): Delete.
11375 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11377 * mem-break.c (enum bkpt_type): New.
11378 (struct breakpoint): New field `type'.
11379 (set_breakpoint_at): Change return type to struct breakpoint
11380 pointer. Set type to `other_breakpoint' by default.
11381 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11382 in the breakpoint list.
11383 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11384 (reinsert_breakpoint): Rename to ...
11385 (reinsert_raw_breakpoint): ... this.
11386 (reinsert_breakpoints_at): Adjust.
11387 * mem-break.h (struct breakpoint): Declare.
11388 (set_breakpoint_at): Change return type to struct breakpoint
11391 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11393 * server.c (handle_query): Assign, not compare.
11395 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11397 Teach linux gdbserver to step-over-breakpoints.
11399 * linux-low.c (can_hardware_single_step): New.
11400 (supports_breakpoints): New.
11401 (handle_extended_wait): If stopping threads, read the stop pc of
11402 the new cloned LWP.
11404 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11405 low target doesn't support retrieving the PC.
11406 (add_lwp): Set last_resume_kind to resume_continue.
11407 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11408 (linux_attach): Don't clear stop_expected. Set the lwp's
11409 last_resume_kind to resume_stop.
11410 (linux_detach_one_lwp): Don't check for removed breakpoints.
11411 (check_removed_breakpoint): Delete.
11412 (status_pending_p): Rename to ...
11413 (status_pending_p_callback): ... this. Don't check for removed
11414 breakpoints. Don't consider threads that are stopped from GDB's
11416 (linux_wait_for_lwp): Always read the stop_pc here.
11417 (cancel_breakpoint): New.
11418 (step_over_bkpt): New global.
11419 (linux_wait_for_event_1): Implement stepping over breakpoints.
11420 (gdb_wants_lwp_stopped): New.
11421 (gdb_wants_all_stopped): New.
11422 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11423 single-step traps here. Store the thread's last reported target
11425 (send_sigstop): Don't clear stop_expected. Always set it,
11427 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11428 (cancel_finished_single_step): New.
11429 (cancel_finished_single_steps): New.
11430 (wait_for_sigstop): Don't cancel finished single-step traps here.
11431 (linux_resume_one_lwp): Don't check for removed breakpoints.
11432 Don't set `step' on non-hardware step archs.
11433 (linux_set_resume_request): Ignore resume_stop requests if already
11434 stopping or stopped. Set the lwp's last_resume_kind.
11435 (resume_status_pending_p): Don't check for removed breakpoints.
11436 (need_step_over_p): New.
11437 (start_step_over): New.
11438 (finish_step_over): New.
11439 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11440 requests. Clear the thread's last reported target waitstatus.
11441 Don't use the `suspended' flag. Don't consider pending breakpoints.
11442 (linux_resume): Start a step-over if necessary.
11443 (proceed_one_lwp): New.
11444 (proceed_all_lwps): New.
11445 (unstop_all_lwps): New.
11446 * linux-low.h (struct lwp_info): Rewrite comment for the
11447 `suspended' flag. Add the `stop_pc' field. Delete the
11448 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11449 Add `'last_resume_kind' and `need_step_over' fields.
11450 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11451 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11452 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11453 (set_raw_breakpoint_at): New.
11454 (set_breakpoint_at): Rewrite to use it.
11455 (reinsert_breakpoint_handler): Delete.
11456 (set_reinsert_breakpoint): New.
11457 (reinsert_breakpoint_by_bp): Delete.
11458 (delete_reinsert_breakpoints): New.
11459 (uninsert_breakpoint): Rewrite.
11460 (uninsert_breakpoints_at): New.
11461 (reinsert_breakpoint): Rewrite.
11462 (reinsert_breakpoints_at): New.
11463 (check_breakpoints): Rewrite.
11464 (breakpoint_here): New.
11465 (breakpoint_inserted_here): New.
11466 (check_mem_read): Adjust.
11467 * mem-break.h (breakpoints_supported, breakpoint_here)
11468 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11469 (reinsert_breakpoint_by_bp): Delete declaration.
11470 (delete_reinsert_breakpoints): Declare.
11471 (reinsert_breakpoint): Delete declaration.
11472 (reinsert_breakpoints_at): Declare.
11473 (uninsert_breakpoint): Delete declaration.
11474 (uninsert_breakpoints_at): Declare.
11475 (check_breakpoints): Adjust prototype.
11476 * server.h: Adjust include order.
11477 (struct thread_info): Declare here. Add a `last_status' field.
11479 2010-03-23 Michael Snyder <msnyder@vmware.com>
11481 * server.c (crc32): New function.
11482 (handle_query): Add handling for 'qCRC:' request.
11484 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11486 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11487 lwp had been stopped by a watchpoint.
11489 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11491 * server.h (internal_error): Declare.
11492 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11493 * utils.c (internal_error): New function.
11495 2010-03-15 Andreas Schwab <schwab@redhat.com>
11497 * configure.srv: Fix typo setting srv_regobj.
11499 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11501 * linux-low.c (fetch_register): Avoid passing a non string literal
11503 (usr_store_inferior_registers): Ditto.
11505 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11507 * linux-low.c (linux_write_memory): Bail out early if peeking
11510 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11512 * linux-low.h (struct lwp_info): New fields
11513 `stopped_by_watchpoint' and `stopped_data_address'.
11514 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11515 here, and cache them in the lwp object.
11516 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11518 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11520 (linux_stopped_by_watchpoint): Rewrite.
11521 (linux_stopped_data_address): Rewrite.
11523 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11525 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11526 switching the current inferior, not before.
11528 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11530 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11531 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11532 i386-linux.c and amd64-linux.c.
11533 (reg-i386.o): Removed.
11534 (reg-i386.c): Likewise.
11535 (reg-i386-linux.o): Likewise.
11536 (reg-i386-linux.c): Likewise.
11537 (reg-x86-64.o): Likewise.
11538 (reg-x86-64.c): Likewise.
11539 (reg-x86-64-linux.o): Likewise.
11540 (reg-x86-64-linux.c): Likewise.
11542 (i386.c): Likewise.
11543 (i386-linux.o): Likewise.
11544 (i386-linux.c): Likewise.
11545 (amd64.o): Likewise.
11546 (amd64.c): Likewise.
11547 (amd64-linux.o): Likewise.
11548 (amd64-linux.c): Likewise.
11550 * configure.srv (srv_i386_regobj): New.
11551 (srv_i386_linux_regobj): Likewise.
11552 (srv_amd64_regobj): Likewise.
11553 (srv_amd64_linux_regobj): Likewise.
11554 (srv_i386_32bit_xmlfiles): Likewise.
11555 (srv_i386_64bit_xmlfiles): Likewise.
11556 (srv_i386_xmlfiles): Likewise.
11557 (srv_amd64_xmlfiles): Likewise.
11558 (srv_i386_linux_xmlfiles): Likewise.
11559 (srv_amd64_linux_xmlfiles): Likewise.
11560 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11561 srv_xmlfiles to $srv_i386_xmlfiles.
11562 (i[34567]86-*-mingw32ce*): Likewise.
11563 (i[34567]86-*-mingw*): Likewise.
11564 (i[34567]86-*-nto*): Likewise.
11565 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11566 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11567 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11568 (x86_64-*-linux*): Likewise.
11570 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11571 (init_registers_amd64_linux): New.
11572 (x86_arch_setup): Replace init_registers_x86_64_linux with
11573 init_registers_amd64_linux.
11575 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11577 * configure.ac: Check for libdl. If it is not available link against
11578 static libthread_db.
11579 * configure: Regenerate.
11581 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11585 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11586 handing a read watchpoint.
11587 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11589 2010-02-12 Doug Evans <dje@google.com>
11591 * linux-low.c (linux_supports_tracefork_flag): Document.
11592 (linux_look_up_symbols): Add comment.
11594 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11596 * regcache.c (supply_register): Clear regcache if buf is NULL.
11598 2010-02-02 Nicolas Roche <roche@sourceware.org>
11599 Joel Brobecker <brobecker@adacore.com>
11601 * inferiors.c (find_inferior): Add function documentation.
11602 (unloaded_dll): Handle the case where the unloaded dll has not
11603 been previously registered in the dll list.
11605 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11607 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11608 (thumb2_breakpoint): New.
11609 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11611 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11613 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11614 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11617 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11619 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11621 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11623 * linux-s390-low.c (s390_collect_ptrace_register)
11624 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11626 2010-01-21 Doug Evans <dje@google.com>
11628 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11629 (PTRACE_ARG4_TYPE): New macro.
11630 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11631 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11632 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11633 (usr_store_inferior_registers): Ditto.
11634 (linux_read_memory, linux_write_memory): Ditto.
11635 (linux_test_for_tracefork): Ditto.
11637 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11638 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11640 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11642 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11645 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11647 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11648 prototype to take a regcache. Adjust.
11650 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11652 * regcache.h (struct thread_info): Forward declare.
11653 (struct regcache): New.
11654 (new_register_cache): Adjust prototype.
11655 (get_thread_regcache): Declare.
11656 (free_register_cache): Adjust prototype.
11657 (registers_to_string, registers_from_string): Ditto.
11658 (supply_register, supply_register_by_name, collect_register)
11659 (collect_register_as_string, collect_register_by_name): Ditto.
11660 * regcache.c (struct inferior_regcache_data): Delete.
11661 (get_regcache): Rename to ...
11662 (get_thread_regcache): ... this. Adjust. Switch inferior before
11663 fetching registers.
11664 (regcache_invalidate_one): Adjust.
11665 (regcache_invalidate): Fix prototype.
11666 (new_register_cache): Return the new register cache.
11667 (free_register_cache): Change prototype.
11668 (realloc_register_cache): Adjust.
11669 (registers_to_string): Change prototype to take a regcache. Adjust.
11670 (registers_from_string): Ditto.
11671 (register_data): Ditto.
11672 (supply_register): Ditto.
11673 (supply_register_by_name): Ditto.
11674 (collect_register): Ditto.
11675 (collect_register_as_string): Ditto.
11676 (collect_register_by_name): Ditto.
11677 * server.c (process_serial_event): Adjust.
11678 * linux-low.h (regset_fill_func, regset_store_func): Change
11680 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11682 * linux-low.c (get_stop_pc): Adjust.
11683 (check_removed_breakpoint): Adjust.
11684 (linux_wait_for_event): Adjust.
11685 (linux_resume_one_lwp): Adjust.
11686 (fetch_register): Add regcache parameter. Adjust.
11687 (usr_store_inferior_registers): Ditto.
11688 (regsets_fetch_inferior_registers): Ditto.
11689 (regsets_store_inferior_registers): Ditto.
11690 (linux_fetch_registers, linux_store_registers): Ditto.
11691 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11693 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11695 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11696 prototype to take a regcache.
11697 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11698 * remote-utils.c (convert_ascii_to_int, outreg)
11699 (prepare_resume_reply): Change prototype to take a regcache.
11701 * target.h (struct target_ops) <fetch_registers, store_registers>:
11702 Change prototype to take a regcache.
11703 (fetch_inferior_registers, store_inferior_registers): Change
11704 prototype to take a regcache. Adjust.
11705 * proc-service.c (ps_lgetregs): Adjust.
11706 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11707 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11708 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11709 take a regcache. Adjust.
11710 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11711 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11712 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11713 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11714 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11715 (cris_cannot_fetch_register):
11716 (cris_breakpoint_at): Change prototype to take a regcache.
11718 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11719 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11720 to take a regcache. Adjust.
11721 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11723 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11724 take a regcache. Adjust.
11725 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11726 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11727 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11728 * linux-mips-low.c (mips_get_pc):
11729 (mips_set_pc): Change prototype to take a regcache. Adjust.
11730 (mips_reinsert_addr): Adjust.
11731 (mips_collect_register): Change prototype to take a regcache.
11733 (mips_supply_register):
11734 (mips_collect_register_32bit, mips_supply_register_32bit)
11735 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11736 (mips_store_fpregset): Ditto.
11737 * linux-ppc-low.c (ppc_supply_ptrace_register)
11738 (ppc_supply_ptrace_register): Ditto.
11739 (parse_spufs_run): Adjust.
11740 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11741 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11742 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11743 take a regcache. Adjust.
11744 * linux-s390-low.c (s390_collect_ptrace_register)
11745 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11746 (s390_set_pc): Change prototype to take a regcache. Adjust.
11747 (s390_arch_setup): Adjust.
11748 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11749 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11750 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11751 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11752 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11754 (sparc_breakpoint_at): Adjust.
11755 * linux-xtensa-low.c (xtensa_fill_gregset):
11756 (xtensa_store_gregset):
11757 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11758 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11759 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11760 prototype to take a regcache. Adjust.
11761 * win32-arm-low.c (arm_fetch_inferior_register)
11762 (arm_store_inferior_register): Change prototype to take a
11764 * win32-i386-low.c (i386_fetch_inferior_register)
11765 (i386_store_inferior_register): Change prototype to take a
11767 * win32-low.c (child_fetch_inferior_registers)
11768 (child_store_inferior_registers): Change prototype to take a
11770 (win32_wait): Adjust.
11771 (win32_fetch_inferior_registers): Change prototype to take a
11773 (win32_store_inferior_registers): Adjust.
11774 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11775 store_inferior_register>: Change prototype to take a regcache.
11777 2010-01-20 Doug Evans <dje@google.com>
11779 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11781 (linux_wait_for_event1, linux_init_signals): Ditto.
11782 (W_STOPCODE): Provide definition if missing.
11784 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11786 * linux-low.c (linux_core_of_thread): New.
11787 (compare_ints, show_process, list_threads): New.
11788 (linux_qxfer_osdata): Report threads and cores.
11789 (linux_target_op): Register linux_core_of_thread.
11790 * remote-utils.c (prepare_resume_reply): Report the core.
11791 (buffer_xml_printf): Support %d specifier.
11792 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11794 (handle_query): Handle qXfer:threads. Announce availability
11796 * target.h (struct target_ops): New field core_of_thread.
11798 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11800 * Makefile.in (clean): Remove new generated files.
11801 (reg-s390.o, reg-s390.c): Remove rules.
11802 (reg-s390x.o, reg-s390x.c): Likewise.
11803 (s390-linux32.o, s390-linux32.c): Add rules.
11804 (s390-linux64.o, s390-linux64.c): Likewise.
11805 (s390x-linux64.o, s390x-linux64.c): Likewise.
11806 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11807 * linux-s390-low.c: Include <elf.h>.
11808 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11809 (init_registers_s390): Remove prototype.
11810 (init_registers_s390x): Likewise.
11811 (init_registers_s390_linux32): Add prototype.
11812 (init_registers_s390_linux64): Likewise.
11813 (init_registers_s390x_linux64): Likewise.
11814 (s390_num_regs_3264): New define.
11815 (s390_regmap_3264): New global variable.
11816 (s390_cannot_fetch_register): Remove obsolete check.
11817 (s390_cannot_store_register): Likewise.
11818 (s390_collect_ptrace_register): Handle upper/lower register halves.
11819 (s390_supply_ptrace_register): Likewise.
11820 (s390_fill_gregset): Update to register number changes.
11821 (s390_get_hwcap): New routine.
11822 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11823 Install appropriate regmap and register set.
11825 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11827 * server.c (gdbserver_version): Update copyright year to 2010.
11828 * gdbreplay.c (gdbreplay_version): Likewise.
11830 2009-12-28 Doug Evans <dje@google.com>
11832 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11833 elf/external.h. Include <elf.h> instead but only if necessary.
11835 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11837 * linux-low.c (linux_remove_process): Remove `detaching'
11838 parameter. Don't release/detach from thread_db here.
11839 (linux_kill): Release/detach from thread_db here, ...
11840 (linux_detach): ... and here, before actually detaching.
11841 (linux_wait_1): ... and here, when a process exits.
11842 * thread-db.c (any_thread_of): New.
11843 (thread_db_free): Switch the current inferior to a thread of the
11846 2009-12-21 Doug Evans <dje@google.com>
11848 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11850 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11851 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11852 warning ifndef __NR_tkill. Move setting of errno there too.
11853 Delete unnecessary resetting of errno after syscall.
11854 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11856 * configure.ac: Check for dladdr.
11857 * config.in: Regenerate.
11858 * configure: Regenerate.
11859 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11860 (try_thread_db_load): Update.
11862 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11864 2009-12-18 Doug Evans <dje@google.com>
11866 * event-loop.c: Include unistd.h if it exists.
11868 * linux-low.c (my_waitpid): Move definition away from being in
11869 between linux_tracefork_child/linux_test_for_tracefork.
11871 * gdb_proc_service.h (psaddr_t): Fix type.
11872 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11873 signature to match glibc.
11875 2009-12-16 Doug Evans <dje@google.com>
11877 * linux-low.c (linux_read_memory): Fix argument to read.
11879 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11881 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11882 events, don't leave current_inferior pointing at null.
11884 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11886 * win32-low.c (LOG): Delete.
11887 (OUTMSG): Output to stderr.
11888 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11889 on compile time LOG macro.
11890 (win32_wait): Fix debug output.
11892 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11894 * win32-low.c (win32_add_one_solib): If the dll name is
11895 "ntdll.dll", prepend the system directory to the dll path.
11897 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11899 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11901 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11902 Vladimir Prus <vladimir@codesourcery.com>
11904 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11905 * configure.ac: Check for __mcoldfire__ and set
11906 gdb_cv_m68k_is_coldfire.
11907 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11908 reg-cf.o and reg-m68k.o.
11909 * configure: Regenerated.
11911 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11913 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11914 Pass it to thread_db_free.
11915 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11916 proper `detaching' argument to linux_remove_process.
11917 * linux-low.h (thread_db_free): Add `detaching' parameter.
11918 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11920 (thread_db_free): Add `detaching' parameter. Only
11921 call td_ta_clear_event if detaching from process.
11923 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11925 * thread-db.c (thread_db_free): Fix typo.
11927 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11930 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11932 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11934 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11935 with an i686 compiler.
11936 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11938 * configure: Rebuilt.
11940 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11944 * server.c (handle_search_memory_1): Correct read_addr initialization
11945 in loop for searching subsequent chunks.
11947 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11949 * configure.ac: New --with-libthread-db option.
11950 * thread-db.c: Allow direct dependence on libthread_db.
11951 (thread_db_free): Adjust.
11952 * config.in: Regenerate.
11953 * configure: Likewise.
11955 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11958 * thread-db.c (attach_thread): New function.
11959 (maybe_attach_thread): Return success/failure.
11960 (find_new_threads_callback): Adjust.
11961 (thread_db_find_new_threads): Loop until no new threads.
11963 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11965 * proc-service.c (ps_lgetregs): Formatting.
11967 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11969 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11970 * configure.ac: Adjust.
11971 * linux-low.h (struct process_info_private): Move members to struct
11973 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11974 * linux-low.c (linux_remove_process): Adjust.
11975 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11976 * server.c (handle_query): Move code ...
11977 (handle_monitor_command): ... here. New function.
11978 * target.h (struct target_ops): New member.
11979 * thread-db.c (struct thread_db): New.
11980 (libthread_db_search_path): New variable.
11981 (thread_db_create_event, thread_db_enable_reporting)
11982 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11983 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11984 (try_thread_db_load_1, dladdr_to_soname): New functions.
11985 (try_thread_db_load, thread_db_load_search): New functions.
11986 (thread_db_init): Search for libthread_db.
11987 (thread_db_free): New function.
11988 (thread_db_handle_monitor_command): Likewise.
11989 * config.in: Regenerate.
11990 * configure: Regenerate.
11992 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11994 * spu-low.c (spu_kill): Wait for inferior to terminate.
11995 Call clear_inferiors.
11996 (spu_detach): Call clear_inferiors.
11998 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12000 * aclocal.m4: Regenerate.
12001 * config.in: Likewise.
12002 * configure: Likewise.
12004 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12006 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12007 (parse_spufs_run): New function.
12008 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12009 (ppc_breakpoint_at): Handle SPU breakpoints.
12011 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12013 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12014 (SPUFS_MAGIC): Define.
12015 (spu_enumerate_spu_ids): New function.
12016 (linux_qxfer_spu): New function.
12017 (linux_target_ops): Install linux_qxfer_spu.
12019 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12021 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12022 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12023 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12024 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12025 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12026 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12027 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12028 (init_registers_powerpc_cell32l): Add prototype.
12029 (init_registers_powerpc_cell64l): Likewise.
12030 (ppc_arch_setup): Detect Cell/B.E. architecture.
12032 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12034 * Makefile.in (datarootdir): New variable.
12036 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12038 * linux-low.c (linux_write_memory): Update debugging output.
12039 * Makefile.in (clean): Add new descriptions.
12040 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12041 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12042 * configure.srv: Add new files for arm*-*-linux*.
12043 * linux-arm-low.c: Add new declarations.
12044 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12045 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12046 (HWCAP_VFPv3D16): New.
12047 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12048 instead of __IWMMXT__.
12049 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12050 (arm_arch_setup): New.
12051 (target_regsets): Remove #ifdef. Add VFP regset.
12052 (the_low_target): Use arm_arch_setup.
12054 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12056 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12057 the main thread again.
12059 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12061 Adding Neutrino gdbserver.
12062 * configure: Regenerated.
12063 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12064 * configure.srv (i[34567]86-*-nto*): New target.
12065 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12066 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12067 (nto_comctrl) [__QNX__]: New function.
12068 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12070 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12072 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12075 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12076 Pedro Alves <pedro@codesourcery.com>
12078 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12079 don't support CONTEXT_EXTENDED_REGISTERS.
12080 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12081 (the_low_target): Install them.
12082 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12083 failing with ERROR_PIPE_NOT_CONNECTED.
12085 2009-06-30 Doug Evans <dje@google.com>
12086 Pierre Muller <muller@ics.u-strasbg.fr>
12088 Add h/w watchpoint support to x86-linux, win32-i386.
12089 * Makefile.in (SFILES): Add i386-low.c
12090 (i386_low_h): Define.
12091 (i386-low.o): Add dependencies.
12092 (linux-x86-low.o): Add i386-low.h dependency.
12093 (win32-i386-low.o): Ditto.
12094 * i386-low.c: New file.
12095 * i386-low.h: New file.
12096 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12097 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12098 * linux-low.c (linux_add_process): Initialize arch_private.
12099 (linux_remove_process): Free arch_private.
12100 (add_lwp): Initialize arch_private.
12101 (delete_lwp): Free arch_private.
12102 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12104 * linux-low.h (process_info_private): New member arch_private.
12105 (lwp_info): New member arch_private.
12106 (linux_target_ops): New members new_process, new_thread,
12108 (ptid_of): New macro.
12109 * linux-x86-low.c: Include stddef.h, i386-low.h.
12110 (arch_process_info): New struct.
12111 (arch_lwp_info): New struct.
12112 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12113 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12114 (i386_dr_low_get_status): New function.
12115 (x86_insert_point, x86_remove_point): New functions.
12116 (x86_stopped_by_watchpoint): New function.
12117 (x86_stopped_data_address): New function.
12118 (x86_linux_new_process, x86_linux_new_thread): New functions.
12119 (x86_linux_prepare_to_resume): New function.
12120 (the_low_target): Add entries for insert_point, remove_point,
12121 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12123 * server.c (debug_hw_points): New global.
12124 (monitor_show_help): Document set debug-hw-points.
12125 (handle_query): Process "set debug-hw-points".
12126 * server.h (debug_hw_points): Declare.
12127 (paddress): Declare.
12128 * utils.c (NUMCELLS, CELLSIZE): New macros.
12129 (get_sell, xsnprintf, paddress): New functions.
12130 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12131 remove_point, stopped_by_watchpoint, stopped_data_address.
12132 * win32-i386-low.c: Include i386-low.h.
12133 (debug_reg_state): Replaces dr.
12134 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12135 (i386_dr_low_get_status): New function.
12136 (i386_insert_point, i386_remove_point): New functions.
12137 (i386_stopped_by_watchpoint): New function.
12138 (i386_stopped_data_address): New function.
12139 (i386_initial_stuff): Update.
12140 (get_thread_context,set_thread_context,i386_thread_added): Update.
12141 (the_low_target): Add entries for insert_point,
12142 remove_point, stopped_by_watchpoint, stopped_data_address.
12143 * win32-low.c (win32_insert_watchpoint): New function.
12144 (win32_remove_watchpoint): New function.
12145 (win32_stopped_by_watchpoint): New function.
12146 (win32_stopped_data_address): New function.
12147 (win32_target_ops): Add entries for insert_watchpoint,
12148 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12149 * win32-low.h (win32_target_ops): New members insert_point,
12150 remove_point, stopped_by_watchpoint, stopped_data_address.
12152 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12154 * server.c (process_serial_event): Re-return unsupported, not
12155 error, if the type isn't recognized. Re-allow supporting only
12156 insert or remove packets. Also call require_running for
12157 breakpoints. Add missing break statement to default case. Tidy.
12158 * target.h (struct target_ops): Rename insert_watchpoint to
12159 insert_point, and remove_watchpoint to remove_point.
12161 * linux-low.h (struct linux_target_ops): Likewise.
12162 * linux-low.c (linux_insert_watchpoint): Rename to ...
12163 (linux_insert_point): ... this. Adjust.
12164 (linux_remove_watchpoint): Rename to ...
12165 (linux_remove_point): ... this. Adjust.
12166 (linux_target_ops): Adjust.
12167 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12168 (cris_insert_point): ... this.
12169 (cris_remove_watchpoint): Rename to ...
12170 (cris_remove_point): ... this.
12171 (the_low_target): Adjust.
12173 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12175 * server.c (handle_v_kill): Pass signal_pid to
12176 kill_inferior if multi_process is zero.
12178 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12180 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12181 * target.h (target_ops): Comment for *_watchpoint to make it clear
12182 the functions can get types '0' and '1'.
12184 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12186 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12187 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12188 * regcache.c (get_regcache): Likewise.
12189 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12190 * win32-low.c (child_fetch_inferior_registers): Remove check for
12193 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12194 Pedro Alves <pedro@codesourcery.com>
12196 * target.h (struct target_ops) <supports_multi_process>: New
12198 (target_supports_multi_process): New.
12199 * server.c (handle_query): Even if GDB reports support, only
12200 enable multi-process if the target also supports it. Report
12201 multi-process support only if the target backend supports it.
12202 * linux-low.c (linux_supports_multi_process): New function.
12203 (linux_target_ops): Install it as target_supports_multi_process
12206 2009-05-24 Doug Evans <dje@google.com>
12208 Global renaming of find_thread_pid to find_thread_ptid.
12209 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12210 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12211 All callers updated.
12213 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12214 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12217 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12218 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12219 (linux_resume_one_lwp): Ditto.
12221 2009-05-23 Doug Evans <dje@google.com>
12223 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12224 from struct inferior_list_entry * to struct lwp_info *.
12225 All callers updated.
12227 2009-05-13 Doug Evans <dje@google.com>
12229 * linux-x86-low.c: Don't include assert.h.
12230 (x86_siginfo_fixup): Use fatal, not assert.
12231 (x86_arch_setup): Fix comment.
12233 2009-05-12 Doug Evans <dje@google.com>
12235 Biarch support for i386/amd64 gdbserver.
12236 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12237 Add linux-x86-low.c.
12238 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12239 (linux-x86-low.o): Add.
12240 * linux-x86-64-low.c: Delete.
12241 * linux-i386-low.c: Delete.
12242 * linux-x86-low.c: New file.
12243 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12245 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12247 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12248 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12249 (linux_child_pid_to_exec_file): New function.
12250 (elf_64_header_p, elf_64_file_p): New functions.
12251 (siginfo_fixup): New function.
12252 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12253 give target a chance to convert layout.
12254 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12255 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12257 2009-05-07 Doug Evans <dje@google.com>
12259 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12260 (regsets_store_inferior_registers): Ditto.
12262 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12266 * linux-low.c (must_set_ptrace_flags): Delete.
12267 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12269 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12270 `lwp->must_set_ptrace_flags' instead.
12271 (linux_wait_for_event_1): Set ptrace options here.
12272 (linux_wait_1): ... not here.
12274 2009-04-30 Doug Evans <dje@google.com>
12276 * inferiors.c (started_inferior_callback): New function.
12277 (attached_inferior_callback): New function.
12278 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12279 * server.c (print_started_pid, print_attached_pid): New functions.
12280 (detach_or_kill_for_exit): New function.
12281 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12282 * server.h (have_started_inferiors_p): Declare.
12283 (have_attached_inferiors_p): Declare.
12285 * inferiors.c (remove_process): Fix memory leak, free process.
12286 * linux-low.c (linux_remove_process): New function.
12287 (linux_kill): Call it instead of remove_process.
12288 (linux_detach, linux_wait_1): Ditto.
12290 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12292 * configure.srv: Add x86 Windows CE target.
12294 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12296 * inferiors.c (get_thread_process): Make global.
12297 * server.h (get_thread_process): Add prototype.
12298 * thread-db.c (find_one_thread): Use get_thread_process
12299 instead of current_process.
12300 (thread_db_get_tls_address): Do not crash if called when
12301 thread layer is not yet initialized.
12303 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12305 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12306 * spu-low.c (current_tid): Rename to ...
12307 (current_ptid): ... this.
12308 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12309 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12310 ptid_get_lwp (current_ptid) instead of current_tid.
12311 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12312 instead of current_tid. Use find_process_pid to verify pid
12313 argument is valid. Pass proper argument to remove_process.
12314 (spu_thread_alive): Compare current_ptid instead of current_tid.
12315 (spu_resume): Likewise.
12317 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12319 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12322 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12324 Implement the multiprocess extensions, and add linux multiprocess
12327 * server.h (ULONGEST): Declare.
12328 (struct ptid, ptid_t): New.
12329 (minus_one_ptid, null_ptid): Declare.
12330 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12331 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12332 (struct inferior_list_entry): Change `id' type from unsigned from
12334 (struct sym_cache, struct breakpoint, struct
12335 process_info_private): Forward declare.
12336 (struct process_info): Declare.
12337 (current_process): Declare.
12338 (all_processes): Declare.
12339 (initialize_inferiors): Declare.
12340 (add_thread): Adjust to use ptid_t.
12341 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12342 (add_process, remove_process, find_thread_pid): Declare.
12343 (find_inferior_id): Adjust to use ptid_t.
12344 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12345 (multi_process): Declare.
12346 (push_event): Adjust to use ptid_t.
12347 (read_ptid, write_ptid): Declare.
12348 (prepare_resume_reply): Adjust to use ptid_t.
12349 (clear_symbol_cache): Declare.
12350 * inferiors.c (all_processes): New.
12351 (null_ptid, minus_one_ptid): New.
12352 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12353 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12354 (add_thread): Change unsigned long to ptid. Remove gdb_id
12356 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12357 (gdb_id_to_thread): Rename to ...
12358 (find_thread_pid): ... this. Change unsigned long to ptid.
12359 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12360 (loaded_dll, pull_pid_from_list): Adjust.
12361 (add_process, remove_process, find_process_pid)
12362 (get_thread_process, current_process, initialize_inferiors): New.
12363 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12364 (struct target_waitstatus) <related_pid>: Ditto.
12365 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12366 return type to int.
12367 (struct target_ops) <join>: Add `pid' argument.
12368 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12369 (struct target_ops) <wait>: Add `ptid' field. Change return type
12371 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12372 (mywait): Add `ptid' argument. Change return type to ptid_t.
12373 (target_pid_to_str): Declare.
12374 * target.c (set_desired_inferior): Adjust to use ptids.
12375 (mywait): Add new `ptid' argument. Adjust.
12376 (target_pid_to_str): New.
12377 * mem-break.h (free_all_breakpoints): Declare.
12378 * mem-break.c (breakpoints): Delelete.
12379 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12380 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12381 to use per-process breakpoint list.
12382 (free_all_breakpoints): New.
12383 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12384 (symbol_cache, all_symbols_looked_up): Delete.
12386 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12388 (prepare_resume_reply): Change ptid argument's type from unsigned
12389 long to ptid_t. Adjust. Implement W;process and X;process.
12390 (free_sym_cache, clear_symbol_cache): New.
12391 (look_up_one_symbol): Adjust to per-process symbol cache. *
12392 * server.c (cont_thread, general_thread, step_thread): Change type
12394 (attached): Delete.
12395 (multi_process): New.
12396 (last_ptid): Change type to ptid_t.
12397 (struct vstop_notif) <ptid>: Change type to ptid_t.
12398 (queue_stop_reply, push_event): Change `ptid' argument's type to
12400 (discard_queued_stop_replies): Add `pid' argument.
12401 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12402 changes. Don't reference the `attached' global.
12403 (attach_inferior): Adjust to mywait interface changes.
12404 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12405 features. Handle and report "multiprocess+". Handle
12407 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12409 (handle_v_kill): New.
12410 (handle_v_stopped): Adjust to use target_pid_to_str.
12411 (handle_v_requests): Allow multiple attaches and runs when
12412 multiprocess extensions are in effect. Handle "vKill".
12413 (myresume): Adjust to use ptids.
12414 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12415 (handle_status): Adjust to discard_queued_stop_replies interface
12417 (first_thread_of, kill_inferior_callback)
12418 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12419 (main): Call initialize_inferiors. Adjust to use ptids, killing
12420 and detaching from all inferiors. Handle multiprocess packet
12422 * linux-low.h: Include gdb_proc_service.h.
12423 (struct process_info_private): New.
12424 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12425 <lwpid_of>: Use ptid_get_lwp.
12426 (get_lwp_thread): Adjust.
12427 (struct lwp_info): Add `dead' member.
12428 (find_lwp_pid): Declare.
12429 * linux-low.c (thread_db_active): Delete.
12430 (new_inferior): Adjust comment.
12431 (inferior_pid): Delete.
12432 (linux_add_process): New.
12433 (handle_extended_wait): Adjust.
12434 (add_lwp): Change unsigned long to ptid.
12435 (linux_create_inferior): Add process to processes table. Adjust
12436 to use ptids. Don't set new_inferior here.
12437 (linux_attach_lwp): Rename to ...
12438 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12439 it. Adjust to use ptids.
12440 (linux_attach_lwp): New.
12441 (linux_attach): Add process to processes table. Don't set
12443 (struct counter): New.
12444 (second_thread_of_pid_p, last_thread_of_process_p): New.
12445 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12446 multiple processes.
12447 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12448 processes. Remove process from process table.
12449 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12450 to multiple processes.
12451 (any_thread_of): New.
12452 (linux_detach): Add `pid' argument, and handle it. Remove process
12453 from processes table.
12454 (linux_join): Add `pid' argument. Handle it.
12455 (linux_thread_alive): Change unsighed long argument to ptid_t.
12456 Consider dead lwps as not being alive.
12457 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12458 threads we're not interested in.
12459 (same_lwp, find_lwp_pid): New.
12460 (linux_wait_for_lwp): Change `pid' argument's type from int to
12462 (linux_wait_for_event): Rename to ...
12463 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12464 from int to ptid_t. Adjust.
12465 (linux_wait_for_event): New.
12466 (linux_wait_1): Add `ptid' argument. Change return type to
12467 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12468 that exit from the process table.
12469 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12471 (mark_lwp_dead): New.
12472 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12473 stopping all threads, mark its main lwp as dead.
12474 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12476 (fetch_register, usr_store_inferior_registers)
12477 (regsets_fetch_inferior_registers)
12478 (regsets_store_inferior_registers, linux_read_memory)
12479 (linux_write_memory): Inline `inferior_pid'.
12480 (linux_look_up_symbols): Adjust to use per-process
12481 `thread_db_active'.
12482 (linux_request_interrupt): Adjust to use ptids.
12483 (linux_read_auxv): Inline `inferior_pid'.
12484 (initialize_low): Don't reference thread_db_active.
12485 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12486 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12487 (ps_getpid): Return the pid of the current inferior.
12488 * thread-db.c (proc_handle, thread_agent): Delete.
12489 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12491 (find_one_thread): Change argument type to ptid_t. Adjust to
12493 (maybe_attach_thread): Adjust to per-process data and ptids.
12494 (thread_db_find_new_threads): Ditto.
12495 (thread_db_init): Ditto.
12496 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12497 processes table. Adjust to use ptids.
12498 (spu_kill, spu_detach): Adjust interface. Remove process from
12500 (spu_join, spu_thread_alive): Adjust interface.
12501 (spu_wait): Adjust interface. Remove process from processes
12502 table. Adjust to use ptids.
12503 * win32-low.c (current_inferior_tid): Delete.
12504 (current_inferior_ptid): New.
12505 (debug_event_ptid): New.
12506 (thread_rec): Take a ptid. Adjust.
12507 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12508 (child_delete_thread): Ditto.
12509 (do_initial_child_stuff): Add `attached' argument. Add process to
12511 (child_fetch_inferior_registers, child_store_inferior_registers):
12513 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12514 (win32_attach): Pass 1 to do_initial_child_stuff.
12515 (win32_kill): Adjust interface. Remove process from processes
12517 (win32_detach): Ditto.
12518 (win32_join): Adjust interface.
12519 (win32_thread_alive): Take a ptid.
12520 (win32_resume): Adjust to use ptids.
12521 (get_child_debug_event): Ditto.
12522 (win32_wait): Adjust interface. Remove exiting process from
12525 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12527 Non-stop mode support.
12529 * server.h (non_stop): Declare.
12530 (gdb_client_data, handler_func): Declare.
12531 (delete_file_handler, add_file_handler, start_event_loop):
12533 (handle_serial_event, handle_target_event, push_event)
12534 (putpkt_notif): Declare.
12535 * target.h (enum resume_kind): New.
12536 (struct thread_resume): Replace `step' field by `kind' field.
12537 (TARGET_WNOHANG): Define.
12538 (struct target_ops) <wait>: Add `options' argument.
12539 <supports_non_stop, async, start_non_stop>: New fields.
12540 (target_supports_non_stop, target_async): New.
12541 (start_non_stop): Declare.
12542 (mywait): Add `options' argument.
12543 * target.c (mywait): Add `options' argument. Print child exit
12544 notifications here.
12545 (start_non_stop): New.
12546 * server.c (non_stop, own_buf, mem_buf): New globals.
12547 (struct vstop_notif): New.
12548 (notif_queue): New global.
12549 (queue_stop_reply, push_event, discard_queued_stop_replies)
12550 (send_next_stop_reply): New.
12551 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12553 (attach_inferior): In non-stop mode, don't wait for the target
12555 (handle_general_set): Handle QNonStop.
12556 (handle_query): When handling qC, return the current general
12557 thread, instead of the first thread of the list.
12558 (handle_query): If the backend supports non-stop mode, include
12559 QNonStop+ in the qSupported query response.
12560 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12562 (handle_v_attach, handle_v_run): Handle non-stop mode.
12563 (handle_v_stopped): New.
12564 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12565 (myresume): Adjust to use resume_kind. Handle non-stop.
12566 (queue_stop_reply_callback): New.
12567 (handle_status): Handle non-stop mode.
12568 (main): Clear non_stop flag on reconnection. Use the event-loop.
12569 Refactor serial protocol handling from here ...
12570 (process_serial_event): ... to this new function. When GDB
12571 selects any thread, select one here. In non-stop mode, wait until
12572 GDB acks all pending events before exiting.
12573 (handle_serial_event, handle_target_event): New.
12574 * remote-utils.c (remote_open): Install remote_desc in the event
12576 (remote_close): Remove remote_desc from the event loop.
12577 (putpkt_binary): Rename to...
12578 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12579 (putpkt_binary): New as wrapper around putpkt_binary_1.
12580 (putpkt_notif): New.
12581 (prepare_resume_reply): In non-stop mode, don't change the
12583 * event-loop.c: New.
12584 * Makefile.in (OBJ): Add event-loop.o.
12585 (event-loop.o): New rule.
12587 * linux-low.h (pid_of): Moved here.
12589 (get_lwp_thread): Use lwpid_of.
12590 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12591 * linux-low.c (pid_of): Delete.
12592 (inferior_pid): Use lwpid_of.
12593 (linux_event_pipe): New.
12594 (target_is_async_p): New.
12596 (handle_extended_wait): Use lwpid_of.
12597 (add_lwp): Don't set lwpid field.
12598 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12599 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12600 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12601 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12602 first. Adjust to linux_wait_for_event interface changes. Use
12604 (linux_detach): Don't delete the main lwp here.
12605 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12606 (status_pending_p): Don't consider explicitly suspended lwps.
12607 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12608 pointer. Add OPTIONS argument. Change return type to int. Use
12609 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12610 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12611 pointer. Add status pointer argument. Return a pid instead of a
12612 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12613 changes. In non-stop mode, don't switch to a random thread.
12614 (linux_wait): Rename to...
12615 (linux_wait_1): ... this. Add target_options argument, and handle
12616 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12617 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12618 clean exit and signal exit code. Don't stop all threads in
12619 non-stop mode. In all-stop mode, only stop all threads when
12620 reporting a stop to GDB. Handle explicit thread stop requests.
12621 (async_file_flush, async_file_mark): New.
12623 (send_sigstop): Use lwpid_of.
12624 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12625 interface changes. In non-stop mode, don't switch to a random
12627 (linux_resume_one_lwp): Use lwpid_of.
12628 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12629 (linux_resume_one_thread): ... this. Handle resume_stop. In
12630 non-stop mode, don't look for pending flag in all threads.
12631 (resume_status_pending_p): Don't consider explicitly suspended
12633 (my_waitpid): Reimplement. Emulate __WALL.
12634 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12636 (sigchld_handler, linux_supports_non_stop, linux_async)
12637 (linux_start_non_stop): New.
12638 (linux_target_ops): Register linux_supports_non_stop, linux_async
12639 and linux_start_non_stop.
12640 (initialize_low): Install SIGCHLD handler.
12641 * thread-db.c (thread_db_create_event, find_one_thread)
12642 (thread_db_get_tls_address): Use lwpid_of.
12643 * win32-low.c (win32_detach): Adjust to use resume_kind.
12644 (win32_wait): Add `options' argument.
12645 * spu-low.c (spu_resume): Adjust to use resume_kind.
12646 (spu_wait): Add `options' argument.
12648 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12650 Decouple target code from remote protocol.
12652 * target.h (enum target_waitkind): New.
12653 (struct target_waitstatus): New.
12654 (struct target_ops) <wait>: Return an unsigned long. Take a
12655 target_waitstatus pointer instead of a char pointer.
12656 (mywait): Likewise.
12657 * target.c (mywait): Change prototype to return an unsigned long.
12658 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12659 * server.h (thread_from_wait, old_thread_from_wait): Delete
12661 (prepare_resume_reply): Change prototype to take a
12663 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12664 (last_status, last_ptid): New.
12665 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12666 pid instead of a signal.
12667 (attach_inferior): Remove "status" and "signal" parameters.
12669 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12671 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12672 (handle_v_requests, myresume): Remove "status" and "signal"
12673 parameters. Adjust.
12674 (handle_status): New.
12675 (main): Delete local `status'. Adjust.
12676 * remote-utils.c: Include target.h.
12677 (prepare_resume_reply): Change prototype to take a
12678 target_waitstatus. Adjust.
12680 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12682 * spu-low.c (spu_wait): Adjust.
12683 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12685 (win32_wait): Adjust.
12687 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12689 * target.h (struct thread_resume): Delete leave_stopped member.
12690 (struct target_ops): Add a `n' argument to the `resume' callback.
12691 * server.c (start_inferior): Adjust.
12692 (handle_v_cont, myresume): Adjust.
12693 * linux-low.c (check_removed_breakpoint): Adjust to resume
12694 interface change, and to removed leave_stopped field.
12695 (resume_ptr): Delete.
12696 (struct thread_resume_array): New.
12697 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12698 resume interface change.
12699 (linux_continue_one_thread, linux_queue_one_thread)
12700 (resume_status_pending_p): Check if the resume field is NULL
12701 instead of checking the leave_stopped member.
12702 (linux_resume): Adjust to the target resume interface change.
12703 * spu-low.c (spu_resume): Adjust to the target resume interface
12705 * win32-low.c (win32_detach, win32_resume): Ditto.
12707 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12709 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12711 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12713 (linux_continue_one_thread): Only preserve the stepping flag if
12714 there's a pending breakpoint.
12716 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12718 * server.c (main): After the inferior having exited, call
12719 remote_close before exiting gdbserver.
12721 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12723 Fix size of FPSCR in Power 7 processors.
12724 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12725 (PPC_FEATURE_HAS_DFP): New #define.
12726 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12729 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12731 * server.c (handle_query) Whitespace and formatting.
12733 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12735 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12736 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12737 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12738 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12739 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12740 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12741 Makefile.in, configure.ac: Fix whitespace throughout.
12742 * configure: Regenerate.
12744 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12746 * inferiors.c (find_inferior): Make it safe for the callback
12747 function to delete the currently iterated inferior.
12749 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12751 * Makefile.in (linuw_low_h): Move higher.
12752 (thread-db.o): Depend on $(linux_low_h).
12754 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12756 Rename "process" to "lwp" throughout.
12758 * linux-low.c (all_processes): Rename to...
12759 (all_lwps): ... this.
12760 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12761 (add_process): Rename to ...
12762 (add_lwp): ... this. Adjust.
12763 (linux_create_inferior): Adjust.
12764 (linux_attach_lwp): Adjust.
12765 (linux_attach): Adjust.
12766 (linux_kill_one_process): Rename to ...
12767 (linux_kill_one_lwp): ... this. Adjust.
12768 (linux_kill): Adjust.
12769 (linux_detach_one_process): Rename to ...
12770 (linux_detach_one_lwp): ... this. Adjust.
12771 (linux_detach): Adjust.
12772 (check_removed_breakpoint): Adjust.
12773 (status_pending_p): Adjust.
12774 (linux_wait_for_process): Rename to ...
12775 (linux_wait_for_lwp): ... this. Adjust.
12776 (linux_wait_for_event): Adjust.
12777 (send_sigstop): Adjust.
12778 (wait_for_sigstop): Adjust.
12779 (stop_all_processes): Rename to ...
12780 (stop_all_lwps): ... this.
12781 (linux_resume_one_process): Rename to ...
12782 (linux_resume_one_lwp): ... this. Adjust.
12783 (linux_set_resume_request, linux_continue_one_thread)
12784 (linux_queue_one_thread, resume_status_pending_p)
12785 (usr_store_inferior_registers, regsets_store_inferior_registers)
12786 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12788 * linux-low.h (get_process): Rename to ...
12789 (get_lwp): ... this. Adjust.
12790 (get_thread_process): Rename to ...
12791 (get_thread_lwp): ... this. Adjust.
12792 (get_process_thread): Rename to ...
12793 (get_lwp_thread): ... this. Adjust.
12794 (struct process_info): Rename to ...
12795 (struct lwp_info): ... this.
12796 (all_processes): Rename to ...
12797 (all_lwps): ... this.
12798 * proc-service.c (ps_lgetregs): Adjust.
12799 * thread-db.c (thread_db_create_event, find_one_thread)
12800 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12802 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12804 * server.c (handle_query): Handle "qAttached".
12806 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12808 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12809 GPLv3, update license URL.
12811 2009-03-01 Doug Evans <dje@google.com>
12813 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12814 (server_h): Add gdb_signals.h.
12815 (signals.o): Update.
12816 * server.h (target_signal_from_host,target_signal_to_host_p)
12817 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12819 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12821 * remote-utils.c (getpkt): Also generate remote-debug
12822 information if noack_mode is set.
12824 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12826 * server.c (handle_query): Report qXfer:siginfo:read and
12827 qXfer:siginfo:write as supported and handle them.
12828 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12829 * linux-low.c (linux_xfer_siginfo): New.
12830 (linux_target_ops): Set it.
12832 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12834 * server.c (gdbserver_usage): Mention --remote-debug.
12835 (main): Accept '--remote-debug' switch.
12837 2009-01-18 Doug Evans <dje@google.com>
12839 * regcache.c (new_register_cache): No need to check result of xcalloc.
12840 * server.c (handle_search_memory): Back out calls to xmalloc,
12841 result is checked and error is returned to user upon failure.
12842 (handle_query): Ditto. Add more checks for result of malloc.
12843 (handle_v_cont): Check result of malloc, report error back to
12845 (handle_v_run): Ditto. Call freeargv.
12846 * server.h (freeargv): Declare.
12847 * utils.c (freeargv): New fn.
12849 2009-01-15 Doug Evans <dje@google.com>
12851 * gdbreplay.c (perror_with_name): Make arg const char *.
12852 * server.h (target_signal_to_name): Make return type const char *.
12853 * thread-db.c (thread_db_err_str): Make return type const char *.
12854 * utils.c (perror_with_name): Make arg const char *.
12856 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12858 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12859 when handling a EXIT_PROCESS_DEBUG_EVENT.
12861 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12863 * gdbreplay.c (gdbreplay_version): Update copyright year.
12864 * server.c (gdbserver_version): Likewise.
12866 2009-01-05 Doug Evans <dje@google.com>
12868 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12869 (handle_extended_wait): Improve comment.
12871 2008-12-13 Doug Evans <dje@google.com>
12873 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12874 * server.h (ATTR_MALLOC): New macro.
12875 (xmalloc,xcalloc,xstrdup): Declare.
12876 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12877 * inferiors.c: Ditto.
12878 * linux-low.c: Ditto.
12879 * mem-break.c: Ditto.
12880 * regcache.c: Ditto.
12881 * remote-utils.c: Ditto.
12884 * win32-low.c: Ditto.
12886 2008-12-12 Doug Evans <dje@google.com>
12888 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12889 in debugging printf.
12891 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12893 2008-12-09 Doug Evans <dje@google.com>
12895 * linux-low.h (struct process_info): Delete member tid, unused.
12896 * thread-db.c (find_one_thread): Update.
12897 (maybe_attach_thread): Update.
12899 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12901 * target.h (struct target_ops): Add qxfer_osdata member.
12902 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12904 (linux_qxfer_osdata): New functions.
12905 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12907 * server.c (handle_query): Handle "qXfer:osdata:read:".
12908 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12909 (buffer_xml_printf): New functions.
12910 * server.h (struct buffer): New.
12911 (buffer_grow_str, buffer_grow_str0): New macros.
12912 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12913 (buffer_xml_printf): Declare.
12915 2008-11-24 Doug Evans <dje@google.com>
12917 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12919 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12921 * server.c (handle_v_run): Always use the supplied argument list.
12923 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12925 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12926 (xtensa_regmap_table): Add entry for scompare1.
12928 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12930 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12931 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12932 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12933 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12934 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12935 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12936 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12937 XML target descriptions.
12938 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12939 when inferior is running on an ISA 2.05 or later processor. Add
12940 special case to return offset for full 64-bit slot of FPSCR when
12943 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12945 * Makefile.in (SFILES, clean): Added sparc64 files.
12946 (reg-sparc64.o, reg-sparc64.c): New.
12947 * configure.srv (sparc*-*-linux*): New configuration.
12948 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12949 syscall arguments for SPARC.
12950 (regsets_store_inferior_registers): Likewise.
12951 * linux-sparc-low.c: New file.
12953 2008-10-21 Doug Evans <dje@google.com>
12955 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12956 (READLINE_DIR,READLINE_DEP): Delete.
12957 (INTERNAL_CFLAGS): Update.
12958 (LINTFLAGS): Update.
12960 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12962 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12963 whole argv from the last run, not just argv[0].
12965 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12967 * regcache.c (new_register_cache): Return NULL if the register
12968 cache size isn't known yet.
12969 (free_register_cache): Avoid dereferencing a NULL regcache.
12971 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12973 * configure.srv: Merge MIPS and MIPS64.
12975 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12977 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12979 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12981 * Makefile.in: Add required vsx dependencies.
12983 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12984 Declare init_registers_powerpc_vsx32l.
12985 Declare init_registers_powerpc_vsx64l.
12986 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12987 (ppc_arch_setup): Check for VSX in hwcap.
12988 (ppc_fill_vsxregset): New function.
12989 (ppc_store_vsxregset): New function.
12990 Add new VSX entry in regset_info target_regsets.
12992 * configure.srv: Add new VSX dependencies.
12994 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12996 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12997 (remote_open): Set or clear transport_is_reliable.
12998 (putpkt_binary): Don't expect acks in noack mode.
12999 (getpkt): Don't send ack/nac in noack mode.
13000 * server.c (handle_general_set): Handle QStartNoAckMode.
13001 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13003 (main): Reset noack_mode on every connection.
13004 * server.h (noack_mode): Declare.
13006 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13008 * Makefile.in (GDBREPLAY_OBS): New variable.
13009 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13011 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13012 Daniel Jacobowitz <dan@codesourcery.com>
13014 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13015 (usr_store_inferior_registers): Likewise.
13016 (regsets_store_inferior_registers): Likewise.
13018 2008-07-31 Rolf Jansen <rj@surtec.com>
13019 Pedro Alves <pedro@codesourcery.com>
13021 * configure.ac: Check for memmem declaration.
13022 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13023 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13024 (disable_packet_qfThreadInfo): Unconditionally compile.
13025 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13026 * configure, config.in: Regenerate.
13028 2008-07-28 Doug Kwan <dougkwan@google.com>
13030 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13031 (linux_write_memory): Remove declaration of errno.
13033 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13035 * linux-low.c (handle_extended_wait): Do not use "status"
13036 variable uninitialized.
13038 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13040 * server.c (handle_v_attach): Inhibit reporting dll changes.
13042 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13044 * remote-utils.c (prepare_resume_reply): If requested, don't
13045 output "thread:TID" in the T stop reply.
13047 * server.c (disable_packet_vCont, disable_packet_Tthread)
13048 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13049 (handle_query): If requested, disable support for qC, qfThreadInfo
13051 (handle_v_requests): If requested, disable support for vCont.
13052 (gdbserver_show_disableable): New.
13053 (main): Handle --disable-packet and --disable-packet=LIST.
13055 * server.h (disable_packet_vCont, disable_packet_Tthread)
13056 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13058 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13060 * server.c (gdbserver_usage): Mention --version.
13062 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13064 * Makefile.in (gdbreplay.o): New rule.
13066 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13068 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13069 message, not gdbserver.
13071 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13072 Nathan Sidwell <nathan@codesourcery.com>
13073 Joseph Myers <joseph@codesourcery.com>
13075 * acinclude.m4: Include ../../config/acx.m4.
13076 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13077 * configure, config.in: Regenerate.
13078 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13079 * server.c (gdbserver_version): Print PKGVERSION.
13080 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13081 (main): Adjust gdbserver_usage calls.
13082 * gdbreplay.c (version, host_name): Add declarations.
13083 (gdbreplay_version, gdbreplay_usage): New.
13084 (main): Accept --version and --help options.
13086 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13088 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13089 (arm_breakpoint_at): Handle Thumb.
13090 (the_low_target): Add comment.
13092 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13094 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13096 2008-05-09 Doug Evans <dje@google.com>
13098 * server.h (decode_search_memory_packet): Declare.
13099 * remote-utils.c (decode_search_memory_packet): New fn.
13100 * server.c (handle_search_memory_1): New fn.
13101 (handle_search_memory): New fn.
13102 (handle_query): Process qSearch:memory packets.
13104 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13106 * regcache.c (registers_length): Remove.
13107 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13108 full register packet.
13109 * regcache.h (registers_length): Remove prototype.
13110 * server.h (PBUFSIZ): Define to 16384.
13112 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13114 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13115 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13116 powerpc-64l.o, and powerpc-altivec64l.o.
13117 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13118 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13119 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13120 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13121 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13124 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13125 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13126 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13127 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13128 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13129 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13130 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13131 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13132 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13133 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13136 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13137 (init_registers_powerpc_32l): ... this new prototype.
13138 (init_registers_powerpc_32): Remove, replace by ...
13139 (init_registers_powerpc_altivec32l): ... this new prototype.
13140 (init_registers_powerpc_e500): Remove, replace by ...
13141 (init_registers_powerpc_e500l): ... this new prototype.
13142 (init_registers_ppc64): Remove, replace by ...
13143 (init_registers_powerpc_64l): ... this new prototype.
13144 (init_registers_powerpc_64): Remove, replace by ...
13145 (init_registers_powerpc_altivec64l): ... this new prototype.
13146 (ppc_num_regs): Set to 73.
13147 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13148 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13149 (ppc_cannot_store_register): Handle orig_r3 and trap.
13150 (ppc_arch_setup): Update init_registers_... calls.
13151 (ppc_fill_gregset): Handle orig_r3 and trap.
13153 * inferiors.c (clear_inferiors): Reset current_inferior.
13155 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13157 * acinclude.m4: Add override.m4.
13158 * configure: Regenerate.
13160 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13162 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13163 initial call to init_register_ppc64.
13165 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13167 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13168 single powerpc*-*-linux* case.
13169 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13171 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13173 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13174 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13176 * linux-ppc-low.c: Include <elf.h>.
13177 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13178 (ppc_hwcap): New global variable.
13179 (ppc_regmap): Remove __SPE__ #ifdef sections.
13180 (ppc_regmap_e500): New global variable.
13181 (ppc_cannot_store_register): Update __SPE__ special case.
13182 (ppc_get_hwcap): New function.
13183 (ppc_arch_setup): Use it to determine whether inferior supports
13184 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13185 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13186 Do not access registers if target does not support AltiVec.
13187 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13188 Do not access registers if target does not support SPE.
13189 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13191 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13193 * linux-low.c (disabled_regsets, num_regsets): New.
13194 (use_regsets_p): Delete.
13195 (linux_wait_for_process): Clear disabled_regsets.
13196 (regsets_fetch_inferior_registers): Check and set it.
13197 (regsets_store_inferior_registers): Likewise.
13198 (linux_fetch_registers, linux_store_registers): Do not use
13200 (initialize_low): Allocate disabled_regsets.
13202 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13204 * Makefile.in (LIBOBJS): New.
13205 (OBS): Use LIBOBJS.
13206 (memmem.o): New rule.
13207 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13208 * configure: Regenerated.
13210 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13212 * server.c (handle_query): Never return "unsupported" for
13213 qXfer:features:read queries.
13215 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13217 * server.c (get_features_xml): Fix inverted condition.
13218 (handle_query): Always support qXfer:feature:read.
13220 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13222 * server.c (wrapper_argv): New.
13223 (start_inferior): Handle wrapper_argv. If set, expect an extra
13225 (gdbserver_usage): Document --wrapper.
13226 (main): Parse --wrapper.
13228 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13230 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13231 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13232 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13233 (ppc_set_pc): Likewise.
13234 (ppc_arch_setup): New function.
13235 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13236 of collect_register.
13237 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13239 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13241 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13242 instead of linux-ppc64-low.o.
13243 * linux-ppc64-low.c: Remove file.
13244 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13245 (linux-ppc64-low.o): Remove rule.
13247 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13248 (init_registers_powerpc_64): Likewise.
13249 (ppc_regmap): Conditionally define depending on __powerpc64__.
13250 (ppc_cannot_store_register): Do not special-case "fpscr" when
13251 compiled on __powerpc64__.
13252 (ppc_collect_ptrace_register): New function.
13253 (ppc_supply_ptrace_register): New function.
13254 (ppc_breakpoint): Change type to "unsigned int".
13255 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13256 (the_low_target): Conditionally provide initializers for the
13257 arch_setup member depending on __powerpc64__. Install
13258 collect_ptrace_register and supply_ptrace_register members.
13260 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13262 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13263 * server.c (gdbserver_xmltarget): Define.
13264 (get_features_xml): Use it to replace "target.xml" and arch_string.
13266 * configure.srv: Remove srv_xmltarget. Add XML files that were
13267 mentioned there to srv_xmlfiles instead. Remove conditional tests
13268 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13269 srv_xmlfiles and srv_regobj to include all possible choices.
13270 * configure.ac (srv_xmltarget): Remove.
13271 (srv_xmlfiles): Do not add "target.xml".
13272 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13273 checks for supplementary target information.
13274 * configure: Regenerate.
13275 * Makefile.in (XML_TARGET): Remove.
13276 (target.xml): Remove rule.
13277 (clean): Do not clean up target.xml.
13278 (.PRECIOUS): Do not mention target.xml.
13280 * target.h (struct target_ops): Remove arch_string member.
13281 * linux-low.c (linux_arch_string): Remove.
13282 (linux_target_ops): Remove arch_string initializer.
13283 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13284 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13285 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13286 * spu-low.c (spu_arch_string): Remove.
13287 (spu_target_ops): Remove arch_string initializer.
13288 * win32-low.c (win32_arch_string): Remove.
13289 (win32_target_ops): Remove arch_string initializer.
13290 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13291 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13292 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13294 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13296 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13297 by collect_ptrace_register and supply_ptrace_register hooks.
13298 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13299 instead of checking for the_low_target.left_pad_xfer.
13300 (usr_store_inferior_registers): Use collect_ptrace_register callback
13301 instead of checking for the_low_target.left_pad_xfer.
13303 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13304 (s390_supply_ptrace_register): Likewise.
13305 (s390_fill_gregset): Call s390_collect_ptrace_register.
13306 (the_low_target): Update.
13308 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13309 (ppc_supply_ptrace_register): Likewise.
13310 (the_low_target): Update.
13312 * linux-i386-low.c (the_low_target): Update.
13313 * linux-x86-64-low.c (the_low_target): Update.
13315 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13317 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13318 reg-s390.o and reg-s390x.o.
13320 * linux-low.c (new_inferior): New global variable.
13321 (linux_create_inferior, linux_attach): Set it.
13322 (linux_wait_for_process): Call the_low_target.arch_setup after the
13323 target has stopped for the first time.
13324 (initialize_low): Do not call the_low_target.arch_setup.
13326 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13327 (s390_set_pc): Likewise.
13328 (s390_arch_setup): New function.
13329 (the_low_target): Use s390_arch_setup as arch_setup routine.
13331 * regcache.c (realloc_register_cache): New function.
13332 (set_register_cache): Call it for each existing regcache.
13334 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13336 * server.h (init_registers): Remove prototype.
13338 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13339 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13340 instead of init_registers ().
13341 * linux-arm-low.c (init_registers_arm): Add prototype.
13342 (init_registers_arm_with_iwmmxt): Likewise.
13343 (the_low_target): Add initializer for arch_setup field.
13344 * linux-cris-low.c (init_registers_cris): Add prototype.
13345 (the_low_target): Add initializer for arch_setup field.
13346 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13347 (the_low_target): Add initializer for arch_setup field.
13348 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13349 (the_low_target): Add initializer for arch_setup field.
13350 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13351 (the_low_target): Add initializer for arch_setup field.
13352 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13353 (the_low_target): Add initializer for arch_setup field.
13354 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13355 (the_low_target): Add initializer for arch_setup field.
13356 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13357 (init_registers_mips64_linux): Likewise.
13358 (the_low_target): Add initializer for arch_setup field.
13359 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13360 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13361 (the_low_target): Add initializer for arch_setup field.
13362 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13363 (init_registers_powerpc_64): Likewise.
13364 (the_low_target): Add initializer for arch_setup field.
13365 * linux-s390-low.c (init_registers_s390): Add prototype.
13366 (init_registers_s390x): Likewise.
13367 (the_low_target): Add initializer for arch_setup field.
13368 * linux-sh-low.c (init_registers_sh): Add prototype.
13369 (the_low_target): Add initializer for arch_setup field.
13370 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13371 (the_low_target): Add initializer for arch_setup field.
13372 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13373 (the_low_target): Add initializer for arch_setup field.
13375 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13376 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13377 instead of init_registers ().
13378 * win32-arm-low.c (init_registers_arm): Add prototype.
13379 (the_low_target): Add initializer for arch_setup field.
13380 * win32-i386-low.c (init_registers_i386): Add prototype.
13381 (the_low_target): Add initializer for arch_setup field.
13383 * spu-low.c (init_registers_spu): Add prototype.
13384 (initialize_low): Call initialie_registers_spu () instead of
13385 initialize_registers ().
13387 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13389 * server.c (handle_v_requests): When handling the vRun and vAttach
13390 packets, if already debugging a process, don't kill it. Return an
13393 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13395 * server.c (handle_query): Correct length check.
13397 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13399 * win32-low.c (do_initial_child_stuff): Add process handle
13400 parameter. Set current_process_handle and current_process_id from the
13401 parameters. Clear globals.
13402 (win32_create_inferior): Don't set current_process_handle and
13403 current_process_id here. Instead pass them on the call to
13404 do_initial_child_stuff.
13405 (win32_attach): Likewise.
13406 (win32_clear_inferiors): New.
13407 (win32_kill): Don't close the current process handle or the
13408 current thread handle here. Instead call win32_clear_inferiors.
13409 (win32_detach): Don't open a new handle to the process. Call
13410 win32_clear_inferiors.
13411 (win32_join): Don't rely on current_process_handle; open a new
13412 handle using the process id.
13413 (win32_wait): Call win32_clear_inferiors when the inferior process
13416 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13418 * server.c (monitor_show_help): Add "exit".
13420 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13422 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13423 (clean): Add reg-xtensa.c.
13424 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13425 * configure.srv (xtensa*-*-linux*) New target.
13426 * linux-xtensa-low.c: New.
13427 * xtensa-xtregs.c: New.
13429 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13431 * hostio.c: Don't include errno.h.
13432 (errno_to_fileio_errno): Move to hostio-errno.
13433 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13434 error number outputting to the target->hostio_last_error callback.
13435 (hostio_packet_error): Use FILEIO_EINVAL directly.
13436 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13437 calls to hostio_error.
13438 * hostio-errno.c: New.
13439 * server.h (hostio_last_error_from_errno): Declare.
13440 * target.h (target_ops): Add hostio_last_error member.
13441 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13442 as hostio_last_error handler.
13443 * spu-low.c (spu_target_ops): Likewise.
13444 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13445 (wince_hostio_last_error): New functions.
13446 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13447 as hostio_last_error handler.
13448 (win32_target_ops) [!_WIN32_WCE]: Register
13449 hostio_last_error_from_errno as hostio_last_error handler.
13450 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13451 (hostio-errno.o): New rule.
13452 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13453 * configure.srv (srv_hostio_err_objs): New variable. Default to
13455 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13456 * configure: Regenerate.
13458 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13460 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13461 (linux_kill, linux_detach): Clean up the process list.
13462 * remote-utils.c (remote_open): Improve port number parsing.
13463 (putpkt_binary, input_interrupt): Only send interrupts if the target
13465 * server.c (extended_protocol): Make static.
13466 (attached): Define earlier.
13467 (exit_requested, response_needed, program_argv): New variables.
13468 (target_running): New.
13469 (start_inferior): Clear attached here.
13470 (attach_inferior): Set attached here.
13471 (require_running): Define.
13472 (handle_query): Use require_running and target_running. Implement
13474 (handle_v_attach, handle_v_run): New.
13475 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13476 (gdbserver_usage): Update.
13477 (main): Redo argument parsing. Handle --debug and --multi. Handle
13478 --attach along with other options or after the port. Save
13479 program_argv. Support no initial program. Resynchronize
13480 communication with GDB after an error. Handle "monitor exit".
13481 Use require_running and target_running. Always allow the extended
13482 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13483 restart in extended mode.
13484 * README: Refer to the GDB manual. Update --attach usage.
13486 2007-12-20 Andreas Schwab <schwab@suse.de>
13488 * linux-low.c (STACK_SIZE): Define.
13489 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13490 (linux_test_for_tracefork): Likewise.
13492 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13494 * linux-low.c (linux_wait_for_event): Update messages. Do not
13495 reinsert auto-delete breakpoints.
13496 * mem-break.c (struct breakpoint): Change return type of handler to
13498 (set_breakpoint_at): Update handler type.
13499 (reinsert_breakpoint_handler): Return 1 instead of calling
13501 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13503 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13504 * mem-break.h (set_breakpoint_at): Update handler type.
13505 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13506 * win32-low.c (auto_delete_breakpoint): New.
13507 (get_child_debug_event): Use it.
13509 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13511 * configure.ac: Check for pread and pwrite.
13512 * hostio.c (handle_pread): Fall back to lseek and read.
13513 (handle_pwrite): Fall back to lseek and write.
13514 * config.in, configure: Regenerated.
13516 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13518 * server.c (myresume): Add own_buf argument.
13519 (main): Update calls.
13521 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13523 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13524 * remote-utils.c (remote_open): Do not call disable_async_io.
13525 (block_async_io): Delete.
13526 (unblock_async_io): Make static.
13527 (initialize_async_io): New.
13528 * server.c (handle_v_cont): Handle async I/O here.
13529 (myresume): Likewise. Move other common resume tasks here...
13530 (main): ... from here. Call initialize_async_io. Disable async
13531 I/O before the main loop.
13532 * server.h (initialize_async_io): Declare.
13533 (block_async_io, unblock_async_io): Delete prototypes.
13534 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13536 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13538 * remote-utils.c (readchar): Allow binary data in received messages.
13540 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13542 * win32-low.c (attaching): New global.
13543 (win32_create_inferior): Clear the `attaching' global.
13544 (win32_attach): Set the `attaching' global.
13545 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13546 attaching. Only set a breakpoint at the entry point if not
13549 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13551 * server.c (main): Don't report dll events on the initial
13552 connection on attaches.
13554 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13556 * server.c (main): Relax numerical bases supported for the pid of
13557 the --attach command line argument.
13559 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13561 * win32-low.c (win32_attach): Call OpenProcess before
13562 DebugActiveProcess, not after. Add last error output to error
13565 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13567 * win32-low.c (win32_get_thread_context)
13568 (win32_set_thread_context): New functions.
13569 (thread_rec): Use win32_get_thread_context.
13570 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13571 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13574 2007-12-03 Leo Zayas
13575 Pedro Alves <pedro_alves@portugalmail.pt>
13577 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13579 (child_add_thread): Minor cleanup.
13580 (child_continue): Resume artificially suspended threads before
13581 calling ContinueDebugEvent.
13582 (suspend_one_thread): New.
13583 (fake_breakpoint_event): New.
13584 (get_child_debug_event): Change return type to int. Check here if
13585 gdb sent an interrupt request. If a soft interrupt was requested,
13586 fake a breakpoint event. Return 0 if there is no event to handle,
13588 (win32_wait): Don't check here if gdb sent an interrupt request.
13589 Ensure there is a valid event to handle.
13590 (win32_request_interrupt): Add soft interruption method as last
13593 2007-12-03 Leo Zayas
13594 Pedro Alves <pedro_alves@portugalmail.pt>
13596 * win32-low.h (win32_thread_info): Add descriptions to the
13597 structure members. Replace `suspend_count' counter by a
13599 * win32-low.c (thread_rec): Update condition of when to get the
13600 context from the inferior. Rely on ContextFlags being set if it
13601 has already been retrieved. Only suspend the inferior thread if
13602 we haven't already. Warn if that fails.
13603 (continue_one_thread): s/suspend_count/suspended/. Only call
13604 ResumeThread once. Warn if that fails.
13606 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13608 * win32-low.c (win32_wait): Don't read from the inferior when it
13609 has already exited.
13611 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13613 * Makefile.in (win32_low_h): New variable.
13614 (win32-low.o): Add dependency on $(win32_low_h).
13615 (win32-arm-low.o, win32-i386-low.o): New rules.
13617 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13619 * hostio.c: Correct copyright year.
13621 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13623 * Makefile.in (OBS): Add hostio.o.
13624 (hostio.o): New rule.
13625 * server.h (handle_vFile): Declare.
13626 * hostio.c: New file.
13627 * server.c (handle_v_requests): Take packet_len and new_packet_len
13628 for binary packets. Call handle_vFile.
13629 (main): Update call to handle_v_requests.
13631 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13633 * linux-low.c: Include <sched.h>.
13635 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13637 * linux-low.c (linux_tracefork_grandchild): New.
13638 (linux_tracefork_child): Use clone.
13639 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13641 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13643 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13645 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13647 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13649 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13651 * inferiors.c (change_inferior_id): Delete.
13652 (add_pid_to_list, pull_pid_from_list): New.
13653 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13654 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13655 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13656 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13657 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13658 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13659 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13660 (using_threads): Always set to 1.
13661 (handle_extended_wait): New.
13662 (add_process): Do not set TID.
13663 (linux_create_inferior): Set must_set_ptrace_flags.
13664 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13665 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13666 (linux_thread_alive): Rename TID argument to LWPID.
13667 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13668 (linux_wait_for_event): Do not use TID or check using_threads. Update
13669 call to dead_thread_notify. Call handle_extended_wait.
13670 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13671 (send_sigstop): Delete sigstop_sent.
13672 (wait_for_sigstop): Avoid TID.
13673 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13674 (linux_test_for_tracefork): New.
13675 (linux_lookup_signals): Use thread_db_active and
13676 linux_supports_tracefork_flag.
13677 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13678 * linux-low.h (get_process_thread): Avoid TID.
13679 (struct process_ifo): Move thread_known and tid to the end. Remove
13681 (linux_attach_lwp, thread_db_init): Update prototypes.
13682 * server.h (change_inferior_id): Delete prototype.
13683 (add_pid_to_list, pull_pid_from_list): New prototypes.
13684 * thread-db.c (thread_db_use_events): New.
13685 (find_first_thread): Rename to...
13686 (find_one_thread): ...this. Update callers and messages. Do not
13687 call fatal. Check thread_db_use_events. Do not call
13688 change_inferior_id or new_thread_notify.
13689 (maybe_attach_thread): Update. Do not call new_thread_notify.
13690 (thread_db_init): Set thread_db_use_events. Check use_events.
13691 * utils.c (fatal, warning): Correct message prefix.
13693 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13695 * Makefile.in (clean): Remove new files.
13696 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13697 (powerpc-64.o, powerpc-64.c): New rules.
13698 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13699 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13701 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13703 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13704 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13705 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13706 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13707 (target_regsets): Add AltiVec and SPE register sets.
13708 * configure.ac: Check for AltiVec and SPE.
13709 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13710 (ppc_fill_vrregset, ppc_store_vrregset): New.
13711 (target_regsets): Add AltiVec register set.
13712 * configure: Regenerated.
13714 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13716 * linux-low.c (O_LARGEFILE): Define.
13717 (linux_read_memory): Use /proc/PID/mem.
13718 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13719 * configure, config.in: Regenerated.
13721 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13723 * linux-low.c (linux_wait_for_event): Do not pass signals while
13726 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13728 * win32-low.c (create_process): New.
13729 (win32_create_inferior): Use create_process instead of
13730 CreateProcess. If create_process failed retry appending an ".exe"
13731 suffix. Store the GetLastError result immediatelly after
13732 create_process calls and use it on the call to error.
13734 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13736 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13738 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13740 * configure.ac: Switch license to GPLv3.
13742 2007-08-01 Michael Snyder <msnyder@access-company.com>
13744 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13746 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13748 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13750 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13751 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13752 CloseToolhelp32Snapshot.
13753 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13754 CloseToolhelp32Snapshot.
13756 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13758 * server.c (main): Check for inferior exit before main loop.
13760 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13762 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13763 instead of on tmp_desc.
13765 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13766 Daniel Jacobowitz <dan@codesourcery.com>
13768 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13769 (add_thread): Minor cleanups.
13770 (clear_inferiors): Move lower in the file. Clear the DLL
13772 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13773 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13774 (xml_escape_text): New.
13775 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13777 (handle_v_cont): Report errors.
13778 (gdbserver_version): Update.
13779 (main): Correct size of own_buf. Do not report initial DLL events.
13780 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13781 (unloaded_dll, xml_escape_text): New.
13782 * win32-low.c (enum target_waitkind): Update comments.
13783 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13784 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13785 (win32_EnumProcessModules, win32_GetModuleInformation)
13786 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13787 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13788 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13789 (win32_Module32First, win32_Module32Next, load_toolhelp)
13790 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13791 (get_child_debug_event): Handle DLL events.
13792 (win32_wait): Likewise.
13794 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13796 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13797 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13799 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13801 * win32-low.c (handle_output_debug_string): Ignore event if not
13804 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13806 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13808 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13810 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13812 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13814 * inferiors.c (change_inferior_id): Add comment.
13815 * linux-low.c (check_removed_breakpoint): Add an early
13816 prototype. Improve debug output.
13817 (linux_attach): Doc update.
13818 (linux_detach_one_process, linux_detach): Clean up before releasing
13820 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13821 * linux-low.h (struct process_info): Doc improvement.
13822 * mem-break.c (delete_all_breakpoints): New.
13823 * mem-break.h (delete_all_breakpoints): New prototype.
13824 * thread-db.c (find_first_thread): New.
13825 (thread_db_create_event): Call it instead of
13826 thread_db_find_new_threads. Clean up unused variables.
13827 (maybe_attach_thread): Remove first thread handling.
13828 (thread_db_find_new_threads): Use find_first_thread.
13829 (thread_db_get_tls_address): Likewise.
13831 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13833 * thread-db.c (thread_db_find_new_threads): Add prototype.
13834 (thread_db_create_event): Check for the main thread before adding
13836 (maybe_attach_thread): Only enable event reporting if TID == 0.
13837 (thread_db_get_tls_address): Check for new threads.
13839 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13841 * linux-low.c (linux_create_inferior): Try execv before execvp.
13842 * spu-low.c (spu_create_inferior): Likewise.
13844 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13846 * linux-low.c (linux_create_inferior): Change execv to execvp.
13847 * spu-low.c (spu_create_inferior): Likewies.
13849 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13851 * Makefile.in (clean): Clean new files instead of deleted ones.
13852 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13853 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13855 * configure.srv: Specify XML files and new regformats for MIPS and
13857 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13858 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13859 an entry for the restart register.
13860 (mips_cannot_fetch_register, mips_cannot_store_register)
13861 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13862 register names to match the XML descriptions.
13863 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13864 restart register instead of $0.
13866 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13867 Markus Deuling <deuling@de.ibm.com>
13869 * remote-utils.c (decode_xfer_write): New function.
13870 * server.h (decode_xfer_write): Add prototype.
13871 * server.c (handle_query): Add PACKET_LEN argument. Support
13872 qXfer:spu:read and qXfer:spu:write packets.
13873 (main): Pass packet_len to handle_query.
13874 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13875 * target.h (target_ops): Add qxfer_spu.
13877 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13879 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13880 accessing non-seekable spufs files.
13882 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13884 * server.c (handle_query): Add reply for qC packet.
13886 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13887 Leo Zayas <lerele@champenstudios@com>
13889 * server.h (check_remote_input_interrupt_request): New function.
13890 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13891 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13892 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13893 (check_remote_input_interrupt_request): New function.
13894 * server.h (check_remote_input_interrupt_request): Declare.
13895 * win32-low.c (winapi_DebugBreakProcess,
13896 winapi_GenerateConsoleCtrlEvent): New typedefs.
13897 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13899 (win32_wait): Check for remote interrupt request
13900 with check_remote_input_interrupt_request.
13901 (win32_request_interrupt): New function.
13902 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13904 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13906 * win32-low.c (debug_registers_changed,
13907 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13908 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13909 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13910 (thread_rec): Get context using the low target.
13911 (child_add_thread): Call thread_added on the low target,
13912 which does the same thing.
13914 (do_initial_child_stuff): Remove debug registers references.
13915 Set context using the low target. Resume threads after
13916 setting the contexts.
13917 (child_continue): Remove dead variable. Remove debug
13918 registers references.
13919 (child_fetch_inferior_registers): Go through the low target.
13920 (do_child_store_inferior_registers): Remove.
13921 (child_store_inferior_registers): Go through the low target.
13922 (win32_resume): Remove debug registers references.
13923 Set context using the low target.
13924 (handle_exception): Change return type to void. Don't record
13925 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13926 first chance exception.
13927 (get_child_debug_event): Change return type to void. Remove
13928 goto loop. Always return after waiting for debug event.
13929 (win32_wait): Convert to switch statement. Handle spurious
13932 * win32-i386-low.c (debug_registers_changed,
13933 debug_registers_used): New.
13934 (initial_stuff): Rename to ...
13935 (i386_initial_stuff): ... this. Clear debug registers
13937 (store_debug_registers): Delete.
13938 (i386_get_thread_context): New.
13939 (load_debug_registers): Delete.
13940 (i386_set_thread_context): New.
13941 (i386_thread_added): New.
13942 (single_step): Rename to ...
13943 (i386_single_step): ... this.
13944 (do_fetch_inferior_registers): Rename to ...
13945 (i386_fetch_inferior_register): ... this.
13946 (i386_store_inferior_register): New.
13947 (the_low_target): Adapt to new interface.
13949 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13950 (arm_get_thread_context): New.
13951 (arm_set_thread_context): New.
13953 (do_fetch_inferior_registers): Rename to ...
13954 (arm_fetch_inferior_register): ... this.
13955 (arm_store_inferior_register): New.
13956 (arm_wince_breakpoint): Reimplement as unsigned long.
13957 (arm_wince_breakpoint_len): Define.
13958 (the_low_target): Adapt to new interface.
13960 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13961 load_debug_registers. Add get_thread_context, set_thread_context,
13962 thread_added and store_inferior_register. Rename
13963 fetch_inferior_registers to fetch_inferior_register.
13964 (regptr): Remove declaration.
13966 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13968 * linux-low.c (linux_detach): Change return type to int. Return 0.
13969 * spu-low.c (spu_detach): Likewise.
13971 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13973 * target.h (target_ops): Change return type of detach to int.
13975 (join_inferior): New.
13976 * server.c (main): Don't skip detach support on mingw32.
13977 If the inferior doesn't support detaching return error.
13978 Call join_inferior instead of using waitpid.
13979 * linux-low.c (linux_join): New.
13980 (linux_target_op): Add linux_join.
13981 * spu-low.c (spu_join): New.
13982 (spu_target_ops): Add spu_join.
13983 * win32-low.c (win32_detach): Adapt to new interface.
13984 Reopen current_process_handle before detaching. Issue a child
13985 resume before detaching.
13987 (win32_target_op): Add win32_join.
13989 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13991 * win32-low.c (win32-attach): Fix return value.
13992 * target.h (target_ops): Describe ATTACH return values.
13994 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13996 * win32-low.c (GETPROCADDRESS): Define.
13997 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13998 (winapi_DebugSetProcessKillOnExit): Likewise.
13999 (win32_create_inferior): Force usage of ansi CreateProcessA.
14000 (win32_attach): Use GETPROCADDRESS.
14001 (win32_detach): Likewise.
14003 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14005 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14007 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14009 * win32-low.c: Commit leftover changes from 2007-03-29.
14011 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14013 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14014 fields short instead of int. Add explicit padding.
14015 (i387_cache_to_fsave): Remove unnecessary casts.
14016 (i387_fsave_to_cache): Doc fix.
14017 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14019 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14021 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14022 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14024 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14026 * configure.srv (arm*-*-mingw32ce*): Move near the other
14029 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14031 * configure.ac: Add errno checking.
14032 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14033 sys/file.h and malloc.h.
14034 (AC_CHECK_DECLS): Add perror.
14035 (srv_mingwce): Handle.
14036 * configure.srv (i[34567]86-*-cygwin*): Add
14037 win32-i386-low.o to srv_tgtobj.
14038 (i[34567]86-*-mingw*): Likewise.
14039 (arm*-*-mingw32ce*): Add case.
14040 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14041 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14042 [__MINGW32CE__] (strerror): New function.
14043 [__MINGW32CE__] (errno): Define to GetLastError.
14044 [__MINGW32CE__] (COUNTOF): New macro.
14045 (remote_open): Remove extra close call.
14046 * mem-break.c (delete_breakpoint_at): New function.
14047 * mem-break.h (delete_breakpoint_at): Declare.
14048 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14049 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14050 [USE_WIN32API] (read, write): Add char* casts.
14051 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14052 * server.h: Include wincecompat.h on Windows CE.
14053 [HAVE_ERRNO_H]: Check.
14054 (perror): Declare if not declared.
14055 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14056 (perror_with_name): Remove errno declaration.
14057 * wincecompat.h: New.
14058 * wincecompat.c: New.
14059 * win32-low.h: New.
14060 * win32-arm-low.c: New.
14061 * win32-i386-low.c: New.
14062 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14063 (OUTMSG2): Make it safe.
14065 (COUNTOF): New macro.
14066 (NUM_REGS): Get it from the low target.
14067 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14068 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14069 (thread_rec): Let low target handle debug registers.
14070 (child_add_thread): Likewise.
14071 (child_init_thread_list): Likewise.
14072 (continue_one_thread): Likewise.
14074 (do_child_fetch_inferior_registers): Move to ...
14075 * win32-i386-low.c: ... here, and rename to ...
14076 (do_fetch_inferior_registers): ... this.
14077 * win32-low.c (child_fetch_inferior_registers):
14078 Go through the low target.
14079 (do_child_store_inferior_registers): Use regptr.
14080 (strwinerror): New function.
14081 (win32_create_inferior): Handle Windows CE.
14082 Use strwinerror instead of strerror on Windows error
14083 codes. Add program to the error output.
14084 Don't close the main thread handle on Windows CE.
14085 (win32_attach): Use coredll.dll on Windows CE.
14086 (win32_kill): Close current process and current
14088 (win32_detach): Use coredll.dll on Windows CE.
14089 (win32_resume): Let low target handle debug registers, and
14091 (handle_exception): Add/Remove initial breakpoint. Avoid
14092 non-existant WSTOPSIG on Windows CE.
14093 (win32_read_inferior_memory): Cast to remove warning.
14094 (win32_arch_string): Go through the low target.
14095 (initialize_low): Call set_breakpoint_data with the low
14096 target's breakpoint.
14097 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14098 FOP_REGNUM, mappings): Move to ...
14099 * win32-i386-low.c: ... here.
14100 * win32-low.c (win32_thread_info): Move to ...
14101 * win32-low.h: ... here.
14102 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14103 win32-arm-low.c and wincecompat.c.
14104 (all:): Add $EXEEXT.
14105 (install-only:): Likewise.
14106 (gdbserver:): Likewise.
14107 (gdbreplay:): Likewise.
14108 * config.in: Regenerate.
14109 * configure: Regenerate.
14111 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14113 * win32-low.c: Rename typedef thread_info to
14114 win32_thread_info throughout.
14116 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14118 * win32-i386-low.c: Rename to ...
14119 * win32-low.c: ... this.
14120 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14121 * Makefile.in: Likewise.
14123 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14125 * remote-utils.c (monitor_output): Constify msg parameter.
14126 * server.h (monitor_output): Likewise.
14127 * win32-i386-low.c (handle_output_debug_string): New.
14128 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14129 handle_output_debug_string.
14130 (get_child_debug_event): Likewise.
14132 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14134 * server.c (main): Correct strtoul check.
14136 2007-03-27 Jon Ringle <jon@ringle.org>
14138 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14140 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14142 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14144 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14146 * terminal.h: Check HAVE_SGTTY_H.
14148 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14150 * remote-utils.c (remote_open): Print out the assigned port number.
14152 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14154 * remote-utils.c (monitor_output): New function.
14155 * server.c (debug_threads): Define here.
14156 (monitor_show_help): New function.
14157 (handle_query): Handle qRcmd.
14158 (main): Do not handle 'd' packet.
14159 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14160 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14163 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14165 * Makefile.in (EXEEXT): New.
14166 (clean): Use $(EXEEXT).
14168 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14170 * target.h (target_ops): Rename send_signal to request_interrupt,
14171 and remove enum target_signal parameter.
14172 * linux-low.c (linux_request_interrupt): Rename from
14173 linux_send_signal, and always send SIGINT.
14174 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14175 and always send SIGINT.
14176 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14178 (input_interrupt): Likewise.
14180 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14182 * server.c (get_features_xml): Check if target implemented
14184 * win32-i386-low.c (win32_arch_string): New.
14185 (win32_target_ops): Add win32_arch_string as arch_string member.
14187 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14189 * spu-low.c (spu_arch_string): New.
14190 (spu_target_ops): Add spu_arch_string.
14192 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14194 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14195 * configure.ac: Do not check for terminal.h.
14196 * configure, config.in: Regenerated.
14198 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14200 * Makefile.in (OBS): Add $(XML_BUILTIN).
14201 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14203 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14204 (arm-with-iwmmxt.c): New.
14205 * config.in, configure: Regenerate.
14206 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14207 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14208 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14209 (arm*-*-linux*): Add iWMMXt and regset support.
14210 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14211 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14212 (arm_store_wmmxregset, target_regsets): New.
14213 * server.c (get_features_xml): Take annex argument. Check builtin
14215 (handle_query): Handle multiple annexes.
14217 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14219 * remote-utils.c [USE_WIN32API] (read, write): Define.
14220 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14223 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14225 * linux-i386-low.c (the_low_target): Set arch_string.
14226 * linux-x86-64-low.c (the_low_target): Likewise.
14227 * linux-low.c (linux_arch_string): New.
14228 (linux_target_ops): Add it.
14229 * linux-low.h (struct linux_target_ops): Add arch_string.
14230 * server.c (write_qxfer_response): Use const void * for DATA.
14231 (get_features_xml): New.
14232 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14233 * target.h (struct target_ops): Add arch_string method.
14235 2007-01-03 Denis Pilat <denis.pilat@st.com>
14236 Daniel Jacobowitz <dan@codesourcery.com>
14238 * linux-low.c (linux_kill): Handle being called with no threads.
14239 * win32-i386-low.c (win32_kill): Likewise.
14240 (get_child_debug_event): Clear current_process_handle.
14242 2006-12-30 Denis PILAT <denis.pilat@st.com>
14243 Daniel Jacobowitz <dan@codesourcery.com>
14245 * remote-utils.c (remote_open): Check the type of specified
14246 serial port devices before opening them.
14247 * server.c (main): Kill the inferior if an error occurs during
14248 the first remote_open.
14250 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14252 * README: Update supported targets.
14254 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14256 * Makefile.in (clean): Remove reg-mips64.c.
14257 (reg-mips64.c, reg-mips64.o): New rules.
14258 * configure.srv: Handle mips64. Include regset support for mips.
14259 * linux-mips-low.c (union mips_register): New.
14260 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14261 (mips_breakpoint, mips_breakpoint_at): Use int.
14262 (mips_collect_register, mips_supply_register)
14263 (mips_collect_register_32bit, mips_supply_register_32bit)
14264 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14265 (mips_store_fpregset, target_regsets): New.
14266 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14268 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14270 * configure.srv: Add target "spu*-*-*".
14271 * Makefile.in (clean): Remove reg-spu.c.
14272 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14273 * spu-low.c: New file.
14275 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14277 * configure.ac: Correct td_thr_tls_get_addr test.
14278 * configure: Regenerated.
14280 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14282 * linux-low.c (linux_wait_for_event): Reformat. Use the
14283 pass_signals array.
14284 * remote-utils.c (decode_address_to_semicolon): New.
14285 * server.c (pass_signals, handle_general_set): New.
14286 (handle_query): Mention QPassSignals for qSupported.
14287 (main): Call handle_general_set.
14288 * server.h (pass_signals, decode_address_to_semicolon): New.
14290 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14292 * server.c (handle_query): Correct error handling for read_auxv.
14294 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14296 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14297 and srv_linux_thread_db to yes.
14298 * linux-s390-low.c (s390_fill_gregset): New function.
14299 (target_regsets): Define data structure.
14301 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14303 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14304 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14305 * config.in, configure: Regenerated.
14306 * inferiors.c (gdb_id_to_thread): New function.
14307 (gdb_id_to_thread_id): Use it.
14308 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14309 * linux-low.h (struct process_info): Add th member.
14310 (thread_db_get_tls_address): New prototype.
14311 * remote-utils.c (decode_address): Make non-static.
14312 * server.c (handle_query): Handle qGetTLSAddr.
14313 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14314 * target.h (struct target_ops): Add get_tls_address.
14315 * thread-db.c (maybe_attach_thread): Save the thread handle.
14316 (thread_db_get_tls_address): New.
14318 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14320 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14321 (linux_resume_one_process): Take a siginfo_t *. Update all
14322 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14323 (struct pending_signals): Add a siginfo_t.
14324 (linux_wait_for_process): Always set last_status.
14325 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14326 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14327 * linux-low.h (struct process_info): Add last_status.
14329 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14331 * remote-utils.c (try_rle): New function.
14332 (putpkt_binary): Use it.
14334 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14336 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14337 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14338 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14339 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14340 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14343 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14345 * server.c (terminal_fd): New variable.
14346 (old_foreground_pgrp): Likewise.
14347 (restore_old_foreground_pgrp): New function.
14348 (start_inferior): Record the terminal file descriptor in terminal_fd
14349 and its original foreground group in old_foreground_pgrp. Register
14350 restore_old_foreground_pgrp with atexit().
14352 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14354 * server.c (handle_query): Correct qPart to qXfer.
14356 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14358 * configure.ac: Check for more headers which are missing on
14359 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14360 * configure.srv: Add Cygwin and mingw32.
14361 * remote-utils.c: Don't include headers unconditionally which
14362 are missing on mingw32. Include <winsock.h> for mingw32.
14363 (remote_open): Adjust for mingw32 support. Flush
14364 standard error after writing to it.
14365 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14366 (unblock_async_io, enable_async_io, disable_async_io)
14367 (readchar, getpkt): Update for Winsock support.
14368 (prepare_resume_reply): Expect a protocol signal number.
14369 * server.c: Disable <sys/wait.h> on mingw32.
14370 (start_inferior): Adjust for mingw32 support. Flush
14371 standard error after writing to it.
14372 (attach_inferior): Likewise. Use protocol signal
14374 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14376 * win32-i386-low.c: New file.
14377 * Makefile.in (XM_CLIBS): Set.
14378 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14379 (win32-i386-low.o): New dependency rule.
14380 * linux-low.c (linux_wait): Use target signal numbers.
14381 * target.h (struct target_ops): Doc fix.
14382 * server.h (target_signal_to_name): New prototype.
14383 * gdbreplay.c: Don't include headers unconditionally which
14384 are missing on mingw32. Include <winsock.h> for mingw32.
14385 (remote_close, remote_open): Adjust for Winsock support.
14386 * configure, config.in: Regenerated.
14388 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14390 * server.c (decode_xfer_read, write_qxfer_response): New.
14391 (handle_query): Take a packet length argument. Handle
14392 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14393 the qSupported response.
14394 (main): Update call to handle_query.
14396 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14398 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14399 (putpkt_binary): Renamed from putpkt and adjusted for binary
14401 (putpkt): New wrapper for putpkt_binary.
14402 (readchar): Don't mask off the high bit.
14403 (decode_X_packet): New function.
14404 * server.c (main): Call putpkt_binary if a handler sets the packet
14405 length. Save the length of the incoming packet. Handle 'X'.
14406 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14408 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14410 * server.c (handle_query): Handle qSupported.
14412 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14414 * remote-utils.c (all_symbols_looked_up): New variable.
14415 (look_up_one_symbol): Check it.
14416 * server.h (look_up_one_symbol): New declaration.
14417 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14419 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14421 * Makefile.in (linux-arm-low.o): Update dependencies.
14422 * linux-arm-low.c: Include "gdb_proc_service.h".
14423 (PTRACE_GET_THREAD_AREA): Define.
14424 (ps_get_thread_area): New function.
14426 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14428 * configure.srv (m68k*-*-uclinux*): New target.
14429 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14430 (linux_resume_one_process): Remove extraneous cast.
14431 (linux_read_offsets): New.
14432 (linux_target_op): Add linux_read_offsets on mmuless systems.
14433 * server.c (handle_query): Add qOffsets logic.
14434 * target.h (struct target_ops): Add read_offsets.
14436 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14438 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14439 (PTRACE_GET_THREAD_AREA): Define.
14440 (ps_get_thread_area): New function.
14441 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14442 (linux-x86-64-low.o): Update.
14444 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14446 * configure.ac: Remove checks for prfpregset_t.
14447 * gdb_proc_service.h: New file.
14448 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14449 new "gdb_proc_service.h".
14450 * proc-service.c: Likewise.
14451 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14452 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14453 * Makefile.in (gdb_proc_service_h): Updated.
14454 * configure, config.in: Regenerated.
14456 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14458 * remote-utils.c (prepare_resume_reply): Move declaration
14459 of gdb_id_from_wait to the top of the block.
14461 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14463 * linux-low.c (regsets_store_inferior_registers): Read the regset
14464 from the target before filling it.
14466 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14468 * server.c (attach_inferior): Return SIGTRAP for a successful
14471 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14473 * Makefile.in (OBS): Add version.o.
14474 (STAGESTUFF): Delete.
14475 (version.o): Add dependencies.
14476 (version.c): Replace rule.
14477 (clean): Remove version.c.
14478 * server.c (gdbserver_version): New.
14479 (gdbserver_usage): Use printf.
14480 (main): Handle --version and --help.
14481 * server.h (version, host_name): Add declarations.
14483 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14495 * linux-x86-64-low.c:
14497 * linux-s390-low.c:
14498 * linux-ppc64-low.c:
14500 * linux-mips-low.c:
14501 * linux-m68k-low.c:
14502 * linux-m32r-low.c:
14505 * linux-ia64-low.c:
14506 * linux-i386-low.c:
14507 * linux-crisv32-low.c:
14519 * gdbserver.1: Add (C) after Copyright. Update the FSF
14522 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14524 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14525 (arm_breakpoint_at): Recognize both breakpoints.
14526 (the_low_target): Use the correct breakpoint instruction.
14528 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14530 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14531 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14532 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14533 (the_low_target): Update.
14535 2005-10-25 Andreas Schwab <schwab@suse.de>
14537 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14539 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14540 (ia64_num_regs): Reduce to 462.
14542 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14544 * acinclude.m4: Correct quoting.
14545 * aclocal.m4: Regenerated.
14547 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14548 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14549 (thread_db_init): Call thread_db_err_str.
14550 * configure.ac: Check for TD_VERSION.
14551 * config.in, configure: Regenerated.
14553 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14555 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14557 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14559 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14560 is not available. Define HAVE_PTRACE_GETREGS if it is.
14561 * config.in, configure: Regenerated.
14562 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14563 * linux-i386-low.c, linux-m68k-low.c: Update to use
14564 HAVE_PTRACE_GETREGS.
14565 * linux-low.c (regsets_fetch_inferior_registers)
14566 (regsets_store_inferior_registers): Only return 0 if we processed
14568 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14569 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14571 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14573 * inferiors.c (struct thread_info): Add gdb_id.
14574 (add_thread): Add gdb_id argument.
14575 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14576 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14577 calls to add_thread.
14578 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14579 * server.c (handle_query): Use thread_to_gdb_id.
14580 (handle_v_cont, main): Use gdb_id_to_thread_id.
14581 * server.h (add_thread): Update prototype.
14582 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14585 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14587 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14588 left-padded registers.
14589 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14590 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14592 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14594 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14595 * configure: Regenerate.
14596 * config.in: Regenerate.
14597 * server.h (NEED_DECLARATION_STRERROR):
14598 Replace with !HAVE_DECL_STRERROR.
14600 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14602 * linux-low.c (linux_wait, linux_send_signal): Don't test
14603 an unsigned long variable for > 0 if it could be MAX_ULONG.
14604 * server.c (myresume): Likewise.
14605 * target.c (set_desired_inferior): Likewise.
14607 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14609 * configure.ac: Simplify and improve check for socklen_t.
14610 * configure, config.in: Regenerate.
14612 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14614 * acconfig.h: Remove.
14615 * configure.ac: Add a test for socklen_t. Use three-argument
14616 AC_DEFINE throughout.
14617 * config.in: Regenerated using autoheader 2.59.
14618 * configure: Regenerated.
14620 * gdbreplay.c (socklen_t): Provide a default.
14621 (remote_open): Use socklen_t.
14622 * remote-utils.c (socklen_t): Provide a default.
14623 (remote_open): Use socklen_t.
14624 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14627 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14629 * linux-low.c (linux_read_memory, linux_write_memory)
14630 (linux_read_auxv): Likewise.
14631 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14632 (check_mem_write): Likewise.
14633 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14635 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14636 (registers_from_string, register_data): Likewise.
14637 * server.c (handle_query, main): Likewise.
14638 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14639 (decode_M_packet): Likewise.
14640 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14641 * target.h (struct target_ops): Update read_memory, write_memory,
14643 (read_inferior_memory, write_inferior_memory): Update.
14644 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14645 to unsigned char *.
14646 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14647 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14648 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14649 linux-s390-low.c, linux-sh-low.c: Update for changes in
14650 read_inferior_memory and the_low_target->breakpoint.
14652 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14654 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14655 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14656 * configure.srv: Add powerpc64-*-linux*.
14657 * linux-ppc64-low.c: New file.
14659 2005-05-23 Orjan Friberg <orjanf@axis.com>
14661 * linux-cris-low.c: New file with support for CRIS.
14662 * linux-crisv32-low.c: Ditto for CRISv32.
14663 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14664 (clean): Add reg-cris.c and reg-crisv32.c.
14665 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14666 reg-crisv32.o, and reg-crisv32.c to make rules.
14667 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14668 recognized targets.
14670 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14672 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14673 of sizeof (PTRACE_XFER_TYPE).
14674 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14676 2005-05-12 Orjan Friberg <orjanf@axis.com>
14678 * target.h (struct target_ops): Add insert_watchpoint,
14679 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14680 pointers for hardware watchpoint support.
14681 * linux-low.h (struct linux_target_ops): Ditto.
14682 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14683 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14684 to linux_target_ops.
14685 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14687 * server.c (main): Recognize 'Z' and 'z' packets.
14689 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14691 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14692 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14693 (the_low_target): Add new members.
14695 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14697 * proc-service.c (ps_lgetregs): Search all_processes instead of
14700 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14702 * server.c (start_inferior): Change return type to int.
14703 (attach_inferior): Change sigptr to int *.
14704 (handle_v_cont, handle_v_requests): Change signal to int *.
14705 (main): Change signal to int.
14707 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14709 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14710 * configure.srv: Add m32r*-*-linux*.
14711 * linux-m32r-low.c: New file.
14713 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14715 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14717 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14719 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14720 Take unsigned long arguments for PIDs.
14721 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14722 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14723 (wait_for_sigstop, linux_resume_one_process)
14724 (regsets_fetch_inferior_registers, linux_send_signal)
14725 (linux_read_auxv): Likewise. Update the types of variables holding
14726 PIDs. Update format string specifiers.
14727 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14728 * remote-utils.c (prepare_resume_reply): Likewise.
14729 * server.c (cont_thread, general_thread, step_thread)
14730 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14732 (handle_query): Update format specifiers.
14733 (handle_v_cont, main): Use strtoul for thread IDs.
14734 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14735 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14736 (general_thread, step_thread, thread_from_wait)
14737 (old_thread_from_wait): Update.
14738 * target.h (struct thread_resume): Use unsigned long for THREAD.
14739 (struct target_ops): Use unsigned long for arguments to attach and
14742 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14744 * acinclude.m4: Include bfd/bfd.m4 directly.
14745 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14746 <agriffis@toolchain.org>.
14747 * aclocal.m4, configure: Regenerated.
14749 2005-01-07 Andrew Cagney <cagney@gnu.org>
14751 * configure.ac: Rename configure.in, require autoconf 2.59.
14752 * configure: Re-generate.
14754 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14756 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14757 LIBS when finished.
14758 * aclocal.m4: Regenerated.
14759 * configure: Regenerated.
14761 2004-11-21 Andreas Schwab <schwab@suse.de>
14763 * linux-m68k-low.c (m68k_num_gregs): Define.
14764 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14765 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14766 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14767 (m68k_breakpoint_at): New. Add to the_low_target.
14769 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14770 srv_linux_thread_db to yes.
14772 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14774 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14775 (ARCH_SET_FS): Likewise.
14776 (ARCH_GET_FS): Likewise.
14777 (ARCH_GET_GS): Likewise.
14779 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14781 * linux-i386-low.c (ps_get_thread_area): New.
14782 * linux-x86-64-low.c (ps_get_thread_area): New.
14783 * linux-low.c: Include <sys/syscall.h>.
14784 (linux_kill_one_process): Don't kill the first thread here.
14785 (linux_kill): Kill the first thread here.
14786 (kill_lwp): New function.
14787 (send_sigstop, linux_send_signal): Use it.
14788 * proc-service.c: Clean up #ifdefs.
14789 (fpregset_info): Delete.
14790 (ps_lgetregs): Update and enable implementation.
14791 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14793 * remote-utils.c (struct sym_cache, symbol_cache): New.
14794 (input_interrupt): Print a clearer message.
14795 (async_io_enabled): New variable.
14796 (enable_async_io, disable_async_io): Use it. Update comments.
14797 (look_up_one_symbol): Use the symbol cache.
14798 * thread-db.c (thread_db_look_up_symbols): New function.
14799 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14801 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14803 * configure.in: Test for -rdynamic.
14804 * configure: Regenerated.
14805 * Makefile (INTERNAL_LDFLAGS): New.
14806 (gdbserver, gdbreplay): Use it.
14808 2004-09-02 Andrew Cagney <cagney@gnu.org>
14810 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14812 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14814 * linux-low.c (linux_wait): Clear all_processes list also.
14816 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14818 * linux-low.c: Include <errno.h>. Remove extern declaration of
14821 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14823 * gdbreplay.c, server.h, utils.c: Update copyright years.
14825 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14827 * server.c (main): Print child status or termination signal from
14828 variable 'signal', not 'sig'.
14830 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14832 * linux-low.c (linux_read_memory): Change return type to
14833 int. Check for and return error from ptrace().
14834 * target.c (read_inferior_memory): Change return type to int. Pass
14835 back return status from the_target->read_memory().
14836 * target.h (struct target_ops): Adapt *read_memory() prototype.
14838 (read_inferior_memory): Adapt prototype.
14839 * server.c (main): Return an error packet if
14840 read_inferior_memory() returns an error.
14842 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14844 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14845 Unify with other clean targets.
14847 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14849 * server.c (handle_v_cont): Call set_desired_inferior.
14851 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14853 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14855 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14857 * linux-low.c (linux_wait): Unblock async I/O.
14858 (linux_resume): Block and enable async I/O.
14859 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14860 * server.h (block_async_io, unblock_async_io): Add prototypes.
14862 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14864 * remote-utils.c (remote_open): Print a status notice after
14865 opening a TCP port.
14866 * server.c (attach_inferior): Print a status notice after
14869 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14871 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14873 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14875 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14877 * server.c, target.h: Update copyright years.
14879 2004-02-25 Roland McGrath <roland@redhat.com>
14881 * target.h (struct target_ops): New member `read_auxv'.
14882 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14883 * linux-low.c (linux_read_auxv): New function.
14884 (linux_target_ops): Initialize `read_auxv' member to that.
14886 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14888 Committed by Jim Blandy <jimb@redhat.com>.
14890 * linux-s390-low.c (s390_num_regs): Update.
14891 (s390_regmap): Remove control registers. Use __s390x__ predefine
14892 instead of GPR_SIZE to distiguish s390 and s390x targets.
14894 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14896 * linux-low.c: Update copyright year.
14897 (check_removed_breakpoint): Clear pending_is_breakpoint.
14898 (linux_set_resume_request, linux_queue_one_thread)
14899 (resume_status_pending_p): New functions.
14900 (linux_continue_one_thread): Use process->resume.
14901 (linux_resume): Only resume threads if there are no pending events.
14902 * linux-low.h (struct process_info): Add resume request
14905 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14907 * regcache.c (new_register_cache): Clear the allocated register
14908 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14910 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14912 * linux-low.c (linux_resume): Take a struct thread_resume *
14914 (linux_wait): Update call.
14915 (resume_ptr): New static variable.
14916 (linux_continue_one_thread): Renamed from
14917 linux_continue_one_process. Use resume_ptr.
14918 (linux_resume): Use linux_continue_one_thread.
14919 * server.c (handle_v_cont, handle_v_requests): New functions.
14920 (myresume): New function.
14921 (main): Handle 'v' case.
14922 * target.h (struct thread_resume): New type.
14923 (struct target_ops): Change argument of "resume" to struct
14925 (myresume): Delete macro.
14927 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14929 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14930 (uninstall): Support DESTDIR.
14932 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14934 * configure.srv: Add xscale*linux copy of arm*linux entry.
14936 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14938 * linux-arm-low.c (arm_reinsert_addr): New function.
14939 (the_low_target): Add arm_reinsert_addr.
14941 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14943 * mem-break.c: Remove whitespace at end of file.
14945 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14947 * configure.in: Check whether we need to prototype strerror.
14948 * server.h: Optionally prototype strerror.
14949 * gdbreplay.c (perror_with_name): Use strerror.
14950 * linux-low.c (linux_attach_lwp): Use strerror.
14951 * utils.c (perror_with_name): Use strerror.
14952 * config.in, configure: Regenerated.
14954 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14956 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14957 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14959 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14961 * Makefile.in (SFILES): Update.
14962 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14963 low-sun3.c: Remove files.
14965 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14967 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14968 (linux_detach_one_process, linux_detach): New functions.
14969 (linux_target_ops): Add linux_detach.
14970 * server.c (main): Handle 'D' packet.
14971 * target.h (struct target_ops): Add "detach" member.
14972 (detach_inferior): Define.
14974 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14976 From Kelley Cook <kelleycook@wideopenwest.com>:
14977 * configure.srv: Accept i[34567]86 variants.
14979 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14981 * linux-low.c (linux_wait_for_event): Correct comment typos.
14982 (linux_resume_one_process): Call check_removed_breakpoint.
14983 (linux_send_signal): New function.
14984 (linux_target_ops): Add linux_send_signal.
14985 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14987 * target.h (struct target_ops): Add send_signal.
14989 2003-05-29 Jim Blandy <jimb@redhat.com>
14991 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14992 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14993 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14994 away part of the register's value.
14996 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14998 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14999 (linux_wait_for_event, linux_init_signals): Likewise.
15001 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15003 * configure.in: Check for stdlib.h.
15004 * configure: Regenerated.
15005 * config.in: Regenerated.
15007 2003-01-04 Andreas Schwab <schwab@suse.de>
15009 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15011 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15013 * Makefile.in: Remove obsolete code.
15015 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15017 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15018 defined(PT_FPR0_HI).
15020 2002-11-17 Stuart Hughes <seh@zee2.com>
15022 * linux-arm-low.c (arm_num_regs): Increase.
15023 (arm_regmap): Include status register.
15025 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15027 * linux-low.c (register_addr): Remove incorrect -1 check.
15029 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15031 * linux-low.c (linux_create_inferior): Call setpgid. Return
15033 (unstopped_p, linux_signal_pid): Remove.
15034 (linux_target_ops): Remove linux_signal_pid.
15035 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15036 global instead of target method.
15037 * target.h (struct target_ops): Remove signal_pid. Update comment
15038 for create_inferior.
15039 * server.c (signal_pid): New variable.
15040 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15041 gdbserver. Set the child to be the foreground process group.
15042 (attach_inferior): Set signal_pid.
15044 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15046 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15048 2002-08-20 Jim Blandy <jimb@redhat.com>
15050 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15053 2002-08-01 Andrew Cagney <cagney@redhat.com>
15055 * Makefile.in: Make chill references obsolete.
15057 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15059 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15060 * configure: Regenerate.
15061 * config.in: Regenerate.
15063 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15065 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15066 (perror_with_name, remote_close, remote_open, expect, play): Static.
15068 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15070 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15071 byte offsets instead of an array of indexes.
15072 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15074 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15076 * regcache.c: Add comment.
15078 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15080 * thread-db.c: New file.
15081 * proc-service.c: New file.
15082 * acinclude.m4: New file.
15083 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15084 proc-service.o, and thread-db.o.
15085 (linux-low.o): Add USE_THREAD_DB.
15086 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15087 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15088 * aclocal.m4: Regenerated.
15089 * config.in: Regenerated.
15090 * configure: Regenerated.
15091 * configure.in: Check for proc_service.h, sys/procfs.h,
15092 thread_db.h, and linux/elf.h headrs.
15093 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15094 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15095 Check for -lthread_db and thread support.
15096 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15097 PowerPC, and SuperH.
15098 * i387-fp.c: Constify arguments.
15099 * i387-fp.h: Likewise.
15100 * inferiors.c: (struct thread_info): Renamed from
15101 `struct inferior_info'. Remove PID member. Use generic inferior
15102 list header. All uses updated.
15103 (inferiors, signal_pid): Removed.
15104 (all_threads): New variable.
15105 (get_thread): Define.
15106 (add_inferior_to_list): New function.
15107 (for_each_inferior): New function.
15108 (change_inferior_id): New function.
15109 (add_inferior): Removed.
15110 (remove_inferior): New function.
15111 (add_thread): New function.
15112 (free_one_thread): New function.
15113 (remove_thread): New function.
15114 (clear_inferiors): Use for_each_inferior and free_one_thread.
15115 (find_inferior): New function.
15116 (find_inferior_id): New function.
15117 (inferior_target_data): Update argument type.
15118 (set_inferior_target_data): Likewise.
15119 (inferior_regcache_data): Likewise.
15120 (set_inferior_regcache_data): Likewise.
15121 * linux-low.c (linux_bp_reinsert): Remove.
15122 (all_processes, stopping_threads, using_thrads)
15123 (struct pending_signals, debug_threads, pid_of): New.
15124 (inferior_pid): Replace with macro.
15125 (struct inferior_linux_data): Remove.
15126 (get_stop_pc, add_process): New functions.
15127 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15128 Use add_process and add_thread.
15129 (linux_attach_lwp): New function, based on old linux_attach. Use
15130 add_process and add_thread. Set stop_expected for new threads.
15131 (linux_attach): New function.
15132 (linux_kill_one_process): New function.
15133 (linux_kill): Kill all LWPs.
15134 (linux_thread_alive): Use find_inferior_id.
15135 (check_removed_breakpoints, status_pending_p): New functions.
15136 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15137 Update. Use WNOHANG. Wait for cloned processes also. Update process
15138 struct for the found process.
15139 (linux_wait_for_event): New function.
15140 (linux_wait): Use it. Support LWPs.
15141 (send_sigstop, wait_for_sigstop, stop_all_processes)
15142 (linux_resume_one_process, linux_continue_one_process): New functions.
15143 (linux_resume): Support LWPs.
15144 (REGISTER_RAW_SIZE): Remove.
15145 (fetch_register): Use register_size instead. Call supply_register.
15146 (usr_store_inferior_registers): Likewise. Call collect_register.
15147 Fix recursive case.
15148 (regsets_fetch_inferior_registers): Improve error message.
15149 (regsets_store_inferior_registers): Add debugging.
15150 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15151 (unstopped_p, linux_signal_pid): New functions.
15152 (linux_target_ops): Add linux_signal_pid.
15153 (linux_init_signals): New function.
15154 (initialize_low): Call it. Initialize using_threads.
15155 * regcache.c (inferior_regcache_data): Add valid
15157 (get_regcache): Fetch registers lazily. Add fetch argument
15158 and update all callers.
15159 (regcache_invalidate_one, regcache_invalidate): New
15161 (new_register_cache): Renamed from create_register_cache.
15162 Return the new regcache.
15163 (free_register_cache): Change argument to a void *.
15164 (registers_to_string, registers_from_string): Call get_regcache
15165 with fetch flag set.
15166 (register_data): Make static. Pass fetch flag to get_regcache.
15167 (supply_register): Call get_regcache with fetch flag clear.
15168 (collect_register): Call get_regcache with fetch flag set.
15169 (collect_register_as_string): New function.
15170 * regcache.h: Update.
15171 * remote-utils.c (putpkt): Flush after debug output and use
15173 Handle input interrupts while waiting for an ACK.
15174 (input_interrupt): Use signal_pid method.
15175 (getpkt): Flush after debug output and use stderr.
15176 (outreg): Use collect_register_as_string.
15177 (new_thread_notify, dead_thread_notify): New functions.
15178 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15179 and general_thread.
15180 (look_up_one_symbol): Flush after debug output.
15181 * server.c (step_thread, server_waiting): New variables.
15182 (start_inferior): Don't use signal_pid. Update call to mywait.
15183 (attach_inferior): Update call to mywait.
15184 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15185 (main): Don't fetch/store registers explicitly. Use
15186 set_desired_inferior. Support proposed ``Hs'' packet. Update
15188 * server.h: Update.
15189 (struct inferior_list, struct_inferior_list_entry): New.
15190 * target.c (set_desired_inferior): New.
15191 (write_inferior_memory): Constify.
15192 (mywait): New function.
15193 * target.h: Update.
15194 (struct target_ops): New signal_pid method.
15195 (mywait): Removed macro, added prototype.
15197 * linux-low.h (regset_func): Removed.
15198 (regset_fill_func, regset_store_func): New.
15199 (enum regset_type): New.
15200 (struct regset_info): Add type field. Use new operation types.
15201 (struct linux_target_ops): stop_pc renamed to get_pc.
15202 Add decr_pc_after_break and breakpoint_at.
15203 (get_process, get_thread_proess, get_process_thread)
15204 (strut process_info, all_processes, linux_attach_lwp)
15205 (thread_db_init): New.
15207 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15208 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15209 (the_low_target): Add new members.
15210 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15211 (i386_store_fpxregset): Constify.
15212 (target_regsets): Add new kind identifier.
15213 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15214 (i386_set_pc): Add debugging.
15215 (i386_breakpoint_at): New function.
15216 (the_low_target): Add new members.
15217 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15218 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15219 (mips_breakpoint_at): New.
15220 (the_low_target): Add new members.
15221 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15222 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15223 (the_low_target): Add new members.
15224 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15225 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15226 (the_low_target): Add new members.
15227 * linux-x86-64-low.c (target_regsets): Add new kind
15230 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15232 From Martin Pool <mbp@samba.org>:
15233 * server.c (gdbserver_usage): New function.
15236 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15238 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15239 stop_at -> stop_pc.
15241 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15243 * Makefile.in: Remove obsolete code.
15245 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15247 * linux-low.c (regsets_fetch_inferior_registers),
15248 (regsets_store_inferior_registers): Removed cast to int from
15250 * regcache.h: Added declaration of struct inferior_info.
15252 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15254 * inferiors.c (struct inferior_info): Add regcache_data.
15255 (add_inferior): Call create_register_cache.
15256 (clear_inferiors): Call free_register_cache.
15257 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15258 * regcache.c (struct inferior_regcache_data): New.
15259 (registers): Remove.
15260 (get_regcache): New function.
15261 (create_register_cache, free_register_cache): New functions.
15262 (set_register_cache): Don't initialize the register cache here.
15263 (registers_to_string, registers_from_string, register_data): Call
15265 * regcache.h: Add prototypes.
15266 * server.h: Likewise.
15268 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15270 * mem-break.c: New file.
15271 * mem-break.h: New file.
15272 * Makefile.in: Add mem-break.o rule; update server.h
15274 * inferiors.c (struct inferior_info): Add target_data
15276 (clear_inferiors): Free target_data member if set.
15277 (inferior_target_data, set_inferior_target_data): New functions.
15278 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15279 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15280 * linux-low.c (linux_bp_reinsert): New variable.
15281 (struct inferior_linux_data): New.
15282 (linux_create_inferior): Use set_inferior_target_data.
15283 (linux_attach): Likewise. Call add_inferior.
15284 (linux_wait_for_one_inferior): New function.
15285 (linux_wait): Call it.
15286 (linux_write_memory): Add const.
15287 (initialize_low): Call set_breakpoint_data.
15288 * linux-low.h (struct linux_target_ops): Add breakpoint
15290 * server.c (attach_inferior): Remove extra add_inferior
15292 * server.h: Include mem-break.h. Update inferior.c
15294 * target.c (read_inferior_memory)
15295 (write_inferior_memory): New functions.
15296 * target.h (read_inferior_memory)
15297 (write_inferior_memory): Change macros to prototypes.
15298 (struct target_ops): Update comments. Add const to write_memory
15301 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15303 * linux-low.c (usr_store_inferior_registers): Support
15304 registers which are allowed to fail to store.
15305 * linux-low.h (linux_target_ops): Likewise.
15306 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15307 (ppc_cannot_store_register): FPSCR may not be storable.
15309 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15311 * server.h: Include <string.h> if HAVE_STRING_H.
15312 * ChangeLog: Correct paths in last ChangeLog entry.
15314 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15316 * linux-low.h: Remove obsolete prototypes.
15317 (struct linux_target_ops): New.
15318 (extern the_low_target): New.
15319 * linux-low.c (num_regs, regmap): Remove declarations.
15320 (register_addr): Use the_low_target explicitly.
15321 (fetch_register): Likewise.
15322 (usr_fetch_inferior_registers): Likewise.
15323 (usr_store_inferior_registers): Likewise.
15324 * linux-arm-low.c (num_regs): Remove.
15325 (arm_num_regs): Define.
15326 (arm_regmap): Renamed from regmap, made static.
15327 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15329 (arm_cannot_store_register): Renamed from cannot_store_register,
15331 (the_low_target): New.
15332 * linux-i386-low.c (num_regs): Remove.
15333 (i386_num_regs): Define.
15334 (i386_regmap): Renamed from regmap, made static.
15335 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15337 (i386_cannot_store_register): Renamed from cannot_store_register,
15339 (the_low_target): New.
15340 * linux-ia64-low.c (num_regs): Remove.
15341 (ia64_num_regs): Define.
15342 (ia64_regmap): Renamed from regmap, made static.
15343 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15345 (ia64_cannot_store_register): Renamed from cannot_store_register,
15347 (the_low_target): New.
15348 * linux-m68k-low.c (num_regs): Remove.
15349 (m68k_num_regs): Define.
15350 (m68k_regmap): Renamed from regmap, made static.
15351 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15353 (m68k_cannot_store_register): Renamed from cannot_store_register,
15355 (the_low_target): New.
15356 * linux-mips-low.c (num_regs): Remove.
15357 (mips_num_regs): Define.
15358 (mips_regmap): Renamed from regmap, made static.
15359 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15361 (mips_cannot_store_register): Renamed from cannot_store_register,
15363 (the_low_target): New.
15364 * linux-ppc-low.c (num_regs): Remove.
15365 (ppc_num_regs): Define.
15366 (ppc_regmap): Renamed from regmap, made static.
15367 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15369 (ppc_cannot_store_register): Renamed from cannot_store_register,
15371 (the_low_target): New.
15372 * linux-s390-low.c (num_regs): Remove.
15373 (s390_num_regs): Define.
15374 (s390_regmap): Renamed from regmap, made static.
15375 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15377 (s390_cannot_store_register): Renamed from cannot_store_register,
15379 (the_low_target): New.
15380 * linux-sh-low.c (num_regs): Remove.
15381 (sh_num_regs): Define.
15382 (sh_regmap): Renamed from regmap, made static.
15383 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15385 (sh_cannot_store_register): Renamed from cannot_store_register,
15387 (the_low_target): New.
15388 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15389 (the_low_target): New.
15391 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15393 * Makefile.in: Add stamp-h target.
15394 * configure.in: Create stamp-h.
15395 * configure: Regenerated.
15397 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15399 * inferiors.c: New file.
15400 * target.c: New file.
15401 * target.h: New file.
15402 * Makefile.in: Add target.o and inferiors.o. Update
15404 * linux-low.c (inferior_pid): New static variable,
15405 moved from server.c.
15406 (linux_create_inferior): Renamed from create_inferior.
15407 Call add_inferior. Return 0 on success instead of a PID.
15408 (linux_attach): Renamed from myattach.
15409 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15410 (linux_thread_alive): Renamed from mythread_alive.
15411 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15413 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15414 (regsets_store_inferior_registers): Correct error message.
15415 Add missing ``return 0''.
15416 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15417 (linux_store_registers): Renamed from store_inferior_registers.
15418 (linux_read_memory): Renamed from read_inferior_memory.
15419 (linux_write_memory): Renamed from write_inferior_memory.
15420 (linux_target_ops): New structure.
15421 (initialize_low): Call set_target_ops ().
15422 * remote-utils.c (unhexify): New function.
15423 (hexify): New function.
15424 (input_interrupt): Send signals to ``signal_pid''.
15425 * server.c (inferior_pid): Remove.
15426 (start_inferior): Update create_inferior call.
15427 (attach_inferior): Call add_inferior.
15428 (handle_query): New function.
15429 (main): Call handle_query for `q' packets.
15430 * server.h: Include "target.h". Remove obsolete prototypes.
15431 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15433 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15435 * Makefile.in: Add WARN_CFLAGS. Update configury
15437 * configure.in: Check for <string.h>
15438 * configure: Regenerate.
15439 * config.in: Regenerate.
15440 * gdbreplay.c: Include needed system headers.
15441 (remote_open): Remove strchr prototype.
15442 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15443 * regcache.c (supply_register): Change buf argument to const void *.
15444 (supply_register_by_name): Likewise.
15445 (collect_register): Change buf argument to void *.
15446 (collect_register_by_name): Likewise.
15447 * regcache.h: Add missing prototypes.
15448 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15449 * server.c (handle_query): New function.
15450 (attached): New static variable, moved out of main.
15451 (main): Quiet longjmp clobber warnings.
15452 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15453 * utils.c (error): Remove NORETURN.