1 2015-08-25 Yao Qi <yao.qi@linaro.org>
3 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6 2015-08-25 Yao Qi <yao.qi@linaro.org>
8 * linux-aarch64-low.c (debug_reg_change_callback): Use
11 2015-08-25 Yao Qi <yao.qi@linaro.org>
13 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
15 2015-08-25 Yao Qi <yao.qi@linaro.org>
17 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
19 2015-08-25 Yao Qi <yao.qi@linaro.org>
21 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
24 2015-08-25 Yao Qi <yao.qi@linaro.org>
26 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
28 (debug_reg_change_callback): Remove argument entry and add argument
29 lwp. Remove local variable thread. Don't print thread id in the
30 debugging output. Don't check whether pid of thread equals to pid.
31 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
32 iterate_over_lwps instead find_inferior.
34 2015-08-24 Pedro Alves <palves@redhat.com>
36 * inferiors.c (get_first_process): New function.
37 * inferiors.h (get_first_process): New declaration.
38 * remote-utils.c (read_ptid): Default to the first process in the
39 list, instead of to the current thread's process.
41 2015-08-24 Pedro Alves <palves@redhat.com>
43 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
44 * event-loop.c: Likewise.
45 * remote-utils.c: Likewise.
46 * tracepoint.c: Likewise.
48 2015-08-24 Pedro Alves <palves@redhat.com>
50 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
53 2015-08-21 Pedro Alves <palves@redhat.com>
55 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
58 2015-08-21 Pedro Alves <palves@redhat.com>
60 * tdesc.c (default_description): Explicitly zero-initialize.
62 2015-08-21 Pedro Alves <palves@redhat.com>
65 * inferiors.c (remove_thread): Discard any pending stop reply for
67 * server.c (remove_all_on_match_pid): Rename to ...
68 (remove_all_on_match_ptid): ... this. Work with a filter ptid
70 (discard_queued_stop_replies): Change parameter to a ptid. Now
72 (handle_v_kill, kill_inferior_callback, captured_main)
73 (process_serial_event): Adjust.
74 * server.h (discard_queued_stop_replies): Declare.
76 2015-08-21 Pedro Alves <palves@redhat.com>
78 * linux-low.c (wait_for_sigstop): Always switch to no thread
79 selected if the previously current thread dies.
80 * lynx-low.c (lynx_request_interrupt): Use the first thread's
81 process instead of the current thread's.
82 * remote-utils.c (input_interrupt): Don't check if there's no
84 * server.c (gdb_read_memory, gdb_write_memory): If setting the
85 current thread to the general thread fails, error out.
86 (handle_qxfer_auxv, handle_qxfer_libraries)
87 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
88 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
89 (handle_query): Check if there's a thread selected instead of
90 checking whether there's any thread in the thread list.
91 (handle_qxfer_threads, handle_qxfer_btrace)
92 (handle_qxfer_btrace_conf): Don't error out early if there's no
93 thread in the thread list.
94 (handle_v_cont, myresume): Don't set the current thread to the
96 (process_serial_event) <Hg handling>: Also set thread_id if the
97 previous general thread is still alive.
98 (process_serial_event) <g/G handling>: If setting the current
99 thread to the general thread fails, error out.
100 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
101 thread's lwp instead of the current thread's.
102 * target.c (set_desired_thread): If the desired thread was not
103 found, leave the current thread pointing to NULL. Return an int
104 (boolean) indicating success.
105 * target.h (set_desired_thread): Change return type to int.
107 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
109 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
110 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
112 (ps_get_thread_area): New function.
114 2015-08-19 Gary Benson <gbenson@redhat.com>
116 * hostio.c (handle_pread): Do not attempt to read more data
117 than hostio_reply_with_data can fit in a packet.
119 2015-08-18 Joel Brobecker <brobecker@adacore.com>
121 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
123 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
125 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
127 2015-08-06 Pedro Alves <palves@redhat.com>
129 * tracepoint.c (expr_eval_result): Now an int.
131 2015-08-06 Pedro Alves <palves@redhat.com>
133 * gdbthread.h (struct regcache): Forward declare.
134 (struct thread_info) <regcache_data>: Now a struct regcache
136 * inferiors.c (inferior_regcache_data)
137 (set_inferior_regcache_data): Now work with struct regcache
139 * inferiors.h (struct regcache): Forward declare.
140 (inferior_regcache_data, set_inferior_regcache_data): Now work
141 with struct regcache pointers.
142 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
143 (free_register_cache_thread): Remove struct regcache pointer
146 2015-08-06 Pedro Alves <palves@redhat.com>
148 * server.c (captured_main): On error, print the exception message
149 to stderr, and if run_once is set, throw a quit.
151 2015-08-06 Pedro Alves <palves@redhat.com>
153 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
156 2015-08-06 Pedro Alves <palves@redhat.com>
158 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
159 reading beyond the passed in buffer length.
161 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
163 * tracepoint.c (symbol_list) <required>: Remove.
165 2015-08-06 Pedro Alves <palves@redhat.com>
167 * linux-low.c (handle_extended_wait): Set the fork child's suspend
168 count if stopping and suspending threads.
169 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
170 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
171 (linux_detach): Complete an ongoing step-over.
172 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
174 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
175 (linux_wait_1): If passing a signal to the inferior after
176 finishing a step-over, unsuspend and re-resume all lwps. If we
177 see a single-step event but the thread should be continuing, don't
178 pass the trap to gdb.
179 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
180 internal_error instead of gdb_assert.
181 (enqueue_pending_signal): New function.
182 (check_ptrace_stopped_lwp_gone): Add debug output.
183 (start_step_over): Use internal_error instead of gdb_assert.
184 (complete_ongoing_step_over): New function.
185 (linux_resume_one_thread): Don't resume a suspended thread.
186 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
189 2015-08-06 Pedro Alves <palves@redhat.com>
191 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
192 (linux_thread_alive): Use lwp_is_marked_dead.
193 (extended_event_reported): Delete.
194 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
195 instead of extended_event_reported.
196 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
198 (lwp_is_marked_dead): New function.
199 (lwp_running): Use lwp_is_marked_dead.
200 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
203 2015-08-06 Pedro Alves <palves@redhat.com>
205 * linux-low.c (linux_wait_1): Move fork event output out of the
206 !report_to_gdb check. Pass event_child->waitstatus to
207 target_waitstatus_to_string instead of ourstatus.
209 2015-08-04 Yao Qi <yao.qi@linaro.org>
211 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
212 if current_thread is 32 bit.
214 2015-08-04 Yao Qi <yao.qi@linaro.org>
216 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
217 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
218 * server.c (extended_protocol): Remove "static".
219 * server.h (extended_protocol): Declare it.
221 2015-08-04 Yao Qi <yao.qi@linaro.org>
223 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
224 both aarch64 and aarch32.
225 (aarch64_set_pc): Likewise.
227 2015-08-04 Yao Qi <yao.qi@linaro.org>
229 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
230 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
231 arm-with-neon.xml to srv_xmlfiles.
232 * linux-aarch64-low.c: Include linux-aarch32-low.h.
233 (is_64bit_tdesc): New function.
234 (aarch64_linux_read_description): New function.
235 (aarch64_arch_setup): Call aarch64_linux_read_description.
236 (regs_info): Rename to regs_info_aarch64.
237 (aarch64_regs_info): Return right regs_info.
238 (initialize_low_arch): Call initialize_low_arch_aarch32.
240 2015-08-04 Yao Qi <yao.qi@linaro.org>
242 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
243 * linux-aarch32-low.c: New file.
244 * linux-aarch32-low.h: New file.
245 * linux-arm-low.c (arm_fill_gregset): Move it to
247 (arm_store_gregset): Likewise.
248 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
249 (arm_store_vfpregset): Call arm_store_vfpregset_num.
250 (arm_arch_setup): Check if PTRACE_GETREGSET works.
251 (regs_info): Rename to regs_info_arm.
252 (arm_regs_info): Return regs_info_aarch32 if
253 have_ptrace_getregset is 1 and target description is
254 arm_with_neon or arm_with_vfpv3.
255 (initialize_low_arch): Don't call init_registers_arm_with_neon.
256 Call initialize_low_arch_aarch32 instead.
258 2015-08-04 Yao Qi <yao.qi@linaro.org>
260 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
261 * linux-low.c: ... here.
262 * linux-low.h (have_ptrace_getregset): Declare it.
264 2015-08-04 Pedro Alves <palves@redhat.com>
266 * thread-db.c (struct thread_db): Use new typedefs.
267 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
269 (disable_thread_event_reporting): Cast result of dlsym to
270 destination function pointer type.
271 (thread_db_mourn): Use td_ta_delete_ftype.
273 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
275 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
277 (CDX_BREAKPOINT): Define for R2.
278 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
279 (the_low_target): Add comments.
281 2015-07-30 Yao Qi <yao.qi@linaro.org>
283 * linux-arm-low.c (arm_hwcap): Remove it.
284 (arm_read_description): New local variable arm_hwcap. Don't
285 set arm_hwcap to zero.
287 2015-07-30 Yao Qi <yao.qi@linaro.org>
289 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
290 Use regcache->tdesc instead.
291 (arm_store_wmmxregset): Likewise.
292 (arm_fill_vfpregset): Likewise.
293 (arm_store_vfpregset): Likewise.
295 2015-07-30 Yao Qi <yao.qi@linaro.org>
297 * linux-arm-low.c: Include arch/arm.h.
298 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
299 (arm_store_gregset): Likewise.
301 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
303 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
304 ptrace's 4th parameter.
306 2015-07-27 Yao Qi <yao.qi@linaro.org>
308 * configure.srv (case aarch64*-*-linux*): Don't set
311 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
313 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
315 * linux-arm-low.c: Likewise.
316 * linux-cris-low.c: Likewise.
317 * linux-crisv32-low.c: Likewise.
318 * linux-low.c: Likewise.
319 * linux-m68k-low.c: Likewise.
320 * linux-mips-low.c: Likewise.
321 * linux-nios2-low.c: Likewise.
322 * linux-s390-low.c: Likewise.
323 * linux-sparc-low.c: Likewise.
324 * linux-tic6x-low.c: Likewise.
325 * linux-tile-low.c: Likewise.
326 * linux-x86-low.c: Likewise.
328 2015-07-24 Pedro Alves <palves@redhat.com>
330 * config.in: Regenerate.
331 * configure: Regenerate.
333 2015-07-24 Pedro Alves <palves@redhat.com>
335 * acinclude.m4: Include ../ptrace.m4.
336 * configure.ac: Call GDB_AC_PTRACE.
337 * config.in, configure: Regenerate.
339 2015-07-24 Yao Qi <yao.qi@linaro.org>
341 * linux-low.c (linux_create_inferior): Remove setting to
342 proc->priv->new_inferior.
343 (linux_attach): Likewise.
344 (linux_low_filter_event): Likewise.
345 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
347 2015-07-24 Yao Qi <yao.qi@linaro.org>
349 * linux-low.c (linux_arch_setup): New function.
350 (linux_low_filter_event): If proc->tdesc is NULL and
351 proc->attached is true, call the_low_target.arch_setup.
352 Otherwise, keep status pending, and return.
353 (linux_resume_one_lwp_throw): Don't call get_pc if
354 thread->while_stepping isn't NULL. Don't call
355 get_thread_regcache if proc->tdesc is NULL.
356 (need_step_over_p): Return 0 if proc->tdesc is NULL.
357 (linux_target_ops): Install arch_setup.
358 * server.c (start_inferior): Call the_target->arch_setup.
359 * target.h (struct target_ops) <arch_setup>: New field.
360 (target_arch_setup): New marco.
361 * lynx-low.c (lynx_target_ops): Update.
362 * nto-low.c (nto_target_ops): Update.
363 * spu-low.c (spu_target_ops): Update.
364 * win32-low.c (win32_target_ops): Update.
366 2015-07-24 Yao Qi <yao.qi@linaro.org>
368 * linux-low.c (linux_add_process): Don't set
369 proc->priv->new_inferior.
370 (linux_create_inferior): Set proc->priv->new_inferior to 1.
371 (linux_attach): Likewise.
373 2015-07-24 Yao Qi <yao.qi@linaro.org>
375 * server.c (start_inferior): Code refactor.
377 2015-07-24 Yao Qi <yao.qi@linaro.org>
379 * server.c (process_serial_event): Set general_thread.
381 2015-07-21 Yao Qi <yao.qi@linaro.org>
383 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
384 aarch64_linux_get_debug_reg_capacity.
386 2015-07-17 Yao Qi <yao.qi@linaro.org>
388 * Makefile.in (aarch64-linux-hw-point.o): New rule.
389 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
390 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
391 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
392 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
393 (AARCH64_HWP_ALIGNMENT): Likewise.
394 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
395 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
396 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
397 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
398 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
399 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
400 (struct aarch64_debug_reg_state): Likewise.
401 (struct arch_lwp_info): Likewise.
402 (aarch64_align_watchpoint): Likewise.
403 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
404 (aarch64_watchpoint_length): Likewise.
405 (aarch64_point_encode_ctrl_reg): Likewise
406 (aarch64_point_is_aligned): Likewise.
407 (aarch64_align_watchpoint): Likewise.
408 (aarch64_linux_set_debug_regs):
409 (aarch64_dr_state_insert_one_point): Likewise.
410 (aarch64_dr_state_remove_one_point): Likewise.
411 (aarch64_handle_breakpoint): Likewise.
412 (aarch64_handle_aligned_watchpoint): Likewise.
413 (aarch64_handle_unaligned_watchpoint): Likewise.
414 (aarch64_handle_watchpoint): Likewise.
416 2015-07-17 Yao Qi <yao.qi@linaro.org>
418 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
419 and don't aarch64_get_debug_reg_state. All callers update.
420 (aarch64_handle_aligned_watchpoint): Likewise.
421 (aarch64_handle_unaligned_watchpoint): Likewise.
422 (aarch64_handle_watchpoint): Likewise.
423 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
424 (aarch64_remove_point): Likewise.
426 2015-07-17 Yao Qi <yao.qi@linaro.org>
428 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
430 (aarch64_handle_unaligned_watchpoint): Likewise.
432 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
434 Revert the previous 3 commits:
435 Move gdb_regex* to common/
436 Move linux_find_memory_regions_full & co.
437 gdbserver build-id attribute generator
439 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
440 Jan Kratochvil <jan.kratochvil@redhat.com>
442 gdbserver build-id attribute generator.
443 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
444 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
445 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
447 (get_dynamic): Use find_pdhr to traverse program headers.
448 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
449 (compare_mapping_entry_range, struct find_memory_region_callback_data)
450 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
451 (get_hex_build_id): New.
452 (linux_qxfer_libraries_svr4): Add optional build-id attribute
453 to reply XML document.
455 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
456 Jan Kratochvil <jan.kratochvil@redhat.com>
458 * target.c: Include target/target-utils.h and fcntl.h.
459 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
460 (target_fileio_read_stralloc): New functions.
462 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
464 * Makefile.in (OBS): Add gdb_regex.o.
466 * config.in: Rebuilt.
467 * configure: Rebuilt.
469 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
470 Jan Kratochvil <jan.kratochvil@redhat.com>
472 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
473 * Makefile.in (OBS): Add target-utils.o.
474 (linux-maps.o, target-utils.o): New.
475 * configure.srv (srv_linux_obj): Add linux-maps.o.
477 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
479 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
481 (the_low_target): Install it.
483 2015-07-14 Pedro Alves <palves@redhat.com>
485 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
486 Instead, ignore ECHILD, and throw an error for other errnos.
488 2015-07-10 Pedro Alves <palves@redhat.com>
490 * event-loop.c (struct callback_event) <data>: Change type to
491 gdb_client_data instance instead of gdb_client_data pointer.
492 (append_callback_event): Adjust.
494 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
496 * linux-aarch64-low.c: Add comments for each linux_target_ops
497 method. Remove comments already covered in target_ops and
498 linux_target_ops definitions.
499 (the_low_target): Add comments for each unimplemented method.
501 2015-07-09 Yao Qi <yao.qi@linaro.org>
503 * linux-aarch64-low.c (aarch64_regmap): Remove.
504 (aarch64_usrregs_info): Remove.
505 (regs_info): Set field usrregs to NULL.
507 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
509 * linux-low.c: Include "rsp-low.h"
510 (linux_low_encode_pt_config, linux_low_encode_raw): New.
511 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
512 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
513 (handle_btrace_enable_pt): New.
514 (handle_btrace_general_set): Support "pt".
515 (handle_btrace_conf_general_set): Support "pt:size".
517 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
519 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
522 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
524 * linux-aarch64-low.c: Remove comment about endianness.
525 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
526 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
529 2015-06-24 Gary Benson <gbenson@redhat.com>
531 * linux-i386-ipa.c (stdint.h): Do not include.
532 * lynx-i386-low.c (stdint.h): Likewise.
533 * lynx-ppc-low.c (stdint.h): Likewise.
534 * mem-break.c (stdint.h): Likewise.
535 * thread-db.c (stdint.h): Likewise.
536 * tracepoint.c (stdint.h): Likewise.
537 * win32-low.c (stdint.h): Likewise.
539 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
541 * server.c (write_qxfer_response): Update call to
542 remote_escape_output.
544 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
545 Jan Kratochvil <jan.kratochvil@redhat.com>
547 Merge multiple hex conversions.
548 * gdbreplay.c (tohex): Rename to 'fromhex'.
549 (logchar): Use fromhex.
551 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
553 * server.c (handle_qxfer_libraries): Set `version' attribute for
556 2015-06-10 Gary Benson <gbenson@redhat.com>
558 * target.h (struct target_ops) <multifs_open>: New field.
559 <multifs_unlink>: Likewise.
560 <multifs_readlink>: Likewise.
561 * linux-low.c (nat/linux-namespaces.h): New include.
562 (linux_target_ops): Initialize the_target->multifs_open,
563 the_target->multifs_unlink and the_target->multifs_readlink.
564 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
565 * hostio.c (hostio_fs_pid): New static variable.
566 (hostio_handle_new_gdb_connection): New function.
567 (handle_setfs): Likewise.
568 (handle_open): Use the_target->multifs_open as appropriate.
569 (handle_unlink): Use the_target->multifs_unlink as appropriate.
570 (handle_readlink): Use the_target->multifs_readlink as
572 (handle_vFile): Handle vFile:setfs packets.
573 * server.c (handle_query): Call hostio_handle_new_gdb_connection
574 after target_handle_new_gdb_connection.
576 2015-06-10 Gary Benson <gbenson@redhat.com>
578 * configure.ac (AC_CHECK_FUNCS): Add setns.
579 * config.in: Regenerate.
580 * configure: Likewise.
581 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
582 (linux-namespaces.o): New rule.
583 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
585 2015-06-09 Gary Benson <gbenson@redhat.com>
587 * hostio.c (handle_open): Process mode argument with
590 2015-06-01 Yao Qi <yao.qi@linaro.org>
592 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
593 * linux-x86-low.c: Likewise.
595 2015-05-28 Don Breazeal <donb@codesourcery.com>
597 * linux-low.c (handle_extended_wait): Initialize
598 thread_info.last_resume_kind for new fork children.
600 2015-05-15 Pedro Alves <palves@redhat.com>
602 * target.h (target_handle_new_gdb_connection): Rewrite using if
605 2015-05-14 Joel Brobecker <brobecker@adacore.com>
607 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
608 * configure, config.in: Regenerate.
609 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
612 2015-05-12 Don Breazeal <donb@codesourcery.com>
614 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
615 PTRACE_EVENT_VFORK_DONE.
616 (linux_low_ptrace_options, extended_event_reported): Add vfork
618 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
619 and "vforkdone" for RSP 'T' Stop Reply Packet.
620 * server.h (report_vfork_events): Declare
623 2015-05-12 Don Breazeal <donb@codesourcery.com>
625 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
626 (the_low_target) <new_fork>: Initialize new member.
627 * linux-arm-low.c (arm_new_fork): New function.
628 (the_low_target) <new_fork>: Initialize new member.
629 * linux-low.c (handle_extended_wait): Call new target function
631 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
632 * linux-mips-low.c (mips_add_watchpoint): New function
633 extracted from mips_insert_point.
634 (the_low_target) <new_fork>: Initialize new member.
635 (mips_linux_new_fork): New function.
636 (mips_insert_point): Call mips_add_watchpoint.
637 * linux-x86-low.c (x86_linux_new_fork): New function.
638 (the_low_target) <new_fork>: Initialize new member.
640 2015-05-12 Don Breazeal <donb@codesourcery.com>
642 * linux-low.c (handle_extended_wait): Implement return value,
643 rename argument 'event_child' to 'event_lwp', handle
644 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
645 (linux_low_ptrace_options): New function.
646 (linux_low_filter_event): Call linux_low_ptrace_options,
647 use different argument fo linux_enable_event_reporting,
648 use return value from handle_extended_wait.
649 (extended_event_reported): New function.
650 (linux_wait_1): Call extended_event_reported and set
651 status to report fork events.
652 (linux_write_memory): Add pid to debug message.
653 (reset_lwp_ptrace_options_callback): New function.
654 (linux_handle_new_gdb_connection): New function.
655 (linux_target_ops): Initialize new structure member.
656 * linux-low.h (struct lwp_info) <waitstatus>: New member.
657 * lynx-low.c: Initialize new structure member.
658 * remote-utils.c (prepare_resume_reply): Implement stop reason
659 "fork" for "T" stop message.
660 * server.c (handle_query): Call handle_new_gdb_connection.
661 * server.h (report_fork_events): Declare global flag.
662 * target.h (struct target_ops) <handle_new_gdb_connection>:
664 (target_handle_new_gdb_connection): New macro.
665 * win32-low.c: Initialize new structure member.
667 2015-05-12 Don Breazeal <donb@codesourcery.com>
669 * mem-break.c (APPEND_TO_LIST): Define macro.
670 (clone_agent_expr): New function.
671 (clone_one_breakpoint): New function.
672 (clone_all_breakpoints): New function.
673 * mem-break.h: Declare new functions.
675 2015-05-12 Don Breazeal <donb@codesourcery.com>
677 * linux-low.c (linux_supports_fork_events): New function.
678 (linux_supports_vfork_events): New function.
679 (linux_target_ops): Initialize new structure members.
680 (initialize_low): Call linux_check_ptrace_features.
681 * lynx-low.c (lynx_target_ops): Initialize new structure
683 * server.c (report_fork_events, report_vfork_events):
685 (handle_query): Add new features to qSupported packet and
687 (captured_main): Initialize new global variables.
688 * target.h (struct target_ops) <supports_fork_events>:
690 <supports_vfork_events>: New member.
691 (target_supports_fork_events): New macro.
692 (target_supports_vfork_events): New macro.
693 * win32-low.c (win32_target_ops): Initialize new structure
696 2015-05-12 Gary Benson <gbenson@redhat.com>
698 * server.c (handle_qxfer_exec_file): Use current process
701 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
703 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
704 Remove HAVE_PTRACE_GETREGS conditionals.
705 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
706 instead of PTRACE_GETREGS and PTRACE_SETREGS.
708 2015-05-08 Yao Qi <yao.qi@linaro.org>
710 * linux-low.c (linux_supports_conditional_breakpoints): New
712 (linux_target_ops): Install new target method.
713 * lynx-low.c (lynx_target_ops): Install NULL hook for
714 supports_conditional_breakpoints.
715 * nto-low.c (nto_target_ops): Likewise.
716 * spu-low.c (spu_target_ops): Likewise.
717 * win32-low.c (win32_target_ops): Likewise.
718 * server.c (handle_query): Check
719 target_supports_conditional_breakpoints.
720 * target.h (struct target_ops) <supports_conditional_breakpoints>:
722 (target_supports_conditional_breakpoints): New macro.
724 2015-05-06 Pedro Alves <palves@redhat.com>
727 * server.c (start_inferior): If the process exits, mourn it.
729 2015-04-21 Gary Benson <gbenson@redhat.com>
731 * hostio.c (fileio_open_flags_to_host): Factored out to
732 fileio_to_host_openflags in common/fileio.c. Single use
735 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
737 * linux-xtensa-low.c (xtensa_fill_gregset)
738 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
741 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
743 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
744 (regs_info): Replace usrregs pointer with NULL.
746 2015-04-17 Gary Benson <gbenson@redhat.com>
748 * target.h (struct target_ops) <pid_to_exec_file>: New field.
749 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
750 * server.c (handle_qxfer_exec_file): New function.
751 (qxfer_packets): Add exec-file entry.
752 (handle_query): Report qXfer:exec-file:read as supported packet.
754 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
756 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
758 2015-04-09 Gary Benson <gbenson@redhat.com>
760 * hostio-errno.c (errno_to_fileio_error): Remove function.
761 Update caller to use remote_fileio_to_fio_error.
763 2015-04-09 Yao Qi <yao.qi@linaro.org>
765 * linux-low.c (linux_insert_point): Call
766 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
767 (linux_remove_point): Call remove_memory_breakpoint if type is
769 * linux-x86-low.c (x86_insert_point): Don't call
770 insert_memory_breakpoint.
771 (x86_remove_point): Don't call remove_memory_breakpoint.
773 2015-04-01 Pedro Alves <palves@redhat.com>
774 Cleber Rosa <crosa@redhat.com>
776 * server.c (gdbserver_usage): Reorganize and extend the usage
779 2015-03-24 Pedro Alves <palves@redhat.com>
781 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
782 output. Also dump TRAP_TRACE.
783 (linux_low_filter_event): In debug output, distinguish a
784 resume_stop SIGSTOP from a delayed SIGSTOP.
786 2015-03-24 Gary Benson <gbenson@redhat.com>
788 * linux-x86-low.c (x86_linux_new_thread): Moved to
790 (x86_linux_prepare_to_resume): Likewise.
792 2015-03-24 Gary Benson <gbenson@redhat.com>
794 * Makefile.in (x86-linux-dregs.o): New rule.
795 * configure.srv: Add x86-linux-dregs.o to relevant targets.
796 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
797 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
798 (x86_linux_dr_get): Likewise.
799 (x86_linux_dr_set): Likewise.
800 (update_debug_registers_callback): Likewise.
801 (x86_linux_dr_set_addr): Likewise.
802 (x86_linux_dr_get_addr): Likewise.
803 (x86_linux_dr_set_control): Likewise.
804 (x86_linux_dr_get_control): Likewise.
805 (x86_linux_dr_get_status): Likewise.
806 (x86_linux_update_debug_registers): Likewise.
808 2015-03-24 Gary Benson <gbenson@redhat.com>
810 * linux-x86-low.c (x86_linux_update_debug_registers):
811 New function, factored out from...
812 (x86_linux_prepare_to_resume): ...this.
814 2015-03-24 Gary Benson <gbenson@redhat.com>
816 * linux-x86-low.c (x86_linux_dr_get): Update comments.
817 (x86_linux_dr_set): Likewise.
818 (update_debug_registers_callback): Likewise.
819 (x86_linux_dr_set_addr): Likewise.
820 (x86_linux_dr_get_addr): Likewise.
821 (x86_linux_dr_set_control): Likewise.
822 (x86_linux_dr_get_control): Likewise.
823 (x86_linux_dr_get_status): Likewise.
824 (x86_linux_prepare_to_resume): Likewise.
826 2015-03-24 Gary Benson <gbenson@redhat.com>
828 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
829 Use perror_with_name. Pass string through gettext.
830 (x86_linux_dr_set): Likewise.
832 2015-03-24 Gary Benson <gbenson@redhat.com>
834 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
835 (x86_linux_dr_set_addr): ...this.
836 (x86_dr_low_get_addr): Rename to...
837 (x86_linux_dr_get_addr): ...this.
838 (x86_dr_low_set_control): Rename to...
839 (x86_linux_dr_set_control): ...this.
840 (x86_dr_low_get_control): Rename to...
841 (x86_linux_dr_get_control): ...this.
842 (x86_dr_low_get_status): Rename to...
843 (x86_linux_dr_get_status): ...this.
844 (x86_dr_low): Update with new function names.
846 2015-03-24 Gary Benson <gbenson@redhat.com>
848 * Makefile.in (x86-linux.o): New rule.
849 * configure.srv: Add x86-linux.o to relevant targets.
850 * linux-low.c (lwp_set_arch_private_info): New function.
851 (lwp_arch_private_info): Likewise.
852 * linux-x86-low.c: Include nat/x86-linux.h.
853 (arch_lwp_info): Removed structure.
854 (update_debug_registers_callback):
855 Use lwp_set_debug_registers_changed.
856 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
857 and lwp_set_debug_registers_changed.
858 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
860 2015-03-24 Gary Benson <gbenson@redhat.com>
862 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
863 * linux-arm-low.c (arm_new_thread): Likewise.
864 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
865 * linux-mips-low.c (mips_linux_new_thread): Likewise.
866 * linux-x86-low.c (x86_linux_new_thread): Likewise.
867 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
869 2015-03-24 Gary Benson <gbenson@redhat.com>
871 * linux-low.c (ptid_of_lwp): New function.
872 (lwp_is_stopped): Likewise.
873 (lwp_stop_reason): Likewise.
874 * linux-x86-low.c (update_debug_registers_callback):
876 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
879 2015-03-24 Gary Benson <gbenson@redhat.com>
881 * linux-low.h (linux_stop_lwp): Remove declaration.
883 2015-03-24 Gary Benson <gbenson@redhat.com>
885 * linux-low.h: Include nat/linux-nat.h.
886 * linux-low.c (iterate_over_lwps_args): New structure.
887 (iterate_over_lwps_filter): New function.
888 (iterate_over_lwps): Likewise.
889 * linux-x86-low.c (update_debug_registers_callback):
890 Update signature to what iterate_over_lwps expects.
891 Remove PID check that iterate_over_lwps now performs.
892 (x86_dr_low_set_addr): Use iterate_over_lwps.
893 (x86_dr_low_set_control): Likewise.
895 2015-03-24 Gary Benson <gbenson@redhat.com>
897 * linux-x86-low.c (x86_debug_reg_state): New function.
898 (x86_linux_prepare_to_resume): Use the above.
900 2015-03-24 Gary Benson <gbenson@redhat.com>
902 * linux-low.c (current_lwp_ptid): New function.
903 * linux-x86-low.c: Include nat/linux-nat.h.
904 (x86_dr_low_get_addr): Use current_lwp_ptid.
905 (x86_dr_low_get_control): Likewise.
906 (x86_dr_low_get_status): Likewise.
908 2015-03-20 Pedro Alves <palves@redhat.com>
910 * tracepoint.c (cmd_qtstatus): Make "str" const.
912 2015-03-20 Pedro Alves <palves@redhat.com>
914 * server.c (handle_general_set): Make "req_str" const.
916 2015-03-19 Pedro Alves <palves@redhat.com>
918 * linux-low.c (linux_resume_one_lwp): Rename to ...
919 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
920 instead call perror_with_name.
921 (check_ptrace_stopped_lwp_gone): New function.
922 (linux_resume_one_lwp): Reimplement as wrapper around
923 linux_resume_one_lwp_throw that swallows errors if the LWP is
926 2015-03-19 Pedro Alves <palves@redhat.com>
928 * linux-low.c (count_events_callback, select_event_lwp_callback):
929 No longer check whether the thread has resume_stop as last resume
932 2015-03-19 Pedro Alves <palves@redhat.com>
934 * linux-low.c (count_events_callback, select_event_lwp_callback):
935 Use the lwp's status_pending_p field, not the thread's.
937 2015-03-19 Pedro Alves <palves@redhat.com>
939 * linux-low.c (select_event_lwp_callback): Update comments to
940 no longer mention SIGTRAP.
942 2015-03-18 Gary Benson <gbenson@redhat.com>
944 * server.c (handle_query): Do not report vFile:fstat as supported.
946 2015-03-11 Gary Benson <gbenson@redhat.com>
948 * hostio.c (sys/types.h): New include.
949 (sys/stat.h): Likewise.
950 (common-remote-fileio.h): Likewise.
951 (handle_fstat): New function.
952 (handle_vFile): Handle vFile:fstat packets.
954 2015-03-11 Gary Benson <gbenson@redhat.com>
956 * configure.ac (AC_CHECK_MEMBERS): Add checks for
957 struct stat.st_blocks and struct stat.st_blksize.
958 * configure: Regenerate.
959 * config.in: Likewise.
960 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
961 (OBS): Add common-remote-fileio.o.
962 (common-remote-fileio.o): New rule.
964 2015-03-09 Pedro Alves <palves@redhat.com>
966 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
967 'struct sockaddr' pointer in 'accept' call.
969 2015-03-09 Pedro Alves <palves@redhat.com>
972 2015-03-07 Pedro Alves <palves@redhat.com>
973 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
974 or <winsock2.h> here. Instead include "gdb_socket.h".
975 (remote_open): Use union gdb_sockaddr_u.
976 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
977 or <winsock2.h> here. Instead include "gdb_socket.h".
978 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
979 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
981 (init_named_socket, gdb_agent_helper_thread): Use union
984 2015-03-07 Pedro Alves <palves@redhat.com>
986 * configure.ac (build_warnings): Move
987 -Wdeclaration-after-statement to the C-specific set.
988 * configure: Regenerate.
990 2015-03-07 Pedro Alves <palves@redhat.com>
992 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
993 or <winsock2.h> here. Instead include "gdb_socket.h".
994 (remote_open): Use union gdb_sockaddr_u.
995 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
996 or <winsock2.h> here. Instead include "gdb_socket.h".
997 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
998 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1000 (init_named_socket, gdb_agent_helper_thread): Use union
1003 2015-03-07 Pedro Alves <palves@redhat.com>
1005 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1008 2015-03-06 Yao Qi <yao.qi@linaro.org>
1010 * linux-aarch64-low.c (aarch64_insert_point): Use
1011 show_debug_regs as a boolean.
1012 (aarch64_remove_point): Likewise.
1014 2015-03-05 Pedro Alves <palves@redhat.com>
1016 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1017 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1018 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1019 * nto-low.c (nto_target_ops): Likewise.
1020 * spu-low.c (spu_target_ops): Likewise.
1021 * win32-low.c (win32_target_ops): Likewise.
1023 2015-03-04 Pedro Alves <palves@redhat.com>
1025 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1026 Decide whether a breakpoint triggered based on the SIGTRAP's
1028 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1029 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1030 (linux_low_filter_event): Check for breakpoints before checking
1032 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1034 (linux_stopped_by_sw_breakpoint)
1035 (linux_supports_stopped_by_sw_breakpoint)
1036 (linux_stopped_by_hw_breakpoint)
1037 (linux_supports_stopped_by_hw_breakpoint): New functions.
1038 (linux_target_ops): Install new target methods.
1040 2015-03-04 Pedro Alves <palves@redhat.com>
1042 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1043 * server.c (swbreak_feature, hwbreak_feature): New globals.
1044 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1045 (captured_main): Clear swbreak_feature and hwbreak_feature.
1046 * server.h (swbreak_feature, hwbreak_feature): Declare.
1047 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1048 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1049 supports_stopped_by_hw_breakpoint>: New fields.
1050 (target_supports_stopped_by_sw_breakpoint)
1051 (target_stopped_by_sw_breakpoint)
1052 (target_supports_stopped_by_hw_breakpoint)
1053 (target_stopped_by_hw_breakpoint): Declare.
1055 2015-03-04 Pedro Alves <palves@redhat.com>
1057 enum lwp_stop_reason -> enum target_stop_reason
1058 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1059 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1060 (linux_wait_1, stuck_in_jump_pad_callback)
1061 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1062 (linux_stopped_by_watchpoint):
1063 * linux-low.h (enum lwp_stop_reason): Delete.
1064 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1065 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1067 2015-03-04 Yao Qi <yao.qi@linaro.org>
1069 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1071 2015-03-03 Gary Benson <gbenson@redhat.com>
1073 * hostio.c (handle_vFile): Fix prefix lengths.
1075 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1077 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1080 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1082 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1083 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1084 (clean): Add "rm -f" for above C files.
1085 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1086 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1087 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1088 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1089 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1090 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1091 (init_registers_s390x_vx_linux64)
1092 (init_registers_s390x_tevx_linux64)
1093 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1094 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1096 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1097 (s390_store_vxrs_high): New functions.
1098 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1100 (s390_arch_setup): Add logic for selecting one of the new target
1101 descriptions. Activate the new vector regsets if applicable.
1102 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1103 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1104 and init_registers_s390x_tevx_linux64.
1106 2015-03-01 Pedro Alves <palves@redhat.com>
1108 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1111 2015-02-27 Pedro Alves <palves@redhat.com>
1113 * linux-x86-low.c (u_debugreg_offset): New function.
1114 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1116 2015-02-27 Pedro Alves <palves@redhat.com>
1118 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1119 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1120 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1121 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1122 (ps_lsetfpregs, ps_getpid)
1123 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1124 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1125 (ps_lsetxregs, ps_plog): Declare.
1127 2015-02-27 Pedro Alves <palves@redhat.com>
1129 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1130 IP_AGENT_EXPORT_FUNC.
1131 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1132 IP_AGENT_EXPORT_FUNC.
1133 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1134 (IP_AGENT_EXPORT): Delete.
1135 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1136 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1137 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1138 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1139 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1140 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1141 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1142 (traceframe_read_count, traceframe_write_count)
1143 (traceframes_created, trace_state_variables, get_raw_reg)
1144 (get_trace_state_variable_value, set_trace_state_variable_value)
1145 (ust_loaded, helper_thread_id, cmd_buf): Use
1146 IPA_SYM_EXPORTED_NAME.
1147 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1148 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1149 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1150 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1151 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1152 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1153 EXTERN_C_PUSH/EXTERN_C_POP.
1154 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1155 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1156 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1157 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1158 (traceframe_write_count, traceframe_read_count)
1159 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1160 (about_to_request_buffer_space, get_trace_state_variable_value)
1161 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1162 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1163 EXTERN_C_PUSH/EXTERN_C_POP.
1164 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1165 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1166 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1167 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1168 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1169 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1170 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1171 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1173 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1174 (IP_AGENT_EXPORT_VAR_DECL): Define.
1176 (gdb_agent_get_raw_reg): Declare.
1178 2015-02-27 Tom Tromey <tromey@redhat.com>
1179 Pedro Alves <palves@redhat.com>
1181 Rename symbols whose names are reserved C++ keywords throughout.
1183 2015-02-27 Pedro Alves <palves@redhat.com>
1185 * Makefile.in (COMPILER): New, get it from autoconf.
1186 (CXX): Get from autoconf instead.
1187 (COMPILE.pre): Use COMPILER.
1188 (CC-LD): Rename to ...
1189 (CC_LD): ... this. Use COMPILER.
1190 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1191 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1192 * acinclude.m4: Include build-with-cxx.m4.
1193 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1194 Disable -Werror by default if building in C++ mode.
1195 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1196 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1197 the C++ compiler. Save/restore CXXFLAGS too.
1198 * configure: Regenerate.
1200 2015-02-27 Pedro Alves <palves@redhat.com>
1202 * acinclude.m4: Include libiberty.m4.
1203 * configure.ac: Call libiberty_INIT.
1204 * config.in, configure: Regenerate.
1206 2015-02-26 Pedro Alves <palves@redhat.com>
1208 * linux-low.c (linux_wait_1): When incrementing the PC past a
1209 program breakpoint always use the_low_target.breakpoint_len as
1210 increment, rather than the maximum between that and
1211 the_low_target.decr_pc_after_break.
1213 2015-02-23 Pedro Alves <palves@redhat.com>
1215 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1216 thread was doing a step-over; always adjust the PC if
1217 we stepped over a permanent breakpoint.
1218 (linux_wait_1): If we stepped over breakpoint that was on top of a
1219 permanent breakpoint, manually advance the PC past it.
1221 2015-02-23 Pedro Alves <palves@redhat.com>
1223 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1225 (x86_fill_gregset, x86_store_gregset): Use it when handling
1228 2015-02-20 Pedro Alves <palves@redhat.com>
1230 * thread-db.c: Include "nat/linux-procfs.h".
1231 (thread_db_init): Skip listing new threads if the kernel supports
1232 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1234 2015-02-20 Pedro Alves <palves@redhat.com>
1236 * linux-low.c (status_pending_p_callback): Use ptid_match.
1238 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1240 PR breakpoints/16812
1241 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1242 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1243 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1245 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1247 PR breakpoints/15956
1248 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1250 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1252 * linux-low.c (linux_low_btrace_conf): Print size.
1253 * server.c (handle_btrace_conf_general_set): New.
1254 (hanle_general_set): Call handle_btrace_conf_general_set.
1255 (handle_query): Report Qbtrace-conf:bts:size as supported.
1257 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1259 * linux-low.c (linux_low_enable_btrace): Update parameters.
1260 (linux_low_btrace_conf): New.
1261 (linux_target_ops)<to_btrace_conf>: Initialize.
1262 * server.c (current_btrace_conf): New.
1263 (handle_btrace_enable): Rename to ...
1264 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
1265 to target_enable_btrace. Update comment. Update users.
1266 (handle_qxfer_btrace_conf): New.
1267 (qxfer_packets): Add btrace-conf entry.
1268 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1269 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1270 (target_ops)<read_btrace_conf>: New.
1271 (target_enable_btrace): Update parameters.
1272 (target_read_btrace_conf): New.
1274 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1276 * server.c (handle_btrace_general_set): Remove call to
1277 target_supports_btrace.
1278 (supported_btrace_packets): New.
1279 (handle_query): Call supported_btrace_packets.
1280 * target.h: include btrace-common.h.
1281 (btrace_target_info): Removed.
1282 (supports_btrace, target_supports_btrace): Update parameters.
1284 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1286 * Makefile.in (SFILES): Add common/btrace-common.c.
1287 (OBS): Add common/btrace-common.o.
1288 (btrace-common.o): Add build rules.
1289 * linux-low: Include btrace-common.h.
1290 (linux_low_read_btrace): Use struct btrace_data. Call
1291 btrace_data_init and btrace_data_fini.
1293 2015-02-06 Pedro Alves <palves@redhat.com>
1295 * thread-db.c (find_new_threads_callback): Add debug output.
1297 2015-02-04 Pedro Alves <palves@redhat.com>
1299 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1300 (resume_stopped_resumed_lwps): New function.
1301 (linux_wait_for_event_filtered): Use it.
1303 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1305 * Makefile.in (SFILES): Add linux-personality.c.
1306 (linux-personality.o): New rule.
1307 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1308 list of objects to be built.
1309 * linux-low.c: Include nat/linux-personality.h.
1310 (linux_create_inferior): Remove code to disable address space
1311 randomization (moved to ../nat/linux-personality.c). Create
1312 cleanup to disable address space randomization.
1314 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1316 * Makefile.in (posix-strerror.o): New rule.
1317 (mingw-strerror.o): Likewise.
1318 * configure: Regenerated.
1319 * configure.ac: Source file ../common/common.host. Initialize new
1320 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1322 2015-01-14 Yao Qi <yao@codesourcery.com>
1324 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1325 (ppc-linux.o): New rule.
1326 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1327 * configure.ac: AC_CHECK_FUNCS(getauxval).
1328 * config.in: Re-generated.
1329 * configure: Re-generated.
1330 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1331 ppc64_64bit_inferior_p
1333 2015-01-14 Yao Qi <yao@codesourcery.com>
1335 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1336 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1337 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1338 (PT_ORIG_R3, PT_TRAP): Likewise.
1339 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1340 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1341 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1343 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1345 * i387-fp.c (i387_cache_to_xsave): In look over
1346 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1347 zmmh_low_space field by use of zmmh_high_space.
1349 2015-01-09 Pedro Alves <palves@redhat.com>
1351 * linux-low.c (step_over_bkpt): Move higher up in the file.
1352 (handle_extended_wait): Don't store the stop_pc here.
1353 (get_stop_pc): Adjust comments and rename to ...
1354 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1355 stopped for a software breakpoint or hardware breakpoint.
1356 (thread_still_has_status_pending_p): New function.
1357 (status_pending_p_callback): Use
1358 thread_still_has_status_pending_p. If the event is no longer
1359 interesting, resume the LWP.
1360 (handle_tracepoints): Add assert.
1361 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1362 (wstatus_maybe_breakpoint): New function.
1363 (cancel_breakpoint): Delete function.
1364 (check_stopped_by_watchpoint): New function, factored out from
1365 linux_low_filter_event.
1366 (lp_status_maybe_breakpoint): Delete function.
1367 (linux_low_filter_event): Remove filter_ptid argument.
1368 Leave thread group exits pending here. Store the LWP's stop PC.
1369 Always leave events pending.
1370 (linux_wait_for_event_filtered): Pull all events out of the
1371 kernel, and leave them all pending.
1372 (count_events_callback, select_event_lwp_callback): Consider all
1374 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1375 (select_event_lwp): Only give preference to the stepping LWP in
1376 all-stop mode. Adjust comments.
1377 (ignore_event): New function.
1378 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1379 references to cancel_breakpoints. Adjust to renames. Also give
1380 equal priority to all LWPs that have had events in non-stop mode.
1381 If reporting a software breakpoint event, unadjust the LWP's PC.
1382 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1383 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1385 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1386 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1387 (linux_stopped_by_watchpoint): Adjust.
1388 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1389 * linux-low.h (enum lwp_stop_reason): New.
1390 (struct lwp_info) <stop_pc>: Adjust comment.
1391 <stopped_by_watchpoint>: Delete field.
1392 <stop_reason>: New field.
1393 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1394 * mem-break.c (software_breakpoint_inserted_here)
1395 (hardware_breakpoint_inserted_here): New function.
1396 * mem-break.h (software_breakpoint_inserted_here)
1397 (hardware_breakpoint_inserted_here): Declare.
1398 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1399 (cancel_breakpoints): Delete.
1400 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1401 (upload_fast_traceframes): Remove references to
1404 2015-01-09 Pedro Alves <palves@redhat.com>
1406 * thread-db.c (find_new_threads_callback): Ignore thread if the
1407 kernel thread ID is -1.
1409 2015-01-09 Pedro Alves <palves@redhat.com>
1411 * linux-low.c (linux_attach_fail_reason_string): Move to
1412 nat/linux-ptrace.c, and rename.
1413 (linux_attach_lwp): Update comment.
1414 (attach_proc_task_lwp_callback): New function.
1415 (linux_attach): Adjust to rename and use
1416 linux_proc_attach_tgid_threads.
1417 (linux_attach_fail_reason_string): Delete declaration.
1419 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1421 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1422 * server.c (gdbserver_version): Likewise.
1424 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1426 * remote-utils.c: Include ctype.h.
1427 (input_interrupt): Explicitly handle the case when the char
1428 received is the NUL byte. Improve the printing of non-ASCII
1431 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1433 * linux-low.c (linux_low_filter_event): Update call to
1434 linux_enable_event_reporting following the addition of
1435 a new parameter to that function.
1437 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1440 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1441 (AARCH64_FPCR_REGNO): Likewise.
1442 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1443 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1444 (aarch64_store_fpregset): Likewise.
1446 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1448 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1449 Remove FIXME comment about assumption about N.
1451 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1453 * configure.ac: If large-file support is disabled in GDBserver,
1454 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1455 * configure: Regenerate.
1457 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1459 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1460 warning upon ENODATA from ptrace.
1461 * linux-s390-low.c (s390_store_tdb): New.
1462 (s390_regsets): Add regset for NT_S390_TDB.
1464 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1466 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1467 without a fill_function.
1468 * linux-s390-low.c (s390_fill_last_break): Remove.
1469 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1470 (s390_arch_setup): Use regset's size instead of fill_function for
1473 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1475 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1476 the regset's store function when ptrace returned an error.
1477 * regcache.c (get_thread_regcache): Invalidate register cache
1478 before fetching inferior's registers.
1480 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1482 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1483 while-loop as for-loop.
1484 (regsets_store_inferior_registers): Likewise.
1486 2014-11-28 Yao Qi <yao@codesourcery.com>
1488 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1489 * config.in, configure: Re-generate.
1490 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1493 2014-11-21 Yao Qi <yao@codesourcery.com>
1495 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1496 (AC_CHECK_HEADERS): Remove malloc.h.
1497 * configure: Re-generated.
1498 * config.in: Re-generated.
1499 * server.h: Don't include alloca.h and malloc.h.
1500 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1501 Don't include malloc.h.
1503 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1505 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1506 corresponding ERRNO check in same block.
1508 2014-11-12 Pedro Alves <palves@redhat.com>
1510 * server.c (cont_thread): Update comment.
1511 (start_inferior, attach_inferior): No longer clear cont_thread.
1512 (handle_v_cont): No longer set cont_thread.
1513 (captured_main): Clear cont_thread each time a GDB connects.
1515 2014-11-12 Pedro Alves <palves@redhat.com>
1517 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1518 thread, and don't resume all threads if the Hc thread has exited.
1520 2014-11-12 Pedro Alves <palves@redhat.com>
1522 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1523 the process group instead of to a specific LWP.
1525 2014-10-15 Pedro Alves <palves@redhat.com>
1528 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1530 (arm_set_thread_context): Delete.
1531 (the_low_target): Adjust.
1532 * win32-i386-low.c (debug_registers_changed)
1533 (debug_registers_used): Delete.
1534 (update_debug_registers_callback): New function.
1535 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1536 needing to update their debug registers.
1537 (win32_get_current_dr): New function.
1538 (x86_dr_low_get_addr, x86_dr_low_get_control)
1539 (x86_dr_low_get_status): Fetch the debug register from the thread
1541 (i386_initial_stuff): Adjust.
1542 (i386_get_thread_context): Remove current_event parameter. Don't
1543 clear debug_registers_changed nor copy DR values to
1545 (i386_set_thread_context): Delete.
1546 (i386_prepare_to_resume): New function.
1547 (i386_thread_added): Mark the thread as needing to update irs
1549 (the_low_target): Remove i386_set_thread_context and install
1550 i386_prepare_to_resume.
1551 * win32-low.c (win32_get_thread_context): Adjust.
1552 (win32_set_thread_context): Use SetThreadContext
1554 (win32_prepare_to_resume): New function.
1555 (win32_require_context): New function, factored out from ...
1556 (thread_rec): ... this.
1557 (continue_one_thread): Call win32_prepare_to_resume on each thread
1558 we're about to continue.
1559 (win32_resume): Call win32_prepare_to_resume on the event thread.
1560 * win32-low.h (struct win32_thread_info)
1561 <debug_registers_changed>: New field.
1562 (struct win32_target_ops): Change prototype of set_thread_context,
1563 delete set_thread_context and add prepare_to_resume.
1564 (win32_require_context): New declaration.
1566 2014-10-08 Gary Benson <gbenson@redhat.com>
1568 * server.h: Do not include common-exceptions.h.
1570 2014-10-08 Gary Benson <gbenson@redhat.com>
1572 * server.h: Do not include cleanups.h.
1574 2014-09-30 James Hogan <james.hogan@imgtec.com>
1576 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1579 2014-09-23 Yao Qi <yao@codesourcery.com>
1581 * linux-low.c (lp_status_maybe_breakpoint): New function.
1582 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1583 (count_events_callback): Likewise.
1584 (select_event_lwp_callback): Likewise.
1585 (cancel_breakpoints_callback): Likewise.
1587 2014-09-19 Don Breazeal <donb@codesourcery.com>
1589 * linux-low.c (handle_extended_wait): Call
1590 linux_ptrace_get_extended_event.
1591 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1592 linux_is_extended_waitstatus.
1594 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1596 * Makefile.in (CPPFLAGS): Define.
1597 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1598 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1600 2014-09-16 Gary Benson <gbenson@redhat.com>
1602 * inferiors.h (current_inferior): Renamed as...
1603 (current_thread): New variable. All uses updated.
1604 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1605 (maybe_move_out_of_jump_pad): Likewise.
1606 (cancel_breakpoint): Likewise.
1607 (linux_low_filter_event): Likewise.
1608 (wait_for_sigstop): Likewise.
1609 (linux_resume_one_lwp): Likewise.
1610 (need_step_over_p): Likewise.
1611 (start_step_over): Likewise.
1612 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1613 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1614 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1615 and save_inferior as saved_thread.
1616 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1618 (regcache_invalidate_thread): Likewise.
1619 * remote-utils.c (prepare_resume_reply): Likewise.
1620 * thread-db.c (thread_db_get_tls_address): Likewise.
1621 (disable_thread_event_reporting): Likewise.
1622 (remove_thread_event_breakpoints): Likewise.
1623 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1625 * target.h (set_desired_inferior): Renamed as...
1626 (set_desired_thread): New declaration. All uses updated.
1627 * server.c (myresume): Updated comment to reference thread instead
1629 (handle_serial_event): Likewise.
1630 (handle_target_event): Likewise.
1632 2014-09-12 Tom Tromey <tromey@redhat.com>
1633 Gary Benson <gbenson@redhat.com>
1635 * regcache.h: Include common-regcache.h.
1636 (regcache_read_pc): Don't declare.
1637 * regcache.c (get_thread_regcache_for_ptid): New function.
1639 2014-09-11 Tom Tromey <tromey@redhat.com>
1640 Gary Benson <gbenson@redhat.com>
1642 * symbol.c: New file.
1643 * Makefile.in (SFILES): Add symbol.c.
1644 (OBS): Add symbol.o.
1646 2014-09-11 Gary Benson <gbenson@redhat.com>
1648 * target.c (target_stop_ptid, target_continue_ptid): New
1651 2014-09-11 Tom Tromey <tromey@redhat.com>
1652 Gary Benson <gbenson@redhat.com>
1654 * target.h: Include target/target.h.
1655 * target.c (target_read_memory, target_read_uint32)
1656 (target_write_memory): New functions.
1658 2014-09-11 Gary Benson <gbenson@redhat.com>
1660 * server.h (debug_hw_points): Don't declare.
1661 * server.c (debug_hw_points): Don't define. Replace all uses
1662 with show_debug_regs.
1663 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1664 all uses with show_debug_regs.
1666 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1668 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1669 endianness into account.
1670 (ppc_supply_ptrace_register): Likewise.
1672 2014-09-03 James Hogan <james.hogan@imgtec.com>
1674 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1675 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1677 2014-09-03 Gary Benson <gbenson@redhat.com>
1679 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1680 ALL_DEBUG_ADDRESS_REGISTERS.
1682 2014-09-02 Gary Benson <gbenson@redhat.com>
1684 * i386-low.h: Renamed as...
1685 * x86-low.h: New file. All type, function and variable name
1686 prefixes changed from "i386_" to "x86_". All references updated.
1687 * i386-low.c: Renamed as...
1688 * x86-low.c: New file. All type, function and variable name
1689 prefixes changed from "i386_" to "x86_". All references updated.
1691 2014-09-02 Gary Benson <gbenson@redhat.com>
1693 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1694 (x86_linux_new_thread): Likewise.
1696 2014-08-29 Gary Benson <gbenson@redhat.com>
1698 * server.h (setjmp.h): Do not include.
1699 (toplevel): Do not declare.
1700 (common-exceptions.h): Include.
1701 (cleanups.h): Likewise.
1702 * server.c (toplevel): Do not define.
1703 (exit_code): New static global.
1704 (detach_or_kill_for_exit_cleanup): New function.
1705 (main): New function. Original main renamed to...
1706 (captured_main): New function.
1707 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1709 2014-08-29 Gary Benson <gbenson@redhat.com>
1711 * Makefile.in (SFILES): Add common/common-exceptions.c.
1712 (OBS): Add common-exceptions.o.
1713 (common-exceptions.o): New rule.
1714 * utils.c (prepare_to_throw_exception): New function.
1716 2014-08-29 Gary Benson <gbenson@redhat.com>
1718 * config.in: Regenerate.
1719 * configure: Likewise.
1721 2014-08-29 Gary Benson <gbenson@redhat.com>
1723 * Makefile.in (SFILES): Add common/cleanups.c.
1725 (cleanups.o): New rule.
1727 2014-08-29 Gary Benson <gbenson@redhat.com>
1729 * utils.c (internal_vwarning): New function.
1731 2014-08-28 Gary Benson <gbenson@redhat.com>
1733 * utils.h (fatal): Remove declaration.
1734 * utils.c (fatal): Remove function.
1736 2014-08-28 Gary Benson <gbenson@redhat.com>
1738 * tracepoint.c (gdb_agent_init): Replace fatal with
1740 (initialize_tracepoint): Likewise.
1742 2014-08-28 Gary Benson <gbenson@redhat.com>
1744 * remote-utils.c (remote_prepare): Replace fatal with error.
1746 2014-08-28 Gary Benson <gbenson@redhat.com>
1748 * linux-low.c (linux_async): Replace fatal with warning.
1750 (linux_start_non_stop): Return -1 if linux_async failed.
1752 2014-08-28 Gary Benson <gbenson@redhat.com>
1754 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1756 (i386_dr_low_get_addr): Remove vague comment.
1757 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1760 2014-08-28 Gary Benson <gbenson@redhat.com>
1762 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1763 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1765 (linux_resume_one_lwp): Likewise.
1766 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1768 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1769 with internal_error.
1770 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1771 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1772 (find_register_by_name): Replace fatal with internal_error.
1773 (find_regno): Likewise.
1774 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1775 * thread-db.c (thread_db_create_event): Likewise.
1776 (thread_db_load_search): Likewise.
1777 (try_thread_db_load_1): Likewise.
1778 * tracepoint.c (get_jump_space_head): Replace fatal with
1780 (claim_trampoline_space): Likewise.
1781 (have_fast_tracepoint_trampoline_buffer): Likewise.
1782 (cmd_qtstart): Likewise.
1783 (stop_tracing): Likewise.
1784 (fast_tracepoint_collecting): Likewise.
1785 (target_malloc): Likewise.
1786 (download_tracepoint): Likewise.
1787 (download_trace_state_variables): Replace check with gdb_assert.
1788 (upload_fast_traceframes): Replace fatal with internal_error.
1790 2014-08-19 Tom Tromey <tromey@redhat.com>
1791 Gary Benson <gbenson@redhat.com>
1793 * Makefile.in (SFILES): Add common/common-debug.c.
1794 (OBS): Add common-debug.o.
1795 (common-debug.o): New rule.
1796 * debug.h (debug_printf): Don't declare.
1797 * debug.c (debug_printf): Renamed and rewritten as...
1798 (debug_vprintf): New function.
1800 2014-08-19 Gary Benson <gbenson@redhat.com>
1802 * utils.h: Do not include print-utils.h.
1804 2014-08-19 Tom Tromey <tromey@redhat.com>
1805 Gary Benson <gbenson@redhat.com>
1807 * server.h: Add static assertion.
1808 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1810 2014-08-19 Tom Tromey <tromey@redhat.com>
1811 Gary Benson <gbenson@redhat.com>
1813 * Makefile.in (SFILES): Add common/errors.c.
1814 (OBS): Add errors.o.
1815 (IPA_OBS): Add errors-ipa.o.
1816 (errors.o): New rule.
1817 (errors-ipa.o): Likewise.
1818 * utils.h (perror_with_name, error, warning): Don't declare.
1819 * utils.c (warning): Renamed and rewritten as...
1820 (vwarning): New function.
1821 (error): Renamed and rewritten as...
1822 (verror): New function.
1823 (internal_error): Renamed and rewritten as...
1824 (internal_verror): New function.
1826 2014-08-07 Gary Benson <gbenson@redhat.com>
1828 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1829 * configure: Regenerate.
1830 * config.in: Likewise.
1831 * server.h: Do not include errno.h.
1832 * event-loop.c: Likewise.
1833 * hostio-errno.c: Likewise.
1834 * linux-low.c: Likewise.
1835 * remote-utils.c: Likewise.
1836 * spu-low.c: Likewise.
1837 * utils.c: Likewise.
1838 * gdbreplay.c: Unconditionally include errno.h.
1840 2014-08-07 Gary Benson <gbenson@redhat.com>
1842 * server.h: Do not include string.h.
1843 * event-loop.c: Likewise.
1844 * linux-low.c: Likewise.
1845 * regcache.c: Likewise.
1846 * remote-utils.c: Likewise.
1847 * spu-low.c: Likewise.
1848 * utils.c: Likewise.
1850 2014-08-07 Gary Benson <gbenson@redhat.com>
1852 * server.h: Do not include gdb_assert.h.
1854 2014-08-07 Gary Benson <gbenson@redhat.com>
1856 * server.h: Do not include common-utils.h.
1858 2014-08-07 Gary Benson <gbenson@redhat.com>
1860 * server.h: Do not include ptid.h.
1861 * notif.h: Likewise.
1863 2014-08-07 Gary Benson <gbenson@redhat.com>
1865 * server.h: Do not include gdb_locale.h.
1867 2014-08-07 Gary Benson <gbenson@redhat.com>
1869 * server.h: Do not include gdb/signals.h.
1870 * win32-low.c: Likewise.
1872 2014-08-07 Gary Benson <gbenson@redhat.com>
1874 * server.h: Do not include pathmax.h.
1876 2014-08-07 Gary Benson <gbenson@redhat.com>
1878 * server.h: Do not include libiberty.h.
1879 * linux-bfin-low.c: Likewise.
1881 2014-08-07 Gary Benson <gbenson@redhat.com>
1883 * server.h: Do not include ansidecl.h.
1885 2014-08-07 Gary Benson <gbenson@redhat.com>
1887 * linux-x86-low.c: Do not include stddef.h.
1888 * lynx-ppc-low.c: Likewise.
1889 * tracepoint.c: Likewise.
1891 2014-08-07 Gary Benson <gbenson@redhat.com>
1893 * server.h: Do not include stdarg.h.
1894 * nto-low.c: Likewise.
1896 2014-08-07 Gary Benson <gbenson@redhat.com>
1898 * server.h: Do not include stdlib.h.
1899 * inferiors.c: Likewise.
1900 * linux-low.c: Likewise.
1901 * regcache.c: Likewise.
1902 * spu-low.c: Likewise.
1903 * tracepoint.c: Likewise.
1904 * utils.c: Likewise.
1906 2014-08-07 Gary Benson <gbenson@redhat.com>
1908 * server.h: Do not include stdio.h.
1909 * linux-low.c: Likewise.
1910 * remote-utils.c: Likewise.
1911 * spu-low.c: Likewise.
1912 * utils.c: Likewise.
1913 * wincecompat.c: Likewise.
1915 2014-08-06 Gary Benson <gbenson@redhat.com>
1917 * regcache.c (init_register_cache): Move conditionals inside if.
1919 2014-08-06 Gary Benson <gbenson@redhat.com>
1921 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1923 2014-07-31 Gary Benson <gbenson@redhat.com>
1925 * ax.h: Do not include server.h.
1926 * gdbthread.h: Likewise.
1927 * lynx-low.h: Likewise.
1928 * notif.h: Likewise.
1930 2014-07-30 Gary Benson <gbenson@redhat.com>
1932 * server.h: Include common-defs.h.
1933 Do not include config.h or build-gnulib-gdbserver/config.h.
1935 2014-07-30 Gary Benson <gbenson@redhat.com>
1937 * hostio-errno.c: Move server.h to top of includes list.
1938 * inferiors.c: Likewise.
1939 * linux-x86-low.c: Likewise.
1940 * notif.c: Include server.h.
1942 2014-07-24 Tom Tromey <tromey@redhat.com>
1943 Gary Benson <gbenson@redhat.com>
1945 * server.h (CORE_ADDR): Now unsigned.
1947 2014-07-16 Pedro Alves <palves@redhat.com>
1949 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1951 2014-07-15 Pedro Alves <palves@redhat.com>
1953 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1956 2014-07-11 Pedro Alves <palves@redhat.com>
1958 * linux-low.c (kill_wait_lwp): New function, based on
1959 kill_one_lwp_callback, but use my_waitpid directly.
1960 (kill_one_lwp_callback, linux_kill): Use it.
1962 2014-06-23 Pedro Alves <palves@redhat.com>
1964 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1965 before setting DR0..DR3.
1967 2014-06-20 Gary Benson <gbenson@redhat.com>
1969 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1970 * configure: Regenerated.
1971 * config.in: Likewise.
1973 2014-06-20 Gary Benson <gbenson@redhat.com>
1975 * Makefile.in (SFILES): Update locations for files moved
1977 (object file files): Reordered.
1979 2014-06-20 Gary Benson <gbenson@redhat.com>
1981 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1982 (i386_dr_low_set_addr): Likewise.
1983 (i386_dr_low_get_addr): Likewise.
1984 (i386_dr_low_can_set_control): Likewise.
1985 (i386_dr_low_set_control): Likewise.
1986 (i386_dr_low_get_control): Likewise.
1987 (i386_dr_low_get_status): Likewise.
1988 (i386_get_debug_register_length): Likewise.
1989 * linux-x86-low.c (i386_dr_low_set_addr):
1990 Changed signature. Made static.
1991 (i386_dr_low_get_addr): Likewise.
1992 (i386_dr_low_set_control): Likewise.
1993 (i386_dr_low_get_control): Likewise.
1994 (i386_dr_low_get_status): Likewise.
1995 (i386_dr_low): New global variable.
1996 * win32-i386-low.c (i386_dr_low_set_addr):
1997 Changed signature. Made static.
1998 (i386_dr_low_get_addr): Likewise.
1999 (i386_dr_low_set_control): Likewise.
2000 (i386_dr_low_get_control): Likewise.
2001 (i386_dr_low_get_status): Likewise.
2002 (i386_dr_low): New global variable.
2004 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2006 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2007 * Makefile.in (AR, AR_FLAGS): Define.
2008 * configure: Regenerate.
2010 2014-06-19 Gary Benson <gbenson@redhat.com>
2012 * Makefile.in (i386-dregs.o): New rule.
2013 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2014 * i386-low.c (target.h): Remove include.
2015 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2016 (DR_CONTROL_SHIFT): Likewise.
2017 (DR_CONTROL_SIZE): Likewise.
2018 (DR_RW_EXECUTE): Likewise.
2019 (DR_RW_WRITE): Likewise.
2020 (DR_RW_READ): Likewise.
2021 (DR_RW_IORW): Likewise.
2022 (DR_LEN_1): Likewise.
2023 (DR_LEN_2): Likewise.
2024 (DR_LEN_4): Likewise.
2025 (DR_LEN_8): Likewise.
2026 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2027 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2028 (DR_ENABLE_SIZE): Likewise.
2029 (DR_LOCAL_SLOWDOWN): Likewise.
2030 (DR_GLOBAL_SLOWDOWN): Likewise.
2031 (DR_CONTROL_RESERVED): Likewise.
2032 (I386_DR_CONTROL_MASK): Likewise.
2033 (I386_DR_VACANT): Likewise.
2034 (I386_DR_LOCAL_ENABLE): Likewise.
2035 (I386_DR_GLOBAL_ENABLE): Likewise.
2036 (I386_DR_DISABLE): Likewise.
2037 (I386_DR_SET_RW_LEN): Likewise.
2038 (I386_DR_GET_RW_LEN): Likewise.
2039 (I386_DR_WATCH_HIT): Likewise.
2040 (i386_wp_op_t): Likewise.
2041 (i386_show_dr): Likewise.
2042 (i386_length_and_rw_bits): Likewise.
2043 (i386_insert_aligned_watchpoint): Likewise.
2044 (i386_remove_aligned_watchpoint): Likewise.
2045 (i386_handle_nonaligned_watchpoint): Likewise.
2046 i386_update_inferior_debug_regs(): Likewise.
2047 (i386_dr_insert_watchpoint): Likewise.
2048 (i386_dr_remove_watchpoint): Likewise.
2049 (i386_dr_region_ok_for_watchpoint): Likewise.
2050 (i386_dr_stopped_data_address): Likewise.
2051 (i386_dr_stopped_by_watchpoint): Likewise.
2053 2014-06-19 Gary Benson <gbenson@redhat.com>
2055 * i386-low.c (i386_dr_show): Renamed to
2056 i386_show_dr and made static. All uses updated.
2057 (i386_dr_length_and_rw_bits): Renamed to
2058 i386_length_and_rw_bits and made static.
2060 (i386_dr_insert_aligned_watchpoint): Renamed to
2061 i386_insert_aligned_watchpoint and made static.
2063 (i386_dr_remove_aligned_watchpoint): Renamed to
2064 i386_remove_aligned_watchpoint and made static.
2066 (i386_dr_update_inferior_debug_regs): Renamed to
2067 i386_update_inferior_debug_regs and made static.
2070 2014-06-18 Gary Benson <gbenson@redhat.com>
2072 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2073 (i386_dr_low_can_set_control): Likewise.
2074 (i386_get_debug_register_length): Likewise.
2075 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2076 (i386_dr_low_can_set_control): Likewise.
2077 (i386_get_debug_register_length): Likewise.
2079 2014-06-17 Gary Benson <gbenson@redhat.com>
2081 * i386-low.h (i386-dregs.h): New include.
2082 (DR_FIRSTADDR): Now in i386-dregs.h.
2083 (DR_LASTADDR): Likewise.
2084 (DR_NADDR): Likewise.
2085 (DR_STATUS): Likewise.
2086 (DR_CONTROL): Likewise.
2087 (i386_debug_reg_state): Likewise.
2088 (i386_dr_insert_watchpoint): Likewise.
2089 (i386_dr_remove_watchpoint): Likewise.
2090 (i386_dr_region_ok_for_watchpoint): Likewise.
2091 (i386_dr_stopped_data_address): Likewise.
2092 (i386_dr_stopped_by_watchpoint): Likewise.
2093 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2095 2014-06-18 Gary Benson <gbenson@redhat.com>
2097 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2098 i386_dr_insert_watchpoint.
2099 (i386_low_remove_watchpoint): Renamed to
2100 i386_dr_remove_watchpoint.
2101 (i386_low_region_ok_for_watchpoint): Renamed to
2102 i386_dr_region_ok_for_watchpoint.
2103 (i386_low_stopped_data_address): Renamed to
2104 i386_dr_stopped_data_address.
2105 (i386_low_stopped_by_watchpoint): Renamed to
2106 i386_dr_stopped_by_watchpoint.
2107 * i386-low.c (i386_show_dr): Renamed to
2108 i386_dr_show and made nonstatic. All uses updated.
2109 (i386_length_and_rw_bits): Renamed to
2110 i386_dr_length_and_rw_bits and made nonstatic.
2112 (i386_insert_aligned_watchpoint): Renamed to
2113 i386_dr_insert_aligned_watchpoint and made nonstatic.
2115 (i386_remove_aligned_watchpoint): Renamed to
2116 i386_dr_remove_aligned_watchpoint and made nonstatic.
2118 (i386_update_inferior_debug_regs): Renamed to
2119 i386_dr_update_inferior_debug_regs and made nonstatic.
2121 (i386_low_insert_watchpoint): Renamed to
2122 i386_dr_insert_watchpoint. All uses updated.
2123 (i386_low_remove_watchpoint): Renamed to
2124 i386_dr_remove_watchpoint. All uses updated.
2125 (i386_low_region_ok_for_watchpoint): Renamed to
2126 i386_dr_region_ok_for_watchpoint. All uses updated.
2127 (i386_low_stopped_data_address): Renamed to
2128 i386_dr_stopped_data_address. All uses updated.
2129 (i386_low_stopped_by_watchpoint): Renamed to
2130 i386_dr_stopped_by_watchpoint. All uses updated.
2132 2014-06-18 Gary Benson <gbenson@redhat.com>
2134 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2135 (i386_dr_low_can_set_control): Likewise.
2136 (i386_insert_aligned_watchpoint): New check.
2138 2014-06-18 Gary Benson <gbenson@redhat.com>
2140 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2143 2014-06-18 Gary Benson <gbenson@redhat.com>
2145 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2146 instead of fatal and error.
2147 (i386_handle_nonaligned_watchpoint): Likewise.
2149 2014-06-18 Gary Benson <gbenson@redhat.com>
2151 * i386-low.c (i386_get_debug_register_length): New macro.
2152 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2153 (i386_show_dr): Use debug_printf instead of fprintf. Use
2154 phex to format values.
2156 2014-06-18 Gary Benson <gbenson@redhat.com>
2158 * i386-low.h: Comment changes.
2159 * i386-low.c: Likewise.
2161 2014-06-18 Gary Benson <gbenson@redhat.com>
2163 * i386-low.c: Whitespace changes.
2165 2014-06-12 Tom Tromey <tromey@redhat.com>
2167 * utils.c (freeargv): Remove.
2169 2014-06-12 Tom Tromey <tromey@redhat.com>
2171 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2172 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2173 (parse_debug_format_options): Likewise.
2174 (gdbserver_usage): Likewise.
2175 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2176 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2177 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2179 ($(LIBGNU)): Depend on libiberty.
2180 (all-lib): Recurse into all subdirs.
2181 (install-only): Invoke "install" target in subdirs.
2182 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2184 * configure: Rebuild.
2185 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2186 for vasprintf, vsnprintf, or gettimeofday.
2187 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2190 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2192 * development.sh: Delete.
2193 * Makefile.in (config.status): Adjust dependency on development.sh.
2194 * configure.ac: Adjust development.sh source call.
2195 * configure: Regenerate.
2197 2014-06-02 Pedro Alves <palves@redhat.com>
2199 * ax.c (gdb_free_agent_expr): New function.
2200 * ax.h (gdb_free_agent_expr): New declaration.
2201 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2203 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2205 (clear_breakpoint_conditions_and_commands): New function.
2206 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2207 (clear_breakpoint_conditions_and_commands): New declaration.
2209 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2211 * linux-aarch64-low.c (asm/ptrace.h): Include.
2213 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2215 Fix TLS access for -static -pthread.
2216 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2217 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2218 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2220 2014-05-20 Pedro Alves <palves@redhat.com>
2222 * linux-aarch64-low.c (aarch64_insert_point)
2223 (aarch64_remove_point): No longer check whether the type is
2224 supported here. Adjust to new interface.
2225 (the_low_target): Install aarch64_supports_z_point_type as
2226 supports_z_point_type method.
2227 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2228 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2229 instead of a Z packet char. Adjust.
2230 (arm_supports_z_point_type): New function.
2231 (arm_insert_point, arm_remove_point): Adjust to new interface.
2232 (the_low_target): Install arm_supports_z_point_type.
2233 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2234 (cris_insert_point, cris_remove_point): Adjust to new interface.
2235 Don't check whether the type is supported here.
2236 (the_low_target): Install cris_supports_z_point_type.
2237 * linux-low.c (linux_supports_z_point_type): New function.
2238 (linux_insert_point, linux_remove_point): Adjust to new interface.
2239 * linux-low.h (struct linux_target_ops) <insert_point,
2240 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2241 raw_breakpoint pointer parameter.
2242 <supports_z_point_type>: New method.
2243 * linux-mips-low.c (mips_supports_z_point_type): New function.
2244 (mips_insert_point, mips_remove_point): Adjust to new interface.
2245 Use mips_supports_z_point_type.
2246 (the_low_target): Install mips_supports_z_point_type.
2247 * linux-ppc-low.c (the_low_target): Install NULL as
2248 supports_z_point_type method.
2249 * linux-s390-low.c (the_low_target): Install NULL as
2250 supports_z_point_type method.
2251 * linux-sparc-low.c (the_low_target): Install NULL as
2252 supports_z_point_type method.
2253 * linux-x86-low.c (x86_supports_z_point_type): New function.
2254 (x86_insert_point): Adjust to new insert_point interface. Use
2255 insert_memory_breakpoint. Adjust to new
2256 i386_low_insert_watchpoint interface.
2257 (x86_remove_point): Adjust to remove_point interface. Use
2258 remove_memory_breakpoint. Adjust to new
2259 i386_low_remove_watchpoint interface.
2260 (the_low_target): Install x86_supports_z_point_type.
2261 * lynx-low.c (lynx_target_ops): Install NULL as
2262 supports_z_point_type callback.
2263 * nto-low.c (nto_supports_z_point_type): New.
2264 (nto_insert_point, nto_remove_point): Adjust to new interface.
2265 (nto_target_ops): Install nto_supports_z_point_type.
2266 * mem-break.c: Adjust intro comment.
2267 (struct raw_breakpoint) <raw_type, size>: New fields.
2268 <inserted>: Update comment.
2269 <shlib_disabled>: Delete field.
2270 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2271 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2272 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2273 (raw_bkpt_type_to_target_hw_bp_type): New function.
2274 (find_enabled_raw_code_breakpoint_at): New function.
2275 (find_raw_breakpoint_at): New type and size parameters. Use them.
2276 (insert_memory_breakpoint): New function, based off
2277 set_raw_breakpoint_at.
2278 (remove_memory_breakpoint): New function.
2279 (set_raw_breakpoint_at): Reimplement.
2280 (set_breakpoint): New, based on set_breakpoint_at.
2281 (set_breakpoint_at): Reimplement.
2282 (delete_raw_breakpoint): Go through the_target->remove_point
2283 instead of assuming memory breakpoints.
2284 (find_gdb_breakpoint_at): Delete.
2285 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2286 (find_gdb_breakpoint): New function.
2287 (set_gdb_breakpoint_at): Delete.
2288 (z_type_supported): New function.
2289 (set_gdb_breakpoint_1): New function, loosely based off
2290 set_gdb_breakpoint_at.
2291 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2292 (delete_gdb_breakpoint_at): Delete.
2293 (delete_gdb_breakpoint_1): New function, loosely based off
2294 delete_gdb_breakpoint_at.
2295 (delete_gdb_breakpoint): New function.
2296 (clear_gdb_breakpoint_conditions): Rename to ...
2297 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2299 (add_condition_to_breakpoint): Make static.
2300 (add_breakpoint_condition): Take a struct breakpoint pointer
2301 instead of an address. Adjust.
2302 (gdb_condition_true_at_breakpoint): Rename to ...
2303 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2305 (gdb_condition_true_at_breakpoint): Reimplement.
2306 (add_breakpoint_commands): Take a struct breakpoint pointer
2307 instead of an address. Adjust.
2308 (gdb_no_commands_at_breakpoint): Rename to ...
2309 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2310 parameter. Return true if no breakpoint was found. Change debug
2312 (gdb_no_commands_at_breakpoint): Reimplement.
2313 (run_breakpoint_commands): Rename to ...
2314 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2315 and change return type to boolean.
2316 (run_breakpoint_commands): New function.
2317 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2318 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2319 breakpoint. Go through the_target->remove_point instead of
2320 assuming memory breakpoint.
2321 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2322 software and hardware breakpoints.
2323 (reinsert_raw_breakpoint): Go through the_target->insert_point
2324 instead of assuming memory breakpoint.
2325 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2326 software and hardware breakpoints.
2327 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2328 Check both software and hardware breakpoints.
2329 (validate_inserted_breakpoint): Assert the breakpoint is a
2330 software breakpoint. Set the inserted flag to -1 instead of
2331 setting shlib_disabled.
2332 (delete_disabled_breakpoints): Adjust.
2333 (validate_breakpoints): Only validate software breakpoints.
2334 Adjust to inserted flag change.
2335 (check_mem_read, check_mem_write): Skip breakpoint types other
2336 than software breakpoints. Adjust to inserted flag change.
2337 * mem-break.h (enum raw_bkpt_type): New enum.
2338 (raw_breakpoint, struct process_info): Forward declare.
2339 (Z_packet_to_target_hw_bp_type): Delete declaration.
2340 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2341 (set_gdb_breakpoint, delete_gdb_breakpoint)
2342 (clear_breakpoint_conditions): New declarations.
2343 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2344 (breakpoint_inserted_here): Update comment.
2345 (add_breakpoint_condition, add_breakpoint_commands): Replace
2346 address parameter with a breakpoint pointer parameter.
2347 (gdb_breakpoint_here): Update comment.
2348 (delete_gdb_breakpoint_at): Delete.
2349 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2350 * server.c (process_point_options): Take a struct breakpoint
2351 pointer instead of an address. Adjust.
2352 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2353 delete_gdb_breakpoint.
2354 * spu-low.c (spu_target_ops): Install NULL as
2355 supports_z_point_type method.
2356 * target.h: Include mem-break.h.
2357 (struct target_ops) <prepare_to_access_memory>: Update comment.
2358 <supports_z_point_type>: New field.
2359 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2360 instead of a char. Also take a raw breakpoint pointer.
2361 * win32-arm-low.c (the_low_target): Install NULL as
2362 supports_z_point_type.
2363 * win32-i386-low.c (i386_supports_z_point_type): New function.
2364 (i386_insert_point, i386_remove_point): Adjust to new interface.
2365 (the_low_target): Install i386_supports_z_point_type.
2366 * win32-low.c (win32_supports_z_point_type): New function.
2367 (win32_insert_point, win32_remove_point): Adjust to new interface.
2368 (win32_target_ops): Install win32_supports_z_point_type.
2369 * win32-low.h (struct win32_target_ops):
2370 <supports_z_point_type>: New method.
2371 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2372 instead of a char. Also take a raw breakpoint pointer.
2374 2014-05-20 Pedro Alves <palves@redhat.com>
2376 * mem-break.h: Include break-common.h.
2377 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2378 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2379 (Z_packet_to_target_hw_bp_type): New declaration.
2380 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2381 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2382 (Z_PACKET_ACCESS_WP): Delete macros.
2383 (Z_packet_to_hw_type): Delete function.
2384 * i386-low.h: Don't include break-common.h here.
2385 (Z_packet_to_hw_type): Delete declaration.
2386 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2387 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2388 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2389 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2390 * linux-aarch64-low.c: Don't include break-common.h here.
2391 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2392 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2393 (Z_packet_to_target_hw_bp_type): Delete function.
2394 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2396 (mips_insert_point, mips_remove_point): Use
2397 Z_packet_to_target_hw_bp_type.
2399 2014-05-20 Pedro Alves <palves@redhat.com>
2401 * linux-aarch64-low.c: Include break-common.h.
2402 (enum target_point_type): Delete.
2403 (Z_packet_to_point_type): Rename to ...
2404 (Z_packet_to_target_hw_bp_type): ... this, and return a
2405 target_hw_bp_type instead.
2406 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2407 instead of an enum target_point_type.
2408 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2410 (aarch64_dr_state_insert_one_point)
2411 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2412 (aarch64_handle_aligned_watchpoint)
2413 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2414 Take an enum target_hw_bp_type instead of an enum
2416 (aarch64_supports_z_point_type): New function.
2417 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2418 use Z_packet_to_target_hw_bp_type.
2420 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2422 * configure.ac: Only use -Werror by default when DEVELOPMENT
2424 * configure: Regenerate.
2426 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2428 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2429 * linux-x86-low.c (X86_64_USER_REGS): New.
2430 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2432 2014-04-28 Yao Qi <yao@codesourcery.com>
2434 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2437 2014-04-25 Pedro Alves <palves@redhat.com>
2440 * linux-low.c (linux_attach_fail_reason_string): New function.
2441 (linux_attach_lwp): Delete.
2442 (linux_attach_lwp_1): Rename to ...
2443 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2444 argument. Remove "initial" parameter. Return int instead of
2445 void. Don't error or warn here.
2446 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2447 failure to attach to the tgid. Call warning when failing to
2449 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2450 argument. Remove "initial" parameter. Return int instead of
2451 void. Don't error or warn here.
2452 (linux_attach_fail_reason_string): New declaration.
2453 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2454 interface change. Use linux_attach_fail_reason_string.
2456 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2457 Walfred Tedeschi <walfred.tedeschi@intel.com>
2459 * Makefile.in: Added rules to handle new files
2460 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2461 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2462 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2463 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2464 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2465 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2467 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2468 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2469 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2470 i386/x32-avx512.xml.
2471 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2472 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2473 i386/x32-avx512-linux.xml.
2474 * i387-fp.c (num_avx512_k_registers): New constant for number
2476 (num_avx512_zmmh_low_registers): New constant for number of
2477 lower ZMM registers (0-15).
2478 (num_avx512_zmmh_high_registers): New constant for number of
2479 higher ZMM registers (16-31).
2480 (num_avx512_ymmh_registers): New contant for number of higher
2481 YMM registers (ymm16-31 added by avx521 on x86_64).
2482 (num_avx512_xmm_registers): New constant for number of higher
2483 XMM registers (xmm16-31 added by AVX512 on x86_64).
2484 (struct i387_xsave): Add space for AVX512 registers.
2485 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2486 Add code to handle AVX512 registers.
2487 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2488 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2489 prototypei from generated file.
2490 (tdesc_amd64_avx512_linux): Likewise.
2491 (init_registers_x32_avx512_linux): Likewise.
2492 (tdesc_x32_avx512_linux): Likewise.
2493 (init_registers_i386_avx512_linux): Likewise.
2494 (tdesc_i386_avx512_linux): Likewise.
2495 (x86_64_regmap): Add AVX512 registers.
2496 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2498 (initialize_low_arch): Add code to initialize AVX512 registers.
2500 2014-04-23 Pedro Alves <palves@redhat.com>
2502 * mem-break.c (find_gdb_breakpoint_at): Make static.
2503 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2505 2014-04-23 Pedro Alves <palves@redhat.com>
2507 * i386-low.c: Don't include break-common.h here.
2508 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2509 prototype to take target_hw_bp_type as argument instead of a Z
2511 * i386-low.h: Include break-common.h here.
2512 (Z_packet_to_hw_type): Declare.
2513 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2515 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2516 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2517 (x86_remove_point): Convert the packet number to a
2518 target_hw_bp_type before calling i386_low_remove_watchpoint.
2519 * win32-i386-low.c (i386_insert_point): Convert the packet number
2520 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2521 (i386_remove_point): Convert the packet number to a
2522 target_hw_bp_type before calling i386_low_remove_watchpoint.
2524 2014-04-23 Pedro Alves <palves@redhat.com>
2526 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2528 2014-04-10 Pedro Alves <palves@redhat.com>
2530 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2531 Check if the condition or command is NULL before checking if the
2532 breakpoint is known. On success, return true.
2533 * mem-break.h (add_breakpoint_condition): Document return.
2534 (add_breakpoint_commands): Add describing comment.
2535 * server.c (skip_to_semicolon): New function.
2536 (process_point_options): Use it.
2538 2014-04-09 Pedro Alves <palves@redhat.com>
2540 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2543 2014-02-27 Pedro Alves <palves@redhat.com>
2546 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2548 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2550 (last_thread_of_process_p): Take a PID argument instead of a
2552 (linux_wait_for_lwp): Delete.
2553 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2555 (linux_low_filter_event): New function, party factored out from
2556 linux_wait_for_event.
2557 (linux_wait_for_event): Rename to ...
2558 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2559 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2560 sigsuspend. Check for zombie leaders.
2561 (linux_wait_for_event): Reimplement as wrapper around
2562 linux_wait_for_event_filtered.
2563 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2564 a normal or signal exit is seen, it's the whole process exiting.
2565 (wait_for_sigstop): No longer a for_each_inferior callback.
2566 Rewrite on top of linux_wait_for_event_filtered.
2567 (stop_all_lwps): Call wait_for_sigstop directly.
2568 * server.c (resume, handle_target_event): Handle
2569 TARGET_WAITKIND_NO_RESUMED.
2571 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2573 * win32-low.c (psapi_get_dll_name,
2574 * win32_CreateToolhelp32Snapshot): Delete.
2575 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2576 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2578 (handle_load_dll): Add function description.
2579 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2581 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2583 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2585 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2586 base address when calling win32_add_one_solib.
2587 (handle_load_dll): Delete local variable load_addr.
2588 Remove 0x1000 offset applied to DLL base address when calling
2589 win32_add_one_solib.
2590 (handle_unload_dll): Add comment.
2592 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2594 * win32-low.c (win32_add_all_dlls): Renames
2595 win32_ensure_ntdll_loaded. Rewrite function documentation.
2596 Adjust implementation to always load all DLLs.
2597 Add 0x1000 offset to DLL base address when calling
2598 win32_add_one_solib.
2599 (child_initialization_done): New static global.
2600 (do_initial_child_stuff): Set child_initialization_done to
2601 zero during child initialization, and 1 after. Replace call
2602 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2604 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2605 (handle_unload_dll): Add function documentation.
2606 (get_child_debug_event): Ignore load and unload DLL events
2607 during child initialization.
2609 2014-02-20 Doug Evans <dje@google.com>
2611 Remove global all_lwps.
2612 * inferiors.h (ptid_of): Move here from linux-low.h.
2613 (pid_of, lwpid_of): Ditto.
2614 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2615 parameter is a struct thread_info * now.
2616 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2617 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2618 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2620 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2621 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2622 * linux-arm-low.c (update_registers_callback): Update, "entry"
2623 parameter is a struct thread_info * now.
2624 Fetch lwpid from current_inferior directly.
2625 (arm_insert_point): Pass &all_threads to find_inferior instead of
2627 (arm_remove_point): Ditto.
2628 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2629 (arm_prepare_to_resume): Fetch pid from thread.
2630 (arm_read_description): Fetch lwpid from current_inferior directly.
2631 * linux-low.c (all_lwps): Delete.
2632 (delete_lwp): Delete call to remove_inferior.
2633 (handle_extended_wait): Fetch lwpid from thread.
2634 (add_lwp): Don't set lwp->entry.id. Remove call to
2635 add_inferior_to_list.
2636 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2637 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2638 (kill_one_lwp_callback): Ditto.
2639 (linux_kill): Don't dereference NULL pointer.
2640 Fetch ptid,lwpid from thread.
2641 (get_detach_signal): Fetch ptid from thread.
2642 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2643 Simplify call to regcache_invalidate_thread.
2644 (delete_lwp_callback): Update, "entry" parameter is a
2645 struct thread_info * now. Fetch pid from thread.
2646 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2647 (status_pending_p_callback): Update, "entry" parameter is a
2648 struct thread_info * now. Fetch ptid from thread.
2649 (find_lwp_pid): Update, "entry" parameter is a
2650 struct thread_info * now.
2651 (linux_wait_for_lwp): Fetch pid from thread.
2652 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2653 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2654 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2655 (dequeue_one_deferred_signal): Ditto.
2656 (cancel_breakpoint): Fetch ptid from current_inferior.
2657 (linux_wait_for_event): Pass &all_threads to find_inferior,
2658 not &all_lwps. Fetch ptid, lwpid from thread.
2659 (count_events_callback): Update, "entry" parameter is a
2660 struct thread_info * now.
2661 (select_singlestep_lwp_callback): Ditto.
2662 (select_event_lwp_callback): Ditto.
2663 (cancel_breakpoints_callback): Ditto.
2664 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2666 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2667 (unsuspend_one_lwp): Update, "entry" parameter is a
2668 struct thread_info * now.
2669 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2671 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2672 Fetch lwpid from thread, not lwp.
2673 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2674 Pass &all_threads to find_inferior, not &all_lwps.
2675 (send_sigstop): Fetch lwpid from thread, not lwp.
2676 (send_sigstop_callback): Update, "entry" parameter is a
2677 struct thread_info * now.
2678 (suspend_and_send_sigstop_callback): Ditto.
2679 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2680 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2681 struct thread_info * now.
2682 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2684 (lwp_running): Update, "entry" parameter is a
2685 struct thread_info * now.
2686 (stop_all_lwps): Fetch ptid from thread.
2687 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2688 (linux_resume_one_lwp): Fetch lwpid from thread.
2689 (linux_set_resume_request): Update, "entry" parameter is a
2690 struct thread_info * now. Fetch pid, lwpid from thread.
2691 (resume_status_pending_p): Update, "entry" parameter is a
2692 struct thread_info * now.
2693 (need_step_over_p): Ditto. Fetch lwpid from thread.
2694 (start_step_over): Fetch lwpid from thread.
2695 (linux_resume_one_thread): Update, "entry" parameter is a
2696 struct thread_info * now. Fetch lwpid from thread.
2697 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2698 (proceed_one_lwp): Update, "entry" parameter is a
2699 struct thread_info * now. Fetch lwpid from thread.
2700 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2701 struct thread_info * now.
2702 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2703 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2704 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2706 (regsets_store_inferior_registers): Ditto.
2707 (fetch_register, store_register): Ditto.
2708 (linux_read_memory, linux_write_memory): Ditto.
2709 (linux_request_interrupt): Ditto.
2710 (linux_read_auxv): Ditto.
2711 (linux_xfer_siginfo): Ditto.
2712 (linux_qxfer_spu): Ditto.
2713 (linux_qxfer_libraries_svr4): Ditto.
2714 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2715 moved to inferiors.h.
2717 (get_thread_lwp): Update.
2718 (struct lwp_info): Delete member "entry". Simplify comment for
2721 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2722 current_inferior directly.
2723 (update_watch_registers_callback): Update, "entry" parameter is a
2724 struct thread_info * now. Fetch pid from thread.
2725 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2726 (mips_insert_point): Fetch lwpid from current_inferior.
2727 Pass &all_threads to find_inferior, not &all_lwps.
2728 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2729 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2731 (mips_stopped_data_address): Ditto.
2732 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2734 * linux-tile-low.c (tile_arch_setup): Ditto.
2735 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2736 (update_debug_registers_callback): Update, "entry" parameter is a
2737 struct thread_info * now. Fetch pid from thread.
2738 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2739 Pass &all_threads to find_inferior, not &all_lwps.
2740 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2741 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2742 Pass &all_threads to find_inferior, not &all_lwps.
2743 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2744 (i386_dr_low_get_status): Ditto.
2745 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2746 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2747 (x86_linux_read_description): Ditto.
2748 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2750 2014-02-20 Doug Evans <dje@google.com>
2752 * inferiors.c (get_first_inferior): Fix buglet.
2754 2014-02-19 Doug Evans <dje@google.com>
2756 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2757 * inferiors.c (add_thread): Change result type to struct thread_info *.
2758 All callers updated.
2759 (add_lwp): Call add_thread here instead of in callers.
2760 All callers updated.
2761 * linux-low.h (get_lwp_thread): Rewrite.
2762 (struct lwp_info): New member "thread".
2764 2014-02-19 Doug Evans <dje@google.com>
2766 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2767 All callers updated.
2769 2014-02-19 Doug Evans <dje@google.com>
2771 * inferiors.c (add_thread): Fix whitespace.
2773 2014-02-19 Doug Evans <dje@google.com>
2775 * dll.c (clear_dlls): Replace accessing list implemention details
2777 * gdbthread.h (get_first_thread): Declare.
2778 * inferiors.c (for_each_inferior_with_data): New function.
2779 (get_first_thread): New function.
2780 (find_thread_ptid): Simplify.
2781 (get_first_inferior): New function.
2782 (clear_list): Delete.
2783 (one_inferior_p): New function.
2784 (clear_inferior_list): New function.
2785 (clear_inferiors): Update.
2786 * inferiors.h (for_each_inferior_with_data): Declare.
2787 (clear_inferior_list): Declare.
2788 (one_inferior_p): Declare.
2789 (get_first_inferior): Declare.
2790 * linux-low.c (linux_wait_for_event): Replace accessing list
2791 implemention details with API function.
2792 * server.c (target_running): Ditto.
2793 (accumulate_file_name_length): New function.
2794 (emit_dll_description): New function.
2795 (handle_qxfer_libraries): Replace accessing list implemention
2796 details with API function.
2797 (handle_qxfer_threads_worker): New function.
2798 (handle_qxfer_threads_proper): Replace accessing list implemention
2799 details with API function.
2800 (handle_query): Ditto.
2801 (visit_actioned_threads_callback_ftype): New typedef.
2802 (visit_actioned_threads_data): New struct.
2803 (visit_actioned_threads): Rewrite to be find_inferior callback.
2804 (resume): Call find_inferior.
2805 (handle_status): Replace accessing list implemention
2806 details with API function.
2807 (process_serial_event): Replace accessing list implemention details
2809 * target.c (set_desired_inferior): Replace accessing list implemention
2810 details with API function.
2811 * tracepoint.c (same_process_p): New function.
2812 (gdb_agent_about_to_close): Replace accessing list implemention
2813 details with API function.
2814 * win32-low.c (child_delete_thread): Replace accessing list
2815 implemention details with API function.
2816 (match_dll_by_basename): New function.
2817 (dll_is_loaded_by_basename): New function.
2818 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2819 details call to dll_is_loaded_by_basename.
2821 2014-02-19 Doug Evans <dje@google.com>
2823 * dll.h (struct dll_info): Add comment.
2824 * gdbthread.h (struct thread_info): Add comment.
2825 (current_ptid): Simplify.
2826 * inferiors.c (add_process): Update.
2827 (remove_process): Update.
2828 * inferiors.h (struct process_info): Rename member "head" to "entry".
2829 * linux-low.c (delete_lwp): Update.
2831 (last_thread_of_process_p): Update.
2832 (kill_one_lwp_callback, linux_kill): Update.
2833 (status_pending_p_callback): Update.
2834 (wait_for_sigstop): Update. Simplify read of ptid.
2835 (start_step_over): Update.
2836 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2837 (get_lwp_thread): Update.
2838 (struct lwp_info): Rename member "head" to "entry".
2839 * regcache.h (inferior_list_entry): Delete.
2840 * server.c (kill_inferior_callback): Update.
2841 (detach_or_kill_inferior_callback): Update.
2842 (print_started_pid): Update.
2843 (print_attached_pid): Update.
2844 (process_serial_event): Simplify read of ptid.
2845 * thread-db.c (thread_db_create_event): Update.
2846 (thread_db_get_tls_address): Update.
2847 * win32-low.c (current_inferior_ptid): Simplify.
2849 2014-02-19 Tom Tromey <tromey@redhat.com>
2851 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2853 (target_supports_btrace): Update.
2855 2014-02-14 Yao Qi <yao@codesourcery.com>
2857 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2858 (rsp-low-ipa.o): New target.
2860 2014-02-12 Tom Tromey <tromey@redhat.com>
2862 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2863 convert_ascii_to_int.
2864 * regcache.c (registers_to_string): Likewise.
2865 * remote-utils.c (decode_M_packet): Likewise.
2866 * server.c (process_serial_event): Likewise.
2868 2014-02-12 Tom Tromey <tromey@redhat.com>
2870 * server.c (handle_query, handle_v_run): Use hex2bin, not
2872 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2874 2014-02-12 Tom Tromey <tromey@redhat.com>
2876 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2877 convert_int_to_ascii.
2878 * regcache.c (registers_to_string, collect_register_as_string):
2880 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2882 * server.c (process_serial_event): Likewise.
2883 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2884 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2886 2014-02-12 Tom Tromey <tromey@redhat.com>
2888 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2889 bin2hex, not hexify.
2890 * tracepoint.c (cmd_qtstatus): Likewise.
2892 2014-02-12 Tom Tromey <tromey@redhat.com>
2894 * remote-utils.c (monitor_output): Pass explicit length to
2897 2014-02-12 Tom Tromey <tromey@redhat.com>
2899 * tracepoint.c: Include rsp-low.h.
2900 * server.c: Include rsp-low.h.
2901 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2902 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2904 * remote-utils.c: Include rsp-low.h.
2905 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2906 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2907 (convert_int_to_ascii, convert_ascii_to_int): Move to
2909 * regcache.c: Include rsp-low.h.
2910 * ax.c: Include rsp-low.h.
2911 * Makefile.in (SFILES): Add common/rsp-low.c.
2912 (OBS): Add rsp-low.o.
2913 (rsp-low.o): New target.
2915 2014-02-12 Tom Tromey <tromey@redhat.com>
2917 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2918 Include print-utils.h.
2919 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2920 (plongest, thirty_two, phex_nz): Remove.
2921 * Makefile.in (SFILES): Add common/print-utils.c.
2922 (OBS): Add print-utils.o.
2923 (print-utils-ipa.o): New target.
2924 (print-utils.o): New target.
2925 (IPA_OBJS): Add print-utils-ipa.o.
2927 2014-02-06 Tom Tromey <tromey@redhat.com>
2929 * Makefile.in (SFILES): Fix indentation.
2931 2014-02-05 Doug Evans <dje@google.com>
2933 * linux-low.c (linux_wait_for_event): Improve comment.
2934 (linux_wait_1): Keep current_inferior in sync with event_child.
2936 2014-01-22 Doug Evans <dje@google.com>
2938 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2940 2014-01-22 Doug Evans <dje@google.com>
2942 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2943 * configure: Regenerate.
2944 * config.in: Regenerate.
2945 * Makefile.in (SFILES): Add debug.c.
2947 * debug.c: New file.
2948 * debug.h: New file.
2949 * linux-aarch64-low.c (*): Update all debugging printfs to use
2950 debug_printf instead of fprintf.
2951 * linux-arm-low.c (*): Ditto.
2952 * linux-cris-low.c (*): Ditto.
2953 * linux-crisv32-low.c (*): Ditto.
2954 * linux-m32r-low.c (*): Ditto.
2955 * linux-sparc-low.c (*): Ditto.
2956 * linux-x86.c (*): Ditto.
2957 * linux-low.c (*): Ditto.
2958 (linux_wait_1): Add calls to debug_enter, debug_exit.
2959 (linux_wait): Remove redundant debugging printf.
2960 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2961 (linux_resume, unstop_all_lwps): Ditto.
2962 * mem-break.c (*): Update all debugging printfs to use
2963 debug_printf instead of fprintf.
2964 * remote-utils.c (*): Ditto.
2965 * thread-db.c (*): Ditto.
2966 * server.c #include <ctype.h>, "gdb_vecs.h".
2967 (debug_threads): Moved to debug.c.
2968 (*): Update all debugging printfs to use debug_printf instead of
2970 (start_inferior): Replace call to fflush with call to debug_flush.
2971 (monitor_show_help): Mention set debug-format.
2972 (parse_debug_format_options): New function.
2973 (handle_monitor_command): Handle "monitor set debug-format".
2974 (gdbserver_usage): Mention --debug-format.
2975 (main): Parse --debug-format.
2976 * server.h (debug_threads): Declaration moved to debug.h.
2978 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2979 trace_debug_1 that uses debug_printf.
2980 (tracepoint_look_up_symbols): Update all debugging printfs to use
2981 debug_printf instead of fprintf.
2983 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2985 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2988 2014-01-17 Pedro Alves <palves@redhat.com>
2991 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2992 defined after including gdb_proc_service.h.
2994 2014-01-16 Doug Evans <dje@google.com>
2996 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2997 (match_dll): Use it.
2999 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3001 * target.h (target_ops) <read_btrace>: Change parameters and
3002 return type to allow error reporting.
3003 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3004 trace reading errors on.
3005 * linux-low.c (linux_low_read_btrace): Pass trace reading
3007 (linux_low_disable_btrace): New.
3009 2014-01-15 Doug Evans <dje@google.com>
3011 * inferiors.c (thread_id_to_gdb_id): Delete.
3012 * inferiors.h (thread_id_to_gdb_id): Delete.
3014 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3016 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3017 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3020 2014-01-08 Pedro Alves <palves@redhat.com>
3022 * server.c (handle_status): Don't discard previous queued stop
3023 replies or thread's pending status here.
3024 (main) <disconnection>: Do it here instead.
3026 2014-01-08 Pedro Alves <palves@redhat.com>
3028 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3029 * server.c (visit_actioned_threads, handle_pending_status): New
3031 (handle_v_cont): Factor out parts to ...
3032 (resume): ... this new function. If in all-stop, and a thread
3033 being resumed has a pending status, report it without actually
3035 (myresume): Adjust to use the new 'resume' function.
3036 (clear_pending_status_callback, set_pending_status_callback)
3037 (find_status_pending_thread_callback): New functions.
3038 (handle_status): Handle the case of multiple threads having
3039 interesting statuses to report. Report threads' real last signal
3040 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3041 with an interesting thread to report the status for, instead of
3042 always reporting the status of the first thread.
3044 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3046 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3047 * gdbreplay.c (gdbreplay_version): Likewise.
3049 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3051 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3052 iov.iov_len with the real length in use.
3054 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3056 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3057 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3058 for all targets that use win32-low.c.
3059 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3060 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3062 2013-12-13 Pedro Alves <palves@redhat.com>
3064 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3065 if equal to TARGET_WAITKIND_LOADED.
3066 * win32-low.c (cached_status): New static global.
3067 (win32_wait): Add declaration.
3068 (do_initial_child_stuff): Flush all initial pending debug events
3069 up to the initial breakpoint.
3070 (win32_wait): If CACHED_STATUS was set, return that instead
3071 of doing a real wait. Remove the code resuming the execution
3072 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3073 during the initial phase. Also remove the code changing
3074 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3075 TARGET_WAITKIND_STOPPED.
3077 2013-12-11 Yao Qi <yao@codesourcery.com>
3079 * notif.c (handle_notif_ack): Return 0 if no notification
3082 2013-11-20 Doug Evans <dje@google.com>
3084 * linux-low.c (linux_set_resume_request): Fix comment.
3086 2013-11-20 Doug Evans <dje@google.com>
3088 * linux-low.c (resume_status_pending_p): Tweak comment.
3090 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3092 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3093 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3094 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3095 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3096 (srv_amd64_regobj): Add amd64-mpx.o.
3097 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3098 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3099 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3100 * i387-fp.c (num_pl_bnd_register) Added constant.
3101 (num_pl_bnd_cfg_registers) Added constant.
3102 (struct i387_xsave) Added reserved area and MPX fields.
3103 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3104 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3106 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3107 (init_registers_amd64_mpx_linux): Declare new function.
3108 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3109 (x86_64_regmap): Add MPX registers.
3110 (x86_linux_read_description): Add MPX case.
3111 (initialize_low_arch): Initialize MPX targets.
3113 2013-11-18 Tom Tromey <tromey@redhat.com>
3115 * configure: Rebuild.
3116 * configure.ac: Don't check for stdlib.h.
3117 * gdbreplay.c: Unconditionally include stdlib.h.
3119 2013-11-18 Tom Tromey <tromey@redhat.com>
3121 * config.in: Rebuild.
3122 * configure: Rebuild.
3123 * configure.ac: Don't use AC_HEADER_DIRENT.
3125 2013-11-18 Tom Tromey <tromey@redhat.com>
3127 * server.h: Don't check HAVE_STRING_H.
3128 * gdbreplay.c: Don't check HAVE_STRING_H.
3129 * configure: Rebuild.
3131 2013-11-18 Tom Tromey <tromey@redhat.com>
3133 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3136 2013-11-08 Tom Tromey <tromey@redhat.com>
3138 * configure, config.in: Rebuild.
3139 * configure.ac: Remove unused configury.
3141 2013-11-08 Tom Tromey <tromey@redhat.com>
3143 * acinclude.m4: Include common.m4, codeset.m4.
3144 * configure, config.in: Rebuild.
3145 * configure.ac: Use GDB_AC_COMMON.
3147 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3149 * linux-s390-low.c (HWCAP_S390_TE): New define.
3150 (s390_arch_setup): Consider the TE field in the HWCAP for
3151 determining 'have_regset_tdb'.
3153 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3156 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3159 2013-10-02 Pedro Alves <palves@redhat.com>
3161 * server.c (process_serial_event): Don't output "GDBserver
3162 exiting" if GDB is connected through stdio.
3163 * target.c (mywait): Likewise, be silent if GDB is connected
3166 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3168 * lynx-low.c (lynx_add_threads_after_attach): New function.
3169 (lynx_attach): Remove call to add_thread. Add call to
3170 lynx_add_threads_after_attach instead.
3172 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3174 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3175 * config.in, configure: Regenerated.
3177 2013-09-18 Yao Qi <yao@codesourcery.com>
3180 * server.c (start_inferior): Clear 'resume_info'.
3182 2013-09-16 Jiong Wang <jiwang@tilera.com>
3184 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3187 2013-09-16 Jiong Wang <jiwang@tilera.com>
3189 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3190 linux-tile-low.o to srv_tgtobj.
3192 2013-09-16 Will Newton <will.newton@linaro.org>
3194 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3197 2013-09-06 Pedro Alves <palves@redhat.com>
3199 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3200 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3201 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3202 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3203 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3204 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3206 2013-09-06 Pedro Alves <palves@redhat.com>
3208 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3209 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3211 2013-09-06 Pedro Alves <palves@redhat.com>
3213 * linux-amd64-ipa.c: Include tracepoint.h.
3214 * linux-i386-ipa.c: Include tracepoint.h.
3216 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3218 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3219 (ps_get_thread_area): New function.
3221 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3223 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3224 (initialize_low_arch): Call init_registers_crisv32 rather than
3225 init_register_crisv32.
3227 2013-09-05 Pedro Alves <palves@redhat.com>
3229 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3231 * hostio.h: ... this new file.
3232 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3233 win32-low.c: Include hostio.h.
3235 2013-09-05 Pedro Alves <palves@redhat.com>
3237 * server.h (gdb_client_data, handler_func, callback_handler_func)
3238 (delete_file_handler, add_file_handler, append_callback_event)
3239 (delete_callback_event, start_event_loop, initialize_event_loop):
3240 Move to event-loop.h and include it.
3241 * event-loop.h: New file.
3243 2013-09-05 Pedro Alves <palves@redhat.com>
3245 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3246 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3247 (loaded_dll, unloaded_dll): Move to ...
3248 * dll.h: ... this new file.
3249 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3251 2013-09-05 Pedro Alves <palves@redhat.com>
3253 * server.h (current_process, get_thread_process, all_processes)
3254 (add_inferior_to_list, for_each_inferior, current_inferior)
3255 (remove_inferior, add_process, remove_process, find_process_pid)
3256 (have_started_inferiors_p, have_attached_inferiors_p)
3257 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3258 (clear_inferiors, find_inferior, find_inferior_id)
3259 (inferior_target_data, set_inferior_target_data)
3260 (inferior_regcache_data, set_inferior_regcache_data): Move to
3261 inferiors.h, and include it.
3262 * inferiors.h: New file.
3264 2013-09-05 Pedro Alves <palves@redhat.com>
3266 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3270 2013-09-05 Pedro Alves <palves@redhat.com>
3272 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3274 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3275 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3276 (handle_tracepoint_general_set, handle_tracepoint_query)
3277 (tracepoint_finished_step, tracepoint_was_hit)
3278 (release_while_stepping_state_list, current_traceframe)
3279 (in_readonly_region, traceframe_read_mem)
3280 (fetch_traceframe_registers, traceframe_read_sdata)
3281 (traceframe_read_info, struct fast_tpoint_collect_status)
3282 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3283 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3284 (supply_fast_tracepoint_registers)
3285 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3286 (ipa_tdesc, claim_trampoline_space)
3287 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3288 (agent_mem_read, agent_get_trace_state_variable_value)
3289 (agent_set_trace_state_variable_value, agent_tsv_read)
3290 (agent_mem_read_string, get_raw_reg_func_addr)
3291 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3292 * tracepoint.h: ... this new file.
3294 2013-09-05 Pedro Alves <palves@redhat.com>
3296 * server.h (perror_with_name, error, fatal, warning, paddress)
3297 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3299 * utils.h: New file.
3301 2013-09-05 Pedro Alves <palves@redhat.com>
3303 * server.h (remote_debug, noack_mode, transport_is_reliable)
3304 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3305 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3306 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3307 (write_enn, initialize_async_io, enable_async_io)
3308 (disable_async_io, check_remote_input_interrupt_request)
3309 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3310 (dead_thread_notify, prepare_resume_reply)
3311 (decode_address_to_semicolon, decode_address, decode_m_packet)
3312 (decode_M_packet, decode_X_packet, decode_xfer_write)
3313 (decode_search_memory_packet, unhexify, hexify)
3314 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3315 (look_up_one_symbol, relocate_instruction)
3316 (monitor_output): Move to remote-utils.h, and include it.
3317 * remote-utils.h: New file.
3319 2013-09-05 Pedro Alves <palves@redhat.com>
3321 * server.h (_): Delete.
3323 2013-09-02 Pedro Alves <palves@redhat.com>
3325 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3326 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3328 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3330 2013-09-02 Pierre Muller <muller@sourceware.org>
3332 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3333 or WriteProcessMemory complete successfully and handle
3334 ERROR_PARTIAL_COPY error.
3336 2013-09-02 Pedro Alves <palves@redhat.com>
3338 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3339 error instead of EIO.
3341 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3344 * linux-low.c: Include filestuff.h.
3345 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3346 * lynx-low.c: Include filestuff.h.
3347 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3348 * server.c: Include filestuff.h.
3349 (main): Call notice_open_fds.
3350 * spu-low.c: Include filestuff.h.
3351 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3353 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3355 * Makefile.in: Explain why ../target and ../nat are not
3356 listed as include file search paths.
3357 (linux-waitpid.o): New object file rule.
3358 * configure.srv (srv_native_linux_obj): New variable.
3359 Replace all occurrences of linux native object files with
3360 $srv_native_linux_obj.
3361 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3362 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3363 (linux_enable_event_reporting): Remove declaration.
3364 (my_waitpid): Moved to common/linux-waitpid.c.
3365 (linux_wait_for_event): Pass ptid when calling
3366 linux_enable_event_reporting.
3367 (linux_supports_tracefork_flag): Remove.
3368 (linux_enable_event_reporting): Likewise.
3369 (linux_tracefork_grandchild): Remove.
3370 (STACK_SIZE): Moved to common/linux-ptrace.c.
3371 (linux_tracefork_child): Remove.
3372 (linux_test_for_tracefork): Remove.
3373 (linux_look_up_symbols): Call linux_supports_traceclone.
3374 (initialize_low): Remove call to linux_test_for_tracefork.
3375 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3376 common/linux-ptrace.h.
3377 (PTRACE_TYPE_ARG4): Likewise.
3378 Include linux-ptrace.h.
3380 2013-08-21 Pedro Alves <palves@redhat.com>
3382 * config.in: Renegerate.
3384 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3386 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3387 (SFILES): Remove $(srcdir)/common/target-common.c and
3388 add $(srcdir)/target/waitstatus.c.
3389 (OBS): Remove target-common.o and add waitstatus.o.
3390 (server_h): Remove $(srcdir)/../common/target-common.h and
3391 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3392 and $(srcdir)/../target/waitstatus.h.
3393 (target-common.o): Remove.
3394 (waitstatus.o): New target object file.
3395 * target.h: Do not include target-common.h and
3396 include target/resume.h, target/wait.h and
3397 target/waitstatus.h.
3399 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3401 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3402 to PTRACE_TYPE_ARG3.
3403 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3404 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3406 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3407 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3409 2013-07-27 Jie Zhang <jie@codesourcery.com>
3410 Daniel Jacobowitz <dan@codesourcery.com>
3411 Yao Qi <yao@codesourcery.com>
3413 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3414 (mips-linux-watch.o): New rule.
3415 (mips_linux_watch_h): New variable.
3416 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3418 * linux-mips-low.c: Include mips-linux-watch.h.
3419 (struct arch_process_info, struct arch_lwp_info): New.
3420 (update_watch_registers_callback): New function.
3421 (mips_linux_new_process, mips_linux_new_thread) New functions.
3422 (mips_linux_prepare_to_resume, mips_insert_point): New
3424 (mips_remove_point, mips_stopped_by_watchpoint): New
3426 (rsp_bp_type_to_target_hw_bp_type): New function.
3427 (mips_stopped_data_address): New function.
3428 (the_low_target): Add watchpoint support functions.
3430 2013-07-27 Yao Qi <yao@codesourcery.com>
3432 * i386-low.c: Include break-common.h.
3433 (enum target_hw_bp_type): Remove.
3435 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3437 * Makefile.in (SFILES): /common/target-common.c.
3438 (OBS): Add target-common.o.
3439 (server_h): Add $(srcdir)/../common/target-common.h.
3440 (target-common.o): New target.
3441 * server.c (queue_stop_reply_callback): Free
3442 status string after use.
3443 * target.c (target_waitstatus_to_string): Remove.
3444 * target.h: Include target-common.h.
3445 (resume_kind): Likewise.
3446 (target_waitkind): Likewise.
3447 (target_waitstatus): Likewise.
3448 (TARGET_WNOHANG): Likewise.
3450 2013-07-04 Yao Qi <yao@codesourcery.com>
3452 * Makefile.in (host_alias): Use @host_noncanonical@.
3453 (target_alias): Use @target_noncanonical@.
3454 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3455 ACX_NONCANONICAL_HOST.
3456 * configure: Regenerated.
3459 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3461 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3462 * configure: Rebuild.
3463 * Makefile.in (version_host, version_target): Get from configure.
3464 (version.c): Use $(version_host) and $(version_target).
3466 2013-07-03 Pedro Alves <palves@redhat.com>
3468 * Makefile.in (config.status): Depend on development.sh.
3469 * acinclude.m4: Include libmcheck.m4.
3470 * configure: Regenerate.
3472 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3474 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3475 attribute inside the parentheses.
3476 (winapi_DebugSetProcessKillOnExit): Ditto.
3477 (winapi_DebugBreakProcess): Ditto.
3478 (winapi_GenerateConsoleCtrlEvent): Ditto.
3480 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3482 * notif.h (notif_event): Add a dummy member to avoid compiler
3485 2013-07-01 Pedro Alves <palves@redhat.com>
3487 * hostio.c (HOSTIO_PATH_MAX): Define.
3488 (require_filename, handle_open, handle_unlink, handle_readlink):
3491 2013-07-01 Pedro Alves <palves@redhat.com>
3493 * server.h: Include "pathmax.h".
3494 * linux-low.c: Don't include sys/param.h.
3495 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3497 * win32-low.c: Don't include sys/param.h.
3498 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3500 2013-07-01 Pedro Alves <palves@redhat.com>
3502 * event-loop.c: Don't check HAVE_UNISTD_H before including
3504 * gdbreplay.c: Likewise.
3505 * remote-utils.c: Likewise.
3506 * server.c: Likewise.
3507 * configure.ac: Don't check for unistd.h.
3508 * configure: Regenerate.
3510 2013-06-28 Tom Tromey <tromey@redhat.com>
3512 * Makefile.in (version.c): Use version.in, not
3515 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3517 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3518 * configure: Rebuild.
3519 * Makefile.in (version_host, version_target): Get from configure.
3520 (version.c): Use $(version_host) and $(version_target).
3522 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3524 Fix trace-status to output user name without trailing colon.
3525 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3527 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3529 Fix trace-status to output proper start-time and stop-time.
3530 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3531 output start time and stop time in hex as gdb expects.
3533 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3535 * tracepoint.c (build_traceframe_info_xml): Output trace state
3536 variables present in the trace buffer.
3538 2013-06-24 Tom Tromey <tromey@redhat.com>
3540 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3542 (version.o): Remove.
3543 * gdbreplay.c: Include version.h.
3544 (version, host_name): Don't declare.
3545 * server.h: Include version.h.
3546 (version, host_name): Don't declare.
3548 2013-06-12 Pedro Alves <palves@redhat.com>
3550 * linux-x86-low.c (linux_is_elf64): Delete global.
3551 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3552 with local linux_pid_exe_is_elf_64_file use.
3554 2013-06-11 Pedro Alves <palves@redhat.com>
3556 * linux-low.c (regset_disabled, disable_regset): New functions.
3557 (regsets_fetch_inferior_registers)
3558 (regsets_store_inferior_registers): Use them.
3559 (initialize_regsets_info); Don't allocate the disabled_regsets
3561 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3564 2013-06-11 Pedro Alves <palves@redhat.com>
3566 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3569 2013-06-11 Pedro Alves <palves@redhat.com>
3571 * linux-x86-low.c (initialize_low_arch): Call
3572 init_registers_x32_avx_linux.
3574 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3576 Fix compatibility with Android Bionic.
3577 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3580 2013-06-07 Pedro Alves <palves@redhat.com>
3583 * Makefile.in (OBS): Add tdesc.o.
3584 (IPA_OBJS): Add tdesc-ipa.o.
3585 (tdesc-ipa.o): New rule.
3586 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3588 * linux-low.c (new_inferior): Delete.
3589 (disabled_regsets, num_regsets): Delete.
3590 (linux_add_process): Adjust to set the new per-process
3592 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3593 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3594 was a stop. When calling arch_setup, switch the current inferior
3595 to the thread that got an event.
3596 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3597 (regsets_fetch_inferior_registers)
3598 (regsets_store_inferior_registers): New regsets_info parameter.
3600 (linux_register_in_regsets): New regs_info parameter. Adjust to
3602 (register_addr, fetch_register, store_register): New usrregs_info
3603 parameter. Adjust to use it.
3604 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3605 parameter regs_info. Adjust to use it.
3606 (linux_fetch_registers): Get the current inferior's regs_info, and
3608 (linux_store_registers): Ditto.
3609 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3610 (initialize_low): Don't initialize the target_regsets here. Call
3611 initialize_low_arch.
3612 * linux-low.h (target_regsets): Delete declaration.
3613 (struct regsets_info): New.
3614 (struct usrregs_info): New.
3615 (struct regs_info): New.
3616 (struct process_info_private) <new_inferior>: New field.
3617 (struct linux_target_ops): Delete the num_regs, regmap, and
3618 regset_bitmap fields. New field regs_info.
3619 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3620 * i387-fp.c (num_xmm_registers): Delete.
3621 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3622 calls to new interface.
3623 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3624 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3625 Infer the number of xmm registers from the regcache's target
3627 * i387-fp.h (num_xmm_registers): Delete.
3628 * inferiors.c (add_thread): Don't install the thread's regcache
3630 * proc-service.c (gregset_info): Fetch the current inferior's
3631 regs_info. Adjust to use it.
3632 * regcache.c: Include tdesc.h.
3633 (register_bytes, reg_defs, num_registers)
3634 (gdbserver_expedite_regs): Delete.
3635 (get_thread_regcache): If the thread doesn't have a regcache yet,
3636 create one, instead of aborting gdbserver.
3637 (regcache_invalidate_one): Rename to ...
3638 (regcache_invalidate_thread): ... this.
3639 (regcache_invalidate_one): New.
3640 (regcache_invalidate): Only invalidate registers of the current
3642 (init_register_cache): Add target_desc parameter, and use it.
3643 (new_register_cache): Ditto. Assert the target description has a
3644 non zero registers_size.
3645 (regcache_cpy): Add assertions. Adjust.
3646 (realloc_register_cache, set_register_cache): Delete.
3647 (registers_to_string, registers_from_string): Adjust.
3648 (find_register_by_name, find_regno, find_register_by_number)
3649 (register_cache_size): Add target_desc parameter, and use it.
3650 (free_register_cache_thread, free_register_cache_thread_one)
3651 (regcache_release, register_cache_size): New.
3652 (register_size): Add target_desc parameter, and use it.
3653 (register_data, supply_register, supply_register_zeroed)
3654 (supply_regblock, supply_register_by_name, collect_register)
3655 (collect_register_as_string, collect_register_by_name): Adjust.
3656 * regcache.h (struct target_desc): Forward declare.
3657 (struct regcache) <tdesc>: New field.
3658 (init_register_cache, new_register_cache): Add target_desc
3660 (regcache_invalidate_thread): Declare.
3661 (regcache_invalidate_one): Delete declaration.
3662 (regcache_release): Declare.
3663 (find_register_by_number, register_cache_size, register_size)
3664 (find_regno): Add target_desc parameter.
3665 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3667 * remote-utils.c: Include tdesc.h.
3668 (outreg, prepare_resume_reply): Adjust.
3669 * server.c: Include tdesc.h.
3670 (gdbserver_xmltarget): Delete declaration.
3671 (get_features_xml, process_serial_event): Adjust.
3672 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3674 (struct process_info) <tdesc>: New field.
3675 (ipa_tdesc): Declare.
3676 * tdesc.c: New file.
3677 * tdesc.h: New file.
3678 * tracepoint.c: Include tdesc.h.
3679 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3680 (get_context_regcache): Adjust to pass ipa_tdesc down.
3681 (do_action_at_tracepoint): Adjust to get the register cache size
3682 from the context regcache's description.
3683 (traceframe_walk_blocks): Adjust to get the register cache size
3684 from the current trace frame's description.
3685 (traceframe_get_pc): Adjust to get current trace frame's
3686 description and pass it down.
3687 (gdb_collect): Adjust to get the register cache size from the
3689 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3690 (gdbserver_xmltarget): Delete.
3691 (initialize_low_tracepoint): Set the ipa's target description.
3692 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3693 (initialize_low_tracepoint): Set the ipa's target description.
3694 * linux-x86-low.c: Include tdesc.h.
3695 [__x86_64__] (is_64bit_tdesc): New.
3696 (ps_get_thread_area, x86_get_thread_area): Use it.
3697 (i386_cannot_store_register): Rename to ...
3698 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3699 (i386_cannot_fetch_register): Rename to ...
3700 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3701 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3703 (target_regsets): Rename to ...
3704 (x86_regsets): ... this.
3705 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3707 (x86_siginfo_fixup): Use is_64bit_tdesc.
3708 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3709 (tdesc_x32_avx_linux, tdesc_x32_linux)
3710 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3712 (x86_linux_update_xmltarget): Delete.
3713 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3714 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3715 (AMD64_LINUX_USER64_CS): New.
3716 (x86_linux_read_description): New, based on
3717 x86_linux_update_xmltarget.
3718 (same_process_callback): New.
3719 (x86_arch_setup_process_callback): New.
3720 (x86_linux_update_xmltarget): New.
3721 (x86_regsets_info): New.
3722 (amd64_linux_regs_info): New.
3723 (i386_linux_usrregs_info): New.
3724 (i386_linux_regs_info): New.
3725 (x86_linux_regs_info): New.
3726 (x86_arch_setup): Reimplement.
3727 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3728 (x86_emit_ops): Ditto.
3729 (the_low_target): Adjust. Install x86_linux_regs_info,
3730 x86_cannot_fetch_register, and x86_cannot_store_register.
3731 (initialize_low_arch): New.
3732 * linux-ia64-low.c (tdesc_ia64): Declare.
3733 (ia64_fetch_register): Adjust.
3734 (ia64_usrregs_info, regs_info): New globals.
3735 (ia64_regs_info): New function.
3736 (the_low_target): Adjust.
3737 (initialize_low_arch): New function.
3738 * linux-sparc-low.c (tdesc_sparc64): Declare.
3739 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3741 (sparc_arch_setup): New function.
3742 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3743 (the_low_target): Adjust.
3744 (initialize_low_arch): New function.
3745 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3746 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3747 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3748 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3749 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3750 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3751 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3752 (tdesc_powerpc_isa205_vsx64l): Declare.
3753 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3754 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3755 (ppc_set_pc, ppc_get_hwcap): Adjust.
3756 (ppc_usrregs_info): Forward declare.
3757 (!__powerpc64__) ppc_regmap_adjusted: New global.
3758 (ppc_arch_setup): Adjust to the current process'es target
3760 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3761 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3762 (ppc_store_evrregset): Adjust.
3763 (target_regsets): Rename to ...
3764 (ppc_regsets): ... this, and make static.
3765 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3766 (ppc_regs_info): New function.
3767 (the_low_target): Adjust.
3768 (initialize_low_arch): New function.
3769 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3770 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3771 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3772 (tdesc_s390x_linux64v2): Declare.
3773 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3774 (s390_fill_gregset, s390_store_last_break): Adjust.
3775 (target_regsets): Rename to ...
3776 (s390_regsets): ... this, and make static.
3777 (s390_get_pc, s390_set_pc): Adjust.
3778 (s390_get_hwcap): New target_desc parameter, and use it.
3779 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3780 (s390_arch_setup): Adjust to set the current process'es target
3781 description. Don't adjust the regmap.
3782 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3783 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3784 (regs_info_3264): New globals.
3785 (s390_regs_info): New function.
3786 (the_low_target): Adjust.
3787 (initialize_low_arch): New function.
3788 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3789 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3790 [__mips64] (init_registers_mips_linux)
3791 (init_registers_mips_dsp_linux): Delete defines.
3792 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3793 (have_dsp): New global.
3794 (mips_read_description): New, based on mips_arch_setup.
3795 (mips_arch_setup): Reimplement.
3796 (get_usrregs_info): New function.
3797 (mips_cannot_fetch_register, mips_cannot_store_register)
3798 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3799 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3800 (target_regsets): Rename to ...
3801 (mips_regsets): ... this, and make static.
3802 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3803 (dsp_regs_info, regs_info): New globals.
3804 (mips_regs_info): New function.
3805 (the_low_target): Adjust.
3806 (initialize_low_arch): New function.
3807 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3808 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3810 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3811 (arm_read_description): New, with bits factored from
3813 (arm_arch_setup): Reimplement.
3814 (target_regsets): Rename to ...
3815 (arm_regsets): ... this, and make static.
3816 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3817 (arm_regs_info): New function.
3818 (the_low_target): Adjust.
3819 (initialize_low_arch): New function.
3820 * linux-m68k-low.c (tdesc_m68k): Declare.
3821 (target_regsets): Rename to ...
3822 (m68k_regsets): ... this, and make static.
3823 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3824 (m68k_regs_info): New function.
3825 (m68k_arch_setup): New function.
3826 (the_low_target): Adjust.
3827 (initialize_low_arch): New function.
3828 * linux-sh-low.c (tdesc_sharch): Declare.
3829 (target_regsets): Rename to ...
3830 (sh_regsets): ... this, and make static.
3831 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3832 (sh_regs_info, sh_arch_setup): New functions.
3833 (the_low_target): Adjust.
3834 (initialize_low_arch): New function.
3835 * linux-bfin-low.c (tdesc_bfin): Declare.
3836 (bfin_arch_setup): New function.
3837 (bfin_usrregs_info, regs_info): New globals.
3838 (bfin_regs_info): New function.
3839 (the_low_target): Adjust.
3840 (initialize_low_arch): New function.
3841 * linux-cris-low.c (tdesc_cris): Declare.
3842 (cris_arch_setup): New function.
3843 (cris_usrregs_info, regs_info): New globals.
3844 (cris_regs_info): New function.
3845 (the_low_target): Adjust.
3846 (initialize_low_arch): New function.
3847 * linux-cris-low.c (tdesc_crisv32): Declare.
3848 (cris_arch_setup): New function.
3849 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3850 (cris_regs_info): New function.
3851 (the_low_target): Adjust.
3852 (initialize_low_arch): New function.
3853 * linux-m32r-low.c (tdesc_m32r): Declare.
3854 (m32r_arch_setup): New function.
3855 (m32r_usrregs_info, regs_info): New globals.
3856 (m32r_regs_info): Adjust.
3857 (initialize_low_arch): New function.
3858 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3859 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3860 (tic6x_usrregs_info): Forward declare.
3861 (tic6x_read_description): New function, based on ...
3862 (tic6x_arch_setup): ... this. Reimplement.
3863 (target_regsets): Rename to ...
3864 (tic6x_regsets): ... this, and make static.
3865 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3866 (tic6x_regs_info): New function.
3867 (the_low_target): Adjust.
3868 (initialize_low_arch): New function.
3869 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3870 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3871 (target_regsets): Rename to ...
3872 (xtensa_regsets): ... this, and make static.
3873 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3875 (xtensa_arch_setup, xtensa_regs_info): New functions.
3876 (the_low_target): Adjust.
3877 (initialize_low_arch): New function.
3878 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3879 (nios2_arch_setup): Set the current process'es tdesc.
3880 (target_regsets): Rename to ...
3881 (nios2_regsets): ... this.
3882 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3883 (nios2_regs_info): New function.
3884 (the_low_target): Adjust.
3885 (initialize_low_arch): New function.
3886 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3887 (aarch64_arch_setup): Set the current process'es tdesc.
3888 (target_regsets): Rename to ...
3889 (aarch64_regsets): ... this.
3890 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3891 (aarch64_regs_info): New function.
3892 (the_low_target): Adjust.
3893 (initialize_low_arch): New function.
3894 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3896 (target_regsets): Rename to ...
3897 (tile_regsets): ... this.
3898 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3899 (tile_regs_info): New function.
3900 (tile_arch_setup): Set the current process'es tdesc.
3901 (the_low_target): Adjust.
3902 (initialize_low_arch): New function.
3903 * spu-low.c (tdesc_spu): Declare.
3904 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3905 * win32-arm-low.c (tdesc_arm): Declare.
3906 (arm_arch_setup): New function.
3907 (the_low_target): Install arm_arch_setup instead of
3909 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3910 (init_windows_x86): Rename to ...
3911 (i386_arch_setup): ... this. Set `win32_tdesc'.
3912 (the_low_target): Adjust.
3913 * win32-low.c (win32_tdesc): New global.
3914 (child_add_thread): Don't create the thread cache here.
3915 (do_initial_child_stuff): Set the new process'es tdesc.
3916 * win32-low.h (struct target_desc): Forward declare.
3917 (win32_tdesc): Declare.
3918 * lynx-i386-low.c (tdesc_i386): Declare global.
3919 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3920 * lynx-low.c (lynx_tdesc): New global.
3921 (lynx_add_process): Set the new process'es tdesc.
3922 * lynx-low.h (struct target_desc): Forward declare.
3923 (lynx_tdesc): Declare global.
3924 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3925 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3926 * nto-low.c (nto_tdesc): New global.
3927 (do_attach): Set the new process'es tdesc.
3928 * nto-low.h (struct target_desc): Forward declare.
3929 (nto_tdesc): Declare.
3930 * nto-x86-low.c (tdesc_i386): Declare.
3931 (nto_x86_arch_setup): Set `nto_tdesc'.
3933 2013-06-04 Gary Benson <gbenson@redhat.com>
3935 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3936 to qSupported response when appropriate.
3937 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3938 with nonzero-length annex.
3939 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3940 arguments supplied in annex.
3942 2013-05-31 Doug Evans <dje@google.com>
3945 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3946 64 bits in 64-cross-32 environment.
3948 2013-05-28 Pedro Alves <palves@redhat.com>
3950 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3951 (aarch64-without-fpu.c): Delete rule.
3952 * configure.srv (aarch64*-*-linux*): Remove references to
3953 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3954 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3957 2013-05-24 Pedro Alves <palves@redhat.com>
3959 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3960 instead of strchr/decode_address. Error if the range isn't split
3961 with a ','. Don't assume there's be a ':' in the action.
3963 2013-05-23 Yao Qi <yao@codesourcery.com>
3964 Pedro Alves <palves@redhat.com>
3966 * linux-low.c (lwp_in_step_range): New function.
3967 (linux_wait_1): If the thread was range stepping and stopped
3968 outside the stepping range, report the stop to GDB. Otherwise,
3969 continue stepping. Add range stepping debug output.
3970 (linux_set_resume_request): Copy the step range from the resume
3972 (linux_supports_range_stepping): New.
3973 (linux_target_ops) <supports_range_stepping>: Set to
3974 linux_supports_range_stepping.
3975 * linux-low.h (struct linux_target_ops)
3976 <supports_range_stepping>: New field.
3977 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3978 * linux-x86-low.c (x86_supports_range_stepping): New.
3979 (the_low_target) <supports_range_stepping>: Set to
3980 x86_supports_range_stepping.
3981 * server.c (handle_v_cont): Handle 'r' action.
3982 (handle_v_requests): Append ";r" if the target supports range
3984 * target.h (struct thread_resume) <step_range_start,
3985 step_range_end>: New fields.
3986 (struct target_ops) <supports_range_stepping>:
3988 (target_supports_range_stepping): New macro.
3990 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3992 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3993 confusion in comment.
3995 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3997 * lynx-low.c (struct process_info_private): New type.
3998 (lynx_add_process): New function.
3999 (lynx_create_inferior, lynx_attach): Replace calls to
4000 add_process by calls to lynx_add_process.
4001 (lynx_resume): If PTID is null, then try using
4002 current_process()->private->last_wait_event_ptid.
4004 (lynx_clear_inferiors): Delete. The contents of that function
4005 has been inlined in lynx_mourn;
4006 (lynx_wait_1): Save the ptid in the process's private data.
4007 (lynx_mourn): Free the process' private data. Replace call
4008 to lynx_clear_inferiors by call to clear_inferiors.
4010 2013-05-17 Yao Qi <yao@codesourcery.com>
4012 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4015 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4017 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4018 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4019 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4020 PT_TEXT_END_ADDR guards. Update comments.
4021 (linux_target_op) <read_offsets>: Conditionally define to
4022 linux_read_offsets if the target is UCLIBC and if it defines
4023 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4025 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4026 Andrew Jenner <andrew@codesourcery.com>
4028 * Makefile.in (SFILES): Add linux-nios2-low.c.
4029 (clean): Add action to delete nios2-linux.c.
4030 (nios2-linux.c): New rule.
4031 * configure.srv: Add nios2*-*-linux*.
4032 * linux-nios2-low.c: New.
4034 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4036 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4038 2013-04-25 Hui Zhu <hui@codesourcery.com>
4041 * ax.c (ax_printf): Add fflush.
4043 2013-04-22 Tom Tromey <tromey@redhat.com>
4045 * Makefile.in (SFILES): Add filestuff.c.
4046 (OBS): Add filestuff.o.
4047 (filestuff.o): New target.
4048 * config.in, configure: Rebuild.
4049 * configure.ac: Check for fdwalk, pipe2.
4051 2013-04-17 Pedro Alves <palves@redhat.com>
4053 * configure.ac (USE_THREAD_DB): Delete variable.
4054 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4055 Don't AC_SUBST USE_THREAD_DB.
4056 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4057 * config.in, configure: Regenerate.
4059 2013-04-16 Pedro Alves <palves@redhat.com>
4061 * linux-low.h (struct lwp_info) <thread_known>: Move under
4062 the USE_THREAD_DB #ifdef.
4064 2013-04-16 Pedro Alves <palves@redhat.com>
4066 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4067 (linux-low.o): Delete rule.
4068 * linux-low.h: Always include "gdb_thread_db.h" instead of
4069 conditionally including thread_db.h.
4070 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4073 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4075 * Makefile.in (install-only): Fix make install regression.
4077 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4079 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4080 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4082 * gdbserver.1: Remove.
4084 2013-03-22 Pedro Alves <palves@redhat.com>
4086 * linux-low.c (handle_extended_wait): Don't call
4087 linux_enable_event_reporting.
4089 2013-03-15 Tony Theodore <tonyt@logyst.com>
4092 * Makefile.in (SHELL): Use @SHELL@.
4094 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4096 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4099 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4101 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4102 Remove extraneous NULL element.
4104 2013-03-13 Yao Qi <yao@codesourcery.com>
4106 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4107 'V' block in trace frame.
4109 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4111 * target.h (struct target_ops): Add btrace ops.
4112 (target_supports_btrace): New macro.
4113 (target_enable_btrace): New macro.
4114 (target_disable_btrace): New macro.
4115 (target_read_btrace): New macro.
4116 * gdbthread.h (struct thread_info): Add btrace field.
4117 * server.c: Include btrace-common.h.
4118 (handle_btrace_general_set): New function.
4119 (handle_btrace_enable): New function.
4120 (handle_btrace_disable): New function.
4121 (handle_general_set): Call handle_btrace_general_set.
4122 (handle_qxfer_btrace): New function.
4123 (struct qxfer qxfer_packets[]): Add btrace entry.
4124 * inferiors.c (remove_thread): Disable btrace.
4125 * linux-low: Include linux-btrace.h.
4126 (linux_low_enable_btrace): New function.
4127 (linux_low_read_btrace): New function.
4128 (linux_target_ops): Add btrace ops.
4129 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4130 Add srv_linux_btrace=yes.
4131 (x86_64-*-linux*): Add linux-btrace.o.
4132 Add srv_linux_btrace=yes.
4133 * configure.ac: Define HAVE_LINUX_BTRACE.
4134 * config.in: Regenerated.
4135 * configure: Regenerated.
4137 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4139 * server.c (handle_qxfer): Preserve error message if -3 is
4141 (qxfer): Document the -3 return value.
4143 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4145 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4146 (linux_btrace_h): New variable.
4147 (linux-btrace.o): New rule.
4149 2013-03-08 Stan Shebs <stan@codesourcery.com>
4150 Hafiz Abid Qadeer <abidh@codesourcery.com>
4152 * tracepoint.c (trace_buffer_size): New global.
4153 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4154 (init_trace_buffer): Change to one-argument function. Allocate
4155 trace buffer memory.
4156 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4157 handle QTBuffer:size packet.
4158 (cmd_bigqtbuffer_size): New function.
4159 (initialize_tracepoint): Call init_trace_buffer with
4160 DEFAULT_TRACE_BUFFER_SIZE.
4161 * server.c (handle_query): Add QTBuffer:size in the
4164 2013-03-07 Yao Qi <yao@codesourcery.com>
4166 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4167 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4169 (cmd_qtsp): Adjust condition. Do post increment.
4170 Set cur_action and cur_step_action back to 0.
4172 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4175 * linux-low.c (linux_write_memory): Return early success if LEN is
4178 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4180 * configure.srv: Add x86_64-*-cygwin* as target.
4182 2013-02-28 Tom Tromey <tromey@redhat.com>
4184 * configure.ac: Invoke AC_SYS_LARGEFILE.
4185 * configure, config.in: Rebuild.
4187 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4189 * win32-low.c: Throughout, fix format strings and casts of
4190 printf-like functions to avoid type related warnings on all
4192 (get_child_debug_event): Print dwDebugEventCode as hex since
4193 that's how it's usually documented.
4195 2013-02-28 Yao Qi <yao@codesourcery.com>
4197 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4200 2013-02-27 Jiong Wang <jiwang@tilera.com>
4202 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4203 (reg-tilegx32.c): New rule.
4204 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4205 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4206 different register info initializer according to elf class.
4207 (init_registers_tilgx32): New function. The tilegx32 register info
4209 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4210 (tile_store_gregset): Likewise.
4212 2013-02-27 Yao Qi <yao@codesourcery.com>
4214 * server.c (process_point_options): Print debug message when
4215 debug_threads is true.
4217 2013-02-26 Yao Qi <yao@codesourcery.com>
4219 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4221 2013-02-19 Pedro Alves <palves@redhat.com>
4222 Kai Tietz <ktietz@redhat.com>
4226 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4227 instead of strtoul to extract address from packet.
4228 (process_serial_event) <'z'>: Likewise.
4230 2013-02-18 Yao Qi <yao@codesourcery.com>
4232 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4234 2013-02-14 Pedro Alves <palves@redhat.com>
4238 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4239 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4241 2013-02-14 Pedro Alves <palves@redhat.com>
4243 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4245 2013-02-14 Pedro Alves <palves@redhat.com>
4247 * tracepoint.c (save_string): Delete.
4248 (add_tracepoint_action): Use savestring instead of save_string.
4250 2013-02-12 Pedro Alves <palves@redhat.com>
4252 * linux-xtensa-low.c: Ditto.
4253 * xtensa-xtregs.c: Ditto.
4255 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4257 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4260 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4262 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4263 aarch64_num_wp_regs and aarch64_num_bp_regs to
4264 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4266 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4268 * linux-aarch64-low.c (ps_get_thread_area): Replace
4269 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4271 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4272 Marcus Shawcroft <marcus.shawcroft@arm.com>
4273 Nigel Stephens <nigel.stephens@arm.com>
4274 Yufeng Zhang <yufeng.zhang@arm.com>
4276 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4277 (aarch64.c, aarch64-without-fpu.c): New targets.
4278 * configure.srv (aarch64*-*-linux*): New.
4279 * linux-aarch64-low.c: New file.
4281 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4283 * linux-low.c (handle_extended_wait, linux_create_inferior)
4284 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4285 (dequeue_one_deferred_signal, linux_resume_one_thread)
4286 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4287 (linux_tracefork_grandchild, linux_test_for_tracefork)
4288 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4289 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4290 where the argument is 0.
4292 2013-01-25 Yao Qi <yao@codesourcery.com>
4294 * event-loop.c: Include "queue.h".
4295 (gdb_event_p): New typedef.
4296 (struct gdb_event) <next_event>: Remove.
4297 (event_queue): Change to QUEUE(gdb_event_p).
4298 (async_queue_event): Remove.
4299 (gdb_event_xfree): New.
4300 (initialize_event_loop): New.
4301 (process_event): Use API from QUEUE.
4302 (wait_for_event): Likewise.
4303 * server.c (main): Call initialize_event_loop.
4304 * server.h (initialize_event_loop): Declare.
4306 2013-01-18 Yao Qi <yao@codesourcery.com>
4308 * ax.h (struct eval_agent_expr_context): New.
4309 (gdb_eval_agent_expr): Update declaration.
4310 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4311 TFRAME. Add new argument CTX.
4312 * server.h (struct eval_agent_expr_context): Declare.
4313 (agent_mem_read, agent_tsv_read): Update declaration.
4314 (agent_mem_read_string): Likewise.
4315 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4316 (add_traceframe_block): Add new argument TPOINT.
4317 Increase TPOINT->traceframe_usage.
4318 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4319 eval_tracepoint_agent_expr.
4320 (condition_true_at_tracepoint): Likewise.
4321 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4322 (agent_mem_read_string, agent_tsv_read): Likewise.
4324 2013-01-16 Yao Qi <yao@codesourcery.com>
4326 * linux-low.c (linux_resume_one_lwp): Don't check
4327 'lwp->bp_reinsert != 0'.
4329 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4330 Pedro Alves <palves@redhat.com>
4332 * lynx-low.c (ptrace_request_to_str): Define a temporary
4333 macro and use it to simplify this function's implementation.
4335 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4337 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4340 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4342 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4344 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4346 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4348 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4350 * lynx-low.c (lynx_resume): Use the resume_info parameter
4351 to determine the ptid for the lynx_ptrace call, unless
4352 it is equal to minus_one_ptid, in which case we use the
4353 ptid of the current_inferior.
4354 (lynx_wait_1): After having received a thread create/exit
4355 event, resume the inferior's execution using the signaling
4356 thread's ptid, rather than the old ptid.
4358 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4360 * lynx-low.c (lynx_resume): Delete variable ret.
4362 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4364 * gdbreplay.c (gdbreplay_version): Update copyright year.
4365 * server.c (gdbserver_version): Likewise.
4367 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4369 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4372 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4374 * lynx-low.c (ptrace_request_to_str): Add handling for
4377 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4379 * lynx-low.c (lynx_attach): Delete variable new_process.
4381 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4383 * lynx-low.c (lynx_create_inferior): Delete variable
4386 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4388 * lynx-low.c (ptrace_request_to_str): Do not handle
4389 PTRACE_GETTHREADLIST if this macro does not exist.
4391 2012-12-15 Yao Qi <yao@codesourcery.com>
4393 * Makefile.in (OBS): Add notif.o.
4394 * notif.c, notif.h: New.
4395 * server.c: Include "notif.h".
4396 (struct vstop_notif) <next>: Remove.
4398 (queue_stop_reply): Update.
4399 (push_event, send_next_stop_reply): Remove.
4400 (discard_queued_stop_replies): Update.
4401 (notif_stop): New variable.
4402 (handle_v_stopped): Remove.
4403 (handle_v_requests): Don't call handle_v_stopped. Call
4404 handle_ack_notif instead.
4405 (queue_stop_reply_callback): Call notif_event_enque instead
4406 of queue_stop_reply.
4407 (handle_status): Don't call send_next_stop_reply, call
4408 notif_write_event instead.
4409 (kill_inferior_callback): Likewise.
4410 (detach_or_kill_inferior_callback): Likewise.
4411 (main): Call initialize_notif.
4412 (process_serial_event): Call QUEUE_is_empty.
4413 (handle_target_event): Call notif_push instead of push event.
4414 * server.h (push_event): Remove declaration.
4416 2012-12-10 Tom Tromey <tromey@redhat.com>
4418 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4419 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4422 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4423 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4424 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4425 (amd64-linux-ipa.o, ax.o): Rewrite.
4426 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4427 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4428 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4429 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4430 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4431 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4432 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4433 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4434 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4435 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4436 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4437 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4438 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4439 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4440 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4441 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4442 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4443 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4444 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4445 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4446 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4447 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4448 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4449 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4450 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4451 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4452 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4453 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4454 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4455 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4456 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4457 (reg-tilegx.o): Remove.
4458 (all_object_files): New macro.
4459 Include .deps files.
4460 * aclocal.m4, configure: Rebuild.
4461 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4462 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4463 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4465 2012-12-05 Tom Tromey <tromey@redhat.com>
4468 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4470 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4472 * configure.ac: Check for linux/perf_event.h.
4473 * config.in: Regenerated.
4474 * configure: Regenerated.
4476 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4478 * hostio.c (handle_readlink): Decrease buffer size
4479 parameter passed to readlink by one byte.
4481 2012-11-26 Yao Qi <yao@codesourcery.com>
4483 * configure.ac (build_warnings): Append '-Wempty-body'.
4484 * configure: Regenerated.
4485 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4488 2012-11-15 Pierre Muller <muller@sourceware.org>
4490 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4491 * config.in: Regenerate.
4492 * configure: Regenerate.
4493 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4494 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4495 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4496 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4498 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4499 instead of <sys/wait.h> header.
4500 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4502 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4504 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4505 (various make rules): Remove -DGDBSERVER
4507 2012-11-09 Yao Qi <yao@codesourcery.com>
4509 * spu-low.c (current_ptid): Move it to ..
4510 * gdbthread.h: ... here. New.
4511 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4512 * server.c (myresume, process_serial_event): Likewise.
4513 * thread-db.c (thread_db_find_new_threads): Likewise.
4514 * tracepoint.c (run_inferior_command): Likewise.
4516 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4518 * server.c (handle_search_memory_1): Include access length in
4521 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4523 * linux-crisv32-low.c: Fix compile errors.
4525 2012-09-04 Yao Qi <yao@codesourcery.com>
4527 * tracepoint.c (cmd_qtsv): Adjust debug message.
4528 Don't check CUR_TPOINT.
4530 2012-08-28 Yao Qi <yao@codesourcery.com>
4532 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4533 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4534 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4535 Remove declarations of xmalloc, xreallloc, xstrdup and
4537 * Makefile.in (libiberty_h): New.
4538 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4539 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4541 2012-08-23 Yao Qi <yao@codesourcery.com>
4543 * server.h: Remove declaration of 'xsnprintf'.
4545 2012-08-22 Keith Seitz <keiths@redhat.com>
4547 * server.h: Include build-gnulib-gbserver/config.h.
4548 * gdbreplay.c: Likewise.
4550 2012-08-08 Doug Evans <dje@google.com>
4552 * Makefile.in (SFILES): Add gdb_vecs.c.
4553 (OBS): Add gdb_vecs.o.
4554 (gdb_vecs_h, host_defs_h): New variables.
4555 (thread-db.o): Add $(gdb_vecs_h) dependency.
4556 (gdb_vecs.o): New rule.
4557 * thread-db.c: #include "gdb_vecs.h".
4558 (thread_db_load_search): Use a vector to iterate over path elements.
4559 Handle text appearing after "$pdir".
4561 * configure.ac: Add check for strstr.
4562 * config.in: Regenerate.
4563 * configure: Regenerate.
4565 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4567 * hostio.c (handle_pread): If pread fails, fall back to attempting
4569 (handle_pwrite): Likewise for pwrite.
4571 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4573 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4574 between unsupported TYPE and unimplementable ADDR/LEN combination.
4575 (arm_insert_point): Act on new return value.
4577 2012-07-31 Pedro Alves <palves@redhat.com>
4579 * server.c (process_point_options): Only skip tokens if we find
4580 one that is unrecognized. Don't treat 'X' specially while
4581 skipping unrecognized tokens.
4583 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4585 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4586 to 4-byte-align HW breakpoint addresses for Thumb.
4588 2012-07-27 Yao Qi <yao@codesourcery.com>
4592 * server.h: Declare gdb_agent_about_to_close.
4593 * target.c (kill_inferior): Include "agent.h".
4594 New. Send command 'kill'.
4595 * target.h (kill_inferior): Removed macro.
4596 * tracepoint.c (gdb_agent_about_to_close): New.
4597 (gdb_agent_helper_thread): Handle command 'close'.
4598 Wait endlessly until the inferior stops.
4599 Install gdb_agent_remove_socket to atexit hook.
4600 (agent_socket_name): New static variable.
4601 (gdb_agent_socket_init): Replace local variable 'name' with
4602 'agent_socket_name'.
4603 (gdb_agent_remove_socket): New.
4605 2012-07-27 Yao Qi <yao@codesourcery.com>
4607 * server.c (process_point_options): Stop at 'X' when parsing.
4609 2012-07-19 Michael Eager <eager@eagercon.com>
4611 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4613 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4614 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4615 hardware breakpoint.
4617 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4619 * gdbserver/linux-low.c (initialize_low): Call
4620 linux_ptrace_init_warnings.
4622 2012-07-02 Doug Evans <dje@google.com>
4624 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4627 2012-07-02 Stan Shebs <stan@codesourcery.com>
4629 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4630 (ax.o): Add it to build rule.
4632 (OBS): Add format.o.
4633 (IPA_OBS): Add format.o.
4634 * server.c (handle_query): Claim support for breakpoint commands.
4635 (process_point_options): Add command case.
4636 (process_serial_event): Leave running if there are printfs in
4638 * mem-break.h (any_persistent_commands): Declare.
4639 (add_breakpoint_commands): Declare.
4640 (gdb_no_commands_at_breakpoint): Declare.
4641 (run_breakpoint_commands): Declare.
4642 * mem-break.c (struct point_command_list): New struct.
4643 (struct breakpoint): New field command_list.
4644 (any_persistent_commands): New function.
4645 (add_commands_to_breakpoint): New function.
4646 (add_breakpoint_commands): New function.
4647 (gdb_no_commands_at_breakpoint): New function.
4648 (run_breakpoint_commands): New function.
4649 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4651 * ax.c: Include format.h.
4652 (ax_printf): New function.
4653 (gdb_eval_agent_expr): Add printf opcode.
4655 2012-06-13 Yao Qi <yao@codesourcery.com>
4657 * server.c (start_inferior): Remove duplicated writes to fields
4658 'last_resume_kind' and 'last_status' of 'current_inferior'.
4660 2012-06-12 Yao Qi <yao@codesourcery.com>
4661 Pedro Alves <palves@redhat.com>
4663 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4665 * server.c (handle_v_cont): Extend comment.
4667 2012-06-11 Yao Qi <yao@codesourcery.com>
4669 * linux-low.c (linux_attach): Add 'static'.
4671 2012-06-06 Yao Qi <yao@codesourcery.com>
4673 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4675 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4677 Fix gcc -flto compilation warning.
4678 * server.c (main): Make variable multi_mode and attach volatile.
4680 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4682 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4683 if the platform doesn't know about it.
4685 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4687 * Makefile.in (SFILES): Add linux-tile-low.c.
4688 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4689 * configure.srv: Handle tilegx-*-linux*.
4690 * linux-tile-low.c: New file.
4692 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4694 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4696 2012-05-24 Pedro Alves <palves@redhat.com>
4700 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4702 2012-05-24 Pedro Alves <palves@redhat.com>
4706 Replace target_signal with gdb_signal throughout.
4708 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4710 * linux-low.c (linux_store_registers): Avoid the copying sequence
4711 when no data has been retrieved by ptrace.
4713 2012-05-22 Will Deacon <will.deacon@arm.com>
4715 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4716 Include asm/ptrace.h.
4717 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4720 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4722 * linux-low.c (linux_store_registers): Don't re-retrieve data
4723 with ptrace that has already been obtained from /proc. Always
4724 copy any data retrieved with ptrace to the buffer supplied.
4726 2012-05-11 Yao Qi <yao@codesourcery.com>
4727 Pedro Alves <palves@redhat.com>
4729 * linux-low.c (enum stopping_threads_kind): New.
4730 (stopping_threads): Change type to `enum stopping_threads_kind'.
4731 (handle_extended_wait): If stopping and suspending threads, leave
4732 the new_lwp suspended too.
4733 (linux_wait_for_event): Adjust.
4734 (stop_all_lwps): Set `stopping_threads' to
4735 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4736 whether we're suspending threads or just stopping them. Assert no
4739 2012-04-29 Yao Qi <yao@codesourcery.com>
4741 * server.h: Move some code to ...
4742 * gdbthread.h: ... here. New.
4743 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4744 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4745 (nto-low.o, win32-low.o): Likewise.
4746 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4747 * regcache.c, remote-utils.c, server.c: Likewise.
4748 * target.c, tracepoint.c, win32-low.c: Likewise.
4750 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4752 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4753 (PTRACE_ARG4_TYPE): Likewise.
4754 (PTRACE_XFER_TYPE): Likewise.
4755 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4756 ptrace to PTRACE_ARG3_TYPE.
4757 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4758 (PTRACE_ARG4_TYPE): Likewise.
4759 (PTRACE_XFER_TYPE): Likewise.
4760 (linux_detach_one_lwp): Cast fourth argument of
4761 ptrace to long then PTRACE_ARG4_TYPE.
4762 (regsets_fetch_inferior_registers): Cast third argument of
4763 ptrace to long then PTRACE_ARG3_TYPE.
4764 (regsets_store_inferior_registers): Likewise.
4766 2012-04-20 Pedro Alves <palves@redhat.com>
4768 * configure: Regenerate.
4770 2012-04-19 Pedro Alves <palves@redhat.com>
4772 * Makefile.in (GNULIB_BUILDDIR): New.
4773 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4774 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4775 (all, install-only, uninstall, clean-info, all-lib, clean): No
4776 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4777 (maintainer-clean realclean distclean): Use subdir_do.
4779 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4780 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4781 * acinclude.m4: Include acx_configure_dir.m4.
4782 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4783 calls. Call AC_PROG_RANLIB. Configure gnulib using
4786 (GNULIB_STDINT_H): Adjust.
4787 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4788 * gdbreplay.c: Include build-gnulib/config.h.
4789 * server.h: Likewise.
4790 * aclocal.m4: Regenerate.
4791 * config.in: Regenerate.
4792 * configure: Regenerate.
4794 2012-04-19 Pedro Alves <palves@redhat.com>
4796 * Makefile.in (LIBGNU, INCGNU): Adjust.
4797 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4798 (all, install-only, uninstall, clean-info, all-lib, clean)
4799 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4800 * configure.ac: Adjust AC_OUTPUT output.
4801 * aclocal.m4: Regenerate.
4802 * configure: Regenerate.
4804 2012-04-19 Pedro Alves <palves@redhat.com>
4806 * Makefile.in (generated_files): New.
4807 (server_h): Remove the explicit dependency on config.h, and depend
4808 on $generated_files.
4810 2012-04-19 Pedro Alves <palves@redhat.com>
4812 * Makefile.in (INCGNU): Add -Ignulib.
4814 2012-04-19 Pedro Alves <palves@redhat.com>
4816 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4817 (INCGNU): ... this, and spell out -I here.
4818 (GNULIB_LIB): Rename to ...
4820 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4822 2012-04-19 Pedro Alves <palves@redhat.com>
4824 * config.in: Regenerate.
4826 2012-04-19 Pedro Alves <palves@redhat.com>
4828 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4829 * server.h (memmem): Remove declaration.
4830 * config.in: Regenerate.
4831 * configure: Regenerate.
4833 2012-04-19 Yao Qi <yao@codesourcery.com>
4835 * Makefile.in (SFILES): Add common/vec.c.
4839 2012-04-19 Yao Qi <yao@codesourcery.com>
4841 * remote-utils.c (prepare_resume_reply): Replace with macro
4842 target_core_of_thread.
4843 * server.c (handle_qxfer_threads_proper): Likewise.
4844 * target.h (traget_core_of_thread): New macro.
4846 2012-04-18 Pedro Alves <palves@redhat.com>
4848 * aclocal.m4: Regenerate.
4849 * configure: Regenerate.
4851 2012-04-16 Yao Qi <yao@codesourcery.com>
4853 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4854 duplicated on address.
4856 2012-04-16 Yao Qi <yao@codesourcery.com>
4858 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4859 (struct tracepoint_action_ops) <send>: New field.
4860 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4861 (agent_expr_send, x_tracepoint_action_send): New.
4862 (l_tracepoint_action_send): New.
4863 (cmd_qtdp): Download and install tracepoint
4864 according to `use_agent'.
4865 (run_inferior_command): Add one more parameter `len'.
4867 (tracepoint_send_agent): New.
4868 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4870 2012-04-16 Yao Qi <yao@codesourcery.com>
4872 * tracepoint.c (download_tracepoints): Moved to ...
4873 (cmd_qtstart): ... here.
4875 2012-04-14 Yao Qi <yao@codesourcery.com>
4877 * tracepoint.c: Include inttypes.h.
4878 (struct collect_memory_action): Use sized types.
4879 (struct tracepoint): Likewise.
4880 (cmd_qtdp, stop_tracing): Update print specifiers.
4881 (cmd_qtp, response_tracepoint): Likewise.
4882 (collect_data_at_tracepoint): Likewise.
4883 (collect_data_at_step): Likewise.
4885 2012-04-14 Yao Qi <yao@codesourcery.com>
4887 Import gnulib module inttypes.
4888 * aclocal.m4, config.in, configure: Regenerated.
4890 2012-04-14 Yao Qi <yao@codesourcery.com>
4892 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4893 Makefile and config.status at last.
4895 2012-04-13 Yao Qi <yao@codesourcery.com>
4897 * tracepoint.c: Include stdint.h unconditionally.
4899 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4901 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4902 on BFD_HAVE_SYS_PROCFS_TYPE.
4903 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4904 * configure: Regenerate.
4905 * config.in: Likewise.
4907 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4909 * Makefile.in (clean): Also remove x32.c x32-linux.c
4910 x32-avx.c x32-avx-linux.c.
4911 (x32.o): New target.
4913 (x32-linux.o): Likewise.
4914 (x32-linux.c): Likewise.
4915 (x32-avx.o): Likewise.
4916 (x32-avx.c): Likewise.
4917 (x32-avx-linux.o): Likewise.
4918 (x32-avx-linux.c): Likewise.
4920 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4921 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4922 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4923 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4924 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4925 i386/x32-avx-linux.xml.
4927 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4928 (init_registers_x32_avx_linux): Likwise.
4929 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4930 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4932 2012-04-13 Pedro Alves <palves@redhat.com>
4934 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4935 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4936 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4937 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4940 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4942 * linux-x86-low.c (compat_x32_clock_t): New.
4943 (compat_x32_siginfo_t): Likewise.
4944 (compat_x32_siginfo_from_siginfo): Likewise.
4945 (siginfo_from_compat_x32_siginfo): Likewise.
4946 (linux_is_elf64): Likewise.
4947 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4948 and siginfo_from_compat_x32_siginfo for x32.
4949 (x86_arch_setup): Set linux_is_elf64.
4951 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4954 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4956 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4957 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4958 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4959 compatible with process.
4961 2012-04-12 Yao Qi <yao@codesourcery.com>
4963 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4964 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4965 (install-only, install-info, clean): Handle sub dir gnulib.
4966 (all-lib, am--refresh): New targets.
4967 (memmem.o): Remove target.
4968 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4969 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4970 (AC_REPLACE_FUNCS): Remove memmem.
4971 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4972 (AC_OUTPUT): Generate Makefile in gnulib/.
4973 * aclocal.m4, config.in, configure: Regenerated.
4975 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4977 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4979 2012-04-05 Pedro Alves <palves@redhat.com>
4981 -Werror=strict-aliasing
4983 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4986 2012-04-04 Pedro Alves <palves@redhat.com>
4988 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4989 (sparc_store_gregset_from_stack, sparc_store_gregset)
4990 (sparc_breakpoint_at): Fix formatting.
4992 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4994 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4996 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4997 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4998 * config.in: Regenerate.
4999 * configure: Likewise.
5001 2012-03-29 Pedro Alves <palves@redhat.com>
5003 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5004 Correct ptrace arguments.
5006 2012-03-28 Pedro Alves <palves@redhat.com>
5008 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5009 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5010 (IA64_FR1_REGNUM): New defines.
5011 (ia64_fetch_register): New.
5012 (the_low_target): Install it.
5013 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5015 * linux-low.c (linux_fetch_registers): Try the
5016 the_low_target.fetch_register hook first.
5018 * linux-arm-low.c (the_low_target): Adjust.
5019 * linux-bfin-low.c (the_low_target): Adjust.
5020 * linux-cris-low.c (the_low_target): Adjust.
5021 * linux-crisv32-low.c (the_low_target): Adjust.
5022 * linux-m32r-low.c (the_low_target): Adjust.
5023 * linux-m68k-low.c (the_low_target): Adjust.
5024 * linux-mips-low.c (the_low_target): Adjust.
5025 * linux-ppc-low.c (the_low_target): Adjust.
5026 * linux-s390-low.c (the_low_target): Adjust.
5027 * linux-sh-low.c (the_low_target): Adjust.
5028 * linux-sparc-low.c (the_low_target): Adjust.
5029 * linux-tic6x-low.c (the_low_target): Adjust.
5030 * linux-x86-low.c (the_low_target): Adjust.
5031 * linux-xtensa-low.c (the_low_target): Adjust.
5033 2012-03-26 Pedro Alves <palves@redhat.com>
5035 * server.c (handle_qxfer_libraries): Don't bail early if
5036 the_target->qxfer_libraries_svr4 is not NULL.
5038 2012-03-26 Pedro Alves <palves@redhat.com>
5040 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5042 2012-03-23 Pedro Alves <palves@redhat.com>
5044 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5045 "library-list-svr4" element's start tag when the the DSO list is
5048 2012-03-23 Pedro Alves <palves@redhat.com>
5050 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5051 a variable whose type size is the same as the inferior's pointer
5054 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5056 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5058 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5059 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5060 * linux-low.h: Include <signal.h>.
5061 (struct siginfo): Remove forward declaration.
5062 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5065 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5067 * .gitignore: Ignore more files.
5069 2012-03-19 Pedro Alves <palves@redhat.com>
5070 Jan Kratochvil <jan.kratochvil@redhat.com>
5072 * server.c (cont_thread, general_thread): Add describing comments.
5073 (start_inferior): Clear `cont_thread'.
5074 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5077 2012-03-15 Yao Qi <yao@codesourcery.com>
5079 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5081 (cmd_qtdp): ... here.
5083 2012-03-15 Yao Qi <yao@codesourcery.com>
5085 * tracepoint.c (struct tracepoint_action_ops): New.
5086 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5087 (m_tracepoint_action_download): New.
5088 (r_tracepoint_action_download): New.
5089 (x_tracepoint_action_download): New.
5090 (l_tracepoint_action_download): New.
5091 (add_tracepoint_action): Install `action->ops' according type.
5092 (download_tracepoint_1): Move code `download' function pointer
5093 of various tracepoint_action_ops.
5095 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5097 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5098 linux_ptrace_attach_warnings.
5100 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5102 * Makefile.in (linux-ptrace.o): New.
5103 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5104 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5105 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5106 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5107 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5109 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5111 2012-03-08 Yao Qi <yao@codesourcery.com>
5112 Pedro Alves <palves@redhat.com>
5114 Fix PR server/13392.
5115 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5117 * tracepoint.c (remove_tracepoint): New.
5118 (cmd_qtdp): Call remove_tracepoint when failed to install.
5120 2012-03-07 Pedro Alves <palves@redhat.com>
5122 * linux-low.c (get_detach_signal): New.
5123 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5124 Pass on pending signals to PTRACE_DETACH. Check the result of the
5126 * server.c (program_signals, program_signals_p): New.
5127 (handle_general_set): Handle QProgramSignals.
5128 * server.h (program_signals, program_signals_p): Declare.
5130 2012-03-05 Pedro Alves <palves@redhat.com>
5131 Jan Kratochvil <jan.kratochvil@redhat.com>
5133 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5136 2012-03-03 Yao Qi <yao@codesourcery.com>
5138 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5139 agent_look_up_symbols.
5141 2012-03-03 Yao Qi <yao@codesourcery.com>
5143 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5144 (linux-x86-low.o): Likewise.
5145 * server.h: Remove in_process_agent_loaded.
5146 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5150 2012-03-03 Yao Qi <yao@codesourcery.com>
5152 * tracepoint.c (gdb_agent_capability): New global.
5153 (in_process_agent_loaded_ust): Renamed to
5154 `in_process_agent_supports_ust'.
5156 (in_process_agent_supports_ust): Call agent_capability_check.
5157 (clear_installed_tracepoints): Assert that agent supports
5160 2012-03-03 Yao Qi <yao@codesourcery.com>
5162 * linux-low.c (linux_supports_agent): New.
5163 (linux_target_ops): Initialize field `supports_agent' with
5164 linux_supports_agent.
5165 * target.h (struct target_ops) <supports_agent>: New.
5166 (target_supports_agent): New macro.
5167 * server.c (handle_general_set): Handle packet 'QAgent'.
5168 (handle_query): Send `QAgent+'.
5169 * Makefile.in (server.o): Depends on agent.h.
5171 2012-03-03 Yao Qi <yao@codesourcery.com>
5173 * Makefile.in (OBS): Add agent.o.
5174 Add new rule for agent.o.
5175 Track dependence of tracepoint.c on agent.h.
5176 * tracepoint.c (run_inferior_command_1):
5177 (run_inferior_command): Call agent_run_command.
5178 (gdb_ust_connect_sync_socket): Deleted. Move it to
5180 (resume_thread, stop_thread): Likewise.
5181 (gdb_ust_socket_init): Renamed to ...
5182 (gdb_agent_socket_init): ... New.
5183 (gdb_ust_thread): Renamed to ...
5184 (gdb_agent_helper_thread): ... New.
5185 (gdb_ust_init): Move some code to ...
5186 (gdb_agent_init): ... here. New.
5187 [HAVE_UST]: Call gdb_ust_init.
5188 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5189 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5190 * config.in, configure: Regenerated.
5192 2012-03-02 Pedro Alves <palves@redhat.com>
5194 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5195 * linux-low.c (struct simple_pid_list): New.
5196 (stopped_pids): New a struct simple_pid_list pointer.
5197 (add_to_pid_list, pull_pid_from_list): New.
5198 (handle_extended_wait): Don't assume the first signal new children
5199 report is SIGSTOP. Adjust call to pull_pid_from_list.
5200 (linux_wait_for_lwp): Adjust.
5202 2012-03-02 Yao Qi <yao@codesourcery.com>
5204 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5207 2012-03-02 Yao Qi <yao@codesourcery.com>
5209 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5210 `stop_pc' and `tpoint'. Update caller.
5212 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5214 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5215 * linux-low.c (use_linux_regsets): New macro.
5216 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5217 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5218 (linux_register_in_regsets): New function.
5219 (usr_fetch_inferior_registers): Skip registers covered by
5221 (usr_store_inferior_registers): Likewise.
5222 (usr_fetch_inferior_registers): New macro.
5223 (usr_store_inferior_registers): Likewise.
5224 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5225 (linux_store_registers): Likewise.
5226 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5228 (init_registers_mips64_dsp_linux): Likewise.
5229 (init_registers_mips_linux): New macro.
5230 (init_registers_mips_dsp_linux): Likewise.
5231 (mips_dsp_num_regs): Likewise.
5232 (DSP_BASE, DSP_CONTROL): New fallback macros.
5233 (mips_base_regs): New macro.
5234 (mips_regmap): Use it. Fix the size.
5235 (mips_dsp_regmap): New variable.
5236 (mips_dsp_regset_bitmap): Likewise.
5237 (mips_arch_setup): New function.
5238 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5240 (mips_cannot_store_register): Likewise.
5241 (the_low_target): Update .arch_setup, .num_regs and .regmap
5242 initializers. Add .regset_bitmap initializer.
5243 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5245 * linux-bfin-low.c (the_low_target): Likewise.
5246 * linux-cris-low.c (the_low_target): Likewise.
5247 * linux-crisv32-low.c (the_low_target): Likewise.
5248 * linux-ia64-low.c (the_low_target): Likewise.
5249 * linux-m32r-low.c (the_low_target): Likewise.
5250 * linux-m68k-low.c (the_low_target): Likewise.
5251 * linux-ppc-low.c (the_low_target): Likewise.
5252 * linux-s390-low.c (the_low_target): Likewise.
5253 * linux-sh-low.c (the_low_target): Likewise.
5254 * linux-sparc-low.c (the_low_target): Likewise.
5255 * linux-tic6x-low.c (the_low_target): Likewise.
5256 * linux-x86-low.c (the_low_target): Likewise.
5257 * linux-xtensa-low.c (the_low_target): Likewise.
5258 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5259 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5260 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5262 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5263 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5265 2012-02-29 Yao Qi <yao@codesourcery.com>
5266 Pedro Alves <palves@redhat.com>
5268 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5269 `step_over_finished' is true.
5271 2012-02-27 Pedro Alves <palves@redhat.com>
5273 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5274 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5276 2012-02-27 Pedro Alves <palves@redhat.com>
5279 * linux-low.c (pid_is_stopped): New.
5280 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5282 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5284 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5287 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5289 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5291 2012-02-24 Luis Machado <lgustavo@codesourcery>
5293 * server.c (handle_query): Advertise support for target-side
5294 breakpoint condition evaluation.
5295 (process_point_options): New function.
5296 (process_serial_event): When inserting a breakpoint, check for
5297 a target-side condition that should be evaluated.
5299 * mem-break.c: Include regcache.h and ax.h.
5300 (point_cond_list_t): New data structure.
5301 (breakpoint) <cond_list>: New field.
5302 (find_gdb_breakpoint_at): Make non-static.
5303 (delete_gdb_breakpoint_at): Clear any target-side
5305 (clear_gdb_breakpoint_conditions): New function.
5306 (add_condition_to_breakpoint): Likewise.
5307 (add_breakpoint_condition): Likewise.
5308 (gdb_condition_true_at_breakpoint): Likewise.
5309 (gdb_breakpoint_here): Return result directly instead
5310 of going through a local variable.
5312 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5313 (clear_gdb_breakpoint_conditions): Likewise.
5314 (add_breakpoint_condition): Likewise.
5315 (gdb_condition_true_at_breakpoint): Likewise.
5317 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5318 (need_step_over_p): Take target-side breakpoint condition into
5321 2012-02-24 Luis Machado <lgustavo@codesourcery>
5323 * server.h: Include tracepoint.h.
5324 (agent_mem_read, agent_get_trace_state_variable_value,
5325 agent_set_trace_state_variable_value,
5326 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5327 get_set_tsv_func_addr): New prototypes.
5329 * ax.h: New include file.
5330 * ax.c: New source file.
5332 * tracepoint.c: Include ax.h.
5333 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5334 agent_expr, eval_result_type): Move to ax.h.
5335 (parse_agent_expr): Rename to ...
5336 (gdb_parse_agent_expr): ... this, make it non-static and move
5338 (unparse_agent_expr) Rename to ...
5339 (gdb_unparse_agent_expr): ... this, make it non-static and move
5341 (eval_agent_expr): Rename to ...
5342 (eval_tracepoint_agent_expr): ... this.
5343 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5344 forward declarations.
5345 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5346 (agent_get_trace_state_variable_value): New function.
5347 (agent_set_trace_state_variable_value): New function.
5348 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5349 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5350 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5351 (condition_true_at_tracepoint): Likewise.
5352 (parse_agent_expr): Rename to ...
5353 (gdb_parse_agent_expr): ... this and move to ax.c.
5354 (unparse_agent_expr): Rename to ...
5355 (gdb_unparse_agent_expr): ... this and move to ax.c.
5356 (gdb_agent_op_name): Move to ax.c.
5357 (eval_agent_expr): Rename to ...
5358 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5360 (eval_tracepoint_agent_expr): New function.
5361 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5363 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5365 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5366 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5367 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5368 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5369 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5370 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5371 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5372 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5373 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5374 (compile_bytecodes): Remove forward declaration.
5375 (is_goto_target): Move to ax.c.
5376 (compile_bytecodes): Move to ax.c and call
5377 agent_get_trace_state_variable_value (...) and
5378 agent_set_trace_state_variable_value (...).
5380 * Makefile.in: Update ax.c and IPA dependencies.
5382 2012-02-24 Pedro Alves <palves@redhat.com>
5384 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5385 (cmd_bigqtbuffer_circular): ... this. Only handle
5386 'QTBuffer:circular:'.
5387 (handle_tracepoint_general_set): Adjust.
5389 2012-02-16 Yao Qi <yao@codesourcery.com>
5391 * inferiors.c: Move code to ...
5392 * dll.c: .... here. New.
5393 * server.h: Declare clear_dlls.
5394 * Makefile.in (SFILES): Add dll.c.
5398 2012-02-11 Yao Qi <yao@codesourcery.com>
5400 * server.c: (handle_monitor_command): Add a new parameter
5402 (handle_query): Update caller.
5404 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5406 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5407 * configure, config.in: Regenerate.
5408 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5411 2012-02-02 Pedro Alves <palves@redhat.com>
5413 Try SIGKILL first, then PTRACE_KILL.
5414 * linux-low.c (linux_kill_one_lwp): New.
5415 (linux_kill_one_lwp): Rename to ...
5416 (kill_one_lwp_callback): ... this. Use the new
5419 2012-02-02 Pedro Alves <palves@redhat.com>
5421 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5424 2012-01-27 Pedro Alves <palves@redhat.com>
5426 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5427 (elf_64_file_p): Make static.
5428 (linux_pid_exe_is_elf_64_file): New.
5429 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5430 Delete declarations.
5431 (linux_pid_exe_is_elf_64_file): Declare.
5432 * linux-x86-low.c (x86_arch_setup): Use
5433 linux_pid_exe_is_elf_64_file.
5435 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5437 * linux-low.c (linux_wait_for_event_1): Rename to ...
5438 (linux_wait_for_event): ... here and merge it with former
5439 linux_wait_for_event - new variable wait_ptid, use it.
5440 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5442 2012-01-23 Pedro Alves <palves@redhat.com>
5444 * server.c (main): Avoid yet another case of infinite loop while
5445 detaching/killing after a longjmp.
5447 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5450 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5452 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5454 * hostio.c (handle_readlink): New function.
5455 (handle_vFile): Call it to handle "vFile:readlink" packets.
5457 2012-01-20 Pedro Alves <palves@redhat.com>
5458 Ulrich Weigand <ulrich.weigand@linaro.org>
5460 * server.c (handle_v_requests): Only support vAttach and vRun to
5461 start multiple processes when in extended protocol mode.
5463 2012-01-17 Pedro Alves <palves@redhat.com>
5465 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5466 memalign plus mprotect to allocate the scratch buffer.
5468 2012-01-13 Pedro Alves <palves@redhat.com>
5470 * server.c (attach_inferior): Clear `cont_thread'.
5472 2012-01-13 Pedro Alves <palves@redhat.com>
5474 * server.c (main): Avoid infinite loop while detaching/killing
5477 2012-01-09 Doug Evans <dje@google.com>
5479 * server.c (start_inferior): Set last_ptid in --wrapper case.
5481 2012-01-06 Yao Qi <yao@codesourcery.com>
5483 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5485 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5487 2012-01-04 Yao Qi <yao@codesourcery.com>
5489 * tracepoint.c (cmd_qtdp): Print debug message
5490 for static tracepoint.
5492 2012-01-04 Yao Qi <yao@codesourcery.com>
5494 * tracepoint.c (trace_vdebug): Differentiate debug message
5495 between gdbserver and IPA.
5497 2012-01-03 Yao Qi <yao@codesourcery.com>
5499 * tracepoint.c (tracepoint_was_hit): Don't collect for
5502 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5504 * terminal.h: Reformat copyright header.
5506 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5508 * server.c (gdbserver_version): Update copyright year.
5509 * gdbreplay.c (gdbreplay_version): Likewise.
5511 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5513 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5516 2011-12-18 Hui Zhu <teawater@gmail.com>
5517 * linux-low.c (linux_create_inferior): Save return value to ret.
5519 2011-12-18 Hui Zhu <teawater@gmail.com>
5521 * linux-low.c (linux_create_inferior): Save return value to ret.
5523 2011-12-16 Doug Evans <dje@google.com>
5525 * linux-low.c (linux_create_inferior): If stdio connection,
5526 redirect stdin from /dev/null, stdout to stderr.
5527 * remote-utils.c (remote_is_stdio): New static global.
5528 (remote_connection_is_stdio): New function.
5529 (remote_prepare): Handle stdio connection.
5530 (remote_open): Ditto.
5531 (remote_close): Don't close stdin for stdio connections.
5532 (read_prim,write_prim): New functions. Replace all calls to
5533 read/write to these.
5534 * server.c (main): Watch for "-" argument. Move call to
5535 remote_prepare before start_inferior.
5536 * server.h (STDIO_CONNECTION_NAME): New macro.
5537 (remote_connection_is_stdio): Declare.
5539 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5540 in debugging output.
5542 2011-12-15 Yao Qi <yao@codesourcery.com>
5544 * tracepoint.c: Include sys/syscall.h.
5545 (gdb_ust_thread): Remove preprocessor conditional.
5547 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5549 * linux-low.c (linux_detach_one_lwp): Call
5550 the_low_target.prepare_to_resume before detaching.
5552 2011-12-14 Yao Qi <yao@codesourcery.com>
5554 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5557 2011-12-14 Yao Qi <yao@codesourcery.com>
5559 * i386-low.c (i386_low_stopped_data_address): Initialize local
5562 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5566 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5567 DR_CONTROL unless necessary. Extend comments.
5568 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5569 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5571 2011-12-13 Yao Qi <yao@codesourcery.com>
5573 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5575 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5577 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5579 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5580 Print new debug message for such case.
5582 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5584 Fix overlapping memcpy.
5585 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5586 the read_inferior_memory transfer.
5587 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5588 write_inferior_memory transfer.
5589 (set_fast_tracepoint_jump): New variable buf. Use it for the
5590 read_inferior_memory and write_inferior_memory transfers.
5591 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5592 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5593 Use it for the write_inferior_memory transfer.
5594 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5597 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5599 * linux-low.c (fetch_register, store_register): Make code
5600 consistent, fix formatting.
5602 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5604 * linux-low.c (usr_store_inferior_registers): Factor out code
5605 to handle individual registers into...
5606 (store_register): ... this new function.
5608 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5610 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5611 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5612 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5613 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5614 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5615 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5616 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5617 (srv_xmlfiles): Add new XML files.
5619 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5621 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5622 (init_registers_s390_linux32v1): Add prototype.
5623 (init_registers_s390_linux32v2): Likewise.
5624 (init_registers_s390_linux64v1): Likewise.
5625 (init_registers_s390_linux64v2): Likewise.
5626 (init_registers_s390x_linux64v1): Likewise.
5627 (init_registers_s390x_linux64v2): Likewise.
5628 (s390_num_regs): Increment to 52.
5629 (s390_regmap): Add orig_r2 register.
5630 (s390_num_regs_3264): Increment to 68.
5631 (s390_regmap_3264): Add orig_r2 register.
5632 (s390_collect_ptrace_register): Handle orig_r2 register.
5633 (s390_supply_ptrace_register): Likewise.
5634 (s390_fill_last_break): New function.
5635 (s390_store_last_break): Likewise.
5636 (s390_fill_system_call): New function.
5637 (s390_store_system_call): Likewise.
5638 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5640 (s390_check_regset): New function.
5641 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5642 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5643 Update target_regsets for available register sets.
5645 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5646 Jan Kratochvil <jan.kratochvil@redhat.com>
5648 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5649 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5651 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5652 * linux-low.h (struct process_info_private): New member r_debug.
5653 * server.c (handle_qxfer_libraries): Call
5654 the_target->qxfer_libraries_svr4.
5655 (handle_qxfer_libraries_svr4): New function.
5656 (qxfer_packets): New entry "libraries-svr4".
5657 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5658 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5659 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5660 PACKET_qXfer_libraries_svr4.
5662 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5664 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5665 PSW address/mask between 8-byte and 16-byte formats.
5666 (s390_supply_ptrace_register): Likewise.
5667 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5668 basic addressing mode bit.
5670 2011-11-24 Stan Shebs <stan@codesourcery.com>
5672 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5674 2011-11-17 Stan Shebs <stan@codesourcery.com>
5676 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5677 (tracing_start_time): New global.
5678 (tracing_stop_time): New global.
5679 (tracing_user_name): New global.
5680 (tracing_notes): New global.
5681 (tracing_stop_note): New global.
5682 (cmd_qtstart): Set traceframe_usage, start_time.
5683 (stop_tracing): Set stop_time.
5684 (cmd_qtstatus): Report additional status.
5685 (cmd_qtp): New function.
5686 (handle_tracepoint_query): Call it.
5687 (cmd_qtnotes): New function.
5688 (handle_tracepoint_general_set): Call it.
5689 (get_timestamp): Rename from tsv_get_timestamp.
5691 2011-11-14 Stan Shebs <stan@codesourcery.com>
5692 Kwok Cheung Yeung <kcy@codesourcery.com>
5694 * linux-x86-low.c (small_jump_insn): New.
5695 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5696 trampoline and error message, build a trampoline and issue a small
5697 jump instruction to it.
5698 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5699 trampoline and error message.
5700 (x86_get_min_fast_tracepoint_insn_len): New.
5701 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5702 * linux-low.h (struct linux_target_ops): Add arguments to
5703 install_fast_tracepoint_jump_pad operation, add new operation.
5704 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5706 (linux_get_min_fast_tracepoint_insn_len): New function.
5707 (linux_target_op): Add new operation.
5708 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5709 (gdb_trampoline_buffer_end): Ditto.
5710 (gdb_trampoline_buffer_error): Ditto.
5711 (struct ipa_sym_addresses): Add fields for new IPA variables.
5712 (symbol_list): Add entries for new IPA variables.
5713 (struct tracepoint): Add fields to hold the address range of the
5714 trampoline used by the tracepoint.
5715 (trampoline_buffer_head): New static variable.
5716 (trampoline_buffer_tail): Ditto.
5717 (claim_trampoline_space): New function.
5718 (have_fast_tracepoint_trampoline_buffer): New function.
5719 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5721 (install_fast_tracepoint): Ditto, also add error buffer argument.
5722 (cmd_qtminftpilen): New function.
5723 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5724 (fast_tracepoint_from_trampoline_address): New function.
5725 (fast_tracepoint_collecting): Handle trampoline as part of jump
5727 (set_trampoline_buffer_space): New function.
5728 (initialize_tracepoint): Initialize new IPA variables.
5729 * target.h (struct target_ops): Add arguments to
5730 install_fast_tracepoint_jump_pad operation, add new
5731 get_min_fast_tracepoint_insn_len operation.
5732 (target_get_min_fast_tracepoint_insn_len): New.
5733 (install_fast_tracepoint_jump_pad): Add arguments.
5734 * server.h (IPA_BUFSIZ): Define.
5735 * linux-i386-ipa.c: Include extra header files.
5736 (initialize_fast_tracepoint_trampoline_buffer): New function.
5737 (initialize_low_tracepoint): Call it.
5738 * server.h (set_trampoline_buffer_space): Declare.
5739 (claim_trampoline_space): Ditto.
5740 (have_fast_tracepoint_trampoline_buffer): Ditto.
5742 2011-11-14 Yao Qi <yao@codesourcery.com>
5744 * server.c (handle_query): Handle InstallInTrace for qSupported.
5745 * tracepoint.c (add_tracepoint): Sort list.
5746 (install_tracepoint, download_tracepoint): New.
5747 (cmd_qtdp): Call them to install and download tracepoints.
5748 (sort_tracepoints): Removed.
5749 (cmd_qtstart): Update.
5751 2011-11-14 Yao Qi <yao@codesourcery.com>
5753 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5754 * mem-break.h: Declare.
5755 * tracepoint.c (cmd_qtstart): Move some code to ...
5756 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5758 (download_tracepoints): Move some code to ...
5759 (download_tracepoint_1): ... here. New.
5761 2011-11-08 Yao Qi <yao@codesourcery.com>
5763 * remote-utils.c (relocate_instruction): A comment fix.
5765 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5767 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5768 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5769 dr_status_mirror and dr_control_mirror from debug_reg_state.
5770 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5771 (i386_initial_stuff): Remove use of deleted globals.
5772 (i386_get_thread_context, i386_set_thread_context,
5773 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5774 from debug_reg_state.
5776 2011-11-05 Yao Qi <yao@codesourcery.com>
5778 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5779 address as TPOINT's.
5781 2011-11-02 Stan Shebs <stan@codesourcery.com>
5783 * tracepoint.c (agent_mem_read_string): New function.
5784 (eval_agent_expr): Call it for tracenz.
5785 * server.c (handle_query): Report support for tracenz.
5787 2011-11-02 Yao Qi <yao@codesourcery.com>
5789 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5791 2011-11-02 Yao Qi <yao@codesourcery.com>
5793 * target.h: Fix a typo in comment.
5795 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5797 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5798 clobber the breakpoints' shadows with fast tracepoint jumps.
5799 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5800 * target.c (write_inferior_memory): Also pass MYADDR down to
5803 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5805 * configure.ac: Check support for personality routine.
5806 * configure: Regenerate.
5807 * config.in: Likewise.
5808 * linux-low.c: Include <sys/personality.h>.
5809 Define ADDR_NO_RANDOMIZE if necessary.
5810 (linux_create_inferior): Disable address space randomization when
5811 forking inferior, if requested.
5812 (linux_supports_disable_randomization): New function.
5813 (linux_target_ops): Install it.
5814 * server.h (disable_randomization): Declare.
5815 * server.c (disable_randomization): New global variable.
5816 (handle_general_set): Handle QDisableRandomization.
5817 (handle_query): Likewise for qSupported.
5818 (main): Support --disable-randomization and --no-disable-randomization
5819 command line arguments.
5820 * target.h (struct target_ops): Add supports_disable_randomization.
5821 (target_supports_disable_randomization): New macro.
5823 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5825 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5827 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5828 [!PT_GETDSBT] (target_loadmap): New definition.
5829 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5830 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5831 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5832 and PT_GETDSBT to LINUX_LOADMAP.
5833 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5834 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5836 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5838 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5839 (arm_linux_hwbp_cap): New static variable.
5840 (arm_linux_get_hwbp_cap): Replace by ...
5841 (arm_linux_init_hwbp_cap): ... this new function.
5842 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5843 (arm_linux_get_hw_watchpoint_count): Likewise.
5844 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5845 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5846 (arm_prepare_to_resume): Use perror_with_name instead of error.
5848 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5850 * linux-arm-low.c: Include <signal.h>.
5851 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5852 (struct arm_linux_hwbp_cap): New data type.
5853 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5854 (struct arm_linux_hw_breakpoint): New data type.
5855 (MAX_BPTS, MAX_WPTS): Define.
5856 (struct arch_process_info, struct arch_lwp_info): New data types.
5857 (arm_linux_get_hwbp_cap): New function.
5858 (arm_linux_get_hw_breakpoint_count): Likewise.
5859 (arm_linux_get_hw_watchpoint_count): Likewise.
5860 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5861 (arm_hwbp_control_initialize): Likewise.
5862 (arm_hwbp_control_is_enabled): Likewise.
5863 (arm_hwbp_control_is_initialized): Likewise.
5864 (arm_hwbp_control_disable): Likewise.
5865 (arm_linux_hw_breakpoint_equal): Likewise.
5866 (arm_linux_hw_point_initialize): Likewise.
5867 (struct update_registers_data): New data structure.
5868 (update_registers_callback: New function.
5869 (arm_insert_point): Likewise.
5870 (arm_remove_point): Likewise.
5871 (arm_stopped_by_watchpoint): Likewise.
5872 (arm_stopped_data_address): Likewise.
5873 (arm_new_process): Likewise.
5874 (arm_new_thread): Likewise.
5875 (arm_prepare_to_resume): Likewise.
5876 (the_low_target): Register arm_insert_point, arm_remove_point,
5877 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5878 arm_new_thread, and arm_prepare_to_resume.
5880 2011-09-15 Stan Shebs <stan@codesourcery.com>
5882 * server.h (struct emit_ops): Add compare-goto fields.
5883 * tracepoint.c (gdb_agent_op_sizes): New table.
5884 (emit_eq_goto): New function.
5885 (emit_ne_goto): New function.
5886 (emit_lt_goto): New function.
5887 (emit_le_goto): New function.
5888 (emit_gt_goto): New function.
5889 (emit_ge_goto): New function.
5890 (is_goto_target): New function.
5891 (compile_bytecodes): Recognize special cases of compare-goto
5892 combinations and call specialized emitters for them.
5893 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5894 (amd64_emit_ne_goto): New function.
5895 (amd64_emit_lt_goto): New function.
5896 (amd64_emit_le_goto): New function.
5897 (amd64_emit_gt_goto): New function.
5898 (amd64_emit_ge_goto): New function.
5899 (amd64_emit_ops): Add the new functions.
5900 (i386_emit_eq_goto): New function.
5901 (i386_emit_ne_goto): New function.
5902 (i386_emit_lt_goto): New function.
5903 (i386_emit_le_goto): New function.
5904 (i386_emit_gt_goto): New function.
5905 (i386_emit_ge_goto): New function.
5906 (i386_emit_ops): Add the new functions.
5908 2011-09-08 Stan Shebs <stan@codesourcery.com>
5910 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5911 (i386_emit_epilogue): Restore %ebx.
5913 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5915 * server.c (step_thread): Remove definition.
5916 (process_serial_event): Don't handle Hs.
5917 * server.h (step_thread): Remove declaration.
5918 * target.c (set_desired_inferior): Remove use of step_thread.
5920 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5922 * linux-low.c: Include linux-procfs.h.
5923 (linux_attach_lwp_1): Update comments.
5924 (linux_attach): Scan for existing threads when attaching to a
5925 process that is the tgid.
5926 * Makefile.in: Update dependencies.
5928 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5930 * configure.srv: Add linux-procfs.o dependencies.
5932 2011-08-14 Yao Qi <yao@codesourcery.com>
5934 * target.h (struct target_ops): Fix indent.
5935 * win32-low.c (win32_target_ops): Fix comment.
5937 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5938 Yao Qi <yao@codesourcery.com>
5940 * Makefile.in (clean): Remove tic6x-*.c files.
5941 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5942 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5943 (tic6x-c64xp-linux.c): Likewise.
5944 * configure.srv: Add support for tic6x-*-uclinux.
5945 * linux-tic6x-low.c: New.
5946 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5948 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5949 Yao Qi <yao@codesourcery.com>
5951 * target.h (struct target_ops): Add read_loadmap.
5952 * linux-low.c (struct target_loadseg): New type.
5953 (struct target_loadmap): New type.
5954 (linux_read_loadmap): New function.
5955 (linux_target_ops): Add linux_read_loadmap.
5956 * server.c (handle_query): Support qXfer:fdpic:read packet.
5957 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5960 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5962 * win32-low.c: Include <stdint.h>.
5964 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5966 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5967 to the inferior here.
5968 (i386_remove_aligned_watchpoint): Ditto.
5969 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5970 fit part of the watchpoint in the debug registers.
5971 (i386_update_inferior_debug_regs): New.
5972 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5973 registers, and only update the inferior on success.
5974 (i386_low_remove_watchpoint): Ditto.
5976 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5978 * linux-low.c (compare_ints, unique, list_threads, show_process,
5979 linux_core_of_thread): Delete.
5980 (linux_target_ops): Change linux_core_of_thread to
5981 linux_common_core_of_thread.
5982 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5983 * utils.c (malloc_failure): Change type of argument.
5984 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5985 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5986 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5987 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5988 (IPA_OBJS): Add common-utils-ipa.o.
5989 (ptid_h, linux_osdata_h): New macros.
5990 (server_h): Add common/common-utils.h, common/xml-utils.h,
5991 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5993 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5994 ptid.o, buffer.o): New rules.
5995 (linux-low.o): Add common/linux-osdata.h as a dependency.
5996 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5997 * configure.ac: Add AC_HEADER_DIRENT check.
5998 * config.in: Regenerate.
5999 * configure: Regenerate.
6000 * remote-utils.c (xml_escape_text): Delete.
6001 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6002 buffer_xml_printf): Move to common/buffer.c.
6003 * server.c (main): Remove call to initialize_inferiors.
6004 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6005 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6006 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6007 internal_error, gdb_assert, gdb_assert_fail): Delete.
6008 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6009 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6011 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6012 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6013 initialize_inferiors): Delete.
6015 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6017 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6020 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6022 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6024 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6026 2011-05-26 Yao Qi <yao@codesourcery.com>
6028 * Makefile.in (thread-db.o): Track dependence to
6029 common/gdb_thread_db.h.
6030 * thread-db.c: include gdb_thread_db.h from right place.
6032 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6034 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6035 __FILE__ and __LINE__ to internal_error.
6037 2011-05-13 Doug Evans <dje@google.com>
6039 * thread-db.c (try_thread_db_load_from_sdir): New function.
6040 (try_thread_db_load_from_dir): New function.
6041 (thread_db_load_search): Handle $sdir, ignore $pdir.
6042 Remove trying of system directories if search of
6043 libthread-db-search-path fails, that is now done via $sdir.
6045 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6047 * server.c (handle_query): Add EnableDisableTracepoints to the list
6048 of supported features.
6049 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6051 (cmd_qtenable_disable): New.
6052 (cmd_qtstart): Install tracepoints even if disabled.
6053 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6054 receiving a QTEnable or QTDisable packet.
6055 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6056 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6058 (gdb_probe): Skip data collection if static tracepoint is disabled.
6060 2011-05-10 Doug Evans <dje@google.com>
6062 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6064 2011-05-04 Doug Evans <dje@google.com>
6066 * linux-low.c (linux_join): Skip process lookup.
6067 * spu-low.c (spu_join): Ditto.
6068 * server.c (join_inferiors_callback): Delete.
6069 (process_serial_event): For 'D' packet (detach) call join_inferior
6072 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6074 * README: Don't mention xscale*-*-linux*.
6075 * configure.srv (xscale*-*-linux*): Don't handle target.
6077 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6079 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6081 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6082 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6083 (i386_emit_void_call_2): Likewise.
6085 2011-04-26 Yao Qi <yao@codesourcery.com>
6087 * linux-low.c: Move common macros to linux-ptrace.h.
6088 Include linux-ptrace.h.
6089 * Makefile.in (linux_ptrace_h): New.
6090 (linux-low.o): Depends on linux-ptrace.h.
6092 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6094 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6095 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6096 (remote_prepare): New function with most of the TCP code from ...
6097 (remote_open): ... here. Detect PORT here unconditionally. Move also
6098 setting transport_is_reliable.
6099 * server.c (run_once): New variable.
6100 (gdbserver_usage): Document it.
6101 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6102 the first run if RUN_ONCE.
6103 * server.h (run_once, remote_prepare): New declarations.
6105 2011-04-19 Tom Tromey <tromey@redhat.com>
6107 * win32-low.c (handle_load_dll): Remove duplicate "the".
6109 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6111 Remove support for old Cygwin 1.5 versions.
6112 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6113 function to avoid warning.
6114 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6117 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6119 * gdbserver/server.h (Macro _): Define it if not available.
6121 2011-03-14 Michael Snyder <msnyder@vmware.com>
6123 * hostio.c (handle_close): Remove unnecessary null test.
6125 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6127 * Makefile.in (maintainer-clean realclean distclean): Remove
6128 "make ... subdir_do" command.
6130 2011-03-10 Michael Snyder <msnyder@vmware.com>
6132 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6134 * server.c (handle_v_run): Free alloced buffer on early return.
6136 2011-03-09 Yao Qi <yao@codesourcery.com>
6139 2011-03-04 Yao Qi <yao@codesourcery.com>
6141 * Makefile.in: Remove GNU make feature --directory.
6143 2011-03-05 Yao Qi <yao@codesourcery.com>
6145 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6146 (subdir_do): New make target. Copied from gdb/Makefile.
6147 (maintainer-clean, realclean, distclean, clean): Call corresponding
6148 make targets in common/Makefile.
6150 2011-02-11 Yao Qi <yao@codesourcery.com>
6152 * configure.ac: Call AC_PROG_RANLIB.
6153 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6154 * configure: Regenerate.
6156 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6158 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6160 2011-03-06 Yao Qi <yao@codesourcery.com>
6162 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6164 2011-03-05 Yao Qi <yao@codesourcery.com>
6166 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6167 (subdir_do): New make target. Copied from gdb/Makefile.
6168 (maintainer-clean, realclean, distclean, clean): Call corresponding
6169 make targets in common/Makefile.
6171 2011-03-04 Yao Qi <yao@codesourcery.com>
6173 * Makefile.in: Remove GNU make feature --directory.
6175 2011-03-04 Michael Snyder <msnyder@vmware.com>
6177 * server.c (queue_stop_reply): Call xmalloc not malloc.
6179 2011-03-02 Michael Snyder <msnyder@vmware.com>
6181 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6183 2011-02-28 Michael Snyder <msnyder@vmware.com>
6185 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6186 (cmd_qtframe): Ditto.
6187 (cmd_qtbuffer): Ditto.
6188 (cmd_bigqtbuffer): Ditto.
6190 * utils.c (decimal2str): Initialize 'width' to nine, then
6193 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6195 * hostio.c (require_data): Free *data, not data.
6197 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6199 * hostio.c (require_data): Use free, not xfree.
6201 2011-02-27 Michael Snyder <msnyder@vmware.com>
6203 * server.c (handle_query): Discard unused value.
6205 * hostio.c (require_data): Free malloc memory before returning
6208 2011-02-26 Michael Snyder <msnyder@vmware.com>
6210 * linux-low.c (list_threads): Call closedir for dirent.
6212 2011-02-27 Michael Snyder <msnyder@vmware.com>
6214 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6215 a case statement falls through.
6217 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6219 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6222 2011-02-26 Michael Snyder <msnyder@vmware.com>
6224 * utils.c (decimal2str): Eliminate dead code and dead param.
6225 (pulongest): Drop dead param from call to decimal2str.
6228 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6230 Revert the following patch (not approved yet):
6231 2011-02-21 Hui Zhu <teawater@gmail.com>
6232 * tracepoint.c (tp_printf): New function.
6233 (eval_agent_expr): Handle gdb_agent_op_printf.
6235 2011-02-21 Hui Zhu <teawater@gmail.com>
6237 * tracepoint.c (tp_printf): New function.
6238 (eval_agent_expr): Handle gdb_agent_op_printf.
6240 2011-02-18 Tom Tromey <tromey@redhat.com>
6242 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6243 (tracepoint.o): Likewise.
6244 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6245 (gdb_agent_op_names): Likewise.
6247 2011-02-18 Tom Tromey <tromey@redhat.com>
6249 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6250 gdb_agent_op_rot>: New constants.
6251 (gdb_agent_op_names): Add pick and roll.
6252 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6255 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6257 * aclocal.m4: Regenerated with aclocal-1.11.1.
6259 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6261 * server.c (handle_qxfer_traceframe_info): New.
6262 (qxfer_packets): Register "traceframe-info".
6263 (handle_query): Report support for qXfer:traceframe-info:read+.
6264 * tracepoint.c (match_blocktype): New.
6265 (traceframe_find_block_type): Rename to ...
6266 (traceframe_walk_blocks): ... this. Add callback filter argument,
6268 (traceframe_find_block_type): New, reimplemented on top of
6269 traceframe_walk_blocks.
6270 (build_traceframe_info_xml): New.
6271 (traceframe_read_info): New.
6272 * server.h (traceframe_read_info): Declare.
6274 2011-02-11 Yao Qi <yao@codesourcery.com>
6276 * configure.ac: Call AC_PROG_RANLIB.
6277 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6278 * configure: Regenerate.
6280 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6282 * server.c (gdb_read_memory): Change return semantics to allow
6284 (handle_search_memory_1): Adjust.
6285 (process_serial_event) <'m' packet>: Handle partial transfers.
6286 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6288 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6290 * regcache.c (init_register_cache): Initialize
6291 regcache->register_status.
6292 (free_register_cache): Release regcache->register_status.
6293 (regcache_cpy): Copy register_status.
6294 (registers_to_string): Print 'x's for unavailable registers.
6295 (supply_register): Mark the register's status valid or
6296 unavailable, depending on whether a buffer was passed in or not.
6297 (supply_register_zeroed): New.
6298 (supply_regblock): Mark the registers' status valid or
6299 unavailable, depending on whether a buffer was passed in or not.
6300 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6301 (struct regcache): New `register_status' field.
6302 (supply_register_zeroed): Declare.
6303 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6304 supply_register_zeroed, rather than passing a NULL buffer to
6306 * tracepoint.c (fetch_traceframe_registers): Update comment.
6308 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6310 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6313 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6315 * server.h (decode_xfer_write): Change prototype.
6316 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6317 and don't extract the annex here.
6318 * server.c (decode_xfer_read): Remove `annex' parameter,
6319 and don't extract the annex here.
6321 (struct qxfer): New.
6322 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6323 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6324 (handle_qxfer_statictrace): New functions, abstracted out from
6325 handle_query, and made to use the struct qxfer interface.
6326 (handle_threads_qxfer_proper): Rename to ...
6327 (handle_qxfer_threads_proper): ... this.
6328 (handle_threads_qxfer): Rename to ...
6329 (handle_qxfer_threads): ... this. Adjust.
6330 (qxfer_packets): New array.
6331 (handle_qxfer): New function.
6332 (handle_query): Use handle_qxfer.
6334 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6336 * gdbreplay.c: Shorten lines of >= 80 columns.
6337 * linux-low.c: Ditto.
6338 * linux-ppc-low.c: Ditto.
6339 * linux-s390-low.c: Ditto.
6340 * linux-sparc-low.c: Ditto.
6341 * linux-x86-low.c: Ditto.
6342 * linux-xtensa-low.c: Ditto.
6343 * mem-break.c: Ditto.
6345 * regcache.h: Ditto.
6346 * remote-utils.c: Ditto.
6349 * thread-db.c: Ditto.
6350 * tracepoint.c: Ditto.
6352 * win32-low.h: Ditto.
6354 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6356 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6359 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6361 * server.c (gdbserver_version): Update copyright year in version
6363 * gdbreplay.c (gdbreplay_version): Ditto.
6365 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6367 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6368 * linux-bfin-low.c: New file.
6369 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6370 PT_DATA_ADDR for BFIN targets.
6371 * Makefile.in (SFILES): Add linux-bfin-low.c.
6372 (clean): Remove reg-bfin.c.
6373 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6374 * README: Mention supported Blackfin targets.
6376 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6378 * .gitignore: New file.
6380 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6382 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6384 2010-10-22 Jie Zhang <jie@codesourcery.com>
6386 * Makefile.in: Add FLAGS_TO_PASS variable.
6387 (install): Remove dependency of install-only and recursively
6388 invoke make for install-only.
6390 2010-10-04 Doug Evans <dje@google.com>
6392 * Makefile.in (uninstall): Use $(DESTDIR).
6394 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6398 * linux-x86-low.c (compat_siginfo_from_siginfo)
6399 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6400 si_code is < 0. Check for si_code == SI_TIMER before checking for
6403 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6405 * lynx-i386-low.c: New file.
6406 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6408 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6410 * lynx-low.c (ptrace_request_to_str): Remove handling for
6411 request values that have been removed in LynxOS 5.x.
6413 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6415 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6418 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6420 * configure.ac: Add --enable-inprocess-agent option.
6421 * configure: Rebuilt.
6423 2010-09-06 Yao Qi <yao@codesourcery.com>
6425 * linux-low.c (linux_kill): Remove unused variable.
6426 (linux_stabilize_threads): Likewise.
6427 * server.c (start_inferior): Likewise.
6428 (queue_stop_reply_callback): Likewise.
6429 * tracepoint.c (do_action_at_tracepoint): Likewise.
6431 2010-09-06 Yao Qi <yao@codesourcery.com>
6433 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6436 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6438 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6440 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6442 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6445 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6447 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6448 gdbserver/lynx-ppc-low.c: New files.
6449 * Makefile.in (lynx_low_h): New variable.
6450 (lynx-low.o, lynx-ppc-low.o): New rules.
6451 * configure.ac: On LynxOS, link with -lnetinet.
6452 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6453 * configure: regenerate.
6455 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6457 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6458 * configure.ac: Add check for vasprintf and vsnprintf.
6459 * configure, config.in: Regenerate.
6460 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6462 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6464 * gdbreplay.c: Move include of alloca.h up, next to include of
6466 * server.h: Add include of malloc.h.
6467 * mem-break.c: Remove include of malloc.h.
6468 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6470 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6472 * Makefile.in (memmem.o): Build with -Wno-error.
6474 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6476 * utils.c (xsnprintf): Make non-static.
6477 * server.h: Add xsnprintf declaration.
6478 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6479 replace calls to snprintf by calls to xsnprintf throughout.
6481 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6483 * configure.ac: Add configure check for alloca.
6484 * configure, config.in: Regenerate.
6485 * server.h: Include alloca.h if it exists.
6486 * gdbreplay.c: Include alloca.h if it exists.
6488 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6490 * linux-low.c (__SIGRTMIN): Define if not already defined.
6491 (linux_create_inferior): Check for __ANDROID__ rather than
6493 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6494 are already deferred.
6495 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6496 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6497 stopped and already has a pending signal to report.
6498 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6499 a pending signal to report or is moving out of a jump pad.
6500 (linux_init_signals): Check for __ANDROID__ rather than
6503 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6505 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6506 debug_threads check. Avoid a linear search when not doing debug
6509 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6511 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6512 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6513 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6514 (process_event): Change local fd's type to gdb_fildes_t.
6515 (create_file_handler): Adjust prototype.
6516 (delete_file_handler): Adjust prototype.
6517 (handle_file_event): Adjust prototype. Use pfildes.
6518 (create_file_event): Adjsut prototype.
6519 * remote-utils.c (remote_desc, listen_desc): Change type to
6521 * server.h: New gdb_fildes_t typedef.
6522 [USE_WIN32API]: Include winsock2.h.
6523 (delete_file_handler, add_file_handler): Adjust prototypes.
6525 * utils.c (pfildes): New.
6527 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6529 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6530 * configure: Regenerate.
6532 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6534 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6535 (linux_done_accessing_memory): ... this.
6536 (linux_target_ops): Adjust.
6537 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6538 * nto-low.c (nto_target_ops): Adjust comment.
6539 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6540 * spu-low.c (spu_target_ops): Adjust comment.
6541 * target.h (target_ops): Rename unprepare_to_access_memory field
6542 to done_accessing_memory.
6543 (unprepare_to_access_memory): Rename to ...
6544 (done_accessing_memory): ... this.
6546 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6548 * linux-low.c (linux_prepare_to_access_memory): New.
6549 (linux_unprepare_to_access_memory): New.
6550 (linux_target_ops): Install them.
6551 * server.c (read_memory): Rename to ...
6552 (gdb_read_memory): ... this. Use
6553 prepare_to_access_memory/prepare_to_access_memory.
6554 (write_memory): Rename to ...
6555 (gdb_write_memory): ... this. Use
6556 prepare_to_access_memory/prepare_to_access_memory.
6557 (handle_search_memory_1): Adjust.
6558 (process_serial_event): Adjust.
6559 * target.h (struct target_ops): New fields
6560 prepare_to_access_memory and unprepare_to_access_memory.
6561 (prepare_to_access_memory, unprepare_to_access_memory): New.
6562 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6563 prepare_to_access_memory/prepare_to_access_memory.
6564 * nto-low.c (nto_target_ops): Adjust.
6565 * spu-low.c (spu_target_ops): Adjust.
6566 * win32-low.c (win32_target_ops): Adjust.
6568 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6570 * Makefile.in (WARN_CFLAGS): Get it from configure.
6571 (WERROR_CFLAGS): New.
6572 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6573 * configure.ac: Introduce --enable-werror, which adds -Werror to
6574 the compiler command line. Enabled by default. Disable with
6575 --disable-werror. Add -Wdeclaration-after-statement
6576 Wpointer-arith and -Wformat-nonliteral to warning flags.
6577 * configure: Regenerate.
6579 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6581 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6583 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6585 * gdbreplay.c (remote_error): New.
6587 (expect): Use gdbchar. Check for error reading from GDB.
6588 Clarify sync error output.
6589 (play): Check for errors writing to GDB.
6590 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6591 * remote-utils.c (getpkt): Check for errors writing to the remote
6594 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6596 * linux-low.c (linux_wait_1): Move non-debugging code out of
6597 `debug_threads' control.
6599 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6601 * linux-low.c (linux_wait_1): Don't set last_status here.
6602 * server.c (push_event, queue_stop_reply_callback): Assert we're
6603 not pushing a TARGET_WAITKIND_IGNORE event.
6604 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6605 (myresume, handle_target_event): Set the thread's last_resume_kind
6606 and last_status from the target returned status.
6608 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6612 * linux-x86-low.c (update_debug_registers_callback): New.
6613 (i386_dr_low_set_addr): Use it.
6614 (i386_dr_low_get_addr): New.
6615 (i386_dr_low_set_control): Use update_debug_registers_callback.
6616 (i386_dr_low_get_control): New.
6617 (i386_dr_low_get_status): Adjust.
6618 * linux-low.c (linux_stop_lwp): New.
6619 * linux-low.h (linux_stop_lwp): Declare.
6621 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6622 argument instead of a i386_debug_reg_state.
6623 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6624 a i386_debug_reg_state.
6625 (i386_insert_aligned_watchpoint): Adjust.
6626 (i386_remove_aligned_watchpoint): Adjust.
6627 (i386_low_stopped_data_address): Read the debug registers from the
6628 inferior instead of from the mirrors.
6629 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6630 (i386_dr_low_get_addr): Declare.
6631 (i386_dr_low_get_control): Declare.
6632 (i386_dr_low_get_status): Change prototype.
6634 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6635 (i386_dr_low_get_addr): New.
6636 (i386_dr_low_get_control): New.
6637 (i386_dr_low_get_status): Adjust prototype. Return
6639 (i386_initial_stuff): Clear dr_status_mirror and
6641 (i386_get_thread_context): Adjust.
6642 (i386_set_thread_context): Adjust.
6643 (i386_thread_added): Adjust.
6645 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6647 * linux-low.h (linux_thread_area): Delete declaration.
6649 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6651 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6652 after its termination.
6654 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6656 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6657 (gdb_wants_all_stopped): Delete.
6658 (linux_wait_1): Don't call them.
6659 * server.c (handle_v_cont): Tag all threads as want-stopped.
6660 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6661 stopped as "client-wants-stopped".
6663 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6665 * Makefile.in (signals_h): New.
6666 (server_h): Depend on it.
6667 (server.o): Don't depend on $(signals_def).
6668 (signals.o): Depend on $(signals_def).
6670 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6672 * Makefile.in (signals_def): New.
6673 (server_h): Append include/gdb/signals.h and signals_def.
6674 (server.o): Append signals_def.
6676 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6678 * server.c (handle_target_event): Use target_signal_to_host for
6679 resume_info.sig initialization.
6680 * target.h (struct thread_resume) <sig>: New comment.
6682 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6684 * server.c (handle_query): strcpy() the returned string from paddress()
6685 instead of sprintf().
6686 * utils.c (paddress): Return phex_nz().
6688 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6690 * server.c (handle_v_cont): Call mourn_inferior if process
6692 (myresume): Likewise.
6694 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6696 Static tracepoints, and integration with UST.
6698 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6699 * mem-break.c (uninsert_all_breakpoints)
6700 (reinsert_all_breakpoints): New.
6701 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6702 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6703 (gdb_agent_ust_loaded, helper_thread_id)
6704 (gdb_agent_helper_thread_id): New macros.
6705 (struct ipa_sym_addresses): Add addr_ust_loaded,
6706 addr_helper_thread_id, addr_cmd_buf.
6707 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6708 (in_process_agent_loaded_ust): New.
6709 (write_e_ust_not_loaded): New.
6710 (maybe_write_ipa_ust_not_loaded): New.
6711 (struct collect_static_trace_data_action): New.
6712 (enum tracepoint_type) <static_tracepoint>: New.
6713 (struct tracepoint) <handle>: Mention static tracepoints.
6714 (struct static_tracepoint_ctx): New.
6715 (CMD_BUF_SIZE): New.
6716 (add_tracepoint_action): Handle static tracepoint actions.
6717 (unprobe_marker_at): New.
6718 (clear_installed_tracepoints): Handle static tracepoints.
6719 (cmd_qtdp): Handle static tracepoints.
6720 (probe_marker_at): New.
6721 (cmd_qtstart): Handle static tracepoints.
6722 (response_tracepoint): Handle static tracepoints.
6723 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6724 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6725 (get_context_regcache): Handle static tracepoints.
6726 (do_action_at_tracepoint): Handle static tracepoint actions.
6727 (traceframe_find_block_type): Handle static trace data blocks.
6728 (traceframe_read_sdata): New.
6729 (download_tracepoints): Download static tracepoint actions.
6730 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6731 (GDB_PROBE_NAME): New.
6736 (ust_marker_to_static_tracepoint): New.
6738 (collect_ust_data_at_tracepoint): New.
6739 (gdb_ust_probe): New.
6740 (UNIX_PATH_MAX, SOCK_DIR): New.
6741 (gdb_ust_connect_sync_socket): New.
6742 (resume_thread, stop_thread): New.
6743 (run_inferior_command): New.
6744 (init_named_socket): New.
6745 (gdb_ust_socket_init): New.
6746 (cstr_to_hexstr): New.
6748 (first_marker, next_marker): New.
6749 (response_ust_marker): New.
6750 (cmd_qtfstm, cmd_qtsstm): New.
6751 (unprobe_marker_at, probe_marker_at): New.
6752 (cmd_qtstmat, gdb_ust_thread): New.
6753 (gdb_ust_init): New.
6754 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6755 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6757 (x86_64_st_collect_regmap): New.
6758 (X86_64_NUM_ST_COLLECT_GREGS): New.
6759 (AMD64_RIP_REGNUM): New.
6760 (supply_static_tracepoint_registers): New.
6761 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6763 (i386_st_collect_regmap): New.
6764 (i386_NUM_ST_COLLECT_GREGS): New.
6765 (supply_static_tracepoint_registers): New.
6766 * server.c (handle_query): Handle qXfer:statictrace:read.
6767 <qSupported>: Report support for StaticTracepoints, and
6768 qXfer:statictrace:read features.
6769 * server.h (traceframe_read_sdata)
6770 (supply_static_tracepoint_registers): Declare.
6771 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6772 (unpack_varlen_hex): Include in IPA build.
6773 * Makefile.in (ustlibs, ustinc): New.
6774 (IPA_OBJS): Add remote-utils-ipa.o.
6775 ($(IPA_LIB)): Link -ldl and -lpthread.
6777 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6778 * config.in, configure: Regenerate.
6780 2010-06-20 Ian Lance Taylor <iant@google.com>
6781 Pedro Alves <pedro@codesourcery.com>
6783 * linux-x86-low.c (always_true): Delete.
6784 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6785 trying to fool the compiler with always_true.
6787 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6789 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6790 conditions in gdbserver.
6792 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6794 * spu-low.c (spu_read_memory): Wrap around local store limit.
6795 (spu_write_memory): Likewise.
6797 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6799 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6800 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6802 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6804 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6805 uses with LONGEST uses.
6807 2010-06-14 Stan Shebs <stan@codesourcery.com>
6808 Pedro Alves <pedro@codesourcery.com>
6812 * linux-x86-low.c: Include limits.h.
6817 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6818 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6819 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6820 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6821 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6822 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6823 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6824 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6825 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6826 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6827 (amd64_emit_void_call_2): New.
6828 (amd64_emit_ops): New.
6829 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6830 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6831 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6832 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6833 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6834 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6835 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6836 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6837 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6838 (i386_emit_stack_adjust, i386_emit_int_call_1)
6839 (i386_emit_void_call_2): New.
6840 (i386_emit_ops): New.
6841 (x86_emit_ops): New.
6842 (the_low_target): Install x86_emit_ops.
6843 * server.h (struct emit_ops): New.
6844 (get_raw_reg_func_addr): Declare.
6845 (current_insn_ptr, emit_error): Declare.
6846 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6847 (set_trace_state_variable_value): New defines.
6848 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6849 addr_get_trace_state_variable_value and
6850 addr_set_trace_state_variable_value.
6851 (symbol_list): New fields for get_raw_reg,
6852 get_trace_state_variable_value and set_trace_state_variable_value.
6853 (condfn): New typedef.
6854 (struct tracepoint): New field `compiled_cond'.
6855 (do_action_at_tracepoint): Clear compiled_cond.
6856 (get_trace_state_variable_value, set_trace_state_variable_value):
6858 (condition_true_at_tracepoint): If there's a compiled condition,
6860 (current_insn_ptr, emit_error): New globals.
6861 (struct bytecode_address): New.
6862 (get_raw_reg_func_addr): New.
6863 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6864 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6865 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6866 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6867 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6868 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6869 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6870 (compile_tracepoint_condition, compile_bytecodes): New.
6871 * target.h (emit_ops): Forward declare.
6872 (struct target_ops): New field emit_ops.
6873 (target_emit_ops): New.
6874 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6875 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6876 * linux-low.c (linux_emit_ops): New.
6877 (linux_target_ops): Install it.
6878 * linux-low.h (struct linux_target_ops): New field emit_ops.
6880 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6882 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6883 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6885 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6886 Stan Shebs <stan@codesourcery.com>
6888 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6889 (all): Depend on $(extra_libraries).
6890 (install-only): Install the IPA.
6891 (IPA_OBJS, IPA_LIB): New.
6892 (clean): Remove the IPA lib.
6893 (IPAGENT_CFLAGS): New.
6894 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6895 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6896 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6897 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6898 * configure.ac: Check for atomic builtins support in the compiler.
6899 (IPA_DEPFILES, extra_libraries): Define.
6900 * configure.srv (ipa_obj): Add description.
6901 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6902 (i[34567]86-*-linux*): Set ipa_obj.
6903 (x86_64-*-linux*): Set ipa_obj.
6904 * linux-low.c (stabilizing_threads): New.
6905 (supports_fast_tracepoints): New.
6906 (linux_detach): Stabilize threads before detaching.
6907 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6908 the lwp is either not stabilizing, or is moving out of a jump pad.
6909 (linux_fast_tracepoint_collecting): New.
6910 (maybe_move_out_of_jump_pad): New.
6911 (enqueue_one_deferred_signal): New.
6912 (dequeue_one_deferred_signal): New.
6913 (linux_wait_for_event_1): If moving out of a jump pad, defer
6914 pending signals to later.
6915 (linux_stabilize_threads): New.
6916 (linux_wait_1): Check if threads need moving out of jump pads, and
6918 (stuck_in_jump_pad_callback): New.
6919 (move_out_of_jump_pad_callback): New.
6921 (linux_resume_one_lwp): Handle moving out of jump pads.
6922 (linux_set_resume_request): Dequeue deferred signals.
6923 (need_step_over_p): Also step over fast tracepoint jumps.
6924 (start_step_over): Also uninsert fast tracepoint jumps.
6925 (finish_step_over): Also reinsert fast tracepoint jumps.
6926 (linux_install_fast_tracepoint_jump): New.
6927 (linux_target_ops): Install linux_stabilize_threads and
6928 linux_install_fast_tracepoint_jump_pad.
6929 * linux-low.h (linux_target_ops) <get_thread_area,
6930 install_fast_tracepoint_jump_pad>: New fields.
6931 (struct lwp_info) <collecting_fast_tracepoint,
6932 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6933 (linux_get_thread_area): Declare.
6934 * linux-x86-low.c (jump_insn): New.
6935 (x86_get_thread_area): New.
6936 (append_insns): New.
6938 (amd64_install_fast_tracepoint_jump_pad): New.
6939 (i386_install_fast_tracepoint_jump_pad): New.
6940 (x86_install_fast_tracepoint_jump_pad): New.
6941 (the_low_target): Install x86_get_thread_area and
6942 x86_install_fast_tracepoint_jump_pad.
6943 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6944 (struct fast_tracepoint_jump): New.
6945 (fast_tracepoint_jump_insn): New.
6946 (fast_tracepoint_jump_shadow): New.
6947 (find_fast_tracepoint_jump_at): New.
6948 (fast_tracepoint_jump_here): New.
6949 (delete_fast_tracepoint_jump): New.
6950 (set_fast_tracepoint_jump): New.
6951 (uninsert_fast_tracepoint_jumps_at): New.
6952 (reinsert_fast_tracepoint_jumps_at): New.
6953 (set_breakpoint_at): Use write_inferior_memory.
6954 (uninsert_raw_breakpoint): Use write_inferior_memory.
6955 (check_mem_read): Mask out fast tracepoint jumps.
6956 (check_mem_write): Mask out fast tracepoint jumps.
6957 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6958 (set_fast_tracepoint_jump): Declare.
6959 (delete_fast_tracepoint_jump)
6960 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6961 (reinsert_fast_tracepoint_jumps_at): Declare.
6962 * regcache.c: Don't compile many functions when building the
6963 in-process agent library.
6964 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6965 the register buffer in the heap.
6966 (free_register_cache): If the register buffer isn't owned by the
6967 regcache, don't free it.
6968 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6969 pre-existing register caches.
6970 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6972 (convert_ascii_to_int): : Constify `from' parameter type.
6973 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6974 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6975 the needed buffer in-place.
6976 (relocate_instruction): New.
6977 * server.c (handle_query) <qSymbols>: If the target supports
6978 tracepoints, give it a chance of looking up symbols. Report
6979 support for fast tracepoints.
6980 (handle_status): Stabilize threads.
6981 (process_serial_event): Adjust.
6982 * server.h (struct fast_tracepoint_jump): Forward declare.
6983 (struct process_info) <fast_tracepoint_jumps>: New field.
6984 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6985 (decode_X_packet, decode_M_packet): Adjust.
6986 (relocate_instruction): Declare.
6987 (in_process_agent_loaded): Declare.
6988 (tracepoint_look_up_symbols): Declare.
6989 (struct fast_tpoint_collect_status): Declare.
6990 (fast_tracepoint_collecting): Declare.
6991 (force_unlock_trace_buffer): Declare.
6992 (handle_tracepoint_bkpts): Declare.
6993 (initialize_low_tracepoint)
6994 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6995 * target.h (struct target_ops) <stabilize_threads,
6996 install_fast_tracepoint_jump_pad>: New fields.
6997 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6998 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6999 [HAVE_STDINT_H]: Include stdint.h.
7000 (trace_debug_1): Rename to ...
7001 (trace_vdebug): ... this.
7002 (trace_debug): Rename to ...
7003 (trace_debug_1): ... this. Add `level' parameter.
7005 (ATTR_USED, ATTR_NOINLINE): New.
7006 (IP_AGENT_EXPORT): New.
7007 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7008 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7009 (about_to_request_buffer_space, trace_buffer_is_full)
7010 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7011 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7012 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7013 (traceframe_write_count, traceframes_created)
7014 (trace_state_variables)
7015 New renaming defines.
7016 (struct ipa_sym_addresses): New.
7017 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7019 (ipa_sym_addrs): New.
7020 (all_tracepoint_symbols_looked_up): New.
7021 (in_process_agent_loaded): New.
7022 (write_e_ipa_not_loaded): New.
7023 (maybe_write_ipa_not_loaded): New.
7024 (tracepoint_look_up_symbols): New.
7025 (debug_threads) [IN_PROCESS_AGENT]: New.
7026 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7027 (UNKNOWN_SIDE_EFFECTS): New.
7028 (stop_tracing): New.
7029 (flush_trace_buffer): New.
7030 (stop_tracing_bkpt): New.
7031 (flush_trace_buffer_bkpt): New.
7032 (read_inferior_integer): New.
7033 (read_inferior_uinteger): New.
7034 (read_inferior_data_pointer): New.
7035 (write_inferior_data_pointer): New.
7036 (write_inferior_integer): New.
7037 (write_inferior_uinteger): New.
7038 (struct collect_static_trace_data_action): Delete.
7039 (enum tracepoint_type): New.
7040 (struct tracepoint) <type>: New field `type'.
7041 <actions_str, step_actions, step_actions_str>: Only include in
7043 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7044 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7045 (tracepoints): Use IP_AGENT_EXPORT.
7046 (last_tracepoint): Don't include in the IPA.
7047 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7048 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7049 (alloced_trace_state_variables): New.
7050 (trace_state_variables): Use IP_AGENT_EXPORT.
7051 (traceframe_t): Delete unused variable.
7052 (circular_trace_buffer): Don't include in the IPA.
7053 (trace_buffer_start): Delete.
7054 (struct trace_buffer_control): New.
7055 (trace_buffer_free): Delete.
7056 (struct ipa_trace_buffer_control): New.
7057 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7058 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7060 (trace_buffer_ctrl): New.
7061 (TRACE_BUFFER_CTRL_CURR): New.
7062 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7063 Reimplement as macros.
7064 (trace_buffer_wrap): Delete.
7065 (traceframe_write_count, traceframe_read_count)
7066 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7067 (struct tracepoint_hit_ctx) <type>: New field.
7068 (struct fast_tracepoint_ctx): New.
7069 (memory_barrier): New.
7071 (record_tracepoint_error): Update atomically in the IPA.
7072 (clear_inferior_trace_buffer): New.
7073 (about_to_request_buffer_space): New.
7074 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7075 updating the same buffer.
7076 (add_tracepoint): Default the tracepoint's type to trap
7077 tracepoint, and orig_size to -1.
7078 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7080 (create_trace_state_variable): New parameter `gdb'. Handle it.
7081 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7082 (cmd_qtdp): Handle fast tracepoints.
7084 (max_jump_pad_size): New.
7085 (gdb_jump_pad_head): New.
7086 (get_jump_space_head): New.
7087 (claim_jump_space): New.
7088 (sort_tracepoints): New.
7089 (MAX_JUMP_SIZE): New.
7090 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7092 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7093 support. Upload fast traceframes, and delete internal IPA
7095 (stop_tracing_handler): New.
7096 (flush_trace_buffer_handler): New.
7097 (cmd_qtstop): Upload fast tracepoints.
7098 (response_tracepoint): Handle fast tracepoints.
7099 (tracepoint_finished_step): Upload fast traceframes. Set the
7100 tracepoint hit context's tracepoint type.
7101 (handle_tracepoint_bkpts): New.
7102 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7103 type. Add comment about fast tracepoints.
7104 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7105 non-existing action_str field.
7106 (get_context_regcache): Handle fast tracepoints.
7107 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7109 (fast_tracepoint_from_jump_pad_address): New.
7110 (fast_tracepoint_from_ipa_tpoint_address): New.
7111 (collecting_t): New.
7112 (force_unlock_trace_buffer): New.
7113 (fast_tracepoint_collecting): New.
7116 (write_inferior_data_ptr): New.
7117 (target_tp_heap): New.
7118 (target_malloc): New.
7119 (download_agent_expr): New.
7121 (download_tracepoints): New.
7122 (download_trace_state_variables): New.
7123 (upload_fast_traceframes): New.
7124 (IPA_FIRST_TRACEFRAME): New.
7125 (IPA_NEXT_TRACEFRAME_1): New.
7126 (IPA_NEXT_TRACEFRAME): New.
7127 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7128 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7129 (gdb_jump_pad_buffer_end): New.
7130 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7131 (initialize_tracepoint): Adjust.
7132 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7133 buffer. Initialize the low module.
7134 * utils.c (PREFIX, TOOLNAME): New.
7135 (malloc_failure): Use PREFIX.
7136 (error): In the IPA, an error causes an exit.
7137 (fatal, warning): Use PREFIX.
7138 (internal_error): Use TOOLNAME.
7139 (NUMCELLS): Increase to 10.
7140 * configure, config.in: Regenerate.
7142 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7144 * server.c (handle_query) <qSupported>: Do two passes over the
7145 qSupported string to avoid nesting strtok.
7147 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7149 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7151 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7153 * configure: Regenerate.
7154 * proc-service.list: New.
7156 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7158 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7161 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7163 * gdbreplay.c (remote_open): Check error return from socket() call by
7164 its equality to -1 not by it being negative.
7165 * remote-utils.c (remote_open): Likewise.
7167 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7169 * config.h: Regenerate.
7171 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7173 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7174 doesn't provide PTRACE_GET_THREAD_AREA.
7176 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7178 * linux-m68k-low.c: Include <asm/ptrace.h>
7179 (ps_get_thread_area): Implement.
7181 2010-05-03 Doug Evans <dje@google.com>
7183 * event-loop.c (struct callback_event): New struct.
7184 (callback_list): New global.
7185 (append_callback_event, delete_callback_event): New functions.
7186 (process_callback): New function.
7187 (start_event_loop): Call it.
7188 * remote-utils.c (NOT_SCHEDULED): Define.
7189 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7190 moved out of readchar.
7191 (readchar): Rewrite. Call reschedule before returning.
7192 (reset_readchar): New function.
7193 (remote_close): Call it.
7194 (process_remaining, reschedule): New functions.
7195 * server.h (callback_handler_func): New typedef.
7196 (append_callback_event, delete_callback_event): Declare.
7198 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7200 * proc-service.c (ps_pglobal_lookup): Use
7201 thread_db_look_up_one_symbol.
7202 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7203 parameter. Use it instead of all_symbols_looked_up.
7204 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7206 (all_symbols_looked_up): Don't declare.
7207 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7208 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7210 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7211 Set all_symbols_looked_up here.
7212 (thread_db_look_up_one_symbol): New.
7213 (thread_db_get_tls_address): Adjust.
7214 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7215 thread_db object on the heap, and tentatively set it in the
7217 (thread_db_init): Don't set all_symbols_looked_up here.
7218 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7220 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7222 * linux-low.c (linux_kill, linux_detach): Adjust.
7223 (status_pending_p_callback): Remove redundant statement. Check
7224 for !TARGET_WAITIKIND_IGNORE, instead of
7225 TARGET_WAITKIND_STOPPED.
7226 (handle_tracepoints): Make sure LWP is locked. Adjust.
7227 (linux_wait_for_event_1): Adjust.
7228 (linux_cancel_breakpoints): New.
7229 (unsuspend_one_lwp): New.
7230 (unsuspend_all_lwps): New.
7231 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7232 (send_sigstop_callback): Change return type to int, add new
7233 `except' parameter and handle it.
7234 (suspend_and_send_sigstop_callback): New.
7235 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7236 pass them down. If SUSPEND, also increment the lwp's suspend
7238 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7239 (need_step_over_p): Don't consider suspended LWPs.
7240 (start_step_over): Adjust.
7241 (proceed_one_lwp): Change return type to int, add new `except'
7242 parameter and handle it.
7243 (unsuspend_and_proceed_one_lwp): New.
7244 (proceed_all_lwps): Use find_inferior instead of
7246 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7247 also decrement the suspend count of LWPs. Pass `except' down,
7248 instead of hacking its suspend count.
7249 (linux_pause_all): Add `freeze' parameter. Adjust.
7250 (linux_unpause_all): New.
7251 (linux_target_ops): Install linux_unpause_all.
7252 * server.c (handle_status): Adjust.
7253 * target.h (struct target_ops): New fields `unpause_all' and
7254 `cancel_breakpoints'. Add new parameter to `pause_all'.
7255 (pause_all): Add new `freeze' parameter.
7257 (cancel_breakpoints): New.
7258 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7260 (cmd_qtstart): Pause threads.
7261 (stop_tracing): Pause threads, and cancel breakpoints.
7262 * win32-low.c (win32_target_ops): Adjust.
7264 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7266 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7267 the inferior right away from here...
7268 (linux_wait_1): ... to here, and adjust to check the thread's
7269 last_resume_kind instead of the lwp's step or stop_expected flags.
7271 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7273 * README: Use consistent `GDB' and `GDBserver' spellings.
7275 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7277 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7278 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7279 (linux_detach_one_lwp): Assume the lwp is stopped.
7280 (any_thread_of): Delete.
7281 (linux_detach): Stop all lwps here. Don't blindly delete all
7283 (delete_lwp_callback): New.
7284 (linux_mourn): Delete all lwps of the process that is gone.
7285 (linux_wait_1): Don't delete the last lwp of the process here.
7286 * mem-break.h (mark_breakpoints_out): Declare.
7287 * mem-break.c (mark_breakpoints_out): New.
7288 (free_all_breakpoints): Use it.
7289 * server.c (handle_target_event): If the process is gone, mark
7291 * thread-db.c (struct thread_db) <create_bp>: New field.
7292 (thread_db_enable_reporting): Fix prototype. Store a thread event
7293 breakpoint reference in the thread_db struct.
7294 (thread_db_load_search): Clear the thread_db object.
7295 (try_thread_db_load_1): Ditto.
7296 (switch_to_process): New.
7297 (disable_thread_event_reporting): Use it.
7298 (remove_thread_event_breakpoints): New.
7299 (thread_db_detach, thread_db_mourn): Use it.
7301 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7303 * linux-low.c (linux_enable_event_reporting): New.
7304 (linux_wait_for_event_1, handle_extended_wait): Use it.
7306 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7308 * linux-low.c (linux_kill_one_lwp, linux_kill)
7309 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7310 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7311 SIGSTOP even if the LWP is stopped.
7312 (send_sigstop_callback): New.
7313 (stop_all_lwps): Use send_sigstop_callback instead.
7314 (linux_resume_one_thread): Adjust.
7315 (proceed_one_lwp): Still proceed an LWP that the client has
7316 requested to stop, if we haven't reported it as stopped yet. Make
7317 sure that LWPs the client want stopped, have a pending SIGSTOP.
7319 2010-04-26 Doug Evans <dje@google.com>
7321 * server.c (handle_general_set): Make static.
7323 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7324 Print received char after testing for error/eof instead of before.
7325 (input_interrupt): Tweak comment.
7327 2010-04-23 Doug Evans <dje@google.com>
7329 * server.c (start_inferior): Print inferior argv if --debug.
7331 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7333 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7334 * nto-x86-low.c: Include server.h
7336 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7338 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7339 be consistent with other sources of this directory.
7340 (init_registers_amd64): Correct name of source file of this function
7343 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7345 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7348 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7350 * win32-i386-low.c: Add 64-bit support.
7351 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7352 (init_registers_amd64): Declare.
7353 (mappings): Add 64-bit version of array.
7354 (init_windows_x86): New function.
7355 (the_low_target): Change init_arch field to init_windows_x86.
7357 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7359 * win32-low.c: Adapt to support also 64-bit architecture.
7360 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7361 (get_image_name): Use SIZE_T type for local variable `done'.
7362 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7363 (toolhelp_get_dll_name): Idem.
7364 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7365 Use uintptr_t typecast to avoid warning.
7366 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7367 (handle_exception): Use phex_nz to avoid warning.
7368 (win32_wait): Remove unused local variable `process'.
7370 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7372 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7375 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7377 * configure.ac: Use `ws2_32' library for srv_mingw.
7378 * configure: Regenerate.
7379 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7380 * remote-utils.c: Likewise.
7382 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7384 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7385 if __x86_64__ is defined.
7387 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7389 * configure: Regenerate.
7391 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7393 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7394 * target.h (target_ops): New get_tib_address field.
7395 * win32-low.h (win32_thread_info): Add thread_local_base field.
7396 * win32-low.c (child_add_thread): Add tlb argument.
7397 Set thread_local_base field to TLB.
7398 (get_child_debug_event): Adapt to child_add_thread change.
7399 (win32_get_tib_address): New function.
7400 (win32_target_ops): Set get_tib_address field to
7401 win32_get_tib_address.
7402 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7404 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7406 * linux-low.c (linux_mourn): Also remove the process.
7407 * server.c (handle_target_event): Don't remove the process here.
7408 * nto-low.c (nto_mourn): New.
7409 (nto_target_ops): Install it.
7410 * spu-low.c (spu_mourn): New.
7411 (spu_target_ops): Install it.
7412 * win32-low.c (win32_mourn): New.
7413 (win32_target_ops): Install it.
7415 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7417 * server.h (buffer_xml_printf): Remove redundant `;'.
7419 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7421 * regcache.c (set_register_cache): Invalidate regcaches before
7422 changing the register cache layout.
7423 (regcache_invalidate_one): Allow a NULL regcache.
7424 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7425 regcaches before changing the register cache layout or the target
7428 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7430 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7431 variable warning on Linux/x86-64.
7433 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7435 GDBserver disconnected tracing support.
7437 * linux-low.c (linux_remove_process): Delete.
7438 (add_lwp): Don't set last_resume_kind here.
7439 (linux_kill): Use `mourn'.
7440 (linux_detach): Use `thread_db_detach', and `mourn'.
7442 (linux_attach_lwp_1): Adjust comment.
7443 (linux_attach): last_resume_kind moved the thread_info; adjust.
7444 (status_pending_p_callback): Adjust.
7445 (linux_wait_for_event_1): Adjust.
7446 (count_events_callback, select_singlestep_lwp_callback)
7447 (select_event_lwp_callback, cancel_breakpoints_callback)
7448 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7449 (proceed_one_lwp): Adjust.
7450 (linux_async): Add debug output.
7451 (linux_thread_stopped): New.
7452 (linux_pause_all): New.
7453 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7455 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7456 (thread_db_free): Delete declaration.
7457 (thread_db_detach, thread_db_mourn): Declare.
7458 * thread-db.c (thread_db_init): Use thread_db_mourn.
7459 (thread_db_free): Delete, split in two.
7460 (disable_thread_event_reporting): New.
7461 (thread_db_detach): New.
7462 (thread_db_mourn): New.
7464 * server.h (struct thread_info) <last_resume_kind>: New field.
7465 <attached>: Add comment.
7466 <gdb_detached>: New field.
7467 (handler_func): Change return type to int.
7468 (handle_serial_event, handle_target_event): Ditto.
7469 (gdb_connected): Declare.
7471 (disconnected_tracing): Declare.
7472 (stop_tracing): Declare.
7474 * server.c (handle_query) <qSupported>: Report support for
7475 disconnected tracing.
7476 (queue_stop_reply_callback): Account for running threads.
7477 (gdb_wants_thread_stopped): New.
7478 (gdb_wants_all_threads_stopped): New.
7479 (gdb_reattached_process): New.
7480 (handle_status): Clear the `gdb_detached' flag of all processes.
7481 In all-stop, stop all threads.
7482 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7483 (process_serial_event): If the remote connection breaks, or if an
7484 exit was forced with "monitor exit", force an event loop exit.
7485 Handle disconnected tracing on detach.
7486 (handle_serial_event): Adjust.
7487 (handle_target_event): If GDB isn't connected, forward events back
7488 to the inferior, unless the last process exited, in which case,
7489 exit gdbserver. Adjust interface.
7491 * remote-utils.c (remote_open): Don't block in accept. Instead
7492 register an event loop source on the listen socket file
7493 descriptor. Refactor bits into ...
7494 (listen_desc): ... this new global.
7495 (gdb_connected): ... this new function.
7496 (enable_async_notification): ... this new function.
7497 (handle_accept_event): ... this new function.
7498 (remote_close): Clear remote_desc.
7500 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7502 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7504 (mourn_inferior): Define.
7505 (target_process_qsupported): Avoid the dangling else problem.
7506 (thread_stopped): Define.
7507 (pause_all): Define.
7508 (target_waitstatus_to_string): Declare.
7509 * target.c (target_waitstatus_to_string): New.
7511 * tracepoint.c (tracing): Make extern.
7512 (disconnected_tracing): New.
7513 (stop_tracing): Make extern. Handle tracing stops due to GDB
7515 (cmd_qtdisconnected): New.
7516 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7517 (handle_tracepoint_general_set): Handle QTDisconnected.
7519 * event-loop.c (event_handler_func): Change return type to int.
7520 (process_event): Bail out if the event handler wants the event
7522 (handle_file_event): Ditto.
7523 (start_event_loop): Bail out if the event handler wants the event
7526 * nto-low.c (nto_target_ops): Adjust.
7527 * spu-low.c (spu_wait): Don't remove the process here.
7528 (spu_target_ops): Adjust.
7529 * win32-low.c (win32_wait): Don't remove the process here.
7530 (win32_target_ops): Adjust.
7532 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7534 * regcache.c (realloc_register_cache): Invalidate inferior's
7535 regcache before recreating it.
7537 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7539 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7541 2010-04-09 Stan Shebs <stan@codesourcery.com>
7542 Pedro Alves <pedro@codesourcery.com>
7544 * server.h (LONGEST): New.
7545 (struct thread_info) <while_stepping>: New field.
7546 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7548 (initialize_tracepoint, handle_tracepoint_general_set)
7549 (handle_tracepoint_query, tracepoint_finished_step)
7550 (tracepoint_was_hit, release_while_stepping_state_list):
7551 (current_traceframe): Declare.
7552 * server.c (handle_general_set): Handle tracepoint packets.
7554 (write_memory): New.
7555 (handle_search_memory_1): Use read_memory.
7556 (handle_query): Report support for conditional tracepoints, trace
7557 state variables, and tracepoint sources. Handle tracepoint
7559 (main): Initialize the tracepoints module.
7560 (process_serial_event): Handle traceframe reads/writes.
7562 * linux-low.c (handle_tracepoints): New.
7563 (linux_wait_1): Call it.
7564 (linux_resume_one_lwp): Handle while-stepping.
7565 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7566 (linux_target_ops): Install them.
7567 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7569 * linux-x86-low.c (x86_supports_tracepoints): New.
7570 (the_low_target). Install it.
7572 * mem-break.h (delete_breakpoint): Declare.
7573 * mem-break.c (delete_breakpoint): Make external.
7575 * target.h (struct target_ops): Add `supports_tracepoints',
7576 `read_pc', and `write_pc' fields.
7577 (target_supports_tracepoints): Define.
7578 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7581 * regcache.h (struct regcache) <registers_owned>: New field.
7582 (init_register_cache, regcache_cpy): Declare.
7583 (regcache_read_pc, regcache_write_pc): Declare.
7584 (register_cache_size): Declare.
7585 (supply_regblock): Declare.
7586 * regcache.c (init_register_cache): New.
7587 (new_register_cache): Use it.
7588 (regcache_cpy): New.
7589 (register_cache_size): New.
7590 (supply_regblock): New.
7591 (regcache_read_pc, regcache_write_pc): New.
7593 * tracepoint.c: New.
7595 * Makefile.in (OBS): Add tracepoint.o.
7596 (tracepoint.o): New rule.
7598 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7600 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7602 (i386-mmx.c): Likewise.
7603 (i386-mmx-linux.o): Likewise.
7604 (i386-mmx-linux.c): Likewise.
7606 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7607 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7608 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7609 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7611 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7612 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7613 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7615 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7617 * Makefile.in (clean): Updated.
7619 (i386-avx.c): Likewise.
7620 (i386-avx-linux.o): Likewise.
7621 (i386-avx-linux.c): Likewise.
7622 (amd64-avx.o): Likewise.
7623 (amd64-avx.c): Likewise.
7624 (amd64-avx-linux.o): Likewise.
7625 (amd64-avx-linux.c): Likewise.
7627 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7628 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7629 (srv_amd64_regobj): Add amd64-avx.o.
7630 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7631 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7632 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7633 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7634 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7635 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7636 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7638 * i387-fp.c: Include "i386-xstate.h".
7640 (i387_cache_to_xsave): Likewise.
7641 (i387_xsave_to_cache): Likewise.
7642 (x86_xcr0): Likewise.
7644 * i387-fp.h (i387_cache_to_xsave): Likewise.
7645 (i387_xsave_to_cache): Likewise.
7646 (x86_xcr0): Likewise.
7648 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7649 * linux-crisv32-low.c (target_regsets): Likewise.
7650 * linux-m68k-low.c (target_regsets): Likewise.
7651 * linux-mips-low.c (target_regsets): Likewise.
7652 * linux-ppc-low.c (target_regsets): Likewise.
7653 * linux-s390-low.c (target_regsets): Likewise.
7654 * linux-sh-low.c (target_regsets): Likewise.
7655 * linux-sparc-low.c (target_regsets): Likewise.
7656 * linux-xtensa-low.c (target_regsets): Likewise.
7658 * linux-low.c: Include <sys/uio.h>.
7659 (regsets_fetch_inferior_registers): Support nt_type.
7660 (regsets_store_inferior_registers): Likewise.
7661 (linux_process_qsupported): New.
7662 (linux_target_ops): Add linux_process_qsupported.
7664 * linux-low.h (regset_info): Add nt_type.
7665 (linux_target_ops): Add process_qsupported.
7667 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7669 (init_registers_i386_avx_linux): New.
7670 (init_registers_amd64_avx_linux): Likewise.
7671 (xmltarget_i386_linux_no_xml): Likewise.
7672 (xmltarget_amd64_linux_no_xml): Likewise.
7673 (PTRACE_GETREGSET): Likewise.
7674 (PTRACE_SETREGSET): Likewise.
7675 (x86_fill_xstateregset): Likewise.
7676 (x86_store_xstateregset): Likewise.
7677 (use_xml): Likewise.
7678 (x86_linux_update_xmltarget): Likewise.
7679 (x86_linux_process_qsupported): Likewise.
7680 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7681 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7682 init_registers_i386_linux here. Call
7683 x86_linux_update_xmltarget.
7684 (the_low_target): Add x86_linux_process_qsupported.
7686 * server.c (handle_query): Call target_process_qsupported.
7688 * target.h (target_ops): Add process_qsupported.
7689 (target_process_qsupported): New.
7691 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7693 * inferiors.c (add_thread): Set last_status kind to
7694 TARGET_WAITKIND_IGNORE.
7695 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7696 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7697 (linux_wait_1): Move `thread' local definition to block that uses
7698 it. Don't NULL initialize `event_child'.
7699 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7700 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7701 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7703 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7705 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7706 an extended waitstatus, or by a watchpoint.
7707 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7708 thread was stepping or has been stopped by a watchpoint.
7710 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7712 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7713 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7714 of another, then delete the previous, and validate all
7716 (validate_inserted_breakpoint): New.
7717 (delete_disabled_breakpoints): New.
7718 (validate_breakpoints): New.
7719 (check_mem_read): Validate breakpoints before trusting their
7720 shadow. Delete disabled breakpoints.
7721 (check_mem_write): Validate breakpoints before trusting they
7722 should be inserted. Delete disabled breakpoints.
7723 * mem-break.h (validate_breakpoints):
7724 * server.c (handle_query): Validate breakpoints when we see a
7727 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7729 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7730 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7731 if we could tell there's a GDB breakpoint at stop_pc.
7732 (need_step_over_p): Don't do a step over if we find a GDB
7733 breakpoint at the resume PC.
7735 * mem-break.c (struct raw_breakpoint): New.
7736 (enum bkpt_type): New type `gdb_breakpoint'.
7737 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7738 fields. New field `raw'.
7739 (find_raw_breakpoint_at): New.
7740 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7742 (set_breakpoint_at): Adjust.
7743 (delete_raw_breakpoint): New.
7744 (release_breakpoint): New.
7745 (delete_breakpoint): Rename to...
7746 (delete_breakpoint_1): ... this. Add proc parameter. Use
7747 release_breakpoint. Return ENOENT.
7748 (delete_breakpoint): Reimplement.
7749 (find_breakpoint_at): Delete.
7750 (find_gdb_breakpoint_at): New.
7751 (delete_breakpoint_at): Delete.
7752 (set_gdb_breakpoint_at): New.
7753 (delete_gdb_breakpoint_at): New.
7754 (gdb_breakpoint_here): New.
7755 (set_reinsert_breakpoint): Use release_breakpoint.
7756 (uninsert_breakpoint): Rename to ...
7757 (uninsert_raw_breakpoint): ... this.
7758 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7759 (reinsert_raw_breakpoint): Change parameter type to
7761 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7763 (check_breakpoints): Adjust. Use release_breakpoint.
7764 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7765 (breakpoint_inserted_here): Ditto.
7766 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7767 Don't trust the breakpoint's shadow if it is not inserted.
7768 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7769 (delete_all_breakpoints): Adjust.
7770 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7771 use delete_breakpoint_1.
7773 * mem-break.h (breakpoints_supported): Delete declaration.
7774 (set_gdb_breakpoint_at): Declare.
7775 (gdb_breakpoint_here): Declare.
7776 (delete_breakpoint_at): Delete.
7777 (delete_gdb_breakpoint_at): Declare.
7779 * server.h (struct raw_breakpoint): Forward declare.
7780 (struct process_info): New field `raw_breakpoints'.
7782 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7785 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7787 * linux-low.c (status_pending_p_callback): Fix comment.
7788 (linux_wait_for_event_1): Move most of the internal breakpoint
7789 handling from here...
7790 (linux_wait_1): ... to here.
7791 (count_events_callback): New.
7792 (select_singlestep_lwp_callback): New.
7793 (select_event_lwp_callback): New.
7794 (cancel_breakpoints_callback): New.
7795 (select_event_lwp): New.
7796 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7797 priority to all LWPs that have had events that should be reported
7798 to the client. Cancel breakpoints when about to reporting the
7799 event to the client, not while stopping lwps. No longer cancel
7800 finished single-steps here.
7801 (cancel_finished_single_step): Delete.
7802 (cancel_finished_single_steps): Delete.
7804 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7806 * mem-break.c (enum bkpt_type): New.
7807 (struct breakpoint): New field `type'.
7808 (set_breakpoint_at): Change return type to struct breakpoint
7809 pointer. Set type to `other_breakpoint' by default.
7810 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7811 in the breakpoint list.
7812 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7813 (reinsert_breakpoint): Rename to ...
7814 (reinsert_raw_breakpoint): ... this.
7815 (reinsert_breakpoints_at): Adjust.
7816 * mem-break.h (struct breakpoint): Declare.
7817 (set_breakpoint_at): Change return type to struct breakpoint
7820 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7822 * server.c (handle_query): Assign, not compare.
7824 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7826 Teach linux gdbserver to step-over-breakpoints.
7828 * linux-low.c (can_hardware_single_step): New.
7829 (supports_breakpoints): New.
7830 (handle_extended_wait): If stopping threads, read the stop pc of
7833 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7834 low target doesn't support retrieving the PC.
7835 (add_lwp): Set last_resume_kind to resume_continue.
7836 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7837 (linux_attach): Don't clear stop_expected. Set the lwp's
7838 last_resume_kind to resume_stop.
7839 (linux_detach_one_lwp): Don't check for removed breakpoints.
7840 (check_removed_breakpoint): Delete.
7841 (status_pending_p): Rename to ...
7842 (status_pending_p_callback): ... this. Don't check for removed
7843 breakpoints. Don't consider threads that are stopped from GDB's
7845 (linux_wait_for_lwp): Always read the stop_pc here.
7846 (cancel_breakpoint): New.
7847 (step_over_bkpt): New global.
7848 (linux_wait_for_event_1): Implement stepping over breakpoints.
7849 (gdb_wants_lwp_stopped): New.
7850 (gdb_wants_all_stopped): New.
7851 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7852 single-step traps here. Store the thread's last reported target
7854 (send_sigstop): Don't clear stop_expected. Always set it,
7856 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7857 (cancel_finished_single_step): New.
7858 (cancel_finished_single_steps): New.
7859 (wait_for_sigstop): Don't cancel finished single-step traps here.
7860 (linux_resume_one_lwp): Don't check for removed breakpoints.
7861 Don't set `step' on non-hardware step archs.
7862 (linux_set_resume_request): Ignore resume_stop requests if already
7863 stopping or stopped. Set the lwp's last_resume_kind.
7864 (resume_status_pending_p): Don't check for removed breakpoints.
7865 (need_step_over_p): New.
7866 (start_step_over): New.
7867 (finish_step_over): New.
7868 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7869 requests. Clear the thread's last reported target waitstatus.
7870 Don't use the `suspended' flag. Don't consider pending breakpoints.
7871 (linux_resume): Start a step-over if necessary.
7872 (proceed_one_lwp): New.
7873 (proceed_all_lwps): New.
7874 (unstop_all_lwps): New.
7875 * linux-low.h (struct lwp_info): Rewrite comment for the
7876 `suspended' flag. Add the `stop_pc' field. Delete the
7877 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7878 Add `'last_resume_kind' and `need_step_over' fields.
7879 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7880 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7881 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7882 (set_raw_breakpoint_at): New.
7883 (set_breakpoint_at): Rewrite to use it.
7884 (reinsert_breakpoint_handler): Delete.
7885 (set_reinsert_breakpoint): New.
7886 (reinsert_breakpoint_by_bp): Delete.
7887 (delete_reinsert_breakpoints): New.
7888 (uninsert_breakpoint): Rewrite.
7889 (uninsert_breakpoints_at): New.
7890 (reinsert_breakpoint): Rewrite.
7891 (reinsert_breakpoints_at): New.
7892 (check_breakpoints): Rewrite.
7893 (breakpoint_here): New.
7894 (breakpoint_inserted_here): New.
7895 (check_mem_read): Adjust.
7896 * mem-break.h (breakpoints_supported, breakpoint_here)
7897 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7898 (reinsert_breakpoint_by_bp): Delete declaration.
7899 (delete_reinsert_breakpoints): Declare.
7900 (reinsert_breakpoint): Delete declaration.
7901 (reinsert_breakpoints_at): Declare.
7902 (uninsert_breakpoint): Delete declaration.
7903 (uninsert_breakpoints_at): Declare.
7904 (check_breakpoints): Adjust prototype.
7905 * server.h: Adjust include order.
7906 (struct thread_info): Declare here. Add a `last_status' field.
7908 2010-03-23 Michael Snyder <msnyder@vmware.com>
7910 * server.c (crc32): New function.
7911 (handle_query): Add handling for 'qCRC:' request.
7913 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7915 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7916 lwp had been stopped by a watchpoint.
7918 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7920 * server.h (internal_error): Declare.
7921 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7922 * utils.c (internal_error): New function.
7924 2010-03-15 Andreas Schwab <schwab@redhat.com>
7926 * configure.srv: Fix typo setting srv_regobj.
7928 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7930 * linux-low.c (fetch_register): Avoid passing a non string literal
7932 (usr_store_inferior_registers): Ditto.
7934 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7936 * linux-low.c (linux_write_memory): Bail out early if peeking
7939 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7941 * linux-low.h (struct lwp_info): New fields
7942 `stopped_by_watchpoint' and `stopped_data_address'.
7943 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7944 here, and cache them in the lwp object.
7945 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7947 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7949 (linux_stopped_by_watchpoint): Rewrite.
7950 (linux_stopped_data_address): Rewrite.
7952 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7954 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7955 switching the current inferior, not before.
7957 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7959 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7960 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7961 i386-linux.c and amd64-linux.c.
7962 (reg-i386.o): Removed.
7963 (reg-i386.c): Likewise.
7964 (reg-i386-linux.o): Likewise.
7965 (reg-i386-linux.c): Likewise.
7966 (reg-x86-64.o): Likewise.
7967 (reg-x86-64.c): Likewise.
7968 (reg-x86-64-linux.o): Likewise.
7969 (reg-x86-64-linux.c): Likewise.
7972 (i386-linux.o): Likewise.
7973 (i386-linux.c): Likewise.
7974 (amd64.o): Likewise.
7975 (amd64.c): Likewise.
7976 (amd64-linux.o): Likewise.
7977 (amd64-linux.c): Likewise.
7979 * configure.srv (srv_i386_regobj): New.
7980 (srv_i386_linux_regobj): Likewise.
7981 (srv_amd64_regobj): Likewise.
7982 (srv_amd64_linux_regobj): Likewise.
7983 (srv_i386_32bit_xmlfiles): Likewise.
7984 (srv_i386_64bit_xmlfiles): Likewise.
7985 (srv_i386_xmlfiles): Likewise.
7986 (srv_amd64_xmlfiles): Likewise.
7987 (srv_i386_linux_xmlfiles): Likewise.
7988 (srv_amd64_linux_xmlfiles): Likewise.
7989 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7990 srv_xmlfiles to $srv_i386_xmlfiles.
7991 (i[34567]86-*-mingw32ce*): Likewise.
7992 (i[34567]86-*-mingw*): Likewise.
7993 (i[34567]86-*-nto*): Likewise.
7994 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7995 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7996 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7997 (x86_64-*-linux*): Likewise.
7999 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8000 (init_registers_amd64_linux): New.
8001 (x86_arch_setup): Replace init_registers_x86_64_linux with
8002 init_registers_amd64_linux.
8004 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8006 * configure.ac: Check for libdl. If it is not available link against
8007 static libthread_db.
8008 * configure: Regenerate.
8010 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8014 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8015 handing a read watchpoint.
8016 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8018 2010-02-12 Doug Evans <dje@google.com>
8020 * linux-low.c (linux_supports_tracefork_flag): Document.
8021 (linux_look_up_symbols): Add comment.
8023 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8025 * regcache.c (supply_register): Clear regcache if buf is NULL.
8027 2010-02-02 Nicolas Roche <roche@sourceware.org>
8028 Joel Brobecker <brobecker@adacore.com>
8030 * inferiors.c (find_inferior): Add function documentation.
8031 (unloaded_dll): Handle the case where the unloaded dll has not
8032 been previously registered in the dll list.
8034 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8036 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8037 (thumb2_breakpoint): New.
8038 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8040 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8042 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8043 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8046 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8048 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8050 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8052 * linux-s390-low.c (s390_collect_ptrace_register)
8053 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8055 2010-01-21 Doug Evans <dje@google.com>
8057 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8058 (PTRACE_ARG4_TYPE): New macro.
8059 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8060 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8061 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8062 (usr_store_inferior_registers): Ditto.
8063 (linux_read_memory, linux_write_memory): Ditto.
8064 (linux_test_for_tracefork): Ditto.
8066 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8067 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8069 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8071 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8074 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8076 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8077 prototype to take a regcache. Adjust.
8079 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8081 * regcache.h (struct thread_info): Forward declare.
8082 (struct regcache): New.
8083 (new_register_cache): Adjust prototype.
8084 (get_thread_regcache): Declare.
8085 (free_register_cache): Adjust prototype.
8086 (registers_to_string, registers_from_string): Ditto.
8087 (supply_register, supply_register_by_name, collect_register)
8088 (collect_register_as_string, collect_register_by_name): Ditto.
8089 * regcache.c (struct inferior_regcache_data): Delete.
8090 (get_regcache): Rename to ...
8091 (get_thread_regcache): ... this. Adjust. Switch inferior before
8093 (regcache_invalidate_one): Adjust.
8094 (regcache_invalidate): Fix prototype.
8095 (new_register_cache): Return the new register cache.
8096 (free_register_cache): Change prototype.
8097 (realloc_register_cache): Adjust.
8098 (registers_to_string): Change prototype to take a regcache. Adjust.
8099 (registers_from_string): Ditto.
8100 (register_data): Ditto.
8101 (supply_register): Ditto.
8102 (supply_register_by_name): Ditto.
8103 (collect_register): Ditto.
8104 (collect_register_as_string): Ditto.
8105 (collect_register_by_name): Ditto.
8106 * server.c (process_serial_event): Adjust.
8107 * linux-low.h (regset_fill_func, regset_store_func): Change
8109 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8111 * linux-low.c (get_stop_pc): Adjust.
8112 (check_removed_breakpoint): Adjust.
8113 (linux_wait_for_event): Adjust.
8114 (linux_resume_one_lwp): Adjust.
8115 (fetch_register): Add regcache parameter. Adjust.
8116 (usr_store_inferior_registers): Ditto.
8117 (regsets_fetch_inferior_registers): Ditto.
8118 (regsets_store_inferior_registers): Ditto.
8119 (linux_fetch_registers, linux_store_registers): Ditto.
8120 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8122 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8124 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8125 prototype to take a regcache.
8126 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8127 * remote-utils.c (convert_ascii_to_int, outreg)
8128 (prepare_resume_reply): Change prototype to take a regcache.
8130 * target.h (struct target_ops) <fetch_registers, store_registers>:
8131 Change prototype to take a regcache.
8132 (fetch_inferior_registers, store_inferior_registers): Change
8133 prototype to take a regcache. Adjust.
8134 * proc-service.c (ps_lgetregs): Adjust.
8135 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8136 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8137 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8138 take a regcache. Adjust.
8139 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8140 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8141 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8142 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8143 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8144 (cris_cannot_fetch_register):
8145 (cris_breakpoint_at): Change prototype to take a regcache.
8147 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8148 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8149 to take a regcache. Adjust.
8150 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8152 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8153 take a regcache. Adjust.
8154 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8155 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8156 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8157 * linux-mips-low.c (mips_get_pc):
8158 (mips_set_pc): Change prototype to take a regcache. Adjust.
8159 (mips_reinsert_addr): Adjust.
8160 (mips_collect_register): Change prototype to take a regcache.
8162 (mips_supply_register):
8163 (mips_collect_register_32bit, mips_supply_register_32bit)
8164 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8165 (mips_store_fpregset): Ditto.
8166 * linux-ppc-low.c (ppc_supply_ptrace_register)
8167 (ppc_supply_ptrace_register): Ditto.
8168 (parse_spufs_run): Adjust.
8169 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8170 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8171 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8172 take a regcache. Adjust.
8173 * linux-s390-low.c (s390_collect_ptrace_register)
8174 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8175 (s390_set_pc): Change prototype to take a regcache. Adjust.
8176 (s390_arch_setup): Adjust.
8177 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8178 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8179 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8180 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8181 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8183 (sparc_breakpoint_at): Adjust.
8184 * linux-xtensa-low.c (xtensa_fill_gregset):
8185 (xtensa_store_gregset):
8186 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8187 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8188 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8189 prototype to take a regcache. Adjust.
8190 * win32-arm-low.c (arm_fetch_inferior_register)
8191 (arm_store_inferior_register): Change prototype to take a
8193 * win32-i386-low.c (i386_fetch_inferior_register)
8194 (i386_store_inferior_register): Change prototype to take a
8196 * win32-low.c (child_fetch_inferior_registers)
8197 (child_store_inferior_registers): Change prototype to take a
8199 (win32_wait): Adjust.
8200 (win32_fetch_inferior_registers): Change prototype to take a
8202 (win32_store_inferior_registers): Adjust.
8203 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8204 store_inferior_register>: Change prototype to take a regcache.
8206 2010-01-20 Doug Evans <dje@google.com>
8208 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8210 (linux_wait_for_event1, linux_init_signals): Ditto.
8211 (W_STOPCODE): Provide definition if missing.
8213 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8215 * linux-low.c (linux_core_of_thread): New.
8216 (compare_ints, show_process, list_threads): New.
8217 (linux_qxfer_osdata): Report threads and cores.
8218 (linux_target_op): Register linux_core_of_thread.
8219 * remote-utils.c (prepare_resume_reply): Report the core.
8220 (buffer_xml_printf): Support %d specifier.
8221 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8223 (handle_query): Handle qXfer:threads. Announce availability
8225 * target.h (struct target_ops): New field core_of_thread.
8227 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8229 * Makefile.in (clean): Remove new generated files.
8230 (reg-s390.o, reg-s390.c): Remove rules.
8231 (reg-s390x.o, reg-s390x.c): Likewise.
8232 (s390-linux32.o, s390-linux32.c): Add rules.
8233 (s390-linux64.o, s390-linux64.c): Likewise.
8234 (s390x-linux64.o, s390x-linux64.c): Likewise.
8235 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8236 * linux-s390-low.c: Include <elf.h>.
8237 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8238 (init_registers_s390): Remove prototype.
8239 (init_registers_s390x): Likewise.
8240 (init_registers_s390_linux32): Add prototype.
8241 (init_registers_s390_linux64): Likewise.
8242 (init_registers_s390x_linux64): Likewise.
8243 (s390_num_regs_3264): New define.
8244 (s390_regmap_3264): New global variable.
8245 (s390_cannot_fetch_register): Remove obsolete check.
8246 (s390_cannot_store_register): Likewise.
8247 (s390_collect_ptrace_register): Handle upper/lower register halves.
8248 (s390_supply_ptrace_register): Likewise.
8249 (s390_fill_gregset): Update to register number changes.
8250 (s390_get_hwcap): New routine.
8251 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8252 Install appropriate regmap and register set.
8254 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8256 * server.c (gdbserver_version): Update copyright year to 2010.
8257 * gdbreplay.c (gdbreplay_version): Likewise.
8259 2009-12-28 Doug Evans <dje@google.com>
8261 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8262 elf/external.h. Include <elf.h> instead but only if necessary.
8264 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8266 * linux-low.c (linux_remove_process): Remove `detaching'
8267 parameter. Don't release/detach from thread_db here.
8268 (linux_kill): Release/detach from thread_db here, ...
8269 (linux_detach): ... and here, before actually detaching.
8270 (linux_wait_1): ... and here, when a process exits.
8271 * thread-db.c (any_thread_of): New.
8272 (thread_db_free): Switch the current inferior to a thread of the
8275 2009-12-21 Doug Evans <dje@google.com>
8277 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8279 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8280 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8281 warning ifndef __NR_tkill. Move setting of errno there too.
8282 Delete unnecessary resetting of errno after syscall.
8283 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8285 * configure.ac: Check for dladdr.
8286 * config.in: Regenerate.
8287 * configure: Regenerate.
8288 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8289 (try_thread_db_load): Update.
8291 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8293 2009-12-18 Doug Evans <dje@google.com>
8295 * event-loop.c: Include unistd.h if it exists.
8297 * linux-low.c (my_waitpid): Move definition away from being in
8298 between linux_tracefork_child/linux_test_for_tracefork.
8300 * gdb_proc_service.h (psaddr_t): Fix type.
8301 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8302 signature to match glibc.
8304 2009-12-16 Doug Evans <dje@google.com>
8306 * linux-low.c (linux_read_memory): Fix argument to read.
8308 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8310 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8311 events, don't leave current_inferior pointing at null.
8313 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8315 * win32-low.c (LOG): Delete.
8316 (OUTMSG): Output to stderr.
8317 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8318 on compile time LOG macro.
8319 (win32_wait): Fix debug output.
8321 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8323 * win32-low.c (win32_add_one_solib): If the dll name is
8324 "ntdll.dll", prepend the system directory to the dll path.
8326 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8328 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8330 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8331 Vladimir Prus <vladimir@codesourcery.com>
8333 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8334 * configure.ac: Check for __mcoldfire__ and set
8335 gdb_cv_m68k_is_coldfire.
8336 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8337 reg-cf.o and reg-m68k.o.
8338 * configure: Regenerated.
8340 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8342 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8343 Pass it to thread_db_free.
8344 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8345 proper `detaching' argument to linux_remove_process.
8346 * linux-low.h (thread_db_free): Add `detaching' parameter.
8347 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8349 (thread_db_free): Add `detaching' parameter. Only
8350 call td_ta_clear_event if detaching from process.
8352 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8354 * thread-db.c (thread_db_free): Fix typo.
8356 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8359 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8361 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8363 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8364 with an i686 compiler.
8365 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8367 * configure: Rebuilt.
8369 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8373 * server.c (handle_search_memory_1): Correct read_addr initialization
8374 in loop for searching subsequent chunks.
8376 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8378 * configure.ac: New --with-libthread-db option.
8379 * thread-db.c: Allow direct dependence on libthread_db.
8380 (thread_db_free): Adjust.
8381 * config.in: Regenerate.
8382 * configure: Likewise.
8384 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8387 * thread-db.c (attach_thread): New function.
8388 (maybe_attach_thread): Return success/failure.
8389 (find_new_threads_callback): Adjust.
8390 (thread_db_find_new_threads): Loop until no new threads.
8392 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8394 * proc-service.c (ps_lgetregs): Formatting.
8396 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8398 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8399 * configure.ac: Adjust.
8400 * linux-low.h (struct process_info_private): Move members to struct
8402 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8403 * linux-low.c (linux_remove_process): Adjust.
8404 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8405 * server.c (handle_query): Move code ...
8406 (handle_monitor_command): ... here. New function.
8407 * target.h (struct target_ops): New member.
8408 * thread-db.c (struct thread_db): New.
8409 (libthread_db_search_path): New variable.
8410 (thread_db_create_event, thread_db_enable_reporting)
8411 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8412 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8413 (try_thread_db_load_1, dladdr_to_soname): New functions.
8414 (try_thread_db_load, thread_db_load_search): New functions.
8415 (thread_db_init): Search for libthread_db.
8416 (thread_db_free): New function.
8417 (thread_db_handle_monitor_command): Likewise.
8418 * config.in: Regenerate.
8419 * configure: Regenerate.
8421 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8423 * spu-low.c (spu_kill): Wait for inferior to terminate.
8424 Call clear_inferiors.
8425 (spu_detach): Call clear_inferiors.
8427 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8429 * aclocal.m4: Regenerate.
8430 * config.in: Likewise.
8431 * configure: Likewise.
8433 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8435 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8436 (parse_spufs_run): New function.
8437 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8438 (ppc_breakpoint_at): Handle SPU breakpoints.
8440 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8442 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8443 (SPUFS_MAGIC): Define.
8444 (spu_enumerate_spu_ids): New function.
8445 (linux_qxfer_spu): New function.
8446 (linux_target_ops): Install linux_qxfer_spu.
8448 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8450 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8451 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8452 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8453 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8454 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8455 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8456 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8457 (init_registers_powerpc_cell32l): Add prototype.
8458 (init_registers_powerpc_cell64l): Likewise.
8459 (ppc_arch_setup): Detect Cell/B.E. architecture.
8461 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8463 * Makefile.in (datarootdir): New variable.
8465 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8467 * linux-low.c (linux_write_memory): Update debugging output.
8468 * Makefile.in (clean): Add new descriptions.
8469 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8470 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8471 * configure.srv: Add new files for arm*-*-linux*.
8472 * linux-arm-low.c: Add new declarations.
8473 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8474 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8475 (HWCAP_VFPv3D16): New.
8476 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8477 instead of __IWMMXT__.
8478 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8479 (arm_arch_setup): New.
8480 (target_regsets): Remove #ifdef. Add VFP regset.
8481 (the_low_target): Use arm_arch_setup.
8483 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8485 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8486 the main thread again.
8488 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8490 Adding Neutrino gdbserver.
8491 * configure: Regenerated.
8492 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8493 * configure.srv (i[34567]86-*-nto*): New target.
8494 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8495 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8496 (nto_comctrl) [__QNX__]: New function.
8497 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8499 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8501 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8504 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8505 Pedro Alves <pedro@codesourcery.com>
8507 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8508 don't support CONTEXT_EXTENDED_REGISTERS.
8509 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8510 (the_low_target): Install them.
8511 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8512 failing with ERROR_PIPE_NOT_CONNECTED.
8514 2009-06-30 Doug Evans <dje@google.com>
8515 Pierre Muller <muller@ics.u-strasbg.fr>
8517 Add h/w watchpoint support to x86-linux, win32-i386.
8518 * Makefile.in (SFILES): Add i386-low.c
8519 (i386_low_h): Define.
8520 (i386-low.o): Add dependencies.
8521 (linux-x86-low.o): Add i386-low.h dependency.
8522 (win32-i386-low.o): Ditto.
8523 * i386-low.c: New file.
8524 * i386-low.h: New file.
8525 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8526 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8527 * linux-low.c (linux_add_process): Initialize arch_private.
8528 (linux_remove_process): Free arch_private.
8529 (add_lwp): Initialize arch_private.
8530 (delete_lwp): Free arch_private.
8531 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8533 * linux-low.h (process_info_private): New member arch_private.
8534 (lwp_info): New member arch_private.
8535 (linux_target_ops): New members new_process, new_thread,
8537 (ptid_of): New macro.
8538 * linux-x86-low.c: Include stddef.h, i386-low.h.
8539 (arch_process_info): New struct.
8540 (arch_lwp_info): New struct.
8541 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8542 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8543 (i386_dr_low_get_status): New function.
8544 (x86_insert_point, x86_remove_point): New functions.
8545 (x86_stopped_by_watchpoint): New function.
8546 (x86_stopped_data_address): New function.
8547 (x86_linux_new_process, x86_linux_new_thread): New functions.
8548 (x86_linux_prepare_to_resume): New function.
8549 (the_low_target): Add entries for insert_point, remove_point,
8550 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8552 * server.c (debug_hw_points): New global.
8553 (monitor_show_help): Document set debug-hw-points.
8554 (handle_query): Process "set debug-hw-points".
8555 * server.h (debug_hw_points): Declare.
8556 (paddress): Declare.
8557 * utils.c (NUMCELLS, CELLSIZE): New macros.
8558 (get_sell, xsnprintf, paddress): New functions.
8559 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8560 remove_point, stopped_by_watchpoint, stopped_data_address.
8561 * win32-i386-low.c: Include i386-low.h.
8562 (debug_reg_state): Replaces dr.
8563 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8564 (i386_dr_low_get_status): New function.
8565 (i386_insert_point, i386_remove_point): New functions.
8566 (i386_stopped_by_watchpoint): New function.
8567 (i386_stopped_data_address): New function.
8568 (i386_initial_stuff): Update.
8569 (get_thread_context,set_thread_context,i386_thread_added): Update.
8570 (the_low_target): Add entries for insert_point,
8571 remove_point, stopped_by_watchpoint, stopped_data_address.
8572 * win32-low.c (win32_insert_watchpoint): New function.
8573 (win32_remove_watchpoint): New function.
8574 (win32_stopped_by_watchpoint): New function.
8575 (win32_stopped_data_address): New function.
8576 (win32_target_ops): Add entries for insert_watchpoint,
8577 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8578 * win32-low.h (win32_target_ops): New members insert_point,
8579 remove_point, stopped_by_watchpoint, stopped_data_address.
8581 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8583 * server.c (process_serial_event): Re-return unsupported, not
8584 error, if the type isn't recognized. Re-allow supporting only
8585 insert or remove packets. Also call require_running for
8586 breakpoints. Add missing break statement to default case. Tidy.
8587 * target.h (struct target_ops): Rename insert_watchpoint to
8588 insert_point, and remove_watchpoint to remove_point.
8590 * linux-low.h (struct linux_target_ops): Likewise.
8591 * linux-low.c (linux_insert_watchpoint): Rename to ...
8592 (linux_insert_point): ... this. Adjust.
8593 (linux_remove_watchpoint): Rename to ...
8594 (linux_remove_point): ... this. Adjust.
8595 (linux_target_ops): Adjust.
8596 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8597 (cris_insert_point): ... this.
8598 (cris_remove_watchpoint): Rename to ...
8599 (cris_remove_point): ... this.
8600 (the_low_target): Adjust.
8602 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8604 * server.c (handle_v_kill): Pass signal_pid to
8605 kill_inferior if multi_process is zero.
8607 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8609 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8610 * target.h (target_ops): Comment for *_watchpoint to make it clear
8611 the functions can get types '0' and '1'.
8613 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8615 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8616 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8617 * regcache.c (get_regcache): Likewise.
8618 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8619 * win32-low.c (child_fetch_inferior_registers): Remove check for
8622 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8623 Pedro Alves <pedro@codesourcery.com>
8625 * target.h (struct target_ops) <supports_multi_process>: New
8627 (target_supports_multi_process): New.
8628 * server.c (handle_query): Even if GDB reports support, only
8629 enable multi-process if the target also supports it. Report
8630 multi-process support only if the target backend supports it.
8631 * linux-low.c (linux_supports_multi_process): New function.
8632 (linux_target_ops): Install it as target_supports_multi_process
8635 2009-05-24 Doug Evans <dje@google.com>
8637 Global renaming of find_thread_pid to find_thread_ptid.
8638 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8639 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8640 All callers updated.
8642 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8643 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8646 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8647 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8648 (linux_resume_one_lwp): Ditto.
8650 2009-05-23 Doug Evans <dje@google.com>
8652 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8653 from struct inferior_list_entry * to struct lwp_info *.
8654 All callers updated.
8656 2009-05-13 Doug Evans <dje@google.com>
8658 * linux-x86-low.c: Don't include assert.h.
8659 (x86_siginfo_fixup): Use fatal, not assert.
8660 (x86_arch_setup): Fix comment.
8662 2009-05-12 Doug Evans <dje@google.com>
8664 Biarch support for i386/amd64 gdbserver.
8665 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8666 Add linux-x86-low.c.
8667 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8668 (linux-x86-low.o): Add.
8669 * linux-x86-64-low.c: Delete.
8670 * linux-i386-low.c: Delete.
8671 * linux-x86-low.c: New file.
8672 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8674 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8676 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8677 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8678 (linux_child_pid_to_exec_file): New function.
8679 (elf_64_header_p, elf_64_file_p): New functions.
8680 (siginfo_fixup): New function.
8681 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8682 give target a chance to convert layout.
8683 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8684 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8686 2009-05-07 Doug Evans <dje@google.com>
8688 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8689 (regsets_store_inferior_registers): Ditto.
8691 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8695 * linux-low.c (must_set_ptrace_flags): Delete.
8696 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8698 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8699 `lwp->must_set_ptrace_flags' instead.
8700 (linux_wait_for_event_1): Set ptrace options here.
8701 (linux_wait_1): ... not here.
8703 2009-04-30 Doug Evans <dje@google.com>
8705 * inferiors.c (started_inferior_callback): New function.
8706 (attached_inferior_callback): New function.
8707 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8708 * server.c (print_started_pid, print_attached_pid): New functions.
8709 (detach_or_kill_for_exit): New function.
8710 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8711 * server.h (have_started_inferiors_p): Declare.
8712 (have_attached_inferiors_p): Declare.
8714 * inferiors.c (remove_process): Fix memory leak, free process.
8715 * linux-low.c (linux_remove_process): New function.
8716 (linux_kill): Call it instead of remove_process.
8717 (linux_detach, linux_wait_1): Ditto.
8719 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8721 * configure.srv: Add x86 Windows CE target.
8723 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8725 * inferiors.c (get_thread_process): Make global.
8726 * server.h (get_thread_process): Add prototype.
8727 * thread-db.c (find_one_thread): Use get_thread_process
8728 instead of current_process.
8729 (thread_db_get_tls_address): Do not crash if called when
8730 thread layer is not yet initialized.
8732 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8734 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8735 * spu-low.c (current_tid): Rename to ...
8736 (current_ptid): ... this.
8737 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8738 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8739 ptid_get_lwp (current_ptid) instead of current_tid.
8740 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8741 instead of current_tid. Use find_process_pid to verify pid
8742 argument is valid. Pass proper argument to remove_process.
8743 (spu_thread_alive): Compare current_ptid instead of current_tid.
8744 (spu_resume): Likewise.
8746 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8748 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8751 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8753 Implement the multiprocess extensions, and add linux multiprocess
8756 * server.h (ULONGEST): Declare.
8757 (struct ptid, ptid_t): New.
8758 (minus_one_ptid, null_ptid): Declare.
8759 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8760 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8761 (struct inferior_list_entry): Change `id' type from unsigned from
8763 (struct sym_cache, struct breakpoint, struct
8764 process_info_private): Forward declare.
8765 (struct process_info): Declare.
8766 (current_process): Declare.
8767 (all_processes): Declare.
8768 (initialize_inferiors): Declare.
8769 (add_thread): Adjust to use ptid_t.
8770 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8771 (add_process, remove_process, find_thread_pid): Declare.
8772 (find_inferior_id): Adjust to use ptid_t.
8773 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8774 (multi_process): Declare.
8775 (push_event): Adjust to use ptid_t.
8776 (read_ptid, write_ptid): Declare.
8777 (prepare_resume_reply): Adjust to use ptid_t.
8778 (clear_symbol_cache): Declare.
8779 * inferiors.c (all_processes): New.
8780 (null_ptid, minus_one_ptid): New.
8781 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8782 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8783 (add_thread): Change unsigned long to ptid. Remove gdb_id
8785 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8786 (gdb_id_to_thread): Rename to ...
8787 (find_thread_pid): ... this. Change unsigned long to ptid.
8788 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8789 (loaded_dll, pull_pid_from_list): Adjust.
8790 (add_process, remove_process, find_process_pid)
8791 (get_thread_process, current_process, initialize_inferiors): New.
8792 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8793 (struct target_waitstatus) <related_pid>: Ditto.
8794 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8796 (struct target_ops) <join>: Add `pid' argument.
8797 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8798 (struct target_ops) <wait>: Add `ptid' field. Change return type
8800 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8801 (mywait): Add `ptid' argument. Change return type to ptid_t.
8802 (target_pid_to_str): Declare.
8803 * target.c (set_desired_inferior): Adjust to use ptids.
8804 (mywait): Add new `ptid' argument. Adjust.
8805 (target_pid_to_str): New.
8806 * mem-break.h (free_all_breakpoints): Declare.
8807 * mem-break.c (breakpoints): Delelete.
8808 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8809 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8810 to use per-process breakpoint list.
8811 (free_all_breakpoints): New.
8812 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8813 (symbol_cache, all_symbols_looked_up): Delete.
8815 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8817 (prepare_resume_reply): Change ptid argument's type from unsigned
8818 long to ptid_t. Adjust. Implement W;process and X;process.
8819 (free_sym_cache, clear_symbol_cache): New.
8820 (look_up_one_symbol): Adjust to per-process symbol cache. *
8821 * server.c (cont_thread, general_thread, step_thread): Change type
8824 (multi_process): New.
8825 (last_ptid): Change type to ptid_t.
8826 (struct vstop_notif) <ptid>: Change type to ptid_t.
8827 (queue_stop_reply, push_event): Change `ptid' argument's type to
8829 (discard_queued_stop_replies): Add `pid' argument.
8830 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8831 changes. Don't reference the `attached' global.
8832 (attach_inferior): Adjust to mywait interface changes.
8833 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8834 features. Handle and report "multiprocess+". Handle
8836 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8838 (handle_v_kill): New.
8839 (handle_v_stopped): Adjust to use target_pid_to_str.
8840 (handle_v_requests): Allow multiple attaches and runs when
8841 multiprocess extensions are in effect. Handle "vKill".
8842 (myresume): Adjust to use ptids.
8843 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8844 (handle_status): Adjust to discard_queued_stop_replies interface
8846 (first_thread_of, kill_inferior_callback)
8847 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8848 (main): Call initialize_inferiors. Adjust to use ptids, killing
8849 and detaching from all inferiors. Handle multiprocess packet
8851 * linux-low.h: Include gdb_proc_service.h.
8852 (struct process_info_private): New.
8853 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8854 <lwpid_of>: Use ptid_get_lwp.
8855 (get_lwp_thread): Adjust.
8856 (struct lwp_info): Add `dead' member.
8857 (find_lwp_pid): Declare.
8858 * linux-low.c (thread_db_active): Delete.
8859 (new_inferior): Adjust comment.
8860 (inferior_pid): Delete.
8861 (linux_add_process): New.
8862 (handle_extended_wait): Adjust.
8863 (add_lwp): Change unsigned long to ptid.
8864 (linux_create_inferior): Add process to processes table. Adjust
8865 to use ptids. Don't set new_inferior here.
8866 (linux_attach_lwp): Rename to ...
8867 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8868 it. Adjust to use ptids.
8869 (linux_attach_lwp): New.
8870 (linux_attach): Add process to processes table. Don't set
8872 (struct counter): New.
8873 (second_thread_of_pid_p, last_thread_of_process_p): New.
8874 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8876 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8877 processes. Remove process from process table.
8878 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8879 to multiple processes.
8880 (any_thread_of): New.
8881 (linux_detach): Add `pid' argument, and handle it. Remove process
8882 from processes table.
8883 (linux_join): Add `pid' argument. Handle it.
8884 (linux_thread_alive): Change unsighed long argument to ptid_t.
8885 Consider dead lwps as not being alive.
8886 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8887 threads we're not interested in.
8888 (same_lwp, find_lwp_pid): New.
8889 (linux_wait_for_lwp): Change `pid' argument's type from int to
8891 (linux_wait_for_event): Rename to ...
8892 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8893 from int to ptid_t. Adjust.
8894 (linux_wait_for_event): New.
8895 (linux_wait_1): Add `ptid' argument. Change return type to
8896 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8897 that exit from the process table.
8898 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8900 (mark_lwp_dead): New.
8901 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8902 stopping all threads, mark its main lwp as dead.
8903 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8905 (fetch_register, usr_store_inferior_registers)
8906 (regsets_fetch_inferior_registers)
8907 (regsets_store_inferior_registers, linux_read_memory)
8908 (linux_write_memory): Inline `inferior_pid'.
8909 (linux_look_up_symbols): Adjust to use per-process
8911 (linux_request_interrupt): Adjust to use ptids.
8912 (linux_read_auxv): Inline `inferior_pid'.
8913 (initialize_low): Don't reference thread_db_active.
8914 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8915 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8916 (ps_getpid): Return the pid of the current inferior.
8917 * thread-db.c (proc_handle, thread_agent): Delete.
8918 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8920 (find_one_thread): Change argument type to ptid_t. Adjust to
8922 (maybe_attach_thread): Adjust to per-process data and ptids.
8923 (thread_db_find_new_threads): Ditto.
8924 (thread_db_init): Ditto.
8925 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8926 processes table. Adjust to use ptids.
8927 (spu_kill, spu_detach): Adjust interface. Remove process from
8929 (spu_join, spu_thread_alive): Adjust interface.
8930 (spu_wait): Adjust interface. Remove process from processes
8931 table. Adjust to use ptids.
8932 * win32-low.c (current_inferior_tid): Delete.
8933 (current_inferior_ptid): New.
8934 (debug_event_ptid): New.
8935 (thread_rec): Take a ptid. Adjust.
8936 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8937 (child_delete_thread): Ditto.
8938 (do_initial_child_stuff): Add `attached' argument. Add process to
8940 (child_fetch_inferior_registers, child_store_inferior_registers):
8942 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8943 (win32_attach): Pass 1 to do_initial_child_stuff.
8944 (win32_kill): Adjust interface. Remove process from processes
8946 (win32_detach): Ditto.
8947 (win32_join): Adjust interface.
8948 (win32_thread_alive): Take a ptid.
8949 (win32_resume): Adjust to use ptids.
8950 (get_child_debug_event): Ditto.
8951 (win32_wait): Adjust interface. Remove exiting process from
8954 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8956 Non-stop mode support.
8958 * server.h (non_stop): Declare.
8959 (gdb_client_data, handler_func): Declare.
8960 (delete_file_handler, add_file_handler, start_event_loop):
8962 (handle_serial_event, handle_target_event, push_event)
8963 (putpkt_notif): Declare.
8964 * target.h (enum resume_kind): New.
8965 (struct thread_resume): Replace `step' field by `kind' field.
8966 (TARGET_WNOHANG): Define.
8967 (struct target_ops) <wait>: Add `options' argument.
8968 <supports_non_stop, async, start_non_stop>: New fields.
8969 (target_supports_non_stop, target_async): New.
8970 (start_non_stop): Declare.
8971 (mywait): Add `options' argument.
8972 * target.c (mywait): Add `options' argument. Print child exit
8974 (start_non_stop): New.
8975 * server.c (non_stop, own_buf, mem_buf): New globals.
8976 (struct vstop_notif): New.
8977 (notif_queue): New global.
8978 (queue_stop_reply, push_event, discard_queued_stop_replies)
8979 (send_next_stop_reply): New.
8980 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8982 (attach_inferior): In non-stop mode, don't wait for the target
8984 (handle_general_set): Handle QNonStop.
8985 (handle_query): When handling qC, return the current general
8986 thread, instead of the first thread of the list.
8987 (handle_query): If the backend supports non-stop mode, include
8988 QNonStop+ in the qSupported query response.
8989 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8991 (handle_v_attach, handle_v_run): Handle non-stop mode.
8992 (handle_v_stopped): New.
8993 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8994 (myresume): Adjust to use resume_kind. Handle non-stop.
8995 (queue_stop_reply_callback): New.
8996 (handle_status): Handle non-stop mode.
8997 (main): Clear non_stop flag on reconnection. Use the event-loop.
8998 Refactor serial protocol handling from here ...
8999 (process_serial_event): ... to this new function. When GDB
9000 selects any thread, select one here. In non-stop mode, wait until
9001 GDB acks all pending events before exiting.
9002 (handle_serial_event, handle_target_event): New.
9003 * remote-utils.c (remote_open): Install remote_desc in the event
9005 (remote_close): Remove remote_desc from the event loop.
9006 (putpkt_binary): Rename to...
9007 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9008 (putpkt_binary): New as wrapper around putpkt_binary_1.
9009 (putpkt_notif): New.
9010 (prepare_resume_reply): In non-stop mode, don't change the
9012 * event-loop.c: New.
9013 * Makefile.in (OBJ): Add event-loop.o.
9014 (event-loop.o): New rule.
9016 * linux-low.h (pid_of): Moved here.
9018 (get_lwp_thread): Use lwpid_of.
9019 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9020 * linux-low.c (pid_of): Delete.
9021 (inferior_pid): Use lwpid_of.
9022 (linux_event_pipe): New.
9023 (target_is_async_p): New.
9025 (handle_extended_wait): Use lwpid_of.
9026 (add_lwp): Don't set lwpid field.
9027 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9028 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9029 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9030 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9031 first. Adjust to linux_wait_for_event interface changes. Use
9033 (linux_detach): Don't delete the main lwp here.
9034 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9035 (status_pending_p): Don't consider explicitly suspended lwps.
9036 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9037 pointer. Add OPTIONS argument. Change return type to int. Use
9038 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9039 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9040 pointer. Add status pointer argument. Return a pid instead of a
9041 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9042 changes. In non-stop mode, don't switch to a random thread.
9043 (linux_wait): Rename to...
9044 (linux_wait_1): ... this. Add target_options argument, and handle
9045 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9046 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9047 clean exit and signal exit code. Don't stop all threads in
9048 non-stop mode. In all-stop mode, only stop all threads when
9049 reporting a stop to GDB. Handle explicit thread stop requests.
9050 (async_file_flush, async_file_mark): New.
9052 (send_sigstop): Use lwpid_of.
9053 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9054 interface changes. In non-stop mode, don't switch to a random
9056 (linux_resume_one_lwp): Use lwpid_of.
9057 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9058 (linux_resume_one_thread): ... this. Handle resume_stop. In
9059 non-stop mode, don't look for pending flag in all threads.
9060 (resume_status_pending_p): Don't consider explicitly suspended
9062 (my_waitpid): Reimplement. Emulate __WALL.
9063 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9065 (sigchld_handler, linux_supports_non_stop, linux_async)
9066 (linux_start_non_stop): New.
9067 (linux_target_ops): Register linux_supports_non_stop, linux_async
9068 and linux_start_non_stop.
9069 (initialize_low): Install SIGCHLD handler.
9070 * thread-db.c (thread_db_create_event, find_one_thread)
9071 (thread_db_get_tls_address): Use lwpid_of.
9072 * win32-low.c (win32_detach): Adjust to use resume_kind.
9073 (win32_wait): Add `options' argument.
9074 * spu-low.c (spu_resume): Adjust to use resume_kind.
9075 (spu_wait): Add `options' argument.
9077 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9079 Decouple target code from remote protocol.
9081 * target.h (enum target_waitkind): New.
9082 (struct target_waitstatus): New.
9083 (struct target_ops) <wait>: Return an unsigned long. Take a
9084 target_waitstatus pointer instead of a char pointer.
9086 * target.c (mywait): Change prototype to return an unsigned long.
9087 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9088 * server.h (thread_from_wait, old_thread_from_wait): Delete
9090 (prepare_resume_reply): Change prototype to take a
9092 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9093 (last_status, last_ptid): New.
9094 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9095 pid instead of a signal.
9096 (attach_inferior): Remove "status" and "signal" parameters.
9098 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9100 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9101 (handle_v_requests, myresume): Remove "status" and "signal"
9103 (handle_status): New.
9104 (main): Delete local `status'. Adjust.
9105 * remote-utils.c: Include target.h.
9106 (prepare_resume_reply): Change prototype to take a
9107 target_waitstatus. Adjust.
9109 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9111 * spu-low.c (spu_wait): Adjust.
9112 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9114 (win32_wait): Adjust.
9116 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9118 * target.h (struct thread_resume): Delete leave_stopped member.
9119 (struct target_ops): Add a `n' argument to the `resume' callback.
9120 * server.c (start_inferior): Adjust.
9121 (handle_v_cont, myresume): Adjust.
9122 * linux-low.c (check_removed_breakpoint): Adjust to resume
9123 interface change, and to removed leave_stopped field.
9124 (resume_ptr): Delete.
9125 (struct thread_resume_array): New.
9126 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9127 resume interface change.
9128 (linux_continue_one_thread, linux_queue_one_thread)
9129 (resume_status_pending_p): Check if the resume field is NULL
9130 instead of checking the leave_stopped member.
9131 (linux_resume): Adjust to the target resume interface change.
9132 * spu-low.c (spu_resume): Adjust to the target resume interface
9134 * win32-low.c (win32_detach, win32_resume): Ditto.
9136 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9138 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9140 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9142 (linux_continue_one_thread): Only preserve the stepping flag if
9143 there's a pending breakpoint.
9145 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9147 * server.c (main): After the inferior having exited, call
9148 remote_close before exiting gdbserver.
9150 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9152 Fix size of FPSCR in Power 7 processors.
9153 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9154 (PPC_FEATURE_HAS_DFP): New #define.
9155 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9158 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9160 * server.c (handle_query) Whitespace and formatting.
9162 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9164 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9165 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9166 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9167 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9168 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9169 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9170 Makefile.in, configure.ac: Fix whitespace throughout.
9171 * configure: Regenerate.
9173 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9175 * inferiors.c (find_inferior): Make it safe for the callback
9176 function to delete the currently iterated inferior.
9178 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9180 * Makefile.in (linuw_low_h): Move higher.
9181 (thread-db.o): Depend on $(linux_low_h).
9183 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9185 Rename "process" to "lwp" throughout.
9187 * linux-low.c (all_processes): Rename to...
9188 (all_lwps): ... this.
9189 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9190 (add_process): Rename to ...
9191 (add_lwp): ... this. Adjust.
9192 (linux_create_inferior): Adjust.
9193 (linux_attach_lwp): Adjust.
9194 (linux_attach): Adjust.
9195 (linux_kill_one_process): Rename to ...
9196 (linux_kill_one_lwp): ... this. Adjust.
9197 (linux_kill): Adjust.
9198 (linux_detach_one_process): Rename to ...
9199 (linux_detach_one_lwp): ... this. Adjust.
9200 (linux_detach): Adjust.
9201 (check_removed_breakpoint): Adjust.
9202 (status_pending_p): Adjust.
9203 (linux_wait_for_process): Rename to ...
9204 (linux_wait_for_lwp): ... this. Adjust.
9205 (linux_wait_for_event): Adjust.
9206 (send_sigstop): Adjust.
9207 (wait_for_sigstop): Adjust.
9208 (stop_all_processes): Rename to ...
9209 (stop_all_lwps): ... this.
9210 (linux_resume_one_process): Rename to ...
9211 (linux_resume_one_lwp): ... this. Adjust.
9212 (linux_set_resume_request, linux_continue_one_thread)
9213 (linux_queue_one_thread, resume_status_pending_p)
9214 (usr_store_inferior_registers, regsets_store_inferior_registers)
9215 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9217 * linux-low.h (get_process): Rename to ...
9218 (get_lwp): ... this. Adjust.
9219 (get_thread_process): Rename to ...
9220 (get_thread_lwp): ... this. Adjust.
9221 (get_process_thread): Rename to ...
9222 (get_lwp_thread): ... this. Adjust.
9223 (struct process_info): Rename to ...
9224 (struct lwp_info): ... this.
9225 (all_processes): Rename to ...
9226 (all_lwps): ... this.
9227 * proc-service.c (ps_lgetregs): Adjust.
9228 * thread-db.c (thread_db_create_event, find_one_thread)
9229 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9231 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9233 * server.c (handle_query): Handle "qAttached".
9235 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9237 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9238 GPLv3, update license URL.
9240 2009-03-01 Doug Evans <dje@google.com>
9242 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9243 (server_h): Add gdb_signals.h.
9244 (signals.o): Update.
9245 * server.h (target_signal_from_host,target_signal_to_host_p)
9246 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9248 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9250 * remote-utils.c (getpkt): Also generate remote-debug
9251 information if noack_mode is set.
9253 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9255 * server.c (handle_query): Report qXfer:siginfo:read and
9256 qXfer:siginfo:write as supported and handle them.
9257 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9258 * linux-low.c (linux_xfer_siginfo): New.
9259 (linux_target_ops): Set it.
9261 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9263 * server.c (gdbserver_usage): Mention --remote-debug.
9264 (main): Accept '--remote-debug' switch.
9266 2009-01-18 Doug Evans <dje@google.com>
9268 * regcache.c (new_register_cache): No need to check result of xcalloc.
9269 * server.c (handle_search_memory): Back out calls to xmalloc,
9270 result is checked and error is returned to user upon failure.
9271 (handle_query): Ditto. Add more checks for result of malloc.
9272 (handle_v_cont): Check result of malloc, report error back to
9274 (handle_v_run): Ditto. Call freeargv.
9275 * server.h (freeargv): Declare.
9276 * utils.c (freeargv): New fn.
9278 2009-01-15 Doug Evans <dje@google.com>
9280 * gdbreplay.c (perror_with_name): Make arg const char *.
9281 * server.h (target_signal_to_name): Make return type const char *.
9282 * thread-db.c (thread_db_err_str): Make return type const char *.
9283 * utils.c (perror_with_name): Make arg const char *.
9285 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9287 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9288 when handling a EXIT_PROCESS_DEBUG_EVENT.
9290 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9292 * gdbreplay.c (gdbreplay_version): Update copyright year.
9293 * server.c (gdbserver_version): Likewise.
9295 2009-01-05 Doug Evans <dje@google.com>
9297 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9298 (handle_extended_wait): Improve comment.
9300 2008-12-13 Doug Evans <dje@google.com>
9302 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9303 * server.h (ATTR_MALLOC): New macro.
9304 (xmalloc,xcalloc,xstrdup): Declare.
9305 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9306 * inferiors.c: Ditto.
9307 * linux-low.c: Ditto.
9308 * mem-break.c: Ditto.
9309 * regcache.c: Ditto.
9310 * remote-utils.c: Ditto.
9313 * win32-low.c: Ditto.
9315 2008-12-12 Doug Evans <dje@google.com>
9317 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9318 in debugging printf.
9320 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9322 2008-12-09 Doug Evans <dje@google.com>
9324 * linux-low.h (struct process_info): Delete member tid, unused.
9325 * thread-db.c (find_one_thread): Update.
9326 (maybe_attach_thread): Update.
9328 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9330 * target.h (struct target_ops): Add qxfer_osdata member.
9331 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9333 (linux_qxfer_osdata): New functions.
9334 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9336 * server.c (handle_query): Handle "qXfer:osdata:read:".
9337 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9338 (buffer_xml_printf): New functions.
9339 * server.h (struct buffer): New.
9340 (buffer_grow_str, buffer_grow_str0): New macros.
9341 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9342 (buffer_xml_printf): Declare.
9344 2008-11-24 Doug Evans <dje@google.com>
9346 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9348 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9350 * server.c (handle_v_run): Always use the supplied argument list.
9352 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9354 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9355 (xtensa_regmap_table): Add entry for scompare1.
9357 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9359 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9360 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9361 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9362 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9363 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9364 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9365 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9366 XML target descriptions.
9367 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9368 when inferior is running on an ISA 2.05 or later processor. Add
9369 special case to return offset for full 64-bit slot of FPSCR when
9372 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9374 * Makefile.in (SFILES, clean): Added sparc64 files.
9375 (reg-sparc64.o, reg-sparc64.c): New.
9376 * configure.srv (sparc*-*-linux*): New configuration.
9377 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9378 syscall arguments for SPARC.
9379 (regsets_store_inferior_registers): Likewise.
9380 * linux-sparc-low.c: New file.
9382 2008-10-21 Doug Evans <dje@google.com>
9384 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9385 (READLINE_DIR,READLINE_DEP): Delete.
9386 (INTERNAL_CFLAGS): Update.
9387 (LINTFLAGS): Update.
9389 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9391 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9392 whole argv from the last run, not just argv[0].
9394 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9396 * regcache.c (new_register_cache): Return NULL if the register
9397 cache size isn't known yet.
9398 (free_register_cache): Avoid dereferencing a NULL regcache.
9400 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9402 * configure.srv: Merge MIPS and MIPS64.
9404 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9406 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9408 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9410 * Makefile.in: Add required vsx dependencies.
9412 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9413 Declare init_registers_powerpc_vsx32l.
9414 Declare init_registers_powerpc_vsx64l.
9415 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9416 (ppc_arch_setup): Check for VSX in hwcap.
9417 (ppc_fill_vsxregset): New function.
9418 (ppc_store_vsxregset): New function.
9419 Add new VSX entry in regset_info target_regsets.
9421 * configure.srv: Add new VSX dependencies.
9423 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9425 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9426 (remote_open): Set or clear transport_is_reliable.
9427 (putpkt_binary): Don't expect acks in noack mode.
9428 (getpkt): Don't send ack/nac in noack mode.
9429 * server.c (handle_general_set): Handle QStartNoAckMode.
9430 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9432 (main): Reset noack_mode on every connection.
9433 * server.h (noack_mode): Declare.
9435 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9437 * Makefile.in (GDBREPLAY_OBS): New variable.
9438 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9440 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9441 Daniel Jacobowitz <dan@codesourcery.com>
9443 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9444 (usr_store_inferior_registers): Likewise.
9445 (regsets_store_inferior_registers): Likewise.
9447 2008-07-31 Rolf Jansen <rj@surtec.com>
9448 Pedro Alves <pedro@codesourcery.com>
9450 * configure.ac: Check for memmem declaration.
9451 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9452 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9453 (disable_packet_qfThreadInfo): Unconditionally compile.
9454 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9455 * configure, config.in: Regenerate.
9457 2008-07-28 Doug Kwan <dougkwan@google.com>
9459 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9460 (linux_write_memory): Remove declaration of errno.
9462 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9464 * linux-low.c (handle_extended_wait): Do not use "status"
9465 variable uninitialized.
9467 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9469 * server.c (handle_v_attach): Inhibit reporting dll changes.
9471 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9473 * remote-utils.c (prepare_resume_reply): If requested, don't
9474 output "thread:TID" in the T stop reply.
9476 * server.c (disable_packet_vCont, disable_packet_Tthread)
9477 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9478 (handle_query): If requested, disable support for qC, qfThreadInfo
9480 (handle_v_requests): If requested, disable support for vCont.
9481 (gdbserver_show_disableable): New.
9482 (main): Handle --disable-packet and --disable-packet=LIST.
9484 * server.h (disable_packet_vCont, disable_packet_Tthread)
9485 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9487 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9489 * server.c (gdbserver_usage): Mention --version.
9491 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9493 * Makefile.in (gdbreplay.o): New rule.
9495 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9497 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9498 message, not gdbserver.
9500 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9501 Nathan Sidwell <nathan@codesourcery.com>
9502 Joseph Myers <joseph@codesourcery.com>
9504 * acinclude.m4: Include ../../config/acx.m4.
9505 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9506 * configure, config.in: Regenerate.
9507 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9508 * server.c (gdbserver_version): Print PKGVERSION.
9509 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9510 (main): Adjust gdbserver_usage calls.
9511 * gdbreplay.c (version, host_name): Add declarations.
9512 (gdbreplay_version, gdbreplay_usage): New.
9513 (main): Accept --version and --help options.
9515 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9517 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9518 (arm_breakpoint_at): Handle Thumb.
9519 (the_low_target): Add comment.
9521 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9523 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9525 2008-05-09 Doug Evans <dje@google.com>
9527 * server.h (decode_search_memory_packet): Declare.
9528 * remote-utils.c (decode_search_memory_packet): New fn.
9529 * server.c (handle_search_memory_1): New fn.
9530 (handle_search_memory): New fn.
9531 (handle_query): Process qSearch:memory packets.
9533 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9535 * regcache.c (registers_length): Remove.
9536 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9537 full register packet.
9538 * regcache.h (registers_length): Remove prototype.
9539 * server.h (PBUFSIZ): Define to 16384.
9541 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9543 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9544 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9545 powerpc-64l.o, and powerpc-altivec64l.o.
9546 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9547 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9548 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9549 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9550 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9553 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9554 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9555 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9556 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9557 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9558 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9559 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9560 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9561 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9562 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9565 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9566 (init_registers_powerpc_32l): ... this new prototype.
9567 (init_registers_powerpc_32): Remove, replace by ...
9568 (init_registers_powerpc_altivec32l): ... this new prototype.
9569 (init_registers_powerpc_e500): Remove, replace by ...
9570 (init_registers_powerpc_e500l): ... this new prototype.
9571 (init_registers_ppc64): Remove, replace by ...
9572 (init_registers_powerpc_64l): ... this new prototype.
9573 (init_registers_powerpc_64): Remove, replace by ...
9574 (init_registers_powerpc_altivec64l): ... this new prototype.
9575 (ppc_num_regs): Set to 73.
9576 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9577 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9578 (ppc_cannot_store_register): Handle orig_r3 and trap.
9579 (ppc_arch_setup): Update init_registers_... calls.
9580 (ppc_fill_gregset): Handle orig_r3 and trap.
9582 * inferiors.c (clear_inferiors): Reset current_inferior.
9584 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9586 * acinclude.m4: Add override.m4.
9587 * configure: Regenerate.
9589 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9591 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9592 initial call to init_register_ppc64.
9594 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9596 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9597 single powerpc*-*-linux* case.
9598 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9600 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9602 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9603 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9605 * linux-ppc-low.c: Include <elf.h>.
9606 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9607 (ppc_hwcap): New global variable.
9608 (ppc_regmap): Remove __SPE__ #ifdef sections.
9609 (ppc_regmap_e500): New global variable.
9610 (ppc_cannot_store_register): Update __SPE__ special case.
9611 (ppc_get_hwcap): New function.
9612 (ppc_arch_setup): Use it to determine whether inferior supports
9613 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9614 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9615 Do not access registers if target does not support AltiVec.
9616 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9617 Do not access registers if target does not support SPE.
9618 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9620 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9622 * linux-low.c (disabled_regsets, num_regsets): New.
9623 (use_regsets_p): Delete.
9624 (linux_wait_for_process): Clear disabled_regsets.
9625 (regsets_fetch_inferior_registers): Check and set it.
9626 (regsets_store_inferior_registers): Likewise.
9627 (linux_fetch_registers, linux_store_registers): Do not use
9629 (initialize_low): Allocate disabled_regsets.
9631 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9633 * Makefile.in (LIBOBJS): New.
9635 (memmem.o): New rule.
9636 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9637 * configure: Regenerated.
9639 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9641 * server.c (handle_query): Never return "unsupported" for
9642 qXfer:features:read queries.
9644 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9646 * server.c (get_features_xml): Fix inverted condition.
9647 (handle_query): Always support qXfer:feature:read.
9649 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9651 * server.c (wrapper_argv): New.
9652 (start_inferior): Handle wrapper_argv. If set, expect an extra
9654 (gdbserver_usage): Document --wrapper.
9655 (main): Parse --wrapper.
9657 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9659 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9660 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9661 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9662 (ppc_set_pc): Likewise.
9663 (ppc_arch_setup): New function.
9664 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9665 of collect_register.
9666 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9668 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9670 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9671 instead of linux-ppc64-low.o.
9672 * linux-ppc64-low.c: Remove file.
9673 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9674 (linux-ppc64-low.o): Remove rule.
9676 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9677 (init_registers_powerpc_64): Likewise.
9678 (ppc_regmap): Conditionally define depending on __powerpc64__.
9679 (ppc_cannot_store_register): Do not special-case "fpscr" when
9680 compiled on __powerpc64__.
9681 (ppc_collect_ptrace_register): New function.
9682 (ppc_supply_ptrace_register): New function.
9683 (ppc_breakpoint): Change type to "unsigned int".
9684 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9685 (the_low_target): Conditionally provide initializers for the
9686 arch_setup member depending on __powerpc64__. Install
9687 collect_ptrace_register and supply_ptrace_register members.
9689 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9691 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9692 * server.c (gdbserver_xmltarget): Define.
9693 (get_features_xml): Use it to replace "target.xml" and arch_string.
9695 * configure.srv: Remove srv_xmltarget. Add XML files that were
9696 mentioned there to srv_xmlfiles instead. Remove conditional tests
9697 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9698 srv_xmlfiles and srv_regobj to include all possible choices.
9699 * configure.ac (srv_xmltarget): Remove.
9700 (srv_xmlfiles): Do not add "target.xml".
9701 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9702 checks for supplementary target information.
9703 * configure: Regenerate.
9704 * Makefile.in (XML_TARGET): Remove.
9705 (target.xml): Remove rule.
9706 (clean): Do not clean up target.xml.
9707 (.PRECIOUS): Do not mention target.xml.
9709 * target.h (struct target_ops): Remove arch_string member.
9710 * linux-low.c (linux_arch_string): Remove.
9711 (linux_target_ops): Remove arch_string initializer.
9712 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9713 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9714 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9715 * spu-low.c (spu_arch_string): Remove.
9716 (spu_target_ops): Remove arch_string initializer.
9717 * win32-low.c (win32_arch_string): Remove.
9718 (win32_target_ops): Remove arch_string initializer.
9719 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9720 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9721 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9723 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9725 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9726 by collect_ptrace_register and supply_ptrace_register hooks.
9727 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9728 instead of checking for the_low_target.left_pad_xfer.
9729 (usr_store_inferior_registers): Use collect_ptrace_register callback
9730 instead of checking for the_low_target.left_pad_xfer.
9732 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9733 (s390_supply_ptrace_register): Likewise.
9734 (s390_fill_gregset): Call s390_collect_ptrace_register.
9735 (the_low_target): Update.
9737 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9738 (ppc_supply_ptrace_register): Likewise.
9739 (the_low_target): Update.
9741 * linux-i386-low.c (the_low_target): Update.
9742 * linux-x86-64-low.c (the_low_target): Update.
9744 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9746 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9747 reg-s390.o and reg-s390x.o.
9749 * linux-low.c (new_inferior): New global variable.
9750 (linux_create_inferior, linux_attach): Set it.
9751 (linux_wait_for_process): Call the_low_target.arch_setup after the
9752 target has stopped for the first time.
9753 (initialize_low): Do not call the_low_target.arch_setup.
9755 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9756 (s390_set_pc): Likewise.
9757 (s390_arch_setup): New function.
9758 (the_low_target): Use s390_arch_setup as arch_setup routine.
9760 * regcache.c (realloc_register_cache): New function.
9761 (set_register_cache): Call it for each existing regcache.
9763 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9765 * server.h (init_registers): Remove prototype.
9767 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9768 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9769 instead of init_registers ().
9770 * linux-arm-low.c (init_registers_arm): Add prototype.
9771 (init_registers_arm_with_iwmmxt): Likewise.
9772 (the_low_target): Add initializer for arch_setup field.
9773 * linux-cris-low.c (init_registers_cris): Add prototype.
9774 (the_low_target): Add initializer for arch_setup field.
9775 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9776 (the_low_target): Add initializer for arch_setup field.
9777 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9778 (the_low_target): Add initializer for arch_setup field.
9779 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9780 (the_low_target): Add initializer for arch_setup field.
9781 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9782 (the_low_target): Add initializer for arch_setup field.
9783 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9784 (the_low_target): Add initializer for arch_setup field.
9785 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9786 (init_registers_mips64_linux): Likewise.
9787 (the_low_target): Add initializer for arch_setup field.
9788 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9789 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9790 (the_low_target): Add initializer for arch_setup field.
9791 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9792 (init_registers_powerpc_64): Likewise.
9793 (the_low_target): Add initializer for arch_setup field.
9794 * linux-s390-low.c (init_registers_s390): Add prototype.
9795 (init_registers_s390x): Likewise.
9796 (the_low_target): Add initializer for arch_setup field.
9797 * linux-sh-low.c (init_registers_sh): Add prototype.
9798 (the_low_target): Add initializer for arch_setup field.
9799 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9800 (the_low_target): Add initializer for arch_setup field.
9801 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9802 (the_low_target): Add initializer for arch_setup field.
9804 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9805 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9806 instead of init_registers ().
9807 * win32-arm-low.c (init_registers_arm): Add prototype.
9808 (the_low_target): Add initializer for arch_setup field.
9809 * win32-i386-low.c (init_registers_i386): Add prototype.
9810 (the_low_target): Add initializer for arch_setup field.
9812 * spu-low.c (init_registers_spu): Add prototype.
9813 (initialize_low): Call initialie_registers_spu () instead of
9814 initialize_registers ().
9816 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9818 * server.c (handle_v_requests): When handling the vRun and vAttach
9819 packets, if already debugging a process, don't kill it. Return an
9822 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9824 * server.c (handle_query): Correct length check.
9826 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9828 * win32-low.c (do_initial_child_stuff): Add process handle
9829 parameter. Set current_process_handle and current_process_id from the
9830 parameters. Clear globals.
9831 (win32_create_inferior): Don't set current_process_handle and
9832 current_process_id here. Instead pass them on the call to
9833 do_initial_child_stuff.
9834 (win32_attach): Likewise.
9835 (win32_clear_inferiors): New.
9836 (win32_kill): Don't close the current process handle or the
9837 current thread handle here. Instead call win32_clear_inferiors.
9838 (win32_detach): Don't open a new handle to the process. Call
9839 win32_clear_inferiors.
9840 (win32_join): Don't rely on current_process_handle; open a new
9841 handle using the process id.
9842 (win32_wait): Call win32_clear_inferiors when the inferior process
9845 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9847 * server.c (monitor_show_help): Add "exit".
9849 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9851 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9852 (clean): Add reg-xtensa.c.
9853 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9854 * configure.srv (xtensa*-*-linux*) New target.
9855 * linux-xtensa-low.c: New.
9856 * xtensa-xtregs.c: New.
9858 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9860 * hostio.c: Don't include errno.h.
9861 (errno_to_fileio_errno): Move to hostio-errno.
9862 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9863 error number outputting to the target->hostio_last_error callback.
9864 (hostio_packet_error): Use FILEIO_EINVAL directly.
9865 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9866 calls to hostio_error.
9867 * hostio-errno.c: New.
9868 * server.h (hostio_last_error_from_errno): Declare.
9869 * target.h (target_ops): Add hostio_last_error member.
9870 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9871 as hostio_last_error handler.
9872 * spu-low.c (spu_target_ops): Likewise.
9873 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9874 (wince_hostio_last_error): New functions.
9875 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9876 as hostio_last_error handler.
9877 (win32_target_ops) [!_WIN32_WCE]: Register
9878 hostio_last_error_from_errno as hostio_last_error handler.
9879 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9880 (hostio-errno.o): New rule.
9881 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9882 * configure.srv (srv_hostio_err_objs): New variable. Default to
9884 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9885 * configure: Regenerate.
9887 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9889 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9890 (linux_kill, linux_detach): Clean up the process list.
9891 * remote-utils.c (remote_open): Improve port number parsing.
9892 (putpkt_binary, input_interrupt): Only send interrupts if the target
9894 * server.c (extended_protocol): Make static.
9895 (attached): Define earlier.
9896 (exit_requested, response_needed, program_argv): New variables.
9897 (target_running): New.
9898 (start_inferior): Clear attached here.
9899 (attach_inferior): Set attached here.
9900 (require_running): Define.
9901 (handle_query): Use require_running and target_running. Implement
9903 (handle_v_attach, handle_v_run): New.
9904 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9905 (gdbserver_usage): Update.
9906 (main): Redo argument parsing. Handle --debug and --multi. Handle
9907 --attach along with other options or after the port. Save
9908 program_argv. Support no initial program. Resynchronize
9909 communication with GDB after an error. Handle "monitor exit".
9910 Use require_running and target_running. Always allow the extended
9911 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9912 restart in extended mode.
9913 * README: Refer to the GDB manual. Update --attach usage.
9915 2007-12-20 Andreas Schwab <schwab@suse.de>
9917 * linux-low.c (STACK_SIZE): Define.
9918 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9919 (linux_test_for_tracefork): Likewise.
9921 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9923 * linux-low.c (linux_wait_for_event): Update messages. Do not
9924 reinsert auto-delete breakpoints.
9925 * mem-break.c (struct breakpoint): Change return type of handler to
9927 (set_breakpoint_at): Update handler type.
9928 (reinsert_breakpoint_handler): Return 1 instead of calling
9930 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9932 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9933 * mem-break.h (set_breakpoint_at): Update handler type.
9934 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9935 * win32-low.c (auto_delete_breakpoint): New.
9936 (get_child_debug_event): Use it.
9938 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9940 * configure.ac: Check for pread and pwrite.
9941 * hostio.c (handle_pread): Fall back to lseek and read.
9942 (handle_pwrite): Fall back to lseek and write.
9943 * config.in, configure: Regenerated.
9945 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9947 * server.c (myresume): Add own_buf argument.
9948 (main): Update calls.
9950 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9952 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9953 * remote-utils.c (remote_open): Do not call disable_async_io.
9954 (block_async_io): Delete.
9955 (unblock_async_io): Make static.
9956 (initialize_async_io): New.
9957 * server.c (handle_v_cont): Handle async I/O here.
9958 (myresume): Likewise. Move other common resume tasks here...
9959 (main): ... from here. Call initialize_async_io. Disable async
9960 I/O before the main loop.
9961 * server.h (initialize_async_io): Declare.
9962 (block_async_io, unblock_async_io): Delete prototypes.
9963 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9965 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9967 * remote-utils.c (readchar): Allow binary data in received messages.
9969 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9971 * win32-low.c (attaching): New global.
9972 (win32_create_inferior): Clear the `attaching' global.
9973 (win32_attach): Set the `attaching' global.
9974 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9975 attaching. Only set a breakpoint at the entry point if not
9978 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9980 * server.c (main): Don't report dll events on the initial
9981 connection on attaches.
9983 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9985 * server.c (main): Relax numerical bases supported for the pid of
9986 the --attach command line argument.
9988 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9990 * win32-low.c (win32_attach): Call OpenProcess before
9991 DebugActiveProcess, not after. Add last error output to error
9994 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9996 * win32-low.c (win32_get_thread_context)
9997 (win32_set_thread_context): New functions.
9998 (thread_rec): Use win32_get_thread_context.
9999 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10000 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10003 2007-12-03 Leo Zayas
10004 Pedro Alves <pedro_alves@portugalmail.pt>
10006 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10008 (child_add_thread): Minor cleanup.
10009 (child_continue): Resume artificially suspended threads before
10010 calling ContinueDebugEvent.
10011 (suspend_one_thread): New.
10012 (fake_breakpoint_event): New.
10013 (get_child_debug_event): Change return type to int. Check here if
10014 gdb sent an interrupt request. If a soft interrupt was requested,
10015 fake a breakpoint event. Return 0 if there is no event to handle,
10017 (win32_wait): Don't check here if gdb sent an interrupt request.
10018 Ensure there is a valid event to handle.
10019 (win32_request_interrupt): Add soft interruption method as last
10022 2007-12-03 Leo Zayas
10023 Pedro Alves <pedro_alves@portugalmail.pt>
10025 * win32-low.h (win32_thread_info): Add descriptions to the
10026 structure members. Replace `suspend_count' counter by a
10028 * win32-low.c (thread_rec): Update condition of when to get the
10029 context from the inferior. Rely on ContextFlags being set if it
10030 has already been retrieved. Only suspend the inferior thread if
10031 we haven't already. Warn if that fails.
10032 (continue_one_thread): s/suspend_count/suspended/. Only call
10033 ResumeThread once. Warn if that fails.
10035 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10037 * win32-low.c (win32_wait): Don't read from the inferior when it
10038 has already exited.
10040 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10042 * Makefile.in (win32_low_h): New variable.
10043 (win32-low.o): Add dependency on $(win32_low_h).
10044 (win32-arm-low.o, win32-i386-low.o): New rules.
10046 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10048 * hostio.c: Correct copyright year.
10050 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10052 * Makefile.in (OBS): Add hostio.o.
10053 (hostio.o): New rule.
10054 * server.h (handle_vFile): Declare.
10055 * hostio.c: New file.
10056 * server.c (handle_v_requests): Take packet_len and new_packet_len
10057 for binary packets. Call handle_vFile.
10058 (main): Update call to handle_v_requests.
10060 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10062 * linux-low.c: Include <sched.h>.
10064 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10066 * linux-low.c (linux_tracefork_grandchild): New.
10067 (linux_tracefork_child): Use clone.
10068 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10070 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10072 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10074 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10076 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10078 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10080 * inferiors.c (change_inferior_id): Delete.
10081 (add_pid_to_list, pull_pid_from_list): New.
10082 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10083 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10084 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10085 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10086 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10087 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10088 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10089 (using_threads): Always set to 1.
10090 (handle_extended_wait): New.
10091 (add_process): Do not set TID.
10092 (linux_create_inferior): Set must_set_ptrace_flags.
10093 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10094 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10095 (linux_thread_alive): Rename TID argument to LWPID.
10096 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10097 (linux_wait_for_event): Do not use TID or check using_threads. Update
10098 call to dead_thread_notify. Call handle_extended_wait.
10099 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10100 (send_sigstop): Delete sigstop_sent.
10101 (wait_for_sigstop): Avoid TID.
10102 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10103 (linux_test_for_tracefork): New.
10104 (linux_lookup_signals): Use thread_db_active and
10105 linux_supports_tracefork_flag.
10106 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10107 * linux-low.h (get_process_thread): Avoid TID.
10108 (struct process_ifo): Move thread_known and tid to the end. Remove
10110 (linux_attach_lwp, thread_db_init): Update prototypes.
10111 * server.h (change_inferior_id): Delete prototype.
10112 (add_pid_to_list, pull_pid_from_list): New prototypes.
10113 * thread-db.c (thread_db_use_events): New.
10114 (find_first_thread): Rename to...
10115 (find_one_thread): ...this. Update callers and messages. Do not
10116 call fatal. Check thread_db_use_events. Do not call
10117 change_inferior_id or new_thread_notify.
10118 (maybe_attach_thread): Update. Do not call new_thread_notify.
10119 (thread_db_init): Set thread_db_use_events. Check use_events.
10120 * utils.c (fatal, warning): Correct message prefix.
10122 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10124 * Makefile.in (clean): Remove new files.
10125 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10126 (powerpc-64.o, powerpc-64.c): New rules.
10127 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10128 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10130 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10132 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10133 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10134 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10135 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10136 (target_regsets): Add AltiVec and SPE register sets.
10137 * configure.ac: Check for AltiVec and SPE.
10138 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10139 (ppc_fill_vrregset, ppc_store_vrregset): New.
10140 (target_regsets): Add AltiVec register set.
10141 * configure: Regenerated.
10143 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10145 * linux-low.c (O_LARGEFILE): Define.
10146 (linux_read_memory): Use /proc/PID/mem.
10147 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10148 * configure, config.in: Regenerated.
10150 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10152 * linux-low.c (linux_wait_for_event): Do not pass signals while
10155 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10157 * win32-low.c (create_process): New.
10158 (win32_create_inferior): Use create_process instead of
10159 CreateProcess. If create_process failed retry appending an ".exe"
10160 suffix. Store the GetLastError result immediatelly after
10161 create_process calls and use it on the call to error.
10163 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10165 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10167 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10169 * configure.ac: Switch license to GPLv3.
10171 2007-08-01 Michael Snyder <msnyder@access-company.com>
10173 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10175 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10177 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10179 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10180 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10181 CloseToolhelp32Snapshot.
10182 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10183 CloseToolhelp32Snapshot.
10185 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10187 * server.c (main): Check for inferior exit before main loop.
10189 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10191 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10192 instead of on tmp_desc.
10194 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10195 Daniel Jacobowitz <dan@codesourcery.com>
10197 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10198 (add_thread): Minor cleanups.
10199 (clear_inferiors): Move lower in the file. Clear the DLL
10201 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10202 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10203 (xml_escape_text): New.
10204 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10206 (handle_v_cont): Report errors.
10207 (gdbserver_version): Update.
10208 (main): Correct size of own_buf. Do not report initial DLL events.
10209 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10210 (unloaded_dll, xml_escape_text): New.
10211 * win32-low.c (enum target_waitkind): Update comments.
10212 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10213 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10214 (win32_EnumProcessModules, win32_GetModuleInformation)
10215 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10216 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10217 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10218 (win32_Module32First, win32_Module32Next, load_toolhelp)
10219 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10220 (get_child_debug_event): Handle DLL events.
10221 (win32_wait): Likewise.
10223 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10225 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10226 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10228 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10230 * win32-low.c (handle_output_debug_string): Ignore event if not
10233 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10235 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10237 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10239 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10241 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10243 * inferiors.c (change_inferior_id): Add comment.
10244 * linux-low.c (check_removed_breakpoint): Add an early
10245 prototype. Improve debug output.
10246 (linux_attach): Doc update.
10247 (linux_detach_one_process, linux_detach): Clean up before releasing
10249 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10250 * linux-low.h (struct process_info): Doc improvement.
10251 * mem-break.c (delete_all_breakpoints): New.
10252 * mem-break.h (delete_all_breakpoints): New prototype.
10253 * thread-db.c (find_first_thread): New.
10254 (thread_db_create_event): Call it instead of
10255 thread_db_find_new_threads. Clean up unused variables.
10256 (maybe_attach_thread): Remove first thread handling.
10257 (thread_db_find_new_threads): Use find_first_thread.
10258 (thread_db_get_tls_address): Likewise.
10260 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10262 * thread-db.c (thread_db_find_new_threads): Add prototype.
10263 (thread_db_create_event): Check for the main thread before adding
10265 (maybe_attach_thread): Only enable event reporting if TID == 0.
10266 (thread_db_get_tls_address): Check for new threads.
10268 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10270 * linux-low.c (linux_create_inferior): Try execv before execvp.
10271 * spu-low.c (spu_create_inferior): Likewise.
10273 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10275 * linux-low.c (linux_create_inferior): Change execv to execvp.
10276 * spu-low.c (spu_create_inferior): Likewies.
10278 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10280 * Makefile.in (clean): Clean new files instead of deleted ones.
10281 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10282 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10284 * configure.srv: Specify XML files and new regformats for MIPS and
10286 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10287 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10288 an entry for the restart register.
10289 (mips_cannot_fetch_register, mips_cannot_store_register)
10290 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10291 register names to match the XML descriptions.
10292 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10293 restart register instead of $0.
10295 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10296 Markus Deuling <deuling@de.ibm.com>
10298 * remote-utils.c (decode_xfer_write): New function.
10299 * server.h (decode_xfer_write): Add prototype.
10300 * server.c (handle_query): Add PACKET_LEN argument. Support
10301 qXfer:spu:read and qXfer:spu:write packets.
10302 (main): Pass packet_len to handle_query.
10303 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10304 * target.h (target_ops): Add qxfer_spu.
10306 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10308 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10309 accessing non-seekable spufs files.
10311 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10313 * server.c (handle_query): Add reply for qC packet.
10315 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10316 Leo Zayas <lerele@champenstudios@com>
10318 * server.h (check_remote_input_interrupt_request): New function.
10319 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10320 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10321 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10322 (check_remote_input_interrupt_request): New function.
10323 * server.h (check_remote_input_interrupt_request): Declare.
10324 * win32-low.c (winapi_DebugBreakProcess,
10325 winapi_GenerateConsoleCtrlEvent): New typedefs.
10326 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10328 (win32_wait): Check for remote interrupt request
10329 with check_remote_input_interrupt_request.
10330 (win32_request_interrupt): New function.
10331 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10333 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10335 * win32-low.c (debug_registers_changed,
10336 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10337 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10338 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10339 (thread_rec): Get context using the low target.
10340 (child_add_thread): Call thread_added on the low target,
10341 which does the same thing.
10343 (do_initial_child_stuff): Remove debug registers references.
10344 Set context using the low target. Resume threads after
10345 setting the contexts.
10346 (child_continue): Remove dead variable. Remove debug
10347 registers references.
10348 (child_fetch_inferior_registers): Go through the low target.
10349 (do_child_store_inferior_registers): Remove.
10350 (child_store_inferior_registers): Go through the low target.
10351 (win32_resume): Remove debug registers references.
10352 Set context using the low target.
10353 (handle_exception): Change return type to void. Don't record
10354 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10355 first chance exception.
10356 (get_child_debug_event): Change return type to void. Remove
10357 goto loop. Always return after waiting for debug event.
10358 (win32_wait): Convert to switch statement. Handle spurious
10361 * win32-i386-low.c (debug_registers_changed,
10362 debug_registers_used): New.
10363 (initial_stuff): Rename to ...
10364 (i386_initial_stuff): ... this. Clear debug registers
10366 (store_debug_registers): Delete.
10367 (i386_get_thread_context): New.
10368 (load_debug_registers): Delete.
10369 (i386_set_thread_context): New.
10370 (i386_thread_added): New.
10371 (single_step): Rename to ...
10372 (i386_single_step): ... this.
10373 (do_fetch_inferior_registers): Rename to ...
10374 (i386_fetch_inferior_register): ... this.
10375 (i386_store_inferior_register): New.
10376 (the_low_target): Adapt to new interface.
10378 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10379 (arm_get_thread_context): New.
10380 (arm_set_thread_context): New.
10382 (do_fetch_inferior_registers): Rename to ...
10383 (arm_fetch_inferior_register): ... this.
10384 (arm_store_inferior_register): New.
10385 (arm_wince_breakpoint): Reimplement as unsigned long.
10386 (arm_wince_breakpoint_len): Define.
10387 (the_low_target): Adapt to new interface.
10389 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10390 load_debug_registers. Add get_thread_context, set_thread_context,
10391 thread_added and store_inferior_register. Rename
10392 fetch_inferior_registers to fetch_inferior_register.
10393 (regptr): Remove declaration.
10395 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10397 * linux-low.c (linux_detach): Change return type to int. Return 0.
10398 * spu-low.c (spu_detach): Likewise.
10400 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10402 * target.h (target_ops): Change return type of detach to int.
10404 (join_inferior): New.
10405 * server.c (main): Don't skip detach support on mingw32.
10406 If the inferior doesn't support detaching return error.
10407 Call join_inferior instead of using waitpid.
10408 * linux-low.c (linux_join): New.
10409 (linux_target_op): Add linux_join.
10410 * spu-low.c (spu_join): New.
10411 (spu_target_ops): Add spu_join.
10412 * win32-low.c (win32_detach): Adapt to new interface.
10413 Reopen current_process_handle before detaching. Issue a child
10414 resume before detaching.
10416 (win32_target_op): Add win32_join.
10418 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10420 * win32-low.c (win32-attach): Fix return value.
10421 * target.h (target_ops): Describe ATTACH return values.
10423 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10425 * win32-low.c (GETPROCADDRESS): Define.
10426 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10427 (winapi_DebugSetProcessKillOnExit): Likewise.
10428 (win32_create_inferior): Force usage of ansi CreateProcessA.
10429 (win32_attach): Use GETPROCADDRESS.
10430 (win32_detach): Likewise.
10432 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10434 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10436 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10438 * win32-low.c: Commit leftover changes from 2007-03-29.
10440 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10442 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10443 fields short instead of int. Add explicit padding.
10444 (i387_cache_to_fsave): Remove unnecessary casts.
10445 (i387_fsave_to_cache): Doc fix.
10446 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10448 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10450 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10451 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10453 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10455 * configure.srv (arm*-*-mingw32ce*): Move near the other
10458 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10460 * configure.ac: Add errno checking.
10461 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10462 sys/file.h and malloc.h.
10463 (AC_CHECK_DECLS): Add perror.
10464 (srv_mingwce): Handle.
10465 * configure.srv (i[34567]86-*-cygwin*): Add
10466 win32-i386-low.o to srv_tgtobj.
10467 (i[34567]86-*-mingw*): Likewise.
10468 (arm*-*-mingw32ce*): Add case.
10469 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10470 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10471 [__MINGW32CE__] (strerror): New function.
10472 [__MINGW32CE__] (errno): Define to GetLastError.
10473 [__MINGW32CE__] (COUNTOF): New macro.
10474 (remote_open): Remove extra close call.
10475 * mem-break.c (delete_breakpoint_at): New function.
10476 * mem-break.h (delete_breakpoint_at): Declare.
10477 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10478 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10479 [USE_WIN32API] (read, write): Add char* casts.
10480 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10481 * server.h: Include wincecompat.h on Windows CE.
10482 [HAVE_ERRNO_H]: Check.
10483 (perror): Declare if not declared.
10484 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10485 (perror_with_name): Remove errno declaration.
10486 * wincecompat.h: New.
10487 * wincecompat.c: New.
10488 * win32-low.h: New.
10489 * win32-arm-low.c: New.
10490 * win32-i386-low.c: New.
10491 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10492 (OUTMSG2): Make it safe.
10494 (COUNTOF): New macro.
10495 (NUM_REGS): Get it from the low target.
10496 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10497 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10498 (thread_rec): Let low target handle debug registers.
10499 (child_add_thread): Likewise.
10500 (child_init_thread_list): Likewise.
10501 (continue_one_thread): Likewise.
10503 (do_child_fetch_inferior_registers): Move to ...
10504 * win32-i386-low.c: ... here, and rename to ...
10505 (do_fetch_inferior_registers): ... this.
10506 * win32-low.c (child_fetch_inferior_registers):
10507 Go through the low target.
10508 (do_child_store_inferior_registers): Use regptr.
10509 (strwinerror): New function.
10510 (win32_create_inferior): Handle Windows CE.
10511 Use strwinerror instead of strerror on Windows error
10512 codes. Add program to the error output.
10513 Don't close the main thread handle on Windows CE.
10514 (win32_attach): Use coredll.dll on Windows CE.
10515 (win32_kill): Close current process and current
10517 (win32_detach): Use coredll.dll on Windows CE.
10518 (win32_resume): Let low target handle debug registers, and
10520 (handle_exception): Add/Remove initial breakpoint. Avoid
10521 non-existant WSTOPSIG on Windows CE.
10522 (win32_read_inferior_memory): Cast to remove warning.
10523 (win32_arch_string): Go through the low target.
10524 (initialize_low): Call set_breakpoint_data with the low
10525 target's breakpoint.
10526 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10527 FOP_REGNUM, mappings): Move to ...
10528 * win32-i386-low.c: ... here.
10529 * win32-low.c (win32_thread_info): Move to ...
10530 * win32-low.h: ... here.
10531 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10532 win32-arm-low.c and wincecompat.c.
10533 (all:): Add $EXEEXT.
10534 (install-only:): Likewise.
10535 (gdbserver:): Likewise.
10536 (gdbreplay:): Likewise.
10537 * config.in: Regenerate.
10538 * configure: Regenerate.
10540 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10542 * win32-low.c: Rename typedef thread_info to
10543 win32_thread_info throughout.
10545 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10547 * win32-i386-low.c: Rename to ...
10548 * win32-low.c: ... this.
10549 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10550 * Makefile.in: Likewise.
10552 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10554 * remote-utils.c (monitor_output): Constify msg parameter.
10555 * server.h (monitor_output): Likewise.
10556 * win32-i386-low.c (handle_output_debug_string): New.
10557 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10558 handle_output_debug_string.
10559 (get_child_debug_event): Likewise.
10561 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10563 * server.c (main): Correct strtoul check.
10565 2007-03-27 Jon Ringle <jon@ringle.org>
10567 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10569 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10571 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10573 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10575 * terminal.h: Check HAVE_SGTTY_H.
10577 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10579 * remote-utils.c (remote_open): Print out the assigned port number.
10581 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10583 * remote-utils.c (monitor_output): New function.
10584 * server.c (debug_threads): Define here.
10585 (monitor_show_help): New function.
10586 (handle_query): Handle qRcmd.
10587 (main): Do not handle 'd' packet.
10588 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10589 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10592 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10594 * Makefile.in (EXEEXT): New.
10595 (clean): Use $(EXEEXT).
10597 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10599 * target.h (target_ops): Rename send_signal to request_interrupt,
10600 and remove enum target_signal parameter.
10601 * linux-low.c (linux_request_interrupt): Rename from
10602 linux_send_signal, and always send SIGINT.
10603 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10604 and always send SIGINT.
10605 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10607 (input_interrupt): Likewise.
10609 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10611 * server.c (get_features_xml): Check if target implemented
10613 * win32-i386-low.c (win32_arch_string): New.
10614 (win32_target_ops): Add win32_arch_string as arch_string member.
10616 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10618 * spu-low.c (spu_arch_string): New.
10619 (spu_target_ops): Add spu_arch_string.
10621 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10623 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10624 * configure.ac: Do not check for terminal.h.
10625 * configure, config.in: Regenerated.
10627 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10629 * Makefile.in (OBS): Add $(XML_BUILTIN).
10630 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10632 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10633 (arm-with-iwmmxt.c): New.
10634 * config.in, configure: Regenerate.
10635 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10636 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10637 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10638 (arm*-*-linux*): Add iWMMXt and regset support.
10639 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10640 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10641 (arm_store_wmmxregset, target_regsets): New.
10642 * server.c (get_features_xml): Take annex argument. Check builtin
10644 (handle_query): Handle multiple annexes.
10646 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10648 * remote-utils.c [USE_WIN32API] (read, write): Define.
10649 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10652 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10654 * linux-i386-low.c (the_low_target): Set arch_string.
10655 * linux-x86-64-low.c (the_low_target): Likewise.
10656 * linux-low.c (linux_arch_string): New.
10657 (linux_target_ops): Add it.
10658 * linux-low.h (struct linux_target_ops): Add arch_string.
10659 * server.c (write_qxfer_response): Use const void * for DATA.
10660 (get_features_xml): New.
10661 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10662 * target.h (struct target_ops): Add arch_string method.
10664 2007-01-03 Denis Pilat <denis.pilat@st.com>
10665 Daniel Jacobowitz <dan@codesourcery.com>
10667 * linux-low.c (linux_kill): Handle being called with no threads.
10668 * win32-i386-low.c (win32_kill): Likewise.
10669 (get_child_debug_event): Clear current_process_handle.
10671 2006-12-30 Denis PILAT <denis.pilat@st.com>
10672 Daniel Jacobowitz <dan@codesourcery.com>
10674 * remote-utils.c (remote_open): Check the type of specified
10675 serial port devices before opening them.
10676 * server.c (main): Kill the inferior if an error occurs during
10677 the first remote_open.
10679 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10681 * README: Update supported targets.
10683 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10685 * Makefile.in (clean): Remove reg-mips64.c.
10686 (reg-mips64.c, reg-mips64.o): New rules.
10687 * configure.srv: Handle mips64. Include regset support for mips.
10688 * linux-mips-low.c (union mips_register): New.
10689 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10690 (mips_breakpoint, mips_breakpoint_at): Use int.
10691 (mips_collect_register, mips_supply_register)
10692 (mips_collect_register_32bit, mips_supply_register_32bit)
10693 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10694 (mips_store_fpregset, target_regsets): New.
10695 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10697 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10699 * configure.srv: Add target "spu*-*-*".
10700 * Makefile.in (clean): Remove reg-spu.c.
10701 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10702 * spu-low.c: New file.
10704 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10706 * configure.ac: Correct td_thr_tls_get_addr test.
10707 * configure: Regenerated.
10709 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10711 * linux-low.c (linux_wait_for_event): Reformat. Use the
10712 pass_signals array.
10713 * remote-utils.c (decode_address_to_semicolon): New.
10714 * server.c (pass_signals, handle_general_set): New.
10715 (handle_query): Mention QPassSignals for qSupported.
10716 (main): Call handle_general_set.
10717 * server.h (pass_signals, decode_address_to_semicolon): New.
10719 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10721 * server.c (handle_query): Correct error handling for read_auxv.
10723 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10725 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10726 and srv_linux_thread_db to yes.
10727 * linux-s390-low.c (s390_fill_gregset): New function.
10728 (target_regsets): Define data structure.
10730 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10732 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10733 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10734 * config.in, configure: Regenerated.
10735 * inferiors.c (gdb_id_to_thread): New function.
10736 (gdb_id_to_thread_id): Use it.
10737 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10738 * linux-low.h (struct process_info): Add th member.
10739 (thread_db_get_tls_address): New prototype.
10740 * remote-utils.c (decode_address): Make non-static.
10741 * server.c (handle_query): Handle qGetTLSAddr.
10742 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10743 * target.h (struct target_ops): Add get_tls_address.
10744 * thread-db.c (maybe_attach_thread): Save the thread handle.
10745 (thread_db_get_tls_address): New.
10747 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10749 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10750 (linux_resume_one_process): Take a siginfo_t *. Update all
10751 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10752 (struct pending_signals): Add a siginfo_t.
10753 (linux_wait_for_process): Always set last_status.
10754 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10755 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10756 * linux-low.h (struct process_info): Add last_status.
10758 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10760 * remote-utils.c (try_rle): New function.
10761 (putpkt_binary): Use it.
10763 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10765 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10766 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10767 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10768 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10769 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10772 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10774 * server.c (terminal_fd): New variable.
10775 (old_foreground_pgrp): Likewise.
10776 (restore_old_foreground_pgrp): New function.
10777 (start_inferior): Record the terminal file descriptor in terminal_fd
10778 and its original foreground group in old_foreground_pgrp. Register
10779 restore_old_foreground_pgrp with atexit().
10781 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10783 * server.c (handle_query): Correct qPart to qXfer.
10785 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10787 * configure.ac: Check for more headers which are missing on
10788 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10789 * configure.srv: Add Cygwin and mingw32.
10790 * remote-utils.c: Don't include headers unconditionally which
10791 are missing on mingw32. Include <winsock.h> for mingw32.
10792 (remote_open): Adjust for mingw32 support. Flush
10793 standard error after writing to it.
10794 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10795 (unblock_async_io, enable_async_io, disable_async_io)
10796 (readchar, getpkt): Update for Winsock support.
10797 (prepare_resume_reply): Expect a protocol signal number.
10798 * server.c: Disable <sys/wait.h> on mingw32.
10799 (start_inferior): Adjust for mingw32 support. Flush
10800 standard error after writing to it.
10801 (attach_inferior): Likewise. Use protocol signal
10803 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10805 * win32-i386-low.c: New file.
10806 * Makefile.in (XM_CLIBS): Set.
10807 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10808 (win32-i386-low.o): New dependency rule.
10809 * linux-low.c (linux_wait): Use target signal numbers.
10810 * target.h (struct target_ops): Doc fix.
10811 * server.h (target_signal_to_name): New prototype.
10812 * gdbreplay.c: Don't include headers unconditionally which
10813 are missing on mingw32. Include <winsock.h> for mingw32.
10814 (remote_close, remote_open): Adjust for Winsock support.
10815 * configure, config.in: Regenerated.
10817 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10819 * server.c (decode_xfer_read, write_qxfer_response): New.
10820 (handle_query): Take a packet length argument. Handle
10821 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10822 the qSupported response.
10823 (main): Update call to handle_query.
10825 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10827 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10828 (putpkt_binary): Renamed from putpkt and adjusted for binary
10830 (putpkt): New wrapper for putpkt_binary.
10831 (readchar): Don't mask off the high bit.
10832 (decode_X_packet): New function.
10833 * server.c (main): Call putpkt_binary if a handler sets the packet
10834 length. Save the length of the incoming packet. Handle 'X'.
10835 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10837 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10839 * server.c (handle_query): Handle qSupported.
10841 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10843 * remote-utils.c (all_symbols_looked_up): New variable.
10844 (look_up_one_symbol): Check it.
10845 * server.h (look_up_one_symbol): New declaration.
10846 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10848 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10850 * Makefile.in (linux-arm-low.o): Update dependencies.
10851 * linux-arm-low.c: Include "gdb_proc_service.h".
10852 (PTRACE_GET_THREAD_AREA): Define.
10853 (ps_get_thread_area): New function.
10855 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10857 * configure.srv (m68k*-*-uclinux*): New target.
10858 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10859 (linux_resume_one_process): Remove extraneous cast.
10860 (linux_read_offsets): New.
10861 (linux_target_op): Add linux_read_offsets on mmuless systems.
10862 * server.c (handle_query): Add qOffsets logic.
10863 * target.h (struct target_ops): Add read_offsets.
10865 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10867 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10868 (PTRACE_GET_THREAD_AREA): Define.
10869 (ps_get_thread_area): New function.
10870 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10871 (linux-x86-64-low.o): Update.
10873 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10875 * configure.ac: Remove checks for prfpregset_t.
10876 * gdb_proc_service.h: New file.
10877 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10878 new "gdb_proc_service.h".
10879 * proc-service.c: Likewise.
10880 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10881 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10882 * Makefile.in (gdb_proc_service_h): Updated.
10883 * configure, config.in: Regenerated.
10885 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10887 * remote-utils.c (prepare_resume_reply): Move declaration
10888 of gdb_id_from_wait to the top of the block.
10890 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10892 * linux-low.c (regsets_store_inferior_registers): Read the regset
10893 from the target before filling it.
10895 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10897 * server.c (attach_inferior): Return SIGTRAP for a successful
10900 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10902 * Makefile.in (OBS): Add version.o.
10903 (STAGESTUFF): Delete.
10904 (version.o): Add dependencies.
10905 (version.c): Replace rule.
10906 (clean): Remove version.c.
10907 * server.c (gdbserver_version): New.
10908 (gdbserver_usage): Use printf.
10909 (main): Handle --version and --help.
10910 * server.h (version, host_name): Add declarations.
10912 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10924 * linux-x86-64-low.c:
10926 * linux-s390-low.c:
10927 * linux-ppc64-low.c:
10929 * linux-mips-low.c:
10930 * linux-m68k-low.c:
10931 * linux-m32r-low.c:
10934 * linux-ia64-low.c:
10935 * linux-i386-low.c:
10936 * linux-crisv32-low.c:
10948 * gdbserver.1: Add (C) after Copyright. Update the FSF
10951 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10953 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10954 (arm_breakpoint_at): Recognize both breakpoints.
10955 (the_low_target): Use the correct breakpoint instruction.
10957 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10959 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10960 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10961 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10962 (the_low_target): Update.
10964 2005-10-25 Andreas Schwab <schwab@suse.de>
10966 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10968 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10969 (ia64_num_regs): Reduce to 462.
10971 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10973 * acinclude.m4: Correct quoting.
10974 * aclocal.m4: Regenerated.
10976 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10977 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10978 (thread_db_init): Call thread_db_err_str.
10979 * configure.ac: Check for TD_VERSION.
10980 * config.in, configure: Regenerated.
10982 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10984 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10986 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10988 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10989 is not available. Define HAVE_PTRACE_GETREGS if it is.
10990 * config.in, configure: Regenerated.
10991 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10992 * linux-i386-low.c, linux-m68k-low.c: Update to use
10993 HAVE_PTRACE_GETREGS.
10994 * linux-low.c (regsets_fetch_inferior_registers)
10995 (regsets_store_inferior_registers): Only return 0 if we processed
10997 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10998 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11000 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11002 * inferiors.c (struct thread_info): Add gdb_id.
11003 (add_thread): Add gdb_id argument.
11004 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11005 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11006 calls to add_thread.
11007 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11008 * server.c (handle_query): Use thread_to_gdb_id.
11009 (handle_v_cont, main): Use gdb_id_to_thread_id.
11010 * server.h (add_thread): Update prototype.
11011 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11014 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11016 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11017 left-padded registers.
11018 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11019 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11021 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11023 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11024 * configure: Regenerate.
11025 * config.in: Regenerate.
11026 * server.h (NEED_DECLARATION_STRERROR):
11027 Replace with !HAVE_DECL_STRERROR.
11029 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11031 * linux-low.c (linux_wait, linux_send_signal): Don't test
11032 an unsigned long variable for > 0 if it could be MAX_ULONG.
11033 * server.c (myresume): Likewise.
11034 * target.c (set_desired_inferior): Likewise.
11036 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11038 * configure.ac: Simplify and improve check for socklen_t.
11039 * configure, config.in: Regenerate.
11041 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11043 * acconfig.h: Remove.
11044 * configure.ac: Add a test for socklen_t. Use three-argument
11045 AC_DEFINE throughout.
11046 * config.in: Regenerated using autoheader 2.59.
11047 * configure: Regenerated.
11049 * gdbreplay.c (socklen_t): Provide a default.
11050 (remote_open): Use socklen_t.
11051 * remote-utils.c (socklen_t): Provide a default.
11052 (remote_open): Use socklen_t.
11053 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11056 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11058 * linux-low.c (linux_read_memory, linux_write_memory)
11059 (linux_read_auxv): Likewise.
11060 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11061 (check_mem_write): Likewise.
11062 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11064 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11065 (registers_from_string, register_data): Likewise.
11066 * server.c (handle_query, main): Likewise.
11067 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11068 (decode_M_packet): Likewise.
11069 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11070 * target.h (struct target_ops): Update read_memory, write_memory,
11072 (read_inferior_memory, write_inferior_memory): Update.
11073 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11074 to unsigned char *.
11075 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11076 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11077 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11078 linux-s390-low.c, linux-sh-low.c: Update for changes in
11079 read_inferior_memory and the_low_target->breakpoint.
11081 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11083 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11084 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11085 * configure.srv: Add powerpc64-*-linux*.
11086 * linux-ppc64-low.c: New file.
11088 2005-05-23 Orjan Friberg <orjanf@axis.com>
11090 * linux-cris-low.c: New file with support for CRIS.
11091 * linux-crisv32-low.c: Ditto for CRISv32.
11092 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11093 (clean): Add reg-cris.c and reg-crisv32.c.
11094 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11095 reg-crisv32.o, and reg-crisv32.c to make rules.
11096 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11097 recognized targets.
11099 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11101 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11102 of sizeof (PTRACE_XFER_TYPE).
11103 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11105 2005-05-12 Orjan Friberg <orjanf@axis.com>
11107 * target.h (struct target_ops): Add insert_watchpoint,
11108 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11109 pointers for hardware watchpoint support.
11110 * linux-low.h (struct linux_target_ops): Ditto.
11111 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11112 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11113 to linux_target_ops.
11114 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11116 * server.c (main): Recognize 'Z' and 'z' packets.
11118 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11120 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11121 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11122 (the_low_target): Add new members.
11124 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11126 * proc-service.c (ps_lgetregs): Search all_processes instead of
11129 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11131 * server.c (start_inferior): Change return type to int.
11132 (attach_inferior): Change sigptr to int *.
11133 (handle_v_cont, handle_v_requests): Change signal to int *.
11134 (main): Change signal to int.
11136 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11138 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11139 * configure.srv: Add m32r*-*-linux*.
11140 * linux-m32r-low.c: New file.
11142 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11144 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11146 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11148 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11149 Take unsigned long arguments for PIDs.
11150 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11151 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11152 (wait_for_sigstop, linux_resume_one_process)
11153 (regsets_fetch_inferior_registers, linux_send_signal)
11154 (linux_read_auxv): Likewise. Update the types of variables holding
11155 PIDs. Update format string specifiers.
11156 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11157 * remote-utils.c (prepare_resume_reply): Likewise.
11158 * server.c (cont_thread, general_thread, step_thread)
11159 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11161 (handle_query): Update format specifiers.
11162 (handle_v_cont, main): Use strtoul for thread IDs.
11163 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11164 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11165 (general_thread, step_thread, thread_from_wait)
11166 (old_thread_from_wait): Update.
11167 * target.h (struct thread_resume): Use unsigned long for THREAD.
11168 (struct target_ops): Use unsigned long for arguments to attach and
11171 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11173 * acinclude.m4: Include bfd/bfd.m4 directly.
11174 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11175 <agriffis@toolchain.org>.
11176 * aclocal.m4, configure: Regenerated.
11178 2005-01-07 Andrew Cagney <cagney@gnu.org>
11180 * configure.ac: Rename configure.in, require autoconf 2.59.
11181 * configure: Re-generate.
11183 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11185 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11186 LIBS when finished.
11187 * aclocal.m4: Regenerated.
11188 * configure: Regenerated.
11190 2004-11-21 Andreas Schwab <schwab@suse.de>
11192 * linux-m68k-low.c (m68k_num_gregs): Define.
11193 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11194 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11195 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11196 (m68k_breakpoint_at): New. Add to the_low_target.
11198 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11199 srv_linux_thread_db to yes.
11201 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11203 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11204 (ARCH_SET_FS): Likewise.
11205 (ARCH_GET_FS): Likewise.
11206 (ARCH_GET_GS): Likewise.
11208 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11210 * linux-i386-low.c (ps_get_thread_area): New.
11211 * linux-x86-64-low.c (ps_get_thread_area): New.
11212 * linux-low.c: Include <sys/syscall.h>.
11213 (linux_kill_one_process): Don't kill the first thread here.
11214 (linux_kill): Kill the first thread here.
11215 (kill_lwp): New function.
11216 (send_sigstop, linux_send_signal): Use it.
11217 * proc-service.c: Clean up #ifdefs.
11218 (fpregset_info): Delete.
11219 (ps_lgetregs): Update and enable implementation.
11220 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11222 * remote-utils.c (struct sym_cache, symbol_cache): New.
11223 (input_interrupt): Print a clearer message.
11224 (async_io_enabled): New variable.
11225 (enable_async_io, disable_async_io): Use it. Update comments.
11226 (look_up_one_symbol): Use the symbol cache.
11227 * thread-db.c (thread_db_look_up_symbols): New function.
11228 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11230 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11232 * configure.in: Test for -rdynamic.
11233 * configure: Regenerated.
11234 * Makefile (INTERNAL_LDFLAGS): New.
11235 (gdbserver, gdbreplay): Use it.
11237 2004-09-02 Andrew Cagney <cagney@gnu.org>
11239 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11241 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11243 * linux-low.c (linux_wait): Clear all_processes list also.
11245 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11247 * linux-low.c: Include <errno.h>. Remove extern declaration of
11250 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11252 * gdbreplay.c, server.h, utils.c: Update copyright years.
11254 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11256 * server.c (main): Print child status or termination signal from
11257 variable 'signal', not 'sig'.
11259 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11261 * linux-low.c (linux_read_memory): Change return type to
11262 int. Check for and return error from ptrace().
11263 * target.c (read_inferior_memory): Change return type to int. Pass
11264 back return status from the_target->read_memory().
11265 * target.h (struct target_ops): Adapt *read_memory() prototype.
11267 (read_inferior_memory): Adapt prototype.
11268 * server.c (main): Return an error packet if
11269 read_inferior_memory() returns an error.
11271 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11273 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11274 Unify with other clean targets.
11276 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11278 * server.c (handle_v_cont): Call set_desired_inferior.
11280 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11282 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11284 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11286 * linux-low.c (linux_wait): Unblock async I/O.
11287 (linux_resume): Block and enable async I/O.
11288 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11289 * server.h (block_async_io, unblock_async_io): Add prototypes.
11291 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11293 * remote-utils.c (remote_open): Print a status notice after
11294 opening a TCP port.
11295 * server.c (attach_inferior): Print a status notice after
11298 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11300 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11302 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11304 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11306 * server.c, target.h: Update copyright years.
11308 2004-02-25 Roland McGrath <roland@redhat.com>
11310 * target.h (struct target_ops): New member `read_auxv'.
11311 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11312 * linux-low.c (linux_read_auxv): New function.
11313 (linux_target_ops): Initialize `read_auxv' member to that.
11315 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11317 Committed by Jim Blandy <jimb@redhat.com>.
11319 * linux-s390-low.c (s390_num_regs): Update.
11320 (s390_regmap): Remove control registers. Use __s390x__ predefine
11321 instead of GPR_SIZE to distiguish s390 and s390x targets.
11323 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11325 * linux-low.c: Update copyright year.
11326 (check_removed_breakpoint): Clear pending_is_breakpoint.
11327 (linux_set_resume_request, linux_queue_one_thread)
11328 (resume_status_pending_p): New functions.
11329 (linux_continue_one_thread): Use process->resume.
11330 (linux_resume): Only resume threads if there are no pending events.
11331 * linux-low.h (struct process_info): Add resume request
11334 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11336 * regcache.c (new_register_cache): Clear the allocated register
11337 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11339 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11341 * linux-low.c (linux_resume): Take a struct thread_resume *
11343 (linux_wait): Update call.
11344 (resume_ptr): New static variable.
11345 (linux_continue_one_thread): Renamed from
11346 linux_continue_one_process. Use resume_ptr.
11347 (linux_resume): Use linux_continue_one_thread.
11348 * server.c (handle_v_cont, handle_v_requests): New functions.
11349 (myresume): New function.
11350 (main): Handle 'v' case.
11351 * target.h (struct thread_resume): New type.
11352 (struct target_ops): Change argument of "resume" to struct
11354 (myresume): Delete macro.
11356 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11358 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11359 (uninstall): Support DESTDIR.
11361 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11363 * configure.srv: Add xscale*linux copy of arm*linux entry.
11365 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11367 * linux-arm-low.c (arm_reinsert_addr): New function.
11368 (the_low_target): Add arm_reinsert_addr.
11370 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11372 * mem-break.c: Remove whitespace at end of file.
11374 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11376 * configure.in: Check whether we need to prototype strerror.
11377 * server.h: Optionally prototype strerror.
11378 * gdbreplay.c (perror_with_name): Use strerror.
11379 * linux-low.c (linux_attach_lwp): Use strerror.
11380 * utils.c (perror_with_name): Use strerror.
11381 * config.in, configure: Regenerated.
11383 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11385 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11386 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11388 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11390 * Makefile.in (SFILES): Update.
11391 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11392 low-sun3.c: Remove files.
11394 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11396 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11397 (linux_detach_one_process, linux_detach): New functions.
11398 (linux_target_ops): Add linux_detach.
11399 * server.c (main): Handle 'D' packet.
11400 * target.h (struct target_ops): Add "detach" member.
11401 (detach_inferior): Define.
11403 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11405 From Kelley Cook <kelleycook@wideopenwest.com>:
11406 * configure.srv: Accept i[34567]86 variants.
11408 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11410 * linux-low.c (linux_wait_for_event): Correct comment typos.
11411 (linux_resume_one_process): Call check_removed_breakpoint.
11412 (linux_send_signal): New function.
11413 (linux_target_ops): Add linux_send_signal.
11414 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11416 * target.h (struct target_ops): Add send_signal.
11418 2003-05-29 Jim Blandy <jimb@redhat.com>
11420 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11421 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11422 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11423 away part of the register's value.
11425 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11427 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11428 (linux_wait_for_event, linux_init_signals): Likewise.
11430 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11432 * configure.in: Check for stdlib.h.
11433 * configure: Regenerated.
11434 * config.in: Regenerated.
11436 2003-01-04 Andreas Schwab <schwab@suse.de>
11438 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11440 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11442 * Makefile.in: Remove obsolete code.
11444 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11446 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11447 defined(PT_FPR0_HI).
11449 2002-11-17 Stuart Hughes <seh@zee2.com>
11451 * linux-arm-low.c (arm_num_regs): Increase.
11452 (arm_regmap): Include status register.
11454 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11456 * linux-low.c (register_addr): Remove incorrect -1 check.
11458 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11460 * linux-low.c (linux_create_inferior): Call setpgid. Return
11462 (unstopped_p, linux_signal_pid): Remove.
11463 (linux_target_ops): Remove linux_signal_pid.
11464 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11465 global instead of target method.
11466 * target.h (struct target_ops): Remove signal_pid. Update comment
11467 for create_inferior.
11468 * server.c (signal_pid): New variable.
11469 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11470 gdbserver. Set the child to be the foreground process group.
11471 (attach_inferior): Set signal_pid.
11473 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11475 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11477 2002-08-20 Jim Blandy <jimb@redhat.com>
11479 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11482 2002-08-01 Andrew Cagney <cagney@redhat.com>
11484 * Makefile.in: Make chill references obsolete.
11486 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11488 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11489 * configure: Regenerate.
11490 * config.in: Regenerate.
11492 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11494 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11495 (perror_with_name, remote_close, remote_open, expect, play): Static.
11497 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11499 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11500 byte offsets instead of an array of indexes.
11501 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11503 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11505 * regcache.c: Add comment.
11507 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11509 * thread-db.c: New file.
11510 * proc-service.c: New file.
11511 * acinclude.m4: New file.
11512 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11513 proc-service.o, and thread-db.o.
11514 (linux-low.o): Add USE_THREAD_DB.
11515 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11516 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11517 * aclocal.m4: Regenerated.
11518 * config.in: Regenerated.
11519 * configure: Regenerated.
11520 * configure.in: Check for proc_service.h, sys/procfs.h,
11521 thread_db.h, and linux/elf.h headrs.
11522 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11523 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11524 Check for -lthread_db and thread support.
11525 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11526 PowerPC, and SuperH.
11527 * i387-fp.c: Constify arguments.
11528 * i387-fp.h: Likewise.
11529 * inferiors.c: (struct thread_info): Renamed from
11530 `struct inferior_info'. Remove PID member. Use generic inferior
11531 list header. All uses updated.
11532 (inferiors, signal_pid): Removed.
11533 (all_threads): New variable.
11534 (get_thread): Define.
11535 (add_inferior_to_list): New function.
11536 (for_each_inferior): New function.
11537 (change_inferior_id): New function.
11538 (add_inferior): Removed.
11539 (remove_inferior): New function.
11540 (add_thread): New function.
11541 (free_one_thread): New function.
11542 (remove_thread): New function.
11543 (clear_inferiors): Use for_each_inferior and free_one_thread.
11544 (find_inferior): New function.
11545 (find_inferior_id): New function.
11546 (inferior_target_data): Update argument type.
11547 (set_inferior_target_data): Likewise.
11548 (inferior_regcache_data): Likewise.
11549 (set_inferior_regcache_data): Likewise.
11550 * linux-low.c (linux_bp_reinsert): Remove.
11551 (all_processes, stopping_threads, using_thrads)
11552 (struct pending_signals, debug_threads, pid_of): New.
11553 (inferior_pid): Replace with macro.
11554 (struct inferior_linux_data): Remove.
11555 (get_stop_pc, add_process): New functions.
11556 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11557 Use add_process and add_thread.
11558 (linux_attach_lwp): New function, based on old linux_attach. Use
11559 add_process and add_thread. Set stop_expected for new threads.
11560 (linux_attach): New function.
11561 (linux_kill_one_process): New function.
11562 (linux_kill): Kill all LWPs.
11563 (linux_thread_alive): Use find_inferior_id.
11564 (check_removed_breakpoints, status_pending_p): New functions.
11565 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11566 Update. Use WNOHANG. Wait for cloned processes also. Update process
11567 struct for the found process.
11568 (linux_wait_for_event): New function.
11569 (linux_wait): Use it. Support LWPs.
11570 (send_sigstop, wait_for_sigstop, stop_all_processes)
11571 (linux_resume_one_process, linux_continue_one_process): New functions.
11572 (linux_resume): Support LWPs.
11573 (REGISTER_RAW_SIZE): Remove.
11574 (fetch_register): Use register_size instead. Call supply_register.
11575 (usr_store_inferior_registers): Likewise. Call collect_register.
11576 Fix recursive case.
11577 (regsets_fetch_inferior_registers): Improve error message.
11578 (regsets_store_inferior_registers): Add debugging.
11579 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11580 (unstopped_p, linux_signal_pid): New functions.
11581 (linux_target_ops): Add linux_signal_pid.
11582 (linux_init_signals): New function.
11583 (initialize_low): Call it. Initialize using_threads.
11584 * regcache.c (inferior_regcache_data): Add valid
11586 (get_regcache): Fetch registers lazily. Add fetch argument
11587 and update all callers.
11588 (regcache_invalidate_one, regcache_invalidate): New
11590 (new_register_cache): Renamed from create_register_cache.
11591 Return the new regcache.
11592 (free_register_cache): Change argument to a void *.
11593 (registers_to_string, registers_from_string): Call get_regcache
11594 with fetch flag set.
11595 (register_data): Make static. Pass fetch flag to get_regcache.
11596 (supply_register): Call get_regcache with fetch flag clear.
11597 (collect_register): Call get_regcache with fetch flag set.
11598 (collect_register_as_string): New function.
11599 * regcache.h: Update.
11600 * remote-utils.c (putpkt): Flush after debug output and use
11602 Handle input interrupts while waiting for an ACK.
11603 (input_interrupt): Use signal_pid method.
11604 (getpkt): Flush after debug output and use stderr.
11605 (outreg): Use collect_register_as_string.
11606 (new_thread_notify, dead_thread_notify): New functions.
11607 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11608 and general_thread.
11609 (look_up_one_symbol): Flush after debug output.
11610 * server.c (step_thread, server_waiting): New variables.
11611 (start_inferior): Don't use signal_pid. Update call to mywait.
11612 (attach_inferior): Update call to mywait.
11613 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11614 (main): Don't fetch/store registers explicitly. Use
11615 set_desired_inferior. Support proposed ``Hs'' packet. Update
11617 * server.h: Update.
11618 (struct inferior_list, struct_inferior_list_entry): New.
11619 * target.c (set_desired_inferior): New.
11620 (write_inferior_memory): Constify.
11621 (mywait): New function.
11622 * target.h: Update.
11623 (struct target_ops): New signal_pid method.
11624 (mywait): Removed macro, added prototype.
11626 * linux-low.h (regset_func): Removed.
11627 (regset_fill_func, regset_store_func): New.
11628 (enum regset_type): New.
11629 (struct regset_info): Add type field. Use new operation types.
11630 (struct linux_target_ops): stop_pc renamed to get_pc.
11631 Add decr_pc_after_break and breakpoint_at.
11632 (get_process, get_thread_proess, get_process_thread)
11633 (strut process_info, all_processes, linux_attach_lwp)
11634 (thread_db_init): New.
11636 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11637 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11638 (the_low_target): Add new members.
11639 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11640 (i386_store_fpxregset): Constify.
11641 (target_regsets): Add new kind identifier.
11642 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11643 (i386_set_pc): Add debugging.
11644 (i386_breakpoint_at): New function.
11645 (the_low_target): Add new members.
11646 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11647 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11648 (mips_breakpoint_at): New.
11649 (the_low_target): Add new members.
11650 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11651 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11652 (the_low_target): Add new members.
11653 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11654 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11655 (the_low_target): Add new members.
11656 * linux-x86-64-low.c (target_regsets): Add new kind
11659 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11661 From Martin Pool <mbp@samba.org>:
11662 * server.c (gdbserver_usage): New function.
11665 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11667 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11668 stop_at -> stop_pc.
11670 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11672 * Makefile.in: Remove obsolete code.
11674 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11676 * linux-low.c (regsets_fetch_inferior_registers),
11677 (regsets_store_inferior_registers): Removed cast to int from
11679 * regcache.h: Added declaration of struct inferior_info.
11681 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11683 * inferiors.c (struct inferior_info): Add regcache_data.
11684 (add_inferior): Call create_register_cache.
11685 (clear_inferiors): Call free_register_cache.
11686 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11687 * regcache.c (struct inferior_regcache_data): New.
11688 (registers): Remove.
11689 (get_regcache): New function.
11690 (create_register_cache, free_register_cache): New functions.
11691 (set_register_cache): Don't initialize the register cache here.
11692 (registers_to_string, registers_from_string, register_data): Call
11694 * regcache.h: Add prototypes.
11695 * server.h: Likewise.
11697 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11699 * mem-break.c: New file.
11700 * mem-break.h: New file.
11701 * Makefile.in: Add mem-break.o rule; update server.h
11703 * inferiors.c (struct inferior_info): Add target_data
11705 (clear_inferiors): Free target_data member if set.
11706 (inferior_target_data, set_inferior_target_data): New functions.
11707 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11708 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11709 * linux-low.c (linux_bp_reinsert): New variable.
11710 (struct inferior_linux_data): New.
11711 (linux_create_inferior): Use set_inferior_target_data.
11712 (linux_attach): Likewise. Call add_inferior.
11713 (linux_wait_for_one_inferior): New function.
11714 (linux_wait): Call it.
11715 (linux_write_memory): Add const.
11716 (initialize_low): Call set_breakpoint_data.
11717 * linux-low.h (struct linux_target_ops): Add breakpoint
11719 * server.c (attach_inferior): Remove extra add_inferior
11721 * server.h: Include mem-break.h. Update inferior.c
11723 * target.c (read_inferior_memory)
11724 (write_inferior_memory): New functions.
11725 * target.h (read_inferior_memory)
11726 (write_inferior_memory): Change macros to prototypes.
11727 (struct target_ops): Update comments. Add const to write_memory
11730 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11732 * linux-low.c (usr_store_inferior_registers): Support
11733 registers which are allowed to fail to store.
11734 * linux-low.h (linux_target_ops): Likewise.
11735 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11736 (ppc_cannot_store_register): FPSCR may not be storable.
11738 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11740 * server.h: Include <string.h> if HAVE_STRING_H.
11741 * ChangeLog: Correct paths in last ChangeLog entry.
11743 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11745 * linux-low.h: Remove obsolete prototypes.
11746 (struct linux_target_ops): New.
11747 (extern the_low_target): New.
11748 * linux-low.c (num_regs, regmap): Remove declarations.
11749 (register_addr): Use the_low_target explicitly.
11750 (fetch_register): Likewise.
11751 (usr_fetch_inferior_registers): Likewise.
11752 (usr_store_inferior_registers): Likewise.
11753 * linux-arm-low.c (num_regs): Remove.
11754 (arm_num_regs): Define.
11755 (arm_regmap): Renamed from regmap, made static.
11756 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11758 (arm_cannot_store_register): Renamed from cannot_store_register,
11760 (the_low_target): New.
11761 * linux-i386-low.c (num_regs): Remove.
11762 (i386_num_regs): Define.
11763 (i386_regmap): Renamed from regmap, made static.
11764 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11766 (i386_cannot_store_register): Renamed from cannot_store_register,
11768 (the_low_target): New.
11769 * linux-ia64-low.c (num_regs): Remove.
11770 (ia64_num_regs): Define.
11771 (ia64_regmap): Renamed from regmap, made static.
11772 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11774 (ia64_cannot_store_register): Renamed from cannot_store_register,
11776 (the_low_target): New.
11777 * linux-m68k-low.c (num_regs): Remove.
11778 (m68k_num_regs): Define.
11779 (m68k_regmap): Renamed from regmap, made static.
11780 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11782 (m68k_cannot_store_register): Renamed from cannot_store_register,
11784 (the_low_target): New.
11785 * linux-mips-low.c (num_regs): Remove.
11786 (mips_num_regs): Define.
11787 (mips_regmap): Renamed from regmap, made static.
11788 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11790 (mips_cannot_store_register): Renamed from cannot_store_register,
11792 (the_low_target): New.
11793 * linux-ppc-low.c (num_regs): Remove.
11794 (ppc_num_regs): Define.
11795 (ppc_regmap): Renamed from regmap, made static.
11796 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11798 (ppc_cannot_store_register): Renamed from cannot_store_register,
11800 (the_low_target): New.
11801 * linux-s390-low.c (num_regs): Remove.
11802 (s390_num_regs): Define.
11803 (s390_regmap): Renamed from regmap, made static.
11804 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11806 (s390_cannot_store_register): Renamed from cannot_store_register,
11808 (the_low_target): New.
11809 * linux-sh-low.c (num_regs): Remove.
11810 (sh_num_regs): Define.
11811 (sh_regmap): Renamed from regmap, made static.
11812 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11814 (sh_cannot_store_register): Renamed from cannot_store_register,
11816 (the_low_target): New.
11817 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11818 (the_low_target): New.
11820 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11822 * Makefile.in: Add stamp-h target.
11823 * configure.in: Create stamp-h.
11824 * configure: Regenerated.
11826 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11828 * inferiors.c: New file.
11829 * target.c: New file.
11830 * target.h: New file.
11831 * Makefile.in: Add target.o and inferiors.o. Update
11833 * linux-low.c (inferior_pid): New static variable,
11834 moved from server.c.
11835 (linux_create_inferior): Renamed from create_inferior.
11836 Call add_inferior. Return 0 on success instead of a PID.
11837 (linux_attach): Renamed from myattach.
11838 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11839 (linux_thread_alive): Renamed from mythread_alive.
11840 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11842 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11843 (regsets_store_inferior_registers): Correct error message.
11844 Add missing ``return 0''.
11845 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11846 (linux_store_registers): Renamed from store_inferior_registers.
11847 (linux_read_memory): Renamed from read_inferior_memory.
11848 (linux_write_memory): Renamed from write_inferior_memory.
11849 (linux_target_ops): New structure.
11850 (initialize_low): Call set_target_ops ().
11851 * remote-utils.c (unhexify): New function.
11852 (hexify): New function.
11853 (input_interrupt): Send signals to ``signal_pid''.
11854 * server.c (inferior_pid): Remove.
11855 (start_inferior): Update create_inferior call.
11856 (attach_inferior): Call add_inferior.
11857 (handle_query): New function.
11858 (main): Call handle_query for `q' packets.
11859 * server.h: Include "target.h". Remove obsolete prototypes.
11860 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11862 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11864 * Makefile.in: Add WARN_CFLAGS. Update configury
11866 * configure.in: Check for <string.h>
11867 * configure: Regenerate.
11868 * config.in: Regenerate.
11869 * gdbreplay.c: Include needed system headers.
11870 (remote_open): Remove strchr prototype.
11871 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11872 * regcache.c (supply_register): Change buf argument to const void *.
11873 (supply_register_by_name): Likewise.
11874 (collect_register): Change buf argument to void *.
11875 (collect_register_by_name): Likewise.
11876 * regcache.h: Add missing prototypes.
11877 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11878 * server.c (handle_query): New function.
11879 (attached): New static variable, moved out of main.
11880 (main): Quiet longjmp clobber warnings.
11881 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11882 * utils.c (error): Remove NORETURN.