1 2015-08-25 Yao Qi <yao.qi@linaro.org>
3 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5 2015-08-25 Yao Qi <yao.qi@linaro.org>
7 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9 2015-08-25 Yao Qi <yao.qi@linaro.org>
11 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
14 2015-08-25 Yao Qi <yao.qi@linaro.org>
16 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
18 (debug_reg_change_callback): Remove argument entry and add argument
19 lwp. Remove local variable thread. Don't print thread id in the
20 debugging output. Don't check whether pid of thread equals to pid.
21 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
22 iterate_over_lwps instead find_inferior.
24 2015-08-24 Pedro Alves <palves@redhat.com>
26 * inferiors.c (get_first_process): New function.
27 * inferiors.h (get_first_process): New declaration.
28 * remote-utils.c (read_ptid): Default to the first process in the
29 list, instead of to the current thread's process.
31 2015-08-24 Pedro Alves <palves@redhat.com>
33 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
34 * event-loop.c: Likewise.
35 * remote-utils.c: Likewise.
36 * tracepoint.c: Likewise.
38 2015-08-24 Pedro Alves <palves@redhat.com>
40 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
43 2015-08-21 Pedro Alves <palves@redhat.com>
45 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
48 2015-08-21 Pedro Alves <palves@redhat.com>
50 * tdesc.c (default_description): Explicitly zero-initialize.
52 2015-08-21 Pedro Alves <palves@redhat.com>
55 * inferiors.c (remove_thread): Discard any pending stop reply for
57 * server.c (remove_all_on_match_pid): Rename to ...
58 (remove_all_on_match_ptid): ... this. Work with a filter ptid
60 (discard_queued_stop_replies): Change parameter to a ptid. Now
62 (handle_v_kill, kill_inferior_callback, captured_main)
63 (process_serial_event): Adjust.
64 * server.h (discard_queued_stop_replies): Declare.
66 2015-08-21 Pedro Alves <palves@redhat.com>
68 * linux-low.c (wait_for_sigstop): Always switch to no thread
69 selected if the previously current thread dies.
70 * lynx-low.c (lynx_request_interrupt): Use the first thread's
71 process instead of the current thread's.
72 * remote-utils.c (input_interrupt): Don't check if there's no
74 * server.c (gdb_read_memory, gdb_write_memory): If setting the
75 current thread to the general thread fails, error out.
76 (handle_qxfer_auxv, handle_qxfer_libraries)
77 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
78 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
79 (handle_query): Check if there's a thread selected instead of
80 checking whether there's any thread in the thread list.
81 (handle_qxfer_threads, handle_qxfer_btrace)
82 (handle_qxfer_btrace_conf): Don't error out early if there's no
83 thread in the thread list.
84 (handle_v_cont, myresume): Don't set the current thread to the
86 (process_serial_event) <Hg handling>: Also set thread_id if the
87 previous general thread is still alive.
88 (process_serial_event) <g/G handling>: If setting the current
89 thread to the general thread fails, error out.
90 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
91 thread's lwp instead of the current thread's.
92 * target.c (set_desired_thread): If the desired thread was not
93 found, leave the current thread pointing to NULL. Return an int
94 (boolean) indicating success.
95 * target.h (set_desired_thread): Change return type to int.
97 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
99 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
100 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
102 (ps_get_thread_area): New function.
104 2015-08-19 Gary Benson <gbenson@redhat.com>
106 * hostio.c (handle_pread): Do not attempt to read more data
107 than hostio_reply_with_data can fit in a packet.
109 2015-08-18 Joel Brobecker <brobecker@adacore.com>
111 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
113 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
115 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
117 2015-08-06 Pedro Alves <palves@redhat.com>
119 * tracepoint.c (expr_eval_result): Now an int.
121 2015-08-06 Pedro Alves <palves@redhat.com>
123 * gdbthread.h (struct regcache): Forward declare.
124 (struct thread_info) <regcache_data>: Now a struct regcache
126 * inferiors.c (inferior_regcache_data)
127 (set_inferior_regcache_data): Now work with struct regcache
129 * inferiors.h (struct regcache): Forward declare.
130 (inferior_regcache_data, set_inferior_regcache_data): Now work
131 with struct regcache pointers.
132 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
133 (free_register_cache_thread): Remove struct regcache pointer
136 2015-08-06 Pedro Alves <palves@redhat.com>
138 * server.c (captured_main): On error, print the exception message
139 to stderr, and if run_once is set, throw a quit.
141 2015-08-06 Pedro Alves <palves@redhat.com>
143 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
146 2015-08-06 Pedro Alves <palves@redhat.com>
148 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
149 reading beyond the passed in buffer length.
151 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
153 * tracepoint.c (symbol_list) <required>: Remove.
155 2015-08-06 Pedro Alves <palves@redhat.com>
157 * linux-low.c (handle_extended_wait): Set the fork child's suspend
158 count if stopping and suspending threads.
159 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
160 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
161 (linux_detach): Complete an ongoing step-over.
162 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
164 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
165 (linux_wait_1): If passing a signal to the inferior after
166 finishing a step-over, unsuspend and re-resume all lwps. If we
167 see a single-step event but the thread should be continuing, don't
168 pass the trap to gdb.
169 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
170 internal_error instead of gdb_assert.
171 (enqueue_pending_signal): New function.
172 (check_ptrace_stopped_lwp_gone): Add debug output.
173 (start_step_over): Use internal_error instead of gdb_assert.
174 (complete_ongoing_step_over): New function.
175 (linux_resume_one_thread): Don't resume a suspended thread.
176 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
179 2015-08-06 Pedro Alves <palves@redhat.com>
181 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
182 (linux_thread_alive): Use lwp_is_marked_dead.
183 (extended_event_reported): Delete.
184 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
185 instead of extended_event_reported.
186 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
188 (lwp_is_marked_dead): New function.
189 (lwp_running): Use lwp_is_marked_dead.
190 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
193 2015-08-06 Pedro Alves <palves@redhat.com>
195 * linux-low.c (linux_wait_1): Move fork event output out of the
196 !report_to_gdb check. Pass event_child->waitstatus to
197 target_waitstatus_to_string instead of ourstatus.
199 2015-08-04 Yao Qi <yao.qi@linaro.org>
201 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
202 if current_thread is 32 bit.
204 2015-08-04 Yao Qi <yao.qi@linaro.org>
206 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
207 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
208 * server.c (extended_protocol): Remove "static".
209 * server.h (extended_protocol): Declare it.
211 2015-08-04 Yao Qi <yao.qi@linaro.org>
213 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
214 both aarch64 and aarch32.
215 (aarch64_set_pc): Likewise.
217 2015-08-04 Yao Qi <yao.qi@linaro.org>
219 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
220 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
221 arm-with-neon.xml to srv_xmlfiles.
222 * linux-aarch64-low.c: Include linux-aarch32-low.h.
223 (is_64bit_tdesc): New function.
224 (aarch64_linux_read_description): New function.
225 (aarch64_arch_setup): Call aarch64_linux_read_description.
226 (regs_info): Rename to regs_info_aarch64.
227 (aarch64_regs_info): Return right regs_info.
228 (initialize_low_arch): Call initialize_low_arch_aarch32.
230 2015-08-04 Yao Qi <yao.qi@linaro.org>
232 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
233 * linux-aarch32-low.c: New file.
234 * linux-aarch32-low.h: New file.
235 * linux-arm-low.c (arm_fill_gregset): Move it to
237 (arm_store_gregset): Likewise.
238 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
239 (arm_store_vfpregset): Call arm_store_vfpregset_num.
240 (arm_arch_setup): Check if PTRACE_GETREGSET works.
241 (regs_info): Rename to regs_info_arm.
242 (arm_regs_info): Return regs_info_aarch32 if
243 have_ptrace_getregset is 1 and target description is
244 arm_with_neon or arm_with_vfpv3.
245 (initialize_low_arch): Don't call init_registers_arm_with_neon.
246 Call initialize_low_arch_aarch32 instead.
248 2015-08-04 Yao Qi <yao.qi@linaro.org>
250 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
251 * linux-low.c: ... here.
252 * linux-low.h (have_ptrace_getregset): Declare it.
254 2015-08-04 Pedro Alves <palves@redhat.com>
256 * thread-db.c (struct thread_db): Use new typedefs.
257 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
259 (disable_thread_event_reporting): Cast result of dlsym to
260 destination function pointer type.
261 (thread_db_mourn): Use td_ta_delete_ftype.
263 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
265 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
267 (CDX_BREAKPOINT): Define for R2.
268 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
269 (the_low_target): Add comments.
271 2015-07-30 Yao Qi <yao.qi@linaro.org>
273 * linux-arm-low.c (arm_hwcap): Remove it.
274 (arm_read_description): New local variable arm_hwcap. Don't
275 set arm_hwcap to zero.
277 2015-07-30 Yao Qi <yao.qi@linaro.org>
279 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
280 Use regcache->tdesc instead.
281 (arm_store_wmmxregset): Likewise.
282 (arm_fill_vfpregset): Likewise.
283 (arm_store_vfpregset): Likewise.
285 2015-07-30 Yao Qi <yao.qi@linaro.org>
287 * linux-arm-low.c: Include arch/arm.h.
288 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
289 (arm_store_gregset): Likewise.
291 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
293 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
294 ptrace's 4th parameter.
296 2015-07-27 Yao Qi <yao.qi@linaro.org>
298 * configure.srv (case aarch64*-*-linux*): Don't set
301 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
303 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
305 * linux-arm-low.c: Likewise.
306 * linux-cris-low.c: Likewise.
307 * linux-crisv32-low.c: Likewise.
308 * linux-low.c: Likewise.
309 * linux-m68k-low.c: Likewise.
310 * linux-mips-low.c: Likewise.
311 * linux-nios2-low.c: Likewise.
312 * linux-s390-low.c: Likewise.
313 * linux-sparc-low.c: Likewise.
314 * linux-tic6x-low.c: Likewise.
315 * linux-tile-low.c: Likewise.
316 * linux-x86-low.c: Likewise.
318 2015-07-24 Pedro Alves <palves@redhat.com>
320 * config.in: Regenerate.
321 * configure: Regenerate.
323 2015-07-24 Pedro Alves <palves@redhat.com>
325 * acinclude.m4: Include ../ptrace.m4.
326 * configure.ac: Call GDB_AC_PTRACE.
327 * config.in, configure: Regenerate.
329 2015-07-24 Yao Qi <yao.qi@linaro.org>
331 * linux-low.c (linux_create_inferior): Remove setting to
332 proc->priv->new_inferior.
333 (linux_attach): Likewise.
334 (linux_low_filter_event): Likewise.
335 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
337 2015-07-24 Yao Qi <yao.qi@linaro.org>
339 * linux-low.c (linux_arch_setup): New function.
340 (linux_low_filter_event): If proc->tdesc is NULL and
341 proc->attached is true, call the_low_target.arch_setup.
342 Otherwise, keep status pending, and return.
343 (linux_resume_one_lwp_throw): Don't call get_pc if
344 thread->while_stepping isn't NULL. Don't call
345 get_thread_regcache if proc->tdesc is NULL.
346 (need_step_over_p): Return 0 if proc->tdesc is NULL.
347 (linux_target_ops): Install arch_setup.
348 * server.c (start_inferior): Call the_target->arch_setup.
349 * target.h (struct target_ops) <arch_setup>: New field.
350 (target_arch_setup): New marco.
351 * lynx-low.c (lynx_target_ops): Update.
352 * nto-low.c (nto_target_ops): Update.
353 * spu-low.c (spu_target_ops): Update.
354 * win32-low.c (win32_target_ops): Update.
356 2015-07-24 Yao Qi <yao.qi@linaro.org>
358 * linux-low.c (linux_add_process): Don't set
359 proc->priv->new_inferior.
360 (linux_create_inferior): Set proc->priv->new_inferior to 1.
361 (linux_attach): Likewise.
363 2015-07-24 Yao Qi <yao.qi@linaro.org>
365 * server.c (start_inferior): Code refactor.
367 2015-07-24 Yao Qi <yao.qi@linaro.org>
369 * server.c (process_serial_event): Set general_thread.
371 2015-07-21 Yao Qi <yao.qi@linaro.org>
373 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
374 aarch64_linux_get_debug_reg_capacity.
376 2015-07-17 Yao Qi <yao.qi@linaro.org>
378 * Makefile.in (aarch64-linux-hw-point.o): New rule.
379 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
380 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
381 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
382 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
383 (AARCH64_HWP_ALIGNMENT): Likewise.
384 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
385 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
386 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
387 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
388 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
389 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
390 (struct aarch64_debug_reg_state): Likewise.
391 (struct arch_lwp_info): Likewise.
392 (aarch64_align_watchpoint): Likewise.
393 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
394 (aarch64_watchpoint_length): Likewise.
395 (aarch64_point_encode_ctrl_reg): Likewise
396 (aarch64_point_is_aligned): Likewise.
397 (aarch64_align_watchpoint): Likewise.
398 (aarch64_linux_set_debug_regs):
399 (aarch64_dr_state_insert_one_point): Likewise.
400 (aarch64_dr_state_remove_one_point): Likewise.
401 (aarch64_handle_breakpoint): Likewise.
402 (aarch64_handle_aligned_watchpoint): Likewise.
403 (aarch64_handle_unaligned_watchpoint): Likewise.
404 (aarch64_handle_watchpoint): Likewise.
406 2015-07-17 Yao Qi <yao.qi@linaro.org>
408 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
409 and don't aarch64_get_debug_reg_state. All callers update.
410 (aarch64_handle_aligned_watchpoint): Likewise.
411 (aarch64_handle_unaligned_watchpoint): Likewise.
412 (aarch64_handle_watchpoint): Likewise.
413 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
414 (aarch64_remove_point): Likewise.
416 2015-07-17 Yao Qi <yao.qi@linaro.org>
418 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
420 (aarch64_handle_unaligned_watchpoint): Likewise.
422 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
424 Revert the previous 3 commits:
425 Move gdb_regex* to common/
426 Move linux_find_memory_regions_full & co.
427 gdbserver build-id attribute generator
429 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
430 Jan Kratochvil <jan.kratochvil@redhat.com>
432 gdbserver build-id attribute generator.
433 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
434 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
435 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
437 (get_dynamic): Use find_pdhr to traverse program headers.
438 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
439 (compare_mapping_entry_range, struct find_memory_region_callback_data)
440 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
441 (get_hex_build_id): New.
442 (linux_qxfer_libraries_svr4): Add optional build-id attribute
443 to reply XML document.
445 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
446 Jan Kratochvil <jan.kratochvil@redhat.com>
448 * target.c: Include target/target-utils.h and fcntl.h.
449 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
450 (target_fileio_read_stralloc): New functions.
452 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
454 * Makefile.in (OBS): Add gdb_regex.o.
456 * config.in: Rebuilt.
457 * configure: Rebuilt.
459 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
460 Jan Kratochvil <jan.kratochvil@redhat.com>
462 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
463 * Makefile.in (OBS): Add target-utils.o.
464 (linux-maps.o, target-utils.o): New.
465 * configure.srv (srv_linux_obj): Add linux-maps.o.
467 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
469 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
471 (the_low_target): Install it.
473 2015-07-14 Pedro Alves <palves@redhat.com>
475 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
476 Instead, ignore ECHILD, and throw an error for other errnos.
478 2015-07-10 Pedro Alves <palves@redhat.com>
480 * event-loop.c (struct callback_event) <data>: Change type to
481 gdb_client_data instance instead of gdb_client_data pointer.
482 (append_callback_event): Adjust.
484 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
486 * linux-aarch64-low.c: Add comments for each linux_target_ops
487 method. Remove comments already covered in target_ops and
488 linux_target_ops definitions.
489 (the_low_target): Add comments for each unimplemented method.
491 2015-07-09 Yao Qi <yao.qi@linaro.org>
493 * linux-aarch64-low.c (aarch64_regmap): Remove.
494 (aarch64_usrregs_info): Remove.
495 (regs_info): Set field usrregs to NULL.
497 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
499 * linux-low.c: Include "rsp-low.h"
500 (linux_low_encode_pt_config, linux_low_encode_raw): New.
501 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
502 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
503 (handle_btrace_enable_pt): New.
504 (handle_btrace_general_set): Support "pt".
505 (handle_btrace_conf_general_set): Support "pt:size".
507 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
509 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
512 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
514 * linux-aarch64-low.c: Remove comment about endianness.
515 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
516 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
519 2015-06-24 Gary Benson <gbenson@redhat.com>
521 * linux-i386-ipa.c (stdint.h): Do not include.
522 * lynx-i386-low.c (stdint.h): Likewise.
523 * lynx-ppc-low.c (stdint.h): Likewise.
524 * mem-break.c (stdint.h): Likewise.
525 * thread-db.c (stdint.h): Likewise.
526 * tracepoint.c (stdint.h): Likewise.
527 * win32-low.c (stdint.h): Likewise.
529 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
531 * server.c (write_qxfer_response): Update call to
532 remote_escape_output.
534 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
535 Jan Kratochvil <jan.kratochvil@redhat.com>
537 Merge multiple hex conversions.
538 * gdbreplay.c (tohex): Rename to 'fromhex'.
539 (logchar): Use fromhex.
541 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
543 * server.c (handle_qxfer_libraries): Set `version' attribute for
546 2015-06-10 Gary Benson <gbenson@redhat.com>
548 * target.h (struct target_ops) <multifs_open>: New field.
549 <multifs_unlink>: Likewise.
550 <multifs_readlink>: Likewise.
551 * linux-low.c (nat/linux-namespaces.h): New include.
552 (linux_target_ops): Initialize the_target->multifs_open,
553 the_target->multifs_unlink and the_target->multifs_readlink.
554 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
555 * hostio.c (hostio_fs_pid): New static variable.
556 (hostio_handle_new_gdb_connection): New function.
557 (handle_setfs): Likewise.
558 (handle_open): Use the_target->multifs_open as appropriate.
559 (handle_unlink): Use the_target->multifs_unlink as appropriate.
560 (handle_readlink): Use the_target->multifs_readlink as
562 (handle_vFile): Handle vFile:setfs packets.
563 * server.c (handle_query): Call hostio_handle_new_gdb_connection
564 after target_handle_new_gdb_connection.
566 2015-06-10 Gary Benson <gbenson@redhat.com>
568 * configure.ac (AC_CHECK_FUNCS): Add setns.
569 * config.in: Regenerate.
570 * configure: Likewise.
571 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
572 (linux-namespaces.o): New rule.
573 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
575 2015-06-09 Gary Benson <gbenson@redhat.com>
577 * hostio.c (handle_open): Process mode argument with
580 2015-06-01 Yao Qi <yao.qi@linaro.org>
582 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
583 * linux-x86-low.c: Likewise.
585 2015-05-28 Don Breazeal <donb@codesourcery.com>
587 * linux-low.c (handle_extended_wait): Initialize
588 thread_info.last_resume_kind for new fork children.
590 2015-05-15 Pedro Alves <palves@redhat.com>
592 * target.h (target_handle_new_gdb_connection): Rewrite using if
595 2015-05-14 Joel Brobecker <brobecker@adacore.com>
597 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
598 * configure, config.in: Regenerate.
599 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
602 2015-05-12 Don Breazeal <donb@codesourcery.com>
604 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
605 PTRACE_EVENT_VFORK_DONE.
606 (linux_low_ptrace_options, extended_event_reported): Add vfork
608 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
609 and "vforkdone" for RSP 'T' Stop Reply Packet.
610 * server.h (report_vfork_events): Declare
613 2015-05-12 Don Breazeal <donb@codesourcery.com>
615 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
616 (the_low_target) <new_fork>: Initialize new member.
617 * linux-arm-low.c (arm_new_fork): New function.
618 (the_low_target) <new_fork>: Initialize new member.
619 * linux-low.c (handle_extended_wait): Call new target function
621 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
622 * linux-mips-low.c (mips_add_watchpoint): New function
623 extracted from mips_insert_point.
624 (the_low_target) <new_fork>: Initialize new member.
625 (mips_linux_new_fork): New function.
626 (mips_insert_point): Call mips_add_watchpoint.
627 * linux-x86-low.c (x86_linux_new_fork): New function.
628 (the_low_target) <new_fork>: Initialize new member.
630 2015-05-12 Don Breazeal <donb@codesourcery.com>
632 * linux-low.c (handle_extended_wait): Implement return value,
633 rename argument 'event_child' to 'event_lwp', handle
634 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
635 (linux_low_ptrace_options): New function.
636 (linux_low_filter_event): Call linux_low_ptrace_options,
637 use different argument fo linux_enable_event_reporting,
638 use return value from handle_extended_wait.
639 (extended_event_reported): New function.
640 (linux_wait_1): Call extended_event_reported and set
641 status to report fork events.
642 (linux_write_memory): Add pid to debug message.
643 (reset_lwp_ptrace_options_callback): New function.
644 (linux_handle_new_gdb_connection): New function.
645 (linux_target_ops): Initialize new structure member.
646 * linux-low.h (struct lwp_info) <waitstatus>: New member.
647 * lynx-low.c: Initialize new structure member.
648 * remote-utils.c (prepare_resume_reply): Implement stop reason
649 "fork" for "T" stop message.
650 * server.c (handle_query): Call handle_new_gdb_connection.
651 * server.h (report_fork_events): Declare global flag.
652 * target.h (struct target_ops) <handle_new_gdb_connection>:
654 (target_handle_new_gdb_connection): New macro.
655 * win32-low.c: Initialize new structure member.
657 2015-05-12 Don Breazeal <donb@codesourcery.com>
659 * mem-break.c (APPEND_TO_LIST): Define macro.
660 (clone_agent_expr): New function.
661 (clone_one_breakpoint): New function.
662 (clone_all_breakpoints): New function.
663 * mem-break.h: Declare new functions.
665 2015-05-12 Don Breazeal <donb@codesourcery.com>
667 * linux-low.c (linux_supports_fork_events): New function.
668 (linux_supports_vfork_events): New function.
669 (linux_target_ops): Initialize new structure members.
670 (initialize_low): Call linux_check_ptrace_features.
671 * lynx-low.c (lynx_target_ops): Initialize new structure
673 * server.c (report_fork_events, report_vfork_events):
675 (handle_query): Add new features to qSupported packet and
677 (captured_main): Initialize new global variables.
678 * target.h (struct target_ops) <supports_fork_events>:
680 <supports_vfork_events>: New member.
681 (target_supports_fork_events): New macro.
682 (target_supports_vfork_events): New macro.
683 * win32-low.c (win32_target_ops): Initialize new structure
686 2015-05-12 Gary Benson <gbenson@redhat.com>
688 * server.c (handle_qxfer_exec_file): Use current process
691 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
693 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
694 Remove HAVE_PTRACE_GETREGS conditionals.
695 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
696 instead of PTRACE_GETREGS and PTRACE_SETREGS.
698 2015-05-08 Yao Qi <yao.qi@linaro.org>
700 * linux-low.c (linux_supports_conditional_breakpoints): New
702 (linux_target_ops): Install new target method.
703 * lynx-low.c (lynx_target_ops): Install NULL hook for
704 supports_conditional_breakpoints.
705 * nto-low.c (nto_target_ops): Likewise.
706 * spu-low.c (spu_target_ops): Likewise.
707 * win32-low.c (win32_target_ops): Likewise.
708 * server.c (handle_query): Check
709 target_supports_conditional_breakpoints.
710 * target.h (struct target_ops) <supports_conditional_breakpoints>:
712 (target_supports_conditional_breakpoints): New macro.
714 2015-05-06 Pedro Alves <palves@redhat.com>
717 * server.c (start_inferior): If the process exits, mourn it.
719 2015-04-21 Gary Benson <gbenson@redhat.com>
721 * hostio.c (fileio_open_flags_to_host): Factored out to
722 fileio_to_host_openflags in common/fileio.c. Single use
725 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
727 * linux-xtensa-low.c (xtensa_fill_gregset)
728 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
731 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
733 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
734 (regs_info): Replace usrregs pointer with NULL.
736 2015-04-17 Gary Benson <gbenson@redhat.com>
738 * target.h (struct target_ops) <pid_to_exec_file>: New field.
739 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
740 * server.c (handle_qxfer_exec_file): New function.
741 (qxfer_packets): Add exec-file entry.
742 (handle_query): Report qXfer:exec-file:read as supported packet.
744 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
746 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
748 2015-04-09 Gary Benson <gbenson@redhat.com>
750 * hostio-errno.c (errno_to_fileio_error): Remove function.
751 Update caller to use remote_fileio_to_fio_error.
753 2015-04-09 Yao Qi <yao.qi@linaro.org>
755 * linux-low.c (linux_insert_point): Call
756 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
757 (linux_remove_point): Call remove_memory_breakpoint if type is
759 * linux-x86-low.c (x86_insert_point): Don't call
760 insert_memory_breakpoint.
761 (x86_remove_point): Don't call remove_memory_breakpoint.
763 2015-04-01 Pedro Alves <palves@redhat.com>
764 Cleber Rosa <crosa@redhat.com>
766 * server.c (gdbserver_usage): Reorganize and extend the usage
769 2015-03-24 Pedro Alves <palves@redhat.com>
771 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
772 output. Also dump TRAP_TRACE.
773 (linux_low_filter_event): In debug output, distinguish a
774 resume_stop SIGSTOP from a delayed SIGSTOP.
776 2015-03-24 Gary Benson <gbenson@redhat.com>
778 * linux-x86-low.c (x86_linux_new_thread): Moved to
780 (x86_linux_prepare_to_resume): Likewise.
782 2015-03-24 Gary Benson <gbenson@redhat.com>
784 * Makefile.in (x86-linux-dregs.o): New rule.
785 * configure.srv: Add x86-linux-dregs.o to relevant targets.
786 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
787 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
788 (x86_linux_dr_get): Likewise.
789 (x86_linux_dr_set): Likewise.
790 (update_debug_registers_callback): Likewise.
791 (x86_linux_dr_set_addr): Likewise.
792 (x86_linux_dr_get_addr): Likewise.
793 (x86_linux_dr_set_control): Likewise.
794 (x86_linux_dr_get_control): Likewise.
795 (x86_linux_dr_get_status): Likewise.
796 (x86_linux_update_debug_registers): Likewise.
798 2015-03-24 Gary Benson <gbenson@redhat.com>
800 * linux-x86-low.c (x86_linux_update_debug_registers):
801 New function, factored out from...
802 (x86_linux_prepare_to_resume): ...this.
804 2015-03-24 Gary Benson <gbenson@redhat.com>
806 * linux-x86-low.c (x86_linux_dr_get): Update comments.
807 (x86_linux_dr_set): Likewise.
808 (update_debug_registers_callback): Likewise.
809 (x86_linux_dr_set_addr): Likewise.
810 (x86_linux_dr_get_addr): Likewise.
811 (x86_linux_dr_set_control): Likewise.
812 (x86_linux_dr_get_control): Likewise.
813 (x86_linux_dr_get_status): Likewise.
814 (x86_linux_prepare_to_resume): Likewise.
816 2015-03-24 Gary Benson <gbenson@redhat.com>
818 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
819 Use perror_with_name. Pass string through gettext.
820 (x86_linux_dr_set): Likewise.
822 2015-03-24 Gary Benson <gbenson@redhat.com>
824 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
825 (x86_linux_dr_set_addr): ...this.
826 (x86_dr_low_get_addr): Rename to...
827 (x86_linux_dr_get_addr): ...this.
828 (x86_dr_low_set_control): Rename to...
829 (x86_linux_dr_set_control): ...this.
830 (x86_dr_low_get_control): Rename to...
831 (x86_linux_dr_get_control): ...this.
832 (x86_dr_low_get_status): Rename to...
833 (x86_linux_dr_get_status): ...this.
834 (x86_dr_low): Update with new function names.
836 2015-03-24 Gary Benson <gbenson@redhat.com>
838 * Makefile.in (x86-linux.o): New rule.
839 * configure.srv: Add x86-linux.o to relevant targets.
840 * linux-low.c (lwp_set_arch_private_info): New function.
841 (lwp_arch_private_info): Likewise.
842 * linux-x86-low.c: Include nat/x86-linux.h.
843 (arch_lwp_info): Removed structure.
844 (update_debug_registers_callback):
845 Use lwp_set_debug_registers_changed.
846 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
847 and lwp_set_debug_registers_changed.
848 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
850 2015-03-24 Gary Benson <gbenson@redhat.com>
852 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
853 * linux-arm-low.c (arm_new_thread): Likewise.
854 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
855 * linux-mips-low.c (mips_linux_new_thread): Likewise.
856 * linux-x86-low.c (x86_linux_new_thread): Likewise.
857 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
859 2015-03-24 Gary Benson <gbenson@redhat.com>
861 * linux-low.c (ptid_of_lwp): New function.
862 (lwp_is_stopped): Likewise.
863 (lwp_stop_reason): Likewise.
864 * linux-x86-low.c (update_debug_registers_callback):
866 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
869 2015-03-24 Gary Benson <gbenson@redhat.com>
871 * linux-low.h (linux_stop_lwp): Remove declaration.
873 2015-03-24 Gary Benson <gbenson@redhat.com>
875 * linux-low.h: Include nat/linux-nat.h.
876 * linux-low.c (iterate_over_lwps_args): New structure.
877 (iterate_over_lwps_filter): New function.
878 (iterate_over_lwps): Likewise.
879 * linux-x86-low.c (update_debug_registers_callback):
880 Update signature to what iterate_over_lwps expects.
881 Remove PID check that iterate_over_lwps now performs.
882 (x86_dr_low_set_addr): Use iterate_over_lwps.
883 (x86_dr_low_set_control): Likewise.
885 2015-03-24 Gary Benson <gbenson@redhat.com>
887 * linux-x86-low.c (x86_debug_reg_state): New function.
888 (x86_linux_prepare_to_resume): Use the above.
890 2015-03-24 Gary Benson <gbenson@redhat.com>
892 * linux-low.c (current_lwp_ptid): New function.
893 * linux-x86-low.c: Include nat/linux-nat.h.
894 (x86_dr_low_get_addr): Use current_lwp_ptid.
895 (x86_dr_low_get_control): Likewise.
896 (x86_dr_low_get_status): Likewise.
898 2015-03-20 Pedro Alves <palves@redhat.com>
900 * tracepoint.c (cmd_qtstatus): Make "str" const.
902 2015-03-20 Pedro Alves <palves@redhat.com>
904 * server.c (handle_general_set): Make "req_str" const.
906 2015-03-19 Pedro Alves <palves@redhat.com>
908 * linux-low.c (linux_resume_one_lwp): Rename to ...
909 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
910 instead call perror_with_name.
911 (check_ptrace_stopped_lwp_gone): New function.
912 (linux_resume_one_lwp): Reimplement as wrapper around
913 linux_resume_one_lwp_throw that swallows errors if the LWP is
916 2015-03-19 Pedro Alves <palves@redhat.com>
918 * linux-low.c (count_events_callback, select_event_lwp_callback):
919 No longer check whether the thread has resume_stop as last resume
922 2015-03-19 Pedro Alves <palves@redhat.com>
924 * linux-low.c (count_events_callback, select_event_lwp_callback):
925 Use the lwp's status_pending_p field, not the thread's.
927 2015-03-19 Pedro Alves <palves@redhat.com>
929 * linux-low.c (select_event_lwp_callback): Update comments to
930 no longer mention SIGTRAP.
932 2015-03-18 Gary Benson <gbenson@redhat.com>
934 * server.c (handle_query): Do not report vFile:fstat as supported.
936 2015-03-11 Gary Benson <gbenson@redhat.com>
938 * hostio.c (sys/types.h): New include.
939 (sys/stat.h): Likewise.
940 (common-remote-fileio.h): Likewise.
941 (handle_fstat): New function.
942 (handle_vFile): Handle vFile:fstat packets.
944 2015-03-11 Gary Benson <gbenson@redhat.com>
946 * configure.ac (AC_CHECK_MEMBERS): Add checks for
947 struct stat.st_blocks and struct stat.st_blksize.
948 * configure: Regenerate.
949 * config.in: Likewise.
950 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
951 (OBS): Add common-remote-fileio.o.
952 (common-remote-fileio.o): New rule.
954 2015-03-09 Pedro Alves <palves@redhat.com>
956 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
957 'struct sockaddr' pointer in 'accept' call.
959 2015-03-09 Pedro Alves <palves@redhat.com>
962 2015-03-07 Pedro Alves <palves@redhat.com>
963 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
964 or <winsock2.h> here. Instead include "gdb_socket.h".
965 (remote_open): Use union gdb_sockaddr_u.
966 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
967 or <winsock2.h> here. Instead include "gdb_socket.h".
968 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
969 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
971 (init_named_socket, gdb_agent_helper_thread): Use union
974 2015-03-07 Pedro Alves <palves@redhat.com>
976 * configure.ac (build_warnings): Move
977 -Wdeclaration-after-statement to the C-specific set.
978 * configure: Regenerate.
980 2015-03-07 Pedro Alves <palves@redhat.com>
982 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
983 or <winsock2.h> here. Instead include "gdb_socket.h".
984 (remote_open): Use union gdb_sockaddr_u.
985 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
986 or <winsock2.h> here. Instead include "gdb_socket.h".
987 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
988 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
990 (init_named_socket, gdb_agent_helper_thread): Use union
993 2015-03-07 Pedro Alves <palves@redhat.com>
995 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
998 2015-03-06 Yao Qi <yao.qi@linaro.org>
1000 * linux-aarch64-low.c (aarch64_insert_point): Use
1001 show_debug_regs as a boolean.
1002 (aarch64_remove_point): Likewise.
1004 2015-03-05 Pedro Alves <palves@redhat.com>
1006 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1007 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1008 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1009 * nto-low.c (nto_target_ops): Likewise.
1010 * spu-low.c (spu_target_ops): Likewise.
1011 * win32-low.c (win32_target_ops): Likewise.
1013 2015-03-04 Pedro Alves <palves@redhat.com>
1015 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1016 Decide whether a breakpoint triggered based on the SIGTRAP's
1018 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1019 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1020 (linux_low_filter_event): Check for breakpoints before checking
1022 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1024 (linux_stopped_by_sw_breakpoint)
1025 (linux_supports_stopped_by_sw_breakpoint)
1026 (linux_stopped_by_hw_breakpoint)
1027 (linux_supports_stopped_by_hw_breakpoint): New functions.
1028 (linux_target_ops): Install new target methods.
1030 2015-03-04 Pedro Alves <palves@redhat.com>
1032 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1033 * server.c (swbreak_feature, hwbreak_feature): New globals.
1034 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1035 (captured_main): Clear swbreak_feature and hwbreak_feature.
1036 * server.h (swbreak_feature, hwbreak_feature): Declare.
1037 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1038 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1039 supports_stopped_by_hw_breakpoint>: New fields.
1040 (target_supports_stopped_by_sw_breakpoint)
1041 (target_stopped_by_sw_breakpoint)
1042 (target_supports_stopped_by_hw_breakpoint)
1043 (target_stopped_by_hw_breakpoint): Declare.
1045 2015-03-04 Pedro Alves <palves@redhat.com>
1047 enum lwp_stop_reason -> enum target_stop_reason
1048 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1049 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1050 (linux_wait_1, stuck_in_jump_pad_callback)
1051 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1052 (linux_stopped_by_watchpoint):
1053 * linux-low.h (enum lwp_stop_reason): Delete.
1054 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1055 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1057 2015-03-04 Yao Qi <yao.qi@linaro.org>
1059 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1061 2015-03-03 Gary Benson <gbenson@redhat.com>
1063 * hostio.c (handle_vFile): Fix prefix lengths.
1065 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1067 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1070 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1072 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1073 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1074 (clean): Add "rm -f" for above C files.
1075 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1076 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1077 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1078 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1079 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1080 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1081 (init_registers_s390x_vx_linux64)
1082 (init_registers_s390x_tevx_linux64)
1083 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1084 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1086 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1087 (s390_store_vxrs_high): New functions.
1088 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1090 (s390_arch_setup): Add logic for selecting one of the new target
1091 descriptions. Activate the new vector regsets if applicable.
1092 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1093 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1094 and init_registers_s390x_tevx_linux64.
1096 2015-03-01 Pedro Alves <palves@redhat.com>
1098 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1101 2015-02-27 Pedro Alves <palves@redhat.com>
1103 * linux-x86-low.c (u_debugreg_offset): New function.
1104 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1106 2015-02-27 Pedro Alves <palves@redhat.com>
1108 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1109 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1110 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1111 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1112 (ps_lsetfpregs, ps_getpid)
1113 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1114 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1115 (ps_lsetxregs, ps_plog): Declare.
1117 2015-02-27 Pedro Alves <palves@redhat.com>
1119 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1120 IP_AGENT_EXPORT_FUNC.
1121 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1122 IP_AGENT_EXPORT_FUNC.
1123 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1124 (IP_AGENT_EXPORT): Delete.
1125 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1126 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1127 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1128 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1129 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1130 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1131 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1132 (traceframe_read_count, traceframe_write_count)
1133 (traceframes_created, trace_state_variables, get_raw_reg)
1134 (get_trace_state_variable_value, set_trace_state_variable_value)
1135 (ust_loaded, helper_thread_id, cmd_buf): Use
1136 IPA_SYM_EXPORTED_NAME.
1137 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1138 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1139 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1140 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1141 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1142 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1143 EXTERN_C_PUSH/EXTERN_C_POP.
1144 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1145 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1146 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1147 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1148 (traceframe_write_count, traceframe_read_count)
1149 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1150 (about_to_request_buffer_space, get_trace_state_variable_value)
1151 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1152 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1153 EXTERN_C_PUSH/EXTERN_C_POP.
1154 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1155 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1156 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1157 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1158 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1159 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1160 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1161 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1163 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1164 (IP_AGENT_EXPORT_VAR_DECL): Define.
1166 (gdb_agent_get_raw_reg): Declare.
1168 2015-02-27 Tom Tromey <tromey@redhat.com>
1169 Pedro Alves <palves@redhat.com>
1171 Rename symbols whose names are reserved C++ keywords throughout.
1173 2015-02-27 Pedro Alves <palves@redhat.com>
1175 * Makefile.in (COMPILER): New, get it from autoconf.
1176 (CXX): Get from autoconf instead.
1177 (COMPILE.pre): Use COMPILER.
1178 (CC-LD): Rename to ...
1179 (CC_LD): ... this. Use COMPILER.
1180 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1181 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1182 * acinclude.m4: Include build-with-cxx.m4.
1183 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1184 Disable -Werror by default if building in C++ mode.
1185 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1186 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1187 the C++ compiler. Save/restore CXXFLAGS too.
1188 * configure: Regenerate.
1190 2015-02-27 Pedro Alves <palves@redhat.com>
1192 * acinclude.m4: Include libiberty.m4.
1193 * configure.ac: Call libiberty_INIT.
1194 * config.in, configure: Regenerate.
1196 2015-02-26 Pedro Alves <palves@redhat.com>
1198 * linux-low.c (linux_wait_1): When incrementing the PC past a
1199 program breakpoint always use the_low_target.breakpoint_len as
1200 increment, rather than the maximum between that and
1201 the_low_target.decr_pc_after_break.
1203 2015-02-23 Pedro Alves <palves@redhat.com>
1205 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1206 thread was doing a step-over; always adjust the PC if
1207 we stepped over a permanent breakpoint.
1208 (linux_wait_1): If we stepped over breakpoint that was on top of a
1209 permanent breakpoint, manually advance the PC past it.
1211 2015-02-23 Pedro Alves <palves@redhat.com>
1213 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1215 (x86_fill_gregset, x86_store_gregset): Use it when handling
1218 2015-02-20 Pedro Alves <palves@redhat.com>
1220 * thread-db.c: Include "nat/linux-procfs.h".
1221 (thread_db_init): Skip listing new threads if the kernel supports
1222 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1224 2015-02-20 Pedro Alves <palves@redhat.com>
1226 * linux-low.c (status_pending_p_callback): Use ptid_match.
1228 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1230 PR breakpoints/16812
1231 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1232 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1233 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1235 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1237 PR breakpoints/15956
1238 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1240 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1242 * linux-low.c (linux_low_btrace_conf): Print size.
1243 * server.c (handle_btrace_conf_general_set): New.
1244 (hanle_general_set): Call handle_btrace_conf_general_set.
1245 (handle_query): Report Qbtrace-conf:bts:size as supported.
1247 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1249 * linux-low.c (linux_low_enable_btrace): Update parameters.
1250 (linux_low_btrace_conf): New.
1251 (linux_target_ops)<to_btrace_conf>: Initialize.
1252 * server.c (current_btrace_conf): New.
1253 (handle_btrace_enable): Rename to ...
1254 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
1255 to target_enable_btrace. Update comment. Update users.
1256 (handle_qxfer_btrace_conf): New.
1257 (qxfer_packets): Add btrace-conf entry.
1258 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1259 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1260 (target_ops)<read_btrace_conf>: New.
1261 (target_enable_btrace): Update parameters.
1262 (target_read_btrace_conf): New.
1264 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1266 * server.c (handle_btrace_general_set): Remove call to
1267 target_supports_btrace.
1268 (supported_btrace_packets): New.
1269 (handle_query): Call supported_btrace_packets.
1270 * target.h: include btrace-common.h.
1271 (btrace_target_info): Removed.
1272 (supports_btrace, target_supports_btrace): Update parameters.
1274 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1276 * Makefile.in (SFILES): Add common/btrace-common.c.
1277 (OBS): Add common/btrace-common.o.
1278 (btrace-common.o): Add build rules.
1279 * linux-low: Include btrace-common.h.
1280 (linux_low_read_btrace): Use struct btrace_data. Call
1281 btrace_data_init and btrace_data_fini.
1283 2015-02-06 Pedro Alves <palves@redhat.com>
1285 * thread-db.c (find_new_threads_callback): Add debug output.
1287 2015-02-04 Pedro Alves <palves@redhat.com>
1289 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1290 (resume_stopped_resumed_lwps): New function.
1291 (linux_wait_for_event_filtered): Use it.
1293 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1295 * Makefile.in (SFILES): Add linux-personality.c.
1296 (linux-personality.o): New rule.
1297 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1298 list of objects to be built.
1299 * linux-low.c: Include nat/linux-personality.h.
1300 (linux_create_inferior): Remove code to disable address space
1301 randomization (moved to ../nat/linux-personality.c). Create
1302 cleanup to disable address space randomization.
1304 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1306 * Makefile.in (posix-strerror.o): New rule.
1307 (mingw-strerror.o): Likewise.
1308 * configure: Regenerated.
1309 * configure.ac: Source file ../common/common.host. Initialize new
1310 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1312 2015-01-14 Yao Qi <yao@codesourcery.com>
1314 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1315 (ppc-linux.o): New rule.
1316 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1317 * configure.ac: AC_CHECK_FUNCS(getauxval).
1318 * config.in: Re-generated.
1319 * configure: Re-generated.
1320 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1321 ppc64_64bit_inferior_p
1323 2015-01-14 Yao Qi <yao@codesourcery.com>
1325 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1326 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1327 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1328 (PT_ORIG_R3, PT_TRAP): Likewise.
1329 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1330 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1331 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1333 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1335 * i387-fp.c (i387_cache_to_xsave): In look over
1336 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1337 zmmh_low_space field by use of zmmh_high_space.
1339 2015-01-09 Pedro Alves <palves@redhat.com>
1341 * linux-low.c (step_over_bkpt): Move higher up in the file.
1342 (handle_extended_wait): Don't store the stop_pc here.
1343 (get_stop_pc): Adjust comments and rename to ...
1344 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1345 stopped for a software breakpoint or hardware breakpoint.
1346 (thread_still_has_status_pending_p): New function.
1347 (status_pending_p_callback): Use
1348 thread_still_has_status_pending_p. If the event is no longer
1349 interesting, resume the LWP.
1350 (handle_tracepoints): Add assert.
1351 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1352 (wstatus_maybe_breakpoint): New function.
1353 (cancel_breakpoint): Delete function.
1354 (check_stopped_by_watchpoint): New function, factored out from
1355 linux_low_filter_event.
1356 (lp_status_maybe_breakpoint): Delete function.
1357 (linux_low_filter_event): Remove filter_ptid argument.
1358 Leave thread group exits pending here. Store the LWP's stop PC.
1359 Always leave events pending.
1360 (linux_wait_for_event_filtered): Pull all events out of the
1361 kernel, and leave them all pending.
1362 (count_events_callback, select_event_lwp_callback): Consider all
1364 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1365 (select_event_lwp): Only give preference to the stepping LWP in
1366 all-stop mode. Adjust comments.
1367 (ignore_event): New function.
1368 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1369 references to cancel_breakpoints. Adjust to renames. Also give
1370 equal priority to all LWPs that have had events in non-stop mode.
1371 If reporting a software breakpoint event, unadjust the LWP's PC.
1372 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1373 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1375 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1376 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1377 (linux_stopped_by_watchpoint): Adjust.
1378 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1379 * linux-low.h (enum lwp_stop_reason): New.
1380 (struct lwp_info) <stop_pc>: Adjust comment.
1381 <stopped_by_watchpoint>: Delete field.
1382 <stop_reason>: New field.
1383 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1384 * mem-break.c (software_breakpoint_inserted_here)
1385 (hardware_breakpoint_inserted_here): New function.
1386 * mem-break.h (software_breakpoint_inserted_here)
1387 (hardware_breakpoint_inserted_here): Declare.
1388 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1389 (cancel_breakpoints): Delete.
1390 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1391 (upload_fast_traceframes): Remove references to
1394 2015-01-09 Pedro Alves <palves@redhat.com>
1396 * thread-db.c (find_new_threads_callback): Ignore thread if the
1397 kernel thread ID is -1.
1399 2015-01-09 Pedro Alves <palves@redhat.com>
1401 * linux-low.c (linux_attach_fail_reason_string): Move to
1402 nat/linux-ptrace.c, and rename.
1403 (linux_attach_lwp): Update comment.
1404 (attach_proc_task_lwp_callback): New function.
1405 (linux_attach): Adjust to rename and use
1406 linux_proc_attach_tgid_threads.
1407 (linux_attach_fail_reason_string): Delete declaration.
1409 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1411 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1412 * server.c (gdbserver_version): Likewise.
1414 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1416 * remote-utils.c: Include ctype.h.
1417 (input_interrupt): Explicitly handle the case when the char
1418 received is the NUL byte. Improve the printing of non-ASCII
1421 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1423 * linux-low.c (linux_low_filter_event): Update call to
1424 linux_enable_event_reporting following the addition of
1425 a new parameter to that function.
1427 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1430 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1431 (AARCH64_FPCR_REGNO): Likewise.
1432 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1433 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1434 (aarch64_store_fpregset): Likewise.
1436 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1438 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1439 Remove FIXME comment about assumption about N.
1441 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1443 * configure.ac: If large-file support is disabled in GDBserver,
1444 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1445 * configure: Regenerate.
1447 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1449 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1450 warning upon ENODATA from ptrace.
1451 * linux-s390-low.c (s390_store_tdb): New.
1452 (s390_regsets): Add regset for NT_S390_TDB.
1454 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1456 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1457 without a fill_function.
1458 * linux-s390-low.c (s390_fill_last_break): Remove.
1459 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1460 (s390_arch_setup): Use regset's size instead of fill_function for
1463 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1465 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1466 the regset's store function when ptrace returned an error.
1467 * regcache.c (get_thread_regcache): Invalidate register cache
1468 before fetching inferior's registers.
1470 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1472 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1473 while-loop as for-loop.
1474 (regsets_store_inferior_registers): Likewise.
1476 2014-11-28 Yao Qi <yao@codesourcery.com>
1478 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1479 * config.in, configure: Re-generate.
1480 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1483 2014-11-21 Yao Qi <yao@codesourcery.com>
1485 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1486 (AC_CHECK_HEADERS): Remove malloc.h.
1487 * configure: Re-generated.
1488 * config.in: Re-generated.
1489 * server.h: Don't include alloca.h and malloc.h.
1490 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1491 Don't include malloc.h.
1493 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1495 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1496 corresponding ERRNO check in same block.
1498 2014-11-12 Pedro Alves <palves@redhat.com>
1500 * server.c (cont_thread): Update comment.
1501 (start_inferior, attach_inferior): No longer clear cont_thread.
1502 (handle_v_cont): No longer set cont_thread.
1503 (captured_main): Clear cont_thread each time a GDB connects.
1505 2014-11-12 Pedro Alves <palves@redhat.com>
1507 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1508 thread, and don't resume all threads if the Hc thread has exited.
1510 2014-11-12 Pedro Alves <palves@redhat.com>
1512 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1513 the process group instead of to a specific LWP.
1515 2014-10-15 Pedro Alves <palves@redhat.com>
1518 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1520 (arm_set_thread_context): Delete.
1521 (the_low_target): Adjust.
1522 * win32-i386-low.c (debug_registers_changed)
1523 (debug_registers_used): Delete.
1524 (update_debug_registers_callback): New function.
1525 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1526 needing to update their debug registers.
1527 (win32_get_current_dr): New function.
1528 (x86_dr_low_get_addr, x86_dr_low_get_control)
1529 (x86_dr_low_get_status): Fetch the debug register from the thread
1531 (i386_initial_stuff): Adjust.
1532 (i386_get_thread_context): Remove current_event parameter. Don't
1533 clear debug_registers_changed nor copy DR values to
1535 (i386_set_thread_context): Delete.
1536 (i386_prepare_to_resume): New function.
1537 (i386_thread_added): Mark the thread as needing to update irs
1539 (the_low_target): Remove i386_set_thread_context and install
1540 i386_prepare_to_resume.
1541 * win32-low.c (win32_get_thread_context): Adjust.
1542 (win32_set_thread_context): Use SetThreadContext
1544 (win32_prepare_to_resume): New function.
1545 (win32_require_context): New function, factored out from ...
1546 (thread_rec): ... this.
1547 (continue_one_thread): Call win32_prepare_to_resume on each thread
1548 we're about to continue.
1549 (win32_resume): Call win32_prepare_to_resume on the event thread.
1550 * win32-low.h (struct win32_thread_info)
1551 <debug_registers_changed>: New field.
1552 (struct win32_target_ops): Change prototype of set_thread_context,
1553 delete set_thread_context and add prepare_to_resume.
1554 (win32_require_context): New declaration.
1556 2014-10-08 Gary Benson <gbenson@redhat.com>
1558 * server.h: Do not include common-exceptions.h.
1560 2014-10-08 Gary Benson <gbenson@redhat.com>
1562 * server.h: Do not include cleanups.h.
1564 2014-09-30 James Hogan <james.hogan@imgtec.com>
1566 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1569 2014-09-23 Yao Qi <yao@codesourcery.com>
1571 * linux-low.c (lp_status_maybe_breakpoint): New function.
1572 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1573 (count_events_callback): Likewise.
1574 (select_event_lwp_callback): Likewise.
1575 (cancel_breakpoints_callback): Likewise.
1577 2014-09-19 Don Breazeal <donb@codesourcery.com>
1579 * linux-low.c (handle_extended_wait): Call
1580 linux_ptrace_get_extended_event.
1581 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1582 linux_is_extended_waitstatus.
1584 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1586 * Makefile.in (CPPFLAGS): Define.
1587 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1588 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1590 2014-09-16 Gary Benson <gbenson@redhat.com>
1592 * inferiors.h (current_inferior): Renamed as...
1593 (current_thread): New variable. All uses updated.
1594 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1595 (maybe_move_out_of_jump_pad): Likewise.
1596 (cancel_breakpoint): Likewise.
1597 (linux_low_filter_event): Likewise.
1598 (wait_for_sigstop): Likewise.
1599 (linux_resume_one_lwp): Likewise.
1600 (need_step_over_p): Likewise.
1601 (start_step_over): Likewise.
1602 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1603 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1604 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1605 and save_inferior as saved_thread.
1606 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1608 (regcache_invalidate_thread): Likewise.
1609 * remote-utils.c (prepare_resume_reply): Likewise.
1610 * thread-db.c (thread_db_get_tls_address): Likewise.
1611 (disable_thread_event_reporting): Likewise.
1612 (remove_thread_event_breakpoints): Likewise.
1613 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1615 * target.h (set_desired_inferior): Renamed as...
1616 (set_desired_thread): New declaration. All uses updated.
1617 * server.c (myresume): Updated comment to reference thread instead
1619 (handle_serial_event): Likewise.
1620 (handle_target_event): Likewise.
1622 2014-09-12 Tom Tromey <tromey@redhat.com>
1623 Gary Benson <gbenson@redhat.com>
1625 * regcache.h: Include common-regcache.h.
1626 (regcache_read_pc): Don't declare.
1627 * regcache.c (get_thread_regcache_for_ptid): New function.
1629 2014-09-11 Tom Tromey <tromey@redhat.com>
1630 Gary Benson <gbenson@redhat.com>
1632 * symbol.c: New file.
1633 * Makefile.in (SFILES): Add symbol.c.
1634 (OBS): Add symbol.o.
1636 2014-09-11 Gary Benson <gbenson@redhat.com>
1638 * target.c (target_stop_ptid, target_continue_ptid): New
1641 2014-09-11 Tom Tromey <tromey@redhat.com>
1642 Gary Benson <gbenson@redhat.com>
1644 * target.h: Include target/target.h.
1645 * target.c (target_read_memory, target_read_uint32)
1646 (target_write_memory): New functions.
1648 2014-09-11 Gary Benson <gbenson@redhat.com>
1650 * server.h (debug_hw_points): Don't declare.
1651 * server.c (debug_hw_points): Don't define. Replace all uses
1652 with show_debug_regs.
1653 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1654 all uses with show_debug_regs.
1656 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1658 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1659 endianness into account.
1660 (ppc_supply_ptrace_register): Likewise.
1662 2014-09-03 James Hogan <james.hogan@imgtec.com>
1664 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1665 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1667 2014-09-03 Gary Benson <gbenson@redhat.com>
1669 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1670 ALL_DEBUG_ADDRESS_REGISTERS.
1672 2014-09-02 Gary Benson <gbenson@redhat.com>
1674 * i386-low.h: Renamed as...
1675 * x86-low.h: New file. All type, function and variable name
1676 prefixes changed from "i386_" to "x86_". All references updated.
1677 * i386-low.c: Renamed as...
1678 * x86-low.c: New file. All type, function and variable name
1679 prefixes changed from "i386_" to "x86_". All references updated.
1681 2014-09-02 Gary Benson <gbenson@redhat.com>
1683 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1684 (x86_linux_new_thread): Likewise.
1686 2014-08-29 Gary Benson <gbenson@redhat.com>
1688 * server.h (setjmp.h): Do not include.
1689 (toplevel): Do not declare.
1690 (common-exceptions.h): Include.
1691 (cleanups.h): Likewise.
1692 * server.c (toplevel): Do not define.
1693 (exit_code): New static global.
1694 (detach_or_kill_for_exit_cleanup): New function.
1695 (main): New function. Original main renamed to...
1696 (captured_main): New function.
1697 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1699 2014-08-29 Gary Benson <gbenson@redhat.com>
1701 * Makefile.in (SFILES): Add common/common-exceptions.c.
1702 (OBS): Add common-exceptions.o.
1703 (common-exceptions.o): New rule.
1704 * utils.c (prepare_to_throw_exception): New function.
1706 2014-08-29 Gary Benson <gbenson@redhat.com>
1708 * config.in: Regenerate.
1709 * configure: Likewise.
1711 2014-08-29 Gary Benson <gbenson@redhat.com>
1713 * Makefile.in (SFILES): Add common/cleanups.c.
1715 (cleanups.o): New rule.
1717 2014-08-29 Gary Benson <gbenson@redhat.com>
1719 * utils.c (internal_vwarning): New function.
1721 2014-08-28 Gary Benson <gbenson@redhat.com>
1723 * utils.h (fatal): Remove declaration.
1724 * utils.c (fatal): Remove function.
1726 2014-08-28 Gary Benson <gbenson@redhat.com>
1728 * tracepoint.c (gdb_agent_init): Replace fatal with
1730 (initialize_tracepoint): Likewise.
1732 2014-08-28 Gary Benson <gbenson@redhat.com>
1734 * remote-utils.c (remote_prepare): Replace fatal with error.
1736 2014-08-28 Gary Benson <gbenson@redhat.com>
1738 * linux-low.c (linux_async): Replace fatal with warning.
1740 (linux_start_non_stop): Return -1 if linux_async failed.
1742 2014-08-28 Gary Benson <gbenson@redhat.com>
1744 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1746 (i386_dr_low_get_addr): Remove vague comment.
1747 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1750 2014-08-28 Gary Benson <gbenson@redhat.com>
1752 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1753 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1755 (linux_resume_one_lwp): Likewise.
1756 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1758 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1759 with internal_error.
1760 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1761 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1762 (find_register_by_name): Replace fatal with internal_error.
1763 (find_regno): Likewise.
1764 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1765 * thread-db.c (thread_db_create_event): Likewise.
1766 (thread_db_load_search): Likewise.
1767 (try_thread_db_load_1): Likewise.
1768 * tracepoint.c (get_jump_space_head): Replace fatal with
1770 (claim_trampoline_space): Likewise.
1771 (have_fast_tracepoint_trampoline_buffer): Likewise.
1772 (cmd_qtstart): Likewise.
1773 (stop_tracing): Likewise.
1774 (fast_tracepoint_collecting): Likewise.
1775 (target_malloc): Likewise.
1776 (download_tracepoint): Likewise.
1777 (download_trace_state_variables): Replace check with gdb_assert.
1778 (upload_fast_traceframes): Replace fatal with internal_error.
1780 2014-08-19 Tom Tromey <tromey@redhat.com>
1781 Gary Benson <gbenson@redhat.com>
1783 * Makefile.in (SFILES): Add common/common-debug.c.
1784 (OBS): Add common-debug.o.
1785 (common-debug.o): New rule.
1786 * debug.h (debug_printf): Don't declare.
1787 * debug.c (debug_printf): Renamed and rewritten as...
1788 (debug_vprintf): New function.
1790 2014-08-19 Gary Benson <gbenson@redhat.com>
1792 * utils.h: Do not include print-utils.h.
1794 2014-08-19 Tom Tromey <tromey@redhat.com>
1795 Gary Benson <gbenson@redhat.com>
1797 * server.h: Add static assertion.
1798 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1800 2014-08-19 Tom Tromey <tromey@redhat.com>
1801 Gary Benson <gbenson@redhat.com>
1803 * Makefile.in (SFILES): Add common/errors.c.
1804 (OBS): Add errors.o.
1805 (IPA_OBS): Add errors-ipa.o.
1806 (errors.o): New rule.
1807 (errors-ipa.o): Likewise.
1808 * utils.h (perror_with_name, error, warning): Don't declare.
1809 * utils.c (warning): Renamed and rewritten as...
1810 (vwarning): New function.
1811 (error): Renamed and rewritten as...
1812 (verror): New function.
1813 (internal_error): Renamed and rewritten as...
1814 (internal_verror): New function.
1816 2014-08-07 Gary Benson <gbenson@redhat.com>
1818 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1819 * configure: Regenerate.
1820 * config.in: Likewise.
1821 * server.h: Do not include errno.h.
1822 * event-loop.c: Likewise.
1823 * hostio-errno.c: Likewise.
1824 * linux-low.c: Likewise.
1825 * remote-utils.c: Likewise.
1826 * spu-low.c: Likewise.
1827 * utils.c: Likewise.
1828 * gdbreplay.c: Unconditionally include errno.h.
1830 2014-08-07 Gary Benson <gbenson@redhat.com>
1832 * server.h: Do not include string.h.
1833 * event-loop.c: Likewise.
1834 * linux-low.c: Likewise.
1835 * regcache.c: Likewise.
1836 * remote-utils.c: Likewise.
1837 * spu-low.c: Likewise.
1838 * utils.c: Likewise.
1840 2014-08-07 Gary Benson <gbenson@redhat.com>
1842 * server.h: Do not include gdb_assert.h.
1844 2014-08-07 Gary Benson <gbenson@redhat.com>
1846 * server.h: Do not include common-utils.h.
1848 2014-08-07 Gary Benson <gbenson@redhat.com>
1850 * server.h: Do not include ptid.h.
1851 * notif.h: Likewise.
1853 2014-08-07 Gary Benson <gbenson@redhat.com>
1855 * server.h: Do not include gdb_locale.h.
1857 2014-08-07 Gary Benson <gbenson@redhat.com>
1859 * server.h: Do not include gdb/signals.h.
1860 * win32-low.c: Likewise.
1862 2014-08-07 Gary Benson <gbenson@redhat.com>
1864 * server.h: Do not include pathmax.h.
1866 2014-08-07 Gary Benson <gbenson@redhat.com>
1868 * server.h: Do not include libiberty.h.
1869 * linux-bfin-low.c: Likewise.
1871 2014-08-07 Gary Benson <gbenson@redhat.com>
1873 * server.h: Do not include ansidecl.h.
1875 2014-08-07 Gary Benson <gbenson@redhat.com>
1877 * linux-x86-low.c: Do not include stddef.h.
1878 * lynx-ppc-low.c: Likewise.
1879 * tracepoint.c: Likewise.
1881 2014-08-07 Gary Benson <gbenson@redhat.com>
1883 * server.h: Do not include stdarg.h.
1884 * nto-low.c: Likewise.
1886 2014-08-07 Gary Benson <gbenson@redhat.com>
1888 * server.h: Do not include stdlib.h.
1889 * inferiors.c: Likewise.
1890 * linux-low.c: Likewise.
1891 * regcache.c: Likewise.
1892 * spu-low.c: Likewise.
1893 * tracepoint.c: Likewise.
1894 * utils.c: Likewise.
1896 2014-08-07 Gary Benson <gbenson@redhat.com>
1898 * server.h: Do not include stdio.h.
1899 * linux-low.c: Likewise.
1900 * remote-utils.c: Likewise.
1901 * spu-low.c: Likewise.
1902 * utils.c: Likewise.
1903 * wincecompat.c: Likewise.
1905 2014-08-06 Gary Benson <gbenson@redhat.com>
1907 * regcache.c (init_register_cache): Move conditionals inside if.
1909 2014-08-06 Gary Benson <gbenson@redhat.com>
1911 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1913 2014-07-31 Gary Benson <gbenson@redhat.com>
1915 * ax.h: Do not include server.h.
1916 * gdbthread.h: Likewise.
1917 * lynx-low.h: Likewise.
1918 * notif.h: Likewise.
1920 2014-07-30 Gary Benson <gbenson@redhat.com>
1922 * server.h: Include common-defs.h.
1923 Do not include config.h or build-gnulib-gdbserver/config.h.
1925 2014-07-30 Gary Benson <gbenson@redhat.com>
1927 * hostio-errno.c: Move server.h to top of includes list.
1928 * inferiors.c: Likewise.
1929 * linux-x86-low.c: Likewise.
1930 * notif.c: Include server.h.
1932 2014-07-24 Tom Tromey <tromey@redhat.com>
1933 Gary Benson <gbenson@redhat.com>
1935 * server.h (CORE_ADDR): Now unsigned.
1937 2014-07-16 Pedro Alves <palves@redhat.com>
1939 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1941 2014-07-15 Pedro Alves <palves@redhat.com>
1943 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1946 2014-07-11 Pedro Alves <palves@redhat.com>
1948 * linux-low.c (kill_wait_lwp): New function, based on
1949 kill_one_lwp_callback, but use my_waitpid directly.
1950 (kill_one_lwp_callback, linux_kill): Use it.
1952 2014-06-23 Pedro Alves <palves@redhat.com>
1954 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1955 before setting DR0..DR3.
1957 2014-06-20 Gary Benson <gbenson@redhat.com>
1959 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1960 * configure: Regenerated.
1961 * config.in: Likewise.
1963 2014-06-20 Gary Benson <gbenson@redhat.com>
1965 * Makefile.in (SFILES): Update locations for files moved
1967 (object file files): Reordered.
1969 2014-06-20 Gary Benson <gbenson@redhat.com>
1971 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1972 (i386_dr_low_set_addr): Likewise.
1973 (i386_dr_low_get_addr): Likewise.
1974 (i386_dr_low_can_set_control): Likewise.
1975 (i386_dr_low_set_control): Likewise.
1976 (i386_dr_low_get_control): Likewise.
1977 (i386_dr_low_get_status): Likewise.
1978 (i386_get_debug_register_length): Likewise.
1979 * linux-x86-low.c (i386_dr_low_set_addr):
1980 Changed signature. Made static.
1981 (i386_dr_low_get_addr): Likewise.
1982 (i386_dr_low_set_control): Likewise.
1983 (i386_dr_low_get_control): Likewise.
1984 (i386_dr_low_get_status): Likewise.
1985 (i386_dr_low): New global variable.
1986 * win32-i386-low.c (i386_dr_low_set_addr):
1987 Changed signature. Made static.
1988 (i386_dr_low_get_addr): Likewise.
1989 (i386_dr_low_set_control): Likewise.
1990 (i386_dr_low_get_control): Likewise.
1991 (i386_dr_low_get_status): Likewise.
1992 (i386_dr_low): New global variable.
1994 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1996 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1997 * Makefile.in (AR, AR_FLAGS): Define.
1998 * configure: Regenerate.
2000 2014-06-19 Gary Benson <gbenson@redhat.com>
2002 * Makefile.in (i386-dregs.o): New rule.
2003 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2004 * i386-low.c (target.h): Remove include.
2005 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2006 (DR_CONTROL_SHIFT): Likewise.
2007 (DR_CONTROL_SIZE): Likewise.
2008 (DR_RW_EXECUTE): Likewise.
2009 (DR_RW_WRITE): Likewise.
2010 (DR_RW_READ): Likewise.
2011 (DR_RW_IORW): Likewise.
2012 (DR_LEN_1): Likewise.
2013 (DR_LEN_2): Likewise.
2014 (DR_LEN_4): Likewise.
2015 (DR_LEN_8): Likewise.
2016 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2017 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2018 (DR_ENABLE_SIZE): Likewise.
2019 (DR_LOCAL_SLOWDOWN): Likewise.
2020 (DR_GLOBAL_SLOWDOWN): Likewise.
2021 (DR_CONTROL_RESERVED): Likewise.
2022 (I386_DR_CONTROL_MASK): Likewise.
2023 (I386_DR_VACANT): Likewise.
2024 (I386_DR_LOCAL_ENABLE): Likewise.
2025 (I386_DR_GLOBAL_ENABLE): Likewise.
2026 (I386_DR_DISABLE): Likewise.
2027 (I386_DR_SET_RW_LEN): Likewise.
2028 (I386_DR_GET_RW_LEN): Likewise.
2029 (I386_DR_WATCH_HIT): Likewise.
2030 (i386_wp_op_t): Likewise.
2031 (i386_show_dr): Likewise.
2032 (i386_length_and_rw_bits): Likewise.
2033 (i386_insert_aligned_watchpoint): Likewise.
2034 (i386_remove_aligned_watchpoint): Likewise.
2035 (i386_handle_nonaligned_watchpoint): Likewise.
2036 i386_update_inferior_debug_regs(): Likewise.
2037 (i386_dr_insert_watchpoint): Likewise.
2038 (i386_dr_remove_watchpoint): Likewise.
2039 (i386_dr_region_ok_for_watchpoint): Likewise.
2040 (i386_dr_stopped_data_address): Likewise.
2041 (i386_dr_stopped_by_watchpoint): Likewise.
2043 2014-06-19 Gary Benson <gbenson@redhat.com>
2045 * i386-low.c (i386_dr_show): Renamed to
2046 i386_show_dr and made static. All uses updated.
2047 (i386_dr_length_and_rw_bits): Renamed to
2048 i386_length_and_rw_bits and made static.
2050 (i386_dr_insert_aligned_watchpoint): Renamed to
2051 i386_insert_aligned_watchpoint and made static.
2053 (i386_dr_remove_aligned_watchpoint): Renamed to
2054 i386_remove_aligned_watchpoint and made static.
2056 (i386_dr_update_inferior_debug_regs): Renamed to
2057 i386_update_inferior_debug_regs and made static.
2060 2014-06-18 Gary Benson <gbenson@redhat.com>
2062 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2063 (i386_dr_low_can_set_control): Likewise.
2064 (i386_get_debug_register_length): Likewise.
2065 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2066 (i386_dr_low_can_set_control): Likewise.
2067 (i386_get_debug_register_length): Likewise.
2069 2014-06-17 Gary Benson <gbenson@redhat.com>
2071 * i386-low.h (i386-dregs.h): New include.
2072 (DR_FIRSTADDR): Now in i386-dregs.h.
2073 (DR_LASTADDR): Likewise.
2074 (DR_NADDR): Likewise.
2075 (DR_STATUS): Likewise.
2076 (DR_CONTROL): Likewise.
2077 (i386_debug_reg_state): Likewise.
2078 (i386_dr_insert_watchpoint): Likewise.
2079 (i386_dr_remove_watchpoint): Likewise.
2080 (i386_dr_region_ok_for_watchpoint): Likewise.
2081 (i386_dr_stopped_data_address): Likewise.
2082 (i386_dr_stopped_by_watchpoint): Likewise.
2083 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2085 2014-06-18 Gary Benson <gbenson@redhat.com>
2087 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2088 i386_dr_insert_watchpoint.
2089 (i386_low_remove_watchpoint): Renamed to
2090 i386_dr_remove_watchpoint.
2091 (i386_low_region_ok_for_watchpoint): Renamed to
2092 i386_dr_region_ok_for_watchpoint.
2093 (i386_low_stopped_data_address): Renamed to
2094 i386_dr_stopped_data_address.
2095 (i386_low_stopped_by_watchpoint): Renamed to
2096 i386_dr_stopped_by_watchpoint.
2097 * i386-low.c (i386_show_dr): Renamed to
2098 i386_dr_show and made nonstatic. All uses updated.
2099 (i386_length_and_rw_bits): Renamed to
2100 i386_dr_length_and_rw_bits and made nonstatic.
2102 (i386_insert_aligned_watchpoint): Renamed to
2103 i386_dr_insert_aligned_watchpoint and made nonstatic.
2105 (i386_remove_aligned_watchpoint): Renamed to
2106 i386_dr_remove_aligned_watchpoint and made nonstatic.
2108 (i386_update_inferior_debug_regs): Renamed to
2109 i386_dr_update_inferior_debug_regs and made nonstatic.
2111 (i386_low_insert_watchpoint): Renamed to
2112 i386_dr_insert_watchpoint. All uses updated.
2113 (i386_low_remove_watchpoint): Renamed to
2114 i386_dr_remove_watchpoint. All uses updated.
2115 (i386_low_region_ok_for_watchpoint): Renamed to
2116 i386_dr_region_ok_for_watchpoint. All uses updated.
2117 (i386_low_stopped_data_address): Renamed to
2118 i386_dr_stopped_data_address. All uses updated.
2119 (i386_low_stopped_by_watchpoint): Renamed to
2120 i386_dr_stopped_by_watchpoint. All uses updated.
2122 2014-06-18 Gary Benson <gbenson@redhat.com>
2124 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2125 (i386_dr_low_can_set_control): Likewise.
2126 (i386_insert_aligned_watchpoint): New check.
2128 2014-06-18 Gary Benson <gbenson@redhat.com>
2130 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2133 2014-06-18 Gary Benson <gbenson@redhat.com>
2135 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2136 instead of fatal and error.
2137 (i386_handle_nonaligned_watchpoint): Likewise.
2139 2014-06-18 Gary Benson <gbenson@redhat.com>
2141 * i386-low.c (i386_get_debug_register_length): New macro.
2142 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2143 (i386_show_dr): Use debug_printf instead of fprintf. Use
2144 phex to format values.
2146 2014-06-18 Gary Benson <gbenson@redhat.com>
2148 * i386-low.h: Comment changes.
2149 * i386-low.c: Likewise.
2151 2014-06-18 Gary Benson <gbenson@redhat.com>
2153 * i386-low.c: Whitespace changes.
2155 2014-06-12 Tom Tromey <tromey@redhat.com>
2157 * utils.c (freeargv): Remove.
2159 2014-06-12 Tom Tromey <tromey@redhat.com>
2161 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2162 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2163 (parse_debug_format_options): Likewise.
2164 (gdbserver_usage): Likewise.
2165 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2166 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2167 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2169 ($(LIBGNU)): Depend on libiberty.
2170 (all-lib): Recurse into all subdirs.
2171 (install-only): Invoke "install" target in subdirs.
2172 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2174 * configure: Rebuild.
2175 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2176 for vasprintf, vsnprintf, or gettimeofday.
2177 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2180 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2182 * development.sh: Delete.
2183 * Makefile.in (config.status): Adjust dependency on development.sh.
2184 * configure.ac: Adjust development.sh source call.
2185 * configure: Regenerate.
2187 2014-06-02 Pedro Alves <palves@redhat.com>
2189 * ax.c (gdb_free_agent_expr): New function.
2190 * ax.h (gdb_free_agent_expr): New declaration.
2191 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2193 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2195 (clear_breakpoint_conditions_and_commands): New function.
2196 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2197 (clear_breakpoint_conditions_and_commands): New declaration.
2199 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2201 * linux-aarch64-low.c (asm/ptrace.h): Include.
2203 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2205 Fix TLS access for -static -pthread.
2206 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2207 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2208 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2210 2014-05-20 Pedro Alves <palves@redhat.com>
2212 * linux-aarch64-low.c (aarch64_insert_point)
2213 (aarch64_remove_point): No longer check whether the type is
2214 supported here. Adjust to new interface.
2215 (the_low_target): Install aarch64_supports_z_point_type as
2216 supports_z_point_type method.
2217 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2218 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2219 instead of a Z packet char. Adjust.
2220 (arm_supports_z_point_type): New function.
2221 (arm_insert_point, arm_remove_point): Adjust to new interface.
2222 (the_low_target): Install arm_supports_z_point_type.
2223 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2224 (cris_insert_point, cris_remove_point): Adjust to new interface.
2225 Don't check whether the type is supported here.
2226 (the_low_target): Install cris_supports_z_point_type.
2227 * linux-low.c (linux_supports_z_point_type): New function.
2228 (linux_insert_point, linux_remove_point): Adjust to new interface.
2229 * linux-low.h (struct linux_target_ops) <insert_point,
2230 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2231 raw_breakpoint pointer parameter.
2232 <supports_z_point_type>: New method.
2233 * linux-mips-low.c (mips_supports_z_point_type): New function.
2234 (mips_insert_point, mips_remove_point): Adjust to new interface.
2235 Use mips_supports_z_point_type.
2236 (the_low_target): Install mips_supports_z_point_type.
2237 * linux-ppc-low.c (the_low_target): Install NULL as
2238 supports_z_point_type method.
2239 * linux-s390-low.c (the_low_target): Install NULL as
2240 supports_z_point_type method.
2241 * linux-sparc-low.c (the_low_target): Install NULL as
2242 supports_z_point_type method.
2243 * linux-x86-low.c (x86_supports_z_point_type): New function.
2244 (x86_insert_point): Adjust to new insert_point interface. Use
2245 insert_memory_breakpoint. Adjust to new
2246 i386_low_insert_watchpoint interface.
2247 (x86_remove_point): Adjust to remove_point interface. Use
2248 remove_memory_breakpoint. Adjust to new
2249 i386_low_remove_watchpoint interface.
2250 (the_low_target): Install x86_supports_z_point_type.
2251 * lynx-low.c (lynx_target_ops): Install NULL as
2252 supports_z_point_type callback.
2253 * nto-low.c (nto_supports_z_point_type): New.
2254 (nto_insert_point, nto_remove_point): Adjust to new interface.
2255 (nto_target_ops): Install nto_supports_z_point_type.
2256 * mem-break.c: Adjust intro comment.
2257 (struct raw_breakpoint) <raw_type, size>: New fields.
2258 <inserted>: Update comment.
2259 <shlib_disabled>: Delete field.
2260 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2261 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2262 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2263 (raw_bkpt_type_to_target_hw_bp_type): New function.
2264 (find_enabled_raw_code_breakpoint_at): New function.
2265 (find_raw_breakpoint_at): New type and size parameters. Use them.
2266 (insert_memory_breakpoint): New function, based off
2267 set_raw_breakpoint_at.
2268 (remove_memory_breakpoint): New function.
2269 (set_raw_breakpoint_at): Reimplement.
2270 (set_breakpoint): New, based on set_breakpoint_at.
2271 (set_breakpoint_at): Reimplement.
2272 (delete_raw_breakpoint): Go through the_target->remove_point
2273 instead of assuming memory breakpoints.
2274 (find_gdb_breakpoint_at): Delete.
2275 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2276 (find_gdb_breakpoint): New function.
2277 (set_gdb_breakpoint_at): Delete.
2278 (z_type_supported): New function.
2279 (set_gdb_breakpoint_1): New function, loosely based off
2280 set_gdb_breakpoint_at.
2281 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2282 (delete_gdb_breakpoint_at): Delete.
2283 (delete_gdb_breakpoint_1): New function, loosely based off
2284 delete_gdb_breakpoint_at.
2285 (delete_gdb_breakpoint): New function.
2286 (clear_gdb_breakpoint_conditions): Rename to ...
2287 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2289 (add_condition_to_breakpoint): Make static.
2290 (add_breakpoint_condition): Take a struct breakpoint pointer
2291 instead of an address. Adjust.
2292 (gdb_condition_true_at_breakpoint): Rename to ...
2293 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2295 (gdb_condition_true_at_breakpoint): Reimplement.
2296 (add_breakpoint_commands): Take a struct breakpoint pointer
2297 instead of an address. Adjust.
2298 (gdb_no_commands_at_breakpoint): Rename to ...
2299 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2300 parameter. Return true if no breakpoint was found. Change debug
2302 (gdb_no_commands_at_breakpoint): Reimplement.
2303 (run_breakpoint_commands): Rename to ...
2304 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2305 and change return type to boolean.
2306 (run_breakpoint_commands): New function.
2307 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2308 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2309 breakpoint. Go through the_target->remove_point instead of
2310 assuming memory breakpoint.
2311 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2312 software and hardware breakpoints.
2313 (reinsert_raw_breakpoint): Go through the_target->insert_point
2314 instead of assuming memory breakpoint.
2315 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2316 software and hardware breakpoints.
2317 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2318 Check both software and hardware breakpoints.
2319 (validate_inserted_breakpoint): Assert the breakpoint is a
2320 software breakpoint. Set the inserted flag to -1 instead of
2321 setting shlib_disabled.
2322 (delete_disabled_breakpoints): Adjust.
2323 (validate_breakpoints): Only validate software breakpoints.
2324 Adjust to inserted flag change.
2325 (check_mem_read, check_mem_write): Skip breakpoint types other
2326 than software breakpoints. Adjust to inserted flag change.
2327 * mem-break.h (enum raw_bkpt_type): New enum.
2328 (raw_breakpoint, struct process_info): Forward declare.
2329 (Z_packet_to_target_hw_bp_type): Delete declaration.
2330 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2331 (set_gdb_breakpoint, delete_gdb_breakpoint)
2332 (clear_breakpoint_conditions): New declarations.
2333 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2334 (breakpoint_inserted_here): Update comment.
2335 (add_breakpoint_condition, add_breakpoint_commands): Replace
2336 address parameter with a breakpoint pointer parameter.
2337 (gdb_breakpoint_here): Update comment.
2338 (delete_gdb_breakpoint_at): Delete.
2339 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2340 * server.c (process_point_options): Take a struct breakpoint
2341 pointer instead of an address. Adjust.
2342 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2343 delete_gdb_breakpoint.
2344 * spu-low.c (spu_target_ops): Install NULL as
2345 supports_z_point_type method.
2346 * target.h: Include mem-break.h.
2347 (struct target_ops) <prepare_to_access_memory>: Update comment.
2348 <supports_z_point_type>: New field.
2349 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2350 instead of a char. Also take a raw breakpoint pointer.
2351 * win32-arm-low.c (the_low_target): Install NULL as
2352 supports_z_point_type.
2353 * win32-i386-low.c (i386_supports_z_point_type): New function.
2354 (i386_insert_point, i386_remove_point): Adjust to new interface.
2355 (the_low_target): Install i386_supports_z_point_type.
2356 * win32-low.c (win32_supports_z_point_type): New function.
2357 (win32_insert_point, win32_remove_point): Adjust to new interface.
2358 (win32_target_ops): Install win32_supports_z_point_type.
2359 * win32-low.h (struct win32_target_ops):
2360 <supports_z_point_type>: New method.
2361 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2362 instead of a char. Also take a raw breakpoint pointer.
2364 2014-05-20 Pedro Alves <palves@redhat.com>
2366 * mem-break.h: Include break-common.h.
2367 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2368 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2369 (Z_packet_to_target_hw_bp_type): New declaration.
2370 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2371 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2372 (Z_PACKET_ACCESS_WP): Delete macros.
2373 (Z_packet_to_hw_type): Delete function.
2374 * i386-low.h: Don't include break-common.h here.
2375 (Z_packet_to_hw_type): Delete declaration.
2376 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2377 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2378 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2379 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2380 * linux-aarch64-low.c: Don't include break-common.h here.
2381 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2382 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2383 (Z_packet_to_target_hw_bp_type): Delete function.
2384 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2386 (mips_insert_point, mips_remove_point): Use
2387 Z_packet_to_target_hw_bp_type.
2389 2014-05-20 Pedro Alves <palves@redhat.com>
2391 * linux-aarch64-low.c: Include break-common.h.
2392 (enum target_point_type): Delete.
2393 (Z_packet_to_point_type): Rename to ...
2394 (Z_packet_to_target_hw_bp_type): ... this, and return a
2395 target_hw_bp_type instead.
2396 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2397 instead of an enum target_point_type.
2398 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2400 (aarch64_dr_state_insert_one_point)
2401 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2402 (aarch64_handle_aligned_watchpoint)
2403 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2404 Take an enum target_hw_bp_type instead of an enum
2406 (aarch64_supports_z_point_type): New function.
2407 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2408 use Z_packet_to_target_hw_bp_type.
2410 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2412 * configure.ac: Only use -Werror by default when DEVELOPMENT
2414 * configure: Regenerate.
2416 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2418 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2419 * linux-x86-low.c (X86_64_USER_REGS): New.
2420 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2422 2014-04-28 Yao Qi <yao@codesourcery.com>
2424 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2427 2014-04-25 Pedro Alves <palves@redhat.com>
2430 * linux-low.c (linux_attach_fail_reason_string): New function.
2431 (linux_attach_lwp): Delete.
2432 (linux_attach_lwp_1): Rename to ...
2433 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2434 argument. Remove "initial" parameter. Return int instead of
2435 void. Don't error or warn here.
2436 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2437 failure to attach to the tgid. Call warning when failing to
2439 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2440 argument. Remove "initial" parameter. Return int instead of
2441 void. Don't error or warn here.
2442 (linux_attach_fail_reason_string): New declaration.
2443 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2444 interface change. Use linux_attach_fail_reason_string.
2446 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2447 Walfred Tedeschi <walfred.tedeschi@intel.com>
2449 * Makefile.in: Added rules to handle new files
2450 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2451 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2452 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2453 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2454 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2455 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2457 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2458 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2459 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2460 i386/x32-avx512.xml.
2461 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2462 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2463 i386/x32-avx512-linux.xml.
2464 * i387-fp.c (num_avx512_k_registers): New constant for number
2466 (num_avx512_zmmh_low_registers): New constant for number of
2467 lower ZMM registers (0-15).
2468 (num_avx512_zmmh_high_registers): New constant for number of
2469 higher ZMM registers (16-31).
2470 (num_avx512_ymmh_registers): New contant for number of higher
2471 YMM registers (ymm16-31 added by avx521 on x86_64).
2472 (num_avx512_xmm_registers): New constant for number of higher
2473 XMM registers (xmm16-31 added by AVX512 on x86_64).
2474 (struct i387_xsave): Add space for AVX512 registers.
2475 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2476 Add code to handle AVX512 registers.
2477 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2478 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2479 prototypei from generated file.
2480 (tdesc_amd64_avx512_linux): Likewise.
2481 (init_registers_x32_avx512_linux): Likewise.
2482 (tdesc_x32_avx512_linux): Likewise.
2483 (init_registers_i386_avx512_linux): Likewise.
2484 (tdesc_i386_avx512_linux): Likewise.
2485 (x86_64_regmap): Add AVX512 registers.
2486 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2488 (initialize_low_arch): Add code to initialize AVX512 registers.
2490 2014-04-23 Pedro Alves <palves@redhat.com>
2492 * mem-break.c (find_gdb_breakpoint_at): Make static.
2493 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2495 2014-04-23 Pedro Alves <palves@redhat.com>
2497 * i386-low.c: Don't include break-common.h here.
2498 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2499 prototype to take target_hw_bp_type as argument instead of a Z
2501 * i386-low.h: Include break-common.h here.
2502 (Z_packet_to_hw_type): Declare.
2503 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2505 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2506 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2507 (x86_remove_point): Convert the packet number to a
2508 target_hw_bp_type before calling i386_low_remove_watchpoint.
2509 * win32-i386-low.c (i386_insert_point): Convert the packet number
2510 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2511 (i386_remove_point): Convert the packet number to a
2512 target_hw_bp_type before calling i386_low_remove_watchpoint.
2514 2014-04-23 Pedro Alves <palves@redhat.com>
2516 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2518 2014-04-10 Pedro Alves <palves@redhat.com>
2520 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2521 Check if the condition or command is NULL before checking if the
2522 breakpoint is known. On success, return true.
2523 * mem-break.h (add_breakpoint_condition): Document return.
2524 (add_breakpoint_commands): Add describing comment.
2525 * server.c (skip_to_semicolon): New function.
2526 (process_point_options): Use it.
2528 2014-04-09 Pedro Alves <palves@redhat.com>
2530 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2533 2014-02-27 Pedro Alves <palves@redhat.com>
2536 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2538 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2540 (last_thread_of_process_p): Take a PID argument instead of a
2542 (linux_wait_for_lwp): Delete.
2543 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2545 (linux_low_filter_event): New function, party factored out from
2546 linux_wait_for_event.
2547 (linux_wait_for_event): Rename to ...
2548 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2549 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2550 sigsuspend. Check for zombie leaders.
2551 (linux_wait_for_event): Reimplement as wrapper around
2552 linux_wait_for_event_filtered.
2553 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2554 a normal or signal exit is seen, it's the whole process exiting.
2555 (wait_for_sigstop): No longer a for_each_inferior callback.
2556 Rewrite on top of linux_wait_for_event_filtered.
2557 (stop_all_lwps): Call wait_for_sigstop directly.
2558 * server.c (resume, handle_target_event): Handle
2559 TARGET_WAITKIND_NO_RESUMED.
2561 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2563 * win32-low.c (psapi_get_dll_name,
2564 * win32_CreateToolhelp32Snapshot): Delete.
2565 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2566 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2568 (handle_load_dll): Add function description.
2569 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2571 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2573 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2575 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2576 base address when calling win32_add_one_solib.
2577 (handle_load_dll): Delete local variable load_addr.
2578 Remove 0x1000 offset applied to DLL base address when calling
2579 win32_add_one_solib.
2580 (handle_unload_dll): Add comment.
2582 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2584 * win32-low.c (win32_add_all_dlls): Renames
2585 win32_ensure_ntdll_loaded. Rewrite function documentation.
2586 Adjust implementation to always load all DLLs.
2587 Add 0x1000 offset to DLL base address when calling
2588 win32_add_one_solib.
2589 (child_initialization_done): New static global.
2590 (do_initial_child_stuff): Set child_initialization_done to
2591 zero during child initialization, and 1 after. Replace call
2592 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2594 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2595 (handle_unload_dll): Add function documentation.
2596 (get_child_debug_event): Ignore load and unload DLL events
2597 during child initialization.
2599 2014-02-20 Doug Evans <dje@google.com>
2601 Remove global all_lwps.
2602 * inferiors.h (ptid_of): Move here from linux-low.h.
2603 (pid_of, lwpid_of): Ditto.
2604 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2605 parameter is a struct thread_info * now.
2606 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2607 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2608 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2610 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2611 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2612 * linux-arm-low.c (update_registers_callback): Update, "entry"
2613 parameter is a struct thread_info * now.
2614 Fetch lwpid from current_inferior directly.
2615 (arm_insert_point): Pass &all_threads to find_inferior instead of
2617 (arm_remove_point): Ditto.
2618 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2619 (arm_prepare_to_resume): Fetch pid from thread.
2620 (arm_read_description): Fetch lwpid from current_inferior directly.
2621 * linux-low.c (all_lwps): Delete.
2622 (delete_lwp): Delete call to remove_inferior.
2623 (handle_extended_wait): Fetch lwpid from thread.
2624 (add_lwp): Don't set lwp->entry.id. Remove call to
2625 add_inferior_to_list.
2626 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2627 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2628 (kill_one_lwp_callback): Ditto.
2629 (linux_kill): Don't dereference NULL pointer.
2630 Fetch ptid,lwpid from thread.
2631 (get_detach_signal): Fetch ptid from thread.
2632 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2633 Simplify call to regcache_invalidate_thread.
2634 (delete_lwp_callback): Update, "entry" parameter is a
2635 struct thread_info * now. Fetch pid from thread.
2636 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2637 (status_pending_p_callback): Update, "entry" parameter is a
2638 struct thread_info * now. Fetch ptid from thread.
2639 (find_lwp_pid): Update, "entry" parameter is a
2640 struct thread_info * now.
2641 (linux_wait_for_lwp): Fetch pid from thread.
2642 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2643 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2644 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2645 (dequeue_one_deferred_signal): Ditto.
2646 (cancel_breakpoint): Fetch ptid from current_inferior.
2647 (linux_wait_for_event): Pass &all_threads to find_inferior,
2648 not &all_lwps. Fetch ptid, lwpid from thread.
2649 (count_events_callback): Update, "entry" parameter is a
2650 struct thread_info * now.
2651 (select_singlestep_lwp_callback): Ditto.
2652 (select_event_lwp_callback): Ditto.
2653 (cancel_breakpoints_callback): Ditto.
2654 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2656 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2657 (unsuspend_one_lwp): Update, "entry" parameter is a
2658 struct thread_info * now.
2659 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2661 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2662 Fetch lwpid from thread, not lwp.
2663 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2664 Pass &all_threads to find_inferior, not &all_lwps.
2665 (send_sigstop): Fetch lwpid from thread, not lwp.
2666 (send_sigstop_callback): Update, "entry" parameter is a
2667 struct thread_info * now.
2668 (suspend_and_send_sigstop_callback): Ditto.
2669 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2670 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2671 struct thread_info * now.
2672 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2674 (lwp_running): Update, "entry" parameter is a
2675 struct thread_info * now.
2676 (stop_all_lwps): Fetch ptid from thread.
2677 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2678 (linux_resume_one_lwp): Fetch lwpid from thread.
2679 (linux_set_resume_request): Update, "entry" parameter is a
2680 struct thread_info * now. Fetch pid, lwpid from thread.
2681 (resume_status_pending_p): Update, "entry" parameter is a
2682 struct thread_info * now.
2683 (need_step_over_p): Ditto. Fetch lwpid from thread.
2684 (start_step_over): Fetch lwpid from thread.
2685 (linux_resume_one_thread): Update, "entry" parameter is a
2686 struct thread_info * now. Fetch lwpid from thread.
2687 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2688 (proceed_one_lwp): Update, "entry" parameter is a
2689 struct thread_info * now. Fetch lwpid from thread.
2690 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2691 struct thread_info * now.
2692 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2693 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2694 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2696 (regsets_store_inferior_registers): Ditto.
2697 (fetch_register, store_register): Ditto.
2698 (linux_read_memory, linux_write_memory): Ditto.
2699 (linux_request_interrupt): Ditto.
2700 (linux_read_auxv): Ditto.
2701 (linux_xfer_siginfo): Ditto.
2702 (linux_qxfer_spu): Ditto.
2703 (linux_qxfer_libraries_svr4): Ditto.
2704 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2705 moved to inferiors.h.
2707 (get_thread_lwp): Update.
2708 (struct lwp_info): Delete member "entry". Simplify comment for
2711 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2712 current_inferior directly.
2713 (update_watch_registers_callback): Update, "entry" parameter is a
2714 struct thread_info * now. Fetch pid from thread.
2715 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2716 (mips_insert_point): Fetch lwpid from current_inferior.
2717 Pass &all_threads to find_inferior, not &all_lwps.
2718 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2719 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2721 (mips_stopped_data_address): Ditto.
2722 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2724 * linux-tile-low.c (tile_arch_setup): Ditto.
2725 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2726 (update_debug_registers_callback): Update, "entry" parameter is a
2727 struct thread_info * now. Fetch pid from thread.
2728 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2729 Pass &all_threads to find_inferior, not &all_lwps.
2730 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2731 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2732 Pass &all_threads to find_inferior, not &all_lwps.
2733 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2734 (i386_dr_low_get_status): Ditto.
2735 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2736 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2737 (x86_linux_read_description): Ditto.
2738 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2740 2014-02-20 Doug Evans <dje@google.com>
2742 * inferiors.c (get_first_inferior): Fix buglet.
2744 2014-02-19 Doug Evans <dje@google.com>
2746 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2747 * inferiors.c (add_thread): Change result type to struct thread_info *.
2748 All callers updated.
2749 (add_lwp): Call add_thread here instead of in callers.
2750 All callers updated.
2751 * linux-low.h (get_lwp_thread): Rewrite.
2752 (struct lwp_info): New member "thread".
2754 2014-02-19 Doug Evans <dje@google.com>
2756 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2757 All callers updated.
2759 2014-02-19 Doug Evans <dje@google.com>
2761 * inferiors.c (add_thread): Fix whitespace.
2763 2014-02-19 Doug Evans <dje@google.com>
2765 * dll.c (clear_dlls): Replace accessing list implemention details
2767 * gdbthread.h (get_first_thread): Declare.
2768 * inferiors.c (for_each_inferior_with_data): New function.
2769 (get_first_thread): New function.
2770 (find_thread_ptid): Simplify.
2771 (get_first_inferior): New function.
2772 (clear_list): Delete.
2773 (one_inferior_p): New function.
2774 (clear_inferior_list): New function.
2775 (clear_inferiors): Update.
2776 * inferiors.h (for_each_inferior_with_data): Declare.
2777 (clear_inferior_list): Declare.
2778 (one_inferior_p): Declare.
2779 (get_first_inferior): Declare.
2780 * linux-low.c (linux_wait_for_event): Replace accessing list
2781 implemention details with API function.
2782 * server.c (target_running): Ditto.
2783 (accumulate_file_name_length): New function.
2784 (emit_dll_description): New function.
2785 (handle_qxfer_libraries): Replace accessing list implemention
2786 details with API function.
2787 (handle_qxfer_threads_worker): New function.
2788 (handle_qxfer_threads_proper): Replace accessing list implemention
2789 details with API function.
2790 (handle_query): Ditto.
2791 (visit_actioned_threads_callback_ftype): New typedef.
2792 (visit_actioned_threads_data): New struct.
2793 (visit_actioned_threads): Rewrite to be find_inferior callback.
2794 (resume): Call find_inferior.
2795 (handle_status): Replace accessing list implemention
2796 details with API function.
2797 (process_serial_event): Replace accessing list implemention details
2799 * target.c (set_desired_inferior): Replace accessing list implemention
2800 details with API function.
2801 * tracepoint.c (same_process_p): New function.
2802 (gdb_agent_about_to_close): Replace accessing list implemention
2803 details with API function.
2804 * win32-low.c (child_delete_thread): Replace accessing list
2805 implemention details with API function.
2806 (match_dll_by_basename): New function.
2807 (dll_is_loaded_by_basename): New function.
2808 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2809 details call to dll_is_loaded_by_basename.
2811 2014-02-19 Doug Evans <dje@google.com>
2813 * dll.h (struct dll_info): Add comment.
2814 * gdbthread.h (struct thread_info): Add comment.
2815 (current_ptid): Simplify.
2816 * inferiors.c (add_process): Update.
2817 (remove_process): Update.
2818 * inferiors.h (struct process_info): Rename member "head" to "entry".
2819 * linux-low.c (delete_lwp): Update.
2821 (last_thread_of_process_p): Update.
2822 (kill_one_lwp_callback, linux_kill): Update.
2823 (status_pending_p_callback): Update.
2824 (wait_for_sigstop): Update. Simplify read of ptid.
2825 (start_step_over): Update.
2826 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2827 (get_lwp_thread): Update.
2828 (struct lwp_info): Rename member "head" to "entry".
2829 * regcache.h (inferior_list_entry): Delete.
2830 * server.c (kill_inferior_callback): Update.
2831 (detach_or_kill_inferior_callback): Update.
2832 (print_started_pid): Update.
2833 (print_attached_pid): Update.
2834 (process_serial_event): Simplify read of ptid.
2835 * thread-db.c (thread_db_create_event): Update.
2836 (thread_db_get_tls_address): Update.
2837 * win32-low.c (current_inferior_ptid): Simplify.
2839 2014-02-19 Tom Tromey <tromey@redhat.com>
2841 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2843 (target_supports_btrace): Update.
2845 2014-02-14 Yao Qi <yao@codesourcery.com>
2847 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2848 (rsp-low-ipa.o): New target.
2850 2014-02-12 Tom Tromey <tromey@redhat.com>
2852 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2853 convert_ascii_to_int.
2854 * regcache.c (registers_to_string): Likewise.
2855 * remote-utils.c (decode_M_packet): Likewise.
2856 * server.c (process_serial_event): Likewise.
2858 2014-02-12 Tom Tromey <tromey@redhat.com>
2860 * server.c (handle_query, handle_v_run): Use hex2bin, not
2862 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2864 2014-02-12 Tom Tromey <tromey@redhat.com>
2866 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2867 convert_int_to_ascii.
2868 * regcache.c (registers_to_string, collect_register_as_string):
2870 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2872 * server.c (process_serial_event): Likewise.
2873 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2874 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2876 2014-02-12 Tom Tromey <tromey@redhat.com>
2878 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2879 bin2hex, not hexify.
2880 * tracepoint.c (cmd_qtstatus): Likewise.
2882 2014-02-12 Tom Tromey <tromey@redhat.com>
2884 * remote-utils.c (monitor_output): Pass explicit length to
2887 2014-02-12 Tom Tromey <tromey@redhat.com>
2889 * tracepoint.c: Include rsp-low.h.
2890 * server.c: Include rsp-low.h.
2891 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2892 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2894 * remote-utils.c: Include rsp-low.h.
2895 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2896 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2897 (convert_int_to_ascii, convert_ascii_to_int): Move to
2899 * regcache.c: Include rsp-low.h.
2900 * ax.c: Include rsp-low.h.
2901 * Makefile.in (SFILES): Add common/rsp-low.c.
2902 (OBS): Add rsp-low.o.
2903 (rsp-low.o): New target.
2905 2014-02-12 Tom Tromey <tromey@redhat.com>
2907 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2908 Include print-utils.h.
2909 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2910 (plongest, thirty_two, phex_nz): Remove.
2911 * Makefile.in (SFILES): Add common/print-utils.c.
2912 (OBS): Add print-utils.o.
2913 (print-utils-ipa.o): New target.
2914 (print-utils.o): New target.
2915 (IPA_OBJS): Add print-utils-ipa.o.
2917 2014-02-06 Tom Tromey <tromey@redhat.com>
2919 * Makefile.in (SFILES): Fix indentation.
2921 2014-02-05 Doug Evans <dje@google.com>
2923 * linux-low.c (linux_wait_for_event): Improve comment.
2924 (linux_wait_1): Keep current_inferior in sync with event_child.
2926 2014-01-22 Doug Evans <dje@google.com>
2928 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2930 2014-01-22 Doug Evans <dje@google.com>
2932 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2933 * configure: Regenerate.
2934 * config.in: Regenerate.
2935 * Makefile.in (SFILES): Add debug.c.
2937 * debug.c: New file.
2938 * debug.h: New file.
2939 * linux-aarch64-low.c (*): Update all debugging printfs to use
2940 debug_printf instead of fprintf.
2941 * linux-arm-low.c (*): Ditto.
2942 * linux-cris-low.c (*): Ditto.
2943 * linux-crisv32-low.c (*): Ditto.
2944 * linux-m32r-low.c (*): Ditto.
2945 * linux-sparc-low.c (*): Ditto.
2946 * linux-x86.c (*): Ditto.
2947 * linux-low.c (*): Ditto.
2948 (linux_wait_1): Add calls to debug_enter, debug_exit.
2949 (linux_wait): Remove redundant debugging printf.
2950 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2951 (linux_resume, unstop_all_lwps): Ditto.
2952 * mem-break.c (*): Update all debugging printfs to use
2953 debug_printf instead of fprintf.
2954 * remote-utils.c (*): Ditto.
2955 * thread-db.c (*): Ditto.
2956 * server.c #include <ctype.h>, "gdb_vecs.h".
2957 (debug_threads): Moved to debug.c.
2958 (*): Update all debugging printfs to use debug_printf instead of
2960 (start_inferior): Replace call to fflush with call to debug_flush.
2961 (monitor_show_help): Mention set debug-format.
2962 (parse_debug_format_options): New function.
2963 (handle_monitor_command): Handle "monitor set debug-format".
2964 (gdbserver_usage): Mention --debug-format.
2965 (main): Parse --debug-format.
2966 * server.h (debug_threads): Declaration moved to debug.h.
2968 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2969 trace_debug_1 that uses debug_printf.
2970 (tracepoint_look_up_symbols): Update all debugging printfs to use
2971 debug_printf instead of fprintf.
2973 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2975 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2978 2014-01-17 Pedro Alves <palves@redhat.com>
2981 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2982 defined after including gdb_proc_service.h.
2984 2014-01-16 Doug Evans <dje@google.com>
2986 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2987 (match_dll): Use it.
2989 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2991 * target.h (target_ops) <read_btrace>: Change parameters and
2992 return type to allow error reporting.
2993 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2994 trace reading errors on.
2995 * linux-low.c (linux_low_read_btrace): Pass trace reading
2997 (linux_low_disable_btrace): New.
2999 2014-01-15 Doug Evans <dje@google.com>
3001 * inferiors.c (thread_id_to_gdb_id): Delete.
3002 * inferiors.h (thread_id_to_gdb_id): Delete.
3004 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3006 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3007 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3010 2014-01-08 Pedro Alves <palves@redhat.com>
3012 * server.c (handle_status): Don't discard previous queued stop
3013 replies or thread's pending status here.
3014 (main) <disconnection>: Do it here instead.
3016 2014-01-08 Pedro Alves <palves@redhat.com>
3018 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3019 * server.c (visit_actioned_threads, handle_pending_status): New
3021 (handle_v_cont): Factor out parts to ...
3022 (resume): ... this new function. If in all-stop, and a thread
3023 being resumed has a pending status, report it without actually
3025 (myresume): Adjust to use the new 'resume' function.
3026 (clear_pending_status_callback, set_pending_status_callback)
3027 (find_status_pending_thread_callback): New functions.
3028 (handle_status): Handle the case of multiple threads having
3029 interesting statuses to report. Report threads' real last signal
3030 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3031 with an interesting thread to report the status for, instead of
3032 always reporting the status of the first thread.
3034 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3036 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3037 * gdbreplay.c (gdbreplay_version): Likewise.
3039 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3041 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3042 iov.iov_len with the real length in use.
3044 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3046 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3047 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3048 for all targets that use win32-low.c.
3049 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3050 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3052 2013-12-13 Pedro Alves <palves@redhat.com>
3054 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3055 if equal to TARGET_WAITKIND_LOADED.
3056 * win32-low.c (cached_status): New static global.
3057 (win32_wait): Add declaration.
3058 (do_initial_child_stuff): Flush all initial pending debug events
3059 up to the initial breakpoint.
3060 (win32_wait): If CACHED_STATUS was set, return that instead
3061 of doing a real wait. Remove the code resuming the execution
3062 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3063 during the initial phase. Also remove the code changing
3064 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3065 TARGET_WAITKIND_STOPPED.
3067 2013-12-11 Yao Qi <yao@codesourcery.com>
3069 * notif.c (handle_notif_ack): Return 0 if no notification
3072 2013-11-20 Doug Evans <dje@google.com>
3074 * linux-low.c (linux_set_resume_request): Fix comment.
3076 2013-11-20 Doug Evans <dje@google.com>
3078 * linux-low.c (resume_status_pending_p): Tweak comment.
3080 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3082 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3083 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3084 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3085 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3086 (srv_amd64_regobj): Add amd64-mpx.o.
3087 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3088 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3089 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3090 * i387-fp.c (num_pl_bnd_register) Added constant.
3091 (num_pl_bnd_cfg_registers) Added constant.
3092 (struct i387_xsave) Added reserved area and MPX fields.
3093 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3094 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3096 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3097 (init_registers_amd64_mpx_linux): Declare new function.
3098 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3099 (x86_64_regmap): Add MPX registers.
3100 (x86_linux_read_description): Add MPX case.
3101 (initialize_low_arch): Initialize MPX targets.
3103 2013-11-18 Tom Tromey <tromey@redhat.com>
3105 * configure: Rebuild.
3106 * configure.ac: Don't check for stdlib.h.
3107 * gdbreplay.c: Unconditionally include stdlib.h.
3109 2013-11-18 Tom Tromey <tromey@redhat.com>
3111 * config.in: Rebuild.
3112 * configure: Rebuild.
3113 * configure.ac: Don't use AC_HEADER_DIRENT.
3115 2013-11-18 Tom Tromey <tromey@redhat.com>
3117 * server.h: Don't check HAVE_STRING_H.
3118 * gdbreplay.c: Don't check HAVE_STRING_H.
3119 * configure: Rebuild.
3121 2013-11-18 Tom Tromey <tromey@redhat.com>
3123 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3126 2013-11-08 Tom Tromey <tromey@redhat.com>
3128 * configure, config.in: Rebuild.
3129 * configure.ac: Remove unused configury.
3131 2013-11-08 Tom Tromey <tromey@redhat.com>
3133 * acinclude.m4: Include common.m4, codeset.m4.
3134 * configure, config.in: Rebuild.
3135 * configure.ac: Use GDB_AC_COMMON.
3137 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3139 * linux-s390-low.c (HWCAP_S390_TE): New define.
3140 (s390_arch_setup): Consider the TE field in the HWCAP for
3141 determining 'have_regset_tdb'.
3143 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3146 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3149 2013-10-02 Pedro Alves <palves@redhat.com>
3151 * server.c (process_serial_event): Don't output "GDBserver
3152 exiting" if GDB is connected through stdio.
3153 * target.c (mywait): Likewise, be silent if GDB is connected
3156 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3158 * lynx-low.c (lynx_add_threads_after_attach): New function.
3159 (lynx_attach): Remove call to add_thread. Add call to
3160 lynx_add_threads_after_attach instead.
3162 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3164 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3165 * config.in, configure: Regenerated.
3167 2013-09-18 Yao Qi <yao@codesourcery.com>
3170 * server.c (start_inferior): Clear 'resume_info'.
3172 2013-09-16 Jiong Wang <jiwang@tilera.com>
3174 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3177 2013-09-16 Jiong Wang <jiwang@tilera.com>
3179 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3180 linux-tile-low.o to srv_tgtobj.
3182 2013-09-16 Will Newton <will.newton@linaro.org>
3184 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3187 2013-09-06 Pedro Alves <palves@redhat.com>
3189 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3190 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3191 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3192 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3193 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3194 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3196 2013-09-06 Pedro Alves <palves@redhat.com>
3198 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3199 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3201 2013-09-06 Pedro Alves <palves@redhat.com>
3203 * linux-amd64-ipa.c: Include tracepoint.h.
3204 * linux-i386-ipa.c: Include tracepoint.h.
3206 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3208 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3209 (ps_get_thread_area): New function.
3211 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3213 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3214 (initialize_low_arch): Call init_registers_crisv32 rather than
3215 init_register_crisv32.
3217 2013-09-05 Pedro Alves <palves@redhat.com>
3219 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3221 * hostio.h: ... this new file.
3222 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3223 win32-low.c: Include hostio.h.
3225 2013-09-05 Pedro Alves <palves@redhat.com>
3227 * server.h (gdb_client_data, handler_func, callback_handler_func)
3228 (delete_file_handler, add_file_handler, append_callback_event)
3229 (delete_callback_event, start_event_loop, initialize_event_loop):
3230 Move to event-loop.h and include it.
3231 * event-loop.h: New file.
3233 2013-09-05 Pedro Alves <palves@redhat.com>
3235 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3236 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3237 (loaded_dll, unloaded_dll): Move to ...
3238 * dll.h: ... this new file.
3239 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3241 2013-09-05 Pedro Alves <palves@redhat.com>
3243 * server.h (current_process, get_thread_process, all_processes)
3244 (add_inferior_to_list, for_each_inferior, current_inferior)
3245 (remove_inferior, add_process, remove_process, find_process_pid)
3246 (have_started_inferiors_p, have_attached_inferiors_p)
3247 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3248 (clear_inferiors, find_inferior, find_inferior_id)
3249 (inferior_target_data, set_inferior_target_data)
3250 (inferior_regcache_data, set_inferior_regcache_data): Move to
3251 inferiors.h, and include it.
3252 * inferiors.h: New file.
3254 2013-09-05 Pedro Alves <palves@redhat.com>
3256 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3260 2013-09-05 Pedro Alves <palves@redhat.com>
3262 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3264 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3265 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3266 (handle_tracepoint_general_set, handle_tracepoint_query)
3267 (tracepoint_finished_step, tracepoint_was_hit)
3268 (release_while_stepping_state_list, current_traceframe)
3269 (in_readonly_region, traceframe_read_mem)
3270 (fetch_traceframe_registers, traceframe_read_sdata)
3271 (traceframe_read_info, struct fast_tpoint_collect_status)
3272 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3273 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3274 (supply_fast_tracepoint_registers)
3275 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3276 (ipa_tdesc, claim_trampoline_space)
3277 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3278 (agent_mem_read, agent_get_trace_state_variable_value)
3279 (agent_set_trace_state_variable_value, agent_tsv_read)
3280 (agent_mem_read_string, get_raw_reg_func_addr)
3281 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3282 * tracepoint.h: ... this new file.
3284 2013-09-05 Pedro Alves <palves@redhat.com>
3286 * server.h (perror_with_name, error, fatal, warning, paddress)
3287 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3289 * utils.h: New file.
3291 2013-09-05 Pedro Alves <palves@redhat.com>
3293 * server.h (remote_debug, noack_mode, transport_is_reliable)
3294 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3295 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3296 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3297 (write_enn, initialize_async_io, enable_async_io)
3298 (disable_async_io, check_remote_input_interrupt_request)
3299 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3300 (dead_thread_notify, prepare_resume_reply)
3301 (decode_address_to_semicolon, decode_address, decode_m_packet)
3302 (decode_M_packet, decode_X_packet, decode_xfer_write)
3303 (decode_search_memory_packet, unhexify, hexify)
3304 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3305 (look_up_one_symbol, relocate_instruction)
3306 (monitor_output): Move to remote-utils.h, and include it.
3307 * remote-utils.h: New file.
3309 2013-09-05 Pedro Alves <palves@redhat.com>
3311 * server.h (_): Delete.
3313 2013-09-02 Pedro Alves <palves@redhat.com>
3315 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3316 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3318 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3320 2013-09-02 Pierre Muller <muller@sourceware.org>
3322 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3323 or WriteProcessMemory complete successfully and handle
3324 ERROR_PARTIAL_COPY error.
3326 2013-09-02 Pedro Alves <palves@redhat.com>
3328 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3329 error instead of EIO.
3331 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3334 * linux-low.c: Include filestuff.h.
3335 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3336 * lynx-low.c: Include filestuff.h.
3337 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3338 * server.c: Include filestuff.h.
3339 (main): Call notice_open_fds.
3340 * spu-low.c: Include filestuff.h.
3341 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3343 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3345 * Makefile.in: Explain why ../target and ../nat are not
3346 listed as include file search paths.
3347 (linux-waitpid.o): New object file rule.
3348 * configure.srv (srv_native_linux_obj): New variable.
3349 Replace all occurrences of linux native object files with
3350 $srv_native_linux_obj.
3351 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3352 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3353 (linux_enable_event_reporting): Remove declaration.
3354 (my_waitpid): Moved to common/linux-waitpid.c.
3355 (linux_wait_for_event): Pass ptid when calling
3356 linux_enable_event_reporting.
3357 (linux_supports_tracefork_flag): Remove.
3358 (linux_enable_event_reporting): Likewise.
3359 (linux_tracefork_grandchild): Remove.
3360 (STACK_SIZE): Moved to common/linux-ptrace.c.
3361 (linux_tracefork_child): Remove.
3362 (linux_test_for_tracefork): Remove.
3363 (linux_look_up_symbols): Call linux_supports_traceclone.
3364 (initialize_low): Remove call to linux_test_for_tracefork.
3365 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3366 common/linux-ptrace.h.
3367 (PTRACE_TYPE_ARG4): Likewise.
3368 Include linux-ptrace.h.
3370 2013-08-21 Pedro Alves <palves@redhat.com>
3372 * config.in: Renegerate.
3374 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3376 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3377 (SFILES): Remove $(srcdir)/common/target-common.c and
3378 add $(srcdir)/target/waitstatus.c.
3379 (OBS): Remove target-common.o and add waitstatus.o.
3380 (server_h): Remove $(srcdir)/../common/target-common.h and
3381 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3382 and $(srcdir)/../target/waitstatus.h.
3383 (target-common.o): Remove.
3384 (waitstatus.o): New target object file.
3385 * target.h: Do not include target-common.h and
3386 include target/resume.h, target/wait.h and
3387 target/waitstatus.h.
3389 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3391 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3392 to PTRACE_TYPE_ARG3.
3393 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3394 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3396 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3397 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3399 2013-07-27 Jie Zhang <jie@codesourcery.com>
3400 Daniel Jacobowitz <dan@codesourcery.com>
3401 Yao Qi <yao@codesourcery.com>
3403 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3404 (mips-linux-watch.o): New rule.
3405 (mips_linux_watch_h): New variable.
3406 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3408 * linux-mips-low.c: Include mips-linux-watch.h.
3409 (struct arch_process_info, struct arch_lwp_info): New.
3410 (update_watch_registers_callback): New function.
3411 (mips_linux_new_process, mips_linux_new_thread) New functions.
3412 (mips_linux_prepare_to_resume, mips_insert_point): New
3414 (mips_remove_point, mips_stopped_by_watchpoint): New
3416 (rsp_bp_type_to_target_hw_bp_type): New function.
3417 (mips_stopped_data_address): New function.
3418 (the_low_target): Add watchpoint support functions.
3420 2013-07-27 Yao Qi <yao@codesourcery.com>
3422 * i386-low.c: Include break-common.h.
3423 (enum target_hw_bp_type): Remove.
3425 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3427 * Makefile.in (SFILES): /common/target-common.c.
3428 (OBS): Add target-common.o.
3429 (server_h): Add $(srcdir)/../common/target-common.h.
3430 (target-common.o): New target.
3431 * server.c (queue_stop_reply_callback): Free
3432 status string after use.
3433 * target.c (target_waitstatus_to_string): Remove.
3434 * target.h: Include target-common.h.
3435 (resume_kind): Likewise.
3436 (target_waitkind): Likewise.
3437 (target_waitstatus): Likewise.
3438 (TARGET_WNOHANG): Likewise.
3440 2013-07-04 Yao Qi <yao@codesourcery.com>
3442 * Makefile.in (host_alias): Use @host_noncanonical@.
3443 (target_alias): Use @target_noncanonical@.
3444 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3445 ACX_NONCANONICAL_HOST.
3446 * configure: Regenerated.
3449 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3451 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3452 * configure: Rebuild.
3453 * Makefile.in (version_host, version_target): Get from configure.
3454 (version.c): Use $(version_host) and $(version_target).
3456 2013-07-03 Pedro Alves <palves@redhat.com>
3458 * Makefile.in (config.status): Depend on development.sh.
3459 * acinclude.m4: Include libmcheck.m4.
3460 * configure: Regenerate.
3462 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3464 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3465 attribute inside the parentheses.
3466 (winapi_DebugSetProcessKillOnExit): Ditto.
3467 (winapi_DebugBreakProcess): Ditto.
3468 (winapi_GenerateConsoleCtrlEvent): Ditto.
3470 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3472 * notif.h (notif_event): Add a dummy member to avoid compiler
3475 2013-07-01 Pedro Alves <palves@redhat.com>
3477 * hostio.c (HOSTIO_PATH_MAX): Define.
3478 (require_filename, handle_open, handle_unlink, handle_readlink):
3481 2013-07-01 Pedro Alves <palves@redhat.com>
3483 * server.h: Include "pathmax.h".
3484 * linux-low.c: Don't include sys/param.h.
3485 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3487 * win32-low.c: Don't include sys/param.h.
3488 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3490 2013-07-01 Pedro Alves <palves@redhat.com>
3492 * event-loop.c: Don't check HAVE_UNISTD_H before including
3494 * gdbreplay.c: Likewise.
3495 * remote-utils.c: Likewise.
3496 * server.c: Likewise.
3497 * configure.ac: Don't check for unistd.h.
3498 * configure: Regenerate.
3500 2013-06-28 Tom Tromey <tromey@redhat.com>
3502 * Makefile.in (version.c): Use version.in, not
3505 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3507 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3508 * configure: Rebuild.
3509 * Makefile.in (version_host, version_target): Get from configure.
3510 (version.c): Use $(version_host) and $(version_target).
3512 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3514 Fix trace-status to output user name without trailing colon.
3515 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3517 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3519 Fix trace-status to output proper start-time and stop-time.
3520 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3521 output start time and stop time in hex as gdb expects.
3523 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3525 * tracepoint.c (build_traceframe_info_xml): Output trace state
3526 variables present in the trace buffer.
3528 2013-06-24 Tom Tromey <tromey@redhat.com>
3530 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3532 (version.o): Remove.
3533 * gdbreplay.c: Include version.h.
3534 (version, host_name): Don't declare.
3535 * server.h: Include version.h.
3536 (version, host_name): Don't declare.
3538 2013-06-12 Pedro Alves <palves@redhat.com>
3540 * linux-x86-low.c (linux_is_elf64): Delete global.
3541 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3542 with local linux_pid_exe_is_elf_64_file use.
3544 2013-06-11 Pedro Alves <palves@redhat.com>
3546 * linux-low.c (regset_disabled, disable_regset): New functions.
3547 (regsets_fetch_inferior_registers)
3548 (regsets_store_inferior_registers): Use them.
3549 (initialize_regsets_info); Don't allocate the disabled_regsets
3551 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3554 2013-06-11 Pedro Alves <palves@redhat.com>
3556 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3559 2013-06-11 Pedro Alves <palves@redhat.com>
3561 * linux-x86-low.c (initialize_low_arch): Call
3562 init_registers_x32_avx_linux.
3564 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3566 Fix compatibility with Android Bionic.
3567 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3570 2013-06-07 Pedro Alves <palves@redhat.com>
3573 * Makefile.in (OBS): Add tdesc.o.
3574 (IPA_OBJS): Add tdesc-ipa.o.
3575 (tdesc-ipa.o): New rule.
3576 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3578 * linux-low.c (new_inferior): Delete.
3579 (disabled_regsets, num_regsets): Delete.
3580 (linux_add_process): Adjust to set the new per-process
3582 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3583 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3584 was a stop. When calling arch_setup, switch the current inferior
3585 to the thread that got an event.
3586 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3587 (regsets_fetch_inferior_registers)
3588 (regsets_store_inferior_registers): New regsets_info parameter.
3590 (linux_register_in_regsets): New regs_info parameter. Adjust to
3592 (register_addr, fetch_register, store_register): New usrregs_info
3593 parameter. Adjust to use it.
3594 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3595 parameter regs_info. Adjust to use it.
3596 (linux_fetch_registers): Get the current inferior's regs_info, and
3598 (linux_store_registers): Ditto.
3599 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3600 (initialize_low): Don't initialize the target_regsets here. Call
3601 initialize_low_arch.
3602 * linux-low.h (target_regsets): Delete declaration.
3603 (struct regsets_info): New.
3604 (struct usrregs_info): New.
3605 (struct regs_info): New.
3606 (struct process_info_private) <new_inferior>: New field.
3607 (struct linux_target_ops): Delete the num_regs, regmap, and
3608 regset_bitmap fields. New field regs_info.
3609 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3610 * i387-fp.c (num_xmm_registers): Delete.
3611 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3612 calls to new interface.
3613 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3614 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3615 Infer the number of xmm registers from the regcache's target
3617 * i387-fp.h (num_xmm_registers): Delete.
3618 * inferiors.c (add_thread): Don't install the thread's regcache
3620 * proc-service.c (gregset_info): Fetch the current inferior's
3621 regs_info. Adjust to use it.
3622 * regcache.c: Include tdesc.h.
3623 (register_bytes, reg_defs, num_registers)
3624 (gdbserver_expedite_regs): Delete.
3625 (get_thread_regcache): If the thread doesn't have a regcache yet,
3626 create one, instead of aborting gdbserver.
3627 (regcache_invalidate_one): Rename to ...
3628 (regcache_invalidate_thread): ... this.
3629 (regcache_invalidate_one): New.
3630 (regcache_invalidate): Only invalidate registers of the current
3632 (init_register_cache): Add target_desc parameter, and use it.
3633 (new_register_cache): Ditto. Assert the target description has a
3634 non zero registers_size.
3635 (regcache_cpy): Add assertions. Adjust.
3636 (realloc_register_cache, set_register_cache): Delete.
3637 (registers_to_string, registers_from_string): Adjust.
3638 (find_register_by_name, find_regno, find_register_by_number)
3639 (register_cache_size): Add target_desc parameter, and use it.
3640 (free_register_cache_thread, free_register_cache_thread_one)
3641 (regcache_release, register_cache_size): New.
3642 (register_size): Add target_desc parameter, and use it.
3643 (register_data, supply_register, supply_register_zeroed)
3644 (supply_regblock, supply_register_by_name, collect_register)
3645 (collect_register_as_string, collect_register_by_name): Adjust.
3646 * regcache.h (struct target_desc): Forward declare.
3647 (struct regcache) <tdesc>: New field.
3648 (init_register_cache, new_register_cache): Add target_desc
3650 (regcache_invalidate_thread): Declare.
3651 (regcache_invalidate_one): Delete declaration.
3652 (regcache_release): Declare.
3653 (find_register_by_number, register_cache_size, register_size)
3654 (find_regno): Add target_desc parameter.
3655 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3657 * remote-utils.c: Include tdesc.h.
3658 (outreg, prepare_resume_reply): Adjust.
3659 * server.c: Include tdesc.h.
3660 (gdbserver_xmltarget): Delete declaration.
3661 (get_features_xml, process_serial_event): Adjust.
3662 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3664 (struct process_info) <tdesc>: New field.
3665 (ipa_tdesc): Declare.
3666 * tdesc.c: New file.
3667 * tdesc.h: New file.
3668 * tracepoint.c: Include tdesc.h.
3669 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3670 (get_context_regcache): Adjust to pass ipa_tdesc down.
3671 (do_action_at_tracepoint): Adjust to get the register cache size
3672 from the context regcache's description.
3673 (traceframe_walk_blocks): Adjust to get the register cache size
3674 from the current trace frame's description.
3675 (traceframe_get_pc): Adjust to get current trace frame's
3676 description and pass it down.
3677 (gdb_collect): Adjust to get the register cache size from the
3679 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3680 (gdbserver_xmltarget): Delete.
3681 (initialize_low_tracepoint): Set the ipa's target description.
3682 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3683 (initialize_low_tracepoint): Set the ipa's target description.
3684 * linux-x86-low.c: Include tdesc.h.
3685 [__x86_64__] (is_64bit_tdesc): New.
3686 (ps_get_thread_area, x86_get_thread_area): Use it.
3687 (i386_cannot_store_register): Rename to ...
3688 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3689 (i386_cannot_fetch_register): Rename to ...
3690 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3691 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3693 (target_regsets): Rename to ...
3694 (x86_regsets): ... this.
3695 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3697 (x86_siginfo_fixup): Use is_64bit_tdesc.
3698 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3699 (tdesc_x32_avx_linux, tdesc_x32_linux)
3700 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3702 (x86_linux_update_xmltarget): Delete.
3703 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3704 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3705 (AMD64_LINUX_USER64_CS): New.
3706 (x86_linux_read_description): New, based on
3707 x86_linux_update_xmltarget.
3708 (same_process_callback): New.
3709 (x86_arch_setup_process_callback): New.
3710 (x86_linux_update_xmltarget): New.
3711 (x86_regsets_info): New.
3712 (amd64_linux_regs_info): New.
3713 (i386_linux_usrregs_info): New.
3714 (i386_linux_regs_info): New.
3715 (x86_linux_regs_info): New.
3716 (x86_arch_setup): Reimplement.
3717 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3718 (x86_emit_ops): Ditto.
3719 (the_low_target): Adjust. Install x86_linux_regs_info,
3720 x86_cannot_fetch_register, and x86_cannot_store_register.
3721 (initialize_low_arch): New.
3722 * linux-ia64-low.c (tdesc_ia64): Declare.
3723 (ia64_fetch_register): Adjust.
3724 (ia64_usrregs_info, regs_info): New globals.
3725 (ia64_regs_info): New function.
3726 (the_low_target): Adjust.
3727 (initialize_low_arch): New function.
3728 * linux-sparc-low.c (tdesc_sparc64): Declare.
3729 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3731 (sparc_arch_setup): New function.
3732 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3733 (the_low_target): Adjust.
3734 (initialize_low_arch): New function.
3735 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3736 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3737 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3738 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3739 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3740 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3741 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3742 (tdesc_powerpc_isa205_vsx64l): Declare.
3743 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3744 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3745 (ppc_set_pc, ppc_get_hwcap): Adjust.
3746 (ppc_usrregs_info): Forward declare.
3747 (!__powerpc64__) ppc_regmap_adjusted: New global.
3748 (ppc_arch_setup): Adjust to the current process'es target
3750 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3751 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3752 (ppc_store_evrregset): Adjust.
3753 (target_regsets): Rename to ...
3754 (ppc_regsets): ... this, and make static.
3755 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3756 (ppc_regs_info): New function.
3757 (the_low_target): Adjust.
3758 (initialize_low_arch): New function.
3759 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3760 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3761 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3762 (tdesc_s390x_linux64v2): Declare.
3763 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3764 (s390_fill_gregset, s390_store_last_break): Adjust.
3765 (target_regsets): Rename to ...
3766 (s390_regsets): ... this, and make static.
3767 (s390_get_pc, s390_set_pc): Adjust.
3768 (s390_get_hwcap): New target_desc parameter, and use it.
3769 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3770 (s390_arch_setup): Adjust to set the current process'es target
3771 description. Don't adjust the regmap.
3772 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3773 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3774 (regs_info_3264): New globals.
3775 (s390_regs_info): New function.
3776 (the_low_target): Adjust.
3777 (initialize_low_arch): New function.
3778 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3779 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3780 [__mips64] (init_registers_mips_linux)
3781 (init_registers_mips_dsp_linux): Delete defines.
3782 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3783 (have_dsp): New global.
3784 (mips_read_description): New, based on mips_arch_setup.
3785 (mips_arch_setup): Reimplement.
3786 (get_usrregs_info): New function.
3787 (mips_cannot_fetch_register, mips_cannot_store_register)
3788 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3789 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3790 (target_regsets): Rename to ...
3791 (mips_regsets): ... this, and make static.
3792 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3793 (dsp_regs_info, regs_info): New globals.
3794 (mips_regs_info): New function.
3795 (the_low_target): Adjust.
3796 (initialize_low_arch): New function.
3797 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3798 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3800 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3801 (arm_read_description): New, with bits factored from
3803 (arm_arch_setup): Reimplement.
3804 (target_regsets): Rename to ...
3805 (arm_regsets): ... this, and make static.
3806 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3807 (arm_regs_info): New function.
3808 (the_low_target): Adjust.
3809 (initialize_low_arch): New function.
3810 * linux-m68k-low.c (tdesc_m68k): Declare.
3811 (target_regsets): Rename to ...
3812 (m68k_regsets): ... this, and make static.
3813 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3814 (m68k_regs_info): New function.
3815 (m68k_arch_setup): New function.
3816 (the_low_target): Adjust.
3817 (initialize_low_arch): New function.
3818 * linux-sh-low.c (tdesc_sharch): Declare.
3819 (target_regsets): Rename to ...
3820 (sh_regsets): ... this, and make static.
3821 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3822 (sh_regs_info, sh_arch_setup): New functions.
3823 (the_low_target): Adjust.
3824 (initialize_low_arch): New function.
3825 * linux-bfin-low.c (tdesc_bfin): Declare.
3826 (bfin_arch_setup): New function.
3827 (bfin_usrregs_info, regs_info): New globals.
3828 (bfin_regs_info): New function.
3829 (the_low_target): Adjust.
3830 (initialize_low_arch): New function.
3831 * linux-cris-low.c (tdesc_cris): Declare.
3832 (cris_arch_setup): New function.
3833 (cris_usrregs_info, regs_info): New globals.
3834 (cris_regs_info): New function.
3835 (the_low_target): Adjust.
3836 (initialize_low_arch): New function.
3837 * linux-cris-low.c (tdesc_crisv32): Declare.
3838 (cris_arch_setup): New function.
3839 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3840 (cris_regs_info): New function.
3841 (the_low_target): Adjust.
3842 (initialize_low_arch): New function.
3843 * linux-m32r-low.c (tdesc_m32r): Declare.
3844 (m32r_arch_setup): New function.
3845 (m32r_usrregs_info, regs_info): New globals.
3846 (m32r_regs_info): Adjust.
3847 (initialize_low_arch): New function.
3848 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3849 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3850 (tic6x_usrregs_info): Forward declare.
3851 (tic6x_read_description): New function, based on ...
3852 (tic6x_arch_setup): ... this. Reimplement.
3853 (target_regsets): Rename to ...
3854 (tic6x_regsets): ... this, and make static.
3855 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3856 (tic6x_regs_info): New function.
3857 (the_low_target): Adjust.
3858 (initialize_low_arch): New function.
3859 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3860 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3861 (target_regsets): Rename to ...
3862 (xtensa_regsets): ... this, and make static.
3863 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3865 (xtensa_arch_setup, xtensa_regs_info): New functions.
3866 (the_low_target): Adjust.
3867 (initialize_low_arch): New function.
3868 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3869 (nios2_arch_setup): Set the current process'es tdesc.
3870 (target_regsets): Rename to ...
3871 (nios2_regsets): ... this.
3872 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3873 (nios2_regs_info): New function.
3874 (the_low_target): Adjust.
3875 (initialize_low_arch): New function.
3876 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3877 (aarch64_arch_setup): Set the current process'es tdesc.
3878 (target_regsets): Rename to ...
3879 (aarch64_regsets): ... this.
3880 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3881 (aarch64_regs_info): New function.
3882 (the_low_target): Adjust.
3883 (initialize_low_arch): New function.
3884 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3886 (target_regsets): Rename to ...
3887 (tile_regsets): ... this.
3888 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3889 (tile_regs_info): New function.
3890 (tile_arch_setup): Set the current process'es tdesc.
3891 (the_low_target): Adjust.
3892 (initialize_low_arch): New function.
3893 * spu-low.c (tdesc_spu): Declare.
3894 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3895 * win32-arm-low.c (tdesc_arm): Declare.
3896 (arm_arch_setup): New function.
3897 (the_low_target): Install arm_arch_setup instead of
3899 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3900 (init_windows_x86): Rename to ...
3901 (i386_arch_setup): ... this. Set `win32_tdesc'.
3902 (the_low_target): Adjust.
3903 * win32-low.c (win32_tdesc): New global.
3904 (child_add_thread): Don't create the thread cache here.
3905 (do_initial_child_stuff): Set the new process'es tdesc.
3906 * win32-low.h (struct target_desc): Forward declare.
3907 (win32_tdesc): Declare.
3908 * lynx-i386-low.c (tdesc_i386): Declare global.
3909 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3910 * lynx-low.c (lynx_tdesc): New global.
3911 (lynx_add_process): Set the new process'es tdesc.
3912 * lynx-low.h (struct target_desc): Forward declare.
3913 (lynx_tdesc): Declare global.
3914 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3915 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3916 * nto-low.c (nto_tdesc): New global.
3917 (do_attach): Set the new process'es tdesc.
3918 * nto-low.h (struct target_desc): Forward declare.
3919 (nto_tdesc): Declare.
3920 * nto-x86-low.c (tdesc_i386): Declare.
3921 (nto_x86_arch_setup): Set `nto_tdesc'.
3923 2013-06-04 Gary Benson <gbenson@redhat.com>
3925 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3926 to qSupported response when appropriate.
3927 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3928 with nonzero-length annex.
3929 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3930 arguments supplied in annex.
3932 2013-05-31 Doug Evans <dje@google.com>
3935 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3936 64 bits in 64-cross-32 environment.
3938 2013-05-28 Pedro Alves <palves@redhat.com>
3940 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3941 (aarch64-without-fpu.c): Delete rule.
3942 * configure.srv (aarch64*-*-linux*): Remove references to
3943 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3944 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3947 2013-05-24 Pedro Alves <palves@redhat.com>
3949 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3950 instead of strchr/decode_address. Error if the range isn't split
3951 with a ','. Don't assume there's be a ':' in the action.
3953 2013-05-23 Yao Qi <yao@codesourcery.com>
3954 Pedro Alves <palves@redhat.com>
3956 * linux-low.c (lwp_in_step_range): New function.
3957 (linux_wait_1): If the thread was range stepping and stopped
3958 outside the stepping range, report the stop to GDB. Otherwise,
3959 continue stepping. Add range stepping debug output.
3960 (linux_set_resume_request): Copy the step range from the resume
3962 (linux_supports_range_stepping): New.
3963 (linux_target_ops) <supports_range_stepping>: Set to
3964 linux_supports_range_stepping.
3965 * linux-low.h (struct linux_target_ops)
3966 <supports_range_stepping>: New field.
3967 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3968 * linux-x86-low.c (x86_supports_range_stepping): New.
3969 (the_low_target) <supports_range_stepping>: Set to
3970 x86_supports_range_stepping.
3971 * server.c (handle_v_cont): Handle 'r' action.
3972 (handle_v_requests): Append ";r" if the target supports range
3974 * target.h (struct thread_resume) <step_range_start,
3975 step_range_end>: New fields.
3976 (struct target_ops) <supports_range_stepping>:
3978 (target_supports_range_stepping): New macro.
3980 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3982 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3983 confusion in comment.
3985 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3987 * lynx-low.c (struct process_info_private): New type.
3988 (lynx_add_process): New function.
3989 (lynx_create_inferior, lynx_attach): Replace calls to
3990 add_process by calls to lynx_add_process.
3991 (lynx_resume): If PTID is null, then try using
3992 current_process()->private->last_wait_event_ptid.
3994 (lynx_clear_inferiors): Delete. The contents of that function
3995 has been inlined in lynx_mourn;
3996 (lynx_wait_1): Save the ptid in the process's private data.
3997 (lynx_mourn): Free the process' private data. Replace call
3998 to lynx_clear_inferiors by call to clear_inferiors.
4000 2013-05-17 Yao Qi <yao@codesourcery.com>
4002 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4005 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4007 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4008 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4009 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4010 PT_TEXT_END_ADDR guards. Update comments.
4011 (linux_target_op) <read_offsets>: Conditionally define to
4012 linux_read_offsets if the target is UCLIBC and if it defines
4013 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4015 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4016 Andrew Jenner <andrew@codesourcery.com>
4018 * Makefile.in (SFILES): Add linux-nios2-low.c.
4019 (clean): Add action to delete nios2-linux.c.
4020 (nios2-linux.c): New rule.
4021 * configure.srv: Add nios2*-*-linux*.
4022 * linux-nios2-low.c: New.
4024 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4026 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4028 2013-04-25 Hui Zhu <hui@codesourcery.com>
4031 * ax.c (ax_printf): Add fflush.
4033 2013-04-22 Tom Tromey <tromey@redhat.com>
4035 * Makefile.in (SFILES): Add filestuff.c.
4036 (OBS): Add filestuff.o.
4037 (filestuff.o): New target.
4038 * config.in, configure: Rebuild.
4039 * configure.ac: Check for fdwalk, pipe2.
4041 2013-04-17 Pedro Alves <palves@redhat.com>
4043 * configure.ac (USE_THREAD_DB): Delete variable.
4044 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4045 Don't AC_SUBST USE_THREAD_DB.
4046 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4047 * config.in, configure: Regenerate.
4049 2013-04-16 Pedro Alves <palves@redhat.com>
4051 * linux-low.h (struct lwp_info) <thread_known>: Move under
4052 the USE_THREAD_DB #ifdef.
4054 2013-04-16 Pedro Alves <palves@redhat.com>
4056 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4057 (linux-low.o): Delete rule.
4058 * linux-low.h: Always include "gdb_thread_db.h" instead of
4059 conditionally including thread_db.h.
4060 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4063 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4065 * Makefile.in (install-only): Fix make install regression.
4067 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4069 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4070 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4072 * gdbserver.1: Remove.
4074 2013-03-22 Pedro Alves <palves@redhat.com>
4076 * linux-low.c (handle_extended_wait): Don't call
4077 linux_enable_event_reporting.
4079 2013-03-15 Tony Theodore <tonyt@logyst.com>
4082 * Makefile.in (SHELL): Use @SHELL@.
4084 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4086 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4089 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4091 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4092 Remove extraneous NULL element.
4094 2013-03-13 Yao Qi <yao@codesourcery.com>
4096 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4097 'V' block in trace frame.
4099 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4101 * target.h (struct target_ops): Add btrace ops.
4102 (target_supports_btrace): New macro.
4103 (target_enable_btrace): New macro.
4104 (target_disable_btrace): New macro.
4105 (target_read_btrace): New macro.
4106 * gdbthread.h (struct thread_info): Add btrace field.
4107 * server.c: Include btrace-common.h.
4108 (handle_btrace_general_set): New function.
4109 (handle_btrace_enable): New function.
4110 (handle_btrace_disable): New function.
4111 (handle_general_set): Call handle_btrace_general_set.
4112 (handle_qxfer_btrace): New function.
4113 (struct qxfer qxfer_packets[]): Add btrace entry.
4114 * inferiors.c (remove_thread): Disable btrace.
4115 * linux-low: Include linux-btrace.h.
4116 (linux_low_enable_btrace): New function.
4117 (linux_low_read_btrace): New function.
4118 (linux_target_ops): Add btrace ops.
4119 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4120 Add srv_linux_btrace=yes.
4121 (x86_64-*-linux*): Add linux-btrace.o.
4122 Add srv_linux_btrace=yes.
4123 * configure.ac: Define HAVE_LINUX_BTRACE.
4124 * config.in: Regenerated.
4125 * configure: Regenerated.
4127 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4129 * server.c (handle_qxfer): Preserve error message if -3 is
4131 (qxfer): Document the -3 return value.
4133 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4135 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4136 (linux_btrace_h): New variable.
4137 (linux-btrace.o): New rule.
4139 2013-03-08 Stan Shebs <stan@codesourcery.com>
4140 Hafiz Abid Qadeer <abidh@codesourcery.com>
4142 * tracepoint.c (trace_buffer_size): New global.
4143 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4144 (init_trace_buffer): Change to one-argument function. Allocate
4145 trace buffer memory.
4146 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4147 handle QTBuffer:size packet.
4148 (cmd_bigqtbuffer_size): New function.
4149 (initialize_tracepoint): Call init_trace_buffer with
4150 DEFAULT_TRACE_BUFFER_SIZE.
4151 * server.c (handle_query): Add QTBuffer:size in the
4154 2013-03-07 Yao Qi <yao@codesourcery.com>
4156 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4157 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4159 (cmd_qtsp): Adjust condition. Do post increment.
4160 Set cur_action and cur_step_action back to 0.
4162 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4165 * linux-low.c (linux_write_memory): Return early success if LEN is
4168 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4170 * configure.srv: Add x86_64-*-cygwin* as target.
4172 2013-02-28 Tom Tromey <tromey@redhat.com>
4174 * configure.ac: Invoke AC_SYS_LARGEFILE.
4175 * configure, config.in: Rebuild.
4177 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4179 * win32-low.c: Throughout, fix format strings and casts of
4180 printf-like functions to avoid type related warnings on all
4182 (get_child_debug_event): Print dwDebugEventCode as hex since
4183 that's how it's usually documented.
4185 2013-02-28 Yao Qi <yao@codesourcery.com>
4187 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4190 2013-02-27 Jiong Wang <jiwang@tilera.com>
4192 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4193 (reg-tilegx32.c): New rule.
4194 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4195 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4196 different register info initializer according to elf class.
4197 (init_registers_tilgx32): New function. The tilegx32 register info
4199 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4200 (tile_store_gregset): Likewise.
4202 2013-02-27 Yao Qi <yao@codesourcery.com>
4204 * server.c (process_point_options): Print debug message when
4205 debug_threads is true.
4207 2013-02-26 Yao Qi <yao@codesourcery.com>
4209 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4211 2013-02-19 Pedro Alves <palves@redhat.com>
4212 Kai Tietz <ktietz@redhat.com>
4216 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4217 instead of strtoul to extract address from packet.
4218 (process_serial_event) <'z'>: Likewise.
4220 2013-02-18 Yao Qi <yao@codesourcery.com>
4222 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4224 2013-02-14 Pedro Alves <palves@redhat.com>
4228 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4229 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4231 2013-02-14 Pedro Alves <palves@redhat.com>
4233 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4235 2013-02-14 Pedro Alves <palves@redhat.com>
4237 * tracepoint.c (save_string): Delete.
4238 (add_tracepoint_action): Use savestring instead of save_string.
4240 2013-02-12 Pedro Alves <palves@redhat.com>
4242 * linux-xtensa-low.c: Ditto.
4243 * xtensa-xtregs.c: Ditto.
4245 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4247 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4250 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4252 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4253 aarch64_num_wp_regs and aarch64_num_bp_regs to
4254 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4256 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4258 * linux-aarch64-low.c (ps_get_thread_area): Replace
4259 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4261 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4262 Marcus Shawcroft <marcus.shawcroft@arm.com>
4263 Nigel Stephens <nigel.stephens@arm.com>
4264 Yufeng Zhang <yufeng.zhang@arm.com>
4266 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4267 (aarch64.c, aarch64-without-fpu.c): New targets.
4268 * configure.srv (aarch64*-*-linux*): New.
4269 * linux-aarch64-low.c: New file.
4271 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4273 * linux-low.c (handle_extended_wait, linux_create_inferior)
4274 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4275 (dequeue_one_deferred_signal, linux_resume_one_thread)
4276 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4277 (linux_tracefork_grandchild, linux_test_for_tracefork)
4278 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4279 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4280 where the argument is 0.
4282 2013-01-25 Yao Qi <yao@codesourcery.com>
4284 * event-loop.c: Include "queue.h".
4285 (gdb_event_p): New typedef.
4286 (struct gdb_event) <next_event>: Remove.
4287 (event_queue): Change to QUEUE(gdb_event_p).
4288 (async_queue_event): Remove.
4289 (gdb_event_xfree): New.
4290 (initialize_event_loop): New.
4291 (process_event): Use API from QUEUE.
4292 (wait_for_event): Likewise.
4293 * server.c (main): Call initialize_event_loop.
4294 * server.h (initialize_event_loop): Declare.
4296 2013-01-18 Yao Qi <yao@codesourcery.com>
4298 * ax.h (struct eval_agent_expr_context): New.
4299 (gdb_eval_agent_expr): Update declaration.
4300 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4301 TFRAME. Add new argument CTX.
4302 * server.h (struct eval_agent_expr_context): Declare.
4303 (agent_mem_read, agent_tsv_read): Update declaration.
4304 (agent_mem_read_string): Likewise.
4305 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4306 (add_traceframe_block): Add new argument TPOINT.
4307 Increase TPOINT->traceframe_usage.
4308 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4309 eval_tracepoint_agent_expr.
4310 (condition_true_at_tracepoint): Likewise.
4311 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4312 (agent_mem_read_string, agent_tsv_read): Likewise.
4314 2013-01-16 Yao Qi <yao@codesourcery.com>
4316 * linux-low.c (linux_resume_one_lwp): Don't check
4317 'lwp->bp_reinsert != 0'.
4319 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4320 Pedro Alves <palves@redhat.com>
4322 * lynx-low.c (ptrace_request_to_str): Define a temporary
4323 macro and use it to simplify this function's implementation.
4325 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4327 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4330 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4332 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4334 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4336 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4338 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4340 * lynx-low.c (lynx_resume): Use the resume_info parameter
4341 to determine the ptid for the lynx_ptrace call, unless
4342 it is equal to minus_one_ptid, in which case we use the
4343 ptid of the current_inferior.
4344 (lynx_wait_1): After having received a thread create/exit
4345 event, resume the inferior's execution using the signaling
4346 thread's ptid, rather than the old ptid.
4348 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4350 * lynx-low.c (lynx_resume): Delete variable ret.
4352 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4354 * gdbreplay.c (gdbreplay_version): Update copyright year.
4355 * server.c (gdbserver_version): Likewise.
4357 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4359 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4362 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4364 * lynx-low.c (ptrace_request_to_str): Add handling for
4367 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4369 * lynx-low.c (lynx_attach): Delete variable new_process.
4371 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4373 * lynx-low.c (lynx_create_inferior): Delete variable
4376 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4378 * lynx-low.c (ptrace_request_to_str): Do not handle
4379 PTRACE_GETTHREADLIST if this macro does not exist.
4381 2012-12-15 Yao Qi <yao@codesourcery.com>
4383 * Makefile.in (OBS): Add notif.o.
4384 * notif.c, notif.h: New.
4385 * server.c: Include "notif.h".
4386 (struct vstop_notif) <next>: Remove.
4388 (queue_stop_reply): Update.
4389 (push_event, send_next_stop_reply): Remove.
4390 (discard_queued_stop_replies): Update.
4391 (notif_stop): New variable.
4392 (handle_v_stopped): Remove.
4393 (handle_v_requests): Don't call handle_v_stopped. Call
4394 handle_ack_notif instead.
4395 (queue_stop_reply_callback): Call notif_event_enque instead
4396 of queue_stop_reply.
4397 (handle_status): Don't call send_next_stop_reply, call
4398 notif_write_event instead.
4399 (kill_inferior_callback): Likewise.
4400 (detach_or_kill_inferior_callback): Likewise.
4401 (main): Call initialize_notif.
4402 (process_serial_event): Call QUEUE_is_empty.
4403 (handle_target_event): Call notif_push instead of push event.
4404 * server.h (push_event): Remove declaration.
4406 2012-12-10 Tom Tromey <tromey@redhat.com>
4408 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4409 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4412 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4413 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4414 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4415 (amd64-linux-ipa.o, ax.o): Rewrite.
4416 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4417 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4418 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4419 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4420 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4421 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4422 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4423 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4424 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4425 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4426 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4427 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4428 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4429 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4430 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4431 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4432 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4433 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4434 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4435 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4436 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4437 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4438 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4439 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4440 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4441 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4442 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4443 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4444 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4445 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4446 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4447 (reg-tilegx.o): Remove.
4448 (all_object_files): New macro.
4449 Include .deps files.
4450 * aclocal.m4, configure: Rebuild.
4451 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4452 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4453 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4455 2012-12-05 Tom Tromey <tromey@redhat.com>
4458 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4460 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4462 * configure.ac: Check for linux/perf_event.h.
4463 * config.in: Regenerated.
4464 * configure: Regenerated.
4466 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4468 * hostio.c (handle_readlink): Decrease buffer size
4469 parameter passed to readlink by one byte.
4471 2012-11-26 Yao Qi <yao@codesourcery.com>
4473 * configure.ac (build_warnings): Append '-Wempty-body'.
4474 * configure: Regenerated.
4475 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4478 2012-11-15 Pierre Muller <muller@sourceware.org>
4480 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4481 * config.in: Regenerate.
4482 * configure: Regenerate.
4483 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4484 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4485 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4486 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4488 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4489 instead of <sys/wait.h> header.
4490 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4492 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4494 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4495 (various make rules): Remove -DGDBSERVER
4497 2012-11-09 Yao Qi <yao@codesourcery.com>
4499 * spu-low.c (current_ptid): Move it to ..
4500 * gdbthread.h: ... here. New.
4501 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4502 * server.c (myresume, process_serial_event): Likewise.
4503 * thread-db.c (thread_db_find_new_threads): Likewise.
4504 * tracepoint.c (run_inferior_command): Likewise.
4506 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4508 * server.c (handle_search_memory_1): Include access length in
4511 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4513 * linux-crisv32-low.c: Fix compile errors.
4515 2012-09-04 Yao Qi <yao@codesourcery.com>
4517 * tracepoint.c (cmd_qtsv): Adjust debug message.
4518 Don't check CUR_TPOINT.
4520 2012-08-28 Yao Qi <yao@codesourcery.com>
4522 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4523 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4524 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4525 Remove declarations of xmalloc, xreallloc, xstrdup and
4527 * Makefile.in (libiberty_h): New.
4528 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4529 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4531 2012-08-23 Yao Qi <yao@codesourcery.com>
4533 * server.h: Remove declaration of 'xsnprintf'.
4535 2012-08-22 Keith Seitz <keiths@redhat.com>
4537 * server.h: Include build-gnulib-gbserver/config.h.
4538 * gdbreplay.c: Likewise.
4540 2012-08-08 Doug Evans <dje@google.com>
4542 * Makefile.in (SFILES): Add gdb_vecs.c.
4543 (OBS): Add gdb_vecs.o.
4544 (gdb_vecs_h, host_defs_h): New variables.
4545 (thread-db.o): Add $(gdb_vecs_h) dependency.
4546 (gdb_vecs.o): New rule.
4547 * thread-db.c: #include "gdb_vecs.h".
4548 (thread_db_load_search): Use a vector to iterate over path elements.
4549 Handle text appearing after "$pdir".
4551 * configure.ac: Add check for strstr.
4552 * config.in: Regenerate.
4553 * configure: Regenerate.
4555 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4557 * hostio.c (handle_pread): If pread fails, fall back to attempting
4559 (handle_pwrite): Likewise for pwrite.
4561 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4563 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4564 between unsupported TYPE and unimplementable ADDR/LEN combination.
4565 (arm_insert_point): Act on new return value.
4567 2012-07-31 Pedro Alves <palves@redhat.com>
4569 * server.c (process_point_options): Only skip tokens if we find
4570 one that is unrecognized. Don't treat 'X' specially while
4571 skipping unrecognized tokens.
4573 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4575 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4576 to 4-byte-align HW breakpoint addresses for Thumb.
4578 2012-07-27 Yao Qi <yao@codesourcery.com>
4582 * server.h: Declare gdb_agent_about_to_close.
4583 * target.c (kill_inferior): Include "agent.h".
4584 New. Send command 'kill'.
4585 * target.h (kill_inferior): Removed macro.
4586 * tracepoint.c (gdb_agent_about_to_close): New.
4587 (gdb_agent_helper_thread): Handle command 'close'.
4588 Wait endlessly until the inferior stops.
4589 Install gdb_agent_remove_socket to atexit hook.
4590 (agent_socket_name): New static variable.
4591 (gdb_agent_socket_init): Replace local variable 'name' with
4592 'agent_socket_name'.
4593 (gdb_agent_remove_socket): New.
4595 2012-07-27 Yao Qi <yao@codesourcery.com>
4597 * server.c (process_point_options): Stop at 'X' when parsing.
4599 2012-07-19 Michael Eager <eager@eagercon.com>
4601 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4603 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4604 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4605 hardware breakpoint.
4607 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4609 * gdbserver/linux-low.c (initialize_low): Call
4610 linux_ptrace_init_warnings.
4612 2012-07-02 Doug Evans <dje@google.com>
4614 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4617 2012-07-02 Stan Shebs <stan@codesourcery.com>
4619 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4620 (ax.o): Add it to build rule.
4622 (OBS): Add format.o.
4623 (IPA_OBS): Add format.o.
4624 * server.c (handle_query): Claim support for breakpoint commands.
4625 (process_point_options): Add command case.
4626 (process_serial_event): Leave running if there are printfs in
4628 * mem-break.h (any_persistent_commands): Declare.
4629 (add_breakpoint_commands): Declare.
4630 (gdb_no_commands_at_breakpoint): Declare.
4631 (run_breakpoint_commands): Declare.
4632 * mem-break.c (struct point_command_list): New struct.
4633 (struct breakpoint): New field command_list.
4634 (any_persistent_commands): New function.
4635 (add_commands_to_breakpoint): New function.
4636 (add_breakpoint_commands): New function.
4637 (gdb_no_commands_at_breakpoint): New function.
4638 (run_breakpoint_commands): New function.
4639 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4641 * ax.c: Include format.h.
4642 (ax_printf): New function.
4643 (gdb_eval_agent_expr): Add printf opcode.
4645 2012-06-13 Yao Qi <yao@codesourcery.com>
4647 * server.c (start_inferior): Remove duplicated writes to fields
4648 'last_resume_kind' and 'last_status' of 'current_inferior'.
4650 2012-06-12 Yao Qi <yao@codesourcery.com>
4651 Pedro Alves <palves@redhat.com>
4653 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4655 * server.c (handle_v_cont): Extend comment.
4657 2012-06-11 Yao Qi <yao@codesourcery.com>
4659 * linux-low.c (linux_attach): Add 'static'.
4661 2012-06-06 Yao Qi <yao@codesourcery.com>
4663 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4665 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4667 Fix gcc -flto compilation warning.
4668 * server.c (main): Make variable multi_mode and attach volatile.
4670 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4672 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4673 if the platform doesn't know about it.
4675 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4677 * Makefile.in (SFILES): Add linux-tile-low.c.
4678 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4679 * configure.srv: Handle tilegx-*-linux*.
4680 * linux-tile-low.c: New file.
4682 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4684 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4686 2012-05-24 Pedro Alves <palves@redhat.com>
4690 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4692 2012-05-24 Pedro Alves <palves@redhat.com>
4696 Replace target_signal with gdb_signal throughout.
4698 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4700 * linux-low.c (linux_store_registers): Avoid the copying sequence
4701 when no data has been retrieved by ptrace.
4703 2012-05-22 Will Deacon <will.deacon@arm.com>
4705 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4706 Include asm/ptrace.h.
4707 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4710 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4712 * linux-low.c (linux_store_registers): Don't re-retrieve data
4713 with ptrace that has already been obtained from /proc. Always
4714 copy any data retrieved with ptrace to the buffer supplied.
4716 2012-05-11 Yao Qi <yao@codesourcery.com>
4717 Pedro Alves <palves@redhat.com>
4719 * linux-low.c (enum stopping_threads_kind): New.
4720 (stopping_threads): Change type to `enum stopping_threads_kind'.
4721 (handle_extended_wait): If stopping and suspending threads, leave
4722 the new_lwp suspended too.
4723 (linux_wait_for_event): Adjust.
4724 (stop_all_lwps): Set `stopping_threads' to
4725 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4726 whether we're suspending threads or just stopping them. Assert no
4729 2012-04-29 Yao Qi <yao@codesourcery.com>
4731 * server.h: Move some code to ...
4732 * gdbthread.h: ... here. New.
4733 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4734 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4735 (nto-low.o, win32-low.o): Likewise.
4736 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4737 * regcache.c, remote-utils.c, server.c: Likewise.
4738 * target.c, tracepoint.c, win32-low.c: Likewise.
4740 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4742 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4743 (PTRACE_ARG4_TYPE): Likewise.
4744 (PTRACE_XFER_TYPE): Likewise.
4745 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4746 ptrace to PTRACE_ARG3_TYPE.
4747 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4748 (PTRACE_ARG4_TYPE): Likewise.
4749 (PTRACE_XFER_TYPE): Likewise.
4750 (linux_detach_one_lwp): Cast fourth argument of
4751 ptrace to long then PTRACE_ARG4_TYPE.
4752 (regsets_fetch_inferior_registers): Cast third argument of
4753 ptrace to long then PTRACE_ARG3_TYPE.
4754 (regsets_store_inferior_registers): Likewise.
4756 2012-04-20 Pedro Alves <palves@redhat.com>
4758 * configure: Regenerate.
4760 2012-04-19 Pedro Alves <palves@redhat.com>
4762 * Makefile.in (GNULIB_BUILDDIR): New.
4763 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4764 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4765 (all, install-only, uninstall, clean-info, all-lib, clean): No
4766 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4767 (maintainer-clean realclean distclean): Use subdir_do.
4769 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4770 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4771 * acinclude.m4: Include acx_configure_dir.m4.
4772 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4773 calls. Call AC_PROG_RANLIB. Configure gnulib using
4776 (GNULIB_STDINT_H): Adjust.
4777 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4778 * gdbreplay.c: Include build-gnulib/config.h.
4779 * server.h: Likewise.
4780 * aclocal.m4: Regenerate.
4781 * config.in: Regenerate.
4782 * configure: Regenerate.
4784 2012-04-19 Pedro Alves <palves@redhat.com>
4786 * Makefile.in (LIBGNU, INCGNU): Adjust.
4787 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4788 (all, install-only, uninstall, clean-info, all-lib, clean)
4789 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4790 * configure.ac: Adjust AC_OUTPUT output.
4791 * aclocal.m4: Regenerate.
4792 * configure: Regenerate.
4794 2012-04-19 Pedro Alves <palves@redhat.com>
4796 * Makefile.in (generated_files): New.
4797 (server_h): Remove the explicit dependency on config.h, and depend
4798 on $generated_files.
4800 2012-04-19 Pedro Alves <palves@redhat.com>
4802 * Makefile.in (INCGNU): Add -Ignulib.
4804 2012-04-19 Pedro Alves <palves@redhat.com>
4806 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4807 (INCGNU): ... this, and spell out -I here.
4808 (GNULIB_LIB): Rename to ...
4810 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4812 2012-04-19 Pedro Alves <palves@redhat.com>
4814 * config.in: Regenerate.
4816 2012-04-19 Pedro Alves <palves@redhat.com>
4818 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4819 * server.h (memmem): Remove declaration.
4820 * config.in: Regenerate.
4821 * configure: Regenerate.
4823 2012-04-19 Yao Qi <yao@codesourcery.com>
4825 * Makefile.in (SFILES): Add common/vec.c.
4829 2012-04-19 Yao Qi <yao@codesourcery.com>
4831 * remote-utils.c (prepare_resume_reply): Replace with macro
4832 target_core_of_thread.
4833 * server.c (handle_qxfer_threads_proper): Likewise.
4834 * target.h (traget_core_of_thread): New macro.
4836 2012-04-18 Pedro Alves <palves@redhat.com>
4838 * aclocal.m4: Regenerate.
4839 * configure: Regenerate.
4841 2012-04-16 Yao Qi <yao@codesourcery.com>
4843 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4844 duplicated on address.
4846 2012-04-16 Yao Qi <yao@codesourcery.com>
4848 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4849 (struct tracepoint_action_ops) <send>: New field.
4850 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4851 (agent_expr_send, x_tracepoint_action_send): New.
4852 (l_tracepoint_action_send): New.
4853 (cmd_qtdp): Download and install tracepoint
4854 according to `use_agent'.
4855 (run_inferior_command): Add one more parameter `len'.
4857 (tracepoint_send_agent): New.
4858 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4860 2012-04-16 Yao Qi <yao@codesourcery.com>
4862 * tracepoint.c (download_tracepoints): Moved to ...
4863 (cmd_qtstart): ... here.
4865 2012-04-14 Yao Qi <yao@codesourcery.com>
4867 * tracepoint.c: Include inttypes.h.
4868 (struct collect_memory_action): Use sized types.
4869 (struct tracepoint): Likewise.
4870 (cmd_qtdp, stop_tracing): Update print specifiers.
4871 (cmd_qtp, response_tracepoint): Likewise.
4872 (collect_data_at_tracepoint): Likewise.
4873 (collect_data_at_step): Likewise.
4875 2012-04-14 Yao Qi <yao@codesourcery.com>
4877 Import gnulib module inttypes.
4878 * aclocal.m4, config.in, configure: Regenerated.
4880 2012-04-14 Yao Qi <yao@codesourcery.com>
4882 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4883 Makefile and config.status at last.
4885 2012-04-13 Yao Qi <yao@codesourcery.com>
4887 * tracepoint.c: Include stdint.h unconditionally.
4889 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4891 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4892 on BFD_HAVE_SYS_PROCFS_TYPE.
4893 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4894 * configure: Regenerate.
4895 * config.in: Likewise.
4897 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4899 * Makefile.in (clean): Also remove x32.c x32-linux.c
4900 x32-avx.c x32-avx-linux.c.
4901 (x32.o): New target.
4903 (x32-linux.o): Likewise.
4904 (x32-linux.c): Likewise.
4905 (x32-avx.o): Likewise.
4906 (x32-avx.c): Likewise.
4907 (x32-avx-linux.o): Likewise.
4908 (x32-avx-linux.c): Likewise.
4910 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4911 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4912 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4913 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4914 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4915 i386/x32-avx-linux.xml.
4917 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4918 (init_registers_x32_avx_linux): Likwise.
4919 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4920 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4922 2012-04-13 Pedro Alves <palves@redhat.com>
4924 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4925 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4926 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4927 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4930 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4932 * linux-x86-low.c (compat_x32_clock_t): New.
4933 (compat_x32_siginfo_t): Likewise.
4934 (compat_x32_siginfo_from_siginfo): Likewise.
4935 (siginfo_from_compat_x32_siginfo): Likewise.
4936 (linux_is_elf64): Likewise.
4937 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4938 and siginfo_from_compat_x32_siginfo for x32.
4939 (x86_arch_setup): Set linux_is_elf64.
4941 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4944 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4946 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4947 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4948 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4949 compatible with process.
4951 2012-04-12 Yao Qi <yao@codesourcery.com>
4953 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4954 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4955 (install-only, install-info, clean): Handle sub dir gnulib.
4956 (all-lib, am--refresh): New targets.
4957 (memmem.o): Remove target.
4958 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4959 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4960 (AC_REPLACE_FUNCS): Remove memmem.
4961 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4962 (AC_OUTPUT): Generate Makefile in gnulib/.
4963 * aclocal.m4, config.in, configure: Regenerated.
4965 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4967 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4969 2012-04-05 Pedro Alves <palves@redhat.com>
4971 -Werror=strict-aliasing
4973 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4976 2012-04-04 Pedro Alves <palves@redhat.com>
4978 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4979 (sparc_store_gregset_from_stack, sparc_store_gregset)
4980 (sparc_breakpoint_at): Fix formatting.
4982 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4984 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4986 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4987 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4988 * config.in: Regenerate.
4989 * configure: Likewise.
4991 2012-03-29 Pedro Alves <palves@redhat.com>
4993 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4994 Correct ptrace arguments.
4996 2012-03-28 Pedro Alves <palves@redhat.com>
4998 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4999 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5000 (IA64_FR1_REGNUM): New defines.
5001 (ia64_fetch_register): New.
5002 (the_low_target): Install it.
5003 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5005 * linux-low.c (linux_fetch_registers): Try the
5006 the_low_target.fetch_register hook first.
5008 * linux-arm-low.c (the_low_target): Adjust.
5009 * linux-bfin-low.c (the_low_target): Adjust.
5010 * linux-cris-low.c (the_low_target): Adjust.
5011 * linux-crisv32-low.c (the_low_target): Adjust.
5012 * linux-m32r-low.c (the_low_target): Adjust.
5013 * linux-m68k-low.c (the_low_target): Adjust.
5014 * linux-mips-low.c (the_low_target): Adjust.
5015 * linux-ppc-low.c (the_low_target): Adjust.
5016 * linux-s390-low.c (the_low_target): Adjust.
5017 * linux-sh-low.c (the_low_target): Adjust.
5018 * linux-sparc-low.c (the_low_target): Adjust.
5019 * linux-tic6x-low.c (the_low_target): Adjust.
5020 * linux-x86-low.c (the_low_target): Adjust.
5021 * linux-xtensa-low.c (the_low_target): Adjust.
5023 2012-03-26 Pedro Alves <palves@redhat.com>
5025 * server.c (handle_qxfer_libraries): Don't bail early if
5026 the_target->qxfer_libraries_svr4 is not NULL.
5028 2012-03-26 Pedro Alves <palves@redhat.com>
5030 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5032 2012-03-23 Pedro Alves <palves@redhat.com>
5034 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5035 "library-list-svr4" element's start tag when the the DSO list is
5038 2012-03-23 Pedro Alves <palves@redhat.com>
5040 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5041 a variable whose type size is the same as the inferior's pointer
5044 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5046 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5048 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5049 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5050 * linux-low.h: Include <signal.h>.
5051 (struct siginfo): Remove forward declaration.
5052 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5055 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5057 * .gitignore: Ignore more files.
5059 2012-03-19 Pedro Alves <palves@redhat.com>
5060 Jan Kratochvil <jan.kratochvil@redhat.com>
5062 * server.c (cont_thread, general_thread): Add describing comments.
5063 (start_inferior): Clear `cont_thread'.
5064 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5067 2012-03-15 Yao Qi <yao@codesourcery.com>
5069 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5071 (cmd_qtdp): ... here.
5073 2012-03-15 Yao Qi <yao@codesourcery.com>
5075 * tracepoint.c (struct tracepoint_action_ops): New.
5076 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5077 (m_tracepoint_action_download): New.
5078 (r_tracepoint_action_download): New.
5079 (x_tracepoint_action_download): New.
5080 (l_tracepoint_action_download): New.
5081 (add_tracepoint_action): Install `action->ops' according type.
5082 (download_tracepoint_1): Move code `download' function pointer
5083 of various tracepoint_action_ops.
5085 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5087 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5088 linux_ptrace_attach_warnings.
5090 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5092 * Makefile.in (linux-ptrace.o): New.
5093 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5094 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5095 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5096 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5097 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5099 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5101 2012-03-08 Yao Qi <yao@codesourcery.com>
5102 Pedro Alves <palves@redhat.com>
5104 Fix PR server/13392.
5105 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5107 * tracepoint.c (remove_tracepoint): New.
5108 (cmd_qtdp): Call remove_tracepoint when failed to install.
5110 2012-03-07 Pedro Alves <palves@redhat.com>
5112 * linux-low.c (get_detach_signal): New.
5113 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5114 Pass on pending signals to PTRACE_DETACH. Check the result of the
5116 * server.c (program_signals, program_signals_p): New.
5117 (handle_general_set): Handle QProgramSignals.
5118 * server.h (program_signals, program_signals_p): Declare.
5120 2012-03-05 Pedro Alves <palves@redhat.com>
5121 Jan Kratochvil <jan.kratochvil@redhat.com>
5123 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5126 2012-03-03 Yao Qi <yao@codesourcery.com>
5128 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5129 agent_look_up_symbols.
5131 2012-03-03 Yao Qi <yao@codesourcery.com>
5133 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5134 (linux-x86-low.o): Likewise.
5135 * server.h: Remove in_process_agent_loaded.
5136 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5140 2012-03-03 Yao Qi <yao@codesourcery.com>
5142 * tracepoint.c (gdb_agent_capability): New global.
5143 (in_process_agent_loaded_ust): Renamed to
5144 `in_process_agent_supports_ust'.
5146 (in_process_agent_supports_ust): Call agent_capability_check.
5147 (clear_installed_tracepoints): Assert that agent supports
5150 2012-03-03 Yao Qi <yao@codesourcery.com>
5152 * linux-low.c (linux_supports_agent): New.
5153 (linux_target_ops): Initialize field `supports_agent' with
5154 linux_supports_agent.
5155 * target.h (struct target_ops) <supports_agent>: New.
5156 (target_supports_agent): New macro.
5157 * server.c (handle_general_set): Handle packet 'QAgent'.
5158 (handle_query): Send `QAgent+'.
5159 * Makefile.in (server.o): Depends on agent.h.
5161 2012-03-03 Yao Qi <yao@codesourcery.com>
5163 * Makefile.in (OBS): Add agent.o.
5164 Add new rule for agent.o.
5165 Track dependence of tracepoint.c on agent.h.
5166 * tracepoint.c (run_inferior_command_1):
5167 (run_inferior_command): Call agent_run_command.
5168 (gdb_ust_connect_sync_socket): Deleted. Move it to
5170 (resume_thread, stop_thread): Likewise.
5171 (gdb_ust_socket_init): Renamed to ...
5172 (gdb_agent_socket_init): ... New.
5173 (gdb_ust_thread): Renamed to ...
5174 (gdb_agent_helper_thread): ... New.
5175 (gdb_ust_init): Move some code to ...
5176 (gdb_agent_init): ... here. New.
5177 [HAVE_UST]: Call gdb_ust_init.
5178 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5179 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5180 * config.in, configure: Regenerated.
5182 2012-03-02 Pedro Alves <palves@redhat.com>
5184 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5185 * linux-low.c (struct simple_pid_list): New.
5186 (stopped_pids): New a struct simple_pid_list pointer.
5187 (add_to_pid_list, pull_pid_from_list): New.
5188 (handle_extended_wait): Don't assume the first signal new children
5189 report is SIGSTOP. Adjust call to pull_pid_from_list.
5190 (linux_wait_for_lwp): Adjust.
5192 2012-03-02 Yao Qi <yao@codesourcery.com>
5194 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5197 2012-03-02 Yao Qi <yao@codesourcery.com>
5199 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5200 `stop_pc' and `tpoint'. Update caller.
5202 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5204 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5205 * linux-low.c (use_linux_regsets): New macro.
5206 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5207 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5208 (linux_register_in_regsets): New function.
5209 (usr_fetch_inferior_registers): Skip registers covered by
5211 (usr_store_inferior_registers): Likewise.
5212 (usr_fetch_inferior_registers): New macro.
5213 (usr_store_inferior_registers): Likewise.
5214 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5215 (linux_store_registers): Likewise.
5216 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5218 (init_registers_mips64_dsp_linux): Likewise.
5219 (init_registers_mips_linux): New macro.
5220 (init_registers_mips_dsp_linux): Likewise.
5221 (mips_dsp_num_regs): Likewise.
5222 (DSP_BASE, DSP_CONTROL): New fallback macros.
5223 (mips_base_regs): New macro.
5224 (mips_regmap): Use it. Fix the size.
5225 (mips_dsp_regmap): New variable.
5226 (mips_dsp_regset_bitmap): Likewise.
5227 (mips_arch_setup): New function.
5228 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5230 (mips_cannot_store_register): Likewise.
5231 (the_low_target): Update .arch_setup, .num_regs and .regmap
5232 initializers. Add .regset_bitmap initializer.
5233 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5235 * linux-bfin-low.c (the_low_target): Likewise.
5236 * linux-cris-low.c (the_low_target): Likewise.
5237 * linux-crisv32-low.c (the_low_target): Likewise.
5238 * linux-ia64-low.c (the_low_target): Likewise.
5239 * linux-m32r-low.c (the_low_target): Likewise.
5240 * linux-m68k-low.c (the_low_target): Likewise.
5241 * linux-ppc-low.c (the_low_target): Likewise.
5242 * linux-s390-low.c (the_low_target): Likewise.
5243 * linux-sh-low.c (the_low_target): Likewise.
5244 * linux-sparc-low.c (the_low_target): Likewise.
5245 * linux-tic6x-low.c (the_low_target): Likewise.
5246 * linux-x86-low.c (the_low_target): Likewise.
5247 * linux-xtensa-low.c (the_low_target): Likewise.
5248 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5249 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5250 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5252 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5253 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5255 2012-02-29 Yao Qi <yao@codesourcery.com>
5256 Pedro Alves <palves@redhat.com>
5258 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5259 `step_over_finished' is true.
5261 2012-02-27 Pedro Alves <palves@redhat.com>
5263 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5264 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5266 2012-02-27 Pedro Alves <palves@redhat.com>
5269 * linux-low.c (pid_is_stopped): New.
5270 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5272 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5274 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5277 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5279 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5281 2012-02-24 Luis Machado <lgustavo@codesourcery>
5283 * server.c (handle_query): Advertise support for target-side
5284 breakpoint condition evaluation.
5285 (process_point_options): New function.
5286 (process_serial_event): When inserting a breakpoint, check for
5287 a target-side condition that should be evaluated.
5289 * mem-break.c: Include regcache.h and ax.h.
5290 (point_cond_list_t): New data structure.
5291 (breakpoint) <cond_list>: New field.
5292 (find_gdb_breakpoint_at): Make non-static.
5293 (delete_gdb_breakpoint_at): Clear any target-side
5295 (clear_gdb_breakpoint_conditions): New function.
5296 (add_condition_to_breakpoint): Likewise.
5297 (add_breakpoint_condition): Likewise.
5298 (gdb_condition_true_at_breakpoint): Likewise.
5299 (gdb_breakpoint_here): Return result directly instead
5300 of going through a local variable.
5302 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5303 (clear_gdb_breakpoint_conditions): Likewise.
5304 (add_breakpoint_condition): Likewise.
5305 (gdb_condition_true_at_breakpoint): Likewise.
5307 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5308 (need_step_over_p): Take target-side breakpoint condition into
5311 2012-02-24 Luis Machado <lgustavo@codesourcery>
5313 * server.h: Include tracepoint.h.
5314 (agent_mem_read, agent_get_trace_state_variable_value,
5315 agent_set_trace_state_variable_value,
5316 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5317 get_set_tsv_func_addr): New prototypes.
5319 * ax.h: New include file.
5320 * ax.c: New source file.
5322 * tracepoint.c: Include ax.h.
5323 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5324 agent_expr, eval_result_type): Move to ax.h.
5325 (parse_agent_expr): Rename to ...
5326 (gdb_parse_agent_expr): ... this, make it non-static and move
5328 (unparse_agent_expr) Rename to ...
5329 (gdb_unparse_agent_expr): ... this, make it non-static and move
5331 (eval_agent_expr): Rename to ...
5332 (eval_tracepoint_agent_expr): ... this.
5333 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5334 forward declarations.
5335 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5336 (agent_get_trace_state_variable_value): New function.
5337 (agent_set_trace_state_variable_value): New function.
5338 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5339 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5340 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5341 (condition_true_at_tracepoint): Likewise.
5342 (parse_agent_expr): Rename to ...
5343 (gdb_parse_agent_expr): ... this and move to ax.c.
5344 (unparse_agent_expr): Rename to ...
5345 (gdb_unparse_agent_expr): ... this and move to ax.c.
5346 (gdb_agent_op_name): Move to ax.c.
5347 (eval_agent_expr): Rename to ...
5348 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5350 (eval_tracepoint_agent_expr): New function.
5351 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5353 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5355 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5356 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5357 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5358 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5359 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5360 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5361 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5362 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5363 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5364 (compile_bytecodes): Remove forward declaration.
5365 (is_goto_target): Move to ax.c.
5366 (compile_bytecodes): Move to ax.c and call
5367 agent_get_trace_state_variable_value (...) and
5368 agent_set_trace_state_variable_value (...).
5370 * Makefile.in: Update ax.c and IPA dependencies.
5372 2012-02-24 Pedro Alves <palves@redhat.com>
5374 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5375 (cmd_bigqtbuffer_circular): ... this. Only handle
5376 'QTBuffer:circular:'.
5377 (handle_tracepoint_general_set): Adjust.
5379 2012-02-16 Yao Qi <yao@codesourcery.com>
5381 * inferiors.c: Move code to ...
5382 * dll.c: .... here. New.
5383 * server.h: Declare clear_dlls.
5384 * Makefile.in (SFILES): Add dll.c.
5388 2012-02-11 Yao Qi <yao@codesourcery.com>
5390 * server.c: (handle_monitor_command): Add a new parameter
5392 (handle_query): Update caller.
5394 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5396 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5397 * configure, config.in: Regenerate.
5398 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5401 2012-02-02 Pedro Alves <palves@redhat.com>
5403 Try SIGKILL first, then PTRACE_KILL.
5404 * linux-low.c (linux_kill_one_lwp): New.
5405 (linux_kill_one_lwp): Rename to ...
5406 (kill_one_lwp_callback): ... this. Use the new
5409 2012-02-02 Pedro Alves <palves@redhat.com>
5411 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5414 2012-01-27 Pedro Alves <palves@redhat.com>
5416 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5417 (elf_64_file_p): Make static.
5418 (linux_pid_exe_is_elf_64_file): New.
5419 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5420 Delete declarations.
5421 (linux_pid_exe_is_elf_64_file): Declare.
5422 * linux-x86-low.c (x86_arch_setup): Use
5423 linux_pid_exe_is_elf_64_file.
5425 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5427 * linux-low.c (linux_wait_for_event_1): Rename to ...
5428 (linux_wait_for_event): ... here and merge it with former
5429 linux_wait_for_event - new variable wait_ptid, use it.
5430 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5432 2012-01-23 Pedro Alves <palves@redhat.com>
5434 * server.c (main): Avoid yet another case of infinite loop while
5435 detaching/killing after a longjmp.
5437 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5440 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5442 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5444 * hostio.c (handle_readlink): New function.
5445 (handle_vFile): Call it to handle "vFile:readlink" packets.
5447 2012-01-20 Pedro Alves <palves@redhat.com>
5448 Ulrich Weigand <ulrich.weigand@linaro.org>
5450 * server.c (handle_v_requests): Only support vAttach and vRun to
5451 start multiple processes when in extended protocol mode.
5453 2012-01-17 Pedro Alves <palves@redhat.com>
5455 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5456 memalign plus mprotect to allocate the scratch buffer.
5458 2012-01-13 Pedro Alves <palves@redhat.com>
5460 * server.c (attach_inferior): Clear `cont_thread'.
5462 2012-01-13 Pedro Alves <palves@redhat.com>
5464 * server.c (main): Avoid infinite loop while detaching/killing
5467 2012-01-09 Doug Evans <dje@google.com>
5469 * server.c (start_inferior): Set last_ptid in --wrapper case.
5471 2012-01-06 Yao Qi <yao@codesourcery.com>
5473 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5475 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5477 2012-01-04 Yao Qi <yao@codesourcery.com>
5479 * tracepoint.c (cmd_qtdp): Print debug message
5480 for static tracepoint.
5482 2012-01-04 Yao Qi <yao@codesourcery.com>
5484 * tracepoint.c (trace_vdebug): Differentiate debug message
5485 between gdbserver and IPA.
5487 2012-01-03 Yao Qi <yao@codesourcery.com>
5489 * tracepoint.c (tracepoint_was_hit): Don't collect for
5492 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5494 * terminal.h: Reformat copyright header.
5496 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5498 * server.c (gdbserver_version): Update copyright year.
5499 * gdbreplay.c (gdbreplay_version): Likewise.
5501 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5503 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5506 2011-12-18 Hui Zhu <teawater@gmail.com>
5507 * linux-low.c (linux_create_inferior): Save return value to ret.
5509 2011-12-18 Hui Zhu <teawater@gmail.com>
5511 * linux-low.c (linux_create_inferior): Save return value to ret.
5513 2011-12-16 Doug Evans <dje@google.com>
5515 * linux-low.c (linux_create_inferior): If stdio connection,
5516 redirect stdin from /dev/null, stdout to stderr.
5517 * remote-utils.c (remote_is_stdio): New static global.
5518 (remote_connection_is_stdio): New function.
5519 (remote_prepare): Handle stdio connection.
5520 (remote_open): Ditto.
5521 (remote_close): Don't close stdin for stdio connections.
5522 (read_prim,write_prim): New functions. Replace all calls to
5523 read/write to these.
5524 * server.c (main): Watch for "-" argument. Move call to
5525 remote_prepare before start_inferior.
5526 * server.h (STDIO_CONNECTION_NAME): New macro.
5527 (remote_connection_is_stdio): Declare.
5529 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5530 in debugging output.
5532 2011-12-15 Yao Qi <yao@codesourcery.com>
5534 * tracepoint.c: Include sys/syscall.h.
5535 (gdb_ust_thread): Remove preprocessor conditional.
5537 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5539 * linux-low.c (linux_detach_one_lwp): Call
5540 the_low_target.prepare_to_resume before detaching.
5542 2011-12-14 Yao Qi <yao@codesourcery.com>
5544 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5547 2011-12-14 Yao Qi <yao@codesourcery.com>
5549 * i386-low.c (i386_low_stopped_data_address): Initialize local
5552 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5556 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5557 DR_CONTROL unless necessary. Extend comments.
5558 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5559 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5561 2011-12-13 Yao Qi <yao@codesourcery.com>
5563 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5565 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5567 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5569 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5570 Print new debug message for such case.
5572 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5574 Fix overlapping memcpy.
5575 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5576 the read_inferior_memory transfer.
5577 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5578 write_inferior_memory transfer.
5579 (set_fast_tracepoint_jump): New variable buf. Use it for the
5580 read_inferior_memory and write_inferior_memory transfers.
5581 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5582 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5583 Use it for the write_inferior_memory transfer.
5584 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5587 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5589 * linux-low.c (fetch_register, store_register): Make code
5590 consistent, fix formatting.
5592 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5594 * linux-low.c (usr_store_inferior_registers): Factor out code
5595 to handle individual registers into...
5596 (store_register): ... this new function.
5598 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5600 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5601 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5602 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5603 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5604 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5605 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5606 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5607 (srv_xmlfiles): Add new XML files.
5609 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5611 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5612 (init_registers_s390_linux32v1): Add prototype.
5613 (init_registers_s390_linux32v2): Likewise.
5614 (init_registers_s390_linux64v1): Likewise.
5615 (init_registers_s390_linux64v2): Likewise.
5616 (init_registers_s390x_linux64v1): Likewise.
5617 (init_registers_s390x_linux64v2): Likewise.
5618 (s390_num_regs): Increment to 52.
5619 (s390_regmap): Add orig_r2 register.
5620 (s390_num_regs_3264): Increment to 68.
5621 (s390_regmap_3264): Add orig_r2 register.
5622 (s390_collect_ptrace_register): Handle orig_r2 register.
5623 (s390_supply_ptrace_register): Likewise.
5624 (s390_fill_last_break): New function.
5625 (s390_store_last_break): Likewise.
5626 (s390_fill_system_call): New function.
5627 (s390_store_system_call): Likewise.
5628 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5630 (s390_check_regset): New function.
5631 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5632 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5633 Update target_regsets for available register sets.
5635 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5636 Jan Kratochvil <jan.kratochvil@redhat.com>
5638 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5639 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5641 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5642 * linux-low.h (struct process_info_private): New member r_debug.
5643 * server.c (handle_qxfer_libraries): Call
5644 the_target->qxfer_libraries_svr4.
5645 (handle_qxfer_libraries_svr4): New function.
5646 (qxfer_packets): New entry "libraries-svr4".
5647 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5648 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5649 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5650 PACKET_qXfer_libraries_svr4.
5652 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5654 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5655 PSW address/mask between 8-byte and 16-byte formats.
5656 (s390_supply_ptrace_register): Likewise.
5657 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5658 basic addressing mode bit.
5660 2011-11-24 Stan Shebs <stan@codesourcery.com>
5662 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5664 2011-11-17 Stan Shebs <stan@codesourcery.com>
5666 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5667 (tracing_start_time): New global.
5668 (tracing_stop_time): New global.
5669 (tracing_user_name): New global.
5670 (tracing_notes): New global.
5671 (tracing_stop_note): New global.
5672 (cmd_qtstart): Set traceframe_usage, start_time.
5673 (stop_tracing): Set stop_time.
5674 (cmd_qtstatus): Report additional status.
5675 (cmd_qtp): New function.
5676 (handle_tracepoint_query): Call it.
5677 (cmd_qtnotes): New function.
5678 (handle_tracepoint_general_set): Call it.
5679 (get_timestamp): Rename from tsv_get_timestamp.
5681 2011-11-14 Stan Shebs <stan@codesourcery.com>
5682 Kwok Cheung Yeung <kcy@codesourcery.com>
5684 * linux-x86-low.c (small_jump_insn): New.
5685 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5686 trampoline and error message, build a trampoline and issue a small
5687 jump instruction to it.
5688 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5689 trampoline and error message.
5690 (x86_get_min_fast_tracepoint_insn_len): New.
5691 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5692 * linux-low.h (struct linux_target_ops): Add arguments to
5693 install_fast_tracepoint_jump_pad operation, add new operation.
5694 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5696 (linux_get_min_fast_tracepoint_insn_len): New function.
5697 (linux_target_op): Add new operation.
5698 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5699 (gdb_trampoline_buffer_end): Ditto.
5700 (gdb_trampoline_buffer_error): Ditto.
5701 (struct ipa_sym_addresses): Add fields for new IPA variables.
5702 (symbol_list): Add entries for new IPA variables.
5703 (struct tracepoint): Add fields to hold the address range of the
5704 trampoline used by the tracepoint.
5705 (trampoline_buffer_head): New static variable.
5706 (trampoline_buffer_tail): Ditto.
5707 (claim_trampoline_space): New function.
5708 (have_fast_tracepoint_trampoline_buffer): New function.
5709 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5711 (install_fast_tracepoint): Ditto, also add error buffer argument.
5712 (cmd_qtminftpilen): New function.
5713 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5714 (fast_tracepoint_from_trampoline_address): New function.
5715 (fast_tracepoint_collecting): Handle trampoline as part of jump
5717 (set_trampoline_buffer_space): New function.
5718 (initialize_tracepoint): Initialize new IPA variables.
5719 * target.h (struct target_ops): Add arguments to
5720 install_fast_tracepoint_jump_pad operation, add new
5721 get_min_fast_tracepoint_insn_len operation.
5722 (target_get_min_fast_tracepoint_insn_len): New.
5723 (install_fast_tracepoint_jump_pad): Add arguments.
5724 * server.h (IPA_BUFSIZ): Define.
5725 * linux-i386-ipa.c: Include extra header files.
5726 (initialize_fast_tracepoint_trampoline_buffer): New function.
5727 (initialize_low_tracepoint): Call it.
5728 * server.h (set_trampoline_buffer_space): Declare.
5729 (claim_trampoline_space): Ditto.
5730 (have_fast_tracepoint_trampoline_buffer): Ditto.
5732 2011-11-14 Yao Qi <yao@codesourcery.com>
5734 * server.c (handle_query): Handle InstallInTrace for qSupported.
5735 * tracepoint.c (add_tracepoint): Sort list.
5736 (install_tracepoint, download_tracepoint): New.
5737 (cmd_qtdp): Call them to install and download tracepoints.
5738 (sort_tracepoints): Removed.
5739 (cmd_qtstart): Update.
5741 2011-11-14 Yao Qi <yao@codesourcery.com>
5743 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5744 * mem-break.h: Declare.
5745 * tracepoint.c (cmd_qtstart): Move some code to ...
5746 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5748 (download_tracepoints): Move some code to ...
5749 (download_tracepoint_1): ... here. New.
5751 2011-11-08 Yao Qi <yao@codesourcery.com>
5753 * remote-utils.c (relocate_instruction): A comment fix.
5755 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5757 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5758 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5759 dr_status_mirror and dr_control_mirror from debug_reg_state.
5760 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5761 (i386_initial_stuff): Remove use of deleted globals.
5762 (i386_get_thread_context, i386_set_thread_context,
5763 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5764 from debug_reg_state.
5766 2011-11-05 Yao Qi <yao@codesourcery.com>
5768 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5769 address as TPOINT's.
5771 2011-11-02 Stan Shebs <stan@codesourcery.com>
5773 * tracepoint.c (agent_mem_read_string): New function.
5774 (eval_agent_expr): Call it for tracenz.
5775 * server.c (handle_query): Report support for tracenz.
5777 2011-11-02 Yao Qi <yao@codesourcery.com>
5779 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5781 2011-11-02 Yao Qi <yao@codesourcery.com>
5783 * target.h: Fix a typo in comment.
5785 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5787 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5788 clobber the breakpoints' shadows with fast tracepoint jumps.
5789 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5790 * target.c (write_inferior_memory): Also pass MYADDR down to
5793 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5795 * configure.ac: Check support for personality routine.
5796 * configure: Regenerate.
5797 * config.in: Likewise.
5798 * linux-low.c: Include <sys/personality.h>.
5799 Define ADDR_NO_RANDOMIZE if necessary.
5800 (linux_create_inferior): Disable address space randomization when
5801 forking inferior, if requested.
5802 (linux_supports_disable_randomization): New function.
5803 (linux_target_ops): Install it.
5804 * server.h (disable_randomization): Declare.
5805 * server.c (disable_randomization): New global variable.
5806 (handle_general_set): Handle QDisableRandomization.
5807 (handle_query): Likewise for qSupported.
5808 (main): Support --disable-randomization and --no-disable-randomization
5809 command line arguments.
5810 * target.h (struct target_ops): Add supports_disable_randomization.
5811 (target_supports_disable_randomization): New macro.
5813 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5815 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5817 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5818 [!PT_GETDSBT] (target_loadmap): New definition.
5819 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5820 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5821 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5822 and PT_GETDSBT to LINUX_LOADMAP.
5823 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5824 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5826 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5828 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5829 (arm_linux_hwbp_cap): New static variable.
5830 (arm_linux_get_hwbp_cap): Replace by ...
5831 (arm_linux_init_hwbp_cap): ... this new function.
5832 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5833 (arm_linux_get_hw_watchpoint_count): Likewise.
5834 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5835 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5836 (arm_prepare_to_resume): Use perror_with_name instead of error.
5838 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5840 * linux-arm-low.c: Include <signal.h>.
5841 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5842 (struct arm_linux_hwbp_cap): New data type.
5843 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5844 (struct arm_linux_hw_breakpoint): New data type.
5845 (MAX_BPTS, MAX_WPTS): Define.
5846 (struct arch_process_info, struct arch_lwp_info): New data types.
5847 (arm_linux_get_hwbp_cap): New function.
5848 (arm_linux_get_hw_breakpoint_count): Likewise.
5849 (arm_linux_get_hw_watchpoint_count): Likewise.
5850 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5851 (arm_hwbp_control_initialize): Likewise.
5852 (arm_hwbp_control_is_enabled): Likewise.
5853 (arm_hwbp_control_is_initialized): Likewise.
5854 (arm_hwbp_control_disable): Likewise.
5855 (arm_linux_hw_breakpoint_equal): Likewise.
5856 (arm_linux_hw_point_initialize): Likewise.
5857 (struct update_registers_data): New data structure.
5858 (update_registers_callback: New function.
5859 (arm_insert_point): Likewise.
5860 (arm_remove_point): Likewise.
5861 (arm_stopped_by_watchpoint): Likewise.
5862 (arm_stopped_data_address): Likewise.
5863 (arm_new_process): Likewise.
5864 (arm_new_thread): Likewise.
5865 (arm_prepare_to_resume): Likewise.
5866 (the_low_target): Register arm_insert_point, arm_remove_point,
5867 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5868 arm_new_thread, and arm_prepare_to_resume.
5870 2011-09-15 Stan Shebs <stan@codesourcery.com>
5872 * server.h (struct emit_ops): Add compare-goto fields.
5873 * tracepoint.c (gdb_agent_op_sizes): New table.
5874 (emit_eq_goto): New function.
5875 (emit_ne_goto): New function.
5876 (emit_lt_goto): New function.
5877 (emit_le_goto): New function.
5878 (emit_gt_goto): New function.
5879 (emit_ge_goto): New function.
5880 (is_goto_target): New function.
5881 (compile_bytecodes): Recognize special cases of compare-goto
5882 combinations and call specialized emitters for them.
5883 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5884 (amd64_emit_ne_goto): New function.
5885 (amd64_emit_lt_goto): New function.
5886 (amd64_emit_le_goto): New function.
5887 (amd64_emit_gt_goto): New function.
5888 (amd64_emit_ge_goto): New function.
5889 (amd64_emit_ops): Add the new functions.
5890 (i386_emit_eq_goto): New function.
5891 (i386_emit_ne_goto): New function.
5892 (i386_emit_lt_goto): New function.
5893 (i386_emit_le_goto): New function.
5894 (i386_emit_gt_goto): New function.
5895 (i386_emit_ge_goto): New function.
5896 (i386_emit_ops): Add the new functions.
5898 2011-09-08 Stan Shebs <stan@codesourcery.com>
5900 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5901 (i386_emit_epilogue): Restore %ebx.
5903 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5905 * server.c (step_thread): Remove definition.
5906 (process_serial_event): Don't handle Hs.
5907 * server.h (step_thread): Remove declaration.
5908 * target.c (set_desired_inferior): Remove use of step_thread.
5910 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5912 * linux-low.c: Include linux-procfs.h.
5913 (linux_attach_lwp_1): Update comments.
5914 (linux_attach): Scan for existing threads when attaching to a
5915 process that is the tgid.
5916 * Makefile.in: Update dependencies.
5918 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5920 * configure.srv: Add linux-procfs.o dependencies.
5922 2011-08-14 Yao Qi <yao@codesourcery.com>
5924 * target.h (struct target_ops): Fix indent.
5925 * win32-low.c (win32_target_ops): Fix comment.
5927 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5928 Yao Qi <yao@codesourcery.com>
5930 * Makefile.in (clean): Remove tic6x-*.c files.
5931 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5932 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5933 (tic6x-c64xp-linux.c): Likewise.
5934 * configure.srv: Add support for tic6x-*-uclinux.
5935 * linux-tic6x-low.c: New.
5936 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5938 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5939 Yao Qi <yao@codesourcery.com>
5941 * target.h (struct target_ops): Add read_loadmap.
5942 * linux-low.c (struct target_loadseg): New type.
5943 (struct target_loadmap): New type.
5944 (linux_read_loadmap): New function.
5945 (linux_target_ops): Add linux_read_loadmap.
5946 * server.c (handle_query): Support qXfer:fdpic:read packet.
5947 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5950 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5952 * win32-low.c: Include <stdint.h>.
5954 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5956 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5957 to the inferior here.
5958 (i386_remove_aligned_watchpoint): Ditto.
5959 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5960 fit part of the watchpoint in the debug registers.
5961 (i386_update_inferior_debug_regs): New.
5962 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5963 registers, and only update the inferior on success.
5964 (i386_low_remove_watchpoint): Ditto.
5966 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5968 * linux-low.c (compare_ints, unique, list_threads, show_process,
5969 linux_core_of_thread): Delete.
5970 (linux_target_ops): Change linux_core_of_thread to
5971 linux_common_core_of_thread.
5972 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5973 * utils.c (malloc_failure): Change type of argument.
5974 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5975 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5976 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5977 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5978 (IPA_OBJS): Add common-utils-ipa.o.
5979 (ptid_h, linux_osdata_h): New macros.
5980 (server_h): Add common/common-utils.h, common/xml-utils.h,
5981 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5983 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5984 ptid.o, buffer.o): New rules.
5985 (linux-low.o): Add common/linux-osdata.h as a dependency.
5986 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5987 * configure.ac: Add AC_HEADER_DIRENT check.
5988 * config.in: Regenerate.
5989 * configure: Regenerate.
5990 * remote-utils.c (xml_escape_text): Delete.
5991 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5992 buffer_xml_printf): Move to common/buffer.c.
5993 * server.c (main): Remove call to initialize_inferiors.
5994 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5995 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5996 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5997 internal_error, gdb_assert, gdb_assert_fail): Delete.
5998 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5999 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6001 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6002 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6003 initialize_inferiors): Delete.
6005 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6007 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6010 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6012 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6014 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6016 2011-05-26 Yao Qi <yao@codesourcery.com>
6018 * Makefile.in (thread-db.o): Track dependence to
6019 common/gdb_thread_db.h.
6020 * thread-db.c: include gdb_thread_db.h from right place.
6022 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6024 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6025 __FILE__ and __LINE__ to internal_error.
6027 2011-05-13 Doug Evans <dje@google.com>
6029 * thread-db.c (try_thread_db_load_from_sdir): New function.
6030 (try_thread_db_load_from_dir): New function.
6031 (thread_db_load_search): Handle $sdir, ignore $pdir.
6032 Remove trying of system directories if search of
6033 libthread-db-search-path fails, that is now done via $sdir.
6035 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6037 * server.c (handle_query): Add EnableDisableTracepoints to the list
6038 of supported features.
6039 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6041 (cmd_qtenable_disable): New.
6042 (cmd_qtstart): Install tracepoints even if disabled.
6043 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6044 receiving a QTEnable or QTDisable packet.
6045 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6046 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6048 (gdb_probe): Skip data collection if static tracepoint is disabled.
6050 2011-05-10 Doug Evans <dje@google.com>
6052 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6054 2011-05-04 Doug Evans <dje@google.com>
6056 * linux-low.c (linux_join): Skip process lookup.
6057 * spu-low.c (spu_join): Ditto.
6058 * server.c (join_inferiors_callback): Delete.
6059 (process_serial_event): For 'D' packet (detach) call join_inferior
6062 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6064 * README: Don't mention xscale*-*-linux*.
6065 * configure.srv (xscale*-*-linux*): Don't handle target.
6067 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6069 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6071 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6072 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6073 (i386_emit_void_call_2): Likewise.
6075 2011-04-26 Yao Qi <yao@codesourcery.com>
6077 * linux-low.c: Move common macros to linux-ptrace.h.
6078 Include linux-ptrace.h.
6079 * Makefile.in (linux_ptrace_h): New.
6080 (linux-low.o): Depends on linux-ptrace.h.
6082 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6084 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6085 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6086 (remote_prepare): New function with most of the TCP code from ...
6087 (remote_open): ... here. Detect PORT here unconditionally. Move also
6088 setting transport_is_reliable.
6089 * server.c (run_once): New variable.
6090 (gdbserver_usage): Document it.
6091 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6092 the first run if RUN_ONCE.
6093 * server.h (run_once, remote_prepare): New declarations.
6095 2011-04-19 Tom Tromey <tromey@redhat.com>
6097 * win32-low.c (handle_load_dll): Remove duplicate "the".
6099 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6101 Remove support for old Cygwin 1.5 versions.
6102 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6103 function to avoid warning.
6104 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6107 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6109 * gdbserver/server.h (Macro _): Define it if not available.
6111 2011-03-14 Michael Snyder <msnyder@vmware.com>
6113 * hostio.c (handle_close): Remove unnecessary null test.
6115 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6117 * Makefile.in (maintainer-clean realclean distclean): Remove
6118 "make ... subdir_do" command.
6120 2011-03-10 Michael Snyder <msnyder@vmware.com>
6122 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6124 * server.c (handle_v_run): Free alloced buffer on early return.
6126 2011-03-09 Yao Qi <yao@codesourcery.com>
6129 2011-03-04 Yao Qi <yao@codesourcery.com>
6131 * Makefile.in: Remove GNU make feature --directory.
6133 2011-03-05 Yao Qi <yao@codesourcery.com>
6135 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6136 (subdir_do): New make target. Copied from gdb/Makefile.
6137 (maintainer-clean, realclean, distclean, clean): Call corresponding
6138 make targets in common/Makefile.
6140 2011-02-11 Yao Qi <yao@codesourcery.com>
6142 * configure.ac: Call AC_PROG_RANLIB.
6143 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6144 * configure: Regenerate.
6146 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6148 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6150 2011-03-06 Yao Qi <yao@codesourcery.com>
6152 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6154 2011-03-05 Yao Qi <yao@codesourcery.com>
6156 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6157 (subdir_do): New make target. Copied from gdb/Makefile.
6158 (maintainer-clean, realclean, distclean, clean): Call corresponding
6159 make targets in common/Makefile.
6161 2011-03-04 Yao Qi <yao@codesourcery.com>
6163 * Makefile.in: Remove GNU make feature --directory.
6165 2011-03-04 Michael Snyder <msnyder@vmware.com>
6167 * server.c (queue_stop_reply): Call xmalloc not malloc.
6169 2011-03-02 Michael Snyder <msnyder@vmware.com>
6171 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6173 2011-02-28 Michael Snyder <msnyder@vmware.com>
6175 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6176 (cmd_qtframe): Ditto.
6177 (cmd_qtbuffer): Ditto.
6178 (cmd_bigqtbuffer): Ditto.
6180 * utils.c (decimal2str): Initialize 'width' to nine, then
6183 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6185 * hostio.c (require_data): Free *data, not data.
6187 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6189 * hostio.c (require_data): Use free, not xfree.
6191 2011-02-27 Michael Snyder <msnyder@vmware.com>
6193 * server.c (handle_query): Discard unused value.
6195 * hostio.c (require_data): Free malloc memory before returning
6198 2011-02-26 Michael Snyder <msnyder@vmware.com>
6200 * linux-low.c (list_threads): Call closedir for dirent.
6202 2011-02-27 Michael Snyder <msnyder@vmware.com>
6204 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6205 a case statement falls through.
6207 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6209 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6212 2011-02-26 Michael Snyder <msnyder@vmware.com>
6214 * utils.c (decimal2str): Eliminate dead code and dead param.
6215 (pulongest): Drop dead param from call to decimal2str.
6218 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6220 Revert the following patch (not approved yet):
6221 2011-02-21 Hui Zhu <teawater@gmail.com>
6222 * tracepoint.c (tp_printf): New function.
6223 (eval_agent_expr): Handle gdb_agent_op_printf.
6225 2011-02-21 Hui Zhu <teawater@gmail.com>
6227 * tracepoint.c (tp_printf): New function.
6228 (eval_agent_expr): Handle gdb_agent_op_printf.
6230 2011-02-18 Tom Tromey <tromey@redhat.com>
6232 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6233 (tracepoint.o): Likewise.
6234 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6235 (gdb_agent_op_names): Likewise.
6237 2011-02-18 Tom Tromey <tromey@redhat.com>
6239 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6240 gdb_agent_op_rot>: New constants.
6241 (gdb_agent_op_names): Add pick and roll.
6242 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6245 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6247 * aclocal.m4: Regenerated with aclocal-1.11.1.
6249 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6251 * server.c (handle_qxfer_traceframe_info): New.
6252 (qxfer_packets): Register "traceframe-info".
6253 (handle_query): Report support for qXfer:traceframe-info:read+.
6254 * tracepoint.c (match_blocktype): New.
6255 (traceframe_find_block_type): Rename to ...
6256 (traceframe_walk_blocks): ... this. Add callback filter argument,
6258 (traceframe_find_block_type): New, reimplemented on top of
6259 traceframe_walk_blocks.
6260 (build_traceframe_info_xml): New.
6261 (traceframe_read_info): New.
6262 * server.h (traceframe_read_info): Declare.
6264 2011-02-11 Yao Qi <yao@codesourcery.com>
6266 * configure.ac: Call AC_PROG_RANLIB.
6267 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6268 * configure: Regenerate.
6270 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6272 * server.c (gdb_read_memory): Change return semantics to allow
6274 (handle_search_memory_1): Adjust.
6275 (process_serial_event) <'m' packet>: Handle partial transfers.
6276 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6278 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6280 * regcache.c (init_register_cache): Initialize
6281 regcache->register_status.
6282 (free_register_cache): Release regcache->register_status.
6283 (regcache_cpy): Copy register_status.
6284 (registers_to_string): Print 'x's for unavailable registers.
6285 (supply_register): Mark the register's status valid or
6286 unavailable, depending on whether a buffer was passed in or not.
6287 (supply_register_zeroed): New.
6288 (supply_regblock): Mark the registers' status valid or
6289 unavailable, depending on whether a buffer was passed in or not.
6290 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6291 (struct regcache): New `register_status' field.
6292 (supply_register_zeroed): Declare.
6293 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6294 supply_register_zeroed, rather than passing a NULL buffer to
6296 * tracepoint.c (fetch_traceframe_registers): Update comment.
6298 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6300 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6303 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6305 * server.h (decode_xfer_write): Change prototype.
6306 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6307 and don't extract the annex here.
6308 * server.c (decode_xfer_read): Remove `annex' parameter,
6309 and don't extract the annex here.
6311 (struct qxfer): New.
6312 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6313 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6314 (handle_qxfer_statictrace): New functions, abstracted out from
6315 handle_query, and made to use the struct qxfer interface.
6316 (handle_threads_qxfer_proper): Rename to ...
6317 (handle_qxfer_threads_proper): ... this.
6318 (handle_threads_qxfer): Rename to ...
6319 (handle_qxfer_threads): ... this. Adjust.
6320 (qxfer_packets): New array.
6321 (handle_qxfer): New function.
6322 (handle_query): Use handle_qxfer.
6324 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6326 * gdbreplay.c: Shorten lines of >= 80 columns.
6327 * linux-low.c: Ditto.
6328 * linux-ppc-low.c: Ditto.
6329 * linux-s390-low.c: Ditto.
6330 * linux-sparc-low.c: Ditto.
6331 * linux-x86-low.c: Ditto.
6332 * linux-xtensa-low.c: Ditto.
6333 * mem-break.c: Ditto.
6335 * regcache.h: Ditto.
6336 * remote-utils.c: Ditto.
6339 * thread-db.c: Ditto.
6340 * tracepoint.c: Ditto.
6342 * win32-low.h: Ditto.
6344 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6346 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6349 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6351 * server.c (gdbserver_version): Update copyright year in version
6353 * gdbreplay.c (gdbreplay_version): Ditto.
6355 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6357 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6358 * linux-bfin-low.c: New file.
6359 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6360 PT_DATA_ADDR for BFIN targets.
6361 * Makefile.in (SFILES): Add linux-bfin-low.c.
6362 (clean): Remove reg-bfin.c.
6363 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6364 * README: Mention supported Blackfin targets.
6366 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6368 * .gitignore: New file.
6370 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6372 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6374 2010-10-22 Jie Zhang <jie@codesourcery.com>
6376 * Makefile.in: Add FLAGS_TO_PASS variable.
6377 (install): Remove dependency of install-only and recursively
6378 invoke make for install-only.
6380 2010-10-04 Doug Evans <dje@google.com>
6382 * Makefile.in (uninstall): Use $(DESTDIR).
6384 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6388 * linux-x86-low.c (compat_siginfo_from_siginfo)
6389 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6390 si_code is < 0. Check for si_code == SI_TIMER before checking for
6393 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6395 * lynx-i386-low.c: New file.
6396 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6398 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6400 * lynx-low.c (ptrace_request_to_str): Remove handling for
6401 request values that have been removed in LynxOS 5.x.
6403 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6405 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6408 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6410 * configure.ac: Add --enable-inprocess-agent option.
6411 * configure: Rebuilt.
6413 2010-09-06 Yao Qi <yao@codesourcery.com>
6415 * linux-low.c (linux_kill): Remove unused variable.
6416 (linux_stabilize_threads): Likewise.
6417 * server.c (start_inferior): Likewise.
6418 (queue_stop_reply_callback): Likewise.
6419 * tracepoint.c (do_action_at_tracepoint): Likewise.
6421 2010-09-06 Yao Qi <yao@codesourcery.com>
6423 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6426 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6428 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6430 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6432 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6435 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6437 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6438 gdbserver/lynx-ppc-low.c: New files.
6439 * Makefile.in (lynx_low_h): New variable.
6440 (lynx-low.o, lynx-ppc-low.o): New rules.
6441 * configure.ac: On LynxOS, link with -lnetinet.
6442 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6443 * configure: regenerate.
6445 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6447 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6448 * configure.ac: Add check for vasprintf and vsnprintf.
6449 * configure, config.in: Regenerate.
6450 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6452 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6454 * gdbreplay.c: Move include of alloca.h up, next to include of
6456 * server.h: Add include of malloc.h.
6457 * mem-break.c: Remove include of malloc.h.
6458 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6460 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6462 * Makefile.in (memmem.o): Build with -Wno-error.
6464 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6466 * utils.c (xsnprintf): Make non-static.
6467 * server.h: Add xsnprintf declaration.
6468 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6469 replace calls to snprintf by calls to xsnprintf throughout.
6471 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6473 * configure.ac: Add configure check for alloca.
6474 * configure, config.in: Regenerate.
6475 * server.h: Include alloca.h if it exists.
6476 * gdbreplay.c: Include alloca.h if it exists.
6478 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6480 * linux-low.c (__SIGRTMIN): Define if not already defined.
6481 (linux_create_inferior): Check for __ANDROID__ rather than
6483 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6484 are already deferred.
6485 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6486 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6487 stopped and already has a pending signal to report.
6488 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6489 a pending signal to report or is moving out of a jump pad.
6490 (linux_init_signals): Check for __ANDROID__ rather than
6493 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6495 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6496 debug_threads check. Avoid a linear search when not doing debug
6499 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6501 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6502 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6503 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6504 (process_event): Change local fd's type to gdb_fildes_t.
6505 (create_file_handler): Adjust prototype.
6506 (delete_file_handler): Adjust prototype.
6507 (handle_file_event): Adjust prototype. Use pfildes.
6508 (create_file_event): Adjsut prototype.
6509 * remote-utils.c (remote_desc, listen_desc): Change type to
6511 * server.h: New gdb_fildes_t typedef.
6512 [USE_WIN32API]: Include winsock2.h.
6513 (delete_file_handler, add_file_handler): Adjust prototypes.
6515 * utils.c (pfildes): New.
6517 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6519 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6520 * configure: Regenerate.
6522 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6524 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6525 (linux_done_accessing_memory): ... this.
6526 (linux_target_ops): Adjust.
6527 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6528 * nto-low.c (nto_target_ops): Adjust comment.
6529 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6530 * spu-low.c (spu_target_ops): Adjust comment.
6531 * target.h (target_ops): Rename unprepare_to_access_memory field
6532 to done_accessing_memory.
6533 (unprepare_to_access_memory): Rename to ...
6534 (done_accessing_memory): ... this.
6536 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6538 * linux-low.c (linux_prepare_to_access_memory): New.
6539 (linux_unprepare_to_access_memory): New.
6540 (linux_target_ops): Install them.
6541 * server.c (read_memory): Rename to ...
6542 (gdb_read_memory): ... this. Use
6543 prepare_to_access_memory/prepare_to_access_memory.
6544 (write_memory): Rename to ...
6545 (gdb_write_memory): ... this. Use
6546 prepare_to_access_memory/prepare_to_access_memory.
6547 (handle_search_memory_1): Adjust.
6548 (process_serial_event): Adjust.
6549 * target.h (struct target_ops): New fields
6550 prepare_to_access_memory and unprepare_to_access_memory.
6551 (prepare_to_access_memory, unprepare_to_access_memory): New.
6552 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6553 prepare_to_access_memory/prepare_to_access_memory.
6554 * nto-low.c (nto_target_ops): Adjust.
6555 * spu-low.c (spu_target_ops): Adjust.
6556 * win32-low.c (win32_target_ops): Adjust.
6558 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6560 * Makefile.in (WARN_CFLAGS): Get it from configure.
6561 (WERROR_CFLAGS): New.
6562 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6563 * configure.ac: Introduce --enable-werror, which adds -Werror to
6564 the compiler command line. Enabled by default. Disable with
6565 --disable-werror. Add -Wdeclaration-after-statement
6566 Wpointer-arith and -Wformat-nonliteral to warning flags.
6567 * configure: Regenerate.
6569 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6571 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6573 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6575 * gdbreplay.c (remote_error): New.
6577 (expect): Use gdbchar. Check for error reading from GDB.
6578 Clarify sync error output.
6579 (play): Check for errors writing to GDB.
6580 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6581 * remote-utils.c (getpkt): Check for errors writing to the remote
6584 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6586 * linux-low.c (linux_wait_1): Move non-debugging code out of
6587 `debug_threads' control.
6589 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6591 * linux-low.c (linux_wait_1): Don't set last_status here.
6592 * server.c (push_event, queue_stop_reply_callback): Assert we're
6593 not pushing a TARGET_WAITKIND_IGNORE event.
6594 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6595 (myresume, handle_target_event): Set the thread's last_resume_kind
6596 and last_status from the target returned status.
6598 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6602 * linux-x86-low.c (update_debug_registers_callback): New.
6603 (i386_dr_low_set_addr): Use it.
6604 (i386_dr_low_get_addr): New.
6605 (i386_dr_low_set_control): Use update_debug_registers_callback.
6606 (i386_dr_low_get_control): New.
6607 (i386_dr_low_get_status): Adjust.
6608 * linux-low.c (linux_stop_lwp): New.
6609 * linux-low.h (linux_stop_lwp): Declare.
6611 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6612 argument instead of a i386_debug_reg_state.
6613 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6614 a i386_debug_reg_state.
6615 (i386_insert_aligned_watchpoint): Adjust.
6616 (i386_remove_aligned_watchpoint): Adjust.
6617 (i386_low_stopped_data_address): Read the debug registers from the
6618 inferior instead of from the mirrors.
6619 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6620 (i386_dr_low_get_addr): Declare.
6621 (i386_dr_low_get_control): Declare.
6622 (i386_dr_low_get_status): Change prototype.
6624 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6625 (i386_dr_low_get_addr): New.
6626 (i386_dr_low_get_control): New.
6627 (i386_dr_low_get_status): Adjust prototype. Return
6629 (i386_initial_stuff): Clear dr_status_mirror and
6631 (i386_get_thread_context): Adjust.
6632 (i386_set_thread_context): Adjust.
6633 (i386_thread_added): Adjust.
6635 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6637 * linux-low.h (linux_thread_area): Delete declaration.
6639 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6641 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6642 after its termination.
6644 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6646 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6647 (gdb_wants_all_stopped): Delete.
6648 (linux_wait_1): Don't call them.
6649 * server.c (handle_v_cont): Tag all threads as want-stopped.
6650 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6651 stopped as "client-wants-stopped".
6653 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6655 * Makefile.in (signals_h): New.
6656 (server_h): Depend on it.
6657 (server.o): Don't depend on $(signals_def).
6658 (signals.o): Depend on $(signals_def).
6660 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6662 * Makefile.in (signals_def): New.
6663 (server_h): Append include/gdb/signals.h and signals_def.
6664 (server.o): Append signals_def.
6666 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6668 * server.c (handle_target_event): Use target_signal_to_host for
6669 resume_info.sig initialization.
6670 * target.h (struct thread_resume) <sig>: New comment.
6672 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6674 * server.c (handle_query): strcpy() the returned string from paddress()
6675 instead of sprintf().
6676 * utils.c (paddress): Return phex_nz().
6678 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6680 * server.c (handle_v_cont): Call mourn_inferior if process
6682 (myresume): Likewise.
6684 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6686 Static tracepoints, and integration with UST.
6688 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6689 * mem-break.c (uninsert_all_breakpoints)
6690 (reinsert_all_breakpoints): New.
6691 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6692 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6693 (gdb_agent_ust_loaded, helper_thread_id)
6694 (gdb_agent_helper_thread_id): New macros.
6695 (struct ipa_sym_addresses): Add addr_ust_loaded,
6696 addr_helper_thread_id, addr_cmd_buf.
6697 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6698 (in_process_agent_loaded_ust): New.
6699 (write_e_ust_not_loaded): New.
6700 (maybe_write_ipa_ust_not_loaded): New.
6701 (struct collect_static_trace_data_action): New.
6702 (enum tracepoint_type) <static_tracepoint>: New.
6703 (struct tracepoint) <handle>: Mention static tracepoints.
6704 (struct static_tracepoint_ctx): New.
6705 (CMD_BUF_SIZE): New.
6706 (add_tracepoint_action): Handle static tracepoint actions.
6707 (unprobe_marker_at): New.
6708 (clear_installed_tracepoints): Handle static tracepoints.
6709 (cmd_qtdp): Handle static tracepoints.
6710 (probe_marker_at): New.
6711 (cmd_qtstart): Handle static tracepoints.
6712 (response_tracepoint): Handle static tracepoints.
6713 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6714 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6715 (get_context_regcache): Handle static tracepoints.
6716 (do_action_at_tracepoint): Handle static tracepoint actions.
6717 (traceframe_find_block_type): Handle static trace data blocks.
6718 (traceframe_read_sdata): New.
6719 (download_tracepoints): Download static tracepoint actions.
6720 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6721 (GDB_PROBE_NAME): New.
6726 (ust_marker_to_static_tracepoint): New.
6728 (collect_ust_data_at_tracepoint): New.
6729 (gdb_ust_probe): New.
6730 (UNIX_PATH_MAX, SOCK_DIR): New.
6731 (gdb_ust_connect_sync_socket): New.
6732 (resume_thread, stop_thread): New.
6733 (run_inferior_command): New.
6734 (init_named_socket): New.
6735 (gdb_ust_socket_init): New.
6736 (cstr_to_hexstr): New.
6738 (first_marker, next_marker): New.
6739 (response_ust_marker): New.
6740 (cmd_qtfstm, cmd_qtsstm): New.
6741 (unprobe_marker_at, probe_marker_at): New.
6742 (cmd_qtstmat, gdb_ust_thread): New.
6743 (gdb_ust_init): New.
6744 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6745 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6747 (x86_64_st_collect_regmap): New.
6748 (X86_64_NUM_ST_COLLECT_GREGS): New.
6749 (AMD64_RIP_REGNUM): New.
6750 (supply_static_tracepoint_registers): New.
6751 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6753 (i386_st_collect_regmap): New.
6754 (i386_NUM_ST_COLLECT_GREGS): New.
6755 (supply_static_tracepoint_registers): New.
6756 * server.c (handle_query): Handle qXfer:statictrace:read.
6757 <qSupported>: Report support for StaticTracepoints, and
6758 qXfer:statictrace:read features.
6759 * server.h (traceframe_read_sdata)
6760 (supply_static_tracepoint_registers): Declare.
6761 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6762 (unpack_varlen_hex): Include in IPA build.
6763 * Makefile.in (ustlibs, ustinc): New.
6764 (IPA_OBJS): Add remote-utils-ipa.o.
6765 ($(IPA_LIB)): Link -ldl and -lpthread.
6767 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6768 * config.in, configure: Regenerate.
6770 2010-06-20 Ian Lance Taylor <iant@google.com>
6771 Pedro Alves <pedro@codesourcery.com>
6773 * linux-x86-low.c (always_true): Delete.
6774 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6775 trying to fool the compiler with always_true.
6777 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6779 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6780 conditions in gdbserver.
6782 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6784 * spu-low.c (spu_read_memory): Wrap around local store limit.
6785 (spu_write_memory): Likewise.
6787 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6789 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6790 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6792 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6794 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6795 uses with LONGEST uses.
6797 2010-06-14 Stan Shebs <stan@codesourcery.com>
6798 Pedro Alves <pedro@codesourcery.com>
6802 * linux-x86-low.c: Include limits.h.
6807 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6808 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6809 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6810 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6811 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6812 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6813 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6814 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6815 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6816 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6817 (amd64_emit_void_call_2): New.
6818 (amd64_emit_ops): New.
6819 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6820 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6821 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6822 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6823 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6824 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6825 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6826 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6827 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6828 (i386_emit_stack_adjust, i386_emit_int_call_1)
6829 (i386_emit_void_call_2): New.
6830 (i386_emit_ops): New.
6831 (x86_emit_ops): New.
6832 (the_low_target): Install x86_emit_ops.
6833 * server.h (struct emit_ops): New.
6834 (get_raw_reg_func_addr): Declare.
6835 (current_insn_ptr, emit_error): Declare.
6836 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6837 (set_trace_state_variable_value): New defines.
6838 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6839 addr_get_trace_state_variable_value and
6840 addr_set_trace_state_variable_value.
6841 (symbol_list): New fields for get_raw_reg,
6842 get_trace_state_variable_value and set_trace_state_variable_value.
6843 (condfn): New typedef.
6844 (struct tracepoint): New field `compiled_cond'.
6845 (do_action_at_tracepoint): Clear compiled_cond.
6846 (get_trace_state_variable_value, set_trace_state_variable_value):
6848 (condition_true_at_tracepoint): If there's a compiled condition,
6850 (current_insn_ptr, emit_error): New globals.
6851 (struct bytecode_address): New.
6852 (get_raw_reg_func_addr): New.
6853 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6854 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6855 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6856 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6857 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6858 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6859 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6860 (compile_tracepoint_condition, compile_bytecodes): New.
6861 * target.h (emit_ops): Forward declare.
6862 (struct target_ops): New field emit_ops.
6863 (target_emit_ops): New.
6864 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6865 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6866 * linux-low.c (linux_emit_ops): New.
6867 (linux_target_ops): Install it.
6868 * linux-low.h (struct linux_target_ops): New field emit_ops.
6870 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6872 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6873 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6875 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6876 Stan Shebs <stan@codesourcery.com>
6878 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6879 (all): Depend on $(extra_libraries).
6880 (install-only): Install the IPA.
6881 (IPA_OBJS, IPA_LIB): New.
6882 (clean): Remove the IPA lib.
6883 (IPAGENT_CFLAGS): New.
6884 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6885 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6886 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6887 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6888 * configure.ac: Check for atomic builtins support in the compiler.
6889 (IPA_DEPFILES, extra_libraries): Define.
6890 * configure.srv (ipa_obj): Add description.
6891 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6892 (i[34567]86-*-linux*): Set ipa_obj.
6893 (x86_64-*-linux*): Set ipa_obj.
6894 * linux-low.c (stabilizing_threads): New.
6895 (supports_fast_tracepoints): New.
6896 (linux_detach): Stabilize threads before detaching.
6897 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6898 the lwp is either not stabilizing, or is moving out of a jump pad.
6899 (linux_fast_tracepoint_collecting): New.
6900 (maybe_move_out_of_jump_pad): New.
6901 (enqueue_one_deferred_signal): New.
6902 (dequeue_one_deferred_signal): New.
6903 (linux_wait_for_event_1): If moving out of a jump pad, defer
6904 pending signals to later.
6905 (linux_stabilize_threads): New.
6906 (linux_wait_1): Check if threads need moving out of jump pads, and
6908 (stuck_in_jump_pad_callback): New.
6909 (move_out_of_jump_pad_callback): New.
6911 (linux_resume_one_lwp): Handle moving out of jump pads.
6912 (linux_set_resume_request): Dequeue deferred signals.
6913 (need_step_over_p): Also step over fast tracepoint jumps.
6914 (start_step_over): Also uninsert fast tracepoint jumps.
6915 (finish_step_over): Also reinsert fast tracepoint jumps.
6916 (linux_install_fast_tracepoint_jump): New.
6917 (linux_target_ops): Install linux_stabilize_threads and
6918 linux_install_fast_tracepoint_jump_pad.
6919 * linux-low.h (linux_target_ops) <get_thread_area,
6920 install_fast_tracepoint_jump_pad>: New fields.
6921 (struct lwp_info) <collecting_fast_tracepoint,
6922 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6923 (linux_get_thread_area): Declare.
6924 * linux-x86-low.c (jump_insn): New.
6925 (x86_get_thread_area): New.
6926 (append_insns): New.
6928 (amd64_install_fast_tracepoint_jump_pad): New.
6929 (i386_install_fast_tracepoint_jump_pad): New.
6930 (x86_install_fast_tracepoint_jump_pad): New.
6931 (the_low_target): Install x86_get_thread_area and
6932 x86_install_fast_tracepoint_jump_pad.
6933 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6934 (struct fast_tracepoint_jump): New.
6935 (fast_tracepoint_jump_insn): New.
6936 (fast_tracepoint_jump_shadow): New.
6937 (find_fast_tracepoint_jump_at): New.
6938 (fast_tracepoint_jump_here): New.
6939 (delete_fast_tracepoint_jump): New.
6940 (set_fast_tracepoint_jump): New.
6941 (uninsert_fast_tracepoint_jumps_at): New.
6942 (reinsert_fast_tracepoint_jumps_at): New.
6943 (set_breakpoint_at): Use write_inferior_memory.
6944 (uninsert_raw_breakpoint): Use write_inferior_memory.
6945 (check_mem_read): Mask out fast tracepoint jumps.
6946 (check_mem_write): Mask out fast tracepoint jumps.
6947 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6948 (set_fast_tracepoint_jump): Declare.
6949 (delete_fast_tracepoint_jump)
6950 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6951 (reinsert_fast_tracepoint_jumps_at): Declare.
6952 * regcache.c: Don't compile many functions when building the
6953 in-process agent library.
6954 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6955 the register buffer in the heap.
6956 (free_register_cache): If the register buffer isn't owned by the
6957 regcache, don't free it.
6958 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6959 pre-existing register caches.
6960 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6962 (convert_ascii_to_int): : Constify `from' parameter type.
6963 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6964 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6965 the needed buffer in-place.
6966 (relocate_instruction): New.
6967 * server.c (handle_query) <qSymbols>: If the target supports
6968 tracepoints, give it a chance of looking up symbols. Report
6969 support for fast tracepoints.
6970 (handle_status): Stabilize threads.
6971 (process_serial_event): Adjust.
6972 * server.h (struct fast_tracepoint_jump): Forward declare.
6973 (struct process_info) <fast_tracepoint_jumps>: New field.
6974 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6975 (decode_X_packet, decode_M_packet): Adjust.
6976 (relocate_instruction): Declare.
6977 (in_process_agent_loaded): Declare.
6978 (tracepoint_look_up_symbols): Declare.
6979 (struct fast_tpoint_collect_status): Declare.
6980 (fast_tracepoint_collecting): Declare.
6981 (force_unlock_trace_buffer): Declare.
6982 (handle_tracepoint_bkpts): Declare.
6983 (initialize_low_tracepoint)
6984 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6985 * target.h (struct target_ops) <stabilize_threads,
6986 install_fast_tracepoint_jump_pad>: New fields.
6987 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6988 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6989 [HAVE_STDINT_H]: Include stdint.h.
6990 (trace_debug_1): Rename to ...
6991 (trace_vdebug): ... this.
6992 (trace_debug): Rename to ...
6993 (trace_debug_1): ... this. Add `level' parameter.
6995 (ATTR_USED, ATTR_NOINLINE): New.
6996 (IP_AGENT_EXPORT): New.
6997 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6998 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6999 (about_to_request_buffer_space, trace_buffer_is_full)
7000 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7001 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7002 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7003 (traceframe_write_count, traceframes_created)
7004 (trace_state_variables)
7005 New renaming defines.
7006 (struct ipa_sym_addresses): New.
7007 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7009 (ipa_sym_addrs): New.
7010 (all_tracepoint_symbols_looked_up): New.
7011 (in_process_agent_loaded): New.
7012 (write_e_ipa_not_loaded): New.
7013 (maybe_write_ipa_not_loaded): New.
7014 (tracepoint_look_up_symbols): New.
7015 (debug_threads) [IN_PROCESS_AGENT]: New.
7016 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7017 (UNKNOWN_SIDE_EFFECTS): New.
7018 (stop_tracing): New.
7019 (flush_trace_buffer): New.
7020 (stop_tracing_bkpt): New.
7021 (flush_trace_buffer_bkpt): New.
7022 (read_inferior_integer): New.
7023 (read_inferior_uinteger): New.
7024 (read_inferior_data_pointer): New.
7025 (write_inferior_data_pointer): New.
7026 (write_inferior_integer): New.
7027 (write_inferior_uinteger): New.
7028 (struct collect_static_trace_data_action): Delete.
7029 (enum tracepoint_type): New.
7030 (struct tracepoint) <type>: New field `type'.
7031 <actions_str, step_actions, step_actions_str>: Only include in
7033 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7034 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7035 (tracepoints): Use IP_AGENT_EXPORT.
7036 (last_tracepoint): Don't include in the IPA.
7037 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7038 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7039 (alloced_trace_state_variables): New.
7040 (trace_state_variables): Use IP_AGENT_EXPORT.
7041 (traceframe_t): Delete unused variable.
7042 (circular_trace_buffer): Don't include in the IPA.
7043 (trace_buffer_start): Delete.
7044 (struct trace_buffer_control): New.
7045 (trace_buffer_free): Delete.
7046 (struct ipa_trace_buffer_control): New.
7047 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7048 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7050 (trace_buffer_ctrl): New.
7051 (TRACE_BUFFER_CTRL_CURR): New.
7052 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7053 Reimplement as macros.
7054 (trace_buffer_wrap): Delete.
7055 (traceframe_write_count, traceframe_read_count)
7056 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7057 (struct tracepoint_hit_ctx) <type>: New field.
7058 (struct fast_tracepoint_ctx): New.
7059 (memory_barrier): New.
7061 (record_tracepoint_error): Update atomically in the IPA.
7062 (clear_inferior_trace_buffer): New.
7063 (about_to_request_buffer_space): New.
7064 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7065 updating the same buffer.
7066 (add_tracepoint): Default the tracepoint's type to trap
7067 tracepoint, and orig_size to -1.
7068 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7070 (create_trace_state_variable): New parameter `gdb'. Handle it.
7071 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7072 (cmd_qtdp): Handle fast tracepoints.
7074 (max_jump_pad_size): New.
7075 (gdb_jump_pad_head): New.
7076 (get_jump_space_head): New.
7077 (claim_jump_space): New.
7078 (sort_tracepoints): New.
7079 (MAX_JUMP_SIZE): New.
7080 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7082 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7083 support. Upload fast traceframes, and delete internal IPA
7085 (stop_tracing_handler): New.
7086 (flush_trace_buffer_handler): New.
7087 (cmd_qtstop): Upload fast tracepoints.
7088 (response_tracepoint): Handle fast tracepoints.
7089 (tracepoint_finished_step): Upload fast traceframes. Set the
7090 tracepoint hit context's tracepoint type.
7091 (handle_tracepoint_bkpts): New.
7092 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7093 type. Add comment about fast tracepoints.
7094 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7095 non-existing action_str field.
7096 (get_context_regcache): Handle fast tracepoints.
7097 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7099 (fast_tracepoint_from_jump_pad_address): New.
7100 (fast_tracepoint_from_ipa_tpoint_address): New.
7101 (collecting_t): New.
7102 (force_unlock_trace_buffer): New.
7103 (fast_tracepoint_collecting): New.
7106 (write_inferior_data_ptr): New.
7107 (target_tp_heap): New.
7108 (target_malloc): New.
7109 (download_agent_expr): New.
7111 (download_tracepoints): New.
7112 (download_trace_state_variables): New.
7113 (upload_fast_traceframes): New.
7114 (IPA_FIRST_TRACEFRAME): New.
7115 (IPA_NEXT_TRACEFRAME_1): New.
7116 (IPA_NEXT_TRACEFRAME): New.
7117 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7118 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7119 (gdb_jump_pad_buffer_end): New.
7120 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7121 (initialize_tracepoint): Adjust.
7122 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7123 buffer. Initialize the low module.
7124 * utils.c (PREFIX, TOOLNAME): New.
7125 (malloc_failure): Use PREFIX.
7126 (error): In the IPA, an error causes an exit.
7127 (fatal, warning): Use PREFIX.
7128 (internal_error): Use TOOLNAME.
7129 (NUMCELLS): Increase to 10.
7130 * configure, config.in: Regenerate.
7132 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7134 * server.c (handle_query) <qSupported>: Do two passes over the
7135 qSupported string to avoid nesting strtok.
7137 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7139 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7141 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7143 * configure: Regenerate.
7144 * proc-service.list: New.
7146 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7148 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7151 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7153 * gdbreplay.c (remote_open): Check error return from socket() call by
7154 its equality to -1 not by it being negative.
7155 * remote-utils.c (remote_open): Likewise.
7157 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7159 * config.h: Regenerate.
7161 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7163 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7164 doesn't provide PTRACE_GET_THREAD_AREA.
7166 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7168 * linux-m68k-low.c: Include <asm/ptrace.h>
7169 (ps_get_thread_area): Implement.
7171 2010-05-03 Doug Evans <dje@google.com>
7173 * event-loop.c (struct callback_event): New struct.
7174 (callback_list): New global.
7175 (append_callback_event, delete_callback_event): New functions.
7176 (process_callback): New function.
7177 (start_event_loop): Call it.
7178 * remote-utils.c (NOT_SCHEDULED): Define.
7179 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7180 moved out of readchar.
7181 (readchar): Rewrite. Call reschedule before returning.
7182 (reset_readchar): New function.
7183 (remote_close): Call it.
7184 (process_remaining, reschedule): New functions.
7185 * server.h (callback_handler_func): New typedef.
7186 (append_callback_event, delete_callback_event): Declare.
7188 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7190 * proc-service.c (ps_pglobal_lookup): Use
7191 thread_db_look_up_one_symbol.
7192 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7193 parameter. Use it instead of all_symbols_looked_up.
7194 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7196 (all_symbols_looked_up): Don't declare.
7197 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7198 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7200 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7201 Set all_symbols_looked_up here.
7202 (thread_db_look_up_one_symbol): New.
7203 (thread_db_get_tls_address): Adjust.
7204 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7205 thread_db object on the heap, and tentatively set it in the
7207 (thread_db_init): Don't set all_symbols_looked_up here.
7208 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7210 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7212 * linux-low.c (linux_kill, linux_detach): Adjust.
7213 (status_pending_p_callback): Remove redundant statement. Check
7214 for !TARGET_WAITIKIND_IGNORE, instead of
7215 TARGET_WAITKIND_STOPPED.
7216 (handle_tracepoints): Make sure LWP is locked. Adjust.
7217 (linux_wait_for_event_1): Adjust.
7218 (linux_cancel_breakpoints): New.
7219 (unsuspend_one_lwp): New.
7220 (unsuspend_all_lwps): New.
7221 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7222 (send_sigstop_callback): Change return type to int, add new
7223 `except' parameter and handle it.
7224 (suspend_and_send_sigstop_callback): New.
7225 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7226 pass them down. If SUSPEND, also increment the lwp's suspend
7228 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7229 (need_step_over_p): Don't consider suspended LWPs.
7230 (start_step_over): Adjust.
7231 (proceed_one_lwp): Change return type to int, add new `except'
7232 parameter and handle it.
7233 (unsuspend_and_proceed_one_lwp): New.
7234 (proceed_all_lwps): Use find_inferior instead of
7236 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7237 also decrement the suspend count of LWPs. Pass `except' down,
7238 instead of hacking its suspend count.
7239 (linux_pause_all): Add `freeze' parameter. Adjust.
7240 (linux_unpause_all): New.
7241 (linux_target_ops): Install linux_unpause_all.
7242 * server.c (handle_status): Adjust.
7243 * target.h (struct target_ops): New fields `unpause_all' and
7244 `cancel_breakpoints'. Add new parameter to `pause_all'.
7245 (pause_all): Add new `freeze' parameter.
7247 (cancel_breakpoints): New.
7248 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7250 (cmd_qtstart): Pause threads.
7251 (stop_tracing): Pause threads, and cancel breakpoints.
7252 * win32-low.c (win32_target_ops): Adjust.
7254 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7256 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7257 the inferior right away from here...
7258 (linux_wait_1): ... to here, and adjust to check the thread's
7259 last_resume_kind instead of the lwp's step or stop_expected flags.
7261 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7263 * README: Use consistent `GDB' and `GDBserver' spellings.
7265 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7267 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7268 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7269 (linux_detach_one_lwp): Assume the lwp is stopped.
7270 (any_thread_of): Delete.
7271 (linux_detach): Stop all lwps here. Don't blindly delete all
7273 (delete_lwp_callback): New.
7274 (linux_mourn): Delete all lwps of the process that is gone.
7275 (linux_wait_1): Don't delete the last lwp of the process here.
7276 * mem-break.h (mark_breakpoints_out): Declare.
7277 * mem-break.c (mark_breakpoints_out): New.
7278 (free_all_breakpoints): Use it.
7279 * server.c (handle_target_event): If the process is gone, mark
7281 * thread-db.c (struct thread_db) <create_bp>: New field.
7282 (thread_db_enable_reporting): Fix prototype. Store a thread event
7283 breakpoint reference in the thread_db struct.
7284 (thread_db_load_search): Clear the thread_db object.
7285 (try_thread_db_load_1): Ditto.
7286 (switch_to_process): New.
7287 (disable_thread_event_reporting): Use it.
7288 (remove_thread_event_breakpoints): New.
7289 (thread_db_detach, thread_db_mourn): Use it.
7291 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7293 * linux-low.c (linux_enable_event_reporting): New.
7294 (linux_wait_for_event_1, handle_extended_wait): Use it.
7296 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7298 * linux-low.c (linux_kill_one_lwp, linux_kill)
7299 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7300 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7301 SIGSTOP even if the LWP is stopped.
7302 (send_sigstop_callback): New.
7303 (stop_all_lwps): Use send_sigstop_callback instead.
7304 (linux_resume_one_thread): Adjust.
7305 (proceed_one_lwp): Still proceed an LWP that the client has
7306 requested to stop, if we haven't reported it as stopped yet. Make
7307 sure that LWPs the client want stopped, have a pending SIGSTOP.
7309 2010-04-26 Doug Evans <dje@google.com>
7311 * server.c (handle_general_set): Make static.
7313 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7314 Print received char after testing for error/eof instead of before.
7315 (input_interrupt): Tweak comment.
7317 2010-04-23 Doug Evans <dje@google.com>
7319 * server.c (start_inferior): Print inferior argv if --debug.
7321 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7323 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7324 * nto-x86-low.c: Include server.h
7326 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7328 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7329 be consistent with other sources of this directory.
7330 (init_registers_amd64): Correct name of source file of this function
7333 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7335 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7338 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7340 * win32-i386-low.c: Add 64-bit support.
7341 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7342 (init_registers_amd64): Declare.
7343 (mappings): Add 64-bit version of array.
7344 (init_windows_x86): New function.
7345 (the_low_target): Change init_arch field to init_windows_x86.
7347 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7349 * win32-low.c: Adapt to support also 64-bit architecture.
7350 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7351 (get_image_name): Use SIZE_T type for local variable `done'.
7352 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7353 (toolhelp_get_dll_name): Idem.
7354 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7355 Use uintptr_t typecast to avoid warning.
7356 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7357 (handle_exception): Use phex_nz to avoid warning.
7358 (win32_wait): Remove unused local variable `process'.
7360 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7362 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7365 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7367 * configure.ac: Use `ws2_32' library for srv_mingw.
7368 * configure: Regenerate.
7369 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7370 * remote-utils.c: Likewise.
7372 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7374 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7375 if __x86_64__ is defined.
7377 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7379 * configure: Regenerate.
7381 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7383 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7384 * target.h (target_ops): New get_tib_address field.
7385 * win32-low.h (win32_thread_info): Add thread_local_base field.
7386 * win32-low.c (child_add_thread): Add tlb argument.
7387 Set thread_local_base field to TLB.
7388 (get_child_debug_event): Adapt to child_add_thread change.
7389 (win32_get_tib_address): New function.
7390 (win32_target_ops): Set get_tib_address field to
7391 win32_get_tib_address.
7392 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7394 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7396 * linux-low.c (linux_mourn): Also remove the process.
7397 * server.c (handle_target_event): Don't remove the process here.
7398 * nto-low.c (nto_mourn): New.
7399 (nto_target_ops): Install it.
7400 * spu-low.c (spu_mourn): New.
7401 (spu_target_ops): Install it.
7402 * win32-low.c (win32_mourn): New.
7403 (win32_target_ops): Install it.
7405 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7407 * server.h (buffer_xml_printf): Remove redundant `;'.
7409 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7411 * regcache.c (set_register_cache): Invalidate regcaches before
7412 changing the register cache layout.
7413 (regcache_invalidate_one): Allow a NULL regcache.
7414 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7415 regcaches before changing the register cache layout or the target
7418 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7420 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7421 variable warning on Linux/x86-64.
7423 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7425 GDBserver disconnected tracing support.
7427 * linux-low.c (linux_remove_process): Delete.
7428 (add_lwp): Don't set last_resume_kind here.
7429 (linux_kill): Use `mourn'.
7430 (linux_detach): Use `thread_db_detach', and `mourn'.
7432 (linux_attach_lwp_1): Adjust comment.
7433 (linux_attach): last_resume_kind moved the thread_info; adjust.
7434 (status_pending_p_callback): Adjust.
7435 (linux_wait_for_event_1): Adjust.
7436 (count_events_callback, select_singlestep_lwp_callback)
7437 (select_event_lwp_callback, cancel_breakpoints_callback)
7438 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7439 (proceed_one_lwp): Adjust.
7440 (linux_async): Add debug output.
7441 (linux_thread_stopped): New.
7442 (linux_pause_all): New.
7443 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7445 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7446 (thread_db_free): Delete declaration.
7447 (thread_db_detach, thread_db_mourn): Declare.
7448 * thread-db.c (thread_db_init): Use thread_db_mourn.
7449 (thread_db_free): Delete, split in two.
7450 (disable_thread_event_reporting): New.
7451 (thread_db_detach): New.
7452 (thread_db_mourn): New.
7454 * server.h (struct thread_info) <last_resume_kind>: New field.
7455 <attached>: Add comment.
7456 <gdb_detached>: New field.
7457 (handler_func): Change return type to int.
7458 (handle_serial_event, handle_target_event): Ditto.
7459 (gdb_connected): Declare.
7461 (disconnected_tracing): Declare.
7462 (stop_tracing): Declare.
7464 * server.c (handle_query) <qSupported>: Report support for
7465 disconnected tracing.
7466 (queue_stop_reply_callback): Account for running threads.
7467 (gdb_wants_thread_stopped): New.
7468 (gdb_wants_all_threads_stopped): New.
7469 (gdb_reattached_process): New.
7470 (handle_status): Clear the `gdb_detached' flag of all processes.
7471 In all-stop, stop all threads.
7472 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7473 (process_serial_event): If the remote connection breaks, or if an
7474 exit was forced with "monitor exit", force an event loop exit.
7475 Handle disconnected tracing on detach.
7476 (handle_serial_event): Adjust.
7477 (handle_target_event): If GDB isn't connected, forward events back
7478 to the inferior, unless the last process exited, in which case,
7479 exit gdbserver. Adjust interface.
7481 * remote-utils.c (remote_open): Don't block in accept. Instead
7482 register an event loop source on the listen socket file
7483 descriptor. Refactor bits into ...
7484 (listen_desc): ... this new global.
7485 (gdb_connected): ... this new function.
7486 (enable_async_notification): ... this new function.
7487 (handle_accept_event): ... this new function.
7488 (remote_close): Clear remote_desc.
7490 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7492 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7494 (mourn_inferior): Define.
7495 (target_process_qsupported): Avoid the dangling else problem.
7496 (thread_stopped): Define.
7497 (pause_all): Define.
7498 (target_waitstatus_to_string): Declare.
7499 * target.c (target_waitstatus_to_string): New.
7501 * tracepoint.c (tracing): Make extern.
7502 (disconnected_tracing): New.
7503 (stop_tracing): Make extern. Handle tracing stops due to GDB
7505 (cmd_qtdisconnected): New.
7506 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7507 (handle_tracepoint_general_set): Handle QTDisconnected.
7509 * event-loop.c (event_handler_func): Change return type to int.
7510 (process_event): Bail out if the event handler wants the event
7512 (handle_file_event): Ditto.
7513 (start_event_loop): Bail out if the event handler wants the event
7516 * nto-low.c (nto_target_ops): Adjust.
7517 * spu-low.c (spu_wait): Don't remove the process here.
7518 (spu_target_ops): Adjust.
7519 * win32-low.c (win32_wait): Don't remove the process here.
7520 (win32_target_ops): Adjust.
7522 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7524 * regcache.c (realloc_register_cache): Invalidate inferior's
7525 regcache before recreating it.
7527 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7529 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7531 2010-04-09 Stan Shebs <stan@codesourcery.com>
7532 Pedro Alves <pedro@codesourcery.com>
7534 * server.h (LONGEST): New.
7535 (struct thread_info) <while_stepping>: New field.
7536 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7538 (initialize_tracepoint, handle_tracepoint_general_set)
7539 (handle_tracepoint_query, tracepoint_finished_step)
7540 (tracepoint_was_hit, release_while_stepping_state_list):
7541 (current_traceframe): Declare.
7542 * server.c (handle_general_set): Handle tracepoint packets.
7544 (write_memory): New.
7545 (handle_search_memory_1): Use read_memory.
7546 (handle_query): Report support for conditional tracepoints, trace
7547 state variables, and tracepoint sources. Handle tracepoint
7549 (main): Initialize the tracepoints module.
7550 (process_serial_event): Handle traceframe reads/writes.
7552 * linux-low.c (handle_tracepoints): New.
7553 (linux_wait_1): Call it.
7554 (linux_resume_one_lwp): Handle while-stepping.
7555 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7556 (linux_target_ops): Install them.
7557 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7559 * linux-x86-low.c (x86_supports_tracepoints): New.
7560 (the_low_target). Install it.
7562 * mem-break.h (delete_breakpoint): Declare.
7563 * mem-break.c (delete_breakpoint): Make external.
7565 * target.h (struct target_ops): Add `supports_tracepoints',
7566 `read_pc', and `write_pc' fields.
7567 (target_supports_tracepoints): Define.
7568 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7571 * regcache.h (struct regcache) <registers_owned>: New field.
7572 (init_register_cache, regcache_cpy): Declare.
7573 (regcache_read_pc, regcache_write_pc): Declare.
7574 (register_cache_size): Declare.
7575 (supply_regblock): Declare.
7576 * regcache.c (init_register_cache): New.
7577 (new_register_cache): Use it.
7578 (regcache_cpy): New.
7579 (register_cache_size): New.
7580 (supply_regblock): New.
7581 (regcache_read_pc, regcache_write_pc): New.
7583 * tracepoint.c: New.
7585 * Makefile.in (OBS): Add tracepoint.o.
7586 (tracepoint.o): New rule.
7588 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7590 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7592 (i386-mmx.c): Likewise.
7593 (i386-mmx-linux.o): Likewise.
7594 (i386-mmx-linux.c): Likewise.
7596 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7597 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7598 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7599 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7601 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7602 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7603 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7605 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7607 * Makefile.in (clean): Updated.
7609 (i386-avx.c): Likewise.
7610 (i386-avx-linux.o): Likewise.
7611 (i386-avx-linux.c): Likewise.
7612 (amd64-avx.o): Likewise.
7613 (amd64-avx.c): Likewise.
7614 (amd64-avx-linux.o): Likewise.
7615 (amd64-avx-linux.c): Likewise.
7617 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7618 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7619 (srv_amd64_regobj): Add amd64-avx.o.
7620 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7621 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7622 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7623 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7624 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7625 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7626 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7628 * i387-fp.c: Include "i386-xstate.h".
7630 (i387_cache_to_xsave): Likewise.
7631 (i387_xsave_to_cache): Likewise.
7632 (x86_xcr0): Likewise.
7634 * i387-fp.h (i387_cache_to_xsave): Likewise.
7635 (i387_xsave_to_cache): Likewise.
7636 (x86_xcr0): Likewise.
7638 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7639 * linux-crisv32-low.c (target_regsets): Likewise.
7640 * linux-m68k-low.c (target_regsets): Likewise.
7641 * linux-mips-low.c (target_regsets): Likewise.
7642 * linux-ppc-low.c (target_regsets): Likewise.
7643 * linux-s390-low.c (target_regsets): Likewise.
7644 * linux-sh-low.c (target_regsets): Likewise.
7645 * linux-sparc-low.c (target_regsets): Likewise.
7646 * linux-xtensa-low.c (target_regsets): Likewise.
7648 * linux-low.c: Include <sys/uio.h>.
7649 (regsets_fetch_inferior_registers): Support nt_type.
7650 (regsets_store_inferior_registers): Likewise.
7651 (linux_process_qsupported): New.
7652 (linux_target_ops): Add linux_process_qsupported.
7654 * linux-low.h (regset_info): Add nt_type.
7655 (linux_target_ops): Add process_qsupported.
7657 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7659 (init_registers_i386_avx_linux): New.
7660 (init_registers_amd64_avx_linux): Likewise.
7661 (xmltarget_i386_linux_no_xml): Likewise.
7662 (xmltarget_amd64_linux_no_xml): Likewise.
7663 (PTRACE_GETREGSET): Likewise.
7664 (PTRACE_SETREGSET): Likewise.
7665 (x86_fill_xstateregset): Likewise.
7666 (x86_store_xstateregset): Likewise.
7667 (use_xml): Likewise.
7668 (x86_linux_update_xmltarget): Likewise.
7669 (x86_linux_process_qsupported): Likewise.
7670 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7671 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7672 init_registers_i386_linux here. Call
7673 x86_linux_update_xmltarget.
7674 (the_low_target): Add x86_linux_process_qsupported.
7676 * server.c (handle_query): Call target_process_qsupported.
7678 * target.h (target_ops): Add process_qsupported.
7679 (target_process_qsupported): New.
7681 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7683 * inferiors.c (add_thread): Set last_status kind to
7684 TARGET_WAITKIND_IGNORE.
7685 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7686 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7687 (linux_wait_1): Move `thread' local definition to block that uses
7688 it. Don't NULL initialize `event_child'.
7689 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7690 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7691 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7693 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7695 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7696 an extended waitstatus, or by a watchpoint.
7697 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7698 thread was stepping or has been stopped by a watchpoint.
7700 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7702 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7703 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7704 of another, then delete the previous, and validate all
7706 (validate_inserted_breakpoint): New.
7707 (delete_disabled_breakpoints): New.
7708 (validate_breakpoints): New.
7709 (check_mem_read): Validate breakpoints before trusting their
7710 shadow. Delete disabled breakpoints.
7711 (check_mem_write): Validate breakpoints before trusting they
7712 should be inserted. Delete disabled breakpoints.
7713 * mem-break.h (validate_breakpoints):
7714 * server.c (handle_query): Validate breakpoints when we see a
7717 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7719 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7720 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7721 if we could tell there's a GDB breakpoint at stop_pc.
7722 (need_step_over_p): Don't do a step over if we find a GDB
7723 breakpoint at the resume PC.
7725 * mem-break.c (struct raw_breakpoint): New.
7726 (enum bkpt_type): New type `gdb_breakpoint'.
7727 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7728 fields. New field `raw'.
7729 (find_raw_breakpoint_at): New.
7730 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7732 (set_breakpoint_at): Adjust.
7733 (delete_raw_breakpoint): New.
7734 (release_breakpoint): New.
7735 (delete_breakpoint): Rename to...
7736 (delete_breakpoint_1): ... this. Add proc parameter. Use
7737 release_breakpoint. Return ENOENT.
7738 (delete_breakpoint): Reimplement.
7739 (find_breakpoint_at): Delete.
7740 (find_gdb_breakpoint_at): New.
7741 (delete_breakpoint_at): Delete.
7742 (set_gdb_breakpoint_at): New.
7743 (delete_gdb_breakpoint_at): New.
7744 (gdb_breakpoint_here): New.
7745 (set_reinsert_breakpoint): Use release_breakpoint.
7746 (uninsert_breakpoint): Rename to ...
7747 (uninsert_raw_breakpoint): ... this.
7748 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7749 (reinsert_raw_breakpoint): Change parameter type to
7751 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7753 (check_breakpoints): Adjust. Use release_breakpoint.
7754 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7755 (breakpoint_inserted_here): Ditto.
7756 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7757 Don't trust the breakpoint's shadow if it is not inserted.
7758 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7759 (delete_all_breakpoints): Adjust.
7760 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7761 use delete_breakpoint_1.
7763 * mem-break.h (breakpoints_supported): Delete declaration.
7764 (set_gdb_breakpoint_at): Declare.
7765 (gdb_breakpoint_here): Declare.
7766 (delete_breakpoint_at): Delete.
7767 (delete_gdb_breakpoint_at): Declare.
7769 * server.h (struct raw_breakpoint): Forward declare.
7770 (struct process_info): New field `raw_breakpoints'.
7772 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7775 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7777 * linux-low.c (status_pending_p_callback): Fix comment.
7778 (linux_wait_for_event_1): Move most of the internal breakpoint
7779 handling from here...
7780 (linux_wait_1): ... to here.
7781 (count_events_callback): New.
7782 (select_singlestep_lwp_callback): New.
7783 (select_event_lwp_callback): New.
7784 (cancel_breakpoints_callback): New.
7785 (select_event_lwp): New.
7786 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7787 priority to all LWPs that have had events that should be reported
7788 to the client. Cancel breakpoints when about to reporting the
7789 event to the client, not while stopping lwps. No longer cancel
7790 finished single-steps here.
7791 (cancel_finished_single_step): Delete.
7792 (cancel_finished_single_steps): Delete.
7794 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7796 * mem-break.c (enum bkpt_type): New.
7797 (struct breakpoint): New field `type'.
7798 (set_breakpoint_at): Change return type to struct breakpoint
7799 pointer. Set type to `other_breakpoint' by default.
7800 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7801 in the breakpoint list.
7802 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7803 (reinsert_breakpoint): Rename to ...
7804 (reinsert_raw_breakpoint): ... this.
7805 (reinsert_breakpoints_at): Adjust.
7806 * mem-break.h (struct breakpoint): Declare.
7807 (set_breakpoint_at): Change return type to struct breakpoint
7810 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7812 * server.c (handle_query): Assign, not compare.
7814 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7816 Teach linux gdbserver to step-over-breakpoints.
7818 * linux-low.c (can_hardware_single_step): New.
7819 (supports_breakpoints): New.
7820 (handle_extended_wait): If stopping threads, read the stop pc of
7823 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7824 low target doesn't support retrieving the PC.
7825 (add_lwp): Set last_resume_kind to resume_continue.
7826 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7827 (linux_attach): Don't clear stop_expected. Set the lwp's
7828 last_resume_kind to resume_stop.
7829 (linux_detach_one_lwp): Don't check for removed breakpoints.
7830 (check_removed_breakpoint): Delete.
7831 (status_pending_p): Rename to ...
7832 (status_pending_p_callback): ... this. Don't check for removed
7833 breakpoints. Don't consider threads that are stopped from GDB's
7835 (linux_wait_for_lwp): Always read the stop_pc here.
7836 (cancel_breakpoint): New.
7837 (step_over_bkpt): New global.
7838 (linux_wait_for_event_1): Implement stepping over breakpoints.
7839 (gdb_wants_lwp_stopped): New.
7840 (gdb_wants_all_stopped): New.
7841 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7842 single-step traps here. Store the thread's last reported target
7844 (send_sigstop): Don't clear stop_expected. Always set it,
7846 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7847 (cancel_finished_single_step): New.
7848 (cancel_finished_single_steps): New.
7849 (wait_for_sigstop): Don't cancel finished single-step traps here.
7850 (linux_resume_one_lwp): Don't check for removed breakpoints.
7851 Don't set `step' on non-hardware step archs.
7852 (linux_set_resume_request): Ignore resume_stop requests if already
7853 stopping or stopped. Set the lwp's last_resume_kind.
7854 (resume_status_pending_p): Don't check for removed breakpoints.
7855 (need_step_over_p): New.
7856 (start_step_over): New.
7857 (finish_step_over): New.
7858 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7859 requests. Clear the thread's last reported target waitstatus.
7860 Don't use the `suspended' flag. Don't consider pending breakpoints.
7861 (linux_resume): Start a step-over if necessary.
7862 (proceed_one_lwp): New.
7863 (proceed_all_lwps): New.
7864 (unstop_all_lwps): New.
7865 * linux-low.h (struct lwp_info): Rewrite comment for the
7866 `suspended' flag. Add the `stop_pc' field. Delete the
7867 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7868 Add `'last_resume_kind' and `need_step_over' fields.
7869 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7870 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7871 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7872 (set_raw_breakpoint_at): New.
7873 (set_breakpoint_at): Rewrite to use it.
7874 (reinsert_breakpoint_handler): Delete.
7875 (set_reinsert_breakpoint): New.
7876 (reinsert_breakpoint_by_bp): Delete.
7877 (delete_reinsert_breakpoints): New.
7878 (uninsert_breakpoint): Rewrite.
7879 (uninsert_breakpoints_at): New.
7880 (reinsert_breakpoint): Rewrite.
7881 (reinsert_breakpoints_at): New.
7882 (check_breakpoints): Rewrite.
7883 (breakpoint_here): New.
7884 (breakpoint_inserted_here): New.
7885 (check_mem_read): Adjust.
7886 * mem-break.h (breakpoints_supported, breakpoint_here)
7887 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7888 (reinsert_breakpoint_by_bp): Delete declaration.
7889 (delete_reinsert_breakpoints): Declare.
7890 (reinsert_breakpoint): Delete declaration.
7891 (reinsert_breakpoints_at): Declare.
7892 (uninsert_breakpoint): Delete declaration.
7893 (uninsert_breakpoints_at): Declare.
7894 (check_breakpoints): Adjust prototype.
7895 * server.h: Adjust include order.
7896 (struct thread_info): Declare here. Add a `last_status' field.
7898 2010-03-23 Michael Snyder <msnyder@vmware.com>
7900 * server.c (crc32): New function.
7901 (handle_query): Add handling for 'qCRC:' request.
7903 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7905 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7906 lwp had been stopped by a watchpoint.
7908 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7910 * server.h (internal_error): Declare.
7911 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7912 * utils.c (internal_error): New function.
7914 2010-03-15 Andreas Schwab <schwab@redhat.com>
7916 * configure.srv: Fix typo setting srv_regobj.
7918 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7920 * linux-low.c (fetch_register): Avoid passing a non string literal
7922 (usr_store_inferior_registers): Ditto.
7924 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7926 * linux-low.c (linux_write_memory): Bail out early if peeking
7929 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7931 * linux-low.h (struct lwp_info): New fields
7932 `stopped_by_watchpoint' and `stopped_data_address'.
7933 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7934 here, and cache them in the lwp object.
7935 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7937 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7939 (linux_stopped_by_watchpoint): Rewrite.
7940 (linux_stopped_data_address): Rewrite.
7942 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7944 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7945 switching the current inferior, not before.
7947 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7949 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7950 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7951 i386-linux.c and amd64-linux.c.
7952 (reg-i386.o): Removed.
7953 (reg-i386.c): Likewise.
7954 (reg-i386-linux.o): Likewise.
7955 (reg-i386-linux.c): Likewise.
7956 (reg-x86-64.o): Likewise.
7957 (reg-x86-64.c): Likewise.
7958 (reg-x86-64-linux.o): Likewise.
7959 (reg-x86-64-linux.c): Likewise.
7962 (i386-linux.o): Likewise.
7963 (i386-linux.c): Likewise.
7964 (amd64.o): Likewise.
7965 (amd64.c): Likewise.
7966 (amd64-linux.o): Likewise.
7967 (amd64-linux.c): Likewise.
7969 * configure.srv (srv_i386_regobj): New.
7970 (srv_i386_linux_regobj): Likewise.
7971 (srv_amd64_regobj): Likewise.
7972 (srv_amd64_linux_regobj): Likewise.
7973 (srv_i386_32bit_xmlfiles): Likewise.
7974 (srv_i386_64bit_xmlfiles): Likewise.
7975 (srv_i386_xmlfiles): Likewise.
7976 (srv_amd64_xmlfiles): Likewise.
7977 (srv_i386_linux_xmlfiles): Likewise.
7978 (srv_amd64_linux_xmlfiles): Likewise.
7979 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7980 srv_xmlfiles to $srv_i386_xmlfiles.
7981 (i[34567]86-*-mingw32ce*): Likewise.
7982 (i[34567]86-*-mingw*): Likewise.
7983 (i[34567]86-*-nto*): Likewise.
7984 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7985 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7986 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7987 (x86_64-*-linux*): Likewise.
7989 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7990 (init_registers_amd64_linux): New.
7991 (x86_arch_setup): Replace init_registers_x86_64_linux with
7992 init_registers_amd64_linux.
7994 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7996 * configure.ac: Check for libdl. If it is not available link against
7997 static libthread_db.
7998 * configure: Regenerate.
8000 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8004 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8005 handing a read watchpoint.
8006 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8008 2010-02-12 Doug Evans <dje@google.com>
8010 * linux-low.c (linux_supports_tracefork_flag): Document.
8011 (linux_look_up_symbols): Add comment.
8013 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8015 * regcache.c (supply_register): Clear regcache if buf is NULL.
8017 2010-02-02 Nicolas Roche <roche@sourceware.org>
8018 Joel Brobecker <brobecker@adacore.com>
8020 * inferiors.c (find_inferior): Add function documentation.
8021 (unloaded_dll): Handle the case where the unloaded dll has not
8022 been previously registered in the dll list.
8024 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8026 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8027 (thumb2_breakpoint): New.
8028 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8030 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8032 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8033 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8036 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8038 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8040 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8042 * linux-s390-low.c (s390_collect_ptrace_register)
8043 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8045 2010-01-21 Doug Evans <dje@google.com>
8047 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8048 (PTRACE_ARG4_TYPE): New macro.
8049 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8050 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8051 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8052 (usr_store_inferior_registers): Ditto.
8053 (linux_read_memory, linux_write_memory): Ditto.
8054 (linux_test_for_tracefork): Ditto.
8056 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8057 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8059 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8061 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8064 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8066 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8067 prototype to take a regcache. Adjust.
8069 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8071 * regcache.h (struct thread_info): Forward declare.
8072 (struct regcache): New.
8073 (new_register_cache): Adjust prototype.
8074 (get_thread_regcache): Declare.
8075 (free_register_cache): Adjust prototype.
8076 (registers_to_string, registers_from_string): Ditto.
8077 (supply_register, supply_register_by_name, collect_register)
8078 (collect_register_as_string, collect_register_by_name): Ditto.
8079 * regcache.c (struct inferior_regcache_data): Delete.
8080 (get_regcache): Rename to ...
8081 (get_thread_regcache): ... this. Adjust. Switch inferior before
8083 (regcache_invalidate_one): Adjust.
8084 (regcache_invalidate): Fix prototype.
8085 (new_register_cache): Return the new register cache.
8086 (free_register_cache): Change prototype.
8087 (realloc_register_cache): Adjust.
8088 (registers_to_string): Change prototype to take a regcache. Adjust.
8089 (registers_from_string): Ditto.
8090 (register_data): Ditto.
8091 (supply_register): Ditto.
8092 (supply_register_by_name): Ditto.
8093 (collect_register): Ditto.
8094 (collect_register_as_string): Ditto.
8095 (collect_register_by_name): Ditto.
8096 * server.c (process_serial_event): Adjust.
8097 * linux-low.h (regset_fill_func, regset_store_func): Change
8099 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8101 * linux-low.c (get_stop_pc): Adjust.
8102 (check_removed_breakpoint): Adjust.
8103 (linux_wait_for_event): Adjust.
8104 (linux_resume_one_lwp): Adjust.
8105 (fetch_register): Add regcache parameter. Adjust.
8106 (usr_store_inferior_registers): Ditto.
8107 (regsets_fetch_inferior_registers): Ditto.
8108 (regsets_store_inferior_registers): Ditto.
8109 (linux_fetch_registers, linux_store_registers): Ditto.
8110 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8112 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8114 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8115 prototype to take a regcache.
8116 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8117 * remote-utils.c (convert_ascii_to_int, outreg)
8118 (prepare_resume_reply): Change prototype to take a regcache.
8120 * target.h (struct target_ops) <fetch_registers, store_registers>:
8121 Change prototype to take a regcache.
8122 (fetch_inferior_registers, store_inferior_registers): Change
8123 prototype to take a regcache. Adjust.
8124 * proc-service.c (ps_lgetregs): Adjust.
8125 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8126 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8127 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8128 take a regcache. Adjust.
8129 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8130 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8131 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8132 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8133 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8134 (cris_cannot_fetch_register):
8135 (cris_breakpoint_at): Change prototype to take a regcache.
8137 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8138 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8139 to take a regcache. Adjust.
8140 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8142 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8143 take a regcache. Adjust.
8144 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8145 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8146 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8147 * linux-mips-low.c (mips_get_pc):
8148 (mips_set_pc): Change prototype to take a regcache. Adjust.
8149 (mips_reinsert_addr): Adjust.
8150 (mips_collect_register): Change prototype to take a regcache.
8152 (mips_supply_register):
8153 (mips_collect_register_32bit, mips_supply_register_32bit)
8154 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8155 (mips_store_fpregset): Ditto.
8156 * linux-ppc-low.c (ppc_supply_ptrace_register)
8157 (ppc_supply_ptrace_register): Ditto.
8158 (parse_spufs_run): Adjust.
8159 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8160 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8161 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8162 take a regcache. Adjust.
8163 * linux-s390-low.c (s390_collect_ptrace_register)
8164 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8165 (s390_set_pc): Change prototype to take a regcache. Adjust.
8166 (s390_arch_setup): Adjust.
8167 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8168 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8169 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8170 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8171 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8173 (sparc_breakpoint_at): Adjust.
8174 * linux-xtensa-low.c (xtensa_fill_gregset):
8175 (xtensa_store_gregset):
8176 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8177 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8178 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8179 prototype to take a regcache. Adjust.
8180 * win32-arm-low.c (arm_fetch_inferior_register)
8181 (arm_store_inferior_register): Change prototype to take a
8183 * win32-i386-low.c (i386_fetch_inferior_register)
8184 (i386_store_inferior_register): Change prototype to take a
8186 * win32-low.c (child_fetch_inferior_registers)
8187 (child_store_inferior_registers): Change prototype to take a
8189 (win32_wait): Adjust.
8190 (win32_fetch_inferior_registers): Change prototype to take a
8192 (win32_store_inferior_registers): Adjust.
8193 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8194 store_inferior_register>: Change prototype to take a regcache.
8196 2010-01-20 Doug Evans <dje@google.com>
8198 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8200 (linux_wait_for_event1, linux_init_signals): Ditto.
8201 (W_STOPCODE): Provide definition if missing.
8203 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8205 * linux-low.c (linux_core_of_thread): New.
8206 (compare_ints, show_process, list_threads): New.
8207 (linux_qxfer_osdata): Report threads and cores.
8208 (linux_target_op): Register linux_core_of_thread.
8209 * remote-utils.c (prepare_resume_reply): Report the core.
8210 (buffer_xml_printf): Support %d specifier.
8211 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8213 (handle_query): Handle qXfer:threads. Announce availability
8215 * target.h (struct target_ops): New field core_of_thread.
8217 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8219 * Makefile.in (clean): Remove new generated files.
8220 (reg-s390.o, reg-s390.c): Remove rules.
8221 (reg-s390x.o, reg-s390x.c): Likewise.
8222 (s390-linux32.o, s390-linux32.c): Add rules.
8223 (s390-linux64.o, s390-linux64.c): Likewise.
8224 (s390x-linux64.o, s390x-linux64.c): Likewise.
8225 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8226 * linux-s390-low.c: Include <elf.h>.
8227 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8228 (init_registers_s390): Remove prototype.
8229 (init_registers_s390x): Likewise.
8230 (init_registers_s390_linux32): Add prototype.
8231 (init_registers_s390_linux64): Likewise.
8232 (init_registers_s390x_linux64): Likewise.
8233 (s390_num_regs_3264): New define.
8234 (s390_regmap_3264): New global variable.
8235 (s390_cannot_fetch_register): Remove obsolete check.
8236 (s390_cannot_store_register): Likewise.
8237 (s390_collect_ptrace_register): Handle upper/lower register halves.
8238 (s390_supply_ptrace_register): Likewise.
8239 (s390_fill_gregset): Update to register number changes.
8240 (s390_get_hwcap): New routine.
8241 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8242 Install appropriate regmap and register set.
8244 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8246 * server.c (gdbserver_version): Update copyright year to 2010.
8247 * gdbreplay.c (gdbreplay_version): Likewise.
8249 2009-12-28 Doug Evans <dje@google.com>
8251 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8252 elf/external.h. Include <elf.h> instead but only if necessary.
8254 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8256 * linux-low.c (linux_remove_process): Remove `detaching'
8257 parameter. Don't release/detach from thread_db here.
8258 (linux_kill): Release/detach from thread_db here, ...
8259 (linux_detach): ... and here, before actually detaching.
8260 (linux_wait_1): ... and here, when a process exits.
8261 * thread-db.c (any_thread_of): New.
8262 (thread_db_free): Switch the current inferior to a thread of the
8265 2009-12-21 Doug Evans <dje@google.com>
8267 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8269 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8270 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8271 warning ifndef __NR_tkill. Move setting of errno there too.
8272 Delete unnecessary resetting of errno after syscall.
8273 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8275 * configure.ac: Check for dladdr.
8276 * config.in: Regenerate.
8277 * configure: Regenerate.
8278 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8279 (try_thread_db_load): Update.
8281 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8283 2009-12-18 Doug Evans <dje@google.com>
8285 * event-loop.c: Include unistd.h if it exists.
8287 * linux-low.c (my_waitpid): Move definition away from being in
8288 between linux_tracefork_child/linux_test_for_tracefork.
8290 * gdb_proc_service.h (psaddr_t): Fix type.
8291 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8292 signature to match glibc.
8294 2009-12-16 Doug Evans <dje@google.com>
8296 * linux-low.c (linux_read_memory): Fix argument to read.
8298 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8300 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8301 events, don't leave current_inferior pointing at null.
8303 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8305 * win32-low.c (LOG): Delete.
8306 (OUTMSG): Output to stderr.
8307 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8308 on compile time LOG macro.
8309 (win32_wait): Fix debug output.
8311 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8313 * win32-low.c (win32_add_one_solib): If the dll name is
8314 "ntdll.dll", prepend the system directory to the dll path.
8316 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8318 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8320 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8321 Vladimir Prus <vladimir@codesourcery.com>
8323 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8324 * configure.ac: Check for __mcoldfire__ and set
8325 gdb_cv_m68k_is_coldfire.
8326 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8327 reg-cf.o and reg-m68k.o.
8328 * configure: Regenerated.
8330 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8332 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8333 Pass it to thread_db_free.
8334 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8335 proper `detaching' argument to linux_remove_process.
8336 * linux-low.h (thread_db_free): Add `detaching' parameter.
8337 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8339 (thread_db_free): Add `detaching' parameter. Only
8340 call td_ta_clear_event if detaching from process.
8342 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8344 * thread-db.c (thread_db_free): Fix typo.
8346 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8349 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8351 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8353 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8354 with an i686 compiler.
8355 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8357 * configure: Rebuilt.
8359 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8363 * server.c (handle_search_memory_1): Correct read_addr initialization
8364 in loop for searching subsequent chunks.
8366 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8368 * configure.ac: New --with-libthread-db option.
8369 * thread-db.c: Allow direct dependence on libthread_db.
8370 (thread_db_free): Adjust.
8371 * config.in: Regenerate.
8372 * configure: Likewise.
8374 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8377 * thread-db.c (attach_thread): New function.
8378 (maybe_attach_thread): Return success/failure.
8379 (find_new_threads_callback): Adjust.
8380 (thread_db_find_new_threads): Loop until no new threads.
8382 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8384 * proc-service.c (ps_lgetregs): Formatting.
8386 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8388 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8389 * configure.ac: Adjust.
8390 * linux-low.h (struct process_info_private): Move members to struct
8392 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8393 * linux-low.c (linux_remove_process): Adjust.
8394 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8395 * server.c (handle_query): Move code ...
8396 (handle_monitor_command): ... here. New function.
8397 * target.h (struct target_ops): New member.
8398 * thread-db.c (struct thread_db): New.
8399 (libthread_db_search_path): New variable.
8400 (thread_db_create_event, thread_db_enable_reporting)
8401 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8402 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8403 (try_thread_db_load_1, dladdr_to_soname): New functions.
8404 (try_thread_db_load, thread_db_load_search): New functions.
8405 (thread_db_init): Search for libthread_db.
8406 (thread_db_free): New function.
8407 (thread_db_handle_monitor_command): Likewise.
8408 * config.in: Regenerate.
8409 * configure: Regenerate.
8411 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8413 * spu-low.c (spu_kill): Wait for inferior to terminate.
8414 Call clear_inferiors.
8415 (spu_detach): Call clear_inferiors.
8417 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8419 * aclocal.m4: Regenerate.
8420 * config.in: Likewise.
8421 * configure: Likewise.
8423 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8425 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8426 (parse_spufs_run): New function.
8427 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8428 (ppc_breakpoint_at): Handle SPU breakpoints.
8430 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8432 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8433 (SPUFS_MAGIC): Define.
8434 (spu_enumerate_spu_ids): New function.
8435 (linux_qxfer_spu): New function.
8436 (linux_target_ops): Install linux_qxfer_spu.
8438 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8440 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8441 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8442 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8443 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8444 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8445 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8446 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8447 (init_registers_powerpc_cell32l): Add prototype.
8448 (init_registers_powerpc_cell64l): Likewise.
8449 (ppc_arch_setup): Detect Cell/B.E. architecture.
8451 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8453 * Makefile.in (datarootdir): New variable.
8455 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8457 * linux-low.c (linux_write_memory): Update debugging output.
8458 * Makefile.in (clean): Add new descriptions.
8459 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8460 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8461 * configure.srv: Add new files for arm*-*-linux*.
8462 * linux-arm-low.c: Add new declarations.
8463 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8464 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8465 (HWCAP_VFPv3D16): New.
8466 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8467 instead of __IWMMXT__.
8468 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8469 (arm_arch_setup): New.
8470 (target_regsets): Remove #ifdef. Add VFP regset.
8471 (the_low_target): Use arm_arch_setup.
8473 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8475 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8476 the main thread again.
8478 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8480 Adding Neutrino gdbserver.
8481 * configure: Regenerated.
8482 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8483 * configure.srv (i[34567]86-*-nto*): New target.
8484 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8485 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8486 (nto_comctrl) [__QNX__]: New function.
8487 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8489 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8491 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8494 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8495 Pedro Alves <pedro@codesourcery.com>
8497 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8498 don't support CONTEXT_EXTENDED_REGISTERS.
8499 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8500 (the_low_target): Install them.
8501 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8502 failing with ERROR_PIPE_NOT_CONNECTED.
8504 2009-06-30 Doug Evans <dje@google.com>
8505 Pierre Muller <muller@ics.u-strasbg.fr>
8507 Add h/w watchpoint support to x86-linux, win32-i386.
8508 * Makefile.in (SFILES): Add i386-low.c
8509 (i386_low_h): Define.
8510 (i386-low.o): Add dependencies.
8511 (linux-x86-low.o): Add i386-low.h dependency.
8512 (win32-i386-low.o): Ditto.
8513 * i386-low.c: New file.
8514 * i386-low.h: New file.
8515 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8516 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8517 * linux-low.c (linux_add_process): Initialize arch_private.
8518 (linux_remove_process): Free arch_private.
8519 (add_lwp): Initialize arch_private.
8520 (delete_lwp): Free arch_private.
8521 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8523 * linux-low.h (process_info_private): New member arch_private.
8524 (lwp_info): New member arch_private.
8525 (linux_target_ops): New members new_process, new_thread,
8527 (ptid_of): New macro.
8528 * linux-x86-low.c: Include stddef.h, i386-low.h.
8529 (arch_process_info): New struct.
8530 (arch_lwp_info): New struct.
8531 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8532 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8533 (i386_dr_low_get_status): New function.
8534 (x86_insert_point, x86_remove_point): New functions.
8535 (x86_stopped_by_watchpoint): New function.
8536 (x86_stopped_data_address): New function.
8537 (x86_linux_new_process, x86_linux_new_thread): New functions.
8538 (x86_linux_prepare_to_resume): New function.
8539 (the_low_target): Add entries for insert_point, remove_point,
8540 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8542 * server.c (debug_hw_points): New global.
8543 (monitor_show_help): Document set debug-hw-points.
8544 (handle_query): Process "set debug-hw-points".
8545 * server.h (debug_hw_points): Declare.
8546 (paddress): Declare.
8547 * utils.c (NUMCELLS, CELLSIZE): New macros.
8548 (get_sell, xsnprintf, paddress): New functions.
8549 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8550 remove_point, stopped_by_watchpoint, stopped_data_address.
8551 * win32-i386-low.c: Include i386-low.h.
8552 (debug_reg_state): Replaces dr.
8553 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8554 (i386_dr_low_get_status): New function.
8555 (i386_insert_point, i386_remove_point): New functions.
8556 (i386_stopped_by_watchpoint): New function.
8557 (i386_stopped_data_address): New function.
8558 (i386_initial_stuff): Update.
8559 (get_thread_context,set_thread_context,i386_thread_added): Update.
8560 (the_low_target): Add entries for insert_point,
8561 remove_point, stopped_by_watchpoint, stopped_data_address.
8562 * win32-low.c (win32_insert_watchpoint): New function.
8563 (win32_remove_watchpoint): New function.
8564 (win32_stopped_by_watchpoint): New function.
8565 (win32_stopped_data_address): New function.
8566 (win32_target_ops): Add entries for insert_watchpoint,
8567 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8568 * win32-low.h (win32_target_ops): New members insert_point,
8569 remove_point, stopped_by_watchpoint, stopped_data_address.
8571 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8573 * server.c (process_serial_event): Re-return unsupported, not
8574 error, if the type isn't recognized. Re-allow supporting only
8575 insert or remove packets. Also call require_running for
8576 breakpoints. Add missing break statement to default case. Tidy.
8577 * target.h (struct target_ops): Rename insert_watchpoint to
8578 insert_point, and remove_watchpoint to remove_point.
8580 * linux-low.h (struct linux_target_ops): Likewise.
8581 * linux-low.c (linux_insert_watchpoint): Rename to ...
8582 (linux_insert_point): ... this. Adjust.
8583 (linux_remove_watchpoint): Rename to ...
8584 (linux_remove_point): ... this. Adjust.
8585 (linux_target_ops): Adjust.
8586 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8587 (cris_insert_point): ... this.
8588 (cris_remove_watchpoint): Rename to ...
8589 (cris_remove_point): ... this.
8590 (the_low_target): Adjust.
8592 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8594 * server.c (handle_v_kill): Pass signal_pid to
8595 kill_inferior if multi_process is zero.
8597 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8599 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8600 * target.h (target_ops): Comment for *_watchpoint to make it clear
8601 the functions can get types '0' and '1'.
8603 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8605 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8606 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8607 * regcache.c (get_regcache): Likewise.
8608 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8609 * win32-low.c (child_fetch_inferior_registers): Remove check for
8612 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8613 Pedro Alves <pedro@codesourcery.com>
8615 * target.h (struct target_ops) <supports_multi_process>: New
8617 (target_supports_multi_process): New.
8618 * server.c (handle_query): Even if GDB reports support, only
8619 enable multi-process if the target also supports it. Report
8620 multi-process support only if the target backend supports it.
8621 * linux-low.c (linux_supports_multi_process): New function.
8622 (linux_target_ops): Install it as target_supports_multi_process
8625 2009-05-24 Doug Evans <dje@google.com>
8627 Global renaming of find_thread_pid to find_thread_ptid.
8628 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8629 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8630 All callers updated.
8632 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8633 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8636 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8637 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8638 (linux_resume_one_lwp): Ditto.
8640 2009-05-23 Doug Evans <dje@google.com>
8642 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8643 from struct inferior_list_entry * to struct lwp_info *.
8644 All callers updated.
8646 2009-05-13 Doug Evans <dje@google.com>
8648 * linux-x86-low.c: Don't include assert.h.
8649 (x86_siginfo_fixup): Use fatal, not assert.
8650 (x86_arch_setup): Fix comment.
8652 2009-05-12 Doug Evans <dje@google.com>
8654 Biarch support for i386/amd64 gdbserver.
8655 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8656 Add linux-x86-low.c.
8657 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8658 (linux-x86-low.o): Add.
8659 * linux-x86-64-low.c: Delete.
8660 * linux-i386-low.c: Delete.
8661 * linux-x86-low.c: New file.
8662 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8664 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8666 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8667 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8668 (linux_child_pid_to_exec_file): New function.
8669 (elf_64_header_p, elf_64_file_p): New functions.
8670 (siginfo_fixup): New function.
8671 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8672 give target a chance to convert layout.
8673 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8674 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8676 2009-05-07 Doug Evans <dje@google.com>
8678 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8679 (regsets_store_inferior_registers): Ditto.
8681 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8685 * linux-low.c (must_set_ptrace_flags): Delete.
8686 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8688 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8689 `lwp->must_set_ptrace_flags' instead.
8690 (linux_wait_for_event_1): Set ptrace options here.
8691 (linux_wait_1): ... not here.
8693 2009-04-30 Doug Evans <dje@google.com>
8695 * inferiors.c (started_inferior_callback): New function.
8696 (attached_inferior_callback): New function.
8697 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8698 * server.c (print_started_pid, print_attached_pid): New functions.
8699 (detach_or_kill_for_exit): New function.
8700 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8701 * server.h (have_started_inferiors_p): Declare.
8702 (have_attached_inferiors_p): Declare.
8704 * inferiors.c (remove_process): Fix memory leak, free process.
8705 * linux-low.c (linux_remove_process): New function.
8706 (linux_kill): Call it instead of remove_process.
8707 (linux_detach, linux_wait_1): Ditto.
8709 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8711 * configure.srv: Add x86 Windows CE target.
8713 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8715 * inferiors.c (get_thread_process): Make global.
8716 * server.h (get_thread_process): Add prototype.
8717 * thread-db.c (find_one_thread): Use get_thread_process
8718 instead of current_process.
8719 (thread_db_get_tls_address): Do not crash if called when
8720 thread layer is not yet initialized.
8722 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8724 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8725 * spu-low.c (current_tid): Rename to ...
8726 (current_ptid): ... this.
8727 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8728 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8729 ptid_get_lwp (current_ptid) instead of current_tid.
8730 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8731 instead of current_tid. Use find_process_pid to verify pid
8732 argument is valid. Pass proper argument to remove_process.
8733 (spu_thread_alive): Compare current_ptid instead of current_tid.
8734 (spu_resume): Likewise.
8736 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8738 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8741 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8743 Implement the multiprocess extensions, and add linux multiprocess
8746 * server.h (ULONGEST): Declare.
8747 (struct ptid, ptid_t): New.
8748 (minus_one_ptid, null_ptid): Declare.
8749 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8750 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8751 (struct inferior_list_entry): Change `id' type from unsigned from
8753 (struct sym_cache, struct breakpoint, struct
8754 process_info_private): Forward declare.
8755 (struct process_info): Declare.
8756 (current_process): Declare.
8757 (all_processes): Declare.
8758 (initialize_inferiors): Declare.
8759 (add_thread): Adjust to use ptid_t.
8760 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8761 (add_process, remove_process, find_thread_pid): Declare.
8762 (find_inferior_id): Adjust to use ptid_t.
8763 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8764 (multi_process): Declare.
8765 (push_event): Adjust to use ptid_t.
8766 (read_ptid, write_ptid): Declare.
8767 (prepare_resume_reply): Adjust to use ptid_t.
8768 (clear_symbol_cache): Declare.
8769 * inferiors.c (all_processes): New.
8770 (null_ptid, minus_one_ptid): New.
8771 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8772 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8773 (add_thread): Change unsigned long to ptid. Remove gdb_id
8775 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8776 (gdb_id_to_thread): Rename to ...
8777 (find_thread_pid): ... this. Change unsigned long to ptid.
8778 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8779 (loaded_dll, pull_pid_from_list): Adjust.
8780 (add_process, remove_process, find_process_pid)
8781 (get_thread_process, current_process, initialize_inferiors): New.
8782 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8783 (struct target_waitstatus) <related_pid>: Ditto.
8784 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8786 (struct target_ops) <join>: Add `pid' argument.
8787 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8788 (struct target_ops) <wait>: Add `ptid' field. Change return type
8790 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8791 (mywait): Add `ptid' argument. Change return type to ptid_t.
8792 (target_pid_to_str): Declare.
8793 * target.c (set_desired_inferior): Adjust to use ptids.
8794 (mywait): Add new `ptid' argument. Adjust.
8795 (target_pid_to_str): New.
8796 * mem-break.h (free_all_breakpoints): Declare.
8797 * mem-break.c (breakpoints): Delelete.
8798 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8799 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8800 to use per-process breakpoint list.
8801 (free_all_breakpoints): New.
8802 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8803 (symbol_cache, all_symbols_looked_up): Delete.
8805 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8807 (prepare_resume_reply): Change ptid argument's type from unsigned
8808 long to ptid_t. Adjust. Implement W;process and X;process.
8809 (free_sym_cache, clear_symbol_cache): New.
8810 (look_up_one_symbol): Adjust to per-process symbol cache. *
8811 * server.c (cont_thread, general_thread, step_thread): Change type
8814 (multi_process): New.
8815 (last_ptid): Change type to ptid_t.
8816 (struct vstop_notif) <ptid>: Change type to ptid_t.
8817 (queue_stop_reply, push_event): Change `ptid' argument's type to
8819 (discard_queued_stop_replies): Add `pid' argument.
8820 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8821 changes. Don't reference the `attached' global.
8822 (attach_inferior): Adjust to mywait interface changes.
8823 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8824 features. Handle and report "multiprocess+". Handle
8826 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8828 (handle_v_kill): New.
8829 (handle_v_stopped): Adjust to use target_pid_to_str.
8830 (handle_v_requests): Allow multiple attaches and runs when
8831 multiprocess extensions are in effect. Handle "vKill".
8832 (myresume): Adjust to use ptids.
8833 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8834 (handle_status): Adjust to discard_queued_stop_replies interface
8836 (first_thread_of, kill_inferior_callback)
8837 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8838 (main): Call initialize_inferiors. Adjust to use ptids, killing
8839 and detaching from all inferiors. Handle multiprocess packet
8841 * linux-low.h: Include gdb_proc_service.h.
8842 (struct process_info_private): New.
8843 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8844 <lwpid_of>: Use ptid_get_lwp.
8845 (get_lwp_thread): Adjust.
8846 (struct lwp_info): Add `dead' member.
8847 (find_lwp_pid): Declare.
8848 * linux-low.c (thread_db_active): Delete.
8849 (new_inferior): Adjust comment.
8850 (inferior_pid): Delete.
8851 (linux_add_process): New.
8852 (handle_extended_wait): Adjust.
8853 (add_lwp): Change unsigned long to ptid.
8854 (linux_create_inferior): Add process to processes table. Adjust
8855 to use ptids. Don't set new_inferior here.
8856 (linux_attach_lwp): Rename to ...
8857 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8858 it. Adjust to use ptids.
8859 (linux_attach_lwp): New.
8860 (linux_attach): Add process to processes table. Don't set
8862 (struct counter): New.
8863 (second_thread_of_pid_p, last_thread_of_process_p): New.
8864 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8866 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8867 processes. Remove process from process table.
8868 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8869 to multiple processes.
8870 (any_thread_of): New.
8871 (linux_detach): Add `pid' argument, and handle it. Remove process
8872 from processes table.
8873 (linux_join): Add `pid' argument. Handle it.
8874 (linux_thread_alive): Change unsighed long argument to ptid_t.
8875 Consider dead lwps as not being alive.
8876 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8877 threads we're not interested in.
8878 (same_lwp, find_lwp_pid): New.
8879 (linux_wait_for_lwp): Change `pid' argument's type from int to
8881 (linux_wait_for_event): Rename to ...
8882 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8883 from int to ptid_t. Adjust.
8884 (linux_wait_for_event): New.
8885 (linux_wait_1): Add `ptid' argument. Change return type to
8886 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8887 that exit from the process table.
8888 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8890 (mark_lwp_dead): New.
8891 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8892 stopping all threads, mark its main lwp as dead.
8893 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8895 (fetch_register, usr_store_inferior_registers)
8896 (regsets_fetch_inferior_registers)
8897 (regsets_store_inferior_registers, linux_read_memory)
8898 (linux_write_memory): Inline `inferior_pid'.
8899 (linux_look_up_symbols): Adjust to use per-process
8901 (linux_request_interrupt): Adjust to use ptids.
8902 (linux_read_auxv): Inline `inferior_pid'.
8903 (initialize_low): Don't reference thread_db_active.
8904 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8905 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8906 (ps_getpid): Return the pid of the current inferior.
8907 * thread-db.c (proc_handle, thread_agent): Delete.
8908 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8910 (find_one_thread): Change argument type to ptid_t. Adjust to
8912 (maybe_attach_thread): Adjust to per-process data and ptids.
8913 (thread_db_find_new_threads): Ditto.
8914 (thread_db_init): Ditto.
8915 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8916 processes table. Adjust to use ptids.
8917 (spu_kill, spu_detach): Adjust interface. Remove process from
8919 (spu_join, spu_thread_alive): Adjust interface.
8920 (spu_wait): Adjust interface. Remove process from processes
8921 table. Adjust to use ptids.
8922 * win32-low.c (current_inferior_tid): Delete.
8923 (current_inferior_ptid): New.
8924 (debug_event_ptid): New.
8925 (thread_rec): Take a ptid. Adjust.
8926 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8927 (child_delete_thread): Ditto.
8928 (do_initial_child_stuff): Add `attached' argument. Add process to
8930 (child_fetch_inferior_registers, child_store_inferior_registers):
8932 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8933 (win32_attach): Pass 1 to do_initial_child_stuff.
8934 (win32_kill): Adjust interface. Remove process from processes
8936 (win32_detach): Ditto.
8937 (win32_join): Adjust interface.
8938 (win32_thread_alive): Take a ptid.
8939 (win32_resume): Adjust to use ptids.
8940 (get_child_debug_event): Ditto.
8941 (win32_wait): Adjust interface. Remove exiting process from
8944 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8946 Non-stop mode support.
8948 * server.h (non_stop): Declare.
8949 (gdb_client_data, handler_func): Declare.
8950 (delete_file_handler, add_file_handler, start_event_loop):
8952 (handle_serial_event, handle_target_event, push_event)
8953 (putpkt_notif): Declare.
8954 * target.h (enum resume_kind): New.
8955 (struct thread_resume): Replace `step' field by `kind' field.
8956 (TARGET_WNOHANG): Define.
8957 (struct target_ops) <wait>: Add `options' argument.
8958 <supports_non_stop, async, start_non_stop>: New fields.
8959 (target_supports_non_stop, target_async): New.
8960 (start_non_stop): Declare.
8961 (mywait): Add `options' argument.
8962 * target.c (mywait): Add `options' argument. Print child exit
8964 (start_non_stop): New.
8965 * server.c (non_stop, own_buf, mem_buf): New globals.
8966 (struct vstop_notif): New.
8967 (notif_queue): New global.
8968 (queue_stop_reply, push_event, discard_queued_stop_replies)
8969 (send_next_stop_reply): New.
8970 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8972 (attach_inferior): In non-stop mode, don't wait for the target
8974 (handle_general_set): Handle QNonStop.
8975 (handle_query): When handling qC, return the current general
8976 thread, instead of the first thread of the list.
8977 (handle_query): If the backend supports non-stop mode, include
8978 QNonStop+ in the qSupported query response.
8979 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8981 (handle_v_attach, handle_v_run): Handle non-stop mode.
8982 (handle_v_stopped): New.
8983 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8984 (myresume): Adjust to use resume_kind. Handle non-stop.
8985 (queue_stop_reply_callback): New.
8986 (handle_status): Handle non-stop mode.
8987 (main): Clear non_stop flag on reconnection. Use the event-loop.
8988 Refactor serial protocol handling from here ...
8989 (process_serial_event): ... to this new function. When GDB
8990 selects any thread, select one here. In non-stop mode, wait until
8991 GDB acks all pending events before exiting.
8992 (handle_serial_event, handle_target_event): New.
8993 * remote-utils.c (remote_open): Install remote_desc in the event
8995 (remote_close): Remove remote_desc from the event loop.
8996 (putpkt_binary): Rename to...
8997 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8998 (putpkt_binary): New as wrapper around putpkt_binary_1.
8999 (putpkt_notif): New.
9000 (prepare_resume_reply): In non-stop mode, don't change the
9002 * event-loop.c: New.
9003 * Makefile.in (OBJ): Add event-loop.o.
9004 (event-loop.o): New rule.
9006 * linux-low.h (pid_of): Moved here.
9008 (get_lwp_thread): Use lwpid_of.
9009 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9010 * linux-low.c (pid_of): Delete.
9011 (inferior_pid): Use lwpid_of.
9012 (linux_event_pipe): New.
9013 (target_is_async_p): New.
9015 (handle_extended_wait): Use lwpid_of.
9016 (add_lwp): Don't set lwpid field.
9017 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9018 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9019 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9020 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9021 first. Adjust to linux_wait_for_event interface changes. Use
9023 (linux_detach): Don't delete the main lwp here.
9024 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9025 (status_pending_p): Don't consider explicitly suspended lwps.
9026 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9027 pointer. Add OPTIONS argument. Change return type to int. Use
9028 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9029 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9030 pointer. Add status pointer argument. Return a pid instead of a
9031 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9032 changes. In non-stop mode, don't switch to a random thread.
9033 (linux_wait): Rename to...
9034 (linux_wait_1): ... this. Add target_options argument, and handle
9035 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9036 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9037 clean exit and signal exit code. Don't stop all threads in
9038 non-stop mode. In all-stop mode, only stop all threads when
9039 reporting a stop to GDB. Handle explicit thread stop requests.
9040 (async_file_flush, async_file_mark): New.
9042 (send_sigstop): Use lwpid_of.
9043 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9044 interface changes. In non-stop mode, don't switch to a random
9046 (linux_resume_one_lwp): Use lwpid_of.
9047 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9048 (linux_resume_one_thread): ... this. Handle resume_stop. In
9049 non-stop mode, don't look for pending flag in all threads.
9050 (resume_status_pending_p): Don't consider explicitly suspended
9052 (my_waitpid): Reimplement. Emulate __WALL.
9053 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9055 (sigchld_handler, linux_supports_non_stop, linux_async)
9056 (linux_start_non_stop): New.
9057 (linux_target_ops): Register linux_supports_non_stop, linux_async
9058 and linux_start_non_stop.
9059 (initialize_low): Install SIGCHLD handler.
9060 * thread-db.c (thread_db_create_event, find_one_thread)
9061 (thread_db_get_tls_address): Use lwpid_of.
9062 * win32-low.c (win32_detach): Adjust to use resume_kind.
9063 (win32_wait): Add `options' argument.
9064 * spu-low.c (spu_resume): Adjust to use resume_kind.
9065 (spu_wait): Add `options' argument.
9067 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9069 Decouple target code from remote protocol.
9071 * target.h (enum target_waitkind): New.
9072 (struct target_waitstatus): New.
9073 (struct target_ops) <wait>: Return an unsigned long. Take a
9074 target_waitstatus pointer instead of a char pointer.
9076 * target.c (mywait): Change prototype to return an unsigned long.
9077 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9078 * server.h (thread_from_wait, old_thread_from_wait): Delete
9080 (prepare_resume_reply): Change prototype to take a
9082 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9083 (last_status, last_ptid): New.
9084 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9085 pid instead of a signal.
9086 (attach_inferior): Remove "status" and "signal" parameters.
9088 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9090 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9091 (handle_v_requests, myresume): Remove "status" and "signal"
9093 (handle_status): New.
9094 (main): Delete local `status'. Adjust.
9095 * remote-utils.c: Include target.h.
9096 (prepare_resume_reply): Change prototype to take a
9097 target_waitstatus. Adjust.
9099 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9101 * spu-low.c (spu_wait): Adjust.
9102 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9104 (win32_wait): Adjust.
9106 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9108 * target.h (struct thread_resume): Delete leave_stopped member.
9109 (struct target_ops): Add a `n' argument to the `resume' callback.
9110 * server.c (start_inferior): Adjust.
9111 (handle_v_cont, myresume): Adjust.
9112 * linux-low.c (check_removed_breakpoint): Adjust to resume
9113 interface change, and to removed leave_stopped field.
9114 (resume_ptr): Delete.
9115 (struct thread_resume_array): New.
9116 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9117 resume interface change.
9118 (linux_continue_one_thread, linux_queue_one_thread)
9119 (resume_status_pending_p): Check if the resume field is NULL
9120 instead of checking the leave_stopped member.
9121 (linux_resume): Adjust to the target resume interface change.
9122 * spu-low.c (spu_resume): Adjust to the target resume interface
9124 * win32-low.c (win32_detach, win32_resume): Ditto.
9126 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9128 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9130 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9132 (linux_continue_one_thread): Only preserve the stepping flag if
9133 there's a pending breakpoint.
9135 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9137 * server.c (main): After the inferior having exited, call
9138 remote_close before exiting gdbserver.
9140 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9142 Fix size of FPSCR in Power 7 processors.
9143 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9144 (PPC_FEATURE_HAS_DFP): New #define.
9145 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9148 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9150 * server.c (handle_query) Whitespace and formatting.
9152 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9154 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9155 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9156 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9157 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9158 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9159 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9160 Makefile.in, configure.ac: Fix whitespace throughout.
9161 * configure: Regenerate.
9163 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9165 * inferiors.c (find_inferior): Make it safe for the callback
9166 function to delete the currently iterated inferior.
9168 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9170 * Makefile.in (linuw_low_h): Move higher.
9171 (thread-db.o): Depend on $(linux_low_h).
9173 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9175 Rename "process" to "lwp" throughout.
9177 * linux-low.c (all_processes): Rename to...
9178 (all_lwps): ... this.
9179 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9180 (add_process): Rename to ...
9181 (add_lwp): ... this. Adjust.
9182 (linux_create_inferior): Adjust.
9183 (linux_attach_lwp): Adjust.
9184 (linux_attach): Adjust.
9185 (linux_kill_one_process): Rename to ...
9186 (linux_kill_one_lwp): ... this. Adjust.
9187 (linux_kill): Adjust.
9188 (linux_detach_one_process): Rename to ...
9189 (linux_detach_one_lwp): ... this. Adjust.
9190 (linux_detach): Adjust.
9191 (check_removed_breakpoint): Adjust.
9192 (status_pending_p): Adjust.
9193 (linux_wait_for_process): Rename to ...
9194 (linux_wait_for_lwp): ... this. Adjust.
9195 (linux_wait_for_event): Adjust.
9196 (send_sigstop): Adjust.
9197 (wait_for_sigstop): Adjust.
9198 (stop_all_processes): Rename to ...
9199 (stop_all_lwps): ... this.
9200 (linux_resume_one_process): Rename to ...
9201 (linux_resume_one_lwp): ... this. Adjust.
9202 (linux_set_resume_request, linux_continue_one_thread)
9203 (linux_queue_one_thread, resume_status_pending_p)
9204 (usr_store_inferior_registers, regsets_store_inferior_registers)
9205 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9207 * linux-low.h (get_process): Rename to ...
9208 (get_lwp): ... this. Adjust.
9209 (get_thread_process): Rename to ...
9210 (get_thread_lwp): ... this. Adjust.
9211 (get_process_thread): Rename to ...
9212 (get_lwp_thread): ... this. Adjust.
9213 (struct process_info): Rename to ...
9214 (struct lwp_info): ... this.
9215 (all_processes): Rename to ...
9216 (all_lwps): ... this.
9217 * proc-service.c (ps_lgetregs): Adjust.
9218 * thread-db.c (thread_db_create_event, find_one_thread)
9219 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9221 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9223 * server.c (handle_query): Handle "qAttached".
9225 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9227 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9228 GPLv3, update license URL.
9230 2009-03-01 Doug Evans <dje@google.com>
9232 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9233 (server_h): Add gdb_signals.h.
9234 (signals.o): Update.
9235 * server.h (target_signal_from_host,target_signal_to_host_p)
9236 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9238 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9240 * remote-utils.c (getpkt): Also generate remote-debug
9241 information if noack_mode is set.
9243 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9245 * server.c (handle_query): Report qXfer:siginfo:read and
9246 qXfer:siginfo:write as supported and handle them.
9247 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9248 * linux-low.c (linux_xfer_siginfo): New.
9249 (linux_target_ops): Set it.
9251 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9253 * server.c (gdbserver_usage): Mention --remote-debug.
9254 (main): Accept '--remote-debug' switch.
9256 2009-01-18 Doug Evans <dje@google.com>
9258 * regcache.c (new_register_cache): No need to check result of xcalloc.
9259 * server.c (handle_search_memory): Back out calls to xmalloc,
9260 result is checked and error is returned to user upon failure.
9261 (handle_query): Ditto. Add more checks for result of malloc.
9262 (handle_v_cont): Check result of malloc, report error back to
9264 (handle_v_run): Ditto. Call freeargv.
9265 * server.h (freeargv): Declare.
9266 * utils.c (freeargv): New fn.
9268 2009-01-15 Doug Evans <dje@google.com>
9270 * gdbreplay.c (perror_with_name): Make arg const char *.
9271 * server.h (target_signal_to_name): Make return type const char *.
9272 * thread-db.c (thread_db_err_str): Make return type const char *.
9273 * utils.c (perror_with_name): Make arg const char *.
9275 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9277 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9278 when handling a EXIT_PROCESS_DEBUG_EVENT.
9280 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9282 * gdbreplay.c (gdbreplay_version): Update copyright year.
9283 * server.c (gdbserver_version): Likewise.
9285 2009-01-05 Doug Evans <dje@google.com>
9287 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9288 (handle_extended_wait): Improve comment.
9290 2008-12-13 Doug Evans <dje@google.com>
9292 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9293 * server.h (ATTR_MALLOC): New macro.
9294 (xmalloc,xcalloc,xstrdup): Declare.
9295 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9296 * inferiors.c: Ditto.
9297 * linux-low.c: Ditto.
9298 * mem-break.c: Ditto.
9299 * regcache.c: Ditto.
9300 * remote-utils.c: Ditto.
9303 * win32-low.c: Ditto.
9305 2008-12-12 Doug Evans <dje@google.com>
9307 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9308 in debugging printf.
9310 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9312 2008-12-09 Doug Evans <dje@google.com>
9314 * linux-low.h (struct process_info): Delete member tid, unused.
9315 * thread-db.c (find_one_thread): Update.
9316 (maybe_attach_thread): Update.
9318 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9320 * target.h (struct target_ops): Add qxfer_osdata member.
9321 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9323 (linux_qxfer_osdata): New functions.
9324 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9326 * server.c (handle_query): Handle "qXfer:osdata:read:".
9327 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9328 (buffer_xml_printf): New functions.
9329 * server.h (struct buffer): New.
9330 (buffer_grow_str, buffer_grow_str0): New macros.
9331 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9332 (buffer_xml_printf): Declare.
9334 2008-11-24 Doug Evans <dje@google.com>
9336 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9338 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9340 * server.c (handle_v_run): Always use the supplied argument list.
9342 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9344 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9345 (xtensa_regmap_table): Add entry for scompare1.
9347 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9349 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9350 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9351 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9352 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9353 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9354 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9355 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9356 XML target descriptions.
9357 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9358 when inferior is running on an ISA 2.05 or later processor. Add
9359 special case to return offset for full 64-bit slot of FPSCR when
9362 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9364 * Makefile.in (SFILES, clean): Added sparc64 files.
9365 (reg-sparc64.o, reg-sparc64.c): New.
9366 * configure.srv (sparc*-*-linux*): New configuration.
9367 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9368 syscall arguments for SPARC.
9369 (regsets_store_inferior_registers): Likewise.
9370 * linux-sparc-low.c: New file.
9372 2008-10-21 Doug Evans <dje@google.com>
9374 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9375 (READLINE_DIR,READLINE_DEP): Delete.
9376 (INTERNAL_CFLAGS): Update.
9377 (LINTFLAGS): Update.
9379 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9381 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9382 whole argv from the last run, not just argv[0].
9384 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9386 * regcache.c (new_register_cache): Return NULL if the register
9387 cache size isn't known yet.
9388 (free_register_cache): Avoid dereferencing a NULL regcache.
9390 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9392 * configure.srv: Merge MIPS and MIPS64.
9394 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9396 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9398 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9400 * Makefile.in: Add required vsx dependencies.
9402 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9403 Declare init_registers_powerpc_vsx32l.
9404 Declare init_registers_powerpc_vsx64l.
9405 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9406 (ppc_arch_setup): Check for VSX in hwcap.
9407 (ppc_fill_vsxregset): New function.
9408 (ppc_store_vsxregset): New function.
9409 Add new VSX entry in regset_info target_regsets.
9411 * configure.srv: Add new VSX dependencies.
9413 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9415 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9416 (remote_open): Set or clear transport_is_reliable.
9417 (putpkt_binary): Don't expect acks in noack mode.
9418 (getpkt): Don't send ack/nac in noack mode.
9419 * server.c (handle_general_set): Handle QStartNoAckMode.
9420 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9422 (main): Reset noack_mode on every connection.
9423 * server.h (noack_mode): Declare.
9425 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9427 * Makefile.in (GDBREPLAY_OBS): New variable.
9428 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9430 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9431 Daniel Jacobowitz <dan@codesourcery.com>
9433 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9434 (usr_store_inferior_registers): Likewise.
9435 (regsets_store_inferior_registers): Likewise.
9437 2008-07-31 Rolf Jansen <rj@surtec.com>
9438 Pedro Alves <pedro@codesourcery.com>
9440 * configure.ac: Check for memmem declaration.
9441 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9442 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9443 (disable_packet_qfThreadInfo): Unconditionally compile.
9444 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9445 * configure, config.in: Regenerate.
9447 2008-07-28 Doug Kwan <dougkwan@google.com>
9449 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9450 (linux_write_memory): Remove declaration of errno.
9452 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9454 * linux-low.c (handle_extended_wait): Do not use "status"
9455 variable uninitialized.
9457 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9459 * server.c (handle_v_attach): Inhibit reporting dll changes.
9461 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9463 * remote-utils.c (prepare_resume_reply): If requested, don't
9464 output "thread:TID" in the T stop reply.
9466 * server.c (disable_packet_vCont, disable_packet_Tthread)
9467 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9468 (handle_query): If requested, disable support for qC, qfThreadInfo
9470 (handle_v_requests): If requested, disable support for vCont.
9471 (gdbserver_show_disableable): New.
9472 (main): Handle --disable-packet and --disable-packet=LIST.
9474 * server.h (disable_packet_vCont, disable_packet_Tthread)
9475 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9477 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9479 * server.c (gdbserver_usage): Mention --version.
9481 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9483 * Makefile.in (gdbreplay.o): New rule.
9485 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9487 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9488 message, not gdbserver.
9490 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9491 Nathan Sidwell <nathan@codesourcery.com>
9492 Joseph Myers <joseph@codesourcery.com>
9494 * acinclude.m4: Include ../../config/acx.m4.
9495 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9496 * configure, config.in: Regenerate.
9497 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9498 * server.c (gdbserver_version): Print PKGVERSION.
9499 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9500 (main): Adjust gdbserver_usage calls.
9501 * gdbreplay.c (version, host_name): Add declarations.
9502 (gdbreplay_version, gdbreplay_usage): New.
9503 (main): Accept --version and --help options.
9505 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9507 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9508 (arm_breakpoint_at): Handle Thumb.
9509 (the_low_target): Add comment.
9511 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9513 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9515 2008-05-09 Doug Evans <dje@google.com>
9517 * server.h (decode_search_memory_packet): Declare.
9518 * remote-utils.c (decode_search_memory_packet): New fn.
9519 * server.c (handle_search_memory_1): New fn.
9520 (handle_search_memory): New fn.
9521 (handle_query): Process qSearch:memory packets.
9523 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9525 * regcache.c (registers_length): Remove.
9526 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9527 full register packet.
9528 * regcache.h (registers_length): Remove prototype.
9529 * server.h (PBUFSIZ): Define to 16384.
9531 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9533 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9534 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9535 powerpc-64l.o, and powerpc-altivec64l.o.
9536 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9537 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9538 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9539 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9540 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9543 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9544 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9545 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9546 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9547 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9548 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9549 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9550 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9551 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9552 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9555 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9556 (init_registers_powerpc_32l): ... this new prototype.
9557 (init_registers_powerpc_32): Remove, replace by ...
9558 (init_registers_powerpc_altivec32l): ... this new prototype.
9559 (init_registers_powerpc_e500): Remove, replace by ...
9560 (init_registers_powerpc_e500l): ... this new prototype.
9561 (init_registers_ppc64): Remove, replace by ...
9562 (init_registers_powerpc_64l): ... this new prototype.
9563 (init_registers_powerpc_64): Remove, replace by ...
9564 (init_registers_powerpc_altivec64l): ... this new prototype.
9565 (ppc_num_regs): Set to 73.
9566 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9567 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9568 (ppc_cannot_store_register): Handle orig_r3 and trap.
9569 (ppc_arch_setup): Update init_registers_... calls.
9570 (ppc_fill_gregset): Handle orig_r3 and trap.
9572 * inferiors.c (clear_inferiors): Reset current_inferior.
9574 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9576 * acinclude.m4: Add override.m4.
9577 * configure: Regenerate.
9579 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9581 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9582 initial call to init_register_ppc64.
9584 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9586 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9587 single powerpc*-*-linux* case.
9588 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9590 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9592 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9593 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9595 * linux-ppc-low.c: Include <elf.h>.
9596 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9597 (ppc_hwcap): New global variable.
9598 (ppc_regmap): Remove __SPE__ #ifdef sections.
9599 (ppc_regmap_e500): New global variable.
9600 (ppc_cannot_store_register): Update __SPE__ special case.
9601 (ppc_get_hwcap): New function.
9602 (ppc_arch_setup): Use it to determine whether inferior supports
9603 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9604 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9605 Do not access registers if target does not support AltiVec.
9606 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9607 Do not access registers if target does not support SPE.
9608 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9610 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9612 * linux-low.c (disabled_regsets, num_regsets): New.
9613 (use_regsets_p): Delete.
9614 (linux_wait_for_process): Clear disabled_regsets.
9615 (regsets_fetch_inferior_registers): Check and set it.
9616 (regsets_store_inferior_registers): Likewise.
9617 (linux_fetch_registers, linux_store_registers): Do not use
9619 (initialize_low): Allocate disabled_regsets.
9621 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9623 * Makefile.in (LIBOBJS): New.
9625 (memmem.o): New rule.
9626 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9627 * configure: Regenerated.
9629 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9631 * server.c (handle_query): Never return "unsupported" for
9632 qXfer:features:read queries.
9634 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9636 * server.c (get_features_xml): Fix inverted condition.
9637 (handle_query): Always support qXfer:feature:read.
9639 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9641 * server.c (wrapper_argv): New.
9642 (start_inferior): Handle wrapper_argv. If set, expect an extra
9644 (gdbserver_usage): Document --wrapper.
9645 (main): Parse --wrapper.
9647 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9649 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9650 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9651 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9652 (ppc_set_pc): Likewise.
9653 (ppc_arch_setup): New function.
9654 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9655 of collect_register.
9656 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9658 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9660 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9661 instead of linux-ppc64-low.o.
9662 * linux-ppc64-low.c: Remove file.
9663 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9664 (linux-ppc64-low.o): Remove rule.
9666 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9667 (init_registers_powerpc_64): Likewise.
9668 (ppc_regmap): Conditionally define depending on __powerpc64__.
9669 (ppc_cannot_store_register): Do not special-case "fpscr" when
9670 compiled on __powerpc64__.
9671 (ppc_collect_ptrace_register): New function.
9672 (ppc_supply_ptrace_register): New function.
9673 (ppc_breakpoint): Change type to "unsigned int".
9674 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9675 (the_low_target): Conditionally provide initializers for the
9676 arch_setup member depending on __powerpc64__. Install
9677 collect_ptrace_register and supply_ptrace_register members.
9679 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9681 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9682 * server.c (gdbserver_xmltarget): Define.
9683 (get_features_xml): Use it to replace "target.xml" and arch_string.
9685 * configure.srv: Remove srv_xmltarget. Add XML files that were
9686 mentioned there to srv_xmlfiles instead. Remove conditional tests
9687 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9688 srv_xmlfiles and srv_regobj to include all possible choices.
9689 * configure.ac (srv_xmltarget): Remove.
9690 (srv_xmlfiles): Do not add "target.xml".
9691 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9692 checks for supplementary target information.
9693 * configure: Regenerate.
9694 * Makefile.in (XML_TARGET): Remove.
9695 (target.xml): Remove rule.
9696 (clean): Do not clean up target.xml.
9697 (.PRECIOUS): Do not mention target.xml.
9699 * target.h (struct target_ops): Remove arch_string member.
9700 * linux-low.c (linux_arch_string): Remove.
9701 (linux_target_ops): Remove arch_string initializer.
9702 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9703 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9704 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9705 * spu-low.c (spu_arch_string): Remove.
9706 (spu_target_ops): Remove arch_string initializer.
9707 * win32-low.c (win32_arch_string): Remove.
9708 (win32_target_ops): Remove arch_string initializer.
9709 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9710 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9711 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9713 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9715 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9716 by collect_ptrace_register and supply_ptrace_register hooks.
9717 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9718 instead of checking for the_low_target.left_pad_xfer.
9719 (usr_store_inferior_registers): Use collect_ptrace_register callback
9720 instead of checking for the_low_target.left_pad_xfer.
9722 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9723 (s390_supply_ptrace_register): Likewise.
9724 (s390_fill_gregset): Call s390_collect_ptrace_register.
9725 (the_low_target): Update.
9727 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9728 (ppc_supply_ptrace_register): Likewise.
9729 (the_low_target): Update.
9731 * linux-i386-low.c (the_low_target): Update.
9732 * linux-x86-64-low.c (the_low_target): Update.
9734 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9736 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9737 reg-s390.o and reg-s390x.o.
9739 * linux-low.c (new_inferior): New global variable.
9740 (linux_create_inferior, linux_attach): Set it.
9741 (linux_wait_for_process): Call the_low_target.arch_setup after the
9742 target has stopped for the first time.
9743 (initialize_low): Do not call the_low_target.arch_setup.
9745 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9746 (s390_set_pc): Likewise.
9747 (s390_arch_setup): New function.
9748 (the_low_target): Use s390_arch_setup as arch_setup routine.
9750 * regcache.c (realloc_register_cache): New function.
9751 (set_register_cache): Call it for each existing regcache.
9753 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9755 * server.h (init_registers): Remove prototype.
9757 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9758 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9759 instead of init_registers ().
9760 * linux-arm-low.c (init_registers_arm): Add prototype.
9761 (init_registers_arm_with_iwmmxt): Likewise.
9762 (the_low_target): Add initializer for arch_setup field.
9763 * linux-cris-low.c (init_registers_cris): Add prototype.
9764 (the_low_target): Add initializer for arch_setup field.
9765 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9766 (the_low_target): Add initializer for arch_setup field.
9767 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9768 (the_low_target): Add initializer for arch_setup field.
9769 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9770 (the_low_target): Add initializer for arch_setup field.
9771 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9772 (the_low_target): Add initializer for arch_setup field.
9773 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9774 (the_low_target): Add initializer for arch_setup field.
9775 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9776 (init_registers_mips64_linux): Likewise.
9777 (the_low_target): Add initializer for arch_setup field.
9778 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9779 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9780 (the_low_target): Add initializer for arch_setup field.
9781 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9782 (init_registers_powerpc_64): Likewise.
9783 (the_low_target): Add initializer for arch_setup field.
9784 * linux-s390-low.c (init_registers_s390): Add prototype.
9785 (init_registers_s390x): Likewise.
9786 (the_low_target): Add initializer for arch_setup field.
9787 * linux-sh-low.c (init_registers_sh): Add prototype.
9788 (the_low_target): Add initializer for arch_setup field.
9789 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9790 (the_low_target): Add initializer for arch_setup field.
9791 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9792 (the_low_target): Add initializer for arch_setup field.
9794 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9795 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9796 instead of init_registers ().
9797 * win32-arm-low.c (init_registers_arm): Add prototype.
9798 (the_low_target): Add initializer for arch_setup field.
9799 * win32-i386-low.c (init_registers_i386): Add prototype.
9800 (the_low_target): Add initializer for arch_setup field.
9802 * spu-low.c (init_registers_spu): Add prototype.
9803 (initialize_low): Call initialie_registers_spu () instead of
9804 initialize_registers ().
9806 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9808 * server.c (handle_v_requests): When handling the vRun and vAttach
9809 packets, if already debugging a process, don't kill it. Return an
9812 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9814 * server.c (handle_query): Correct length check.
9816 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9818 * win32-low.c (do_initial_child_stuff): Add process handle
9819 parameter. Set current_process_handle and current_process_id from the
9820 parameters. Clear globals.
9821 (win32_create_inferior): Don't set current_process_handle and
9822 current_process_id here. Instead pass them on the call to
9823 do_initial_child_stuff.
9824 (win32_attach): Likewise.
9825 (win32_clear_inferiors): New.
9826 (win32_kill): Don't close the current process handle or the
9827 current thread handle here. Instead call win32_clear_inferiors.
9828 (win32_detach): Don't open a new handle to the process. Call
9829 win32_clear_inferiors.
9830 (win32_join): Don't rely on current_process_handle; open a new
9831 handle using the process id.
9832 (win32_wait): Call win32_clear_inferiors when the inferior process
9835 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9837 * server.c (monitor_show_help): Add "exit".
9839 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9841 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9842 (clean): Add reg-xtensa.c.
9843 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9844 * configure.srv (xtensa*-*-linux*) New target.
9845 * linux-xtensa-low.c: New.
9846 * xtensa-xtregs.c: New.
9848 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9850 * hostio.c: Don't include errno.h.
9851 (errno_to_fileio_errno): Move to hostio-errno.
9852 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9853 error number outputting to the target->hostio_last_error callback.
9854 (hostio_packet_error): Use FILEIO_EINVAL directly.
9855 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9856 calls to hostio_error.
9857 * hostio-errno.c: New.
9858 * server.h (hostio_last_error_from_errno): Declare.
9859 * target.h (target_ops): Add hostio_last_error member.
9860 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9861 as hostio_last_error handler.
9862 * spu-low.c (spu_target_ops): Likewise.
9863 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9864 (wince_hostio_last_error): New functions.
9865 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9866 as hostio_last_error handler.
9867 (win32_target_ops) [!_WIN32_WCE]: Register
9868 hostio_last_error_from_errno as hostio_last_error handler.
9869 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9870 (hostio-errno.o): New rule.
9871 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9872 * configure.srv (srv_hostio_err_objs): New variable. Default to
9874 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9875 * configure: Regenerate.
9877 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9879 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9880 (linux_kill, linux_detach): Clean up the process list.
9881 * remote-utils.c (remote_open): Improve port number parsing.
9882 (putpkt_binary, input_interrupt): Only send interrupts if the target
9884 * server.c (extended_protocol): Make static.
9885 (attached): Define earlier.
9886 (exit_requested, response_needed, program_argv): New variables.
9887 (target_running): New.
9888 (start_inferior): Clear attached here.
9889 (attach_inferior): Set attached here.
9890 (require_running): Define.
9891 (handle_query): Use require_running and target_running. Implement
9893 (handle_v_attach, handle_v_run): New.
9894 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9895 (gdbserver_usage): Update.
9896 (main): Redo argument parsing. Handle --debug and --multi. Handle
9897 --attach along with other options or after the port. Save
9898 program_argv. Support no initial program. Resynchronize
9899 communication with GDB after an error. Handle "monitor exit".
9900 Use require_running and target_running. Always allow the extended
9901 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9902 restart in extended mode.
9903 * README: Refer to the GDB manual. Update --attach usage.
9905 2007-12-20 Andreas Schwab <schwab@suse.de>
9907 * linux-low.c (STACK_SIZE): Define.
9908 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9909 (linux_test_for_tracefork): Likewise.
9911 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9913 * linux-low.c (linux_wait_for_event): Update messages. Do not
9914 reinsert auto-delete breakpoints.
9915 * mem-break.c (struct breakpoint): Change return type of handler to
9917 (set_breakpoint_at): Update handler type.
9918 (reinsert_breakpoint_handler): Return 1 instead of calling
9920 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9922 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9923 * mem-break.h (set_breakpoint_at): Update handler type.
9924 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9925 * win32-low.c (auto_delete_breakpoint): New.
9926 (get_child_debug_event): Use it.
9928 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9930 * configure.ac: Check for pread and pwrite.
9931 * hostio.c (handle_pread): Fall back to lseek and read.
9932 (handle_pwrite): Fall back to lseek and write.
9933 * config.in, configure: Regenerated.
9935 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9937 * server.c (myresume): Add own_buf argument.
9938 (main): Update calls.
9940 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9942 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9943 * remote-utils.c (remote_open): Do not call disable_async_io.
9944 (block_async_io): Delete.
9945 (unblock_async_io): Make static.
9946 (initialize_async_io): New.
9947 * server.c (handle_v_cont): Handle async I/O here.
9948 (myresume): Likewise. Move other common resume tasks here...
9949 (main): ... from here. Call initialize_async_io. Disable async
9950 I/O before the main loop.
9951 * server.h (initialize_async_io): Declare.
9952 (block_async_io, unblock_async_io): Delete prototypes.
9953 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9955 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9957 * remote-utils.c (readchar): Allow binary data in received messages.
9959 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9961 * win32-low.c (attaching): New global.
9962 (win32_create_inferior): Clear the `attaching' global.
9963 (win32_attach): Set the `attaching' global.
9964 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9965 attaching. Only set a breakpoint at the entry point if not
9968 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9970 * server.c (main): Don't report dll events on the initial
9971 connection on attaches.
9973 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9975 * server.c (main): Relax numerical bases supported for the pid of
9976 the --attach command line argument.
9978 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9980 * win32-low.c (win32_attach): Call OpenProcess before
9981 DebugActiveProcess, not after. Add last error output to error
9984 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9986 * win32-low.c (win32_get_thread_context)
9987 (win32_set_thread_context): New functions.
9988 (thread_rec): Use win32_get_thread_context.
9989 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9990 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9993 2007-12-03 Leo Zayas
9994 Pedro Alves <pedro_alves@portugalmail.pt>
9996 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9998 (child_add_thread): Minor cleanup.
9999 (child_continue): Resume artificially suspended threads before
10000 calling ContinueDebugEvent.
10001 (suspend_one_thread): New.
10002 (fake_breakpoint_event): New.
10003 (get_child_debug_event): Change return type to int. Check here if
10004 gdb sent an interrupt request. If a soft interrupt was requested,
10005 fake a breakpoint event. Return 0 if there is no event to handle,
10007 (win32_wait): Don't check here if gdb sent an interrupt request.
10008 Ensure there is a valid event to handle.
10009 (win32_request_interrupt): Add soft interruption method as last
10012 2007-12-03 Leo Zayas
10013 Pedro Alves <pedro_alves@portugalmail.pt>
10015 * win32-low.h (win32_thread_info): Add descriptions to the
10016 structure members. Replace `suspend_count' counter by a
10018 * win32-low.c (thread_rec): Update condition of when to get the
10019 context from the inferior. Rely on ContextFlags being set if it
10020 has already been retrieved. Only suspend the inferior thread if
10021 we haven't already. Warn if that fails.
10022 (continue_one_thread): s/suspend_count/suspended/. Only call
10023 ResumeThread once. Warn if that fails.
10025 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10027 * win32-low.c (win32_wait): Don't read from the inferior when it
10028 has already exited.
10030 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10032 * Makefile.in (win32_low_h): New variable.
10033 (win32-low.o): Add dependency on $(win32_low_h).
10034 (win32-arm-low.o, win32-i386-low.o): New rules.
10036 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10038 * hostio.c: Correct copyright year.
10040 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10042 * Makefile.in (OBS): Add hostio.o.
10043 (hostio.o): New rule.
10044 * server.h (handle_vFile): Declare.
10045 * hostio.c: New file.
10046 * server.c (handle_v_requests): Take packet_len and new_packet_len
10047 for binary packets. Call handle_vFile.
10048 (main): Update call to handle_v_requests.
10050 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10052 * linux-low.c: Include <sched.h>.
10054 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10056 * linux-low.c (linux_tracefork_grandchild): New.
10057 (linux_tracefork_child): Use clone.
10058 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10060 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10062 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10064 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10066 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10068 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10070 * inferiors.c (change_inferior_id): Delete.
10071 (add_pid_to_list, pull_pid_from_list): New.
10072 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10073 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10074 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10075 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10076 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10077 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10078 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10079 (using_threads): Always set to 1.
10080 (handle_extended_wait): New.
10081 (add_process): Do not set TID.
10082 (linux_create_inferior): Set must_set_ptrace_flags.
10083 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10084 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10085 (linux_thread_alive): Rename TID argument to LWPID.
10086 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10087 (linux_wait_for_event): Do not use TID or check using_threads. Update
10088 call to dead_thread_notify. Call handle_extended_wait.
10089 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10090 (send_sigstop): Delete sigstop_sent.
10091 (wait_for_sigstop): Avoid TID.
10092 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10093 (linux_test_for_tracefork): New.
10094 (linux_lookup_signals): Use thread_db_active and
10095 linux_supports_tracefork_flag.
10096 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10097 * linux-low.h (get_process_thread): Avoid TID.
10098 (struct process_ifo): Move thread_known and tid to the end. Remove
10100 (linux_attach_lwp, thread_db_init): Update prototypes.
10101 * server.h (change_inferior_id): Delete prototype.
10102 (add_pid_to_list, pull_pid_from_list): New prototypes.
10103 * thread-db.c (thread_db_use_events): New.
10104 (find_first_thread): Rename to...
10105 (find_one_thread): ...this. Update callers and messages. Do not
10106 call fatal. Check thread_db_use_events. Do not call
10107 change_inferior_id or new_thread_notify.
10108 (maybe_attach_thread): Update. Do not call new_thread_notify.
10109 (thread_db_init): Set thread_db_use_events. Check use_events.
10110 * utils.c (fatal, warning): Correct message prefix.
10112 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10114 * Makefile.in (clean): Remove new files.
10115 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10116 (powerpc-64.o, powerpc-64.c): New rules.
10117 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10118 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10120 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10122 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10123 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10124 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10125 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10126 (target_regsets): Add AltiVec and SPE register sets.
10127 * configure.ac: Check for AltiVec and SPE.
10128 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10129 (ppc_fill_vrregset, ppc_store_vrregset): New.
10130 (target_regsets): Add AltiVec register set.
10131 * configure: Regenerated.
10133 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10135 * linux-low.c (O_LARGEFILE): Define.
10136 (linux_read_memory): Use /proc/PID/mem.
10137 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10138 * configure, config.in: Regenerated.
10140 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10142 * linux-low.c (linux_wait_for_event): Do not pass signals while
10145 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10147 * win32-low.c (create_process): New.
10148 (win32_create_inferior): Use create_process instead of
10149 CreateProcess. If create_process failed retry appending an ".exe"
10150 suffix. Store the GetLastError result immediatelly after
10151 create_process calls and use it on the call to error.
10153 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10155 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10157 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10159 * configure.ac: Switch license to GPLv3.
10161 2007-08-01 Michael Snyder <msnyder@access-company.com>
10163 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10165 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10167 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10169 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10170 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10171 CloseToolhelp32Snapshot.
10172 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10173 CloseToolhelp32Snapshot.
10175 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10177 * server.c (main): Check for inferior exit before main loop.
10179 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10181 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10182 instead of on tmp_desc.
10184 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10185 Daniel Jacobowitz <dan@codesourcery.com>
10187 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10188 (add_thread): Minor cleanups.
10189 (clear_inferiors): Move lower in the file. Clear the DLL
10191 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10192 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10193 (xml_escape_text): New.
10194 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10196 (handle_v_cont): Report errors.
10197 (gdbserver_version): Update.
10198 (main): Correct size of own_buf. Do not report initial DLL events.
10199 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10200 (unloaded_dll, xml_escape_text): New.
10201 * win32-low.c (enum target_waitkind): Update comments.
10202 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10203 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10204 (win32_EnumProcessModules, win32_GetModuleInformation)
10205 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10206 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10207 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10208 (win32_Module32First, win32_Module32Next, load_toolhelp)
10209 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10210 (get_child_debug_event): Handle DLL events.
10211 (win32_wait): Likewise.
10213 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10215 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10216 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10218 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10220 * win32-low.c (handle_output_debug_string): Ignore event if not
10223 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10225 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10227 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10229 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10231 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10233 * inferiors.c (change_inferior_id): Add comment.
10234 * linux-low.c (check_removed_breakpoint): Add an early
10235 prototype. Improve debug output.
10236 (linux_attach): Doc update.
10237 (linux_detach_one_process, linux_detach): Clean up before releasing
10239 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10240 * linux-low.h (struct process_info): Doc improvement.
10241 * mem-break.c (delete_all_breakpoints): New.
10242 * mem-break.h (delete_all_breakpoints): New prototype.
10243 * thread-db.c (find_first_thread): New.
10244 (thread_db_create_event): Call it instead of
10245 thread_db_find_new_threads. Clean up unused variables.
10246 (maybe_attach_thread): Remove first thread handling.
10247 (thread_db_find_new_threads): Use find_first_thread.
10248 (thread_db_get_tls_address): Likewise.
10250 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10252 * thread-db.c (thread_db_find_new_threads): Add prototype.
10253 (thread_db_create_event): Check for the main thread before adding
10255 (maybe_attach_thread): Only enable event reporting if TID == 0.
10256 (thread_db_get_tls_address): Check for new threads.
10258 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10260 * linux-low.c (linux_create_inferior): Try execv before execvp.
10261 * spu-low.c (spu_create_inferior): Likewise.
10263 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10265 * linux-low.c (linux_create_inferior): Change execv to execvp.
10266 * spu-low.c (spu_create_inferior): Likewies.
10268 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10270 * Makefile.in (clean): Clean new files instead of deleted ones.
10271 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10272 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10274 * configure.srv: Specify XML files and new regformats for MIPS and
10276 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10277 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10278 an entry for the restart register.
10279 (mips_cannot_fetch_register, mips_cannot_store_register)
10280 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10281 register names to match the XML descriptions.
10282 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10283 restart register instead of $0.
10285 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10286 Markus Deuling <deuling@de.ibm.com>
10288 * remote-utils.c (decode_xfer_write): New function.
10289 * server.h (decode_xfer_write): Add prototype.
10290 * server.c (handle_query): Add PACKET_LEN argument. Support
10291 qXfer:spu:read and qXfer:spu:write packets.
10292 (main): Pass packet_len to handle_query.
10293 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10294 * target.h (target_ops): Add qxfer_spu.
10296 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10298 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10299 accessing non-seekable spufs files.
10301 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10303 * server.c (handle_query): Add reply for qC packet.
10305 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10306 Leo Zayas <lerele@champenstudios@com>
10308 * server.h (check_remote_input_interrupt_request): New function.
10309 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10310 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10311 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10312 (check_remote_input_interrupt_request): New function.
10313 * server.h (check_remote_input_interrupt_request): Declare.
10314 * win32-low.c (winapi_DebugBreakProcess,
10315 winapi_GenerateConsoleCtrlEvent): New typedefs.
10316 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10318 (win32_wait): Check for remote interrupt request
10319 with check_remote_input_interrupt_request.
10320 (win32_request_interrupt): New function.
10321 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10323 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10325 * win32-low.c (debug_registers_changed,
10326 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10327 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10328 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10329 (thread_rec): Get context using the low target.
10330 (child_add_thread): Call thread_added on the low target,
10331 which does the same thing.
10333 (do_initial_child_stuff): Remove debug registers references.
10334 Set context using the low target. Resume threads after
10335 setting the contexts.
10336 (child_continue): Remove dead variable. Remove debug
10337 registers references.
10338 (child_fetch_inferior_registers): Go through the low target.
10339 (do_child_store_inferior_registers): Remove.
10340 (child_store_inferior_registers): Go through the low target.
10341 (win32_resume): Remove debug registers references.
10342 Set context using the low target.
10343 (handle_exception): Change return type to void. Don't record
10344 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10345 first chance exception.
10346 (get_child_debug_event): Change return type to void. Remove
10347 goto loop. Always return after waiting for debug event.
10348 (win32_wait): Convert to switch statement. Handle spurious
10351 * win32-i386-low.c (debug_registers_changed,
10352 debug_registers_used): New.
10353 (initial_stuff): Rename to ...
10354 (i386_initial_stuff): ... this. Clear debug registers
10356 (store_debug_registers): Delete.
10357 (i386_get_thread_context): New.
10358 (load_debug_registers): Delete.
10359 (i386_set_thread_context): New.
10360 (i386_thread_added): New.
10361 (single_step): Rename to ...
10362 (i386_single_step): ... this.
10363 (do_fetch_inferior_registers): Rename to ...
10364 (i386_fetch_inferior_register): ... this.
10365 (i386_store_inferior_register): New.
10366 (the_low_target): Adapt to new interface.
10368 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10369 (arm_get_thread_context): New.
10370 (arm_set_thread_context): New.
10372 (do_fetch_inferior_registers): Rename to ...
10373 (arm_fetch_inferior_register): ... this.
10374 (arm_store_inferior_register): New.
10375 (arm_wince_breakpoint): Reimplement as unsigned long.
10376 (arm_wince_breakpoint_len): Define.
10377 (the_low_target): Adapt to new interface.
10379 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10380 load_debug_registers. Add get_thread_context, set_thread_context,
10381 thread_added and store_inferior_register. Rename
10382 fetch_inferior_registers to fetch_inferior_register.
10383 (regptr): Remove declaration.
10385 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10387 * linux-low.c (linux_detach): Change return type to int. Return 0.
10388 * spu-low.c (spu_detach): Likewise.
10390 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10392 * target.h (target_ops): Change return type of detach to int.
10394 (join_inferior): New.
10395 * server.c (main): Don't skip detach support on mingw32.
10396 If the inferior doesn't support detaching return error.
10397 Call join_inferior instead of using waitpid.
10398 * linux-low.c (linux_join): New.
10399 (linux_target_op): Add linux_join.
10400 * spu-low.c (spu_join): New.
10401 (spu_target_ops): Add spu_join.
10402 * win32-low.c (win32_detach): Adapt to new interface.
10403 Reopen current_process_handle before detaching. Issue a child
10404 resume before detaching.
10406 (win32_target_op): Add win32_join.
10408 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10410 * win32-low.c (win32-attach): Fix return value.
10411 * target.h (target_ops): Describe ATTACH return values.
10413 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10415 * win32-low.c (GETPROCADDRESS): Define.
10416 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10417 (winapi_DebugSetProcessKillOnExit): Likewise.
10418 (win32_create_inferior): Force usage of ansi CreateProcessA.
10419 (win32_attach): Use GETPROCADDRESS.
10420 (win32_detach): Likewise.
10422 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10424 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10426 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10428 * win32-low.c: Commit leftover changes from 2007-03-29.
10430 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10432 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10433 fields short instead of int. Add explicit padding.
10434 (i387_cache_to_fsave): Remove unnecessary casts.
10435 (i387_fsave_to_cache): Doc fix.
10436 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10438 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10440 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10441 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10443 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10445 * configure.srv (arm*-*-mingw32ce*): Move near the other
10448 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10450 * configure.ac: Add errno checking.
10451 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10452 sys/file.h and malloc.h.
10453 (AC_CHECK_DECLS): Add perror.
10454 (srv_mingwce): Handle.
10455 * configure.srv (i[34567]86-*-cygwin*): Add
10456 win32-i386-low.o to srv_tgtobj.
10457 (i[34567]86-*-mingw*): Likewise.
10458 (arm*-*-mingw32ce*): Add case.
10459 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10460 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10461 [__MINGW32CE__] (strerror): New function.
10462 [__MINGW32CE__] (errno): Define to GetLastError.
10463 [__MINGW32CE__] (COUNTOF): New macro.
10464 (remote_open): Remove extra close call.
10465 * mem-break.c (delete_breakpoint_at): New function.
10466 * mem-break.h (delete_breakpoint_at): Declare.
10467 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10468 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10469 [USE_WIN32API] (read, write): Add char* casts.
10470 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10471 * server.h: Include wincecompat.h on Windows CE.
10472 [HAVE_ERRNO_H]: Check.
10473 (perror): Declare if not declared.
10474 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10475 (perror_with_name): Remove errno declaration.
10476 * wincecompat.h: New.
10477 * wincecompat.c: New.
10478 * win32-low.h: New.
10479 * win32-arm-low.c: New.
10480 * win32-i386-low.c: New.
10481 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10482 (OUTMSG2): Make it safe.
10484 (COUNTOF): New macro.
10485 (NUM_REGS): Get it from the low target.
10486 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10487 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10488 (thread_rec): Let low target handle debug registers.
10489 (child_add_thread): Likewise.
10490 (child_init_thread_list): Likewise.
10491 (continue_one_thread): Likewise.
10493 (do_child_fetch_inferior_registers): Move to ...
10494 * win32-i386-low.c: ... here, and rename to ...
10495 (do_fetch_inferior_registers): ... this.
10496 * win32-low.c (child_fetch_inferior_registers):
10497 Go through the low target.
10498 (do_child_store_inferior_registers): Use regptr.
10499 (strwinerror): New function.
10500 (win32_create_inferior): Handle Windows CE.
10501 Use strwinerror instead of strerror on Windows error
10502 codes. Add program to the error output.
10503 Don't close the main thread handle on Windows CE.
10504 (win32_attach): Use coredll.dll on Windows CE.
10505 (win32_kill): Close current process and current
10507 (win32_detach): Use coredll.dll on Windows CE.
10508 (win32_resume): Let low target handle debug registers, and
10510 (handle_exception): Add/Remove initial breakpoint. Avoid
10511 non-existant WSTOPSIG on Windows CE.
10512 (win32_read_inferior_memory): Cast to remove warning.
10513 (win32_arch_string): Go through the low target.
10514 (initialize_low): Call set_breakpoint_data with the low
10515 target's breakpoint.
10516 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10517 FOP_REGNUM, mappings): Move to ...
10518 * win32-i386-low.c: ... here.
10519 * win32-low.c (win32_thread_info): Move to ...
10520 * win32-low.h: ... here.
10521 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10522 win32-arm-low.c and wincecompat.c.
10523 (all:): Add $EXEEXT.
10524 (install-only:): Likewise.
10525 (gdbserver:): Likewise.
10526 (gdbreplay:): Likewise.
10527 * config.in: Regenerate.
10528 * configure: Regenerate.
10530 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10532 * win32-low.c: Rename typedef thread_info to
10533 win32_thread_info throughout.
10535 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10537 * win32-i386-low.c: Rename to ...
10538 * win32-low.c: ... this.
10539 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10540 * Makefile.in: Likewise.
10542 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10544 * remote-utils.c (monitor_output): Constify msg parameter.
10545 * server.h (monitor_output): Likewise.
10546 * win32-i386-low.c (handle_output_debug_string): New.
10547 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10548 handle_output_debug_string.
10549 (get_child_debug_event): Likewise.
10551 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10553 * server.c (main): Correct strtoul check.
10555 2007-03-27 Jon Ringle <jon@ringle.org>
10557 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10559 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10561 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10563 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10565 * terminal.h: Check HAVE_SGTTY_H.
10567 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10569 * remote-utils.c (remote_open): Print out the assigned port number.
10571 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10573 * remote-utils.c (monitor_output): New function.
10574 * server.c (debug_threads): Define here.
10575 (monitor_show_help): New function.
10576 (handle_query): Handle qRcmd.
10577 (main): Do not handle 'd' packet.
10578 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10579 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10582 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10584 * Makefile.in (EXEEXT): New.
10585 (clean): Use $(EXEEXT).
10587 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10589 * target.h (target_ops): Rename send_signal to request_interrupt,
10590 and remove enum target_signal parameter.
10591 * linux-low.c (linux_request_interrupt): Rename from
10592 linux_send_signal, and always send SIGINT.
10593 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10594 and always send SIGINT.
10595 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10597 (input_interrupt): Likewise.
10599 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10601 * server.c (get_features_xml): Check if target implemented
10603 * win32-i386-low.c (win32_arch_string): New.
10604 (win32_target_ops): Add win32_arch_string as arch_string member.
10606 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10608 * spu-low.c (spu_arch_string): New.
10609 (spu_target_ops): Add spu_arch_string.
10611 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10613 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10614 * configure.ac: Do not check for terminal.h.
10615 * configure, config.in: Regenerated.
10617 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10619 * Makefile.in (OBS): Add $(XML_BUILTIN).
10620 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10622 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10623 (arm-with-iwmmxt.c): New.
10624 * config.in, configure: Regenerate.
10625 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10626 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10627 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10628 (arm*-*-linux*): Add iWMMXt and regset support.
10629 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10630 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10631 (arm_store_wmmxregset, target_regsets): New.
10632 * server.c (get_features_xml): Take annex argument. Check builtin
10634 (handle_query): Handle multiple annexes.
10636 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10638 * remote-utils.c [USE_WIN32API] (read, write): Define.
10639 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10642 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10644 * linux-i386-low.c (the_low_target): Set arch_string.
10645 * linux-x86-64-low.c (the_low_target): Likewise.
10646 * linux-low.c (linux_arch_string): New.
10647 (linux_target_ops): Add it.
10648 * linux-low.h (struct linux_target_ops): Add arch_string.
10649 * server.c (write_qxfer_response): Use const void * for DATA.
10650 (get_features_xml): New.
10651 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10652 * target.h (struct target_ops): Add arch_string method.
10654 2007-01-03 Denis Pilat <denis.pilat@st.com>
10655 Daniel Jacobowitz <dan@codesourcery.com>
10657 * linux-low.c (linux_kill): Handle being called with no threads.
10658 * win32-i386-low.c (win32_kill): Likewise.
10659 (get_child_debug_event): Clear current_process_handle.
10661 2006-12-30 Denis PILAT <denis.pilat@st.com>
10662 Daniel Jacobowitz <dan@codesourcery.com>
10664 * remote-utils.c (remote_open): Check the type of specified
10665 serial port devices before opening them.
10666 * server.c (main): Kill the inferior if an error occurs during
10667 the first remote_open.
10669 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10671 * README: Update supported targets.
10673 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10675 * Makefile.in (clean): Remove reg-mips64.c.
10676 (reg-mips64.c, reg-mips64.o): New rules.
10677 * configure.srv: Handle mips64. Include regset support for mips.
10678 * linux-mips-low.c (union mips_register): New.
10679 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10680 (mips_breakpoint, mips_breakpoint_at): Use int.
10681 (mips_collect_register, mips_supply_register)
10682 (mips_collect_register_32bit, mips_supply_register_32bit)
10683 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10684 (mips_store_fpregset, target_regsets): New.
10685 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10687 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10689 * configure.srv: Add target "spu*-*-*".
10690 * Makefile.in (clean): Remove reg-spu.c.
10691 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10692 * spu-low.c: New file.
10694 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10696 * configure.ac: Correct td_thr_tls_get_addr test.
10697 * configure: Regenerated.
10699 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10701 * linux-low.c (linux_wait_for_event): Reformat. Use the
10702 pass_signals array.
10703 * remote-utils.c (decode_address_to_semicolon): New.
10704 * server.c (pass_signals, handle_general_set): New.
10705 (handle_query): Mention QPassSignals for qSupported.
10706 (main): Call handle_general_set.
10707 * server.h (pass_signals, decode_address_to_semicolon): New.
10709 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10711 * server.c (handle_query): Correct error handling for read_auxv.
10713 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10715 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10716 and srv_linux_thread_db to yes.
10717 * linux-s390-low.c (s390_fill_gregset): New function.
10718 (target_regsets): Define data structure.
10720 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10722 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10723 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10724 * config.in, configure: Regenerated.
10725 * inferiors.c (gdb_id_to_thread): New function.
10726 (gdb_id_to_thread_id): Use it.
10727 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10728 * linux-low.h (struct process_info): Add th member.
10729 (thread_db_get_tls_address): New prototype.
10730 * remote-utils.c (decode_address): Make non-static.
10731 * server.c (handle_query): Handle qGetTLSAddr.
10732 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10733 * target.h (struct target_ops): Add get_tls_address.
10734 * thread-db.c (maybe_attach_thread): Save the thread handle.
10735 (thread_db_get_tls_address): New.
10737 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10739 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10740 (linux_resume_one_process): Take a siginfo_t *. Update all
10741 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10742 (struct pending_signals): Add a siginfo_t.
10743 (linux_wait_for_process): Always set last_status.
10744 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10745 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10746 * linux-low.h (struct process_info): Add last_status.
10748 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10750 * remote-utils.c (try_rle): New function.
10751 (putpkt_binary): Use it.
10753 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10755 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10756 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10757 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10758 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10759 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10762 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10764 * server.c (terminal_fd): New variable.
10765 (old_foreground_pgrp): Likewise.
10766 (restore_old_foreground_pgrp): New function.
10767 (start_inferior): Record the terminal file descriptor in terminal_fd
10768 and its original foreground group in old_foreground_pgrp. Register
10769 restore_old_foreground_pgrp with atexit().
10771 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10773 * server.c (handle_query): Correct qPart to qXfer.
10775 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10777 * configure.ac: Check for more headers which are missing on
10778 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10779 * configure.srv: Add Cygwin and mingw32.
10780 * remote-utils.c: Don't include headers unconditionally which
10781 are missing on mingw32. Include <winsock.h> for mingw32.
10782 (remote_open): Adjust for mingw32 support. Flush
10783 standard error after writing to it.
10784 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10785 (unblock_async_io, enable_async_io, disable_async_io)
10786 (readchar, getpkt): Update for Winsock support.
10787 (prepare_resume_reply): Expect a protocol signal number.
10788 * server.c: Disable <sys/wait.h> on mingw32.
10789 (start_inferior): Adjust for mingw32 support. Flush
10790 standard error after writing to it.
10791 (attach_inferior): Likewise. Use protocol signal
10793 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10795 * win32-i386-low.c: New file.
10796 * Makefile.in (XM_CLIBS): Set.
10797 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10798 (win32-i386-low.o): New dependency rule.
10799 * linux-low.c (linux_wait): Use target signal numbers.
10800 * target.h (struct target_ops): Doc fix.
10801 * server.h (target_signal_to_name): New prototype.
10802 * gdbreplay.c: Don't include headers unconditionally which
10803 are missing on mingw32. Include <winsock.h> for mingw32.
10804 (remote_close, remote_open): Adjust for Winsock support.
10805 * configure, config.in: Regenerated.
10807 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10809 * server.c (decode_xfer_read, write_qxfer_response): New.
10810 (handle_query): Take a packet length argument. Handle
10811 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10812 the qSupported response.
10813 (main): Update call to handle_query.
10815 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10817 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10818 (putpkt_binary): Renamed from putpkt and adjusted for binary
10820 (putpkt): New wrapper for putpkt_binary.
10821 (readchar): Don't mask off the high bit.
10822 (decode_X_packet): New function.
10823 * server.c (main): Call putpkt_binary if a handler sets the packet
10824 length. Save the length of the incoming packet. Handle 'X'.
10825 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10827 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10829 * server.c (handle_query): Handle qSupported.
10831 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10833 * remote-utils.c (all_symbols_looked_up): New variable.
10834 (look_up_one_symbol): Check it.
10835 * server.h (look_up_one_symbol): New declaration.
10836 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10838 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10840 * Makefile.in (linux-arm-low.o): Update dependencies.
10841 * linux-arm-low.c: Include "gdb_proc_service.h".
10842 (PTRACE_GET_THREAD_AREA): Define.
10843 (ps_get_thread_area): New function.
10845 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10847 * configure.srv (m68k*-*-uclinux*): New target.
10848 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10849 (linux_resume_one_process): Remove extraneous cast.
10850 (linux_read_offsets): New.
10851 (linux_target_op): Add linux_read_offsets on mmuless systems.
10852 * server.c (handle_query): Add qOffsets logic.
10853 * target.h (struct target_ops): Add read_offsets.
10855 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10857 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10858 (PTRACE_GET_THREAD_AREA): Define.
10859 (ps_get_thread_area): New function.
10860 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10861 (linux-x86-64-low.o): Update.
10863 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10865 * configure.ac: Remove checks for prfpregset_t.
10866 * gdb_proc_service.h: New file.
10867 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10868 new "gdb_proc_service.h".
10869 * proc-service.c: Likewise.
10870 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10871 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10872 * Makefile.in (gdb_proc_service_h): Updated.
10873 * configure, config.in: Regenerated.
10875 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10877 * remote-utils.c (prepare_resume_reply): Move declaration
10878 of gdb_id_from_wait to the top of the block.
10880 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10882 * linux-low.c (regsets_store_inferior_registers): Read the regset
10883 from the target before filling it.
10885 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10887 * server.c (attach_inferior): Return SIGTRAP for a successful
10890 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10892 * Makefile.in (OBS): Add version.o.
10893 (STAGESTUFF): Delete.
10894 (version.o): Add dependencies.
10895 (version.c): Replace rule.
10896 (clean): Remove version.c.
10897 * server.c (gdbserver_version): New.
10898 (gdbserver_usage): Use printf.
10899 (main): Handle --version and --help.
10900 * server.h (version, host_name): Add declarations.
10902 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10914 * linux-x86-64-low.c:
10916 * linux-s390-low.c:
10917 * linux-ppc64-low.c:
10919 * linux-mips-low.c:
10920 * linux-m68k-low.c:
10921 * linux-m32r-low.c:
10924 * linux-ia64-low.c:
10925 * linux-i386-low.c:
10926 * linux-crisv32-low.c:
10938 * gdbserver.1: Add (C) after Copyright. Update the FSF
10941 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10943 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10944 (arm_breakpoint_at): Recognize both breakpoints.
10945 (the_low_target): Use the correct breakpoint instruction.
10947 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10949 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10950 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10951 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10952 (the_low_target): Update.
10954 2005-10-25 Andreas Schwab <schwab@suse.de>
10956 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10958 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10959 (ia64_num_regs): Reduce to 462.
10961 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10963 * acinclude.m4: Correct quoting.
10964 * aclocal.m4: Regenerated.
10966 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10967 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10968 (thread_db_init): Call thread_db_err_str.
10969 * configure.ac: Check for TD_VERSION.
10970 * config.in, configure: Regenerated.
10972 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10974 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10976 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10978 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10979 is not available. Define HAVE_PTRACE_GETREGS if it is.
10980 * config.in, configure: Regenerated.
10981 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10982 * linux-i386-low.c, linux-m68k-low.c: Update to use
10983 HAVE_PTRACE_GETREGS.
10984 * linux-low.c (regsets_fetch_inferior_registers)
10985 (regsets_store_inferior_registers): Only return 0 if we processed
10987 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10988 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10990 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10992 * inferiors.c (struct thread_info): Add gdb_id.
10993 (add_thread): Add gdb_id argument.
10994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10995 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10996 calls to add_thread.
10997 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10998 * server.c (handle_query): Use thread_to_gdb_id.
10999 (handle_v_cont, main): Use gdb_id_to_thread_id.
11000 * server.h (add_thread): Update prototype.
11001 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11004 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11006 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11007 left-padded registers.
11008 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11009 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11011 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11013 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11014 * configure: Regenerate.
11015 * config.in: Regenerate.
11016 * server.h (NEED_DECLARATION_STRERROR):
11017 Replace with !HAVE_DECL_STRERROR.
11019 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11021 * linux-low.c (linux_wait, linux_send_signal): Don't test
11022 an unsigned long variable for > 0 if it could be MAX_ULONG.
11023 * server.c (myresume): Likewise.
11024 * target.c (set_desired_inferior): Likewise.
11026 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11028 * configure.ac: Simplify and improve check for socklen_t.
11029 * configure, config.in: Regenerate.
11031 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11033 * acconfig.h: Remove.
11034 * configure.ac: Add a test for socklen_t. Use three-argument
11035 AC_DEFINE throughout.
11036 * config.in: Regenerated using autoheader 2.59.
11037 * configure: Regenerated.
11039 * gdbreplay.c (socklen_t): Provide a default.
11040 (remote_open): Use socklen_t.
11041 * remote-utils.c (socklen_t): Provide a default.
11042 (remote_open): Use socklen_t.
11043 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11046 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11048 * linux-low.c (linux_read_memory, linux_write_memory)
11049 (linux_read_auxv): Likewise.
11050 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11051 (check_mem_write): Likewise.
11052 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11054 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11055 (registers_from_string, register_data): Likewise.
11056 * server.c (handle_query, main): Likewise.
11057 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11058 (decode_M_packet): Likewise.
11059 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11060 * target.h (struct target_ops): Update read_memory, write_memory,
11062 (read_inferior_memory, write_inferior_memory): Update.
11063 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11064 to unsigned char *.
11065 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11066 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11067 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11068 linux-s390-low.c, linux-sh-low.c: Update for changes in
11069 read_inferior_memory and the_low_target->breakpoint.
11071 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11073 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11074 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11075 * configure.srv: Add powerpc64-*-linux*.
11076 * linux-ppc64-low.c: New file.
11078 2005-05-23 Orjan Friberg <orjanf@axis.com>
11080 * linux-cris-low.c: New file with support for CRIS.
11081 * linux-crisv32-low.c: Ditto for CRISv32.
11082 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11083 (clean): Add reg-cris.c and reg-crisv32.c.
11084 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11085 reg-crisv32.o, and reg-crisv32.c to make rules.
11086 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11087 recognized targets.
11089 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11091 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11092 of sizeof (PTRACE_XFER_TYPE).
11093 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11095 2005-05-12 Orjan Friberg <orjanf@axis.com>
11097 * target.h (struct target_ops): Add insert_watchpoint,
11098 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11099 pointers for hardware watchpoint support.
11100 * linux-low.h (struct linux_target_ops): Ditto.
11101 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11102 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11103 to linux_target_ops.
11104 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11106 * server.c (main): Recognize 'Z' and 'z' packets.
11108 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11110 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11111 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11112 (the_low_target): Add new members.
11114 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11116 * proc-service.c (ps_lgetregs): Search all_processes instead of
11119 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11121 * server.c (start_inferior): Change return type to int.
11122 (attach_inferior): Change sigptr to int *.
11123 (handle_v_cont, handle_v_requests): Change signal to int *.
11124 (main): Change signal to int.
11126 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11128 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11129 * configure.srv: Add m32r*-*-linux*.
11130 * linux-m32r-low.c: New file.
11132 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11134 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11136 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11138 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11139 Take unsigned long arguments for PIDs.
11140 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11141 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11142 (wait_for_sigstop, linux_resume_one_process)
11143 (regsets_fetch_inferior_registers, linux_send_signal)
11144 (linux_read_auxv): Likewise. Update the types of variables holding
11145 PIDs. Update format string specifiers.
11146 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11147 * remote-utils.c (prepare_resume_reply): Likewise.
11148 * server.c (cont_thread, general_thread, step_thread)
11149 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11151 (handle_query): Update format specifiers.
11152 (handle_v_cont, main): Use strtoul for thread IDs.
11153 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11154 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11155 (general_thread, step_thread, thread_from_wait)
11156 (old_thread_from_wait): Update.
11157 * target.h (struct thread_resume): Use unsigned long for THREAD.
11158 (struct target_ops): Use unsigned long for arguments to attach and
11161 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11163 * acinclude.m4: Include bfd/bfd.m4 directly.
11164 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11165 <agriffis@toolchain.org>.
11166 * aclocal.m4, configure: Regenerated.
11168 2005-01-07 Andrew Cagney <cagney@gnu.org>
11170 * configure.ac: Rename configure.in, require autoconf 2.59.
11171 * configure: Re-generate.
11173 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11175 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11176 LIBS when finished.
11177 * aclocal.m4: Regenerated.
11178 * configure: Regenerated.
11180 2004-11-21 Andreas Schwab <schwab@suse.de>
11182 * linux-m68k-low.c (m68k_num_gregs): Define.
11183 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11184 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11185 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11186 (m68k_breakpoint_at): New. Add to the_low_target.
11188 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11189 srv_linux_thread_db to yes.
11191 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11193 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11194 (ARCH_SET_FS): Likewise.
11195 (ARCH_GET_FS): Likewise.
11196 (ARCH_GET_GS): Likewise.
11198 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11200 * linux-i386-low.c (ps_get_thread_area): New.
11201 * linux-x86-64-low.c (ps_get_thread_area): New.
11202 * linux-low.c: Include <sys/syscall.h>.
11203 (linux_kill_one_process): Don't kill the first thread here.
11204 (linux_kill): Kill the first thread here.
11205 (kill_lwp): New function.
11206 (send_sigstop, linux_send_signal): Use it.
11207 * proc-service.c: Clean up #ifdefs.
11208 (fpregset_info): Delete.
11209 (ps_lgetregs): Update and enable implementation.
11210 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11212 * remote-utils.c (struct sym_cache, symbol_cache): New.
11213 (input_interrupt): Print a clearer message.
11214 (async_io_enabled): New variable.
11215 (enable_async_io, disable_async_io): Use it. Update comments.
11216 (look_up_one_symbol): Use the symbol cache.
11217 * thread-db.c (thread_db_look_up_symbols): New function.
11218 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11220 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11222 * configure.in: Test for -rdynamic.
11223 * configure: Regenerated.
11224 * Makefile (INTERNAL_LDFLAGS): New.
11225 (gdbserver, gdbreplay): Use it.
11227 2004-09-02 Andrew Cagney <cagney@gnu.org>
11229 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11231 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11233 * linux-low.c (linux_wait): Clear all_processes list also.
11235 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11237 * linux-low.c: Include <errno.h>. Remove extern declaration of
11240 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11242 * gdbreplay.c, server.h, utils.c: Update copyright years.
11244 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11246 * server.c (main): Print child status or termination signal from
11247 variable 'signal', not 'sig'.
11249 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11251 * linux-low.c (linux_read_memory): Change return type to
11252 int. Check for and return error from ptrace().
11253 * target.c (read_inferior_memory): Change return type to int. Pass
11254 back return status from the_target->read_memory().
11255 * target.h (struct target_ops): Adapt *read_memory() prototype.
11257 (read_inferior_memory): Adapt prototype.
11258 * server.c (main): Return an error packet if
11259 read_inferior_memory() returns an error.
11261 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11263 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11264 Unify with other clean targets.
11266 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11268 * server.c (handle_v_cont): Call set_desired_inferior.
11270 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11272 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11274 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11276 * linux-low.c (linux_wait): Unblock async I/O.
11277 (linux_resume): Block and enable async I/O.
11278 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11279 * server.h (block_async_io, unblock_async_io): Add prototypes.
11281 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11283 * remote-utils.c (remote_open): Print a status notice after
11284 opening a TCP port.
11285 * server.c (attach_inferior): Print a status notice after
11288 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11290 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11292 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11294 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11296 * server.c, target.h: Update copyright years.
11298 2004-02-25 Roland McGrath <roland@redhat.com>
11300 * target.h (struct target_ops): New member `read_auxv'.
11301 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11302 * linux-low.c (linux_read_auxv): New function.
11303 (linux_target_ops): Initialize `read_auxv' member to that.
11305 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11307 Committed by Jim Blandy <jimb@redhat.com>.
11309 * linux-s390-low.c (s390_num_regs): Update.
11310 (s390_regmap): Remove control registers. Use __s390x__ predefine
11311 instead of GPR_SIZE to distiguish s390 and s390x targets.
11313 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11315 * linux-low.c: Update copyright year.
11316 (check_removed_breakpoint): Clear pending_is_breakpoint.
11317 (linux_set_resume_request, linux_queue_one_thread)
11318 (resume_status_pending_p): New functions.
11319 (linux_continue_one_thread): Use process->resume.
11320 (linux_resume): Only resume threads if there are no pending events.
11321 * linux-low.h (struct process_info): Add resume request
11324 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11326 * regcache.c (new_register_cache): Clear the allocated register
11327 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11329 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11331 * linux-low.c (linux_resume): Take a struct thread_resume *
11333 (linux_wait): Update call.
11334 (resume_ptr): New static variable.
11335 (linux_continue_one_thread): Renamed from
11336 linux_continue_one_process. Use resume_ptr.
11337 (linux_resume): Use linux_continue_one_thread.
11338 * server.c (handle_v_cont, handle_v_requests): New functions.
11339 (myresume): New function.
11340 (main): Handle 'v' case.
11341 * target.h (struct thread_resume): New type.
11342 (struct target_ops): Change argument of "resume" to struct
11344 (myresume): Delete macro.
11346 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11348 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11349 (uninstall): Support DESTDIR.
11351 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11353 * configure.srv: Add xscale*linux copy of arm*linux entry.
11355 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11357 * linux-arm-low.c (arm_reinsert_addr): New function.
11358 (the_low_target): Add arm_reinsert_addr.
11360 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11362 * mem-break.c: Remove whitespace at end of file.
11364 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11366 * configure.in: Check whether we need to prototype strerror.
11367 * server.h: Optionally prototype strerror.
11368 * gdbreplay.c (perror_with_name): Use strerror.
11369 * linux-low.c (linux_attach_lwp): Use strerror.
11370 * utils.c (perror_with_name): Use strerror.
11371 * config.in, configure: Regenerated.
11373 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11375 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11376 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11378 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11380 * Makefile.in (SFILES): Update.
11381 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11382 low-sun3.c: Remove files.
11384 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11386 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11387 (linux_detach_one_process, linux_detach): New functions.
11388 (linux_target_ops): Add linux_detach.
11389 * server.c (main): Handle 'D' packet.
11390 * target.h (struct target_ops): Add "detach" member.
11391 (detach_inferior): Define.
11393 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11395 From Kelley Cook <kelleycook@wideopenwest.com>:
11396 * configure.srv: Accept i[34567]86 variants.
11398 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11400 * linux-low.c (linux_wait_for_event): Correct comment typos.
11401 (linux_resume_one_process): Call check_removed_breakpoint.
11402 (linux_send_signal): New function.
11403 (linux_target_ops): Add linux_send_signal.
11404 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11406 * target.h (struct target_ops): Add send_signal.
11408 2003-05-29 Jim Blandy <jimb@redhat.com>
11410 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11411 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11412 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11413 away part of the register's value.
11415 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11417 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11418 (linux_wait_for_event, linux_init_signals): Likewise.
11420 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11422 * configure.in: Check for stdlib.h.
11423 * configure: Regenerated.
11424 * config.in: Regenerated.
11426 2003-01-04 Andreas Schwab <schwab@suse.de>
11428 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11430 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11432 * Makefile.in: Remove obsolete code.
11434 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11436 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11437 defined(PT_FPR0_HI).
11439 2002-11-17 Stuart Hughes <seh@zee2.com>
11441 * linux-arm-low.c (arm_num_regs): Increase.
11442 (arm_regmap): Include status register.
11444 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11446 * linux-low.c (register_addr): Remove incorrect -1 check.
11448 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11450 * linux-low.c (linux_create_inferior): Call setpgid. Return
11452 (unstopped_p, linux_signal_pid): Remove.
11453 (linux_target_ops): Remove linux_signal_pid.
11454 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11455 global instead of target method.
11456 * target.h (struct target_ops): Remove signal_pid. Update comment
11457 for create_inferior.
11458 * server.c (signal_pid): New variable.
11459 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11460 gdbserver. Set the child to be the foreground process group.
11461 (attach_inferior): Set signal_pid.
11463 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11465 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11467 2002-08-20 Jim Blandy <jimb@redhat.com>
11469 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11472 2002-08-01 Andrew Cagney <cagney@redhat.com>
11474 * Makefile.in: Make chill references obsolete.
11476 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11478 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11479 * configure: Regenerate.
11480 * config.in: Regenerate.
11482 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11484 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11485 (perror_with_name, remote_close, remote_open, expect, play): Static.
11487 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11489 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11490 byte offsets instead of an array of indexes.
11491 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11493 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11495 * regcache.c: Add comment.
11497 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11499 * thread-db.c: New file.
11500 * proc-service.c: New file.
11501 * acinclude.m4: New file.
11502 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11503 proc-service.o, and thread-db.o.
11504 (linux-low.o): Add USE_THREAD_DB.
11505 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11506 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11507 * aclocal.m4: Regenerated.
11508 * config.in: Regenerated.
11509 * configure: Regenerated.
11510 * configure.in: Check for proc_service.h, sys/procfs.h,
11511 thread_db.h, and linux/elf.h headrs.
11512 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11513 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11514 Check for -lthread_db and thread support.
11515 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11516 PowerPC, and SuperH.
11517 * i387-fp.c: Constify arguments.
11518 * i387-fp.h: Likewise.
11519 * inferiors.c: (struct thread_info): Renamed from
11520 `struct inferior_info'. Remove PID member. Use generic inferior
11521 list header. All uses updated.
11522 (inferiors, signal_pid): Removed.
11523 (all_threads): New variable.
11524 (get_thread): Define.
11525 (add_inferior_to_list): New function.
11526 (for_each_inferior): New function.
11527 (change_inferior_id): New function.
11528 (add_inferior): Removed.
11529 (remove_inferior): New function.
11530 (add_thread): New function.
11531 (free_one_thread): New function.
11532 (remove_thread): New function.
11533 (clear_inferiors): Use for_each_inferior and free_one_thread.
11534 (find_inferior): New function.
11535 (find_inferior_id): New function.
11536 (inferior_target_data): Update argument type.
11537 (set_inferior_target_data): Likewise.
11538 (inferior_regcache_data): Likewise.
11539 (set_inferior_regcache_data): Likewise.
11540 * linux-low.c (linux_bp_reinsert): Remove.
11541 (all_processes, stopping_threads, using_thrads)
11542 (struct pending_signals, debug_threads, pid_of): New.
11543 (inferior_pid): Replace with macro.
11544 (struct inferior_linux_data): Remove.
11545 (get_stop_pc, add_process): New functions.
11546 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11547 Use add_process and add_thread.
11548 (linux_attach_lwp): New function, based on old linux_attach. Use
11549 add_process and add_thread. Set stop_expected for new threads.
11550 (linux_attach): New function.
11551 (linux_kill_one_process): New function.
11552 (linux_kill): Kill all LWPs.
11553 (linux_thread_alive): Use find_inferior_id.
11554 (check_removed_breakpoints, status_pending_p): New functions.
11555 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11556 Update. Use WNOHANG. Wait for cloned processes also. Update process
11557 struct for the found process.
11558 (linux_wait_for_event): New function.
11559 (linux_wait): Use it. Support LWPs.
11560 (send_sigstop, wait_for_sigstop, stop_all_processes)
11561 (linux_resume_one_process, linux_continue_one_process): New functions.
11562 (linux_resume): Support LWPs.
11563 (REGISTER_RAW_SIZE): Remove.
11564 (fetch_register): Use register_size instead. Call supply_register.
11565 (usr_store_inferior_registers): Likewise. Call collect_register.
11566 Fix recursive case.
11567 (regsets_fetch_inferior_registers): Improve error message.
11568 (regsets_store_inferior_registers): Add debugging.
11569 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11570 (unstopped_p, linux_signal_pid): New functions.
11571 (linux_target_ops): Add linux_signal_pid.
11572 (linux_init_signals): New function.
11573 (initialize_low): Call it. Initialize using_threads.
11574 * regcache.c (inferior_regcache_data): Add valid
11576 (get_regcache): Fetch registers lazily. Add fetch argument
11577 and update all callers.
11578 (regcache_invalidate_one, regcache_invalidate): New
11580 (new_register_cache): Renamed from create_register_cache.
11581 Return the new regcache.
11582 (free_register_cache): Change argument to a void *.
11583 (registers_to_string, registers_from_string): Call get_regcache
11584 with fetch flag set.
11585 (register_data): Make static. Pass fetch flag to get_regcache.
11586 (supply_register): Call get_regcache with fetch flag clear.
11587 (collect_register): Call get_regcache with fetch flag set.
11588 (collect_register_as_string): New function.
11589 * regcache.h: Update.
11590 * remote-utils.c (putpkt): Flush after debug output and use
11592 Handle input interrupts while waiting for an ACK.
11593 (input_interrupt): Use signal_pid method.
11594 (getpkt): Flush after debug output and use stderr.
11595 (outreg): Use collect_register_as_string.
11596 (new_thread_notify, dead_thread_notify): New functions.
11597 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11598 and general_thread.
11599 (look_up_one_symbol): Flush after debug output.
11600 * server.c (step_thread, server_waiting): New variables.
11601 (start_inferior): Don't use signal_pid. Update call to mywait.
11602 (attach_inferior): Update call to mywait.
11603 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11604 (main): Don't fetch/store registers explicitly. Use
11605 set_desired_inferior. Support proposed ``Hs'' packet. Update
11607 * server.h: Update.
11608 (struct inferior_list, struct_inferior_list_entry): New.
11609 * target.c (set_desired_inferior): New.
11610 (write_inferior_memory): Constify.
11611 (mywait): New function.
11612 * target.h: Update.
11613 (struct target_ops): New signal_pid method.
11614 (mywait): Removed macro, added prototype.
11616 * linux-low.h (regset_func): Removed.
11617 (regset_fill_func, regset_store_func): New.
11618 (enum regset_type): New.
11619 (struct regset_info): Add type field. Use new operation types.
11620 (struct linux_target_ops): stop_pc renamed to get_pc.
11621 Add decr_pc_after_break and breakpoint_at.
11622 (get_process, get_thread_proess, get_process_thread)
11623 (strut process_info, all_processes, linux_attach_lwp)
11624 (thread_db_init): New.
11626 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11627 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11628 (the_low_target): Add new members.
11629 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11630 (i386_store_fpxregset): Constify.
11631 (target_regsets): Add new kind identifier.
11632 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11633 (i386_set_pc): Add debugging.
11634 (i386_breakpoint_at): New function.
11635 (the_low_target): Add new members.
11636 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11637 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11638 (mips_breakpoint_at): New.
11639 (the_low_target): Add new members.
11640 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11641 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11642 (the_low_target): Add new members.
11643 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11644 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11645 (the_low_target): Add new members.
11646 * linux-x86-64-low.c (target_regsets): Add new kind
11649 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11651 From Martin Pool <mbp@samba.org>:
11652 * server.c (gdbserver_usage): New function.
11655 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11657 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11658 stop_at -> stop_pc.
11660 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11662 * Makefile.in: Remove obsolete code.
11664 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11666 * linux-low.c (regsets_fetch_inferior_registers),
11667 (regsets_store_inferior_registers): Removed cast to int from
11669 * regcache.h: Added declaration of struct inferior_info.
11671 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11673 * inferiors.c (struct inferior_info): Add regcache_data.
11674 (add_inferior): Call create_register_cache.
11675 (clear_inferiors): Call free_register_cache.
11676 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11677 * regcache.c (struct inferior_regcache_data): New.
11678 (registers): Remove.
11679 (get_regcache): New function.
11680 (create_register_cache, free_register_cache): New functions.
11681 (set_register_cache): Don't initialize the register cache here.
11682 (registers_to_string, registers_from_string, register_data): Call
11684 * regcache.h: Add prototypes.
11685 * server.h: Likewise.
11687 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11689 * mem-break.c: New file.
11690 * mem-break.h: New file.
11691 * Makefile.in: Add mem-break.o rule; update server.h
11693 * inferiors.c (struct inferior_info): Add target_data
11695 (clear_inferiors): Free target_data member if set.
11696 (inferior_target_data, set_inferior_target_data): New functions.
11697 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11698 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11699 * linux-low.c (linux_bp_reinsert): New variable.
11700 (struct inferior_linux_data): New.
11701 (linux_create_inferior): Use set_inferior_target_data.
11702 (linux_attach): Likewise. Call add_inferior.
11703 (linux_wait_for_one_inferior): New function.
11704 (linux_wait): Call it.
11705 (linux_write_memory): Add const.
11706 (initialize_low): Call set_breakpoint_data.
11707 * linux-low.h (struct linux_target_ops): Add breakpoint
11709 * server.c (attach_inferior): Remove extra add_inferior
11711 * server.h: Include mem-break.h. Update inferior.c
11713 * target.c (read_inferior_memory)
11714 (write_inferior_memory): New functions.
11715 * target.h (read_inferior_memory)
11716 (write_inferior_memory): Change macros to prototypes.
11717 (struct target_ops): Update comments. Add const to write_memory
11720 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11722 * linux-low.c (usr_store_inferior_registers): Support
11723 registers which are allowed to fail to store.
11724 * linux-low.h (linux_target_ops): Likewise.
11725 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11726 (ppc_cannot_store_register): FPSCR may not be storable.
11728 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11730 * server.h: Include <string.h> if HAVE_STRING_H.
11731 * ChangeLog: Correct paths in last ChangeLog entry.
11733 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11735 * linux-low.h: Remove obsolete prototypes.
11736 (struct linux_target_ops): New.
11737 (extern the_low_target): New.
11738 * linux-low.c (num_regs, regmap): Remove declarations.
11739 (register_addr): Use the_low_target explicitly.
11740 (fetch_register): Likewise.
11741 (usr_fetch_inferior_registers): Likewise.
11742 (usr_store_inferior_registers): Likewise.
11743 * linux-arm-low.c (num_regs): Remove.
11744 (arm_num_regs): Define.
11745 (arm_regmap): Renamed from regmap, made static.
11746 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11748 (arm_cannot_store_register): Renamed from cannot_store_register,
11750 (the_low_target): New.
11751 * linux-i386-low.c (num_regs): Remove.
11752 (i386_num_regs): Define.
11753 (i386_regmap): Renamed from regmap, made static.
11754 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11756 (i386_cannot_store_register): Renamed from cannot_store_register,
11758 (the_low_target): New.
11759 * linux-ia64-low.c (num_regs): Remove.
11760 (ia64_num_regs): Define.
11761 (ia64_regmap): Renamed from regmap, made static.
11762 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11764 (ia64_cannot_store_register): Renamed from cannot_store_register,
11766 (the_low_target): New.
11767 * linux-m68k-low.c (num_regs): Remove.
11768 (m68k_num_regs): Define.
11769 (m68k_regmap): Renamed from regmap, made static.
11770 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11772 (m68k_cannot_store_register): Renamed from cannot_store_register,
11774 (the_low_target): New.
11775 * linux-mips-low.c (num_regs): Remove.
11776 (mips_num_regs): Define.
11777 (mips_regmap): Renamed from regmap, made static.
11778 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11780 (mips_cannot_store_register): Renamed from cannot_store_register,
11782 (the_low_target): New.
11783 * linux-ppc-low.c (num_regs): Remove.
11784 (ppc_num_regs): Define.
11785 (ppc_regmap): Renamed from regmap, made static.
11786 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11788 (ppc_cannot_store_register): Renamed from cannot_store_register,
11790 (the_low_target): New.
11791 * linux-s390-low.c (num_regs): Remove.
11792 (s390_num_regs): Define.
11793 (s390_regmap): Renamed from regmap, made static.
11794 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11796 (s390_cannot_store_register): Renamed from cannot_store_register,
11798 (the_low_target): New.
11799 * linux-sh-low.c (num_regs): Remove.
11800 (sh_num_regs): Define.
11801 (sh_regmap): Renamed from regmap, made static.
11802 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11804 (sh_cannot_store_register): Renamed from cannot_store_register,
11806 (the_low_target): New.
11807 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11808 (the_low_target): New.
11810 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11812 * Makefile.in: Add stamp-h target.
11813 * configure.in: Create stamp-h.
11814 * configure: Regenerated.
11816 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11818 * inferiors.c: New file.
11819 * target.c: New file.
11820 * target.h: New file.
11821 * Makefile.in: Add target.o and inferiors.o. Update
11823 * linux-low.c (inferior_pid): New static variable,
11824 moved from server.c.
11825 (linux_create_inferior): Renamed from create_inferior.
11826 Call add_inferior. Return 0 on success instead of a PID.
11827 (linux_attach): Renamed from myattach.
11828 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11829 (linux_thread_alive): Renamed from mythread_alive.
11830 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11832 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11833 (regsets_store_inferior_registers): Correct error message.
11834 Add missing ``return 0''.
11835 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11836 (linux_store_registers): Renamed from store_inferior_registers.
11837 (linux_read_memory): Renamed from read_inferior_memory.
11838 (linux_write_memory): Renamed from write_inferior_memory.
11839 (linux_target_ops): New structure.
11840 (initialize_low): Call set_target_ops ().
11841 * remote-utils.c (unhexify): New function.
11842 (hexify): New function.
11843 (input_interrupt): Send signals to ``signal_pid''.
11844 * server.c (inferior_pid): Remove.
11845 (start_inferior): Update create_inferior call.
11846 (attach_inferior): Call add_inferior.
11847 (handle_query): New function.
11848 (main): Call handle_query for `q' packets.
11849 * server.h: Include "target.h". Remove obsolete prototypes.
11850 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11852 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11854 * Makefile.in: Add WARN_CFLAGS. Update configury
11856 * configure.in: Check for <string.h>
11857 * configure: Regenerate.
11858 * config.in: Regenerate.
11859 * gdbreplay.c: Include needed system headers.
11860 (remote_open): Remove strchr prototype.
11861 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11862 * regcache.c (supply_register): Change buf argument to const void *.
11863 (supply_register_by_name): Likewise.
11864 (collect_register): Change buf argument to void *.
11865 (collect_register_by_name): Likewise.
11866 * regcache.h: Add missing prototypes.
11867 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11868 * server.c (handle_query): New function.
11869 (attached): New static variable, moved out of main.
11870 (main): Quiet longjmp clobber warnings.
11871 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11872 * utils.c (error): Remove NORETURN.