Fix gdbserver crash exposed by gdb.threads/process-dies-while-handling-bp.exp
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-08-21 Pedro Alves <palves@redhat.com>
2
3 PR gdb/18749
4 * inferiors.c (remove_thread): Discard any pending stop reply for
5 this thread.
6 * server.c (remove_all_on_match_pid): Rename to ...
7 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8 instead of a pid.
9 (discard_queued_stop_replies): Change parameter to a ptid. Now
10 extern.
11 (handle_v_kill, kill_inferior_callback, captured_main)
12 (process_serial_event): Adjust.
13 * server.h (discard_queued_stop_replies): Declare.
14
15 2015-08-21 Pedro Alves <palves@redhat.com>
16
17 * linux-low.c (wait_for_sigstop): Always switch to no thread
18 selected if the previously current thread dies.
19 * lynx-low.c (lynx_request_interrupt): Use the first thread's
20 process instead of the current thread's.
21 * remote-utils.c (input_interrupt): Don't check if there's no
22 current thread.
23 * server.c (gdb_read_memory, gdb_write_memory): If setting the
24 current thread to the general thread fails, error out.
25 (handle_qxfer_auxv, handle_qxfer_libraries)
26 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
27 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
28 (handle_query): Check if there's a thread selected instead of
29 checking whether there's any thread in the thread list.
30 (handle_qxfer_threads, handle_qxfer_btrace)
31 (handle_qxfer_btrace_conf): Don't error out early if there's no
32 thread in the thread list.
33 (handle_v_cont, myresume): Don't set the current thread to the
34 continue thread.
35 (process_serial_event) <Hg handling>: Also set thread_id if the
36 previous general thread is still alive.
37 (process_serial_event) <g/G handling>: If setting the current
38 thread to the general thread fails, error out.
39 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
40 thread's lwp instead of the current thread's.
41 * target.c (set_desired_thread): If the desired thread was not
42 found, leave the current thread pointing to NULL. Return an int
43 (boolean) indicating success.
44 * target.h (set_desired_thread): Change return type to int.
45
46 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
47
48 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
49 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
50 #includes.
51 (ps_get_thread_area): New function.
52
53 2015-08-19 Gary Benson <gbenson@redhat.com>
54
55 * hostio.c (handle_pread): Do not attempt to read more data
56 than hostio_reply_with_data can fit in a packet.
57
58 2015-08-18 Joel Brobecker <brobecker@adacore.com>
59
60 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
61
62 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
63
64 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
65
66 2015-08-06 Pedro Alves <palves@redhat.com>
67
68 * tracepoint.c (expr_eval_result): Now an int.
69
70 2015-08-06 Pedro Alves <palves@redhat.com>
71
72 * gdbthread.h (struct regcache): Forward declare.
73 (struct thread_info) <regcache_data>: Now a struct regcache
74 pointer.
75 * inferiors.c (inferior_regcache_data)
76 (set_inferior_regcache_data): Now work with struct regcache
77 pointers.
78 * inferiors.h (struct regcache): Forward declare.
79 (inferior_regcache_data, set_inferior_regcache_data): Now work
80 with struct regcache pointers.
81 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
82 (free_register_cache_thread): Remove struct regcache pointer
83 casts.
84
85 2015-08-06 Pedro Alves <palves@redhat.com>
86
87 * server.c (captured_main): On error, print the exception message
88 to stderr, and if run_once is set, throw a quit.
89
90 2015-08-06 Pedro Alves <palves@redhat.com>
91
92 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
93 the current thread.
94
95 2015-08-06 Pedro Alves <palves@redhat.com>
96
97 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
98 reading beyond the passed in buffer length.
99
100 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
101
102 * tracepoint.c (symbol_list) <required>: Remove.
103
104 2015-08-06 Pedro Alves <palves@redhat.com>
105
106 * linux-low.c (handle_extended_wait): Set the fork child's suspend
107 count if stopping and suspending threads.
108 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
109 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
110 (linux_detach): Complete an ongoing step-over.
111 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
112 throughout.
113 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
114 (linux_wait_1): If passing a signal to the inferior after
115 finishing a step-over, unsuspend and re-resume all lwps. If we
116 see a single-step event but the thread should be continuing, don't
117 pass the trap to gdb.
118 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
119 internal_error instead of gdb_assert.
120 (enqueue_pending_signal): New function.
121 (check_ptrace_stopped_lwp_gone): Add debug output.
122 (start_step_over): Use internal_error instead of gdb_assert.
123 (complete_ongoing_step_over): New function.
124 (linux_resume_one_thread): Don't resume a suspended thread.
125 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
126 it stepping.
127
128 2015-08-06 Pedro Alves <palves@redhat.com>
129
130 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
131 (linux_thread_alive): Use lwp_is_marked_dead.
132 (extended_event_reported): Delete.
133 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
134 instead of extended_event_reported.
135 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
136 as well.
137 (lwp_is_marked_dead): New function.
138 (lwp_running): Use lwp_is_marked_dead.
139 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
140 comment.
141
142 2015-08-06 Pedro Alves <palves@redhat.com>
143
144 * linux-low.c (linux_wait_1): Move fork event output out of the
145 !report_to_gdb check. Pass event_child->waitstatus to
146 target_waitstatus_to_string instead of ourstatus.
147
148 2015-08-04 Yao Qi <yao.qi@linaro.org>
149
150 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
151 if current_thread is 32 bit.
152
153 2015-08-04 Yao Qi <yao.qi@linaro.org>
154
155 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
156 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
157 * server.c (extended_protocol): Remove "static".
158 * server.h (extended_protocol): Declare it.
159
160 2015-08-04 Yao Qi <yao.qi@linaro.org>
161
162 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
163 both aarch64 and aarch32.
164 (aarch64_set_pc): Likewise.
165
166 2015-08-04 Yao Qi <yao.qi@linaro.org>
167
168 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
169 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
170 arm-with-neon.xml to srv_xmlfiles.
171 * linux-aarch64-low.c: Include linux-aarch32-low.h.
172 (is_64bit_tdesc): New function.
173 (aarch64_linux_read_description): New function.
174 (aarch64_arch_setup): Call aarch64_linux_read_description.
175 (regs_info): Rename to regs_info_aarch64.
176 (aarch64_regs_info): Return right regs_info.
177 (initialize_low_arch): Call initialize_low_arch_aarch32.
178
179 2015-08-04 Yao Qi <yao.qi@linaro.org>
180
181 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
182 * linux-aarch32-low.c: New file.
183 * linux-aarch32-low.h: New file.
184 * linux-arm-low.c (arm_fill_gregset): Move it to
185 linux-aarch32-low.c.
186 (arm_store_gregset): Likewise.
187 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
188 (arm_store_vfpregset): Call arm_store_vfpregset_num.
189 (arm_arch_setup): Check if PTRACE_GETREGSET works.
190 (regs_info): Rename to regs_info_arm.
191 (arm_regs_info): Return regs_info_aarch32 if
192 have_ptrace_getregset is 1 and target description is
193 arm_with_neon or arm_with_vfpv3.
194 (initialize_low_arch): Don't call init_registers_arm_with_neon.
195 Call initialize_low_arch_aarch32 instead.
196
197 2015-08-04 Yao Qi <yao.qi@linaro.org>
198
199 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
200 * linux-low.c: ... here.
201 * linux-low.h (have_ptrace_getregset): Declare it.
202
203 2015-08-04 Pedro Alves <palves@redhat.com>
204
205 * thread-db.c (struct thread_db): Use new typedefs.
206 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
207 CHK calls.
208 (disable_thread_event_reporting): Cast result of dlsym to
209 destination function pointer type.
210 (thread_db_mourn): Use td_ta_delete_ftype.
211
212 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
213
214 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
215 arch variant.
216 (CDX_BREAKPOINT): Define for R2.
217 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
218 (the_low_target): Add comments.
219
220 2015-07-30 Yao Qi <yao.qi@linaro.org>
221
222 * linux-arm-low.c (arm_hwcap): Remove it.
223 (arm_read_description): New local variable arm_hwcap. Don't
224 set arm_hwcap to zero.
225
226 2015-07-30 Yao Qi <yao.qi@linaro.org>
227
228 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
229 Use regcache->tdesc instead.
230 (arm_store_wmmxregset): Likewise.
231 (arm_fill_vfpregset): Likewise.
232 (arm_store_vfpregset): Likewise.
233
234 2015-07-30 Yao Qi <yao.qi@linaro.org>
235
236 * linux-arm-low.c: Include arch/arm.h.
237 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
238 (arm_store_gregset): Likewise.
239
240 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
241
242 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
243 ptrace's 4th parameter.
244
245 2015-07-27 Yao Qi <yao.qi@linaro.org>
246
247 * configure.srv (case aarch64*-*-linux*): Don't set
248 srv_linux_usrregs.
249
250 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
251
252 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
253 sys/ptrace.h.
254 * linux-arm-low.c: Likewise.
255 * linux-cris-low.c: Likewise.
256 * linux-crisv32-low.c: Likewise.
257 * linux-low.c: Likewise.
258 * linux-m68k-low.c: Likewise.
259 * linux-mips-low.c: Likewise.
260 * linux-nios2-low.c: Likewise.
261 * linux-s390-low.c: Likewise.
262 * linux-sparc-low.c: Likewise.
263 * linux-tic6x-low.c: Likewise.
264 * linux-tile-low.c: Likewise.
265 * linux-x86-low.c: Likewise.
266
267 2015-07-24 Pedro Alves <palves@redhat.com>
268
269 * config.in: Regenerate.
270 * configure: Regenerate.
271
272 2015-07-24 Pedro Alves <palves@redhat.com>
273
274 * acinclude.m4: Include ../ptrace.m4.
275 * configure.ac: Call GDB_AC_PTRACE.
276 * config.in, configure: Regenerate.
277
278 2015-07-24 Yao Qi <yao.qi@linaro.org>
279
280 * linux-low.c (linux_create_inferior): Remove setting to
281 proc->priv->new_inferior.
282 (linux_attach): Likewise.
283 (linux_low_filter_event): Likewise.
284 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
285
286 2015-07-24 Yao Qi <yao.qi@linaro.org>
287
288 * linux-low.c (linux_arch_setup): New function.
289 (linux_low_filter_event): If proc->tdesc is NULL and
290 proc->attached is true, call the_low_target.arch_setup.
291 Otherwise, keep status pending, and return.
292 (linux_resume_one_lwp_throw): Don't call get_pc if
293 thread->while_stepping isn't NULL. Don't call
294 get_thread_regcache if proc->tdesc is NULL.
295 (need_step_over_p): Return 0 if proc->tdesc is NULL.
296 (linux_target_ops): Install arch_setup.
297 * server.c (start_inferior): Call the_target->arch_setup.
298 * target.h (struct target_ops) <arch_setup>: New field.
299 (target_arch_setup): New marco.
300 * lynx-low.c (lynx_target_ops): Update.
301 * nto-low.c (nto_target_ops): Update.
302 * spu-low.c (spu_target_ops): Update.
303 * win32-low.c (win32_target_ops): Update.
304
305 2015-07-24 Yao Qi <yao.qi@linaro.org>
306
307 * linux-low.c (linux_add_process): Don't set
308 proc->priv->new_inferior.
309 (linux_create_inferior): Set proc->priv->new_inferior to 1.
310 (linux_attach): Likewise.
311
312 2015-07-24 Yao Qi <yao.qi@linaro.org>
313
314 * server.c (start_inferior): Code refactor.
315
316 2015-07-24 Yao Qi <yao.qi@linaro.org>
317
318 * server.c (process_serial_event): Set general_thread.
319
320 2015-07-21 Yao Qi <yao.qi@linaro.org>
321
322 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
323 aarch64_linux_get_debug_reg_capacity.
324
325 2015-07-17 Yao Qi <yao.qi@linaro.org>
326
327 * Makefile.in (aarch64-linux-hw-point.o): New rule.
328 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
329 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
330 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
331 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
332 (AARCH64_HWP_ALIGNMENT): Likewise.
333 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
334 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
335 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
336 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
337 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
338 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
339 (struct aarch64_debug_reg_state): Likewise.
340 (struct arch_lwp_info): Likewise.
341 (aarch64_align_watchpoint): Likewise.
342 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
343 (aarch64_watchpoint_length): Likewise.
344 (aarch64_point_encode_ctrl_reg): Likewise
345 (aarch64_point_is_aligned): Likewise.
346 (aarch64_align_watchpoint): Likewise.
347 (aarch64_linux_set_debug_regs):
348 (aarch64_dr_state_insert_one_point): Likewise.
349 (aarch64_dr_state_remove_one_point): Likewise.
350 (aarch64_handle_breakpoint): Likewise.
351 (aarch64_handle_aligned_watchpoint): Likewise.
352 (aarch64_handle_unaligned_watchpoint): Likewise.
353 (aarch64_handle_watchpoint): Likewise.
354
355 2015-07-17 Yao Qi <yao.qi@linaro.org>
356
357 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
358 and don't aarch64_get_debug_reg_state. All callers update.
359 (aarch64_handle_aligned_watchpoint): Likewise.
360 (aarch64_handle_unaligned_watchpoint): Likewise.
361 (aarch64_handle_watchpoint): Likewise.
362 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
363 (aarch64_remove_point): Likewise.
364
365 2015-07-17 Yao Qi <yao.qi@linaro.org>
366
367 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
368 debug_printf.
369 (aarch64_handle_unaligned_watchpoint): Likewise.
370
371 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
372
373 Revert the previous 3 commits:
374 Move gdb_regex* to common/
375 Move linux_find_memory_regions_full & co.
376 gdbserver build-id attribute generator
377
378 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
379 Jan Kratochvil <jan.kratochvil@redhat.com>
380
381 gdbserver build-id attribute generator.
382 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
383 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
384 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
385 (find_phdr): New.
386 (get_dynamic): Use find_pdhr to traverse program headers.
387 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
388 (compare_mapping_entry_range, struct find_memory_region_callback_data)
389 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
390 (get_hex_build_id): New.
391 (linux_qxfer_libraries_svr4): Add optional build-id attribute
392 to reply XML document.
393
394 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
395 Jan Kratochvil <jan.kratochvil@redhat.com>
396
397 * target.c: Include target/target-utils.h and fcntl.h.
398 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
399 (target_fileio_read_stralloc): New functions.
400
401 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
402
403 * Makefile.in (OBS): Add gdb_regex.o.
404 (gdb_regex.o): New.
405 * config.in: Rebuilt.
406 * configure: Rebuilt.
407
408 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
409 Jan Kratochvil <jan.kratochvil@redhat.com>
410
411 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
412 * Makefile.in (OBS): Add target-utils.o.
413 (linux-maps.o, target-utils.o): New.
414 * configure.srv (srv_linux_obj): Add linux-maps.o.
415
416 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
417
418 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
419 function, return 1.
420 (the_low_target): Install it.
421
422 2015-07-14 Pedro Alves <palves@redhat.com>
423
424 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
425 Instead, ignore ECHILD, and throw an error for other errnos.
426
427 2015-07-10 Pedro Alves <palves@redhat.com>
428
429 * event-loop.c (struct callback_event) <data>: Change type to
430 gdb_client_data instance instead of gdb_client_data pointer.
431 (append_callback_event): Adjust.
432
433 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
434
435 * linux-aarch64-low.c: Add comments for each linux_target_ops
436 method. Remove comments already covered in target_ops and
437 linux_target_ops definitions.
438 (the_low_target): Add comments for each unimplemented method.
439
440 2015-07-09 Yao Qi <yao.qi@linaro.org>
441
442 * linux-aarch64-low.c (aarch64_regmap): Remove.
443 (aarch64_usrregs_info): Remove.
444 (regs_info): Set field usrregs to NULL.
445
446 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
447
448 * linux-low.c: Include "rsp-low.h"
449 (linux_low_encode_pt_config, linux_low_encode_raw): New.
450 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
451 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
452 (handle_btrace_enable_pt): New.
453 (handle_btrace_general_set): Support "pt".
454 (handle_btrace_conf_general_set): Support "pt:size".
455
456 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
457
458 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
459 Z_PACKET_SW_BP.
460
461 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
462
463 * linux-aarch64-low.c: Remove comment about endianness.
464 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
465 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
466 memcmp.
467
468 2015-06-24 Gary Benson <gbenson@redhat.com>
469
470 * linux-i386-ipa.c (stdint.h): Do not include.
471 * lynx-i386-low.c (stdint.h): Likewise.
472 * lynx-ppc-low.c (stdint.h): Likewise.
473 * mem-break.c (stdint.h): Likewise.
474 * thread-db.c (stdint.h): Likewise.
475 * tracepoint.c (stdint.h): Likewise.
476 * win32-low.c (stdint.h): Likewise.
477
478 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
479
480 * server.c (write_qxfer_response): Update call to
481 remote_escape_output.
482
483 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
484 Jan Kratochvil <jan.kratochvil@redhat.com>
485
486 Merge multiple hex conversions.
487 * gdbreplay.c (tohex): Rename to 'fromhex'.
488 (logchar): Use fromhex.
489
490 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
491
492 * server.c (handle_qxfer_libraries): Set `version' attribute for
493 <library-list>.
494
495 2015-06-10 Gary Benson <gbenson@redhat.com>
496
497 * target.h (struct target_ops) <multifs_open>: New field.
498 <multifs_unlink>: Likewise.
499 <multifs_readlink>: Likewise.
500 * linux-low.c (nat/linux-namespaces.h): New include.
501 (linux_target_ops): Initialize the_target->multifs_open,
502 the_target->multifs_unlink and the_target->multifs_readlink.
503 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
504 * hostio.c (hostio_fs_pid): New static variable.
505 (hostio_handle_new_gdb_connection): New function.
506 (handle_setfs): Likewise.
507 (handle_open): Use the_target->multifs_open as appropriate.
508 (handle_unlink): Use the_target->multifs_unlink as appropriate.
509 (handle_readlink): Use the_target->multifs_readlink as
510 appropriate.
511 (handle_vFile): Handle vFile:setfs packets.
512 * server.c (handle_query): Call hostio_handle_new_gdb_connection
513 after target_handle_new_gdb_connection.
514
515 2015-06-10 Gary Benson <gbenson@redhat.com>
516
517 * configure.ac (AC_CHECK_FUNCS): Add setns.
518 * config.in: Regenerate.
519 * configure: Likewise.
520 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
521 (linux-namespaces.o): New rule.
522 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
523
524 2015-06-09 Gary Benson <gbenson@redhat.com>
525
526 * hostio.c (handle_open): Process mode argument with
527 fileio_to_host_mode.
528
529 2015-06-01 Yao Qi <yao.qi@linaro.org>
530
531 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
532 * linux-x86-low.c: Likewise.
533
534 2015-05-28 Don Breazeal <donb@codesourcery.com>
535
536 * linux-low.c (handle_extended_wait): Initialize
537 thread_info.last_resume_kind for new fork children.
538
539 2015-05-15 Pedro Alves <palves@redhat.com>
540
541 * target.h (target_handle_new_gdb_connection): Rewrite using if
542 wrapped in do/while.
543
544 2015-05-14 Joel Brobecker <brobecker@adacore.com>
545
546 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
547 * configure, config.in: Regenerate.
548 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
549 Declare typedef.
550
551 2015-05-12 Don Breazeal <donb@codesourcery.com>
552
553 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
554 PTRACE_EVENT_VFORK_DONE.
555 (linux_low_ptrace_options, extended_event_reported): Add vfork
556 events.
557 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
558 and "vforkdone" for RSP 'T' Stop Reply Packet.
559 * server.h (report_vfork_events): Declare
560 global variable.
561
562 2015-05-12 Don Breazeal <donb@codesourcery.com>
563
564 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
565 (the_low_target) <new_fork>: Initialize new member.
566 * linux-arm-low.c (arm_new_fork): New function.
567 (the_low_target) <new_fork>: Initialize new member.
568 * linux-low.c (handle_extended_wait): Call new target function
569 new_fork.
570 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
571 * linux-mips-low.c (mips_add_watchpoint): New function
572 extracted from mips_insert_point.
573 (the_low_target) <new_fork>: Initialize new member.
574 (mips_linux_new_fork): New function.
575 (mips_insert_point): Call mips_add_watchpoint.
576 * linux-x86-low.c (x86_linux_new_fork): New function.
577 (the_low_target) <new_fork>: Initialize new member.
578
579 2015-05-12 Don Breazeal <donb@codesourcery.com>
580
581 * linux-low.c (handle_extended_wait): Implement return value,
582 rename argument 'event_child' to 'event_lwp', handle
583 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
584 (linux_low_ptrace_options): New function.
585 (linux_low_filter_event): Call linux_low_ptrace_options,
586 use different argument fo linux_enable_event_reporting,
587 use return value from handle_extended_wait.
588 (extended_event_reported): New function.
589 (linux_wait_1): Call extended_event_reported and set
590 status to report fork events.
591 (linux_write_memory): Add pid to debug message.
592 (reset_lwp_ptrace_options_callback): New function.
593 (linux_handle_new_gdb_connection): New function.
594 (linux_target_ops): Initialize new structure member.
595 * linux-low.h (struct lwp_info) <waitstatus>: New member.
596 * lynx-low.c: Initialize new structure member.
597 * remote-utils.c (prepare_resume_reply): Implement stop reason
598 "fork" for "T" stop message.
599 * server.c (handle_query): Call handle_new_gdb_connection.
600 * server.h (report_fork_events): Declare global flag.
601 * target.h (struct target_ops) <handle_new_gdb_connection>:
602 New member.
603 (target_handle_new_gdb_connection): New macro.
604 * win32-low.c: Initialize new structure member.
605
606 2015-05-12 Don Breazeal <donb@codesourcery.com>
607
608 * mem-break.c (APPEND_TO_LIST): Define macro.
609 (clone_agent_expr): New function.
610 (clone_one_breakpoint): New function.
611 (clone_all_breakpoints): New function.
612 * mem-break.h: Declare new functions.
613
614 2015-05-12 Don Breazeal <donb@codesourcery.com>
615
616 * linux-low.c (linux_supports_fork_events): New function.
617 (linux_supports_vfork_events): New function.
618 (linux_target_ops): Initialize new structure members.
619 (initialize_low): Call linux_check_ptrace_features.
620 * lynx-low.c (lynx_target_ops): Initialize new structure
621 members.
622 * server.c (report_fork_events, report_vfork_events):
623 New global flags.
624 (handle_query): Add new features to qSupported packet and
625 response.
626 (captured_main): Initialize new global variables.
627 * target.h (struct target_ops) <supports_fork_events>:
628 New member.
629 <supports_vfork_events>: New member.
630 (target_supports_fork_events): New macro.
631 (target_supports_vfork_events): New macro.
632 * win32-low.c (win32_target_ops): Initialize new structure
633 members.
634
635 2015-05-12 Gary Benson <gbenson@redhat.com>
636
637 * server.c (handle_qxfer_exec_file): Use current process
638 if annex is empty.
639
640 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
641
642 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
643 Remove HAVE_PTRACE_GETREGS conditionals.
644 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
645 instead of PTRACE_GETREGS and PTRACE_SETREGS.
646
647 2015-05-08 Yao Qi <yao.qi@linaro.org>
648
649 * linux-low.c (linux_supports_conditional_breakpoints): New
650 function.
651 (linux_target_ops): Install new target method.
652 * lynx-low.c (lynx_target_ops): Install NULL hook for
653 supports_conditional_breakpoints.
654 * nto-low.c (nto_target_ops): Likewise.
655 * spu-low.c (spu_target_ops): Likewise.
656 * win32-low.c (win32_target_ops): Likewise.
657 * server.c (handle_query): Check
658 target_supports_conditional_breakpoints.
659 * target.h (struct target_ops) <supports_conditional_breakpoints>:
660 New field.
661 (target_supports_conditional_breakpoints): New macro.
662
663 2015-05-06 Pedro Alves <palves@redhat.com>
664
665 PR server/18081
666 * server.c (start_inferior): If the process exits, mourn it.
667
668 2015-04-21 Gary Benson <gbenson@redhat.com>
669
670 * hostio.c (fileio_open_flags_to_host): Factored out to
671 fileio_to_host_openflags in common/fileio.c. Single use
672 updated.
673
674 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
675
676 * linux-xtensa-low.c (xtensa_fill_gregset)
677 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
678 XCHAL_HAVE_LOOP.
679
680 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
681
682 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
683 (regs_info): Replace usrregs pointer with NULL.
684
685 2015-04-17 Gary Benson <gbenson@redhat.com>
686
687 * target.h (struct target_ops) <pid_to_exec_file>: New field.
688 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
689 * server.c (handle_qxfer_exec_file): New function.
690 (qxfer_packets): Add exec-file entry.
691 (handle_query): Report qXfer:exec-file:read as supported packet.
692
693 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
694
695 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
696
697 2015-04-09 Gary Benson <gbenson@redhat.com>
698
699 * hostio-errno.c (errno_to_fileio_error): Remove function.
700 Update caller to use remote_fileio_to_fio_error.
701
702 2015-04-09 Yao Qi <yao.qi@linaro.org>
703
704 * linux-low.c (linux_insert_point): Call
705 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
706 (linux_remove_point): Call remove_memory_breakpoint if type is
707 raw_bkpt_type_sw.
708 * linux-x86-low.c (x86_insert_point): Don't call
709 insert_memory_breakpoint.
710 (x86_remove_point): Don't call remove_memory_breakpoint.
711
712 2015-04-01 Pedro Alves <palves@redhat.com>
713 Cleber Rosa <crosa@redhat.com>
714
715 * server.c (gdbserver_usage): Reorganize and extend the usage
716 message.
717
718 2015-03-24 Pedro Alves <palves@redhat.com>
719
720 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
721 output. Also dump TRAP_TRACE.
722 (linux_low_filter_event): In debug output, distinguish a
723 resume_stop SIGSTOP from a delayed SIGSTOP.
724
725 2015-03-24 Gary Benson <gbenson@redhat.com>
726
727 * linux-x86-low.c (x86_linux_new_thread): Moved to
728 nat/x86-linux.c.
729 (x86_linux_prepare_to_resume): Likewise.
730
731 2015-03-24 Gary Benson <gbenson@redhat.com>
732
733 * Makefile.in (x86-linux-dregs.o): New rule.
734 * configure.srv: Add x86-linux-dregs.o to relevant targets.
735 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
736 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
737 (x86_linux_dr_get): Likewise.
738 (x86_linux_dr_set): Likewise.
739 (update_debug_registers_callback): Likewise.
740 (x86_linux_dr_set_addr): Likewise.
741 (x86_linux_dr_get_addr): Likewise.
742 (x86_linux_dr_set_control): Likewise.
743 (x86_linux_dr_get_control): Likewise.
744 (x86_linux_dr_get_status): Likewise.
745 (x86_linux_update_debug_registers): Likewise.
746
747 2015-03-24 Gary Benson <gbenson@redhat.com>
748
749 * linux-x86-low.c (x86_linux_update_debug_registers):
750 New function, factored out from...
751 (x86_linux_prepare_to_resume): ...this.
752
753 2015-03-24 Gary Benson <gbenson@redhat.com>
754
755 * linux-x86-low.c (x86_linux_dr_get): Update comments.
756 (x86_linux_dr_set): Likewise.
757 (update_debug_registers_callback): Likewise.
758 (x86_linux_dr_set_addr): Likewise.
759 (x86_linux_dr_get_addr): Likewise.
760 (x86_linux_dr_set_control): Likewise.
761 (x86_linux_dr_get_control): Likewise.
762 (x86_linux_dr_get_status): Likewise.
763 (x86_linux_prepare_to_resume): Likewise.
764
765 2015-03-24 Gary Benson <gbenson@redhat.com>
766
767 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
768 Use perror_with_name. Pass string through gettext.
769 (x86_linux_dr_set): Likewise.
770
771 2015-03-24 Gary Benson <gbenson@redhat.com>
772
773 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
774 (x86_linux_dr_set_addr): ...this.
775 (x86_dr_low_get_addr): Rename to...
776 (x86_linux_dr_get_addr): ...this.
777 (x86_dr_low_set_control): Rename to...
778 (x86_linux_dr_set_control): ...this.
779 (x86_dr_low_get_control): Rename to...
780 (x86_linux_dr_get_control): ...this.
781 (x86_dr_low_get_status): Rename to...
782 (x86_linux_dr_get_status): ...this.
783 (x86_dr_low): Update with new function names.
784
785 2015-03-24 Gary Benson <gbenson@redhat.com>
786
787 * Makefile.in (x86-linux.o): New rule.
788 * configure.srv: Add x86-linux.o to relevant targets.
789 * linux-low.c (lwp_set_arch_private_info): New function.
790 (lwp_arch_private_info): Likewise.
791 * linux-x86-low.c: Include nat/x86-linux.h.
792 (arch_lwp_info): Removed structure.
793 (update_debug_registers_callback):
794 Use lwp_set_debug_registers_changed.
795 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
796 and lwp_set_debug_registers_changed.
797 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
798
799 2015-03-24 Gary Benson <gbenson@redhat.com>
800
801 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
802 * linux-arm-low.c (arm_new_thread): Likewise.
803 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
804 * linux-mips-low.c (mips_linux_new_thread): Likewise.
805 * linux-x86-low.c (x86_linux_new_thread): Likewise.
806 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
807
808 2015-03-24 Gary Benson <gbenson@redhat.com>
809
810 * linux-low.c (ptid_of_lwp): New function.
811 (lwp_is_stopped): Likewise.
812 (lwp_stop_reason): Likewise.
813 * linux-x86-low.c (update_debug_registers_callback):
814 Use lwp_is_stopped.
815 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
816 lwp_stop_reason.
817
818 2015-03-24 Gary Benson <gbenson@redhat.com>
819
820 * linux-low.h (linux_stop_lwp): Remove declaration.
821
822 2015-03-24 Gary Benson <gbenson@redhat.com>
823
824 * linux-low.h: Include nat/linux-nat.h.
825 * linux-low.c (iterate_over_lwps_args): New structure.
826 (iterate_over_lwps_filter): New function.
827 (iterate_over_lwps): Likewise.
828 * linux-x86-low.c (update_debug_registers_callback):
829 Update signature to what iterate_over_lwps expects.
830 Remove PID check that iterate_over_lwps now performs.
831 (x86_dr_low_set_addr): Use iterate_over_lwps.
832 (x86_dr_low_set_control): Likewise.
833
834 2015-03-24 Gary Benson <gbenson@redhat.com>
835
836 * linux-x86-low.c (x86_debug_reg_state): New function.
837 (x86_linux_prepare_to_resume): Use the above.
838
839 2015-03-24 Gary Benson <gbenson@redhat.com>
840
841 * linux-low.c (current_lwp_ptid): New function.
842 * linux-x86-low.c: Include nat/linux-nat.h.
843 (x86_dr_low_get_addr): Use current_lwp_ptid.
844 (x86_dr_low_get_control): Likewise.
845 (x86_dr_low_get_status): Likewise.
846
847 2015-03-20 Pedro Alves <palves@redhat.com>
848
849 * tracepoint.c (cmd_qtstatus): Make "str" const.
850
851 2015-03-20 Pedro Alves <palves@redhat.com>
852
853 * server.c (handle_general_set): Make "req_str" const.
854
855 2015-03-19 Pedro Alves <palves@redhat.com>
856
857 * linux-low.c (linux_resume_one_lwp): Rename to ...
858 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
859 instead call perror_with_name.
860 (check_ptrace_stopped_lwp_gone): New function.
861 (linux_resume_one_lwp): Reimplement as wrapper around
862 linux_resume_one_lwp_throw that swallows errors if the LWP is
863 gone.
864
865 2015-03-19 Pedro Alves <palves@redhat.com>
866
867 * linux-low.c (count_events_callback, select_event_lwp_callback):
868 No longer check whether the thread has resume_stop as last resume
869 kind.
870
871 2015-03-19 Pedro Alves <palves@redhat.com>
872
873 * linux-low.c (count_events_callback, select_event_lwp_callback):
874 Use the lwp's status_pending_p field, not the thread's.
875
876 2015-03-19 Pedro Alves <palves@redhat.com>
877
878 * linux-low.c (select_event_lwp_callback): Update comments to
879 no longer mention SIGTRAP.
880
881 2015-03-18 Gary Benson <gbenson@redhat.com>
882
883 * server.c (handle_query): Do not report vFile:fstat as supported.
884
885 2015-03-11 Gary Benson <gbenson@redhat.com>
886
887 * hostio.c (sys/types.h): New include.
888 (sys/stat.h): Likewise.
889 (common-remote-fileio.h): Likewise.
890 (handle_fstat): New function.
891 (handle_vFile): Handle vFile:fstat packets.
892
893 2015-03-11 Gary Benson <gbenson@redhat.com>
894
895 * configure.ac (AC_CHECK_MEMBERS): Add checks for
896 struct stat.st_blocks and struct stat.st_blksize.
897 * configure: Regenerate.
898 * config.in: Likewise.
899 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
900 (OBS): Add common-remote-fileio.o.
901 (common-remote-fileio.o): New rule.
902
903 2015-03-09 Pedro Alves <palves@redhat.com>
904
905 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
906 'struct sockaddr' pointer in 'accept' call.
907
908 2015-03-09 Pedro Alves <palves@redhat.com>
909
910 Revert:
911 2015-03-07 Pedro Alves <palves@redhat.com>
912 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
913 or <winsock2.h> here. Instead include "gdb_socket.h".
914 (remote_open): Use union gdb_sockaddr_u.
915 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
916 or <winsock2.h> here. Instead include "gdb_socket.h".
917 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
918 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
919 or <sys/un.h>.
920 (init_named_socket, gdb_agent_helper_thread): Use union
921 gdb_sockaddr_u.
922
923 2015-03-07 Pedro Alves <palves@redhat.com>
924
925 * configure.ac (build_warnings): Move
926 -Wdeclaration-after-statement to the C-specific set.
927 * configure: Regenerate.
928
929 2015-03-07 Pedro Alves <palves@redhat.com>
930
931 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
932 or <winsock2.h> here. Instead include "gdb_socket.h".
933 (remote_open): Use union gdb_sockaddr_u.
934 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
935 or <winsock2.h> here. Instead include "gdb_socket.h".
936 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
937 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
938 or <sys/un.h>.
939 (init_named_socket, gdb_agent_helper_thread): Use union
940 gdb_sockaddr_u.
941
942 2015-03-07 Pedro Alves <palves@redhat.com>
943
944 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
945 instead.
946
947 2015-03-06 Yao Qi <yao.qi@linaro.org>
948
949 * linux-aarch64-low.c (aarch64_insert_point): Use
950 show_debug_regs as a boolean.
951 (aarch64_remove_point): Likewise.
952
953 2015-03-05 Pedro Alves <palves@redhat.com>
954
955 * lynx-low.c (lynx_target_ops): Install NULL hooks for
956 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
957 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
958 * nto-low.c (nto_target_ops): Likewise.
959 * spu-low.c (spu_target_ops): Likewise.
960 * win32-low.c (win32_target_ops): Likewise.
961
962 2015-03-04 Pedro Alves <palves@redhat.com>
963
964 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
965 Decide whether a breakpoint triggered based on the SIGTRAP's
966 siginfo.si_code.
967 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
968 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
969 (linux_low_filter_event): Check for breakpoints before checking
970 watchpoints.
971 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
972 siginfo.si_code.
973 (linux_stopped_by_sw_breakpoint)
974 (linux_supports_stopped_by_sw_breakpoint)
975 (linux_stopped_by_hw_breakpoint)
976 (linux_supports_stopped_by_hw_breakpoint): New functions.
977 (linux_target_ops): Install new target methods.
978
979 2015-03-04 Pedro Alves <palves@redhat.com>
980
981 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
982 * server.c (swbreak_feature, hwbreak_feature): New globals.
983 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
984 (captured_main): Clear swbreak_feature and hwbreak_feature.
985 * server.h (swbreak_feature, hwbreak_feature): Declare.
986 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
987 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
988 supports_stopped_by_hw_breakpoint>: New fields.
989 (target_supports_stopped_by_sw_breakpoint)
990 (target_stopped_by_sw_breakpoint)
991 (target_supports_stopped_by_hw_breakpoint)
992 (target_stopped_by_hw_breakpoint): Declare.
993
994 2015-03-04 Pedro Alves <palves@redhat.com>
995
996 enum lwp_stop_reason -> enum target_stop_reason
997 * linux-low.c (check_stopped_by_breakpoint): Adjust.
998 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
999 (linux_wait_1, stuck_in_jump_pad_callback)
1000 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1001 (linux_stopped_by_watchpoint):
1002 * linux-low.h (enum lwp_stop_reason): Delete.
1003 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1004 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1005
1006 2015-03-04 Yao Qi <yao.qi@linaro.org>
1007
1008 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1009
1010 2015-03-03 Gary Benson <gbenson@redhat.com>
1011
1012 * hostio.c (handle_vFile): Fix prefix lengths.
1013
1014 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1015
1016 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1017 ptr_bits.
1018
1019 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1020
1021 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1022 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1023 (clean): Add "rm -f" for above C files.
1024 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1025 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1026 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1027 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1028 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1029 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1030 (init_registers_s390x_vx_linux64)
1031 (init_registers_s390x_tevx_linux64)
1032 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1033 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1034 declarations.
1035 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1036 (s390_store_vxrs_high): New functions.
1037 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1038 NT_S390_VXRS_HIGH.
1039 (s390_arch_setup): Add logic for selecting one of the new target
1040 descriptions. Activate the new vector regsets if applicable.
1041 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1042 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1043 and init_registers_s390x_tevx_linux64.
1044
1045 2015-03-01 Pedro Alves <palves@redhat.com>
1046
1047 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1048 parameter.
1049
1050 2015-02-27 Pedro Alves <palves@redhat.com>
1051
1052 * linux-x86-low.c (u_debugreg_offset): New function.
1053 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1054
1055 2015-02-27 Pedro Alves <palves@redhat.com>
1056
1057 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1058 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1059 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1060 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1061 (ps_lsetfpregs, ps_getpid)
1062 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1063 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1064 (ps_lsetxregs, ps_plog): Declare.
1065
1066 2015-02-27 Pedro Alves <palves@redhat.com>
1067
1068 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1069 IP_AGENT_EXPORT_FUNC.
1070 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1071 IP_AGENT_EXPORT_FUNC.
1072 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1073 (IP_AGENT_EXPORT): Delete.
1074 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1075 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1076 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1077 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1078 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1079 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1080 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1081 (traceframe_read_count, traceframe_write_count)
1082 (traceframes_created, trace_state_variables, get_raw_reg)
1083 (get_trace_state_variable_value, set_trace_state_variable_value)
1084 (ust_loaded, helper_thread_id, cmd_buf): Use
1085 IPA_SYM_EXPORTED_NAME.
1086 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1087 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1088 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1089 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1090 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1091 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1092 EXTERN_C_PUSH/EXTERN_C_POP.
1093 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1094 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1095 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1096 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1097 (traceframe_write_count, traceframe_read_count)
1098 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1099 (about_to_request_buffer_space, get_trace_state_variable_value)
1100 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1101 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1102 EXTERN_C_PUSH/EXTERN_C_POP.
1103 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1104 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1105 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1106 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1107 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1108 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1109 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1110 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1111 Define.
1112 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1113 (IP_AGENT_EXPORT_VAR_DECL): Define.
1114 (tracing): Declare.
1115 (gdb_agent_get_raw_reg): Declare.
1116
1117 2015-02-27 Tom Tromey <tromey@redhat.com>
1118 Pedro Alves <palves@redhat.com>
1119
1120 Rename symbols whose names are reserved C++ keywords throughout.
1121
1122 2015-02-27 Pedro Alves <palves@redhat.com>
1123
1124 * Makefile.in (COMPILER): New, get it from autoconf.
1125 (CXX): Get from autoconf instead.
1126 (COMPILE.pre): Use COMPILER.
1127 (CC-LD): Rename to ...
1128 (CC_LD): ... this. Use COMPILER.
1129 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1130 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1131 * acinclude.m4: Include build-with-cxx.m4.
1132 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1133 Disable -Werror by default if building in C++ mode.
1134 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1135 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1136 the C++ compiler. Save/restore CXXFLAGS too.
1137 * configure: Regenerate.
1138
1139 2015-02-27 Pedro Alves <palves@redhat.com>
1140
1141 * acinclude.m4: Include libiberty.m4.
1142 * configure.ac: Call libiberty_INIT.
1143 * config.in, configure: Regenerate.
1144
1145 2015-02-26 Pedro Alves <palves@redhat.com>
1146
1147 * linux-low.c (linux_wait_1): When incrementing the PC past a
1148 program breakpoint always use the_low_target.breakpoint_len as
1149 increment, rather than the maximum between that and
1150 the_low_target.decr_pc_after_break.
1151
1152 2015-02-23 Pedro Alves <palves@redhat.com>
1153
1154 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1155 thread was doing a step-over; always adjust the PC if
1156 we stepped over a permanent breakpoint.
1157 (linux_wait_1): If we stepped over breakpoint that was on top of a
1158 permanent breakpoint, manually advance the PC past it.
1159
1160 2015-02-23 Pedro Alves <palves@redhat.com>
1161
1162 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1163 modes.
1164 (x86_fill_gregset, x86_store_gregset): Use it when handling
1165 $orig_eax.
1166
1167 2015-02-20 Pedro Alves <palves@redhat.com>
1168
1169 * thread-db.c: Include "nat/linux-procfs.h".
1170 (thread_db_init): Skip listing new threads if the kernel supports
1171 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1172
1173 2015-02-20 Pedro Alves <palves@redhat.com>
1174
1175 * linux-low.c (status_pending_p_callback): Use ptid_match.
1176
1177 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1178
1179 PR breakpoints/16812
1180 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1181 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1182 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1183
1184 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1185
1186 PR breakpoints/15956
1187 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1188
1189 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1190
1191 * linux-low.c (linux_low_btrace_conf): Print size.
1192 * server.c (handle_btrace_conf_general_set): New.
1193 (hanle_general_set): Call handle_btrace_conf_general_set.
1194 (handle_query): Report Qbtrace-conf:bts:size as supported.
1195
1196 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1197
1198 * linux-low.c (linux_low_enable_btrace): Update parameters.
1199 (linux_low_btrace_conf): New.
1200 (linux_target_ops)<to_btrace_conf>: Initialize.
1201 * server.c (current_btrace_conf): New.
1202 (handle_btrace_enable): Rename to ...
1203 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1204 to target_enable_btrace. Update comment. Update users.
1205 (handle_qxfer_btrace_conf): New.
1206 (qxfer_packets): Add btrace-conf entry.
1207 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1208 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1209 (target_ops)<read_btrace_conf>: New.
1210 (target_enable_btrace): Update parameters.
1211 (target_read_btrace_conf): New.
1212
1213 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1214
1215 * server.c (handle_btrace_general_set): Remove call to
1216 target_supports_btrace.
1217 (supported_btrace_packets): New.
1218 (handle_query): Call supported_btrace_packets.
1219 * target.h: include btrace-common.h.
1220 (btrace_target_info): Removed.
1221 (supports_btrace, target_supports_btrace): Update parameters.
1222
1223 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1224
1225 * Makefile.in (SFILES): Add common/btrace-common.c.
1226 (OBS): Add common/btrace-common.o.
1227 (btrace-common.o): Add build rules.
1228 * linux-low: Include btrace-common.h.
1229 (linux_low_read_btrace): Use struct btrace_data. Call
1230 btrace_data_init and btrace_data_fini.
1231
1232 2015-02-06 Pedro Alves <palves@redhat.com>
1233
1234 * thread-db.c (find_new_threads_callback): Add debug output.
1235
1236 2015-02-04 Pedro Alves <palves@redhat.com>
1237
1238 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1239 (resume_stopped_resumed_lwps): New function.
1240 (linux_wait_for_event_filtered): Use it.
1241
1242 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1243
1244 * Makefile.in (SFILES): Add linux-personality.c.
1245 (linux-personality.o): New rule.
1246 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1247 list of objects to be built.
1248 * linux-low.c: Include nat/linux-personality.h.
1249 (linux_create_inferior): Remove code to disable address space
1250 randomization (moved to ../nat/linux-personality.c). Create
1251 cleanup to disable address space randomization.
1252
1253 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1254
1255 * Makefile.in (posix-strerror.o): New rule.
1256 (mingw-strerror.o): Likewise.
1257 * configure: Regenerated.
1258 * configure.ac: Source file ../common/common.host. Initialize new
1259 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1260
1261 2015-01-14 Yao Qi <yao@codesourcery.com>
1262
1263 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1264 (ppc-linux.o): New rule.
1265 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1266 * configure.ac: AC_CHECK_FUNCS(getauxval).
1267 * config.in: Re-generated.
1268 * configure: Re-generated.
1269 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1270 ppc64_64bit_inferior_p
1271
1272 2015-01-14 Yao Qi <yao@codesourcery.com>
1273
1274 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1275 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1276 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1277 (PT_ORIG_R3, PT_TRAP): Likewise.
1278 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1280 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1281
1282 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1283
1284 * i387-fp.c (i387_cache_to_xsave): In look over
1285 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1286 zmmh_low_space field by use of zmmh_high_space.
1287
1288 2015-01-09 Pedro Alves <palves@redhat.com>
1289
1290 * linux-low.c (step_over_bkpt): Move higher up in the file.
1291 (handle_extended_wait): Don't store the stop_pc here.
1292 (get_stop_pc): Adjust comments and rename to ...
1293 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1294 stopped for a software breakpoint or hardware breakpoint.
1295 (thread_still_has_status_pending_p): New function.
1296 (status_pending_p_callback): Use
1297 thread_still_has_status_pending_p. If the event is no longer
1298 interesting, resume the LWP.
1299 (handle_tracepoints): Add assert.
1300 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1301 (wstatus_maybe_breakpoint): New function.
1302 (cancel_breakpoint): Delete function.
1303 (check_stopped_by_watchpoint): New function, factored out from
1304 linux_low_filter_event.
1305 (lp_status_maybe_breakpoint): Delete function.
1306 (linux_low_filter_event): Remove filter_ptid argument.
1307 Leave thread group exits pending here. Store the LWP's stop PC.
1308 Always leave events pending.
1309 (linux_wait_for_event_filtered): Pull all events out of the
1310 kernel, and leave them all pending.
1311 (count_events_callback, select_event_lwp_callback): Consider all
1312 events.
1313 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1314 (select_event_lwp): Only give preference to the stepping LWP in
1315 all-stop mode. Adjust comments.
1316 (ignore_event): New function.
1317 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1318 references to cancel_breakpoints. Adjust to renames. Also give
1319 equal priority to all LWPs that have had events in non-stop mode.
1320 If reporting a software breakpoint event, unadjust the LWP's PC.
1321 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1322 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1323 Adjust.
1324 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1325 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1326 (linux_stopped_by_watchpoint): Adjust.
1327 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1328 * linux-low.h (enum lwp_stop_reason): New.
1329 (struct lwp_info) <stop_pc>: Adjust comment.
1330 <stopped_by_watchpoint>: Delete field.
1331 <stop_reason>: New field.
1332 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1333 * mem-break.c (software_breakpoint_inserted_here)
1334 (hardware_breakpoint_inserted_here): New function.
1335 * mem-break.h (software_breakpoint_inserted_here)
1336 (hardware_breakpoint_inserted_here): Declare.
1337 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1338 (cancel_breakpoints): Delete.
1339 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1340 (upload_fast_traceframes): Remove references to
1341 cancel_breakpoints.
1342
1343 2015-01-09 Pedro Alves <palves@redhat.com>
1344
1345 * thread-db.c (find_new_threads_callback): Ignore thread if the
1346 kernel thread ID is -1.
1347
1348 2015-01-09 Pedro Alves <palves@redhat.com>
1349
1350 * linux-low.c (linux_attach_fail_reason_string): Move to
1351 nat/linux-ptrace.c, and rename.
1352 (linux_attach_lwp): Update comment.
1353 (attach_proc_task_lwp_callback): New function.
1354 (linux_attach): Adjust to rename and use
1355 linux_proc_attach_tgid_threads.
1356 (linux_attach_fail_reason_string): Delete declaration.
1357
1358 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1359
1360 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1361 * server.c (gdbserver_version): Likewise.
1362
1363 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1364
1365 * remote-utils.c: Include ctype.h.
1366 (input_interrupt): Explicitly handle the case when the char
1367 received is the NUL byte. Improve the printing of non-ASCII
1368 characters.
1369
1370 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1371
1372 * linux-low.c (linux_low_filter_event): Update call to
1373 linux_enable_event_reporting following the addition of
1374 a new parameter to that function.
1375
1376 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1377
1378 PR server/17457
1379 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1380 (AARCH64_FPCR_REGNO): Likewise.
1381 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1382 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1383 (aarch64_store_fpregset): Likewise.
1384
1385 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1386
1387 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1388 Remove FIXME comment about assumption about N.
1389
1390 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1391
1392 * configure.ac: If large-file support is disabled in GDBserver,
1393 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1394 * configure: Regenerate.
1395
1396 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1397
1398 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1399 warning upon ENODATA from ptrace.
1400 * linux-s390-low.c (s390_store_tdb): New.
1401 (s390_regsets): Add regset for NT_S390_TDB.
1402
1403 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1404
1405 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1406 without a fill_function.
1407 * linux-s390-low.c (s390_fill_last_break): Remove.
1408 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1409 (s390_arch_setup): Use regset's size instead of fill_function for
1410 loop end condition.
1411
1412 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1413
1414 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1415 the regset's store function when ptrace returned an error.
1416 * regcache.c (get_thread_regcache): Invalidate register cache
1417 before fetching inferior's registers.
1418
1419 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1420
1421 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1422 while-loop as for-loop.
1423 (regsets_store_inferior_registers): Likewise.
1424
1425 2014-11-28 Yao Qi <yao@codesourcery.com>
1426
1427 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1428 * config.in, configure: Re-generate.
1429 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1430 is defined.
1431
1432 2014-11-21 Yao Qi <yao@codesourcery.com>
1433
1434 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1435 (AC_CHECK_HEADERS): Remove malloc.h.
1436 * configure: Re-generated.
1437 * config.in: Re-generated.
1438 * server.h: Don't include alloca.h and malloc.h.
1439 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1440 Don't include malloc.h.
1441
1442 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1443
1444 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1445 corresponding ERRNO check in same block.
1446
1447 2014-11-12 Pedro Alves <palves@redhat.com>
1448
1449 * server.c (cont_thread): Update comment.
1450 (start_inferior, attach_inferior): No longer clear cont_thread.
1451 (handle_v_cont): No longer set cont_thread.
1452 (captured_main): Clear cont_thread each time a GDB connects.
1453
1454 2014-11-12 Pedro Alves <palves@redhat.com>
1455
1456 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1457 thread, and don't resume all threads if the Hc thread has exited.
1458
1459 2014-11-12 Pedro Alves <palves@redhat.com>
1460
1461 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1462 the process group instead of to a specific LWP.
1463
1464 2014-10-15 Pedro Alves <palves@redhat.com>
1465
1466 PR server/17487
1467 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1468 parameter.
1469 (arm_set_thread_context): Delete.
1470 (the_low_target): Adjust.
1471 * win32-i386-low.c (debug_registers_changed)
1472 (debug_registers_used): Delete.
1473 (update_debug_registers_callback): New function.
1474 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1475 needing to update their debug registers.
1476 (win32_get_current_dr): New function.
1477 (x86_dr_low_get_addr, x86_dr_low_get_control)
1478 (x86_dr_low_get_status): Fetch the debug register from the thread
1479 record's context.
1480 (i386_initial_stuff): Adjust.
1481 (i386_get_thread_context): Remove current_event parameter. Don't
1482 clear debug_registers_changed nor copy DR values to
1483 debug_reg_state.
1484 (i386_set_thread_context): Delete.
1485 (i386_prepare_to_resume): New function.
1486 (i386_thread_added): Mark the thread as needing to update irs
1487 debug registers.
1488 (the_low_target): Remove i386_set_thread_context and install
1489 i386_prepare_to_resume.
1490 * win32-low.c (win32_get_thread_context): Adjust.
1491 (win32_set_thread_context): Use SetThreadContext
1492 directly.
1493 (win32_prepare_to_resume): New function.
1494 (win32_require_context): New function, factored out from ...
1495 (thread_rec): ... this.
1496 (continue_one_thread): Call win32_prepare_to_resume on each thread
1497 we're about to continue.
1498 (win32_resume): Call win32_prepare_to_resume on the event thread.
1499 * win32-low.h (struct win32_thread_info)
1500 <debug_registers_changed>: New field.
1501 (struct win32_target_ops): Change prototype of set_thread_context,
1502 delete set_thread_context and add prepare_to_resume.
1503 (win32_require_context): New declaration.
1504
1505 2014-10-08 Gary Benson <gbenson@redhat.com>
1506
1507 * server.h: Do not include common-exceptions.h.
1508
1509 2014-10-08 Gary Benson <gbenson@redhat.com>
1510
1511 * server.h: Do not include cleanups.h.
1512
1513 2014-09-30 James Hogan <james.hogan@imgtec.com>
1514
1515 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1516 mips64-dsp-linux.c.
1517
1518 2014-09-23 Yao Qi <yao@codesourcery.com>
1519
1520 * linux-low.c (lp_status_maybe_breakpoint): New function.
1521 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1522 (count_events_callback): Likewise.
1523 (select_event_lwp_callback): Likewise.
1524 (cancel_breakpoints_callback): Likewise.
1525
1526 2014-09-19 Don Breazeal <donb@codesourcery.com>
1527
1528 * linux-low.c (handle_extended_wait): Call
1529 linux_ptrace_get_extended_event.
1530 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1531 linux_is_extended_waitstatus.
1532
1533 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1534
1535 * Makefile.in (CPPFLAGS): Define.
1536 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1537 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1538
1539 2014-09-16 Gary Benson <gbenson@redhat.com>
1540
1541 * inferiors.h (current_inferior): Renamed as...
1542 (current_thread): New variable. All uses updated.
1543 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1544 (maybe_move_out_of_jump_pad): Likewise.
1545 (cancel_breakpoint): Likewise.
1546 (linux_low_filter_event): Likewise.
1547 (wait_for_sigstop): Likewise.
1548 (linux_resume_one_lwp): Likewise.
1549 (need_step_over_p): Likewise.
1550 (start_step_over): Likewise.
1551 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1552 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1553 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1554 and save_inferior as saved_thread.
1555 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1556 saved_thread.
1557 (regcache_invalidate_thread): Likewise.
1558 * remote-utils.c (prepare_resume_reply): Likewise.
1559 * thread-db.c (thread_db_get_tls_address): Likewise.
1560 (disable_thread_event_reporting): Likewise.
1561 (remove_thread_event_breakpoints): Likewise.
1562 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1563 as saved_thread.
1564 * target.h (set_desired_inferior): Renamed as...
1565 (set_desired_thread): New declaration. All uses updated.
1566 * server.c (myresume): Updated comment to reference thread instead
1567 of inferior.
1568 (handle_serial_event): Likewise.
1569 (handle_target_event): Likewise.
1570
1571 2014-09-12 Tom Tromey <tromey@redhat.com>
1572 Gary Benson <gbenson@redhat.com>
1573
1574 * regcache.h: Include common-regcache.h.
1575 (regcache_read_pc): Don't declare.
1576 * regcache.c (get_thread_regcache_for_ptid): New function.
1577
1578 2014-09-11 Tom Tromey <tromey@redhat.com>
1579 Gary Benson <gbenson@redhat.com>
1580
1581 * symbol.c: New file.
1582 * Makefile.in (SFILES): Add symbol.c.
1583 (OBS): Add symbol.o.
1584
1585 2014-09-11 Gary Benson <gbenson@redhat.com>
1586
1587 * target.c (target_stop_ptid, target_continue_ptid): New
1588 functions.
1589
1590 2014-09-11 Tom Tromey <tromey@redhat.com>
1591 Gary Benson <gbenson@redhat.com>
1592
1593 * target.h: Include target/target.h.
1594 * target.c (target_read_memory, target_read_uint32)
1595 (target_write_memory): New functions.
1596
1597 2014-09-11 Gary Benson <gbenson@redhat.com>
1598
1599 * server.h (debug_hw_points): Don't declare.
1600 * server.c (debug_hw_points): Don't define. Replace all uses
1601 with show_debug_regs.
1602 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1603 all uses with show_debug_regs.
1604
1605 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1606
1607 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1608 endianness into account.
1609 (ppc_supply_ptrace_register): Likewise.
1610
1611 2014-09-03 James Hogan <james.hogan@imgtec.com>
1612
1613 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1614 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1615
1616 2014-09-03 Gary Benson <gbenson@redhat.com>
1617
1618 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1619 ALL_DEBUG_ADDRESS_REGISTERS.
1620
1621 2014-09-02 Gary Benson <gbenson@redhat.com>
1622
1623 * i386-low.h: Renamed as...
1624 * x86-low.h: New file. All type, function and variable name
1625 prefixes changed from "i386_" to "x86_". All references updated.
1626 * i386-low.c: Renamed as...
1627 * x86-low.c: New file. All type, function and variable name
1628 prefixes changed from "i386_" to "x86_". All references updated.
1629
1630 2014-09-02 Gary Benson <gbenson@redhat.com>
1631
1632 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1633 (x86_linux_new_thread): Likewise.
1634
1635 2014-08-29 Gary Benson <gbenson@redhat.com>
1636
1637 * server.h (setjmp.h): Do not include.
1638 (toplevel): Do not declare.
1639 (common-exceptions.h): Include.
1640 (cleanups.h): Likewise.
1641 * server.c (toplevel): Do not define.
1642 (exit_code): New static global.
1643 (detach_or_kill_for_exit_cleanup): New function.
1644 (main): New function. Original main renamed to...
1645 (captured_main): New function.
1646 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1647
1648 2014-08-29 Gary Benson <gbenson@redhat.com>
1649
1650 * Makefile.in (SFILES): Add common/common-exceptions.c.
1651 (OBS): Add common-exceptions.o.
1652 (common-exceptions.o): New rule.
1653 * utils.c (prepare_to_throw_exception): New function.
1654
1655 2014-08-29 Gary Benson <gbenson@redhat.com>
1656
1657 * config.in: Regenerate.
1658 * configure: Likewise.
1659
1660 2014-08-29 Gary Benson <gbenson@redhat.com>
1661
1662 * Makefile.in (SFILES): Add common/cleanups.c.
1663 (OBS): cleanups.o.
1664 (cleanups.o): New rule.
1665
1666 2014-08-29 Gary Benson <gbenson@redhat.com>
1667
1668 * utils.c (internal_vwarning): New function.
1669
1670 2014-08-28 Gary Benson <gbenson@redhat.com>
1671
1672 * utils.h (fatal): Remove declaration.
1673 * utils.c (fatal): Remove function.
1674
1675 2014-08-28 Gary Benson <gbenson@redhat.com>
1676
1677 * tracepoint.c (gdb_agent_init): Replace fatal with
1678 perror_with_name.
1679 (initialize_tracepoint): Likewise.
1680
1681 2014-08-28 Gary Benson <gbenson@redhat.com>
1682
1683 * remote-utils.c (remote_prepare): Replace fatal with error.
1684
1685 2014-08-28 Gary Benson <gbenson@redhat.com>
1686
1687 * linux-low.c (linux_async): Replace fatal with warning.
1688 Tidy up and return.
1689 (linux_start_non_stop): Return -1 if linux_async failed.
1690
1691 2014-08-28 Gary Benson <gbenson@redhat.com>
1692
1693 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1694 gdb_assert.
1695 (i386_dr_low_get_addr): Remove vague comment.
1696 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1697 gdb_assert.
1698
1699 2014-08-28 Gary Benson <gbenson@redhat.com>
1700
1701 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1702 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1703 internal_error.
1704 (linux_resume_one_lwp): Likewise.
1705 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1706 gdb_assert.
1707 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1708 with internal_error.
1709 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1710 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1711 (find_register_by_name): Replace fatal with internal_error.
1712 (find_regno): Likewise.
1713 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1714 * thread-db.c (thread_db_create_event): Likewise.
1715 (thread_db_load_search): Likewise.
1716 (try_thread_db_load_1): Likewise.
1717 * tracepoint.c (get_jump_space_head): Replace fatal with
1718 internal_error.
1719 (claim_trampoline_space): Likewise.
1720 (have_fast_tracepoint_trampoline_buffer): Likewise.
1721 (cmd_qtstart): Likewise.
1722 (stop_tracing): Likewise.
1723 (fast_tracepoint_collecting): Likewise.
1724 (target_malloc): Likewise.
1725 (download_tracepoint): Likewise.
1726 (download_trace_state_variables): Replace check with gdb_assert.
1727 (upload_fast_traceframes): Replace fatal with internal_error.
1728
1729 2014-08-19 Tom Tromey <tromey@redhat.com>
1730 Gary Benson <gbenson@redhat.com>
1731
1732 * Makefile.in (SFILES): Add common/common-debug.c.
1733 (OBS): Add common-debug.o.
1734 (common-debug.o): New rule.
1735 * debug.h (debug_printf): Don't declare.
1736 * debug.c (debug_printf): Renamed and rewritten as...
1737 (debug_vprintf): New function.
1738
1739 2014-08-19 Gary Benson <gbenson@redhat.com>
1740
1741 * utils.h: Do not include print-utils.h.
1742
1743 2014-08-19 Tom Tromey <tromey@redhat.com>
1744 Gary Benson <gbenson@redhat.com>
1745
1746 * server.h: Add static assertion.
1747 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1748
1749 2014-08-19 Tom Tromey <tromey@redhat.com>
1750 Gary Benson <gbenson@redhat.com>
1751
1752 * Makefile.in (SFILES): Add common/errors.c.
1753 (OBS): Add errors.o.
1754 (IPA_OBS): Add errors-ipa.o.
1755 (errors.o): New rule.
1756 (errors-ipa.o): Likewise.
1757 * utils.h (perror_with_name, error, warning): Don't declare.
1758 * utils.c (warning): Renamed and rewritten as...
1759 (vwarning): New function.
1760 (error): Renamed and rewritten as...
1761 (verror): New function.
1762 (internal_error): Renamed and rewritten as...
1763 (internal_verror): New function.
1764
1765 2014-08-07 Gary Benson <gbenson@redhat.com>
1766
1767 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1768 * configure: Regenerate.
1769 * config.in: Likewise.
1770 * server.h: Do not include errno.h.
1771 * event-loop.c: Likewise.
1772 * hostio-errno.c: Likewise.
1773 * linux-low.c: Likewise.
1774 * remote-utils.c: Likewise.
1775 * spu-low.c: Likewise.
1776 * utils.c: Likewise.
1777 * gdbreplay.c: Unconditionally include errno.h.
1778
1779 2014-08-07 Gary Benson <gbenson@redhat.com>
1780
1781 * server.h: Do not include string.h.
1782 * event-loop.c: Likewise.
1783 * linux-low.c: Likewise.
1784 * regcache.c: Likewise.
1785 * remote-utils.c: Likewise.
1786 * spu-low.c: Likewise.
1787 * utils.c: Likewise.
1788
1789 2014-08-07 Gary Benson <gbenson@redhat.com>
1790
1791 * server.h: Do not include gdb_assert.h.
1792
1793 2014-08-07 Gary Benson <gbenson@redhat.com>
1794
1795 * server.h: Do not include common-utils.h.
1796
1797 2014-08-07 Gary Benson <gbenson@redhat.com>
1798
1799 * server.h: Do not include ptid.h.
1800 * notif.h: Likewise.
1801
1802 2014-08-07 Gary Benson <gbenson@redhat.com>
1803
1804 * server.h: Do not include gdb_locale.h.
1805
1806 2014-08-07 Gary Benson <gbenson@redhat.com>
1807
1808 * server.h: Do not include gdb/signals.h.
1809 * win32-low.c: Likewise.
1810
1811 2014-08-07 Gary Benson <gbenson@redhat.com>
1812
1813 * server.h: Do not include pathmax.h.
1814
1815 2014-08-07 Gary Benson <gbenson@redhat.com>
1816
1817 * server.h: Do not include libiberty.h.
1818 * linux-bfin-low.c: Likewise.
1819
1820 2014-08-07 Gary Benson <gbenson@redhat.com>
1821
1822 * server.h: Do not include ansidecl.h.
1823
1824 2014-08-07 Gary Benson <gbenson@redhat.com>
1825
1826 * linux-x86-low.c: Do not include stddef.h.
1827 * lynx-ppc-low.c: Likewise.
1828 * tracepoint.c: Likewise.
1829
1830 2014-08-07 Gary Benson <gbenson@redhat.com>
1831
1832 * server.h: Do not include stdarg.h.
1833 * nto-low.c: Likewise.
1834
1835 2014-08-07 Gary Benson <gbenson@redhat.com>
1836
1837 * server.h: Do not include stdlib.h.
1838 * inferiors.c: Likewise.
1839 * linux-low.c: Likewise.
1840 * regcache.c: Likewise.
1841 * spu-low.c: Likewise.
1842 * tracepoint.c: Likewise.
1843 * utils.c: Likewise.
1844
1845 2014-08-07 Gary Benson <gbenson@redhat.com>
1846
1847 * server.h: Do not include stdio.h.
1848 * linux-low.c: Likewise.
1849 * remote-utils.c: Likewise.
1850 * spu-low.c: Likewise.
1851 * utils.c: Likewise.
1852 * wincecompat.c: Likewise.
1853
1854 2014-08-06 Gary Benson <gbenson@redhat.com>
1855
1856 * regcache.c (init_register_cache): Move conditionals inside if.
1857
1858 2014-08-06 Gary Benson <gbenson@redhat.com>
1859
1860 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1861
1862 2014-07-31 Gary Benson <gbenson@redhat.com>
1863
1864 * ax.h: Do not include server.h.
1865 * gdbthread.h: Likewise.
1866 * lynx-low.h: Likewise.
1867 * notif.h: Likewise.
1868
1869 2014-07-30 Gary Benson <gbenson@redhat.com>
1870
1871 * server.h: Include common-defs.h.
1872 Do not include config.h or build-gnulib-gdbserver/config.h.
1873
1874 2014-07-30 Gary Benson <gbenson@redhat.com>
1875
1876 * hostio-errno.c: Move server.h to top of includes list.
1877 * inferiors.c: Likewise.
1878 * linux-x86-low.c: Likewise.
1879 * notif.c: Include server.h.
1880
1881 2014-07-24 Tom Tromey <tromey@redhat.com>
1882 Gary Benson <gbenson@redhat.com>
1883
1884 * server.h (CORE_ADDR): Now unsigned.
1885
1886 2014-07-16 Pedro Alves <palves@redhat.com>
1887
1888 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1889
1890 2014-07-15 Pedro Alves <palves@redhat.com>
1891
1892 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1893 copy.
1894
1895 2014-07-11 Pedro Alves <palves@redhat.com>
1896
1897 * linux-low.c (kill_wait_lwp): New function, based on
1898 kill_one_lwp_callback, but use my_waitpid directly.
1899 (kill_one_lwp_callback, linux_kill): Use it.
1900
1901 2014-06-23 Pedro Alves <palves@redhat.com>
1902
1903 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1904 before setting DR0..DR3.
1905
1906 2014-06-20 Gary Benson <gbenson@redhat.com>
1907
1908 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1909 * configure: Regenerated.
1910 * config.in: Likewise.
1911
1912 2014-06-20 Gary Benson <gbenson@redhat.com>
1913
1914 * Makefile.in (SFILES): Update locations for files moved
1915 from common to nat.
1916 (object file files): Reordered.
1917
1918 2014-06-20 Gary Benson <gbenson@redhat.com>
1919
1920 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1921 (i386_dr_low_set_addr): Likewise.
1922 (i386_dr_low_get_addr): Likewise.
1923 (i386_dr_low_can_set_control): Likewise.
1924 (i386_dr_low_set_control): Likewise.
1925 (i386_dr_low_get_control): Likewise.
1926 (i386_dr_low_get_status): Likewise.
1927 (i386_get_debug_register_length): Likewise.
1928 * linux-x86-low.c (i386_dr_low_set_addr):
1929 Changed signature. Made static.
1930 (i386_dr_low_get_addr): Likewise.
1931 (i386_dr_low_set_control): Likewise.
1932 (i386_dr_low_get_control): Likewise.
1933 (i386_dr_low_get_status): Likewise.
1934 (i386_dr_low): New global variable.
1935 * win32-i386-low.c (i386_dr_low_set_addr):
1936 Changed signature. Made static.
1937 (i386_dr_low_get_addr): Likewise.
1938 (i386_dr_low_set_control): Likewise.
1939 (i386_dr_low_get_control): Likewise.
1940 (i386_dr_low_get_status): Likewise.
1941 (i386_dr_low): New global variable.
1942
1943 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1944
1945 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1946 * Makefile.in (AR, AR_FLAGS): Define.
1947 * configure: Regenerate.
1948
1949 2014-06-19 Gary Benson <gbenson@redhat.com>
1950
1951 * Makefile.in (i386-dregs.o): New rule.
1952 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1953 * i386-low.c (target.h): Remove include.
1954 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1955 (DR_CONTROL_SHIFT): Likewise.
1956 (DR_CONTROL_SIZE): Likewise.
1957 (DR_RW_EXECUTE): Likewise.
1958 (DR_RW_WRITE): Likewise.
1959 (DR_RW_READ): Likewise.
1960 (DR_RW_IORW): Likewise.
1961 (DR_LEN_1): Likewise.
1962 (DR_LEN_2): Likewise.
1963 (DR_LEN_4): Likewise.
1964 (DR_LEN_8): Likewise.
1965 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1966 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1967 (DR_ENABLE_SIZE): Likewise.
1968 (DR_LOCAL_SLOWDOWN): Likewise.
1969 (DR_GLOBAL_SLOWDOWN): Likewise.
1970 (DR_CONTROL_RESERVED): Likewise.
1971 (I386_DR_CONTROL_MASK): Likewise.
1972 (I386_DR_VACANT): Likewise.
1973 (I386_DR_LOCAL_ENABLE): Likewise.
1974 (I386_DR_GLOBAL_ENABLE): Likewise.
1975 (I386_DR_DISABLE): Likewise.
1976 (I386_DR_SET_RW_LEN): Likewise.
1977 (I386_DR_GET_RW_LEN): Likewise.
1978 (I386_DR_WATCH_HIT): Likewise.
1979 (i386_wp_op_t): Likewise.
1980 (i386_show_dr): Likewise.
1981 (i386_length_and_rw_bits): Likewise.
1982 (i386_insert_aligned_watchpoint): Likewise.
1983 (i386_remove_aligned_watchpoint): Likewise.
1984 (i386_handle_nonaligned_watchpoint): Likewise.
1985 i386_update_inferior_debug_regs(): Likewise.
1986 (i386_dr_insert_watchpoint): Likewise.
1987 (i386_dr_remove_watchpoint): Likewise.
1988 (i386_dr_region_ok_for_watchpoint): Likewise.
1989 (i386_dr_stopped_data_address): Likewise.
1990 (i386_dr_stopped_by_watchpoint): Likewise.
1991
1992 2014-06-19 Gary Benson <gbenson@redhat.com>
1993
1994 * i386-low.c (i386_dr_show): Renamed to
1995 i386_show_dr and made static. All uses updated.
1996 (i386_dr_length_and_rw_bits): Renamed to
1997 i386_length_and_rw_bits and made static.
1998 All uses updated.
1999 (i386_dr_insert_aligned_watchpoint): Renamed to
2000 i386_insert_aligned_watchpoint and made static.
2001 All uses updated.
2002 (i386_dr_remove_aligned_watchpoint): Renamed to
2003 i386_remove_aligned_watchpoint and made static.
2004 All uses updated.
2005 (i386_dr_update_inferior_debug_regs): Renamed to
2006 i386_update_inferior_debug_regs and made static.
2007 All uses updated.
2008
2009 2014-06-18 Gary Benson <gbenson@redhat.com>
2010
2011 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2012 (i386_dr_low_can_set_control): Likewise.
2013 (i386_get_debug_register_length): Likewise.
2014 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2015 (i386_dr_low_can_set_control): Likewise.
2016 (i386_get_debug_register_length): Likewise.
2017
2018 2014-06-17 Gary Benson <gbenson@redhat.com>
2019
2020 * i386-low.h (i386-dregs.h): New include.
2021 (DR_FIRSTADDR): Now in i386-dregs.h.
2022 (DR_LASTADDR): Likewise.
2023 (DR_NADDR): Likewise.
2024 (DR_STATUS): Likewise.
2025 (DR_CONTROL): Likewise.
2026 (i386_debug_reg_state): Likewise.
2027 (i386_dr_insert_watchpoint): Likewise.
2028 (i386_dr_remove_watchpoint): Likewise.
2029 (i386_dr_region_ok_for_watchpoint): Likewise.
2030 (i386_dr_stopped_data_address): Likewise.
2031 (i386_dr_stopped_by_watchpoint): Likewise.
2032 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2033
2034 2014-06-18 Gary Benson <gbenson@redhat.com>
2035
2036 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2037 i386_dr_insert_watchpoint.
2038 (i386_low_remove_watchpoint): Renamed to
2039 i386_dr_remove_watchpoint.
2040 (i386_low_region_ok_for_watchpoint): Renamed to
2041 i386_dr_region_ok_for_watchpoint.
2042 (i386_low_stopped_data_address): Renamed to
2043 i386_dr_stopped_data_address.
2044 (i386_low_stopped_by_watchpoint): Renamed to
2045 i386_dr_stopped_by_watchpoint.
2046 * i386-low.c (i386_show_dr): Renamed to
2047 i386_dr_show and made nonstatic. All uses updated.
2048 (i386_length_and_rw_bits): Renamed to
2049 i386_dr_length_and_rw_bits and made nonstatic.
2050 All uses updated.
2051 (i386_insert_aligned_watchpoint): Renamed to
2052 i386_dr_insert_aligned_watchpoint and made nonstatic.
2053 All uses updated.
2054 (i386_remove_aligned_watchpoint): Renamed to
2055 i386_dr_remove_aligned_watchpoint and made nonstatic.
2056 All uses updated.
2057 (i386_update_inferior_debug_regs): Renamed to
2058 i386_dr_update_inferior_debug_regs and made nonstatic.
2059 All uses updated.
2060 (i386_low_insert_watchpoint): Renamed to
2061 i386_dr_insert_watchpoint. All uses updated.
2062 (i386_low_remove_watchpoint): Renamed to
2063 i386_dr_remove_watchpoint. All uses updated.
2064 (i386_low_region_ok_for_watchpoint): Renamed to
2065 i386_dr_region_ok_for_watchpoint. All uses updated.
2066 (i386_low_stopped_data_address): Renamed to
2067 i386_dr_stopped_data_address. All uses updated.
2068 (i386_low_stopped_by_watchpoint): Renamed to
2069 i386_dr_stopped_by_watchpoint. All uses updated.
2070
2071 2014-06-18 Gary Benson <gbenson@redhat.com>
2072
2073 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2074 (i386_dr_low_can_set_control): Likewise.
2075 (i386_insert_aligned_watchpoint): New check.
2076
2077 2014-06-18 Gary Benson <gbenson@redhat.com>
2078
2079 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2080 Renamed to state.
2081
2082 2014-06-18 Gary Benson <gbenson@redhat.com>
2083
2084 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2085 instead of fatal and error.
2086 (i386_handle_nonaligned_watchpoint): Likewise.
2087
2088 2014-06-18 Gary Benson <gbenson@redhat.com>
2089
2090 * i386-low.c (i386_get_debug_register_length): New macro.
2091 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2092 (i386_show_dr): Use debug_printf instead of fprintf. Use
2093 phex to format values.
2094
2095 2014-06-18 Gary Benson <gbenson@redhat.com>
2096
2097 * i386-low.h: Comment changes.
2098 * i386-low.c: Likewise.
2099
2100 2014-06-18 Gary Benson <gbenson@redhat.com>
2101
2102 * i386-low.c: Whitespace changes.
2103
2104 2014-06-12 Tom Tromey <tromey@redhat.com>
2105
2106 * utils.c (freeargv): Remove.
2107
2108 2014-06-12 Tom Tromey <tromey@redhat.com>
2109
2110 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2111 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2112 (parse_debug_format_options): Likewise.
2113 (gdbserver_usage): Likewise.
2114 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2115 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2116 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2117 against libiberty.
2118 ($(LIBGNU)): Depend on libiberty.
2119 (all-lib): Recurse into all subdirs.
2120 (install-only): Invoke "install" target in subdirs.
2121 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2122 targets.
2123 * configure: Rebuild.
2124 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2125 for vasprintf, vsnprintf, or gettimeofday.
2126 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2127 srv_tgtobj.
2128
2129 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2130
2131 * development.sh: Delete.
2132 * Makefile.in (config.status): Adjust dependency on development.sh.
2133 * configure.ac: Adjust development.sh source call.
2134 * configure: Regenerate.
2135
2136 2014-06-02 Pedro Alves <palves@redhat.com>
2137
2138 * ax.c (gdb_free_agent_expr): New function.
2139 * ax.h (gdb_free_agent_expr): New declaration.
2140 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2141 list.
2142 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2143 static.
2144 (clear_breakpoint_conditions_and_commands): New function.
2145 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2146 (clear_breakpoint_conditions_and_commands): New declaration.
2147
2148 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2149
2150 * linux-aarch64-low.c (asm/ptrace.h): Include.
2151
2152 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2153
2154 Fix TLS access for -static -pthread.
2155 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2156 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2157 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2158
2159 2014-05-20 Pedro Alves <palves@redhat.com>
2160
2161 * linux-aarch64-low.c (aarch64_insert_point)
2162 (aarch64_remove_point): No longer check whether the type is
2163 supported here. Adjust to new interface.
2164 (the_low_target): Install aarch64_supports_z_point_type as
2165 supports_z_point_type method.
2166 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2167 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2168 instead of a Z packet char. Adjust.
2169 (arm_supports_z_point_type): New function.
2170 (arm_insert_point, arm_remove_point): Adjust to new interface.
2171 (the_low_target): Install arm_supports_z_point_type.
2172 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2173 (cris_insert_point, cris_remove_point): Adjust to new interface.
2174 Don't check whether the type is supported here.
2175 (the_low_target): Install cris_supports_z_point_type.
2176 * linux-low.c (linux_supports_z_point_type): New function.
2177 (linux_insert_point, linux_remove_point): Adjust to new interface.
2178 * linux-low.h (struct linux_target_ops) <insert_point,
2179 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2180 raw_breakpoint pointer parameter.
2181 <supports_z_point_type>: New method.
2182 * linux-mips-low.c (mips_supports_z_point_type): New function.
2183 (mips_insert_point, mips_remove_point): Adjust to new interface.
2184 Use mips_supports_z_point_type.
2185 (the_low_target): Install mips_supports_z_point_type.
2186 * linux-ppc-low.c (the_low_target): Install NULL as
2187 supports_z_point_type method.
2188 * linux-s390-low.c (the_low_target): Install NULL as
2189 supports_z_point_type method.
2190 * linux-sparc-low.c (the_low_target): Install NULL as
2191 supports_z_point_type method.
2192 * linux-x86-low.c (x86_supports_z_point_type): New function.
2193 (x86_insert_point): Adjust to new insert_point interface. Use
2194 insert_memory_breakpoint. Adjust to new
2195 i386_low_insert_watchpoint interface.
2196 (x86_remove_point): Adjust to remove_point interface. Use
2197 remove_memory_breakpoint. Adjust to new
2198 i386_low_remove_watchpoint interface.
2199 (the_low_target): Install x86_supports_z_point_type.
2200 * lynx-low.c (lynx_target_ops): Install NULL as
2201 supports_z_point_type callback.
2202 * nto-low.c (nto_supports_z_point_type): New.
2203 (nto_insert_point, nto_remove_point): Adjust to new interface.
2204 (nto_target_ops): Install nto_supports_z_point_type.
2205 * mem-break.c: Adjust intro comment.
2206 (struct raw_breakpoint) <raw_type, size>: New fields.
2207 <inserted>: Update comment.
2208 <shlib_disabled>: Delete field.
2209 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2210 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2211 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2212 (raw_bkpt_type_to_target_hw_bp_type): New function.
2213 (find_enabled_raw_code_breakpoint_at): New function.
2214 (find_raw_breakpoint_at): New type and size parameters. Use them.
2215 (insert_memory_breakpoint): New function, based off
2216 set_raw_breakpoint_at.
2217 (remove_memory_breakpoint): New function.
2218 (set_raw_breakpoint_at): Reimplement.
2219 (set_breakpoint): New, based on set_breakpoint_at.
2220 (set_breakpoint_at): Reimplement.
2221 (delete_raw_breakpoint): Go through the_target->remove_point
2222 instead of assuming memory breakpoints.
2223 (find_gdb_breakpoint_at): Delete.
2224 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2225 (find_gdb_breakpoint): New function.
2226 (set_gdb_breakpoint_at): Delete.
2227 (z_type_supported): New function.
2228 (set_gdb_breakpoint_1): New function, loosely based off
2229 set_gdb_breakpoint_at.
2230 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2231 (delete_gdb_breakpoint_at): Delete.
2232 (delete_gdb_breakpoint_1): New function, loosely based off
2233 delete_gdb_breakpoint_at.
2234 (delete_gdb_breakpoint): New function.
2235 (clear_gdb_breakpoint_conditions): Rename to ...
2236 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2237 breakpoint.
2238 (add_condition_to_breakpoint): Make static.
2239 (add_breakpoint_condition): Take a struct breakpoint pointer
2240 instead of an address. Adjust.
2241 (gdb_condition_true_at_breakpoint): Rename to ...
2242 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2243 z_type parameter.
2244 (gdb_condition_true_at_breakpoint): Reimplement.
2245 (add_breakpoint_commands): Take a struct breakpoint pointer
2246 instead of an address. Adjust.
2247 (gdb_no_commands_at_breakpoint): Rename to ...
2248 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2249 parameter. Return true if no breakpoint was found. Change debug
2250 output.
2251 (gdb_no_commands_at_breakpoint): Reimplement.
2252 (run_breakpoint_commands): Rename to ...
2253 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2254 and change return type to boolean.
2255 (run_breakpoint_commands): New function.
2256 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2257 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2258 breakpoint. Go through the_target->remove_point instead of
2259 assuming memory breakpoint.
2260 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2261 software and hardware breakpoints.
2262 (reinsert_raw_breakpoint): Go through the_target->insert_point
2263 instead of assuming memory breakpoint.
2264 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2265 software and hardware breakpoints.
2266 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2267 Check both software and hardware breakpoints.
2268 (validate_inserted_breakpoint): Assert the breakpoint is a
2269 software breakpoint. Set the inserted flag to -1 instead of
2270 setting shlib_disabled.
2271 (delete_disabled_breakpoints): Adjust.
2272 (validate_breakpoints): Only validate software breakpoints.
2273 Adjust to inserted flag change.
2274 (check_mem_read, check_mem_write): Skip breakpoint types other
2275 than software breakpoints. Adjust to inserted flag change.
2276 * mem-break.h (enum raw_bkpt_type): New enum.
2277 (raw_breakpoint, struct process_info): Forward declare.
2278 (Z_packet_to_target_hw_bp_type): Delete declaration.
2279 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2280 (set_gdb_breakpoint, delete_gdb_breakpoint)
2281 (clear_breakpoint_conditions): New declarations.
2282 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2283 (breakpoint_inserted_here): Update comment.
2284 (add_breakpoint_condition, add_breakpoint_commands): Replace
2285 address parameter with a breakpoint pointer parameter.
2286 (gdb_breakpoint_here): Update comment.
2287 (delete_gdb_breakpoint_at): Delete.
2288 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2289 * server.c (process_point_options): Take a struct breakpoint
2290 pointer instead of an address. Adjust.
2291 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2292 delete_gdb_breakpoint.
2293 * spu-low.c (spu_target_ops): Install NULL as
2294 supports_z_point_type method.
2295 * target.h: Include mem-break.h.
2296 (struct target_ops) <prepare_to_access_memory>: Update comment.
2297 <supports_z_point_type>: New field.
2298 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2299 instead of a char. Also take a raw breakpoint pointer.
2300 * win32-arm-low.c (the_low_target): Install NULL as
2301 supports_z_point_type.
2302 * win32-i386-low.c (i386_supports_z_point_type): New function.
2303 (i386_insert_point, i386_remove_point): Adjust to new interface.
2304 (the_low_target): Install i386_supports_z_point_type.
2305 * win32-low.c (win32_supports_z_point_type): New function.
2306 (win32_insert_point, win32_remove_point): Adjust to new interface.
2307 (win32_target_ops): Install win32_supports_z_point_type.
2308 * win32-low.h (struct win32_target_ops):
2309 <supports_z_point_type>: New method.
2310 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2311 instead of a char. Also take a raw breakpoint pointer.
2312
2313 2014-05-20 Pedro Alves <palves@redhat.com>
2314
2315 * mem-break.h: Include break-common.h.
2316 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2317 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2318 (Z_packet_to_target_hw_bp_type): New declaration.
2319 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2320 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2321 (Z_PACKET_ACCESS_WP): Delete macros.
2322 (Z_packet_to_hw_type): Delete function.
2323 * i386-low.h: Don't include break-common.h here.
2324 (Z_packet_to_hw_type): Delete declaration.
2325 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2326 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2327 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2328 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2329 * linux-aarch64-low.c: Don't include break-common.h here.
2330 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2331 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2332 (Z_packet_to_target_hw_bp_type): Delete function.
2333 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2334 function.
2335 (mips_insert_point, mips_remove_point): Use
2336 Z_packet_to_target_hw_bp_type.
2337
2338 2014-05-20 Pedro Alves <palves@redhat.com>
2339
2340 * linux-aarch64-low.c: Include break-common.h.
2341 (enum target_point_type): Delete.
2342 (Z_packet_to_point_type): Rename to ...
2343 (Z_packet_to_target_hw_bp_type): ... this, and return a
2344 target_hw_bp_type instead.
2345 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2346 instead of an enum target_point_type.
2347 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2348 breakpoint type.
2349 (aarch64_dr_state_insert_one_point)
2350 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2351 (aarch64_handle_aligned_watchpoint)
2352 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2353 Take an enum target_hw_bp_type instead of an enum
2354 target_point_type.
2355 (aarch64_supports_z_point_type): New function.
2356 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2357 use Z_packet_to_target_hw_bp_type.
2358
2359 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2360
2361 * configure.ac: Only use -Werror by default when DEVELOPMENT
2362 is true.
2363 * configure: Regenerate.
2364
2365 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2366
2367 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2368 * linux-x86-low.c (X86_64_USER_REGS): New.
2369 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2370
2371 2014-04-28 Yao Qi <yao@codesourcery.com>
2372
2373 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2374 name.
2375
2376 2014-04-25 Pedro Alves <palves@redhat.com>
2377
2378 PR server/16255
2379 * linux-low.c (linux_attach_fail_reason_string): New function.
2380 (linux_attach_lwp): Delete.
2381 (linux_attach_lwp_1): Rename to ...
2382 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2383 argument. Remove "initial" parameter. Return int instead of
2384 void. Don't error or warn here.
2385 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2386 failure to attach to the tgid. Call warning when failing to
2387 attach to an lwp.
2388 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2389 argument. Remove "initial" parameter. Return int instead of
2390 void. Don't error or warn here.
2391 (linux_attach_fail_reason_string): New declaration.
2392 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2393 interface change. Use linux_attach_fail_reason_string.
2394
2395 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2396 Walfred Tedeschi <walfred.tedeschi@intel.com>
2397
2398 * Makefile.in: Added rules to handle new files
2399 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2400 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2401 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2402 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2403 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2404 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2405 x32-avx512-linux.o.
2406 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2407 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2408 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2409 i386/x32-avx512.xml.
2410 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2411 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2412 i386/x32-avx512-linux.xml.
2413 * i387-fp.c (num_avx512_k_registers): New constant for number
2414 of K registers.
2415 (num_avx512_zmmh_low_registers): New constant for number of
2416 lower ZMM registers (0-15).
2417 (num_avx512_zmmh_high_registers): New constant for number of
2418 higher ZMM registers (16-31).
2419 (num_avx512_ymmh_registers): New contant for number of higher
2420 YMM registers (ymm16-31 added by avx521 on x86_64).
2421 (num_avx512_xmm_registers): New constant for number of higher
2422 XMM registers (xmm16-31 added by AVX512 on x86_64).
2423 (struct i387_xsave): Add space for AVX512 registers.
2424 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2425 Add code to handle AVX512 registers.
2426 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2427 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2428 prototypei from generated file.
2429 (tdesc_amd64_avx512_linux): Likewise.
2430 (init_registers_x32_avx512_linux): Likewise.
2431 (tdesc_x32_avx512_linux): Likewise.
2432 (init_registers_i386_avx512_linux): Likewise.
2433 (tdesc_i386_avx512_linux): Likewise.
2434 (x86_64_regmap): Add AVX512 registers.
2435 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2436 mask.
2437 (initialize_low_arch): Add code to initialize AVX512 registers.
2438
2439 2014-04-23 Pedro Alves <palves@redhat.com>
2440
2441 * mem-break.c (find_gdb_breakpoint_at): Make static.
2442 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2443
2444 2014-04-23 Pedro Alves <palves@redhat.com>
2445
2446 * i386-low.c: Don't include break-common.h here.
2447 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2448 prototype to take target_hw_bp_type as argument instead of a Z
2449 packet char.
2450 * i386-low.h: Include break-common.h here.
2451 (Z_packet_to_hw_type): Declare.
2452 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2453 prototypes.
2454 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2455 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2456 (x86_remove_point): Convert the packet number to a
2457 target_hw_bp_type before calling i386_low_remove_watchpoint.
2458 * win32-i386-low.c (i386_insert_point): Convert the packet number
2459 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2460 (i386_remove_point): Convert the packet number to a
2461 target_hw_bp_type before calling i386_low_remove_watchpoint.
2462
2463 2014-04-23 Pedro Alves <palves@redhat.com>
2464
2465 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2466
2467 2014-04-10 Pedro Alves <palves@redhat.com>
2468
2469 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2470 Check if the condition or command is NULL before checking if the
2471 breakpoint is known. On success, return true.
2472 * mem-break.h (add_breakpoint_condition): Document return.
2473 (add_breakpoint_commands): Add describing comment.
2474 * server.c (skip_to_semicolon): New function.
2475 (process_point_options): Use it.
2476
2477 2014-04-09 Pedro Alves <palves@redhat.com>
2478
2479 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2480 to lwpid_of.
2481
2482 2014-02-27 Pedro Alves <palves@redhat.com>
2483
2484 PR 12702
2485 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2486 macros.
2487 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2488 output.
2489 (last_thread_of_process_p): Take a PID argument instead of a
2490 thread pointer.
2491 (linux_wait_for_lwp): Delete.
2492 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2493 functions.
2494 (linux_low_filter_event): New function, party factored out from
2495 linux_wait_for_event.
2496 (linux_wait_for_event): Rename to ...
2497 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2498 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2499 sigsuspend. Check for zombie leaders.
2500 (linux_wait_for_event): Reimplement as wrapper around
2501 linux_wait_for_event_filtered.
2502 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2503 a normal or signal exit is seen, it's the whole process exiting.
2504 (wait_for_sigstop): No longer a for_each_inferior callback.
2505 Rewrite on top of linux_wait_for_event_filtered.
2506 (stop_all_lwps): Call wait_for_sigstop directly.
2507 * server.c (resume, handle_target_event): Handle
2508 TARGET_WAITKIND_NO_RESUMED.
2509
2510 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2511
2512 * win32-low.c (psapi_get_dll_name,
2513 * win32_CreateToolhelp32Snapshot): Delete.
2514 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2515 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2516 Delete.
2517 (handle_load_dll): Add function description.
2518 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2519
2520 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2521
2522 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2523 Add comment.
2524 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2525 base address when calling win32_add_one_solib.
2526 (handle_load_dll): Delete local variable load_addr.
2527 Remove 0x1000 offset applied to DLL base address when calling
2528 win32_add_one_solib.
2529 (handle_unload_dll): Add comment.
2530
2531 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2532
2533 * win32-low.c (win32_add_all_dlls): Renames
2534 win32_ensure_ntdll_loaded. Rewrite function documentation.
2535 Adjust implementation to always load all DLLs.
2536 Add 0x1000 offset to DLL base address when calling
2537 win32_add_one_solib.
2538 (child_initialization_done): New static global.
2539 (do_initial_child_stuff): Set child_initialization_done to
2540 zero during child initialization, and 1 after. Replace call
2541 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2542 Add comment.
2543 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2544 (handle_unload_dll): Add function documentation.
2545 (get_child_debug_event): Ignore load and unload DLL events
2546 during child initialization.
2547
2548 2014-02-20 Doug Evans <dje@google.com>
2549
2550 Remove global all_lwps.
2551 * inferiors.h (ptid_of): Move here from linux-low.h.
2552 (pid_of, lwpid_of): Ditto.
2553 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2554 parameter is a struct thread_info * now.
2555 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2556 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2557 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2558 directly.
2559 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2560 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2561 * linux-arm-low.c (update_registers_callback): Update, "entry"
2562 parameter is a struct thread_info * now.
2563 Fetch lwpid from current_inferior directly.
2564 (arm_insert_point): Pass &all_threads to find_inferior instead of
2565 &all_lwps.
2566 (arm_remove_point): Ditto.
2567 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2568 (arm_prepare_to_resume): Fetch pid from thread.
2569 (arm_read_description): Fetch lwpid from current_inferior directly.
2570 * linux-low.c (all_lwps): Delete.
2571 (delete_lwp): Delete call to remove_inferior.
2572 (handle_extended_wait): Fetch lwpid from thread.
2573 (add_lwp): Don't set lwp->entry.id. Remove call to
2574 add_inferior_to_list.
2575 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2576 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2577 (kill_one_lwp_callback): Ditto.
2578 (linux_kill): Don't dereference NULL pointer.
2579 Fetch ptid,lwpid from thread.
2580 (get_detach_signal): Fetch ptid from thread.
2581 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2582 Simplify call to regcache_invalidate_thread.
2583 (delete_lwp_callback): Update, "entry" parameter is a
2584 struct thread_info * now. Fetch pid from thread.
2585 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2586 (status_pending_p_callback): Update, "entry" parameter is a
2587 struct thread_info * now. Fetch ptid from thread.
2588 (find_lwp_pid): Update, "entry" parameter is a
2589 struct thread_info * now.
2590 (linux_wait_for_lwp): Fetch pid from thread.
2591 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2592 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2593 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2594 (dequeue_one_deferred_signal): Ditto.
2595 (cancel_breakpoint): Fetch ptid from current_inferior.
2596 (linux_wait_for_event): Pass &all_threads to find_inferior,
2597 not &all_lwps. Fetch ptid, lwpid from thread.
2598 (count_events_callback): Update, "entry" parameter is a
2599 struct thread_info * now.
2600 (select_singlestep_lwp_callback): Ditto.
2601 (select_event_lwp_callback): Ditto.
2602 (cancel_breakpoints_callback): Ditto.
2603 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2604 not &all_lwps.
2605 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2606 (unsuspend_one_lwp): Update, "entry" parameter is a
2607 struct thread_info * now.
2608 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2609 not &all_lwps.
2610 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2611 Fetch lwpid from thread, not lwp.
2612 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2613 Pass &all_threads to find_inferior, not &all_lwps.
2614 (send_sigstop): Fetch lwpid from thread, not lwp.
2615 (send_sigstop_callback): Update, "entry" parameter is a
2616 struct thread_info * now.
2617 (suspend_and_send_sigstop_callback): Ditto.
2618 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2619 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2620 struct thread_info * now.
2621 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2622 from thread, lwp.
2623 (lwp_running): Update, "entry" parameter is a
2624 struct thread_info * now.
2625 (stop_all_lwps): Fetch ptid from thread.
2626 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2627 (linux_resume_one_lwp): Fetch lwpid from thread.
2628 (linux_set_resume_request): Update, "entry" parameter is a
2629 struct thread_info * now. Fetch pid, lwpid from thread.
2630 (resume_status_pending_p): Update, "entry" parameter is a
2631 struct thread_info * now.
2632 (need_step_over_p): Ditto. Fetch lwpid from thread.
2633 (start_step_over): Fetch lwpid from thread.
2634 (linux_resume_one_thread): Update, "entry" parameter is a
2635 struct thread_info * now. Fetch lwpid from thread.
2636 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2637 (proceed_one_lwp): Update, "entry" parameter is a
2638 struct thread_info * now. Fetch lwpid from thread.
2639 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2640 struct thread_info * now.
2641 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2642 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2643 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2644 directly.
2645 (regsets_store_inferior_registers): Ditto.
2646 (fetch_register, store_register): Ditto.
2647 (linux_read_memory, linux_write_memory): Ditto.
2648 (linux_request_interrupt): Ditto.
2649 (linux_read_auxv): Ditto.
2650 (linux_xfer_siginfo): Ditto.
2651 (linux_qxfer_spu): Ditto.
2652 (linux_qxfer_libraries_svr4): Ditto.
2653 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2654 moved to inferiors.h.
2655 (get_lwp): Delete.
2656 (get_thread_lwp): Update.
2657 (struct lwp_info): Delete member "entry". Simplify comment for
2658 member "thread".
2659 (all_lwps): Delete.
2660 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2661 current_inferior directly.
2662 (update_watch_registers_callback): Update, "entry" parameter is a
2663 struct thread_info * now. Fetch pid from thread.
2664 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2665 (mips_insert_point): Fetch lwpid from current_inferior.
2666 Pass &all_threads to find_inferior, not &all_lwps.
2667 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2668 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2669 directly.
2670 (mips_stopped_data_address): Ditto.
2671 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2672 directly.
2673 * linux-tile-low.c (tile_arch_setup): Ditto.
2674 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2675 (update_debug_registers_callback): Update, "entry" parameter is a
2676 struct thread_info * now. Fetch pid from thread.
2677 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2678 Pass &all_threads to find_inferior, not &all_lwps.
2679 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2680 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2681 Pass &all_threads to find_inferior, not &all_lwps.
2682 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2683 (i386_dr_low_get_status): Ditto.
2684 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2685 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2686 (x86_linux_read_description): Ditto.
2687 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2688
2689 2014-02-20 Doug Evans <dje@google.com>
2690
2691 * inferiors.c (get_first_inferior): Fix buglet.
2692
2693 2014-02-19 Doug Evans <dje@google.com>
2694
2695 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2696 * inferiors.c (add_thread): Change result type to struct thread_info *.
2697 All callers updated.
2698 (add_lwp): Call add_thread here instead of in callers.
2699 All callers updated.
2700 * linux-low.h (get_lwp_thread): Rewrite.
2701 (struct lwp_info): New member "thread".
2702
2703 2014-02-19 Doug Evans <dje@google.com>
2704
2705 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2706 All callers updated.
2707
2708 2014-02-19 Doug Evans <dje@google.com>
2709
2710 * inferiors.c (add_thread): Fix whitespace.
2711
2712 2014-02-19 Doug Evans <dje@google.com>
2713
2714 * dll.c (clear_dlls): Replace accessing list implemention details
2715 with API function.
2716 * gdbthread.h (get_first_thread): Declare.
2717 * inferiors.c (for_each_inferior_with_data): New function.
2718 (get_first_thread): New function.
2719 (find_thread_ptid): Simplify.
2720 (get_first_inferior): New function.
2721 (clear_list): Delete.
2722 (one_inferior_p): New function.
2723 (clear_inferior_list): New function.
2724 (clear_inferiors): Update.
2725 * inferiors.h (for_each_inferior_with_data): Declare.
2726 (clear_inferior_list): Declare.
2727 (one_inferior_p): Declare.
2728 (get_first_inferior): Declare.
2729 * linux-low.c (linux_wait_for_event): Replace accessing list
2730 implemention details with API function.
2731 * server.c (target_running): Ditto.
2732 (accumulate_file_name_length): New function.
2733 (emit_dll_description): New function.
2734 (handle_qxfer_libraries): Replace accessing list implemention
2735 details with API function.
2736 (handle_qxfer_threads_worker): New function.
2737 (handle_qxfer_threads_proper): Replace accessing list implemention
2738 details with API function.
2739 (handle_query): Ditto.
2740 (visit_actioned_threads_callback_ftype): New typedef.
2741 (visit_actioned_threads_data): New struct.
2742 (visit_actioned_threads): Rewrite to be find_inferior callback.
2743 (resume): Call find_inferior.
2744 (handle_status): Replace accessing list implemention
2745 details with API function.
2746 (process_serial_event): Replace accessing list implemention details
2747 with API function.
2748 * target.c (set_desired_inferior): Replace accessing list implemention
2749 details with API function.
2750 * tracepoint.c (same_process_p): New function.
2751 (gdb_agent_about_to_close): Replace accessing list implemention
2752 details with API function.
2753 * win32-low.c (child_delete_thread): Replace accessing list
2754 implemention details with API function.
2755 (match_dll_by_basename): New function.
2756 (dll_is_loaded_by_basename): New function.
2757 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2758 details call to dll_is_loaded_by_basename.
2759
2760 2014-02-19 Doug Evans <dje@google.com>
2761
2762 * dll.h (struct dll_info): Add comment.
2763 * gdbthread.h (struct thread_info): Add comment.
2764 (current_ptid): Simplify.
2765 * inferiors.c (add_process): Update.
2766 (remove_process): Update.
2767 * inferiors.h (struct process_info): Rename member "head" to "entry".
2768 * linux-low.c (delete_lwp): Update.
2769 (add_lwp): Update.
2770 (last_thread_of_process_p): Update.
2771 (kill_one_lwp_callback, linux_kill): Update.
2772 (status_pending_p_callback): Update.
2773 (wait_for_sigstop): Update. Simplify read of ptid.
2774 (start_step_over): Update.
2775 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2776 (get_lwp_thread): Update.
2777 (struct lwp_info): Rename member "head" to "entry".
2778 * regcache.h (inferior_list_entry): Delete.
2779 * server.c (kill_inferior_callback): Update.
2780 (detach_or_kill_inferior_callback): Update.
2781 (print_started_pid): Update.
2782 (print_attached_pid): Update.
2783 (process_serial_event): Simplify read of ptid.
2784 * thread-db.c (thread_db_create_event): Update.
2785 (thread_db_get_tls_address): Update.
2786 * win32-low.c (current_inferior_ptid): Simplify.
2787
2788 2014-02-19 Tom Tromey <tromey@redhat.com>
2789
2790 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2791 argument.
2792 (target_supports_btrace): Update.
2793
2794 2014-02-14 Yao Qi <yao@codesourcery.com>
2795
2796 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2797 (rsp-low-ipa.o): New target.
2798
2799 2014-02-12 Tom Tromey <tromey@redhat.com>
2800
2801 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2802 convert_ascii_to_int.
2803 * regcache.c (registers_to_string): Likewise.
2804 * remote-utils.c (decode_M_packet): Likewise.
2805 * server.c (process_serial_event): Likewise.
2806
2807 2014-02-12 Tom Tromey <tromey@redhat.com>
2808
2809 * server.c (handle_query, handle_v_run): Use hex2bin, not
2810 unhexify.
2811 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2812
2813 2014-02-12 Tom Tromey <tromey@redhat.com>
2814
2815 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2816 convert_int_to_ascii.
2817 * regcache.c (registers_to_string, collect_register_as_string):
2818 Likewise.
2819 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2820 Likewise.
2821 * server.c (process_serial_event): Likewise.
2822 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2823 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2824
2825 2014-02-12 Tom Tromey <tromey@redhat.com>
2826
2827 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2828 bin2hex, not hexify.
2829 * tracepoint.c (cmd_qtstatus): Likewise.
2830
2831 2014-02-12 Tom Tromey <tromey@redhat.com>
2832
2833 * remote-utils.c (monitor_output): Pass explicit length to
2834 hexify.
2835
2836 2014-02-12 Tom Tromey <tromey@redhat.com>
2837
2838 * tracepoint.c: Include rsp-low.h.
2839 * server.c: Include rsp-low.h.
2840 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2841 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2842 declare.
2843 * remote-utils.c: Include rsp-low.h.
2844 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2845 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2846 (convert_int_to_ascii, convert_ascii_to_int): Move to
2847 common/rsp-low.c.
2848 * regcache.c: Include rsp-low.h.
2849 * ax.c: Include rsp-low.h.
2850 * Makefile.in (SFILES): Add common/rsp-low.c.
2851 (OBS): Add rsp-low.o.
2852 (rsp-low.o): New target.
2853
2854 2014-02-12 Tom Tromey <tromey@redhat.com>
2855
2856 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2857 Include print-utils.h.
2858 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2859 (plongest, thirty_two, phex_nz): Remove.
2860 * Makefile.in (SFILES): Add common/print-utils.c.
2861 (OBS): Add print-utils.o.
2862 (print-utils-ipa.o): New target.
2863 (print-utils.o): New target.
2864 (IPA_OBJS): Add print-utils-ipa.o.
2865
2866 2014-02-06 Tom Tromey <tromey@redhat.com>
2867
2868 * Makefile.in (SFILES): Fix indentation.
2869
2870 2014-02-05 Doug Evans <dje@google.com>
2871
2872 * linux-low.c (linux_wait_for_event): Improve comment.
2873 (linux_wait_1): Keep current_inferior in sync with event_child.
2874
2875 2014-01-22 Doug Evans <dje@google.com>
2876
2877 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2878
2879 2014-01-22 Doug Evans <dje@google.com>
2880
2881 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2882 * configure: Regenerate.
2883 * config.in: Regenerate.
2884 * Makefile.in (SFILES): Add debug.c.
2885 (OBS): Add debug.o.
2886 * debug.c: New file.
2887 * debug.h: New file.
2888 * linux-aarch64-low.c (*): Update all debugging printfs to use
2889 debug_printf instead of fprintf.
2890 * linux-arm-low.c (*): Ditto.
2891 * linux-cris-low.c (*): Ditto.
2892 * linux-crisv32-low.c (*): Ditto.
2893 * linux-m32r-low.c (*): Ditto.
2894 * linux-sparc-low.c (*): Ditto.
2895 * linux-x86.c (*): Ditto.
2896 * linux-low.c (*): Ditto.
2897 (linux_wait_1): Add calls to debug_enter, debug_exit.
2898 (linux_wait): Remove redundant debugging printf.
2899 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2900 (linux_resume, unstop_all_lwps): Ditto.
2901 * mem-break.c (*): Update all debugging printfs to use
2902 debug_printf instead of fprintf.
2903 * remote-utils.c (*): Ditto.
2904 * thread-db.c (*): Ditto.
2905 * server.c #include <ctype.h>, "gdb_vecs.h".
2906 (debug_threads): Moved to debug.c.
2907 (*): Update all debugging printfs to use debug_printf instead of
2908 fprintf.
2909 (start_inferior): Replace call to fflush with call to debug_flush.
2910 (monitor_show_help): Mention set debug-format.
2911 (parse_debug_format_options): New function.
2912 (handle_monitor_command): Handle "monitor set debug-format".
2913 (gdbserver_usage): Mention --debug-format.
2914 (main): Parse --debug-format.
2915 * server.h (debug_threads): Declaration moved to debug.h.
2916 #include "debug.h".
2917 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2918 trace_debug_1 that uses debug_printf.
2919 (tracepoint_look_up_symbols): Update all debugging printfs to use
2920 debug_printf instead of fprintf.
2921
2922 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2923
2924 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2925 sys/ptrace.h.
2926
2927 2014-01-17 Pedro Alves <palves@redhat.com>
2928
2929 PR build/16445
2930 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2931 defined after including gdb_proc_service.h.
2932
2933 2014-01-16 Doug Evans <dje@google.com>
2934
2935 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2936 (match_dll): Use it.
2937
2938 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2939
2940 * target.h (target_ops) <read_btrace>: Change parameters and
2941 return type to allow error reporting.
2942 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2943 trace reading errors on.
2944 * linux-low.c (linux_low_read_btrace): Pass trace reading
2945 errors on.
2946 (linux_low_disable_btrace): New.
2947
2948 2014-01-15 Doug Evans <dje@google.com>
2949
2950 * inferiors.c (thread_id_to_gdb_id): Delete.
2951 * inferiors.h (thread_id_to_gdb_id): Delete.
2952
2953 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2954
2955 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2956 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2957 versions.
2958
2959 2014-01-08 Pedro Alves <palves@redhat.com>
2960
2961 * server.c (handle_status): Don't discard previous queued stop
2962 replies or thread's pending status here.
2963 (main) <disconnection>: Do it here instead.
2964
2965 2014-01-08 Pedro Alves <palves@redhat.com>
2966
2967 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2968 * server.c (visit_actioned_threads, handle_pending_status): New
2969 function.
2970 (handle_v_cont): Factor out parts to ...
2971 (resume): ... this new function. If in all-stop, and a thread
2972 being resumed has a pending status, report it without actually
2973 resuming.
2974 (myresume): Adjust to use the new 'resume' function.
2975 (clear_pending_status_callback, set_pending_status_callback)
2976 (find_status_pending_thread_callback): New functions.
2977 (handle_status): Handle the case of multiple threads having
2978 interesting statuses to report. Report threads' real last signal
2979 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2980 with an interesting thread to report the status for, instead of
2981 always reporting the status of the first thread.
2982
2983 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2984
2985 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2986 * gdbreplay.c (gdbreplay_version): Likewise.
2987
2988 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2989
2990 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2991 iov.iov_len with the real length in use.
2992
2993 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2994
2995 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2996 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2997 for all targets that use win32-low.c.
2998 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2999 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3000
3001 2013-12-13 Pedro Alves <palves@redhat.com>
3002
3003 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3004 if equal to TARGET_WAITKIND_LOADED.
3005 * win32-low.c (cached_status): New static global.
3006 (win32_wait): Add declaration.
3007 (do_initial_child_stuff): Flush all initial pending debug events
3008 up to the initial breakpoint.
3009 (win32_wait): If CACHED_STATUS was set, return that instead
3010 of doing a real wait. Remove the code resuming the execution
3011 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3012 during the initial phase. Also remove the code changing
3013 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3014 TARGET_WAITKIND_STOPPED.
3015
3016 2013-12-11 Yao Qi <yao@codesourcery.com>
3017
3018 * notif.c (handle_notif_ack): Return 0 if no notification
3019 matches.
3020
3021 2013-11-20 Doug Evans <dje@google.com>
3022
3023 * linux-low.c (linux_set_resume_request): Fix comment.
3024
3025 2013-11-20 Doug Evans <dje@google.com>
3026
3027 * linux-low.c (resume_status_pending_p): Tweak comment.
3028
3029 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3030
3031 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3032 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3033 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3034 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3035 (srv_amd64_regobj): Add amd64-mpx.o.
3036 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3037 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3038 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3039 * i387-fp.c (num_pl_bnd_register) Added constant.
3040 (num_pl_bnd_cfg_registers) Added constant.
3041 (struct i387_xsave) Added reserved area and MPX fields.
3042 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3043 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3044 function.
3045 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3046 (init_registers_amd64_mpx_linux): Declare new function.
3047 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3048 (x86_64_regmap): Add MPX registers.
3049 (x86_linux_read_description): Add MPX case.
3050 (initialize_low_arch): Initialize MPX targets.
3051
3052 2013-11-18 Tom Tromey <tromey@redhat.com>
3053
3054 * configure: Rebuild.
3055 * configure.ac: Don't check for stdlib.h.
3056 * gdbreplay.c: Unconditionally include stdlib.h.
3057
3058 2013-11-18 Tom Tromey <tromey@redhat.com>
3059
3060 * config.in: Rebuild.
3061 * configure: Rebuild.
3062 * configure.ac: Don't use AC_HEADER_DIRENT.
3063
3064 2013-11-18 Tom Tromey <tromey@redhat.com>
3065
3066 * server.h: Don't check HAVE_STRING_H.
3067 * gdbreplay.c: Don't check HAVE_STRING_H.
3068 * configure: Rebuild.
3069
3070 2013-11-18 Tom Tromey <tromey@redhat.com>
3071
3072 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3073 LIBGNU.
3074
3075 2013-11-08 Tom Tromey <tromey@redhat.com>
3076
3077 * configure, config.in: Rebuild.
3078 * configure.ac: Remove unused configury.
3079
3080 2013-11-08 Tom Tromey <tromey@redhat.com>
3081
3082 * acinclude.m4: Include common.m4, codeset.m4.
3083 * configure, config.in: Rebuild.
3084 * configure.ac: Use GDB_AC_COMMON.
3085
3086 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3087
3088 * linux-s390-low.c (HWCAP_S390_TE): New define.
3089 (s390_arch_setup): Consider the TE field in the HWCAP for
3090 determining 'have_regset_tdb'.
3091
3092 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3093
3094 PR gdb/16014
3095 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3096 call to sizeof.
3097
3098 2013-10-02 Pedro Alves <palves@redhat.com>
3099
3100 * server.c (process_serial_event): Don't output "GDBserver
3101 exiting" if GDB is connected through stdio.
3102 * target.c (mywait): Likewise, be silent if GDB is connected
3103 through stdio.
3104
3105 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3106
3107 * lynx-low.c (lynx_add_threads_after_attach): New function.
3108 (lynx_attach): Remove call to add_thread. Add call to
3109 lynx_add_threads_after_attach instead.
3110
3111 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3112
3113 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3114 * config.in, configure: Regenerated.
3115
3116 2013-09-18 Yao Qi <yao@codesourcery.com>
3117
3118 PR server/15959
3119 * server.c (start_inferior): Clear 'resume_info'.
3120
3121 2013-09-16 Jiong Wang <jiwang@tilera.com>
3122
3123 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3124 for each register.
3125
3126 2013-09-16 Jiong Wang <jiwang@tilera.com>
3127
3128 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3129 linux-tile-low.o to srv_tgtobj.
3130
3131 2013-09-16 Will Newton <will.newton@linaro.org>
3132
3133 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3134 out regs.
3135
3136 2013-09-06 Pedro Alves <palves@redhat.com>
3137
3138 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3139 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3140 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3141 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3142 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3143 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3144
3145 2013-09-06 Pedro Alves <palves@redhat.com>
3146
3147 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3148 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3149
3150 2013-09-06 Pedro Alves <palves@redhat.com>
3151
3152 * linux-amd64-ipa.c: Include tracepoint.h.
3153 * linux-i386-ipa.c: Include tracepoint.h.
3154
3155 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3156
3157 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3158 (ps_get_thread_area): New function.
3159
3160 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3161
3162 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3163 (initialize_low_arch): Call init_registers_crisv32 rather than
3164 init_register_crisv32.
3165
3166 2013-09-05 Pedro Alves <palves@redhat.com>
3167
3168 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3169 to ...
3170 * hostio.h: ... this new file.
3171 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3172 win32-low.c: Include hostio.h.
3173
3174 2013-09-05 Pedro Alves <palves@redhat.com>
3175
3176 * server.h (gdb_client_data, handler_func, callback_handler_func)
3177 (delete_file_handler, add_file_handler, append_callback_event)
3178 (delete_callback_event, start_event_loop, initialize_event_loop):
3179 Move to event-loop.h and include it.
3180 * event-loop.h: New file.
3181
3182 2013-09-05 Pedro Alves <palves@redhat.com>
3183
3184 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3185 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3186 (loaded_dll, unloaded_dll): Move to ...
3187 * dll.h: ... this new file.
3188 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3189
3190 2013-09-05 Pedro Alves <palves@redhat.com>
3191
3192 * server.h (current_process, get_thread_process, all_processes)
3193 (add_inferior_to_list, for_each_inferior, current_inferior)
3194 (remove_inferior, add_process, remove_process, find_process_pid)
3195 (have_started_inferiors_p, have_attached_inferiors_p)
3196 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3197 (clear_inferiors, find_inferior, find_inferior_id)
3198 (inferior_target_data, set_inferior_target_data)
3199 (inferior_regcache_data, set_inferior_regcache_data): Move to
3200 inferiors.h, and include it.
3201 * inferiors.h: New file.
3202
3203 2013-09-05 Pedro Alves <palves@redhat.com>
3204
3205 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3206 Move ...
3207 * ax.h: ... here.
3208
3209 2013-09-05 Pedro Alves <palves@redhat.com>
3210
3211 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3212 tracepoint.h.
3213 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3214 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3215 (handle_tracepoint_general_set, handle_tracepoint_query)
3216 (tracepoint_finished_step, tracepoint_was_hit)
3217 (release_while_stepping_state_list, current_traceframe)
3218 (in_readonly_region, traceframe_read_mem)
3219 (fetch_traceframe_registers, traceframe_read_sdata)
3220 (traceframe_read_info, struct fast_tpoint_collect_status)
3221 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3222 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3223 (supply_fast_tracepoint_registers)
3224 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3225 (ipa_tdesc, claim_trampoline_space)
3226 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3227 (agent_mem_read, agent_get_trace_state_variable_value)
3228 (agent_set_trace_state_variable_value, agent_tsv_read)
3229 (agent_mem_read_string, get_raw_reg_func_addr)
3230 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3231 * tracepoint.h: ... this new file.
3232
3233 2013-09-05 Pedro Alves <palves@redhat.com>
3234
3235 * server.h (perror_with_name, error, fatal, warning, paddress)
3236 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3237 include it.
3238 * utils.h: New file.
3239
3240 2013-09-05 Pedro Alves <palves@redhat.com>
3241
3242 * server.h (remote_debug, noack_mode, transport_is_reliable)
3243 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3244 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3245 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3246 (write_enn, initialize_async_io, enable_async_io)
3247 (disable_async_io, check_remote_input_interrupt_request)
3248 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3249 (dead_thread_notify, prepare_resume_reply)
3250 (decode_address_to_semicolon, decode_address, decode_m_packet)
3251 (decode_M_packet, decode_X_packet, decode_xfer_write)
3252 (decode_search_memory_packet, unhexify, hexify)
3253 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3254 (look_up_one_symbol, relocate_instruction)
3255 (monitor_output): Move to remote-utils.h, and include it.
3256 * remote-utils.h: New file.
3257
3258 2013-09-05 Pedro Alves <palves@redhat.com>
3259
3260 * server.h (_): Delete.
3261
3262 2013-09-02 Pedro Alves <palves@redhat.com>
3263
3264 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3265 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3266 allocated.
3267 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3268
3269 2013-09-02 Pierre Muller <muller@sourceware.org>
3270
3271 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3272 or WriteProcessMemory complete successfully and handle
3273 ERROR_PARTIAL_COPY error.
3274
3275 2013-09-02 Pedro Alves <palves@redhat.com>
3276
3277 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3278 error instead of EIO.
3279
3280 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3281
3282 PR server/15604
3283 * linux-low.c: Include filestuff.h.
3284 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3285 * lynx-low.c: Include filestuff.h.
3286 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3287 * server.c: Include filestuff.h.
3288 (main): Call notice_open_fds.
3289 * spu-low.c: Include filestuff.h.
3290 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3291
3292 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3293
3294 * Makefile.in: Explain why ../target and ../nat are not
3295 listed as include file search paths.
3296 (linux-waitpid.o): New object file rule.
3297 * configure.srv (srv_native_linux_obj): New variable.
3298 Replace all occurrences of linux native object files with
3299 $srv_native_linux_obj.
3300 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3301 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3302 (linux_enable_event_reporting): Remove declaration.
3303 (my_waitpid): Moved to common/linux-waitpid.c.
3304 (linux_wait_for_event): Pass ptid when calling
3305 linux_enable_event_reporting.
3306 (linux_supports_tracefork_flag): Remove.
3307 (linux_enable_event_reporting): Likewise.
3308 (linux_tracefork_grandchild): Remove.
3309 (STACK_SIZE): Moved to common/linux-ptrace.c.
3310 (linux_tracefork_child): Remove.
3311 (linux_test_for_tracefork): Remove.
3312 (linux_look_up_symbols): Call linux_supports_traceclone.
3313 (initialize_low): Remove call to linux_test_for_tracefork.
3314 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3315 common/linux-ptrace.h.
3316 (PTRACE_TYPE_ARG4): Likewise.
3317 Include linux-ptrace.h.
3318
3319 2013-08-21 Pedro Alves <palves@redhat.com>
3320
3321 * config.in: Renegerate.
3322
3323 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3324
3325 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3326 (SFILES): Remove $(srcdir)/common/target-common.c and
3327 add $(srcdir)/target/waitstatus.c.
3328 (OBS): Remove target-common.o and add waitstatus.o.
3329 (server_h): Remove $(srcdir)/../common/target-common.h and
3330 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3331 and $(srcdir)/../target/waitstatus.h.
3332 (target-common.o): Remove.
3333 (waitstatus.o): New target object file.
3334 * target.h: Do not include target-common.h and
3335 include target/resume.h, target/wait.h and
3336 target/waitstatus.h.
3337
3338 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3339
3340 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3341 to PTRACE_TYPE_ARG3.
3342 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3343 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3344 PTRACE_TYPE_ARG4.
3345 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3346 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3347
3348 2013-07-27 Jie Zhang <jie@codesourcery.com>
3349 Daniel Jacobowitz <dan@codesourcery.com>
3350 Yao Qi <yao@codesourcery.com>
3351
3352 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3353 (mips-linux-watch.o): New rule.
3354 (mips_linux_watch_h): New variable.
3355 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3356 srv_tgtobj.
3357 * linux-mips-low.c: Include mips-linux-watch.h.
3358 (struct arch_process_info, struct arch_lwp_info): New.
3359 (update_watch_registers_callback): New function.
3360 (mips_linux_new_process, mips_linux_new_thread) New functions.
3361 (mips_linux_prepare_to_resume, mips_insert_point): New
3362 functions.
3363 (mips_remove_point, mips_stopped_by_watchpoint): New
3364 functions.
3365 (rsp_bp_type_to_target_hw_bp_type): New function.
3366 (mips_stopped_data_address): New function.
3367 (the_low_target): Add watchpoint support functions.
3368
3369 2013-07-27 Yao Qi <yao@codesourcery.com>
3370
3371 * i386-low.c: Include break-common.h.
3372 (enum target_hw_bp_type): Remove.
3373
3374 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3375
3376 * Makefile.in (SFILES): /common/target-common.c.
3377 (OBS): Add target-common.o.
3378 (server_h): Add $(srcdir)/../common/target-common.h.
3379 (target-common.o): New target.
3380 * server.c (queue_stop_reply_callback): Free
3381 status string after use.
3382 * target.c (target_waitstatus_to_string): Remove.
3383 * target.h: Include target-common.h.
3384 (resume_kind): Likewise.
3385 (target_waitkind): Likewise.
3386 (target_waitstatus): Likewise.
3387 (TARGET_WNOHANG): Likewise.
3388
3389 2013-07-04 Yao Qi <yao@codesourcery.com>
3390
3391 * Makefile.in (host_alias): Use @host_noncanonical@.
3392 (target_alias): Use @target_noncanonical@.
3393 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3394 ACX_NONCANONICAL_HOST.
3395 * configure: Regenerated.
3396
3397 Revert:
3398 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3399
3400 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3401 * configure: Rebuild.
3402 * Makefile.in (version_host, version_target): Get from configure.
3403 (version.c): Use $(version_host) and $(version_target).
3404
3405 2013-07-03 Pedro Alves <palves@redhat.com>
3406
3407 * Makefile.in (config.status): Depend on development.sh.
3408 * acinclude.m4: Include libmcheck.m4.
3409 * configure: Regenerate.
3410
3411 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3412
3413 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3414 attribute inside the parentheses.
3415 (winapi_DebugSetProcessKillOnExit): Ditto.
3416 (winapi_DebugBreakProcess): Ditto.
3417 (winapi_GenerateConsoleCtrlEvent): Ditto.
3418
3419 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3420
3421 * notif.h (notif_event): Add a dummy member to avoid compiler
3422 errors.
3423
3424 2013-07-01 Pedro Alves <palves@redhat.com>
3425
3426 * hostio.c (HOSTIO_PATH_MAX): Define.
3427 (require_filename, handle_open, handle_unlink, handle_readlink):
3428 Use it.
3429
3430 2013-07-01 Pedro Alves <palves@redhat.com>
3431
3432 * server.h: Include "pathmax.h".
3433 * linux-low.c: Don't include sys/param.h.
3434 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3435 MAXPATHLEN.
3436 * win32-low.c: Don't include sys/param.h.
3437 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3438
3439 2013-07-01 Pedro Alves <palves@redhat.com>
3440
3441 * event-loop.c: Don't check HAVE_UNISTD_H before including
3442 <unistd.h>.
3443 * gdbreplay.c: Likewise.
3444 * remote-utils.c: Likewise.
3445 * server.c: Likewise.
3446 * configure.ac: Don't check for unistd.h.
3447 * configure: Regenerate.
3448
3449 2013-06-28 Tom Tromey <tromey@redhat.com>
3450
3451 * Makefile.in (version.c): Use version.in, not
3452 common/version.in.
3453
3454 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3455
3456 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3457 * configure: Rebuild.
3458 * Makefile.in (version_host, version_target): Get from configure.
3459 (version.c): Use $(version_host) and $(version_target).
3460
3461 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3462
3463 Fix trace-status to output user name without trailing colon.
3464 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3465
3466 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3467
3468 Fix trace-status to output proper start-time and stop-time.
3469 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3470 output start time and stop time in hex as gdb expects.
3471
3472 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3473
3474 * tracepoint.c (build_traceframe_info_xml): Output trace state
3475 variables present in the trace buffer.
3476
3477 2013-06-24 Tom Tromey <tromey@redhat.com>
3478
3479 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3480 create-version.sh.
3481 (version.o): Remove.
3482 * gdbreplay.c: Include version.h.
3483 (version, host_name): Don't declare.
3484 * server.h: Include version.h.
3485 (version, host_name): Don't declare.
3486
3487 2013-06-12 Pedro Alves <palves@redhat.com>
3488
3489 * linux-x86-low.c (linux_is_elf64): Delete global.
3490 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3491 with local linux_pid_exe_is_elf_64_file use.
3492
3493 2013-06-11 Pedro Alves <palves@redhat.com>
3494
3495 * linux-low.c (regset_disabled, disable_regset): New functions.
3496 (regsets_fetch_inferior_registers)
3497 (regsets_store_inferior_registers): Use them.
3498 (initialize_regsets_info); Don't allocate the disabled_regsets
3499 array here.
3500 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3501 comment.
3502
3503 2013-06-11 Pedro Alves <palves@redhat.com>
3504
3505 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3506 xmalloc.
3507
3508 2013-06-11 Pedro Alves <palves@redhat.com>
3509
3510 * linux-x86-low.c (initialize_low_arch): Call
3511 init_registers_x32_avx_linux.
3512
3513 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3514
3515 Fix compatibility with Android Bionic.
3516 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3517 it is not empty.
3518
3519 2013-06-07 Pedro Alves <palves@redhat.com>
3520
3521 PR server/14823
3522 * Makefile.in (OBS): Add tdesc.o.
3523 (IPA_OBJS): Add tdesc-ipa.o.
3524 (tdesc-ipa.o): New rule.
3525 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3526 interface.
3527 * linux-low.c (new_inferior): Delete.
3528 (disabled_regsets, num_regsets): Delete.
3529 (linux_add_process): Adjust to set the new per-process
3530 new_inferior flag.
3531 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3532 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3533 was a stop. When calling arch_setup, switch the current inferior
3534 to the thread that got an event.
3535 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3536 (regsets_fetch_inferior_registers)
3537 (regsets_store_inferior_registers): New regsets_info parameter.
3538 Adjust to use it.
3539 (linux_register_in_regsets): New regs_info parameter. Adjust to
3540 use it.
3541 (register_addr, fetch_register, store_register): New usrregs_info
3542 parameter. Adjust to use it.
3543 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3544 parameter regs_info. Adjust to use it.
3545 (linux_fetch_registers): Get the current inferior's regs_info, and
3546 adjust to use it.
3547 (linux_store_registers): Ditto.
3548 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3549 (initialize_low): Don't initialize the target_regsets here. Call
3550 initialize_low_arch.
3551 * linux-low.h (target_regsets): Delete declaration.
3552 (struct regsets_info): New.
3553 (struct usrregs_info): New.
3554 (struct regs_info): New.
3555 (struct process_info_private) <new_inferior>: New field.
3556 (struct linux_target_ops): Delete the num_regs, regmap, and
3557 regset_bitmap fields. New field regs_info.
3558 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3559 * i387-fp.c (num_xmm_registers): Delete.
3560 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3561 calls to new interface.
3562 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3563 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3564 Infer the number of xmm registers from the regcache's target
3565 description.
3566 * i387-fp.h (num_xmm_registers): Delete.
3567 * inferiors.c (add_thread): Don't install the thread's regcache
3568 here.
3569 * proc-service.c (gregset_info): Fetch the current inferior's
3570 regs_info. Adjust to use it.
3571 * regcache.c: Include tdesc.h.
3572 (register_bytes, reg_defs, num_registers)
3573 (gdbserver_expedite_regs): Delete.
3574 (get_thread_regcache): If the thread doesn't have a regcache yet,
3575 create one, instead of aborting gdbserver.
3576 (regcache_invalidate_one): Rename to ...
3577 (regcache_invalidate_thread): ... this.
3578 (regcache_invalidate_one): New.
3579 (regcache_invalidate): Only invalidate registers of the current
3580 process.
3581 (init_register_cache): Add target_desc parameter, and use it.
3582 (new_register_cache): Ditto. Assert the target description has a
3583 non zero registers_size.
3584 (regcache_cpy): Add assertions. Adjust.
3585 (realloc_register_cache, set_register_cache): Delete.
3586 (registers_to_string, registers_from_string): Adjust.
3587 (find_register_by_name, find_regno, find_register_by_number)
3588 (register_cache_size): Add target_desc parameter, and use it.
3589 (free_register_cache_thread, free_register_cache_thread_one)
3590 (regcache_release, register_cache_size): New.
3591 (register_size): Add target_desc parameter, and use it.
3592 (register_data, supply_register, supply_register_zeroed)
3593 (supply_regblock, supply_register_by_name, collect_register)
3594 (collect_register_as_string, collect_register_by_name): Adjust.
3595 * regcache.h (struct target_desc): Forward declare.
3596 (struct regcache) <tdesc>: New field.
3597 (init_register_cache, new_register_cache): Add target_desc
3598 parameter.
3599 (regcache_invalidate_thread): Declare.
3600 (regcache_invalidate_one): Delete declaration.
3601 (regcache_release): Declare.
3602 (find_register_by_number, register_cache_size, register_size)
3603 (find_regno): Add target_desc parameter.
3604 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3605 declarations.
3606 * remote-utils.c: Include tdesc.h.
3607 (outreg, prepare_resume_reply): Adjust.
3608 * server.c: Include tdesc.h.
3609 (gdbserver_xmltarget): Delete declaration.
3610 (get_features_xml, process_serial_event): Adjust.
3611 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3612 declare.
3613 (struct process_info) <tdesc>: New field.
3614 (ipa_tdesc): Declare.
3615 * tdesc.c: New file.
3616 * tdesc.h: New file.
3617 * tracepoint.c: Include tdesc.h.
3618 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3619 (get_context_regcache): Adjust to pass ipa_tdesc down.
3620 (do_action_at_tracepoint): Adjust to get the register cache size
3621 from the context regcache's description.
3622 (traceframe_walk_blocks): Adjust to get the register cache size
3623 from the current trace frame's description.
3624 (traceframe_get_pc): Adjust to get current trace frame's
3625 description and pass it down.
3626 (gdb_collect): Adjust to get the register cache size from the
3627 IPA's description.
3628 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3629 (gdbserver_xmltarget): Delete.
3630 (initialize_low_tracepoint): Set the ipa's target description.
3631 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3632 (initialize_low_tracepoint): Set the ipa's target description.
3633 * linux-x86-low.c: Include tdesc.h.
3634 [__x86_64__] (is_64bit_tdesc): New.
3635 (ps_get_thread_area, x86_get_thread_area): Use it.
3636 (i386_cannot_store_register): Rename to ...
3637 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3638 (i386_cannot_fetch_register): Rename to ...
3639 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3640 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3641 to new interface.
3642 (target_regsets): Rename to ...
3643 (x86_regsets): ... this.
3644 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3645 interface.
3646 (x86_siginfo_fixup): Use is_64bit_tdesc.
3647 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3648 (tdesc_x32_avx_linux, tdesc_x32_linux)
3649 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3650 Declare.
3651 (x86_linux_update_xmltarget): Delete.
3652 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3653 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3654 (AMD64_LINUX_USER64_CS): New.
3655 (x86_linux_read_description): New, based on
3656 x86_linux_update_xmltarget.
3657 (same_process_callback): New.
3658 (x86_arch_setup_process_callback): New.
3659 (x86_linux_update_xmltarget): New.
3660 (x86_regsets_info): New.
3661 (amd64_linux_regs_info): New.
3662 (i386_linux_usrregs_info): New.
3663 (i386_linux_regs_info): New.
3664 (x86_linux_regs_info): New.
3665 (x86_arch_setup): Reimplement.
3666 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3667 (x86_emit_ops): Ditto.
3668 (the_low_target): Adjust. Install x86_linux_regs_info,
3669 x86_cannot_fetch_register, and x86_cannot_store_register.
3670 (initialize_low_arch): New.
3671 * linux-ia64-low.c (tdesc_ia64): Declare.
3672 (ia64_fetch_register): Adjust.
3673 (ia64_usrregs_info, regs_info): New globals.
3674 (ia64_regs_info): New function.
3675 (the_low_target): Adjust.
3676 (initialize_low_arch): New function.
3677 * linux-sparc-low.c (tdesc_sparc64): Declare.
3678 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3679 Adjust.
3680 (sparc_arch_setup): New function.
3681 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3682 (the_low_target): Adjust.
3683 (initialize_low_arch): New function.
3684 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3685 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3686 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3687 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3688 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3689 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3690 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3691 (tdesc_powerpc_isa205_vsx64l): Declare.
3692 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3693 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3694 (ppc_set_pc, ppc_get_hwcap): Adjust.
3695 (ppc_usrregs_info): Forward declare.
3696 (!__powerpc64__) ppc_regmap_adjusted: New global.
3697 (ppc_arch_setup): Adjust to the current process'es target
3698 description.
3699 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3700 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3701 (ppc_store_evrregset): Adjust.
3702 (target_regsets): Rename to ...
3703 (ppc_regsets): ... this, and make static.
3704 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3705 (ppc_regs_info): New function.
3706 (the_low_target): Adjust.
3707 (initialize_low_arch): New function.
3708 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3709 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3710 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3711 (tdesc_s390x_linux64v2): Declare.
3712 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3713 (s390_fill_gregset, s390_store_last_break): Adjust.
3714 (target_regsets): Rename to ...
3715 (s390_regsets): ... this, and make static.
3716 (s390_get_pc, s390_set_pc): Adjust.
3717 (s390_get_hwcap): New target_desc parameter, and use it.
3718 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3719 (s390_arch_setup): Adjust to set the current process'es target
3720 description. Don't adjust the regmap.
3721 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3722 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3723 (regs_info_3264): New globals.
3724 (s390_regs_info): New function.
3725 (the_low_target): Adjust.
3726 (initialize_low_arch): New function.
3727 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3728 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3729 [__mips64] (init_registers_mips_linux)
3730 (init_registers_mips_dsp_linux): Delete defines.
3731 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3732 (have_dsp): New global.
3733 (mips_read_description): New, based on mips_arch_setup.
3734 (mips_arch_setup): Reimplement.
3735 (get_usrregs_info): New function.
3736 (mips_cannot_fetch_register, mips_cannot_store_register)
3737 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3738 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3739 (target_regsets): Rename to ...
3740 (mips_regsets): ... this, and make static.
3741 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3742 (dsp_regs_info, regs_info): New globals.
3743 (mips_regs_info): New function.
3744 (the_low_target): Adjust.
3745 (initialize_low_arch): New function.
3746 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3747 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3748 Declare.
3749 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3750 (arm_read_description): New, with bits factored from
3751 arm_arch_setup.
3752 (arm_arch_setup): Reimplement.
3753 (target_regsets): Rename to ...
3754 (arm_regsets): ... this, and make static.
3755 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3756 (arm_regs_info): New function.
3757 (the_low_target): Adjust.
3758 (initialize_low_arch): New function.
3759 * linux-m68k-low.c (tdesc_m68k): Declare.
3760 (target_regsets): Rename to ...
3761 (m68k_regsets): ... this, and make static.
3762 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3763 (m68k_regs_info): New function.
3764 (m68k_arch_setup): New function.
3765 (the_low_target): Adjust.
3766 (initialize_low_arch): New function.
3767 * linux-sh-low.c (tdesc_sharch): Declare.
3768 (target_regsets): Rename to ...
3769 (sh_regsets): ... this, and make static.
3770 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3771 (sh_regs_info, sh_arch_setup): New functions.
3772 (the_low_target): Adjust.
3773 (initialize_low_arch): New function.
3774 * linux-bfin-low.c (tdesc_bfin): Declare.
3775 (bfin_arch_setup): New function.
3776 (bfin_usrregs_info, regs_info): New globals.
3777 (bfin_regs_info): New function.
3778 (the_low_target): Adjust.
3779 (initialize_low_arch): New function.
3780 * linux-cris-low.c (tdesc_cris): Declare.
3781 (cris_arch_setup): New function.
3782 (cris_usrregs_info, regs_info): New globals.
3783 (cris_regs_info): New function.
3784 (the_low_target): Adjust.
3785 (initialize_low_arch): New function.
3786 * linux-cris-low.c (tdesc_crisv32): Declare.
3787 (cris_arch_setup): New function.
3788 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3789 (cris_regs_info): New function.
3790 (the_low_target): Adjust.
3791 (initialize_low_arch): New function.
3792 * linux-m32r-low.c (tdesc_m32r): Declare.
3793 (m32r_arch_setup): New function.
3794 (m32r_usrregs_info, regs_info): New globals.
3795 (m32r_regs_info): Adjust.
3796 (initialize_low_arch): New function.
3797 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3798 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3799 (tic6x_usrregs_info): Forward declare.
3800 (tic6x_read_description): New function, based on ...
3801 (tic6x_arch_setup): ... this. Reimplement.
3802 (target_regsets): Rename to ...
3803 (tic6x_regsets): ... this, and make static.
3804 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3805 (tic6x_regs_info): New function.
3806 (the_low_target): Adjust.
3807 (initialize_low_arch): New function.
3808 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3809 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3810 (target_regsets): Rename to ...
3811 (xtensa_regsets): ... this, and make static.
3812 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3813 globals.
3814 (xtensa_arch_setup, xtensa_regs_info): New functions.
3815 (the_low_target): Adjust.
3816 (initialize_low_arch): New function.
3817 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3818 (nios2_arch_setup): Set the current process'es tdesc.
3819 (target_regsets): Rename to ...
3820 (nios2_regsets): ... this.
3821 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3822 (nios2_regs_info): New function.
3823 (the_low_target): Adjust.
3824 (initialize_low_arch): New function.
3825 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3826 (aarch64_arch_setup): Set the current process'es tdesc.
3827 (target_regsets): Rename to ...
3828 (aarch64_regsets): ... this.
3829 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3830 (aarch64_regs_info): New function.
3831 (the_low_target): Adjust.
3832 (initialize_low_arch): New function.
3833 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3834 globals.
3835 (target_regsets): Rename to ...
3836 (tile_regsets): ... this.
3837 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3838 (tile_regs_info): New function.
3839 (tile_arch_setup): Set the current process'es tdesc.
3840 (the_low_target): Adjust.
3841 (initialize_low_arch): New function.
3842 * spu-low.c (tdesc_spu): Declare.
3843 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3844 * win32-arm-low.c (tdesc_arm): Declare.
3845 (arm_arch_setup): New function.
3846 (the_low_target): Install arm_arch_setup instead of
3847 init_registers_arm.
3848 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3849 (init_windows_x86): Rename to ...
3850 (i386_arch_setup): ... this. Set `win32_tdesc'.
3851 (the_low_target): Adjust.
3852 * win32-low.c (win32_tdesc): New global.
3853 (child_add_thread): Don't create the thread cache here.
3854 (do_initial_child_stuff): Set the new process'es tdesc.
3855 * win32-low.h (struct target_desc): Forward declare.
3856 (win32_tdesc): Declare.
3857 * lynx-i386-low.c (tdesc_i386): Declare global.
3858 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3859 * lynx-low.c (lynx_tdesc): New global.
3860 (lynx_add_process): Set the new process'es tdesc.
3861 * lynx-low.h (struct target_desc): Forward declare.
3862 (lynx_tdesc): Declare global.
3863 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3864 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3865 * nto-low.c (nto_tdesc): New global.
3866 (do_attach): Set the new process'es tdesc.
3867 * nto-low.h (struct target_desc): Forward declare.
3868 (nto_tdesc): Declare.
3869 * nto-x86-low.c (tdesc_i386): Declare.
3870 (nto_x86_arch_setup): Set `nto_tdesc'.
3871
3872 2013-06-04 Gary Benson <gbenson@redhat.com>
3873
3874 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3875 to qSupported response when appropriate.
3876 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3877 with nonzero-length annex.
3878 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3879 arguments supplied in annex.
3880
3881 2013-05-31 Doug Evans <dje@google.com>
3882
3883 PR server/15594
3884 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3885 64 bits in 64-cross-32 environment.
3886
3887 2013-05-28 Pedro Alves <palves@redhat.com>
3888
3889 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3890 (aarch64-without-fpu.c): Delete rule.
3891 * configure.srv (aarch64*-*-linux*): Remove references to
3892 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3893 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3894 declaration.
3895
3896 2013-05-24 Pedro Alves <palves@redhat.com>
3897
3898 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3899 instead of strchr/decode_address. Error if the range isn't split
3900 with a ','. Don't assume there's be a ':' in the action.
3901
3902 2013-05-23 Yao Qi <yao@codesourcery.com>
3903 Pedro Alves <palves@redhat.com>
3904
3905 * linux-low.c (lwp_in_step_range): New function.
3906 (linux_wait_1): If the thread was range stepping and stopped
3907 outside the stepping range, report the stop to GDB. Otherwise,
3908 continue stepping. Add range stepping debug output.
3909 (linux_set_resume_request): Copy the step range from the resume
3910 request to the lwp.
3911 (linux_supports_range_stepping): New.
3912 (linux_target_ops) <supports_range_stepping>: Set to
3913 linux_supports_range_stepping.
3914 * linux-low.h (struct linux_target_ops)
3915 <supports_range_stepping>: New field.
3916 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3917 * linux-x86-low.c (x86_supports_range_stepping): New.
3918 (the_low_target) <supports_range_stepping>: Set to
3919 x86_supports_range_stepping.
3920 * server.c (handle_v_cont): Handle 'r' action.
3921 (handle_v_requests): Append ";r" if the target supports range
3922 stepping.
3923 * target.h (struct thread_resume) <step_range_start,
3924 step_range_end>: New fields.
3925 (struct target_ops) <supports_range_stepping>:
3926 New field.
3927 (target_supports_range_stepping): New macro.
3928
3929 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3930
3931 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3932 confusion in comment.
3933
3934 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3935
3936 * lynx-low.c (struct process_info_private): New type.
3937 (lynx_add_process): New function.
3938 (lynx_create_inferior, lynx_attach): Replace calls to
3939 add_process by calls to lynx_add_process.
3940 (lynx_resume): If PTID is null, then try using
3941 current_process()->private->last_wait_event_ptid.
3942 Add comments.
3943 (lynx_clear_inferiors): Delete. The contents of that function
3944 has been inlined in lynx_mourn;
3945 (lynx_wait_1): Save the ptid in the process's private data.
3946 (lynx_mourn): Free the process' private data. Replace call
3947 to lynx_clear_inferiors by call to clear_inferiors.
3948
3949 2013-05-17 Yao Qi <yao@codesourcery.com>
3950
3951 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3952 the right place.
3953
3954 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3955
3956 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3957 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3958 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3959 PT_TEXT_END_ADDR guards. Update comments.
3960 (linux_target_op) <read_offsets>: Conditionally define to
3961 linux_read_offsets if the target is UCLIBC and if it defines
3962 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3963
3964 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3965 Andrew Jenner <andrew@codesourcery.com>
3966
3967 * Makefile.in (SFILES): Add linux-nios2-low.c.
3968 (clean): Add action to delete nios2-linux.c.
3969 (nios2-linux.c): New rule.
3970 * configure.srv: Add nios2*-*-linux*.
3971 * linux-nios2-low.c: New.
3972
3973 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3974
3975 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3976
3977 2013-04-25 Hui Zhu <hui@codesourcery.com>
3978
3979 PR gdb/15186
3980 * ax.c (ax_printf): Add fflush.
3981
3982 2013-04-22 Tom Tromey <tromey@redhat.com>
3983
3984 * Makefile.in (SFILES): Add filestuff.c.
3985 (OBS): Add filestuff.o.
3986 (filestuff.o): New target.
3987 * config.in, configure: Rebuild.
3988 * configure.ac: Check for fdwalk, pipe2.
3989
3990 2013-04-17 Pedro Alves <palves@redhat.com>
3991
3992 * configure.ac (USE_THREAD_DB): Delete variable.
3993 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3994 Don't AC_SUBST USE_THREAD_DB.
3995 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3996 * config.in, configure: Regenerate.
3997
3998 2013-04-16 Pedro Alves <palves@redhat.com>
3999
4000 * linux-low.h (struct lwp_info) <thread_known>: Move under
4001 the USE_THREAD_DB #ifdef.
4002
4003 2013-04-16 Pedro Alves <palves@redhat.com>
4004
4005 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4006 (linux-low.o): Delete rule.
4007 * linux-low.h: Always include "gdb_thread_db.h" instead of
4008 conditionally including thread_db.h.
4009 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4010 HAVE_THREAD_DB_H.
4011
4012 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4013
4014 * Makefile.in (install-only): Fix make install regression.
4015
4016 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4017
4018 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4019 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4020 installation.
4021 * gdbserver.1: Remove.
4022
4023 2013-03-22 Pedro Alves <palves@redhat.com>
4024
4025 * linux-low.c (handle_extended_wait): Don't call
4026 linux_enable_event_reporting.
4027
4028 2013-03-15 Tony Theodore <tonyt@logyst.com>
4029
4030 PR build/9098:
4031 * Makefile.in (SHELL): Use @SHELL@.
4032
4033 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4034
4035 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4036 compiler warning.
4037
4038 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4039
4040 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4041 Remove extraneous NULL element.
4042
4043 2013-03-13 Yao Qi <yao@codesourcery.com>
4044
4045 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4046 'V' block in trace frame.
4047
4048 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4049
4050 * target.h (struct target_ops): Add btrace ops.
4051 (target_supports_btrace): New macro.
4052 (target_enable_btrace): New macro.
4053 (target_disable_btrace): New macro.
4054 (target_read_btrace): New macro.
4055 * gdbthread.h (struct thread_info): Add btrace field.
4056 * server.c: Include btrace-common.h.
4057 (handle_btrace_general_set): New function.
4058 (handle_btrace_enable): New function.
4059 (handle_btrace_disable): New function.
4060 (handle_general_set): Call handle_btrace_general_set.
4061 (handle_qxfer_btrace): New function.
4062 (struct qxfer qxfer_packets[]): Add btrace entry.
4063 * inferiors.c (remove_thread): Disable btrace.
4064 * linux-low: Include linux-btrace.h.
4065 (linux_low_enable_btrace): New function.
4066 (linux_low_read_btrace): New function.
4067 (linux_target_ops): Add btrace ops.
4068 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4069 Add srv_linux_btrace=yes.
4070 (x86_64-*-linux*): Add linux-btrace.o.
4071 Add srv_linux_btrace=yes.
4072 * configure.ac: Define HAVE_LINUX_BTRACE.
4073 * config.in: Regenerated.
4074 * configure: Regenerated.
4075
4076 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4077
4078 * server.c (handle_qxfer): Preserve error message if -3 is
4079 returned.
4080 (qxfer): Document the -3 return value.
4081
4082 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4083
4084 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4085 (linux_btrace_h): New variable.
4086 (linux-btrace.o): New rule.
4087
4088 2013-03-08 Stan Shebs <stan@codesourcery.com>
4089 Hafiz Abid Qadeer <abidh@codesourcery.com>
4090
4091 * tracepoint.c (trace_buffer_size): New global.
4092 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4093 (init_trace_buffer): Change to one-argument function. Allocate
4094 trace buffer memory.
4095 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4096 handle QTBuffer:size packet.
4097 (cmd_bigqtbuffer_size): New function.
4098 (initialize_tracepoint): Call init_trace_buffer with
4099 DEFAULT_TRACE_BUFFER_SIZE.
4100 * server.c (handle_query): Add QTBuffer:size in the
4101 supported packets.
4102
4103 2013-03-07 Yao Qi <yao@codesourcery.com>
4104
4105 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4106 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4107 of -1.
4108 (cmd_qtsp): Adjust condition. Do post increment.
4109 Set cur_action and cur_step_action back to 0.
4110
4111 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4112
4113 PR server/15236
4114 * linux-low.c (linux_write_memory): Return early success if LEN is
4115 zero.
4116
4117 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4118
4119 * configure.srv: Add x86_64-*-cygwin* as target.
4120
4121 2013-02-28 Tom Tromey <tromey@redhat.com>
4122
4123 * configure.ac: Invoke AC_SYS_LARGEFILE.
4124 * configure, config.in: Rebuild.
4125
4126 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4127
4128 * win32-low.c: Throughout, fix format strings and casts of
4129 printf-like functions to avoid type related warnings on all
4130 platforms.
4131 (get_child_debug_event): Print dwDebugEventCode as hex since
4132 that's how it's usually documented.
4133
4134 2013-02-28 Yao Qi <yao@codesourcery.com>
4135
4136 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4137 pulongest.
4138
4139 2013-02-27 Jiong Wang <jiwang@tilera.com>
4140
4141 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4142 (reg-tilegx32.c): New rule.
4143 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4144 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4145 different register info initializer according to elf class.
4146 (init_registers_tilgx32): New function. The tilegx32 register info
4147 initializer.
4148 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4149 (tile_store_gregset): Likewise.
4150
4151 2013-02-27 Yao Qi <yao@codesourcery.com>
4152
4153 * server.c (process_point_options): Print debug message when
4154 debug_threads is true.
4155
4156 2013-02-26 Yao Qi <yao@codesourcery.com>
4157
4158 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4159
4160 2013-02-19 Pedro Alves <palves@redhat.com>
4161 Kai Tietz <ktietz@redhat.com>
4162
4163 PR gdb/15161
4164
4165 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4166 instead of strtoul to extract address from packet.
4167 (process_serial_event) <'z'>: Likewise.
4168
4169 2013-02-18 Yao Qi <yao@codesourcery.com>
4170
4171 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4172
4173 2013-02-14 Pedro Alves <palves@redhat.com>
4174
4175 Plug memory leak.
4176
4177 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4178 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4179
4180 2013-02-14 Pedro Alves <palves@redhat.com>
4181
4182 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4183
4184 2013-02-14 Pedro Alves <palves@redhat.com>
4185
4186 * tracepoint.c (save_string): Delete.
4187 (add_tracepoint_action): Use savestring instead of save_string.
4188
4189 2013-02-12 Pedro Alves <palves@redhat.com>
4190
4191 * linux-xtensa-low.c: Ditto.
4192 * xtensa-xtregs.c: Ditto.
4193
4194 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4195
4196 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4197 thread_db.
4198
4199 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4200
4201 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4202 aarch64_num_wp_regs and aarch64_num_bp_regs to
4203 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4204
4205 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4206
4207 * linux-aarch64-low.c (ps_get_thread_area): Replace
4208 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4209
4210 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4211 Marcus Shawcroft <marcus.shawcroft@arm.com>
4212 Nigel Stephens <nigel.stephens@arm.com>
4213 Yufeng Zhang <yufeng.zhang@arm.com>
4214
4215 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4216 (aarch64.c, aarch64-without-fpu.c): New targets.
4217 * configure.srv (aarch64*-*-linux*): New.
4218 * linux-aarch64-low.c: New file.
4219
4220 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4221
4222 * linux-low.c (handle_extended_wait, linux_create_inferior)
4223 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4224 (dequeue_one_deferred_signal, linux_resume_one_thread)
4225 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4226 (linux_tracefork_grandchild, linux_test_for_tracefork)
4227 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4228 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4229 where the argument is 0.
4230
4231 2013-01-25 Yao Qi <yao@codesourcery.com>
4232
4233 * event-loop.c: Include "queue.h".
4234 (gdb_event_p): New typedef.
4235 (struct gdb_event) <next_event>: Remove.
4236 (event_queue): Change to QUEUE(gdb_event_p).
4237 (async_queue_event): Remove.
4238 (gdb_event_xfree): New.
4239 (initialize_event_loop): New.
4240 (process_event): Use API from QUEUE.
4241 (wait_for_event): Likewise.
4242 * server.c (main): Call initialize_event_loop.
4243 * server.h (initialize_event_loop): Declare.
4244
4245 2013-01-18 Yao Qi <yao@codesourcery.com>
4246
4247 * ax.h (struct eval_agent_expr_context): New.
4248 (gdb_eval_agent_expr): Update declaration.
4249 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4250 TFRAME. Add new argument CTX.
4251 * server.h (struct eval_agent_expr_context): Declare.
4252 (agent_mem_read, agent_tsv_read): Update declaration.
4253 (agent_mem_read_string): Likewise.
4254 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4255 (add_traceframe_block): Add new argument TPOINT.
4256 Increase TPOINT->traceframe_usage.
4257 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4258 eval_tracepoint_agent_expr.
4259 (condition_true_at_tracepoint): Likewise.
4260 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4261 (agent_mem_read_string, agent_tsv_read): Likewise.
4262
4263 2013-01-16 Yao Qi <yao@codesourcery.com>
4264
4265 * linux-low.c (linux_resume_one_lwp): Don't check
4266 'lwp->bp_reinsert != 0'.
4267
4268 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4269 Pedro Alves <palves@redhat.com>
4270
4271 * lynx-low.c (ptrace_request_to_str): Define a temporary
4272 macro and use it to simplify this function's implementation.
4273
4274 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4275
4276 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4277 sets errno.
4278
4279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4280
4281 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4282
4283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4284
4285 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4286
4287 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4288
4289 * lynx-low.c (lynx_resume): Use the resume_info parameter
4290 to determine the ptid for the lynx_ptrace call, unless
4291 it is equal to minus_one_ptid, in which case we use the
4292 ptid of the current_inferior.
4293 (lynx_wait_1): After having received a thread create/exit
4294 event, resume the inferior's execution using the signaling
4295 thread's ptid, rather than the old ptid.
4296
4297 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4298
4299 * lynx-low.c (lynx_resume): Delete variable ret.
4300
4301 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4302
4303 * gdbreplay.c (gdbreplay_version): Update copyright year.
4304 * server.c (gdbserver_version): Likewise.
4305
4306 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4307
4308 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4309 new thread.
4310
4311 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4312
4313 * lynx-low.c (ptrace_request_to_str): Add handling for
4314 PTRACE_GETTRACESIG.
4315
4316 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4317
4318 * lynx-low.c (lynx_attach): Delete variable new_process.
4319
4320 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4321
4322 * lynx-low.c (lynx_create_inferior): Delete variable
4323 new_process.
4324
4325 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4326
4327 * lynx-low.c (ptrace_request_to_str): Do not handle
4328 PTRACE_GETTHREADLIST if this macro does not exist.
4329
4330 2012-12-15 Yao Qi <yao@codesourcery.com>
4331
4332 * Makefile.in (OBS): Add notif.o.
4333 * notif.c, notif.h: New.
4334 * server.c: Include "notif.h".
4335 (struct vstop_notif) <next>: Remove.
4336 <base>: New field.
4337 (queue_stop_reply): Update.
4338 (push_event, send_next_stop_reply): Remove.
4339 (discard_queued_stop_replies): Update.
4340 (notif_stop): New variable.
4341 (handle_v_stopped): Remove.
4342 (handle_v_requests): Don't call handle_v_stopped. Call
4343 handle_ack_notif instead.
4344 (queue_stop_reply_callback): Call notif_event_enque instead
4345 of queue_stop_reply.
4346 (handle_status): Don't call send_next_stop_reply, call
4347 notif_write_event instead.
4348 (kill_inferior_callback): Likewise.
4349 (detach_or_kill_inferior_callback): Likewise.
4350 (main): Call initialize_notif.
4351 (process_serial_event): Call QUEUE_is_empty.
4352 (handle_target_event): Call notif_push instead of push event.
4353 * server.h (push_event): Remove declaration.
4354
4355 2012-12-10 Tom Tromey <tromey@redhat.com>
4356
4357 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4358 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4359 macros.
4360 (.c.o): Rewrite.
4361 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4362 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4363 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4364 (amd64-linux-ipa.o, ax.o): Rewrite.
4365 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4366 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4367 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4368 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4369 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4370 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4371 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4372 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4373 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4374 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4375 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4376 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4377 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4378 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4379 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4380 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4381 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4382 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4383 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4384 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4385 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4386 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4387 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4388 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4389 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4390 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4391 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4392 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4393 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4394 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4395 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4396 (reg-tilegx.o): Remove.
4397 (all_object_files): New macro.
4398 Include .deps files.
4399 * aclocal.m4, configure: Rebuild.
4400 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4401 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4402 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4403
4404 2012-12-05 Tom Tromey <tromey@redhat.com>
4405
4406 PR gdb/14917:
4407 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4408
4409 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4410
4411 * configure.ac: Check for linux/perf_event.h.
4412 * config.in: Regenerated.
4413 * configure: Regenerated.
4414
4415 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4416
4417 * hostio.c (handle_readlink): Decrease buffer size
4418 parameter passed to readlink by one byte.
4419
4420 2012-11-26 Yao Qi <yao@codesourcery.com>
4421
4422 * configure.ac (build_warnings): Append '-Wempty-body'.
4423 * configure: Regenerated.
4424 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4425 body.
4426
4427 2012-11-15 Pierre Muller <muller@sourceware.org>
4428
4429 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4430 * config.in: Regenerate.
4431 * configure: Regenerate.
4432 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4433 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4434 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4435 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4436 header.
4437 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4438 instead of <sys/wait.h> header.
4439 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4440
4441 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4442
4443 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4444 (various make rules): Remove -DGDBSERVER
4445
4446 2012-11-09 Yao Qi <yao@codesourcery.com>
4447
4448 * spu-low.c (current_ptid): Move it to ..
4449 * gdbthread.h: ... here. New.
4450 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4451 * server.c (myresume, process_serial_event): Likewise.
4452 * thread-db.c (thread_db_find_new_threads): Likewise.
4453 * tracepoint.c (run_inferior_command): Likewise.
4454
4455 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4456
4457 * server.c (handle_search_memory_1): Include access length in
4458 warning message.
4459
4460 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4461
4462 * linux-crisv32-low.c: Fix compile errors.
4463
4464 2012-09-04 Yao Qi <yao@codesourcery.com>
4465
4466 * tracepoint.c (cmd_qtsv): Adjust debug message.
4467 Don't check CUR_TPOINT.
4468
4469 2012-08-28 Yao Qi <yao@codesourcery.com>
4470
4471 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4472 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4473 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4474 Remove declarations of xmalloc, xreallloc, xstrdup and
4475 freeargv.
4476 * Makefile.in (libiberty_h): New.
4477 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4478 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4479
4480 2012-08-23 Yao Qi <yao@codesourcery.com>
4481
4482 * server.h: Remove declaration of 'xsnprintf'.
4483
4484 2012-08-22 Keith Seitz <keiths@redhat.com>
4485
4486 * server.h: Include build-gnulib-gbserver/config.h.
4487 * gdbreplay.c: Likewise.
4488
4489 2012-08-08 Doug Evans <dje@google.com>
4490
4491 * Makefile.in (SFILES): Add gdb_vecs.c.
4492 (OBS): Add gdb_vecs.o.
4493 (gdb_vecs_h, host_defs_h): New variables.
4494 (thread-db.o): Add $(gdb_vecs_h) dependency.
4495 (gdb_vecs.o): New rule.
4496 * thread-db.c: #include "gdb_vecs.h".
4497 (thread_db_load_search): Use a vector to iterate over path elements.
4498 Handle text appearing after "$pdir".
4499
4500 * configure.ac: Add check for strstr.
4501 * config.in: Regenerate.
4502 * configure: Regenerate.
4503
4504 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4505
4506 * hostio.c (handle_pread): If pread fails, fall back to attempting
4507 lseek/read.
4508 (handle_pwrite): Likewise for pwrite.
4509
4510 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4511
4512 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4513 between unsupported TYPE and unimplementable ADDR/LEN combination.
4514 (arm_insert_point): Act on new return value.
4515
4516 2012-07-31 Pedro Alves <palves@redhat.com>
4517
4518 * server.c (process_point_options): Only skip tokens if we find
4519 one that is unrecognized. Don't treat 'X' specially while
4520 skipping unrecognized tokens.
4521
4522 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4523
4524 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4525 to 4-byte-align HW breakpoint addresses for Thumb.
4526
4527 2012-07-27 Yao Qi <yao@codesourcery.com>
4528
4529 PR remote/14161.
4530
4531 * server.h: Declare gdb_agent_about_to_close.
4532 * target.c (kill_inferior): Include "agent.h".
4533 New. Send command 'kill'.
4534 * target.h (kill_inferior): Removed macro.
4535 * tracepoint.c (gdb_agent_about_to_close): New.
4536 (gdb_agent_helper_thread): Handle command 'close'.
4537 Wait endlessly until the inferior stops.
4538 Install gdb_agent_remove_socket to atexit hook.
4539 (agent_socket_name): New static variable.
4540 (gdb_agent_socket_init): Replace local variable 'name' with
4541 'agent_socket_name'.
4542 (gdb_agent_remove_socket): New.
4543
4544 2012-07-27 Yao Qi <yao@codesourcery.com>
4545
4546 * server.c (process_point_options): Stop at 'X' when parsing.
4547
4548 2012-07-19 Michael Eager <eager@eagercon.com>
4549
4550 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4551 to hw_execute.
4552 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4553 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4554 hardware breakpoint.
4555
4556 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4557
4558 * gdbserver/linux-low.c (initialize_low): Call
4559 linux_ptrace_init_warnings.
4560
4561 2012-07-02 Doug Evans <dje@google.com>
4562
4563 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4564 pointer to int.
4565
4566 2012-07-02 Stan Shebs <stan@codesourcery.com>
4567
4568 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4569 (ax.o): Add it to build rule.
4570 (ax-ipa.o): Ditto.
4571 (OBS): Add format.o.
4572 (IPA_OBS): Add format.o.
4573 * server.c (handle_query): Claim support for breakpoint commands.
4574 (process_point_options): Add command case.
4575 (process_serial_event): Leave running if there are printfs in
4576 effect.
4577 * mem-break.h (any_persistent_commands): Declare.
4578 (add_breakpoint_commands): Declare.
4579 (gdb_no_commands_at_breakpoint): Declare.
4580 (run_breakpoint_commands): Declare.
4581 * mem-break.c (struct point_command_list): New struct.
4582 (struct breakpoint): New field command_list.
4583 (any_persistent_commands): New function.
4584 (add_commands_to_breakpoint): New function.
4585 (add_breakpoint_commands): New function.
4586 (gdb_no_commands_at_breakpoint): New function.
4587 (run_breakpoint_commands): New function.
4588 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4589 locally.
4590 * ax.c: Include format.h.
4591 (ax_printf): New function.
4592 (gdb_eval_agent_expr): Add printf opcode.
4593
4594 2012-06-13 Yao Qi <yao@codesourcery.com>
4595
4596 * server.c (start_inferior): Remove duplicated writes to fields
4597 'last_resume_kind' and 'last_status' of 'current_inferior'.
4598
4599 2012-06-12 Yao Qi <yao@codesourcery.com>
4600 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4603 comment.
4604 * server.c (handle_v_cont): Extend comment.
4605
4606 2012-06-11 Yao Qi <yao@codesourcery.com>
4607
4608 * linux-low.c (linux_attach): Add 'static'.
4609
4610 2012-06-06 Yao Qi <yao@codesourcery.com>
4611
4612 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4613
4614 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4615
4616 Fix gcc -flto compilation warning.
4617 * server.c (main): Make variable multi_mode and attach volatile.
4618
4619 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4620
4621 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4622 if the platform doesn't know about it.
4623
4624 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4625
4626 * Makefile.in (SFILES): Add linux-tile-low.c.
4627 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4628 * configure.srv: Handle tilegx-*-linux*.
4629 * linux-tile-low.c: New file.
4630
4631 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4632
4633 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4634
4635 2012-05-24 Pedro Alves <palves@redhat.com>
4636
4637 PR gdb/7205
4638
4639 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4640
4641 2012-05-24 Pedro Alves <palves@redhat.com>
4642
4643 PR gdb/7205
4644
4645 Replace target_signal with gdb_signal throughout.
4646
4647 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4648
4649 * linux-low.c (linux_store_registers): Avoid the copying sequence
4650 when no data has been retrieved by ptrace.
4651
4652 2012-05-22 Will Deacon <will.deacon@arm.com>
4653
4654 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4655 Include asm/ptrace.h.
4656 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4657 already defined.
4658
4659 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4660
4661 * linux-low.c (linux_store_registers): Don't re-retrieve data
4662 with ptrace that has already been obtained from /proc. Always
4663 copy any data retrieved with ptrace to the buffer supplied.
4664
4665 2012-05-11 Yao Qi <yao@codesourcery.com>
4666 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (enum stopping_threads_kind): New.
4669 (stopping_threads): Change type to `enum stopping_threads_kind'.
4670 (handle_extended_wait): If stopping and suspending threads, leave
4671 the new_lwp suspended too.
4672 (linux_wait_for_event): Adjust.
4673 (stop_all_lwps): Set `stopping_threads' to
4674 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4675 whether we're suspending threads or just stopping them. Assert no
4676 recursion happens.
4677
4678 2012-04-29 Yao Qi <yao@codesourcery.com>
4679
4680 * server.h: Move some code to ...
4681 * gdbthread.h: ... here. New.
4682 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4683 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4684 (nto-low.o, win32-low.o): Likewise.
4685 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4686 * regcache.c, remote-utils.c, server.c: Likewise.
4687 * target.c, tracepoint.c, win32-low.c: Likewise.
4688
4689 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4690
4691 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4692 (PTRACE_ARG4_TYPE): Likewise.
4693 (PTRACE_XFER_TYPE): Likewise.
4694 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4695 ptrace to PTRACE_ARG3_TYPE.
4696 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4697 (PTRACE_ARG4_TYPE): Likewise.
4698 (PTRACE_XFER_TYPE): Likewise.
4699 (linux_detach_one_lwp): Cast fourth argument of
4700 ptrace to long then PTRACE_ARG4_TYPE.
4701 (regsets_fetch_inferior_registers): Cast third argument of
4702 ptrace to long then PTRACE_ARG3_TYPE.
4703 (regsets_store_inferior_registers): Likewise.
4704
4705 2012-04-20 Pedro Alves <palves@redhat.com>
4706
4707 * configure: Regenerate.
4708
4709 2012-04-19 Pedro Alves <palves@redhat.com>
4710
4711 * Makefile.in (GNULIB_BUILDDIR): New.
4712 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4713 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4714 (all, install-only, uninstall, clean-info, all-lib, clean): No
4715 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4716 (maintainer-clean realclean distclean): Use subdir_do.
4717 (subdir_do): New.
4718 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4719 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4720 * acinclude.m4: Include acx_configure_dir.m4.
4721 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4722 calls. Call AC_PROG_RANLIB. Configure gnulib using
4723 ACX_CONFIGURE_DIR.
4724 (GNULIB): New.
4725 (GNULIB_STDINT_H): Adjust.
4726 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4727 * gdbreplay.c: Include build-gnulib/config.h.
4728 * server.h: Likewise.
4729 * aclocal.m4: Regenerate.
4730 * config.in: Regenerate.
4731 * configure: Regenerate.
4732
4733 2012-04-19 Pedro Alves <palves@redhat.com>
4734
4735 * Makefile.in (LIBGNU, INCGNU): Adjust.
4736 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4737 (all, install-only, uninstall, clean-info, all-lib, clean)
4738 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4739 * configure.ac: Adjust AC_OUTPUT output.
4740 * aclocal.m4: Regenerate.
4741 * configure: Regenerate.
4742
4743 2012-04-19 Pedro Alves <palves@redhat.com>
4744
4745 * Makefile.in (generated_files): New.
4746 (server_h): Remove the explicit dependency on config.h, and depend
4747 on $generated_files.
4748
4749 2012-04-19 Pedro Alves <palves@redhat.com>
4750
4751 * Makefile.in (INCGNU): Add -Ignulib.
4752
4753 2012-04-19 Pedro Alves <palves@redhat.com>
4754
4755 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4756 (INCGNU): ... this, and spell out -I here.
4757 (GNULIB_LIB): Rename to ...
4758 (LIBGNU): ... this.
4759 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4760
4761 2012-04-19 Pedro Alves <palves@redhat.com>
4762
4763 * config.in: Regenerate.
4764
4765 2012-04-19 Pedro Alves <palves@redhat.com>
4766
4767 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4768 * server.h (memmem): Remove declaration.
4769 * config.in: Regenerate.
4770 * configure: Regenerate.
4771
4772 2012-04-19 Yao Qi <yao@codesourcery.com>
4773
4774 * Makefile.in (SFILES): Add common/vec.c.
4775 (OBS): Add vec.o.
4776 (vec.o): New rule.
4777
4778 2012-04-19 Yao Qi <yao@codesourcery.com>
4779
4780 * remote-utils.c (prepare_resume_reply): Replace with macro
4781 target_core_of_thread.
4782 * server.c (handle_qxfer_threads_proper): Likewise.
4783 * target.h (traget_core_of_thread): New macro.
4784
4785 2012-04-18 Pedro Alves <palves@redhat.com>
4786
4787 * aclocal.m4: Regenerate.
4788 * configure: Regenerate.
4789
4790 2012-04-16 Yao Qi <yao@codesourcery.com>
4791
4792 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4793 duplicated on address.
4794
4795 2012-04-16 Yao Qi <yao@codesourcery.com>
4796
4797 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4798 (struct tracepoint_action_ops) <send>: New field.
4799 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4800 (agent_expr_send, x_tracepoint_action_send): New.
4801 (l_tracepoint_action_send): New.
4802 (cmd_qtdp): Download and install tracepoint
4803 according to `use_agent'.
4804 (run_inferior_command): Add one more parameter `len'.
4805 Update callers.
4806 (tracepoint_send_agent): New.
4807 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4808
4809 2012-04-16 Yao Qi <yao@codesourcery.com>
4810
4811 * tracepoint.c (download_tracepoints): Moved to ...
4812 (cmd_qtstart): ... here.
4813
4814 2012-04-14 Yao Qi <yao@codesourcery.com>
4815
4816 * tracepoint.c: Include inttypes.h.
4817 (struct collect_memory_action): Use sized types.
4818 (struct tracepoint): Likewise.
4819 (cmd_qtdp, stop_tracing): Update print specifiers.
4820 (cmd_qtp, response_tracepoint): Likewise.
4821 (collect_data_at_tracepoint): Likewise.
4822 (collect_data_at_step): Likewise.
4823
4824 2012-04-14 Yao Qi <yao@codesourcery.com>
4825
4826 Import gnulib module inttypes.
4827 * aclocal.m4, config.in, configure: Regenerated.
4828
4829 2012-04-14 Yao Qi <yao@codesourcery.com>
4830
4831 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4832 Makefile and config.status at last.
4833
4834 2012-04-13 Yao Qi <yao@codesourcery.com>
4835
4836 * tracepoint.c: Include stdint.h unconditionally.
4837
4838 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4839
4840 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4841 on BFD_HAVE_SYS_PROCFS_TYPE.
4842 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4843 * configure: Regenerate.
4844 * config.in: Likewise.
4845
4846 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4847
4848 * Makefile.in (clean): Also remove x32.c x32-linux.c
4849 x32-avx.c x32-avx-linux.c.
4850 (x32.o): New target.
4851 (x32.c): Likewise.
4852 (x32-linux.o): Likewise.
4853 (x32-linux.c): Likewise.
4854 (x32-avx.o): Likewise.
4855 (x32-avx.c): Likewise.
4856 (x32-avx-linux.o): Likewise.
4857 (x32-avx-linux.c): Likewise.
4858
4859 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4860 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4861 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4862 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4863 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4864 i386/x32-avx-linux.xml.
4865
4866 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4867 (init_registers_x32_avx_linux): Likwise.
4868 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4869 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4870
4871 2012-04-13 Pedro Alves <palves@redhat.com>
4872
4873 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4874 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4875 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4876 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4877 the sub-make.
4878
4879 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4880
4881 * linux-x86-low.c (compat_x32_clock_t): New.
4882 (compat_x32_siginfo_t): Likewise.
4883 (compat_x32_siginfo_from_siginfo): Likewise.
4884 (siginfo_from_compat_x32_siginfo): Likewise.
4885 (linux_is_elf64): Likewise.
4886 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4887 and siginfo_from_compat_x32_siginfo for x32.
4888 (x86_arch_setup): Set linux_is_elf64.
4889
4890 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4891
4892 PR gdb/13969
4893 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4894 e_machine field.
4895 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4896 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4897 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4898 compatible with process.
4899
4900 2012-04-12 Yao Qi <yao@codesourcery.com>
4901
4902 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4903 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4904 (install-only, install-info, clean): Handle sub dir gnulib.
4905 (all-lib, am--refresh): New targets.
4906 (memmem.o): Remove target.
4907 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4908 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4909 (AC_REPLACE_FUNCS): Remove memmem.
4910 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4911 (AC_OUTPUT): Generate Makefile in gnulib/.
4912 * aclocal.m4, config.in, configure: Regenerated.
4913
4914 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4915
4916 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4917
4918 2012-04-05 Pedro Alves <palves@redhat.com>
4919
4920 -Werror=strict-aliasing
4921
4922 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4923 pointer.
4924
4925 2012-04-04 Pedro Alves <palves@redhat.com>
4926
4927 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4928 (sparc_store_gregset_from_stack, sparc_store_gregset)
4929 (sparc_breakpoint_at): Fix formatting.
4930
4931 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4932
4933 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4934 are available.
4935 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4936 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4937 * config.in: Regenerate.
4938 * configure: Likewise.
4939
4940 2012-03-29 Pedro Alves <palves@redhat.com>
4941
4942 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4943 Correct ptrace arguments.
4944
4945 2012-03-28 Pedro Alves <palves@redhat.com>
4946
4947 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4948 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4949 (IA64_FR1_REGNUM): New defines.
4950 (ia64_fetch_register): New.
4951 (the_low_target): Install it.
4952 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4953 field.
4954 * linux-low.c (linux_fetch_registers): Try the
4955 the_low_target.fetch_register hook first.
4956
4957 * linux-arm-low.c (the_low_target): Adjust.
4958 * linux-bfin-low.c (the_low_target): Adjust.
4959 * linux-cris-low.c (the_low_target): Adjust.
4960 * linux-crisv32-low.c (the_low_target): Adjust.
4961 * linux-m32r-low.c (the_low_target): Adjust.
4962 * linux-m68k-low.c (the_low_target): Adjust.
4963 * linux-mips-low.c (the_low_target): Adjust.
4964 * linux-ppc-low.c (the_low_target): Adjust.
4965 * linux-s390-low.c (the_low_target): Adjust.
4966 * linux-sh-low.c (the_low_target): Adjust.
4967 * linux-sparc-low.c (the_low_target): Adjust.
4968 * linux-tic6x-low.c (the_low_target): Adjust.
4969 * linux-x86-low.c (the_low_target): Adjust.
4970 * linux-xtensa-low.c (the_low_target): Adjust.
4971
4972 2012-03-26 Pedro Alves <palves@redhat.com>
4973
4974 * server.c (handle_qxfer_libraries): Don't bail early if
4975 the_target->qxfer_libraries_svr4 is not NULL.
4976
4977 2012-03-26 Pedro Alves <palves@redhat.com>
4978
4979 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4980
4981 2012-03-23 Pedro Alves <palves@redhat.com>
4982
4983 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4984 "library-list-svr4" element's start tag when the the DSO list is
4985 empty.
4986
4987 2012-03-23 Pedro Alves <palves@redhat.com>
4988
4989 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4990 a variable whose type size is the same as the inferior's pointer
4991 size.
4992
4993 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4994
4995 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4996 struct siginfo.
4997 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4998 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4999 * linux-low.h: Include <signal.h>.
5000 (struct siginfo): Remove forward declaration.
5001 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5002 struct siginfo.
5003
5004 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5005
5006 * .gitignore: Ignore more files.
5007
5008 2012-03-19 Pedro Alves <palves@redhat.com>
5009 Jan Kratochvil <jan.kratochvil@redhat.com>
5010
5011 * server.c (cont_thread, general_thread): Add describing comments.
5012 (start_inferior): Clear `cont_thread'.
5013 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5014 of a process.
5015
5016 2012-03-15 Yao Qi <yao@codesourcery.com>
5017
5018 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5019 handling to ...
5020 (cmd_qtdp): ... here.
5021
5022 2012-03-15 Yao Qi <yao@codesourcery.com>
5023
5024 * tracepoint.c (struct tracepoint_action_ops): New.
5025 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5026 (m_tracepoint_action_download): New.
5027 (r_tracepoint_action_download): New.
5028 (x_tracepoint_action_download): New.
5029 (l_tracepoint_action_download): New.
5030 (add_tracepoint_action): Install `action->ops' according type.
5031 (download_tracepoint_1): Move code `download' function pointer
5032 of various tracepoint_action_ops.
5033
5034 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5035
5036 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5037 linux_ptrace_attach_warnings.
5038
5039 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5040
5041 * Makefile.in (linux-ptrace.o): New.
5042 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5043 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5044 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5045 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5046 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5047 of these targets.
5048 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5049
5050 2012-03-08 Yao Qi <yao@codesourcery.com>
5051 Pedro Alves <palves@redhat.com>
5052
5053 Fix PR server/13392.
5054 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5055 offset of JMP insn.
5056 * tracepoint.c (remove_tracepoint): New.
5057 (cmd_qtdp): Call remove_tracepoint when failed to install.
5058
5059 2012-03-07 Pedro Alves <palves@redhat.com>
5060
5061 * linux-low.c (get_detach_signal): New.
5062 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5063 Pass on pending signals to PTRACE_DETACH. Check the result of the
5064 ptrace call.
5065 * server.c (program_signals, program_signals_p): New.
5066 (handle_general_set): Handle QProgramSignals.
5067 * server.h (program_signals, program_signals_p): Declare.
5068
5069 2012-03-05 Pedro Alves <palves@redhat.com>
5070 Jan Kratochvil <jan.kratochvil@redhat.com>
5071
5072 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5073 New comment why.
5074
5075 2012-03-03 Yao Qi <yao@codesourcery.com>
5076
5077 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5078 agent_look_up_symbols.
5079
5080 2012-03-03 Yao Qi <yao@codesourcery.com>
5081
5082 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5083 (linux-x86-low.o): Likewise.
5084 * server.h: Remove in_process_agent_loaded.
5085 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5086 common/agent.c.
5087 Update callers.
5088
5089 2012-03-03 Yao Qi <yao@codesourcery.com>
5090
5091 * tracepoint.c (gdb_agent_capability): New global.
5092 (in_process_agent_loaded_ust): Renamed to
5093 `in_process_agent_supports_ust'.
5094 Update callers.
5095 (in_process_agent_supports_ust): Call agent_capability_check.
5096 (clear_installed_tracepoints): Assert that agent supports
5097 agent.
5098
5099 2012-03-03 Yao Qi <yao@codesourcery.com>
5100
5101 * linux-low.c (linux_supports_agent): New.
5102 (linux_target_ops): Initialize field `supports_agent' with
5103 linux_supports_agent.
5104 * target.h (struct target_ops) <supports_agent>: New.
5105 (target_supports_agent): New macro.
5106 * server.c (handle_general_set): Handle packet 'QAgent'.
5107 (handle_query): Send `QAgent+'.
5108 * Makefile.in (server.o): Depends on agent.h.
5109
5110 2012-03-03 Yao Qi <yao@codesourcery.com>
5111
5112 * Makefile.in (OBS): Add agent.o.
5113 Add new rule for agent.o.
5114 Track dependence of tracepoint.c on agent.h.
5115 * tracepoint.c (run_inferior_command_1):
5116 (run_inferior_command): Call agent_run_command.
5117 (gdb_ust_connect_sync_socket): Deleted. Move it to
5118 common/agent.c.
5119 (resume_thread, stop_thread): Likewise.
5120 (gdb_ust_socket_init): Renamed to ...
5121 (gdb_agent_socket_init): ... New.
5122 (gdb_ust_thread): Renamed to ...
5123 (gdb_agent_helper_thread): ... New.
5124 (gdb_ust_init): Move some code to ...
5125 (gdb_agent_init): ... here. New.
5126 [HAVE_UST]: Call gdb_ust_init.
5127 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5128 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5129 * config.in, configure: Regenerated.
5130
5131 2012-03-02 Pedro Alves <palves@redhat.com>
5132
5133 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5134 * linux-low.c (struct simple_pid_list): New.
5135 (stopped_pids): New a struct simple_pid_list pointer.
5136 (add_to_pid_list, pull_pid_from_list): New.
5137 (handle_extended_wait): Don't assume the first signal new children
5138 report is SIGSTOP. Adjust call to pull_pid_from_list.
5139 (linux_wait_for_lwp): Adjust.
5140
5141 2012-03-02 Yao Qi <yao@codesourcery.com>
5142
5143 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5144 debug log.
5145
5146 2012-03-02 Yao Qi <yao@codesourcery.com>
5147
5148 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5149 `stop_pc' and `tpoint'. Update caller.
5150
5151 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5152
5153 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5154 * linux-low.c (use_linux_regsets): New macro.
5155 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5156 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5157 (linux_register_in_regsets): New function.
5158 (usr_fetch_inferior_registers): Skip registers covered by
5159 regsets.
5160 (usr_store_inferior_registers): Likewise.
5161 (usr_fetch_inferior_registers): New macro.
5162 (usr_store_inferior_registers): Likewise.
5163 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5164 (linux_store_registers): Likewise.
5165 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5166 prototype.
5167 (init_registers_mips64_dsp_linux): Likewise.
5168 (init_registers_mips_linux): New macro.
5169 (init_registers_mips_dsp_linux): Likewise.
5170 (mips_dsp_num_regs): Likewise.
5171 (DSP_BASE, DSP_CONTROL): New fallback macros.
5172 (mips_base_regs): New macro.
5173 (mips_regmap): Use it. Fix the size.
5174 (mips_dsp_regmap): New variable.
5175 (mips_dsp_regset_bitmap): Likewise.
5176 (mips_arch_setup): New function.
5177 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5178 than mips_regmap.
5179 (mips_cannot_store_register): Likewise.
5180 (the_low_target): Update .arch_setup, .num_regs and .regmap
5181 initializers. Add .regset_bitmap initializer.
5182 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5183 initializer.
5184 * linux-bfin-low.c (the_low_target): Likewise.
5185 * linux-cris-low.c (the_low_target): Likewise.
5186 * linux-crisv32-low.c (the_low_target): Likewise.
5187 * linux-ia64-low.c (the_low_target): Likewise.
5188 * linux-m32r-low.c (the_low_target): Likewise.
5189 * linux-m68k-low.c (the_low_target): Likewise.
5190 * linux-ppc-low.c (the_low_target): Likewise.
5191 * linux-s390-low.c (the_low_target): Likewise.
5192 * linux-sh-low.c (the_low_target): Likewise.
5193 * linux-sparc-low.c (the_low_target): Likewise.
5194 * linux-tic6x-low.c (the_low_target): Likewise.
5195 * linux-x86-low.c (the_low_target): Likewise.
5196 * linux-xtensa-low.c (the_low_target): Likewise.
5197 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5198 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5199 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5200 srv_xmlfiles.
5201 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5202 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5203
5204 2012-02-29 Yao Qi <yao@codesourcery.com>
5205 Pedro Alves <palves@redhat.com>
5206
5207 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5208 `step_over_finished' is true.
5209
5210 2012-02-27 Pedro Alves <palves@redhat.com>
5211
5212 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5213 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5214
5215 2012-02-27 Pedro Alves <palves@redhat.com>
5216
5217 PR server/9684
5218 * linux-low.c (pid_is_stopped): New.
5219 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5220
5221 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5222
5223 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5224 of conditions.
5225
5226 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5227
5228 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5229
5230 2012-02-24 Luis Machado <lgustavo@codesourcery>
5231
5232 * server.c (handle_query): Advertise support for target-side
5233 breakpoint condition evaluation.
5234 (process_point_options): New function.
5235 (process_serial_event): When inserting a breakpoint, check for
5236 a target-side condition that should be evaluated.
5237
5238 * mem-break.c: Include regcache.h and ax.h.
5239 (point_cond_list_t): New data structure.
5240 (breakpoint) <cond_list>: New field.
5241 (find_gdb_breakpoint_at): Make non-static.
5242 (delete_gdb_breakpoint_at): Clear any target-side
5243 conditions.
5244 (clear_gdb_breakpoint_conditions): New function.
5245 (add_condition_to_breakpoint): Likewise.
5246 (add_breakpoint_condition): Likewise.
5247 (gdb_condition_true_at_breakpoint): Likewise.
5248 (gdb_breakpoint_here): Return result directly instead
5249 of going through a local variable.
5250
5251 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5252 (clear_gdb_breakpoint_conditions): Likewise.
5253 (add_breakpoint_condition): Likewise.
5254 (gdb_condition_true_at_breakpoint): Likewise.
5255
5256 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5257 (need_step_over_p): Take target-side breakpoint condition into
5258 consideration.
5259
5260 2012-02-24 Luis Machado <lgustavo@codesourcery>
5261
5262 * server.h: Include tracepoint.h.
5263 (agent_mem_read, agent_get_trace_state_variable_value,
5264 agent_set_trace_state_variable_value,
5265 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5266 get_set_tsv_func_addr): New prototypes.
5267
5268 * ax.h: New include file.
5269 * ax.c: New source file.
5270
5271 * tracepoint.c: Include ax.h.
5272 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5273 agent_expr, eval_result_type): Move to ax.h.
5274 (parse_agent_expr): Rename to ...
5275 (gdb_parse_agent_expr): ... this, make it non-static and move
5276 to ax.h.
5277 (unparse_agent_expr) Rename to ...
5278 (gdb_unparse_agent_expr): ... this, make it non-static and move
5279 to ax.h.
5280 (eval_agent_expr): Rename to ...
5281 (eval_tracepoint_agent_expr): ... this.
5282 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5283 forward declarations.
5284 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5285 (agent_get_trace_state_variable_value): New function.
5286 (agent_set_trace_state_variable_value): New function.
5287 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5288 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5289 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5290 (condition_true_at_tracepoint): Likewise.
5291 (parse_agent_expr): Rename to ...
5292 (gdb_parse_agent_expr): ... this and move to ax.c.
5293 (unparse_agent_expr): Rename to ...
5294 (gdb_unparse_agent_expr): ... this and move to ax.c.
5295 (gdb_agent_op_name): Move to ax.c.
5296 (eval_agent_expr): Rename to ...
5297 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5298 and move to ax.c.
5299 (eval_tracepoint_agent_expr): New function.
5300 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5301 non-static.
5302 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5303 ax.c.
5304 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5305 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5306 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5307 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5308 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5309 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5310 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5311 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5312 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5313 (compile_bytecodes): Remove forward declaration.
5314 (is_goto_target): Move to ax.c.
5315 (compile_bytecodes): Move to ax.c and call
5316 agent_get_trace_state_variable_value (...) and
5317 agent_set_trace_state_variable_value (...).
5318
5319 * Makefile.in: Update ax.c and IPA dependencies.
5320
5321 2012-02-24 Pedro Alves <palves@redhat.com>
5322
5323 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5324 (cmd_bigqtbuffer_circular): ... this. Only handle
5325 'QTBuffer:circular:'.
5326 (handle_tracepoint_general_set): Adjust.
5327
5328 2012-02-16 Yao Qi <yao@codesourcery.com>
5329
5330 * inferiors.c: Move code to ...
5331 * dll.c: .... here. New.
5332 * server.h: Declare clear_dlls.
5333 * Makefile.in (SFILES): Add dll.c.
5334 (OBS): Add dll.o
5335 (dll.o): New rule.
5336
5337 2012-02-11 Yao Qi <yao@codesourcery.com>
5338
5339 * server.c: (handle_monitor_command): Add a new parameter
5340 `own_buf'.
5341 (handle_query): Update caller.
5342
5343 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5344
5345 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5346 * configure, config.in: Regenerate.
5347 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5348 is not defined.
5349
5350 2012-02-02 Pedro Alves <palves@redhat.com>
5351
5352 Try SIGKILL first, then PTRACE_KILL.
5353 * linux-low.c (linux_kill_one_lwp): New.
5354 (linux_kill_one_lwp): Rename to ...
5355 (kill_one_lwp_callback): ... this. Use the new
5356 linux_kill_one_lwp.
5357
5358 2012-02-02 Pedro Alves <palves@redhat.com>
5359
5360 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5361 inferior.
5362
5363 2012-01-27 Pedro Alves <palves@redhat.com>
5364
5365 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5366 (elf_64_file_p): Make static.
5367 (linux_pid_exe_is_elf_64_file): New.
5368 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5369 Delete declarations.
5370 (linux_pid_exe_is_elf_64_file): Declare.
5371 * linux-x86-low.c (x86_arch_setup): Use
5372 linux_pid_exe_is_elf_64_file.
5373
5374 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5375
5376 * linux-low.c (linux_wait_for_event_1): Rename to ...
5377 (linux_wait_for_event): ... here and merge it with former
5378 linux_wait_for_event - new variable wait_ptid, use it.
5379 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5380
5381 2012-01-23 Pedro Alves <palves@redhat.com>
5382
5383 * server.c (main): Avoid yet another case of infinite loop while
5384 detaching/killing after a longjmp.
5385
5386 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5387
5388 Code cleanup.
5389 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5390
5391 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5392
5393 * hostio.c (handle_readlink): New function.
5394 (handle_vFile): Call it to handle "vFile:readlink" packets.
5395
5396 2012-01-20 Pedro Alves <palves@redhat.com>
5397 Ulrich Weigand <ulrich.weigand@linaro.org>
5398
5399 * server.c (handle_v_requests): Only support vAttach and vRun to
5400 start multiple processes when in extended protocol mode.
5401
5402 2012-01-17 Pedro Alves <palves@redhat.com>
5403
5404 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5405 memalign plus mprotect to allocate the scratch buffer.
5406
5407 2012-01-13 Pedro Alves <palves@redhat.com>
5408
5409 * server.c (attach_inferior): Clear `cont_thread'.
5410
5411 2012-01-13 Pedro Alves <palves@redhat.com>
5412
5413 * server.c (main): Avoid infinite loop while detaching/killing
5414 after a longjmp.
5415
5416 2012-01-09 Doug Evans <dje@google.com>
5417
5418 * server.c (start_inferior): Set last_ptid in --wrapper case.
5419
5420 2012-01-06 Yao Qi <yao@codesourcery.com>
5421
5422 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5423 defined.
5424 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5425
5426 2012-01-04 Yao Qi <yao@codesourcery.com>
5427
5428 * tracepoint.c (cmd_qtdp): Print debug message
5429 for static tracepoint.
5430
5431 2012-01-04 Yao Qi <yao@codesourcery.com>
5432
5433 * tracepoint.c (trace_vdebug): Differentiate debug message
5434 between gdbserver and IPA.
5435
5436 2012-01-03 Yao Qi <yao@codesourcery.com>
5437
5438 * tracepoint.c (tracepoint_was_hit): Don't collect for
5439 static tracepoint.
5440
5441 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5442
5443 * terminal.h: Reformat copyright header.
5444
5445 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5446
5447 * server.c (gdbserver_version): Update copyright year.
5448 * gdbreplay.c (gdbreplay_version): Likewise.
5449
5450 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5451
5452 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5453
5454 Revert:
5455 2011-12-18 Hui Zhu <teawater@gmail.com>
5456 * linux-low.c (linux_create_inferior): Save return value to ret.
5457
5458 2011-12-18 Hui Zhu <teawater@gmail.com>
5459
5460 * linux-low.c (linux_create_inferior): Save return value to ret.
5461
5462 2011-12-16 Doug Evans <dje@google.com>
5463
5464 * linux-low.c (linux_create_inferior): If stdio connection,
5465 redirect stdin from /dev/null, stdout to stderr.
5466 * remote-utils.c (remote_is_stdio): New static global.
5467 (remote_connection_is_stdio): New function.
5468 (remote_prepare): Handle stdio connection.
5469 (remote_open): Ditto.
5470 (remote_close): Don't close stdin for stdio connections.
5471 (read_prim,write_prim): New functions. Replace all calls to
5472 read/write to these.
5473 * server.c (main): Watch for "-" argument. Move call to
5474 remote_prepare before start_inferior.
5475 * server.h (STDIO_CONNECTION_NAME): New macro.
5476 (remote_connection_is_stdio): Declare.
5477
5478 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5479 in debugging output.
5480
5481 2011-12-15 Yao Qi <yao@codesourcery.com>
5482
5483 * tracepoint.c: Include sys/syscall.h.
5484 (gdb_ust_thread): Remove preprocessor conditional.
5485
5486 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5487
5488 * linux-low.c (linux_detach_one_lwp): Call
5489 the_low_target.prepare_to_resume before detaching.
5490
5491 2011-12-14 Yao Qi <yao@codesourcery.com>
5492
5493 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5494 of write.
5495
5496 2011-12-14 Yao Qi <yao@codesourcery.com>
5497
5498 * i386-low.c (i386_low_stopped_data_address): Initialize local
5499 variable `control'.
5500
5501 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5502
5503 PR remote/13492
5504
5505 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5506 DR_CONTROL unless necessary. Extend comments.
5507 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5508 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5509
5510 2011-12-13 Yao Qi <yao@codesourcery.com>
5511
5512 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5513 macros.
5514 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5515
5516 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5517
5518 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5519 Print new debug message for such case.
5520
5521 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5522
5523 Fix overlapping memcpy.
5524 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5525 the read_inferior_memory transfer.
5526 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5527 write_inferior_memory transfer.
5528 (set_fast_tracepoint_jump): New variable buf. Use it for the
5529 read_inferior_memory and write_inferior_memory transfers.
5530 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5531 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5532 Use it for the write_inferior_memory transfer.
5533 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5534 buffers.
5535
5536 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5537
5538 * linux-low.c (fetch_register, store_register): Make code
5539 consistent, fix formatting.
5540
5541 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5542
5543 * linux-low.c (usr_store_inferior_registers): Factor out code
5544 to handle individual registers into...
5545 (store_register): ... this new function.
5546
5547 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5548
5549 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5550 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5551 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5552 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5553 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5554 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5555 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5556 (srv_xmlfiles): Add new XML files.
5557
5558 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5559 and <sys/uio.h>.
5560 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5561 (init_registers_s390_linux32v1): Add prototype.
5562 (init_registers_s390_linux32v2): Likewise.
5563 (init_registers_s390_linux64v1): Likewise.
5564 (init_registers_s390_linux64v2): Likewise.
5565 (init_registers_s390x_linux64v1): Likewise.
5566 (init_registers_s390x_linux64v2): Likewise.
5567 (s390_num_regs): Increment to 52.
5568 (s390_regmap): Add orig_r2 register.
5569 (s390_num_regs_3264): Increment to 68.
5570 (s390_regmap_3264): Add orig_r2 register.
5571 (s390_collect_ptrace_register): Handle orig_r2 register.
5572 (s390_supply_ptrace_register): Likewise.
5573 (s390_fill_last_break): New function.
5574 (s390_store_last_break): Likewise.
5575 (s390_fill_system_call): New function.
5576 (s390_store_system_call): Likewise.
5577 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5578 register sets.
5579 (s390_check_regset): New function.
5580 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5581 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5582 Update target_regsets for available register sets.
5583
5584 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5585 Jan Kratochvil <jan.kratochvil@redhat.com>
5586
5587 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5588 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5589 New.
5590 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5591 * linux-low.h (struct process_info_private): New member r_debug.
5592 * server.c (handle_qxfer_libraries): Call
5593 the_target->qxfer_libraries_svr4.
5594 (handle_qxfer_libraries_svr4): New function.
5595 (qxfer_packets): New entry "libraries-svr4".
5596 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5597 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5598 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5599 PACKET_qXfer_libraries_svr4.
5600
5601 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5602
5603 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5604 PSW address/mask between 8-byte and 16-byte formats.
5605 (s390_supply_ptrace_register): Likewise.
5606 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5607 basic addressing mode bit.
5608
5609 2011-11-24 Stan Shebs <stan@codesourcery.com>
5610
5611 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5612
5613 2011-11-17 Stan Shebs <stan@codesourcery.com>
5614
5615 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5616 (tracing_start_time): New global.
5617 (tracing_stop_time): New global.
5618 (tracing_user_name): New global.
5619 (tracing_notes): New global.
5620 (tracing_stop_note): New global.
5621 (cmd_qtstart): Set traceframe_usage, start_time.
5622 (stop_tracing): Set stop_time.
5623 (cmd_qtstatus): Report additional status.
5624 (cmd_qtp): New function.
5625 (handle_tracepoint_query): Call it.
5626 (cmd_qtnotes): New function.
5627 (handle_tracepoint_general_set): Call it.
5628 (get_timestamp): Rename from tsv_get_timestamp.
5629
5630 2011-11-14 Stan Shebs <stan@codesourcery.com>
5631 Kwok Cheung Yeung <kcy@codesourcery.com>
5632
5633 * linux-x86-low.c (small_jump_insn): New.
5634 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5635 trampoline and error message, build a trampoline and issue a small
5636 jump instruction to it.
5637 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5638 trampoline and error message.
5639 (x86_get_min_fast_tracepoint_insn_len): New.
5640 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5641 * linux-low.h (struct linux_target_ops): Add arguments to
5642 install_fast_tracepoint_jump_pad operation, add new operation.
5643 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5644 arguments.
5645 (linux_get_min_fast_tracepoint_insn_len): New function.
5646 (linux_target_op): Add new operation.
5647 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5648 (gdb_trampoline_buffer_end): Ditto.
5649 (gdb_trampoline_buffer_error): Ditto.
5650 (struct ipa_sym_addresses): Add fields for new IPA variables.
5651 (symbol_list): Add entries for new IPA variables.
5652 (struct tracepoint): Add fields to hold the address range of the
5653 trampoline used by the tracepoint.
5654 (trampoline_buffer_head): New static variable.
5655 (trampoline_buffer_tail): Ditto.
5656 (claim_trampoline_space): New function.
5657 (have_fast_tracepoint_trampoline_buffer): New function.
5658 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5659 structure.
5660 (install_fast_tracepoint): Ditto, also add error buffer argument.
5661 (cmd_qtminftpilen): New function.
5662 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5663 (fast_tracepoint_from_trampoline_address): New function.
5664 (fast_tracepoint_collecting): Handle trampoline as part of jump
5665 pad space.
5666 (set_trampoline_buffer_space): New function.
5667 (initialize_tracepoint): Initialize new IPA variables.
5668 * target.h (struct target_ops): Add arguments to
5669 install_fast_tracepoint_jump_pad operation, add new
5670 get_min_fast_tracepoint_insn_len operation.
5671 (target_get_min_fast_tracepoint_insn_len): New.
5672 (install_fast_tracepoint_jump_pad): Add arguments.
5673 * server.h (IPA_BUFSIZ): Define.
5674 * linux-i386-ipa.c: Include extra header files.
5675 (initialize_fast_tracepoint_trampoline_buffer): New function.
5676 (initialize_low_tracepoint): Call it.
5677 * server.h (set_trampoline_buffer_space): Declare.
5678 (claim_trampoline_space): Ditto.
5679 (have_fast_tracepoint_trampoline_buffer): Ditto.
5680
5681 2011-11-14 Yao Qi <yao@codesourcery.com>
5682
5683 * server.c (handle_query): Handle InstallInTrace for qSupported.
5684 * tracepoint.c (add_tracepoint): Sort list.
5685 (install_tracepoint, download_tracepoint): New.
5686 (cmd_qtdp): Call them to install and download tracepoints.
5687 (sort_tracepoints): Removed.
5688 (cmd_qtstart): Update.
5689
5690 2011-11-14 Yao Qi <yao@codesourcery.com>
5691
5692 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5693 * mem-break.h: Declare.
5694 * tracepoint.c (cmd_qtstart): Move some code to ...
5695 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5696 New.
5697 (download_tracepoints): Move some code to ...
5698 (download_tracepoint_1): ... here. New.
5699
5700 2011-11-08 Yao Qi <yao@codesourcery.com>
5701
5702 * remote-utils.c (relocate_instruction): A comment fix.
5703
5704 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5705
5706 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5707 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5708 dr_status_mirror and dr_control_mirror from debug_reg_state.
5709 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5710 (i386_initial_stuff): Remove use of deleted globals.
5711 (i386_get_thread_context, i386_set_thread_context,
5712 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5713 from debug_reg_state.
5714
5715 2011-11-05 Yao Qi <yao@codesourcery.com>
5716
5717 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5718 address as TPOINT's.
5719
5720 2011-11-02 Stan Shebs <stan@codesourcery.com>
5721
5722 * tracepoint.c (agent_mem_read_string): New function.
5723 (eval_agent_expr): Call it for tracenz.
5724 * server.c (handle_query): Report support for tracenz.
5725
5726 2011-11-02 Yao Qi <yao@codesourcery.com>
5727
5728 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5729
5730 2011-11-02 Yao Qi <yao@codesourcery.com>
5731
5732 * target.h: Fix a typo in comment.
5733
5734 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5735
5736 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5737 clobber the breakpoints' shadows with fast tracepoint jumps.
5738 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5739 * target.c (write_inferior_memory): Also pass MYADDR down to
5740 check_mem_write.
5741
5742 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5743
5744 * configure.ac: Check support for personality routine.
5745 * configure: Regenerate.
5746 * config.in: Likewise.
5747 * linux-low.c: Include <sys/personality.h>.
5748 Define ADDR_NO_RANDOMIZE if necessary.
5749 (linux_create_inferior): Disable address space randomization when
5750 forking inferior, if requested.
5751 (linux_supports_disable_randomization): New function.
5752 (linux_target_ops): Install it.
5753 * server.h (disable_randomization): Declare.
5754 * server.c (disable_randomization): New global variable.
5755 (handle_general_set): Handle QDisableRandomization.
5756 (handle_query): Likewise for qSupported.
5757 (main): Support --disable-randomization and --no-disable-randomization
5758 command line arguments.
5759 * target.h (struct target_ops): Add supports_disable_randomization.
5760 (target_supports_disable_randomization): New macro.
5761
5762 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5763
5764 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5765 ifdef check.
5766 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5767 [!PT_GETDSBT] (target_loadmap): New definition.
5768 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5769 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5770 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5771 and PT_GETDSBT to LINUX_LOADMAP.
5772 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5773 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5774
5775 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5776
5777 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5778 (arm_linux_hwbp_cap): New static variable.
5779 (arm_linux_get_hwbp_cap): Replace by ...
5780 (arm_linux_init_hwbp_cap): ... this new function.
5781 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5782 (arm_linux_get_hw_watchpoint_count): Likewise.
5783 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5784 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5785 (arm_prepare_to_resume): Use perror_with_name instead of error.
5786
5787 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5788
5789 * linux-arm-low.c: Include <signal.h>.
5790 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5791 (struct arm_linux_hwbp_cap): New data type.
5792 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5793 (struct arm_linux_hw_breakpoint): New data type.
5794 (MAX_BPTS, MAX_WPTS): Define.
5795 (struct arch_process_info, struct arch_lwp_info): New data types.
5796 (arm_linux_get_hwbp_cap): New function.
5797 (arm_linux_get_hw_breakpoint_count): Likewise.
5798 (arm_linux_get_hw_watchpoint_count): Likewise.
5799 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5800 (arm_hwbp_control_initialize): Likewise.
5801 (arm_hwbp_control_is_enabled): Likewise.
5802 (arm_hwbp_control_is_initialized): Likewise.
5803 (arm_hwbp_control_disable): Likewise.
5804 (arm_linux_hw_breakpoint_equal): Likewise.
5805 (arm_linux_hw_point_initialize): Likewise.
5806 (struct update_registers_data): New data structure.
5807 (update_registers_callback: New function.
5808 (arm_insert_point): Likewise.
5809 (arm_remove_point): Likewise.
5810 (arm_stopped_by_watchpoint): Likewise.
5811 (arm_stopped_data_address): Likewise.
5812 (arm_new_process): Likewise.
5813 (arm_new_thread): Likewise.
5814 (arm_prepare_to_resume): Likewise.
5815 (the_low_target): Register arm_insert_point, arm_remove_point,
5816 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5817 arm_new_thread, and arm_prepare_to_resume.
5818
5819 2011-09-15 Stan Shebs <stan@codesourcery.com>
5820
5821 * server.h (struct emit_ops): Add compare-goto fields.
5822 * tracepoint.c (gdb_agent_op_sizes): New table.
5823 (emit_eq_goto): New function.
5824 (emit_ne_goto): New function.
5825 (emit_lt_goto): New function.
5826 (emit_le_goto): New function.
5827 (emit_gt_goto): New function.
5828 (emit_ge_goto): New function.
5829 (is_goto_target): New function.
5830 (compile_bytecodes): Recognize special cases of compare-goto
5831 combinations and call specialized emitters for them.
5832 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5833 (amd64_emit_ne_goto): New function.
5834 (amd64_emit_lt_goto): New function.
5835 (amd64_emit_le_goto): New function.
5836 (amd64_emit_gt_goto): New function.
5837 (amd64_emit_ge_goto): New function.
5838 (amd64_emit_ops): Add the new functions.
5839 (i386_emit_eq_goto): New function.
5840 (i386_emit_ne_goto): New function.
5841 (i386_emit_lt_goto): New function.
5842 (i386_emit_le_goto): New function.
5843 (i386_emit_gt_goto): New function.
5844 (i386_emit_ge_goto): New function.
5845 (i386_emit_ops): Add the new functions.
5846
5847 2011-09-08 Stan Shebs <stan@codesourcery.com>
5848
5849 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5850 (i386_emit_epilogue): Restore %ebx.
5851
5852 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5853
5854 * server.c (step_thread): Remove definition.
5855 (process_serial_event): Don't handle Hs.
5856 * server.h (step_thread): Remove declaration.
5857 * target.c (set_desired_inferior): Remove use of step_thread.
5858
5859 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5860
5861 * linux-low.c: Include linux-procfs.h.
5862 (linux_attach_lwp_1): Update comments.
5863 (linux_attach): Scan for existing threads when attaching to a
5864 process that is the tgid.
5865 * Makefile.in: Update dependencies.
5866
5867 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5868
5869 * configure.srv: Add linux-procfs.o dependencies.
5870
5871 2011-08-14 Yao Qi <yao@codesourcery.com>
5872
5873 * target.h (struct target_ops): Fix indent.
5874 * win32-low.c (win32_target_ops): Fix comment.
5875
5876 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5877 Yao Qi <yao@codesourcery.com>
5878
5879 * Makefile.in (clean): Remove tic6x-*.c files.
5880 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5881 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5882 (tic6x-c64xp-linux.c): Likewise.
5883 * configure.srv: Add support for tic6x-*-uclinux.
5884 * linux-tic6x-low.c: New.
5885 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5886
5887 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5888 Yao Qi <yao@codesourcery.com>
5889
5890 * target.h (struct target_ops): Add read_loadmap.
5891 * linux-low.c (struct target_loadseg): New type.
5892 (struct target_loadmap): New type.
5893 (linux_read_loadmap): New function.
5894 (linux_target_ops): Add linux_read_loadmap.
5895 * server.c (handle_query): Support qXfer:fdpic:read packet.
5896 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5897 to NULL.
5898
5899 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5900
5901 * win32-low.c: Include <stdint.h>.
5902
5903 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5904
5905 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5906 to the inferior here.
5907 (i386_remove_aligned_watchpoint): Ditto.
5908 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5909 fit part of the watchpoint in the debug registers.
5910 (i386_update_inferior_debug_regs): New.
5911 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5912 registers, and only update the inferior on success.
5913 (i386_low_remove_watchpoint): Ditto.
5914
5915 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5916
5917 * linux-low.c (compare_ints, unique, list_threads, show_process,
5918 linux_core_of_thread): Delete.
5919 (linux_target_ops): Change linux_core_of_thread to
5920 linux_common_core_of_thread.
5921 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5922 * utils.c (malloc_failure): Change type of argument.
5923 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5924 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5925 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5926 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5927 (IPA_OBJS): Add common-utils-ipa.o.
5928 (ptid_h, linux_osdata_h): New macros.
5929 (server_h): Add common/common-utils.h, common/xml-utils.h,
5930 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5931 common/ptid.h.
5932 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5933 ptid.o, buffer.o): New rules.
5934 (linux-low.o): Add common/linux-osdata.h as a dependency.
5935 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5936 * configure.ac: Add AC_HEADER_DIRENT check.
5937 * config.in: Regenerate.
5938 * configure: Regenerate.
5939 * remote-utils.c (xml_escape_text): Delete.
5940 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5941 buffer_xml_printf): Move to common/buffer.c.
5942 * server.c (main): Remove call to initialize_inferiors.
5943 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5944 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5945 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5946 internal_error, gdb_assert, gdb_assert_fail): Delete.
5947 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5948 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5949 common/buffer.h.
5950 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5951 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5952 initialize_inferiors): Delete.
5953
5954 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5955
5956 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5957 symbol error.
5958
5959 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5960
5961 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5962 assertion.
5963 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5964
5965 2011-05-26 Yao Qi <yao@codesourcery.com>
5966
5967 * Makefile.in (thread-db.o): Track dependence to
5968 common/gdb_thread_db.h.
5969 * thread-db.c: include gdb_thread_db.h from right place.
5970
5971 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5972
5973 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5974 __FILE__ and __LINE__ to internal_error.
5975
5976 2011-05-13 Doug Evans <dje@google.com>
5977
5978 * thread-db.c (try_thread_db_load_from_sdir): New function.
5979 (try_thread_db_load_from_dir): New function.
5980 (thread_db_load_search): Handle $sdir, ignore $pdir.
5981 Remove trying of system directories if search of
5982 libthread-db-search-path fails, that is now done via $sdir.
5983
5984 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5985
5986 * server.c (handle_query): Add EnableDisableTracepoints to the list
5987 of supported features.
5988 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5989 tracepoints.
5990 (cmd_qtenable_disable): New.
5991 (cmd_qtstart): Install tracepoints even if disabled.
5992 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5993 receiving a QTEnable or QTDisable packet.
5994 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5995 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5996 tracepoints.
5997 (gdb_probe): Skip data collection if static tracepoint is disabled.
5998
5999 2011-05-10 Doug Evans <dje@google.com>
6000
6001 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6002
6003 2011-05-04 Doug Evans <dje@google.com>
6004
6005 * linux-low.c (linux_join): Skip process lookup.
6006 * spu-low.c (spu_join): Ditto.
6007 * server.c (join_inferiors_callback): Delete.
6008 (process_serial_event): For 'D' packet (detach) call join_inferior
6009 directly.
6010
6011 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6012
6013 * README: Don't mention xscale*-*-linux*.
6014 * configure.srv (xscale*-*-linux*): Don't handle target.
6015
6016 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6017
6018 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6019 casting pointers.
6020 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6021 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6022 (i386_emit_void_call_2): Likewise.
6023
6024 2011-04-26 Yao Qi <yao@codesourcery.com>
6025
6026 * linux-low.c: Move common macros to linux-ptrace.h.
6027 Include linux-ptrace.h.
6028 * Makefile.in (linux_ptrace_h): New.
6029 (linux-low.o): Depends on linux-ptrace.h.
6030
6031 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6032
6033 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6034 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6035 (remote_prepare): New function with most of the TCP code from ...
6036 (remote_open): ... here. Detect PORT here unconditionally. Move also
6037 setting transport_is_reliable.
6038 * server.c (run_once): New variable.
6039 (gdbserver_usage): Document it.
6040 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6041 the first run if RUN_ONCE.
6042 * server.h (run_once, remote_prepare): New declarations.
6043
6044 2011-04-19 Tom Tromey <tromey@redhat.com>
6045
6046 * win32-low.c (handle_load_dll): Remove duplicate "the".
6047
6048 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6049
6050 Remove support for old Cygwin 1.5 versions.
6051 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6052 function to avoid warning.
6053 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6054 warning.
6055
6056 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6057
6058 * gdbserver/server.h (Macro _): Define it if not available.
6059
6060 2011-03-14 Michael Snyder <msnyder@vmware.com>
6061
6062 * hostio.c (handle_close): Remove unnecessary null test.
6063
6064 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6065
6066 * Makefile.in (maintainer-clean realclean distclean): Remove
6067 "make ... subdir_do" command.
6068
6069 2011-03-10 Michael Snyder <msnyder@vmware.com>
6070
6071 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6072
6073 * server.c (handle_v_run): Free alloced buffer on early return.
6074
6075 2011-03-09 Yao Qi <yao@codesourcery.com>
6076
6077 Revert:
6078 2011-03-04 Yao Qi <yao@codesourcery.com>
6079
6080 * Makefile.in: Remove GNU make feature --directory.
6081
6082 2011-03-05 Yao Qi <yao@codesourcery.com>
6083
6084 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6085 (subdir_do): New make target. Copied from gdb/Makefile.
6086 (maintainer-clean, realclean, distclean, clean): Call corresponding
6087 make targets in common/Makefile.
6088
6089 2011-02-11 Yao Qi <yao@codesourcery.com>
6090
6091 * configure.ac: Call AC_PROG_RANLIB.
6092 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6093 * configure: Regenerate.
6094
6095 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6096
6097 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6098
6099 2011-03-06 Yao Qi <yao@codesourcery.com>
6100
6101 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6102
6103 2011-03-05 Yao Qi <yao@codesourcery.com>
6104
6105 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6106 (subdir_do): New make target. Copied from gdb/Makefile.
6107 (maintainer-clean, realclean, distclean, clean): Call corresponding
6108 make targets in common/Makefile.
6109
6110 2011-03-04 Yao Qi <yao@codesourcery.com>
6111
6112 * Makefile.in: Remove GNU make feature --directory.
6113
6114 2011-03-04 Michael Snyder <msnyder@vmware.com>
6115
6116 * server.c (queue_stop_reply): Call xmalloc not malloc.
6117
6118 2011-03-02 Michael Snyder <msnyder@vmware.com>
6119
6120 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6121
6122 2011-02-28 Michael Snyder <msnyder@vmware.com>
6123
6124 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6125 (cmd_qtframe): Ditto.
6126 (cmd_qtbuffer): Ditto.
6127 (cmd_bigqtbuffer): Ditto.
6128
6129 * utils.c (decimal2str): Initialize 'width' to nine, then
6130 don't mess with it.
6131
6132 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6133
6134 * hostio.c (require_data): Free *data, not data.
6135
6136 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6137
6138 * hostio.c (require_data): Use free, not xfree.
6139
6140 2011-02-27 Michael Snyder <msnyder@vmware.com>
6141
6142 * server.c (handle_query): Discard unused value.
6143
6144 * hostio.c (require_data): Free malloc memory before returning
6145 error.
6146
6147 2011-02-26 Michael Snyder <msnyder@vmware.com>
6148
6149 * linux-low.c (list_threads): Call closedir for dirent.
6150
6151 2011-02-27 Michael Snyder <msnyder@vmware.com>
6152
6153 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6154 a case statement falls through.
6155
6156 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6157
6158 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6159 in comparison.
6160
6161 2011-02-26 Michael Snyder <msnyder@vmware.com>
6162
6163 * utils.c (decimal2str): Eliminate dead code and dead param.
6164 (pulongest): Drop dead param from call to decimal2str.
6165 (plongest): Ditto.
6166
6167 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6168
6169 Revert the following patch (not approved yet):
6170 2011-02-21 Hui Zhu <teawater@gmail.com>
6171 * tracepoint.c (tp_printf): New function.
6172 (eval_agent_expr): Handle gdb_agent_op_printf.
6173
6174 2011-02-21 Hui Zhu <teawater@gmail.com>
6175
6176 * tracepoint.c (tp_printf): New function.
6177 (eval_agent_expr): Handle gdb_agent_op_printf.
6178
6179 2011-02-18 Tom Tromey <tromey@redhat.com>
6180
6181 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6182 (tracepoint.o): Likewise.
6183 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6184 (gdb_agent_op_names): Likewise.
6185
6186 2011-02-18 Tom Tromey <tromey@redhat.com>
6187
6188 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6189 gdb_agent_op_rot>: New constants.
6190 (gdb_agent_op_names): Add pick and roll.
6191 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6192 cases.
6193
6194 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6195
6196 * aclocal.m4: Regenerated with aclocal-1.11.1.
6197
6198 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6199
6200 * server.c (handle_qxfer_traceframe_info): New.
6201 (qxfer_packets): Register "traceframe-info".
6202 (handle_query): Report support for qXfer:traceframe-info:read+.
6203 * tracepoint.c (match_blocktype): New.
6204 (traceframe_find_block_type): Rename to ...
6205 (traceframe_walk_blocks): ... this. Add callback filter argument,
6206 and use it.
6207 (traceframe_find_block_type): New, reimplemented on top of
6208 traceframe_walk_blocks.
6209 (build_traceframe_info_xml): New.
6210 (traceframe_read_info): New.
6211 * server.h (traceframe_read_info): Declare.
6212
6213 2011-02-11 Yao Qi <yao@codesourcery.com>
6214
6215 * configure.ac: Call AC_PROG_RANLIB.
6216 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6217 * configure: Regenerate.
6218
6219 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6220
6221 * server.c (gdb_read_memory): Change return semantics to allow
6222 partial transfers.
6223 (handle_search_memory_1): Adjust.
6224 (process_serial_event) <'m' packet>: Handle partial transfers.
6225 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6226
6227 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6228
6229 * regcache.c (init_register_cache): Initialize
6230 regcache->register_status.
6231 (free_register_cache): Release regcache->register_status.
6232 (regcache_cpy): Copy register_status.
6233 (registers_to_string): Print 'x's for unavailable registers.
6234 (supply_register): Mark the register's status valid or
6235 unavailable, depending on whether a buffer was passed in or not.
6236 (supply_register_zeroed): New.
6237 (supply_regblock): Mark the registers' status valid or
6238 unavailable, depending on whether a buffer was passed in or not.
6239 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6240 (struct regcache): New `register_status' field.
6241 (supply_register_zeroed): Declare.
6242 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6243 supply_register_zeroed, rather than passing a NULL buffer to
6244 supply_register.
6245 * tracepoint.c (fetch_traceframe_registers): Update comment.
6246
6247 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6248
6249 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6250 buffer explicit.
6251
6252 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6253
6254 * server.h (decode_xfer_write): Change prototype.
6255 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6256 and don't extract the annex here.
6257 * server.c (decode_xfer_read): Remove `annex' parameter,
6258 and don't extract the annex here.
6259 (decode_xfer): New.
6260 (struct qxfer): New.
6261 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6262 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6263 (handle_qxfer_statictrace): New functions, abstracted out from
6264 handle_query, and made to use the struct qxfer interface.
6265 (handle_threads_qxfer_proper): Rename to ...
6266 (handle_qxfer_threads_proper): ... this.
6267 (handle_threads_qxfer): Rename to ...
6268 (handle_qxfer_threads): ... this. Adjust.
6269 (qxfer_packets): New array.
6270 (handle_qxfer): New function.
6271 (handle_query): Use handle_qxfer.
6272
6273 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6274
6275 * gdbreplay.c: Shorten lines of >= 80 columns.
6276 * linux-low.c: Ditto.
6277 * linux-ppc-low.c: Ditto.
6278 * linux-s390-low.c: Ditto.
6279 * linux-sparc-low.c: Ditto.
6280 * linux-x86-low.c: Ditto.
6281 * linux-xtensa-low.c: Ditto.
6282 * mem-break.c: Ditto.
6283 * nto-low.c: Ditto.
6284 * regcache.h: Ditto.
6285 * remote-utils.c: Ditto.
6286 * server.c: Ditto.
6287 * server.h: Ditto.
6288 * thread-db.c: Ditto.
6289 * tracepoint.c: Ditto.
6290 * utils.c: Ditto.
6291 * win32-low.h: Ditto.
6292
6293 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6294
6295 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6296 update.
6297
6298 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6299
6300 * server.c (gdbserver_version): Update copyright year in version
6301 output.
6302 * gdbreplay.c (gdbreplay_version): Ditto.
6303
6304 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6305
6306 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6307 * linux-bfin-low.c: New file.
6308 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6309 PT_DATA_ADDR for BFIN targets.
6310 * Makefile.in (SFILES): Add linux-bfin-low.c.
6311 (clean): Remove reg-bfin.c.
6312 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6313 * README: Mention supported Blackfin targets.
6314
6315 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6316
6317 * .gitignore: New file.
6318
6319 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6320
6321 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6322
6323 2010-10-22 Jie Zhang <jie@codesourcery.com>
6324
6325 * Makefile.in: Add FLAGS_TO_PASS variable.
6326 (install): Remove dependency of install-only and recursively
6327 invoke make for install-only.
6328
6329 2010-10-04 Doug Evans <dje@google.com>
6330
6331 * Makefile.in (uninstall): Use $(DESTDIR).
6332
6333 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6334
6335 PR gdb/11842
6336
6337 * linux-x86-low.c (compat_siginfo_from_siginfo)
6338 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6339 si_code is < 0. Check for si_code == SI_TIMER before checking for
6340 si_code < 0.
6341
6342 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6343
6344 * lynx-i386-low.c: New file.
6345 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6346
6347 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6348
6349 * lynx-low.c (ptrace_request_to_str): Remove handling for
6350 request values that have been removed in LynxOS 5.x.
6351
6352 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6353
6354 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6355 <ptrace.h>
6356
6357 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6358
6359 * configure.ac: Add --enable-inprocess-agent option.
6360 * configure: Rebuilt.
6361
6362 2010-09-06 Yao Qi <yao@codesourcery.com>
6363
6364 * linux-low.c (linux_kill): Remove unused variable.
6365 (linux_stabilize_threads): Likewise.
6366 * server.c (start_inferior): Likewise.
6367 (queue_stop_reply_callback): Likewise.
6368 * tracepoint.c (do_action_at_tracepoint): Likewise.
6369
6370 2010-09-06 Yao Qi <yao@codesourcery.com>
6371
6372 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6373 on return.
6374
6375 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6376
6377 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6378
6379 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6380
6381 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6382 "$(IPA_DEPFILES)".
6383
6384 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6385
6386 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6387 gdbserver/lynx-ppc-low.c: New files.
6388 * Makefile.in (lynx_low_h): New variable.
6389 (lynx-low.o, lynx-ppc-low.o): New rules.
6390 * configure.ac: On LynxOS, link with -lnetinet.
6391 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6392 * configure: regenerate.
6393
6394 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6395
6396 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6397 * configure.ac: Add check for vasprintf and vsnprintf.
6398 * configure, config.in: Regenerate.
6399 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6400
6401 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6402
6403 * gdbreplay.c: Move include of alloca.h up, next to include of
6404 malloc.h.
6405 * server.h: Add include of malloc.h.
6406 * mem-break.c: Remove include of malloc.h.
6407 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6408
6409 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6410
6411 * Makefile.in (memmem.o): Build with -Wno-error.
6412
6413 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6414
6415 * utils.c (xsnprintf): Make non-static.
6416 * server.h: Add xsnprintf declaration.
6417 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6418 replace calls to snprintf by calls to xsnprintf throughout.
6419
6420 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6421
6422 * configure.ac: Add configure check for alloca.
6423 * configure, config.in: Regenerate.
6424 * server.h: Include alloca.h if it exists.
6425 * gdbreplay.c: Include alloca.h if it exists.
6426
6427 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6428
6429 * linux-low.c (__SIGRTMIN): Define if not already defined.
6430 (linux_create_inferior): Check for __ANDROID__ rather than
6431 __SIGRTMIN.
6432 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6433 are already deferred.
6434 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6435 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6436 stopped and already has a pending signal to report.
6437 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6438 a pending signal to report or is moving out of a jump pad.
6439 (linux_init_signals): Check for __ANDROID__ rather than
6440 __SIGRTMIN.
6441
6442 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6443
6444 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6445 debug_threads check. Avoid a linear search when not doing debug
6446 output.
6447
6448 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6449
6450 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6451 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6452 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6453 (process_event): Change local fd's type to gdb_fildes_t.
6454 (create_file_handler): Adjust prototype.
6455 (delete_file_handler): Adjust prototype.
6456 (handle_file_event): Adjust prototype. Use pfildes.
6457 (create_file_event): Adjsut prototype.
6458 * remote-utils.c (remote_desc, listen_desc): Change type to
6459 gdb_fildes_t.
6460 * server.h: New gdb_fildes_t typedef.
6461 [USE_WIN32API]: Include winsock2.h.
6462 (delete_file_handler, add_file_handler): Adjust prototypes.
6463 (pfildes): Declare.
6464 * utils.c (pfildes): New.
6465
6466 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6467
6468 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6469 * configure: Regenerate.
6470
6471 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6472
6473 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6474 (linux_done_accessing_memory): ... this.
6475 (linux_target_ops): Adjust.
6476 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6477 * nto-low.c (nto_target_ops): Adjust comment.
6478 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6479 * spu-low.c (spu_target_ops): Adjust comment.
6480 * target.h (target_ops): Rename unprepare_to_access_memory field
6481 to done_accessing_memory.
6482 (unprepare_to_access_memory): Rename to ...
6483 (done_accessing_memory): ... this.
6484
6485 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6486
6487 * linux-low.c (linux_prepare_to_access_memory): New.
6488 (linux_unprepare_to_access_memory): New.
6489 (linux_target_ops): Install them.
6490 * server.c (read_memory): Rename to ...
6491 (gdb_read_memory): ... this. Use
6492 prepare_to_access_memory/prepare_to_access_memory.
6493 (write_memory): Rename to ...
6494 (gdb_write_memory): ... this. Use
6495 prepare_to_access_memory/prepare_to_access_memory.
6496 (handle_search_memory_1): Adjust.
6497 (process_serial_event): Adjust.
6498 * target.h (struct target_ops): New fields
6499 prepare_to_access_memory and unprepare_to_access_memory.
6500 (prepare_to_access_memory, unprepare_to_access_memory): New.
6501 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6502 prepare_to_access_memory/prepare_to_access_memory.
6503 * nto-low.c (nto_target_ops): Adjust.
6504 * spu-low.c (spu_target_ops): Adjust.
6505 * win32-low.c (win32_target_ops): Adjust.
6506
6507 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6508
6509 * Makefile.in (WARN_CFLAGS): Get it from configure.
6510 (WERROR_CFLAGS): New.
6511 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6512 * configure.ac: Introduce --enable-werror, which adds -Werror to
6513 the compiler command line. Enabled by default. Disable with
6514 --disable-werror. Add -Wdeclaration-after-statement
6515 Wpointer-arith and -Wformat-nonliteral to warning flags.
6516 * configure: Regenerate.
6517
6518 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6519
6520 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6521
6522 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6523
6524 * gdbreplay.c (remote_error): New.
6525 (gdbchar): New.
6526 (expect): Use gdbchar. Check for error reading from GDB.
6527 Clarify sync error output.
6528 (play): Check for errors writing to GDB.
6529 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6530 * remote-utils.c (getpkt): Check for errors writing to the remote
6531 descriptor.
6532
6533 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6534
6535 * linux-low.c (linux_wait_1): Move non-debugging code out of
6536 `debug_threads' control.
6537
6538 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6539
6540 * linux-low.c (linux_wait_1): Don't set last_status here.
6541 * server.c (push_event, queue_stop_reply_callback): Assert we're
6542 not pushing a TARGET_WAITKIND_IGNORE event.
6543 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6544 (myresume, handle_target_event): Set the thread's last_resume_kind
6545 and last_status from the target returned status.
6546
6547 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6548
6549 PR threads/10729
6550
6551 * linux-x86-low.c (update_debug_registers_callback): New.
6552 (i386_dr_low_set_addr): Use it.
6553 (i386_dr_low_get_addr): New.
6554 (i386_dr_low_set_control): Use update_debug_registers_callback.
6555 (i386_dr_low_get_control): New.
6556 (i386_dr_low_get_status): Adjust.
6557 * linux-low.c (linux_stop_lwp): New.
6558 * linux-low.h (linux_stop_lwp): Declare.
6559
6560 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6561 argument instead of a i386_debug_reg_state.
6562 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6563 a i386_debug_reg_state.
6564 (i386_insert_aligned_watchpoint): Adjust.
6565 (i386_remove_aligned_watchpoint): Adjust.
6566 (i386_low_stopped_data_address): Read the debug registers from the
6567 inferior instead of from the mirrors.
6568 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6569 (i386_dr_low_get_addr): Declare.
6570 (i386_dr_low_get_control): Declare.
6571 (i386_dr_low_get_status): Change prototype.
6572
6573 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6574 (i386_dr_low_get_addr): New.
6575 (i386_dr_low_get_control): New.
6576 (i386_dr_low_get_status): Adjust prototype. Return
6577 dr_status_mirror.
6578 (i386_initial_stuff): Clear dr_status_mirror and
6579 dr_control_mirror.
6580 (i386_get_thread_context): Adjust.
6581 (i386_set_thread_context): Adjust.
6582 (i386_thread_added): Adjust.
6583
6584 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6585
6586 * linux-low.h (linux_thread_area): Delete declaration.
6587
6588 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6589
6590 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6591 after its termination.
6592
6593 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6594
6595 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6596 (gdb_wants_all_stopped): Delete.
6597 (linux_wait_1): Don't call them.
6598 * server.c (handle_v_cont): Tag all threads as want-stopped.
6599 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6600 stopped as "client-wants-stopped".
6601
6602 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6603
6604 * Makefile.in (signals_h): New.
6605 (server_h): Depend on it.
6606 (server.o): Don't depend on $(signals_def).
6607 (signals.o): Depend on $(signals_def).
6608
6609 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6610
6611 * Makefile.in (signals_def): New.
6612 (server_h): Append include/gdb/signals.h and signals_def.
6613 (server.o): Append signals_def.
6614
6615 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6616
6617 * server.c (handle_target_event): Use target_signal_to_host for
6618 resume_info.sig initialization.
6619 * target.h (struct thread_resume) <sig>: New comment.
6620
6621 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6622
6623 * server.c (handle_query): strcpy() the returned string from paddress()
6624 instead of sprintf().
6625 * utils.c (paddress): Return phex_nz().
6626
6627 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6628
6629 * server.c (handle_v_cont): Call mourn_inferior if process
6630 just exited.
6631 (myresume): Likewise.
6632
6633 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6634
6635 Static tracepoints, and integration with UST.
6636
6637 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6638 * mem-break.c (uninsert_all_breakpoints)
6639 (reinsert_all_breakpoints): New.
6640 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6641 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6642 (gdb_agent_ust_loaded, helper_thread_id)
6643 (gdb_agent_helper_thread_id): New macros.
6644 (struct ipa_sym_addresses): Add addr_ust_loaded,
6645 addr_helper_thread_id, addr_cmd_buf.
6646 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6647 (in_process_agent_loaded_ust): New.
6648 (write_e_ust_not_loaded): New.
6649 (maybe_write_ipa_ust_not_loaded): New.
6650 (struct collect_static_trace_data_action): New.
6651 (enum tracepoint_type) <static_tracepoint>: New.
6652 (struct tracepoint) <handle>: Mention static tracepoints.
6653 (struct static_tracepoint_ctx): New.
6654 (CMD_BUF_SIZE): New.
6655 (add_tracepoint_action): Handle static tracepoint actions.
6656 (unprobe_marker_at): New.
6657 (clear_installed_tracepoints): Handle static tracepoints.
6658 (cmd_qtdp): Handle static tracepoints.
6659 (probe_marker_at): New.
6660 (cmd_qtstart): Handle static tracepoints.
6661 (response_tracepoint): Handle static tracepoints.
6662 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6663 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6664 (get_context_regcache): Handle static tracepoints.
6665 (do_action_at_tracepoint): Handle static tracepoint actions.
6666 (traceframe_find_block_type): Handle static trace data blocks.
6667 (traceframe_read_sdata): New.
6668 (download_tracepoints): Download static tracepoint actions.
6669 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6670 (GDB_PROBE_NAME): New.
6671 (ust_ops): New.
6672 (GET_UST_SYM): New.
6673 (USTF): New.
6674 (dlsym_ust): New.
6675 (ust_marker_to_static_tracepoint): New.
6676 (gdb_probe): New.
6677 (collect_ust_data_at_tracepoint): New.
6678 (gdb_ust_probe): New.
6679 (UNIX_PATH_MAX, SOCK_DIR): New.
6680 (gdb_ust_connect_sync_socket): New.
6681 (resume_thread, stop_thread): New.
6682 (run_inferior_command): New.
6683 (init_named_socket): New.
6684 (gdb_ust_socket_init): New.
6685 (cstr_to_hexstr): New.
6686 (next_st): New.
6687 (first_marker, next_marker): New.
6688 (response_ust_marker): New.
6689 (cmd_qtfstm, cmd_qtsstm): New.
6690 (unprobe_marker_at, probe_marker_at): New.
6691 (cmd_qtstmat, gdb_ust_thread): New.
6692 (gdb_ust_init): New.
6693 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6694 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6695 (ST_REGENTRY): New.
6696 (x86_64_st_collect_regmap): New.
6697 (X86_64_NUM_ST_COLLECT_GREGS): New.
6698 (AMD64_RIP_REGNUM): New.
6699 (supply_static_tracepoint_registers): New.
6700 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6701 (ST_REGENTRY): New.
6702 (i386_st_collect_regmap): New.
6703 (i386_NUM_ST_COLLECT_GREGS): New.
6704 (supply_static_tracepoint_registers): New.
6705 * server.c (handle_query): Handle qXfer:statictrace:read.
6706 <qSupported>: Report support for StaticTracepoints, and
6707 qXfer:statictrace:read features.
6708 * server.h (traceframe_read_sdata)
6709 (supply_static_tracepoint_registers): Declare.
6710 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6711 (unpack_varlen_hex): Include in IPA build.
6712 * Makefile.in (ustlibs, ustinc): New.
6713 (IPA_OBJS): Add remote-utils-ipa.o.
6714 ($(IPA_LIB)): Link -ldl and -lpthread.
6715 (UST_CFLAGS): New.
6716 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6717 * config.in, configure: Regenerate.
6718
6719 2010-06-20 Ian Lance Taylor <iant@google.com>
6720 Pedro Alves <pedro@codesourcery.com>
6721
6722 * linux-x86-low.c (always_true): Delete.
6723 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6724 trying to fool the compiler with always_true.
6725
6726 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6727
6728 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6729 conditions in gdbserver.
6730
6731 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6732
6733 * spu-low.c (spu_read_memory): Wrap around local store limit.
6734 (spu_write_memory): Likewise.
6735
6736 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6737
6738 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6739 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6740 LONGEST uses.
6741 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6742 uses.
6743 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6744 uses with LONGEST uses.
6745
6746 2010-06-14 Stan Shebs <stan@codesourcery.com>
6747 Pedro Alves <pedro@codesourcery.com>
6748
6749 Bytecode compiler.
6750
6751 * linux-x86-low.c: Include limits.h.
6752 (add_insns): New.
6753 (always_true): New.
6754 (EMIT_ASM): New.
6755 (EMIT_ASM32): New.
6756 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6757 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6758 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6759 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6760 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6761 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6762 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6763 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6764 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6765 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6766 (amd64_emit_void_call_2): New.
6767 (amd64_emit_ops): New.
6768 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6769 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6770 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6771 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6772 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6773 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6774 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6775 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6776 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6777 (i386_emit_stack_adjust, i386_emit_int_call_1)
6778 (i386_emit_void_call_2): New.
6779 (i386_emit_ops): New.
6780 (x86_emit_ops): New.
6781 (the_low_target): Install x86_emit_ops.
6782 * server.h (struct emit_ops): New.
6783 (get_raw_reg_func_addr): Declare.
6784 (current_insn_ptr, emit_error): Declare.
6785 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6786 (set_trace_state_variable_value): New defines.
6787 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6788 addr_get_trace_state_variable_value and
6789 addr_set_trace_state_variable_value.
6790 (symbol_list): New fields for get_raw_reg,
6791 get_trace_state_variable_value and set_trace_state_variable_value.
6792 (condfn): New typedef.
6793 (struct tracepoint): New field `compiled_cond'.
6794 (do_action_at_tracepoint): Clear compiled_cond.
6795 (get_trace_state_variable_value, set_trace_state_variable_value):
6796 Export in the IPA.
6797 (condition_true_at_tracepoint): If there's a compiled condition,
6798 run that.
6799 (current_insn_ptr, emit_error): New globals.
6800 (struct bytecode_address): New.
6801 (get_raw_reg_func_addr): New.
6802 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6803 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6804 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6805 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6806 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6807 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6808 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6809 (compile_tracepoint_condition, compile_bytecodes): New.
6810 * target.h (emit_ops): Forward declare.
6811 (struct target_ops): New field emit_ops.
6812 (target_emit_ops): New.
6813 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6815 * linux-low.c (linux_emit_ops): New.
6816 (linux_target_ops): Install it.
6817 * linux-low.h (struct linux_target_ops): New field emit_ops.
6818
6819 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6820
6821 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6822 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6823
6824 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6825 Stan Shebs <stan@codesourcery.com>
6826
6827 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6828 (all): Depend on $(extra_libraries).
6829 (install-only): Install the IPA.
6830 (IPA_OBJS, IPA_LIB): New.
6831 (clean): Remove the IPA lib.
6832 (IPAGENT_CFLAGS): New.
6833 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6834 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6835 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6836 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6837 * configure.ac: Check for atomic builtins support in the compiler.
6838 (IPA_DEPFILES, extra_libraries): Define.
6839 * configure.srv (ipa_obj): Add description.
6840 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6841 (i[34567]86-*-linux*): Set ipa_obj.
6842 (x86_64-*-linux*): Set ipa_obj.
6843 * linux-low.c (stabilizing_threads): New.
6844 (supports_fast_tracepoints): New.
6845 (linux_detach): Stabilize threads before detaching.
6846 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6847 the lwp is either not stabilizing, or is moving out of a jump pad.
6848 (linux_fast_tracepoint_collecting): New.
6849 (maybe_move_out_of_jump_pad): New.
6850 (enqueue_one_deferred_signal): New.
6851 (dequeue_one_deferred_signal): New.
6852 (linux_wait_for_event_1): If moving out of a jump pad, defer
6853 pending signals to later.
6854 (linux_stabilize_threads): New.
6855 (linux_wait_1): Check if threads need moving out of jump pads, and
6856 do it if so.
6857 (stuck_in_jump_pad_callback): New.
6858 (move_out_of_jump_pad_callback): New.
6859 (lwp_running): New.
6860 (linux_resume_one_lwp): Handle moving out of jump pads.
6861 (linux_set_resume_request): Dequeue deferred signals.
6862 (need_step_over_p): Also step over fast tracepoint jumps.
6863 (start_step_over): Also uninsert fast tracepoint jumps.
6864 (finish_step_over): Also reinsert fast tracepoint jumps.
6865 (linux_install_fast_tracepoint_jump): New.
6866 (linux_target_ops): Install linux_stabilize_threads and
6867 linux_install_fast_tracepoint_jump_pad.
6868 * linux-low.h (linux_target_ops) <get_thread_area,
6869 install_fast_tracepoint_jump_pad>: New fields.
6870 (struct lwp_info) <collecting_fast_tracepoint,
6871 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6872 (linux_get_thread_area): Declare.
6873 * linux-x86-low.c (jump_insn): New.
6874 (x86_get_thread_area): New.
6875 (append_insns): New.
6876 (push_opcode): New.
6877 (amd64_install_fast_tracepoint_jump_pad): New.
6878 (i386_install_fast_tracepoint_jump_pad): New.
6879 (x86_install_fast_tracepoint_jump_pad): New.
6880 (the_low_target): Install x86_get_thread_area and
6881 x86_install_fast_tracepoint_jump_pad.
6882 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6883 (struct fast_tracepoint_jump): New.
6884 (fast_tracepoint_jump_insn): New.
6885 (fast_tracepoint_jump_shadow): New.
6886 (find_fast_tracepoint_jump_at): New.
6887 (fast_tracepoint_jump_here): New.
6888 (delete_fast_tracepoint_jump): New.
6889 (set_fast_tracepoint_jump): New.
6890 (uninsert_fast_tracepoint_jumps_at): New.
6891 (reinsert_fast_tracepoint_jumps_at): New.
6892 (set_breakpoint_at): Use write_inferior_memory.
6893 (uninsert_raw_breakpoint): Use write_inferior_memory.
6894 (check_mem_read): Mask out fast tracepoint jumps.
6895 (check_mem_write): Mask out fast tracepoint jumps.
6896 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6897 (set_fast_tracepoint_jump): Declare.
6898 (delete_fast_tracepoint_jump)
6899 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6900 (reinsert_fast_tracepoint_jumps_at): Declare.
6901 * regcache.c: Don't compile many functions when building the
6902 in-process agent library.
6903 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6904 the register buffer in the heap.
6905 (free_register_cache): If the register buffer isn't owned by the
6906 regcache, don't free it.
6907 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6908 pre-existing register caches.
6909 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6910 type.
6911 (convert_ascii_to_int): : Constify `from' parameter type.
6912 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6913 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6914 the needed buffer in-place.
6915 (relocate_instruction): New.
6916 * server.c (handle_query) <qSymbols>: If the target supports
6917 tracepoints, give it a chance of looking up symbols. Report
6918 support for fast tracepoints.
6919 (handle_status): Stabilize threads.
6920 (process_serial_event): Adjust.
6921 * server.h (struct fast_tracepoint_jump): Forward declare.
6922 (struct process_info) <fast_tracepoint_jumps>: New field.
6923 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6924 (decode_X_packet, decode_M_packet): Adjust.
6925 (relocate_instruction): Declare.
6926 (in_process_agent_loaded): Declare.
6927 (tracepoint_look_up_symbols): Declare.
6928 (struct fast_tpoint_collect_status): Declare.
6929 (fast_tracepoint_collecting): Declare.
6930 (force_unlock_trace_buffer): Declare.
6931 (handle_tracepoint_bkpts): Declare.
6932 (initialize_low_tracepoint)
6933 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6934 * target.h (struct target_ops) <stabilize_threads,
6935 install_fast_tracepoint_jump_pad>: New fields.
6936 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6937 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6938 [HAVE_STDINT_H]: Include stdint.h.
6939 (trace_debug_1): Rename to ...
6940 (trace_vdebug): ... this.
6941 (trace_debug): Rename to ...
6942 (trace_debug_1): ... this. Add `level' parameter.
6943 (trace_debug): New.
6944 (ATTR_USED, ATTR_NOINLINE): New.
6945 (IP_AGENT_EXPORT): New.
6946 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6947 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6948 (about_to_request_buffer_space, trace_buffer_is_full)
6949 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6950 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6951 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6952 (traceframe_write_count, traceframes_created)
6953 (trace_state_variables)
6954 New renaming defines.
6955 (struct ipa_sym_addresses): New.
6956 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6957 (symbol_list): New.
6958 (ipa_sym_addrs): New.
6959 (all_tracepoint_symbols_looked_up): New.
6960 (in_process_agent_loaded): New.
6961 (write_e_ipa_not_loaded): New.
6962 (maybe_write_ipa_not_loaded): New.
6963 (tracepoint_look_up_symbols): New.
6964 (debug_threads) [IN_PROCESS_AGENT]: New.
6965 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6966 (UNKNOWN_SIDE_EFFECTS): New.
6967 (stop_tracing): New.
6968 (flush_trace_buffer): New.
6969 (stop_tracing_bkpt): New.
6970 (flush_trace_buffer_bkpt): New.
6971 (read_inferior_integer): New.
6972 (read_inferior_uinteger): New.
6973 (read_inferior_data_pointer): New.
6974 (write_inferior_data_pointer): New.
6975 (write_inferior_integer): New.
6976 (write_inferior_uinteger): New.
6977 (struct collect_static_trace_data_action): Delete.
6978 (enum tracepoint_type): New.
6979 (struct tracepoint) <type>: New field `type'.
6980 <actions_str, step_actions, step_actions_str>: Only include in
6981 GDBserver.
6982 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6983 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6984 (tracepoints): Use IP_AGENT_EXPORT.
6985 (last_tracepoint): Don't include in the IPA.
6986 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6987 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6988 (alloced_trace_state_variables): New.
6989 (trace_state_variables): Use IP_AGENT_EXPORT.
6990 (traceframe_t): Delete unused variable.
6991 (circular_trace_buffer): Don't include in the IPA.
6992 (trace_buffer_start): Delete.
6993 (struct trace_buffer_control): New.
6994 (trace_buffer_free): Delete.
6995 (struct ipa_trace_buffer_control): New.
6996 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6997 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6998 New.
6999 (trace_buffer_ctrl): New.
7000 (TRACE_BUFFER_CTRL_CURR): New.
7001 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7002 Reimplement as macros.
7003 (trace_buffer_wrap): Delete.
7004 (traceframe_write_count, traceframe_read_count)
7005 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7006 (struct tracepoint_hit_ctx) <type>: New field.
7007 (struct fast_tracepoint_ctx): New.
7008 (memory_barrier): New.
7009 (cmpxchg): New.
7010 (record_tracepoint_error): Update atomically in the IPA.
7011 (clear_inferior_trace_buffer): New.
7012 (about_to_request_buffer_space): New.
7013 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7014 updating the same buffer.
7015 (add_tracepoint): Default the tracepoint's type to trap
7016 tracepoint, and orig_size to -1.
7017 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7018 internal variables.
7019 (create_trace_state_variable): New parameter `gdb'. Handle it.
7020 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7021 (cmd_qtdp): Handle fast tracepoints.
7022 (cmd_qtdv): Adjust.
7023 (max_jump_pad_size): New.
7024 (gdb_jump_pad_head): New.
7025 (get_jump_space_head): New.
7026 (claim_jump_space): New.
7027 (sort_tracepoints): New.
7028 (MAX_JUMP_SIZE): New.
7029 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7030 IPA.
7031 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7032 support. Upload fast traceframes, and delete internal IPA
7033 breakpoints.
7034 (stop_tracing_handler): New.
7035 (flush_trace_buffer_handler): New.
7036 (cmd_qtstop): Upload fast tracepoints.
7037 (response_tracepoint): Handle fast tracepoints.
7038 (tracepoint_finished_step): Upload fast traceframes. Set the
7039 tracepoint hit context's tracepoint type.
7040 (handle_tracepoint_bkpts): New.
7041 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7042 type. Add comment about fast tracepoints.
7043 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7044 non-existing action_str field.
7045 (get_context_regcache): Handle fast tracepoints.
7046 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7047 to the regcache.
7048 (fast_tracepoint_from_jump_pad_address): New.
7049 (fast_tracepoint_from_ipa_tpoint_address): New.
7050 (collecting_t): New.
7051 (force_unlock_trace_buffer): New.
7052 (fast_tracepoint_collecting): New.
7053 (collecting): New.
7054 (gdb_collect): New.
7055 (write_inferior_data_ptr): New.
7056 (target_tp_heap): New.
7057 (target_malloc): New.
7058 (download_agent_expr): New.
7059 (UALIGN): New.
7060 (download_tracepoints): New.
7061 (download_trace_state_variables): New.
7062 (upload_fast_traceframes): New.
7063 (IPA_FIRST_TRACEFRAME): New.
7064 (IPA_NEXT_TRACEFRAME_1): New.
7065 (IPA_NEXT_TRACEFRAME): New.
7066 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7067 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7068 (gdb_jump_pad_buffer_end): New.
7069 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7070 (initialize_tracepoint): Adjust.
7071 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7072 buffer. Initialize the low module.
7073 * utils.c (PREFIX, TOOLNAME): New.
7074 (malloc_failure): Use PREFIX.
7075 (error): In the IPA, an error causes an exit.
7076 (fatal, warning): Use PREFIX.
7077 (internal_error): Use TOOLNAME.
7078 (NUMCELLS): Increase to 10.
7079 * configure, config.in: Regenerate.
7080
7081 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7082
7083 * server.c (handle_query) <qSupported>: Do two passes over the
7084 qSupported string to avoid nesting strtok.
7085
7086 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7087
7088 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7089 (CDEPS): New.
7090 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7091 -Wl,--dynamic-list.
7092 * configure: Regenerate.
7093 * proc-service.list: New.
7094
7095 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7096
7097 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7098 New comment.
7099
7100 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7101
7102 * gdbreplay.c (remote_open): Check error return from socket() call by
7103 its equality to -1 not by it being negative.
7104 * remote-utils.c (remote_open): Likewise.
7105
7106 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7107
7108 * config.h: Regenerate.
7109
7110 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7111
7112 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7113 doesn't provide PTRACE_GET_THREAD_AREA.
7114
7115 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7116
7117 * linux-m68k-low.c: Include <asm/ptrace.h>
7118 (ps_get_thread_area): Implement.
7119
7120 2010-05-03 Doug Evans <dje@google.com>
7121
7122 * event-loop.c (struct callback_event): New struct.
7123 (callback_list): New global.
7124 (append_callback_event, delete_callback_event): New functions.
7125 (process_callback): New function.
7126 (start_event_loop): Call it.
7127 * remote-utils.c (NOT_SCHEDULED): Define.
7128 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7129 moved out of readchar.
7130 (readchar): Rewrite. Call reschedule before returning.
7131 (reset_readchar): New function.
7132 (remote_close): Call it.
7133 (process_remaining, reschedule): New functions.
7134 * server.h (callback_handler_func): New typedef.
7135 (append_callback_event, delete_callback_event): Declare.
7136
7137 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7138
7139 * proc-service.c (ps_pglobal_lookup): Use
7140 thread_db_look_up_one_symbol.
7141 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7142 parameter. Use it instead of all_symbols_looked_up.
7143 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7144 field.
7145 (all_symbols_looked_up): Don't declare.
7146 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7147 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7148 field.
7149 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7150 Set all_symbols_looked_up here.
7151 (thread_db_look_up_one_symbol): New.
7152 (thread_db_get_tls_address): Adjust.
7153 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7154 thread_db object on the heap, and tentatively set it in the
7155 process structure.
7156 (thread_db_init): Don't set all_symbols_looked_up here.
7157 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7158
7159 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7160
7161 * linux-low.c (linux_kill, linux_detach): Adjust.
7162 (status_pending_p_callback): Remove redundant statement. Check
7163 for !TARGET_WAITIKIND_IGNORE, instead of
7164 TARGET_WAITKIND_STOPPED.
7165 (handle_tracepoints): Make sure LWP is locked. Adjust.
7166 (linux_wait_for_event_1): Adjust.
7167 (linux_cancel_breakpoints): New.
7168 (unsuspend_one_lwp): New.
7169 (unsuspend_all_lwps): New.
7170 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7171 (send_sigstop_callback): Change return type to int, add new
7172 `except' parameter and handle it.
7173 (suspend_and_send_sigstop_callback): New.
7174 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7175 pass them down. If SUSPEND, also increment the lwp's suspend
7176 count.
7177 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7178 (need_step_over_p): Don't consider suspended LWPs.
7179 (start_step_over): Adjust.
7180 (proceed_one_lwp): Change return type to int, add new `except'
7181 parameter and handle it.
7182 (unsuspend_and_proceed_one_lwp): New.
7183 (proceed_all_lwps): Use find_inferior instead of
7184 for_each_inferior.
7185 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7186 also decrement the suspend count of LWPs. Pass `except' down,
7187 instead of hacking its suspend count.
7188 (linux_pause_all): Add `freeze' parameter. Adjust.
7189 (linux_unpause_all): New.
7190 (linux_target_ops): Install linux_unpause_all.
7191 * server.c (handle_status): Adjust.
7192 * target.h (struct target_ops): New fields `unpause_all' and
7193 `cancel_breakpoints'. Add new parameter to `pause_all'.
7194 (pause_all): Add new `freeze' parameter.
7195 (unpause_all): New.
7196 (cancel_breakpoints): New.
7197 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7198 cancel breakpoints.
7199 (cmd_qtstart): Pause threads.
7200 (stop_tracing): Pause threads, and cancel breakpoints.
7201 * win32-low.c (win32_target_ops): Adjust.
7202
7203 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7204
7205 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7206 the inferior right away from here...
7207 (linux_wait_1): ... to here, and adjust to check the thread's
7208 last_resume_kind instead of the lwp's step or stop_expected flags.
7209
7210 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7211
7212 * README: Use consistent `GDB' and `GDBserver' spellings.
7213
7214 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7215
7216 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7217 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7218 (linux_detach_one_lwp): Assume the lwp is stopped.
7219 (any_thread_of): Delete.
7220 (linux_detach): Stop all lwps here. Don't blindly delete all
7221 breakpoints.
7222 (delete_lwp_callback): New.
7223 (linux_mourn): Delete all lwps of the process that is gone.
7224 (linux_wait_1): Don't delete the last lwp of the process here.
7225 * mem-break.h (mark_breakpoints_out): Declare.
7226 * mem-break.c (mark_breakpoints_out): New.
7227 (free_all_breakpoints): Use it.
7228 * server.c (handle_target_event): If the process is gone, mark
7229 breakpoints out.
7230 * thread-db.c (struct thread_db) <create_bp>: New field.
7231 (thread_db_enable_reporting): Fix prototype. Store a thread event
7232 breakpoint reference in the thread_db struct.
7233 (thread_db_load_search): Clear the thread_db object.
7234 (try_thread_db_load_1): Ditto.
7235 (switch_to_process): New.
7236 (disable_thread_event_reporting): Use it.
7237 (remove_thread_event_breakpoints): New.
7238 (thread_db_detach, thread_db_mourn): Use it.
7239
7240 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7241
7242 * linux-low.c (linux_enable_event_reporting): New.
7243 (linux_wait_for_event_1, handle_extended_wait): Use it.
7244
7245 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7246
7247 * linux-low.c (linux_kill_one_lwp, linux_kill)
7248 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7249 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7250 SIGSTOP even if the LWP is stopped.
7251 (send_sigstop_callback): New.
7252 (stop_all_lwps): Use send_sigstop_callback instead.
7253 (linux_resume_one_thread): Adjust.
7254 (proceed_one_lwp): Still proceed an LWP that the client has
7255 requested to stop, if we haven't reported it as stopped yet. Make
7256 sure that LWPs the client want stopped, have a pending SIGSTOP.
7257
7258 2010-04-26 Doug Evans <dje@google.com>
7259
7260 * server.c (handle_general_set): Make static.
7261
7262 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7263 Print received char after testing for error/eof instead of before.
7264 (input_interrupt): Tweak comment.
7265
7266 2010-04-23 Doug Evans <dje@google.com>
7267
7268 * server.c (start_inferior): Print inferior argv if --debug.
7269
7270 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7271
7272 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7273 * nto-x86-low.c: Include server.h
7274
7275 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7276
7277 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7278 be consistent with other sources of this directory.
7279 (init_registers_amd64): Correct name of source file of this function
7280 in the comment.
7281
7282 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7283
7284 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7285 64-bit executables.
7286
7287 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7288
7289 * win32-i386-low.c: Add 64-bit support.
7290 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7291 (init_registers_amd64): Declare.
7292 (mappings): Add 64-bit version of array.
7293 (init_windows_x86): New function.
7294 (the_low_target): Change init_arch field to init_windows_x86.
7295
7296 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7297
7298 * win32-low.c: Adapt to support also 64-bit architecture.
7299 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7300 (get_image_name): Use SIZE_T type for local variable `done'.
7301 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7302 (toolhelp_get_dll_name): Idem.
7303 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7304 Use uintptr_t typecast to avoid warning.
7305 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7306 (handle_exception): Use phex_nz to avoid warning.
7307 (win32_wait): Remove unused local variable `process'.
7308
7309 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7310
7311 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7312 `amd64-avx.o'.
7313
7314 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7315
7316 * configure.ac: Use `ws2_32' library for srv_mingw.
7317 * configure: Regenerate.
7318 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7319 * remote-utils.c: Likewise.
7320
7321 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7322
7323 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7324 if __x86_64__ is defined.
7325
7326 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7327
7328 * configure: Regenerate.
7329
7330 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7331
7332 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7333 * target.h (target_ops): New get_tib_address field.
7334 * win32-low.h (win32_thread_info): Add thread_local_base field.
7335 * win32-low.c (child_add_thread): Add tlb argument.
7336 Set thread_local_base field to TLB.
7337 (get_child_debug_event): Adapt to child_add_thread change.
7338 (win32_get_tib_address): New function.
7339 (win32_target_ops): Set get_tib_address field to
7340 win32_get_tib_address.
7341 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7342
7343 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7344
7345 * linux-low.c (linux_mourn): Also remove the process.
7346 * server.c (handle_target_event): Don't remove the process here.
7347 * nto-low.c (nto_mourn): New.
7348 (nto_target_ops): Install it.
7349 * spu-low.c (spu_mourn): New.
7350 (spu_target_ops): Install it.
7351 * win32-low.c (win32_mourn): New.
7352 (win32_target_ops): Install it.
7353
7354 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7355
7356 * server.h (buffer_xml_printf): Remove redundant `;'.
7357
7358 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7359
7360 * regcache.c (set_register_cache): Invalidate regcaches before
7361 changing the register cache layout.
7362 (regcache_invalidate_one): Allow a NULL regcache.
7363 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7364 regcaches before changing the register cache layout or the target
7365 regsets.
7366
7367 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7368
7369 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7370 variable warning on Linux/x86-64.
7371
7372 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7373
7374 GDBserver disconnected tracing support.
7375
7376 * linux-low.c (linux_remove_process): Delete.
7377 (add_lwp): Don't set last_resume_kind here.
7378 (linux_kill): Use `mourn'.
7379 (linux_detach): Use `thread_db_detach', and `mourn'.
7380 (linux_mourn): New.
7381 (linux_attach_lwp_1): Adjust comment.
7382 (linux_attach): last_resume_kind moved the thread_info; adjust.
7383 (status_pending_p_callback): Adjust.
7384 (linux_wait_for_event_1): Adjust.
7385 (count_events_callback, select_singlestep_lwp_callback)
7386 (select_event_lwp_callback, cancel_breakpoints_callback)
7387 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7388 (proceed_one_lwp): Adjust.
7389 (linux_async): Add debug output.
7390 (linux_thread_stopped): New.
7391 (linux_pause_all): New.
7392 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7393 linux_pause_all.
7394 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7395 (thread_db_free): Delete declaration.
7396 (thread_db_detach, thread_db_mourn): Declare.
7397 * thread-db.c (thread_db_init): Use thread_db_mourn.
7398 (thread_db_free): Delete, split in two.
7399 (disable_thread_event_reporting): New.
7400 (thread_db_detach): New.
7401 (thread_db_mourn): New.
7402
7403 * server.h (struct thread_info) <last_resume_kind>: New field.
7404 <attached>: Add comment.
7405 <gdb_detached>: New field.
7406 (handler_func): Change return type to int.
7407 (handle_serial_event, handle_target_event): Ditto.
7408 (gdb_connected): Declare.
7409 (tracing): Delete.
7410 (disconnected_tracing): Declare.
7411 (stop_tracing): Declare.
7412
7413 * server.c (handle_query) <qSupported>: Report support for
7414 disconnected tracing.
7415 (queue_stop_reply_callback): Account for running threads.
7416 (gdb_wants_thread_stopped): New.
7417 (gdb_wants_all_threads_stopped): New.
7418 (gdb_reattached_process): New.
7419 (handle_status): Clear the `gdb_detached' flag of all processes.
7420 In all-stop, stop all threads.
7421 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7422 (process_serial_event): If the remote connection breaks, or if an
7423 exit was forced with "monitor exit", force an event loop exit.
7424 Handle disconnected tracing on detach.
7425 (handle_serial_event): Adjust.
7426 (handle_target_event): If GDB isn't connected, forward events back
7427 to the inferior, unless the last process exited, in which case,
7428 exit gdbserver. Adjust interface.
7429
7430 * remote-utils.c (remote_open): Don't block in accept. Instead
7431 register an event loop source on the listen socket file
7432 descriptor. Refactor bits into ...
7433 (listen_desc): ... this new global.
7434 (gdb_connected): ... this new function.
7435 (enable_async_notification): ... this new function.
7436 (handle_accept_event): ... this new function.
7437 (remote_close): Clear remote_desc.
7438
7439 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7440
7441 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7442 New fields.
7443 (mourn_inferior): Define.
7444 (target_process_qsupported): Avoid the dangling else problem.
7445 (thread_stopped): Define.
7446 (pause_all): Define.
7447 (target_waitstatus_to_string): Declare.
7448 * target.c (target_waitstatus_to_string): New.
7449
7450 * tracepoint.c (tracing): Make extern.
7451 (disconnected_tracing): New.
7452 (stop_tracing): Make extern. Handle tracing stops due to GDB
7453 disconnecting.
7454 (cmd_qtdisconnected): New.
7455 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7456 (handle_tracepoint_general_set): Handle QTDisconnected.
7457
7458 * event-loop.c (event_handler_func): Change return type to int.
7459 (process_event): Bail out if the event handler wants the event
7460 loop to stop.
7461 (handle_file_event): Ditto.
7462 (start_event_loop): Bail out if the event handler wants the event
7463 loop to stop.
7464
7465 * nto-low.c (nto_target_ops): Adjust.
7466 * spu-low.c (spu_wait): Don't remove the process here.
7467 (spu_target_ops): Adjust.
7468 * win32-low.c (win32_wait): Don't remove the process here.
7469 (win32_target_ops): Adjust.
7470
7471 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7472
7473 * regcache.c (realloc_register_cache): Invalidate inferior's
7474 regcache before recreating it.
7475
7476 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7477
7478 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7479
7480 2010-04-09 Stan Shebs <stan@codesourcery.com>
7481 Pedro Alves <pedro@codesourcery.com>
7482
7483 * server.h (LONGEST): New.
7484 (struct thread_info) <while_stepping>: New field.
7485 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7486 Declare.
7487 (initialize_tracepoint, handle_tracepoint_general_set)
7488 (handle_tracepoint_query, tracepoint_finished_step)
7489 (tracepoint_was_hit, release_while_stepping_state_list):
7490 (current_traceframe): Declare.
7491 * server.c (handle_general_set): Handle tracepoint packets.
7492 (read_memory): New.
7493 (write_memory): New.
7494 (handle_search_memory_1): Use read_memory.
7495 (handle_query): Report support for conditional tracepoints, trace
7496 state variables, and tracepoint sources. Handle tracepoint
7497 queries.
7498 (main): Initialize the tracepoints module.
7499 (process_serial_event): Handle traceframe reads/writes.
7500
7501 * linux-low.c (handle_tracepoints): New.
7502 (linux_wait_1): Call it.
7503 (linux_resume_one_lwp): Handle while-stepping.
7504 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7505 (linux_target_ops): Install them.
7506 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7507 New field.
7508 * linux-x86-low.c (x86_supports_tracepoints): New.
7509 (the_low_target). Install it.
7510
7511 * mem-break.h (delete_breakpoint): Declare.
7512 * mem-break.c (delete_breakpoint): Make external.
7513
7514 * target.h (struct target_ops): Add `supports_tracepoints',
7515 `read_pc', and `write_pc' fields.
7516 (target_supports_tracepoints): Define.
7517 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7518 (phex_nz): New.
7519
7520 * regcache.h (struct regcache) <registers_owned>: New field.
7521 (init_register_cache, regcache_cpy): Declare.
7522 (regcache_read_pc, regcache_write_pc): Declare.
7523 (register_cache_size): Declare.
7524 (supply_regblock): Declare.
7525 * regcache.c (init_register_cache): New.
7526 (new_register_cache): Use it.
7527 (regcache_cpy): New.
7528 (register_cache_size): New.
7529 (supply_regblock): New.
7530 (regcache_read_pc, regcache_write_pc): New.
7531
7532 * tracepoint.c: New.
7533
7534 * Makefile.in (OBS): Add tracepoint.o.
7535 (tracepoint.o): New rule.
7536
7537 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7538
7539 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7540 (i386-mmx.o): New.
7541 (i386-mmx.c): Likewise.
7542 (i386-mmx-linux.o): Likewise.
7543 (i386-mmx-linux.c): Likewise.
7544
7545 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7546 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7547 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7548 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7549
7550 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7551 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7552 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7553
7554 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7555
7556 * Makefile.in (clean): Updated.
7557 (i386-avx.o): New.
7558 (i386-avx.c): Likewise.
7559 (i386-avx-linux.o): Likewise.
7560 (i386-avx-linux.c): Likewise.
7561 (amd64-avx.o): Likewise.
7562 (amd64-avx.c): Likewise.
7563 (amd64-avx-linux.o): Likewise.
7564 (amd64-avx-linux.c): Likewise.
7565
7566 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7567 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7568 (srv_amd64_regobj): Add amd64-avx.o.
7569 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7570 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7571 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7572 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7573 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7574 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7575 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7576
7577 * i387-fp.c: Include "i386-xstate.h".
7578 (i387_xsave): New.
7579 (i387_cache_to_xsave): Likewise.
7580 (i387_xsave_to_cache): Likewise.
7581 (x86_xcr0): Likewise.
7582
7583 * i387-fp.h (i387_cache_to_xsave): Likewise.
7584 (i387_xsave_to_cache): Likewise.
7585 (x86_xcr0): Likewise.
7586
7587 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7588 * linux-crisv32-low.c (target_regsets): Likewise.
7589 * linux-m68k-low.c (target_regsets): Likewise.
7590 * linux-mips-low.c (target_regsets): Likewise.
7591 * linux-ppc-low.c (target_regsets): Likewise.
7592 * linux-s390-low.c (target_regsets): Likewise.
7593 * linux-sh-low.c (target_regsets): Likewise.
7594 * linux-sparc-low.c (target_regsets): Likewise.
7595 * linux-xtensa-low.c (target_regsets): Likewise.
7596
7597 * linux-low.c: Include <sys/uio.h>.
7598 (regsets_fetch_inferior_registers): Support nt_type.
7599 (regsets_store_inferior_registers): Likewise.
7600 (linux_process_qsupported): New.
7601 (linux_target_ops): Add linux_process_qsupported.
7602
7603 * linux-low.h (regset_info): Add nt_type.
7604 (linux_target_ops): Add process_qsupported.
7605
7606 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7607 and <sys/uio.h>.
7608 (init_registers_i386_avx_linux): New.
7609 (init_registers_amd64_avx_linux): Likewise.
7610 (xmltarget_i386_linux_no_xml): Likewise.
7611 (xmltarget_amd64_linux_no_xml): Likewise.
7612 (PTRACE_GETREGSET): Likewise.
7613 (PTRACE_SETREGSET): Likewise.
7614 (x86_fill_xstateregset): Likewise.
7615 (x86_store_xstateregset): Likewise.
7616 (use_xml): Likewise.
7617 (x86_linux_update_xmltarget): Likewise.
7618 (x86_linux_process_qsupported): Likewise.
7619 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7620 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7621 init_registers_i386_linux here. Call
7622 x86_linux_update_xmltarget.
7623 (the_low_target): Add x86_linux_process_qsupported.
7624
7625 * server.c (handle_query): Call target_process_qsupported.
7626
7627 * target.h (target_ops): Add process_qsupported.
7628 (target_process_qsupported): New.
7629
7630 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7631
7632 * inferiors.c (add_thread): Set last_status kind to
7633 TARGET_WAITKIND_IGNORE.
7634 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7635 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7636 (linux_wait_1): Move `thread' local definition to block that uses
7637 it. Don't NULL initialize `event_child'.
7638 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7639 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7640 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7641
7642 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7643
7644 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7645 an extended waitstatus, or by a watchpoint.
7646 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7647 thread was stepping or has been stopped by a watchpoint.
7648
7649 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7650
7651 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7652 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7653 of another, then delete the previous, and validate all
7654 breakpoints.
7655 (validate_inserted_breakpoint): New.
7656 (delete_disabled_breakpoints): New.
7657 (validate_breakpoints): New.
7658 (check_mem_read): Validate breakpoints before trusting their
7659 shadow. Delete disabled breakpoints.
7660 (check_mem_write): Validate breakpoints before trusting they
7661 should be inserted. Delete disabled breakpoints.
7662 * mem-break.h (validate_breakpoints):
7663 * server.c (handle_query): Validate breakpoints when we see a
7664 qSymbol query.
7665
7666 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7667
7668 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7669 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7670 if we could tell there's a GDB breakpoint at stop_pc.
7671 (need_step_over_p): Don't do a step over if we find a GDB
7672 breakpoint at the resume PC.
7673
7674 * mem-break.c (struct raw_breakpoint): New.
7675 (enum bkpt_type): New type `gdb_breakpoint'.
7676 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7677 fields. New field `raw'.
7678 (find_raw_breakpoint_at): New.
7679 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7680 breakpoint instead.
7681 (set_breakpoint_at): Adjust.
7682 (delete_raw_breakpoint): New.
7683 (release_breakpoint): New.
7684 (delete_breakpoint): Rename to...
7685 (delete_breakpoint_1): ... this. Add proc parameter. Use
7686 release_breakpoint. Return ENOENT.
7687 (delete_breakpoint): Reimplement.
7688 (find_breakpoint_at): Delete.
7689 (find_gdb_breakpoint_at): New.
7690 (delete_breakpoint_at): Delete.
7691 (set_gdb_breakpoint_at): New.
7692 (delete_gdb_breakpoint_at): New.
7693 (gdb_breakpoint_here): New.
7694 (set_reinsert_breakpoint): Use release_breakpoint.
7695 (uninsert_breakpoint): Rename to ...
7696 (uninsert_raw_breakpoint): ... this.
7697 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7698 (reinsert_raw_breakpoint): Change parameter type to
7699 raw_breakpoint.
7700 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7701 instead.
7702 (check_breakpoints): Adjust. Use release_breakpoint.
7703 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7704 (breakpoint_inserted_here): Ditto.
7705 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7706 Don't trust the breakpoint's shadow if it is not inserted.
7707 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7708 (delete_all_breakpoints): Adjust.
7709 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7710 use delete_breakpoint_1.
7711
7712 * mem-break.h (breakpoints_supported): Delete declaration.
7713 (set_gdb_breakpoint_at): Declare.
7714 (gdb_breakpoint_here): Declare.
7715 (delete_breakpoint_at): Delete.
7716 (delete_gdb_breakpoint_at): Declare.
7717
7718 * server.h (struct raw_breakpoint): Forward declare.
7719 (struct process_info): New field `raw_breakpoints'.
7720
7721 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7722 breakpoints.
7723
7724 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7725
7726 * linux-low.c (status_pending_p_callback): Fix comment.
7727 (linux_wait_for_event_1): Move most of the internal breakpoint
7728 handling from here...
7729 (linux_wait_1): ... to here.
7730 (count_events_callback): New.
7731 (select_singlestep_lwp_callback): New.
7732 (select_event_lwp_callback): New.
7733 (cancel_breakpoints_callback): New.
7734 (select_event_lwp): New.
7735 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7736 priority to all LWPs that have had events that should be reported
7737 to the client. Cancel breakpoints when about to reporting the
7738 event to the client, not while stopping lwps. No longer cancel
7739 finished single-steps here.
7740 (cancel_finished_single_step): Delete.
7741 (cancel_finished_single_steps): Delete.
7742
7743 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7744
7745 * mem-break.c (enum bkpt_type): New.
7746 (struct breakpoint): New field `type'.
7747 (set_breakpoint_at): Change return type to struct breakpoint
7748 pointer. Set type to `other_breakpoint' by default.
7749 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7750 in the breakpoint list.
7751 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7752 (reinsert_breakpoint): Rename to ...
7753 (reinsert_raw_breakpoint): ... this.
7754 (reinsert_breakpoints_at): Adjust.
7755 * mem-break.h (struct breakpoint): Declare.
7756 (set_breakpoint_at): Change return type to struct breakpoint
7757 pointer.
7758
7759 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7760
7761 * server.c (handle_query): Assign, not compare.
7762
7763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7764
7765 Teach linux gdbserver to step-over-breakpoints.
7766
7767 * linux-low.c (can_hardware_single_step): New.
7768 (supports_breakpoints): New.
7769 (handle_extended_wait): If stopping threads, read the stop pc of
7770 the new cloned LWP.
7771 (get_pc): New.
7772 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7773 low target doesn't support retrieving the PC.
7774 (add_lwp): Set last_resume_kind to resume_continue.
7775 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7776 (linux_attach): Don't clear stop_expected. Set the lwp's
7777 last_resume_kind to resume_stop.
7778 (linux_detach_one_lwp): Don't check for removed breakpoints.
7779 (check_removed_breakpoint): Delete.
7780 (status_pending_p): Rename to ...
7781 (status_pending_p_callback): ... this. Don't check for removed
7782 breakpoints. Don't consider threads that are stopped from GDB's
7783 perspective.
7784 (linux_wait_for_lwp): Always read the stop_pc here.
7785 (cancel_breakpoint): New.
7786 (step_over_bkpt): New global.
7787 (linux_wait_for_event_1): Implement stepping over breakpoints.
7788 (gdb_wants_lwp_stopped): New.
7789 (gdb_wants_all_stopped): New.
7790 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7791 single-step traps here. Store the thread's last reported target
7792 wait status.
7793 (send_sigstop): Don't clear stop_expected. Always set it,
7794 instead.
7795 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7796 (cancel_finished_single_step): New.
7797 (cancel_finished_single_steps): New.
7798 (wait_for_sigstop): Don't cancel finished single-step traps here.
7799 (linux_resume_one_lwp): Don't check for removed breakpoints.
7800 Don't set `step' on non-hardware step archs.
7801 (linux_set_resume_request): Ignore resume_stop requests if already
7802 stopping or stopped. Set the lwp's last_resume_kind.
7803 (resume_status_pending_p): Don't check for removed breakpoints.
7804 (need_step_over_p): New.
7805 (start_step_over): New.
7806 (finish_step_over): New.
7807 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7808 requests. Clear the thread's last reported target waitstatus.
7809 Don't use the `suspended' flag. Don't consider pending breakpoints.
7810 (linux_resume): Start a step-over if necessary.
7811 (proceed_one_lwp): New.
7812 (proceed_all_lwps): New.
7813 (unstop_all_lwps): New.
7814 * linux-low.h (struct lwp_info): Rewrite comment for the
7815 `suspended' flag. Add the `stop_pc' field. Delete the
7816 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7817 Add `'last_resume_kind' and `need_step_over' fields.
7818 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7819 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7820 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7821 (set_raw_breakpoint_at): New.
7822 (set_breakpoint_at): Rewrite to use it.
7823 (reinsert_breakpoint_handler): Delete.
7824 (set_reinsert_breakpoint): New.
7825 (reinsert_breakpoint_by_bp): Delete.
7826 (delete_reinsert_breakpoints): New.
7827 (uninsert_breakpoint): Rewrite.
7828 (uninsert_breakpoints_at): New.
7829 (reinsert_breakpoint): Rewrite.
7830 (reinsert_breakpoints_at): New.
7831 (check_breakpoints): Rewrite.
7832 (breakpoint_here): New.
7833 (breakpoint_inserted_here): New.
7834 (check_mem_read): Adjust.
7835 * mem-break.h (breakpoints_supported, breakpoint_here)
7836 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7837 (reinsert_breakpoint_by_bp): Delete declaration.
7838 (delete_reinsert_breakpoints): Declare.
7839 (reinsert_breakpoint): Delete declaration.
7840 (reinsert_breakpoints_at): Declare.
7841 (uninsert_breakpoint): Delete declaration.
7842 (uninsert_breakpoints_at): Declare.
7843 (check_breakpoints): Adjust prototype.
7844 * server.h: Adjust include order.
7845 (struct thread_info): Declare here. Add a `last_status' field.
7846
7847 2010-03-23 Michael Snyder <msnyder@vmware.com>
7848
7849 * server.c (crc32): New function.
7850 (handle_query): Add handling for 'qCRC:' request.
7851
7852 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7853
7854 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7855 lwp had been stopped by a watchpoint.
7856
7857 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7858
7859 * server.h (internal_error): Declare.
7860 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7861 * utils.c (internal_error): New function.
7862
7863 2010-03-15 Andreas Schwab <schwab@redhat.com>
7864
7865 * configure.srv: Fix typo setting srv_regobj.
7866
7867 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7868
7869 * linux-low.c (fetch_register): Avoid passing a non string literal
7870 format to `error'.
7871 (usr_store_inferior_registers): Ditto.
7872
7873 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7874
7875 * linux-low.c (linux_write_memory): Bail out early if peeking
7876 memory failed.
7877
7878 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7879
7880 * linux-low.h (struct lwp_info): New fields
7881 `stopped_by_watchpoint' and `stopped_data_address'.
7882 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7883 here, and cache them in the lwp object.
7884 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7885 directly.
7886 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7887 field.
7888 (linux_stopped_by_watchpoint): Rewrite.
7889 (linux_stopped_data_address): Rewrite.
7890
7891 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7892
7893 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7894 switching the current inferior, not before.
7895
7896 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7897
7898 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7899 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7900 i386-linux.c and amd64-linux.c.
7901 (reg-i386.o): Removed.
7902 (reg-i386.c): Likewise.
7903 (reg-i386-linux.o): Likewise.
7904 (reg-i386-linux.c): Likewise.
7905 (reg-x86-64.o): Likewise.
7906 (reg-x86-64.c): Likewise.
7907 (reg-x86-64-linux.o): Likewise.
7908 (reg-x86-64-linux.c): Likewise.
7909 (i386.o): New.
7910 (i386.c): Likewise.
7911 (i386-linux.o): Likewise.
7912 (i386-linux.c): Likewise.
7913 (amd64.o): Likewise.
7914 (amd64.c): Likewise.
7915 (amd64-linux.o): Likewise.
7916 (amd64-linux.c): Likewise.
7917
7918 * configure.srv (srv_i386_regobj): New.
7919 (srv_i386_linux_regobj): Likewise.
7920 (srv_amd64_regobj): Likewise.
7921 (srv_amd64_linux_regobj): Likewise.
7922 (srv_i386_32bit_xmlfiles): Likewise.
7923 (srv_i386_64bit_xmlfiles): Likewise.
7924 (srv_i386_xmlfiles): Likewise.
7925 (srv_amd64_xmlfiles): Likewise.
7926 (srv_i386_linux_xmlfiles): Likewise.
7927 (srv_amd64_linux_xmlfiles): Likewise.
7928 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7929 srv_xmlfiles to $srv_i386_xmlfiles.
7930 (i[34567]86-*-mingw32ce*): Likewise.
7931 (i[34567]86-*-mingw*): Likewise.
7932 (i[34567]86-*-nto*): Likewise.
7933 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7934 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7935 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7936 (x86_64-*-linux*): Likewise.
7937
7938 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7939 (init_registers_amd64_linux): New.
7940 (x86_arch_setup): Replace init_registers_x86_64_linux with
7941 init_registers_amd64_linux.
7942
7943 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7944
7945 * configure.ac: Check for libdl. If it is not available link against
7946 static libthread_db.
7947 * configure: Regenerate.
7948
7949 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7950
7951 PR9605
7952
7953 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7954 handing a read watchpoint.
7955 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7956
7957 2010-02-12 Doug Evans <dje@google.com>
7958
7959 * linux-low.c (linux_supports_tracefork_flag): Document.
7960 (linux_look_up_symbols): Add comment.
7961
7962 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7963
7964 * regcache.c (supply_register): Clear regcache if buf is NULL.
7965
7966 2010-02-02 Nicolas Roche <roche@sourceware.org>
7967 Joel Brobecker <brobecker@adacore.com>
7968
7969 * inferiors.c (find_inferior): Add function documentation.
7970 (unloaded_dll): Handle the case where the unloaded dll has not
7971 been previously registered in the dll list.
7972
7973 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7974
7975 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7976 (thumb2_breakpoint): New.
7977 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7978
7979 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7980
7981 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7982 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7983 breakpoints.
7984
7985 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7986
7987 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7988
7989 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7990
7991 * linux-s390-low.c (s390_collect_ptrace_register)
7992 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7993
7994 2010-01-21 Doug Evans <dje@google.com>
7995
7996 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7997 (PTRACE_ARG4_TYPE): New macro.
7998 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7999 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8000 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8001 (usr_store_inferior_registers): Ditto.
8002 (linux_read_memory, linux_write_memory): Ditto.
8003 (linux_test_for_tracefork): Ditto.
8004
8005 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8006 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8007
8008 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8009
8010 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8011 target.
8012
8013 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8014
8015 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8016 prototype to take a regcache. Adjust.
8017
8018 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8019
8020 * regcache.h (struct thread_info): Forward declare.
8021 (struct regcache): New.
8022 (new_register_cache): Adjust prototype.
8023 (get_thread_regcache): Declare.
8024 (free_register_cache): Adjust prototype.
8025 (registers_to_string, registers_from_string): Ditto.
8026 (supply_register, supply_register_by_name, collect_register)
8027 (collect_register_as_string, collect_register_by_name): Ditto.
8028 * regcache.c (struct inferior_regcache_data): Delete.
8029 (get_regcache): Rename to ...
8030 (get_thread_regcache): ... this. Adjust. Switch inferior before
8031 fetching registers.
8032 (regcache_invalidate_one): Adjust.
8033 (regcache_invalidate): Fix prototype.
8034 (new_register_cache): Return the new register cache.
8035 (free_register_cache): Change prototype.
8036 (realloc_register_cache): Adjust.
8037 (registers_to_string): Change prototype to take a regcache. Adjust.
8038 (registers_from_string): Ditto.
8039 (register_data): Ditto.
8040 (supply_register): Ditto.
8041 (supply_register_by_name): Ditto.
8042 (collect_register): Ditto.
8043 (collect_register_as_string): Ditto.
8044 (collect_register_by_name): Ditto.
8045 * server.c (process_serial_event): Adjust.
8046 * linux-low.h (regset_fill_func, regset_store_func): Change
8047 prototype.
8048 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8049 Change prototype.
8050 * linux-low.c (get_stop_pc): Adjust.
8051 (check_removed_breakpoint): Adjust.
8052 (linux_wait_for_event): Adjust.
8053 (linux_resume_one_lwp): Adjust.
8054 (fetch_register): Add regcache parameter. Adjust.
8055 (usr_store_inferior_registers): Ditto.
8056 (regsets_fetch_inferior_registers): Ditto.
8057 (regsets_store_inferior_registers): Ditto.
8058 (linux_fetch_registers, linux_store_registers): Ditto.
8059 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8060 regcache. Adjust.
8061 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8062 Ditto.
8063 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8064 prototype to take a regcache.
8065 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8066 * remote-utils.c (convert_ascii_to_int, outreg)
8067 (prepare_resume_reply): Change prototype to take a regcache.
8068 Adjust.
8069 * target.h (struct target_ops) <fetch_registers, store_registers>:
8070 Change prototype to take a regcache.
8071 (fetch_inferior_registers, store_inferior_registers): Change
8072 prototype to take a regcache. Adjust.
8073 * proc-service.c (ps_lgetregs): Adjust.
8074 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8075 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8076 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8077 take a regcache. Adjust.
8078 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8079 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8080 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8081 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8082 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8083 (cris_cannot_fetch_register):
8084 (cris_breakpoint_at): Change prototype to take a regcache.
8085 Adjust.
8086 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8087 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8088 to take a regcache. Adjust.
8089 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8090 Adjust.
8091 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8092 take a regcache. Adjust.
8093 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8094 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8095 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8096 * linux-mips-low.c (mips_get_pc):
8097 (mips_set_pc): Change prototype to take a regcache. Adjust.
8098 (mips_reinsert_addr): Adjust.
8099 (mips_collect_register): Change prototype to take a regcache.
8100 Adjust.
8101 (mips_supply_register):
8102 (mips_collect_register_32bit, mips_supply_register_32bit)
8103 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8104 (mips_store_fpregset): Ditto.
8105 * linux-ppc-low.c (ppc_supply_ptrace_register)
8106 (ppc_supply_ptrace_register): Ditto.
8107 (parse_spufs_run): Adjust.
8108 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8109 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8110 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8111 take a regcache. Adjust.
8112 * linux-s390-low.c (s390_collect_ptrace_register)
8113 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8114 (s390_set_pc): Change prototype to take a regcache. Adjust.
8115 (s390_arch_setup): Adjust.
8116 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8117 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8118 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8119 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8120 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8121 regcache. Adjust.
8122 (sparc_breakpoint_at): Adjust.
8123 * linux-xtensa-low.c (xtensa_fill_gregset):
8124 (xtensa_store_gregset):
8125 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8126 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8127 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8128 prototype to take a regcache. Adjust.
8129 * win32-arm-low.c (arm_fetch_inferior_register)
8130 (arm_store_inferior_register): Change prototype to take a
8131 regcache. Adjust.
8132 * win32-i386-low.c (i386_fetch_inferior_register)
8133 (i386_store_inferior_register): Change prototype to take a
8134 regcache. Adjust.
8135 * win32-low.c (child_fetch_inferior_registers)
8136 (child_store_inferior_registers): Change prototype to take a
8137 regcache. Adjust.
8138 (win32_wait): Adjust.
8139 (win32_fetch_inferior_registers): Change prototype to take a
8140 regcache. Adjust.
8141 (win32_store_inferior_registers): Adjust.
8142 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8143 store_inferior_register>: Change prototype to take a regcache.
8144
8145 2010-01-20 Doug Evans <dje@google.com>
8146
8147 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8148 #ifdef.
8149 (linux_wait_for_event1, linux_init_signals): Ditto.
8150 (W_STOPCODE): Provide definition if missing.
8151
8152 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8153
8154 * linux-low.c (linux_core_of_thread): New.
8155 (compare_ints, show_process, list_threads): New.
8156 (linux_qxfer_osdata): Report threads and cores.
8157 (linux_target_op): Register linux_core_of_thread.
8158 * remote-utils.c (prepare_resume_reply): Report the core.
8159 (buffer_xml_printf): Support %d specifier.
8160 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8161 New.
8162 (handle_query): Handle qXfer:threads. Announce availability
8163 thereof.
8164 * target.h (struct target_ops): New field core_of_thread.
8165
8166 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8167
8168 * Makefile.in (clean): Remove new generated files.
8169 (reg-s390.o, reg-s390.c): Remove rules.
8170 (reg-s390x.o, reg-s390x.c): Likewise.
8171 (s390-linux32.o, s390-linux32.c): Add rules.
8172 (s390-linux64.o, s390-linux64.c): Likewise.
8173 (s390x-linux64.o, s390x-linux64.c): Likewise.
8174 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8175 * linux-s390-low.c: Include <elf.h>.
8176 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8177 (init_registers_s390): Remove prototype.
8178 (init_registers_s390x): Likewise.
8179 (init_registers_s390_linux32): Add prototype.
8180 (init_registers_s390_linux64): Likewise.
8181 (init_registers_s390x_linux64): Likewise.
8182 (s390_num_regs_3264): New define.
8183 (s390_regmap_3264): New global variable.
8184 (s390_cannot_fetch_register): Remove obsolete check.
8185 (s390_cannot_store_register): Likewise.
8186 (s390_collect_ptrace_register): Handle upper/lower register halves.
8187 (s390_supply_ptrace_register): Likewise.
8188 (s390_fill_gregset): Update to register number changes.
8189 (s390_get_hwcap): New routine.
8190 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8191 Install appropriate regmap and register set.
8192
8193 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8194
8195 * server.c (gdbserver_version): Update copyright year to 2010.
8196 * gdbreplay.c (gdbreplay_version): Likewise.
8197
8198 2009-12-28 Doug Evans <dje@google.com>
8199
8200 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8201 elf/external.h. Include <elf.h> instead but only if necessary.
8202
8203 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8204
8205 * linux-low.c (linux_remove_process): Remove `detaching'
8206 parameter. Don't release/detach from thread_db here.
8207 (linux_kill): Release/detach from thread_db here, ...
8208 (linux_detach): ... and here, before actually detaching.
8209 (linux_wait_1): ... and here, when a process exits.
8210 * thread-db.c (any_thread_of): New.
8211 (thread_db_free): Switch the current inferior to a thread of the
8212 passed in process.
8213
8214 2009-12-21 Doug Evans <dje@google.com>
8215
8216 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8217
8218 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8219 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8220 warning ifndef __NR_tkill. Move setting of errno there too.
8221 Delete unnecessary resetting of errno after syscall.
8222 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8223
8224 * configure.ac: Check for dladdr.
8225 * config.in: Regenerate.
8226 * configure: Regenerate.
8227 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8228 (try_thread_db_load): Update.
8229
8230 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8231
8232 2009-12-18 Doug Evans <dje@google.com>
8233
8234 * event-loop.c: Include unistd.h if it exists.
8235
8236 * linux-low.c (my_waitpid): Move definition away from being in
8237 between linux_tracefork_child/linux_test_for_tracefork.
8238
8239 * gdb_proc_service.h (psaddr_t): Fix type.
8240 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8241 signature to match glibc.
8242
8243 2009-12-16 Doug Evans <dje@google.com>
8244
8245 * linux-low.c (linux_read_memory): Fix argument to read.
8246
8247 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8248
8249 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8250 events, don't leave current_inferior pointing at null.
8251
8252 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8253
8254 * win32-low.c (LOG): Delete.
8255 (OUTMSG): Output to stderr.
8256 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8257 on compile time LOG macro.
8258 (win32_wait): Fix debug output.
8259
8260 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8261
8262 * win32-low.c (win32_add_one_solib): If the dll name is
8263 "ntdll.dll", prepend the system directory to the dll path.
8264
8265 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8266
8267 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8268
8269 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8270 Vladimir Prus <vladimir@codesourcery.com>
8271
8272 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8273 * configure.ac: Check for __mcoldfire__ and set
8274 gdb_cv_m68k_is_coldfire.
8275 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8276 reg-cf.o and reg-m68k.o.
8277 * configure: Regenerated.
8278
8279 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8280
8281 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8282 Pass it to thread_db_free.
8283 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8284 proper `detaching' argument to linux_remove_process.
8285 * linux-low.h (thread_db_free): Add `detaching' parameter.
8286 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8287 to thread_db_free.
8288 (thread_db_free): Add `detaching' parameter. Only
8289 call td_ta_clear_event if detaching from process.
8290
8291 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8292
8293 * thread-db.c (thread_db_free): Fix typo.
8294
8295 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8296
8297 PR gdb/10838
8298 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8299
8300 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8301
8302 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8303 with an i686 compiler.
8304 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8305 needed.
8306 * configure: Rebuilt.
8307
8308 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8309
8310 PR gdb/10783
8311
8312 * server.c (handle_search_memory_1): Correct read_addr initialization
8313 in loop for searching subsequent chunks.
8314
8315 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8316
8317 * configure.ac: New --with-libthread-db option.
8318 * thread-db.c: Allow direct dependence on libthread_db.
8319 (thread_db_free): Adjust.
8320 * config.in: Regenerate.
8321 * configure: Likewise.
8322
8323 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8324
8325 PR gdb/10757
8326 * thread-db.c (attach_thread): New function.
8327 (maybe_attach_thread): Return success/failure.
8328 (find_new_threads_callback): Adjust.
8329 (thread_db_find_new_threads): Loop until no new threads.
8330
8331 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8332
8333 * proc-service.c (ps_lgetregs): Formatting.
8334
8335 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8336
8337 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8338 * configure.ac: Adjust.
8339 * linux-low.h (struct process_info_private): Move members to struct
8340 thread_db.
8341 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8342 * linux-low.c (linux_remove_process): Adjust.
8343 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8344 * server.c (handle_query): Move code ...
8345 (handle_monitor_command): ... here. New function.
8346 * target.h (struct target_ops): New member.
8347 * thread-db.c (struct thread_db): New.
8348 (libthread_db_search_path): New variable.
8349 (thread_db_create_event, thread_db_enable_reporting)
8350 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8351 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8352 (try_thread_db_load_1, dladdr_to_soname): New functions.
8353 (try_thread_db_load, thread_db_load_search): New functions.
8354 (thread_db_init): Search for libthread_db.
8355 (thread_db_free): New function.
8356 (thread_db_handle_monitor_command): Likewise.
8357 * config.in: Regenerate.
8358 * configure: Regenerate.
8359
8360 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8361
8362 * spu-low.c (spu_kill): Wait for inferior to terminate.
8363 Call clear_inferiors.
8364 (spu_detach): Call clear_inferiors.
8365
8366 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8367
8368 * aclocal.m4: Regenerate.
8369 * config.in: Likewise.
8370 * configure: Likewise.
8371
8372 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8373
8374 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8375 (parse_spufs_run): New function.
8376 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8377 (ppc_breakpoint_at): Handle SPU breakpoints.
8378
8379 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8380
8381 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8382 (SPUFS_MAGIC): Define.
8383 (spu_enumerate_spu_ids): New function.
8384 (linux_qxfer_spu): New function.
8385 (linux_target_ops): Install linux_qxfer_spu.
8386
8387 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8388
8389 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8390 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8391 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8392 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8393 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8394 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8395 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8396 (init_registers_powerpc_cell32l): Add prototype.
8397 (init_registers_powerpc_cell64l): Likewise.
8398 (ppc_arch_setup): Detect Cell/B.E. architecture.
8399
8400 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8401
8402 * Makefile.in (datarootdir): New variable.
8403
8404 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8405
8406 * linux-low.c (linux_write_memory): Update debugging output.
8407 * Makefile.in (clean): Add new descriptions.
8408 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8409 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8410 * configure.srv: Add new files for arm*-*-linux*.
8411 * linux-arm-low.c: Add new declarations.
8412 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8413 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8414 (HWCAP_VFPv3D16): New.
8415 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8416 instead of __IWMMXT__.
8417 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8418 (arm_arch_setup): New.
8419 (target_regsets): Remove #ifdef. Add VFP regset.
8420 (the_low_target): Use arm_arch_setup.
8421
8422 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8423
8424 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8425 the main thread again.
8426
8427 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8428
8429 Adding Neutrino gdbserver.
8430 * configure: Regenerated.
8431 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8432 * configure.srv (i[34567]86-*-nto*): New target.
8433 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8434 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8435 (nto_comctrl) [__QNX__]: New function.
8436 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8437
8438 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8439
8440 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8441 srv_tgtobj.
8442
8443 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8444 Pedro Alves <pedro@codesourcery.com>
8445
8446 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8447 don't support CONTEXT_EXTENDED_REGISTERS.
8448 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8449 (the_low_target): Install them.
8450 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8451 failing with ERROR_PIPE_NOT_CONNECTED.
8452
8453 2009-06-30 Doug Evans <dje@google.com>
8454 Pierre Muller <muller@ics.u-strasbg.fr>
8455
8456 Add h/w watchpoint support to x86-linux, win32-i386.
8457 * Makefile.in (SFILES): Add i386-low.c
8458 (i386_low_h): Define.
8459 (i386-low.o): Add dependencies.
8460 (linux-x86-low.o): Add i386-low.h dependency.
8461 (win32-i386-low.o): Ditto.
8462 * i386-low.c: New file.
8463 * i386-low.h: New file.
8464 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8465 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8466 * linux-low.c (linux_add_process): Initialize arch_private.
8467 (linux_remove_process): Free arch_private.
8468 (add_lwp): Initialize arch_private.
8469 (delete_lwp): Free arch_private.
8470 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8471 provided.
8472 * linux-low.h (process_info_private): New member arch_private.
8473 (lwp_info): New member arch_private.
8474 (linux_target_ops): New members new_process, new_thread,
8475 prepare_to_resume.
8476 (ptid_of): New macro.
8477 * linux-x86-low.c: Include stddef.h, i386-low.h.
8478 (arch_process_info): New struct.
8479 (arch_lwp_info): New struct.
8480 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8481 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8482 (i386_dr_low_get_status): New function.
8483 (x86_insert_point, x86_remove_point): New functions.
8484 (x86_stopped_by_watchpoint): New function.
8485 (x86_stopped_data_address): New function.
8486 (x86_linux_new_process, x86_linux_new_thread): New functions.
8487 (x86_linux_prepare_to_resume): New function.
8488 (the_low_target): Add entries for insert_point, remove_point,
8489 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8490 prepare_to_resume.
8491 * server.c (debug_hw_points): New global.
8492 (monitor_show_help): Document set debug-hw-points.
8493 (handle_query): Process "set debug-hw-points".
8494 * server.h (debug_hw_points): Declare.
8495 (paddress): Declare.
8496 * utils.c (NUMCELLS, CELLSIZE): New macros.
8497 (get_sell, xsnprintf, paddress): New functions.
8498 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8499 remove_point, stopped_by_watchpoint, stopped_data_address.
8500 * win32-i386-low.c: Include i386-low.h.
8501 (debug_reg_state): Replaces dr.
8502 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8503 (i386_dr_low_get_status): New function.
8504 (i386_insert_point, i386_remove_point): New functions.
8505 (i386_stopped_by_watchpoint): New function.
8506 (i386_stopped_data_address): New function.
8507 (i386_initial_stuff): Update.
8508 (get_thread_context,set_thread_context,i386_thread_added): Update.
8509 (the_low_target): Add entries for insert_point,
8510 remove_point, stopped_by_watchpoint, stopped_data_address.
8511 * win32-low.c (win32_insert_watchpoint): New function.
8512 (win32_remove_watchpoint): New function.
8513 (win32_stopped_by_watchpoint): New function.
8514 (win32_stopped_data_address): New function.
8515 (win32_target_ops): Add entries for insert_watchpoint,
8516 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8517 * win32-low.h (win32_target_ops): New members insert_point,
8518 remove_point, stopped_by_watchpoint, stopped_data_address.
8519
8520 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8521
8522 * server.c (process_serial_event): Re-return unsupported, not
8523 error, if the type isn't recognized. Re-allow supporting only
8524 insert or remove packets. Also call require_running for
8525 breakpoints. Add missing break statement to default case. Tidy.
8526 * target.h (struct target_ops): Rename insert_watchpoint to
8527 insert_point, and remove_watchpoint to remove_point.
8528
8529 * linux-low.h (struct linux_target_ops): Likewise.
8530 * linux-low.c (linux_insert_watchpoint): Rename to ...
8531 (linux_insert_point): ... this. Adjust.
8532 (linux_remove_watchpoint): Rename to ...
8533 (linux_remove_point): ... this. Adjust.
8534 (linux_target_ops): Adjust.
8535 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8536 (cris_insert_point): ... this.
8537 (cris_remove_watchpoint): Rename to ...
8538 (cris_remove_point): ... this.
8539 (the_low_target): Adjust.
8540
8541 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8542
8543 * server.c (handle_v_kill): Pass signal_pid to
8544 kill_inferior if multi_process is zero.
8545
8546 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8547
8548 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8549 * target.h (target_ops): Comment for *_watchpoint to make it clear
8550 the functions can get types '0' and '1'.
8551
8552 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8553
8554 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8555 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8556 * regcache.c (get_regcache): Likewise.
8557 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8558 * win32-low.c (child_fetch_inferior_registers): Remove check for
8559 regno 0.
8560
8561 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8562 Pedro Alves <pedro@codesourcery.com>
8563
8564 * target.h (struct target_ops) <supports_multi_process>: New
8565 callback.
8566 (target_supports_multi_process): New.
8567 * server.c (handle_query): Even if GDB reports support, only
8568 enable multi-process if the target also supports it. Report
8569 multi-process support only if the target backend supports it.
8570 * linux-low.c (linux_supports_multi_process): New function.
8571 (linux_target_ops): Install it as target_supports_multi_process
8572 callback.
8573
8574 2009-05-24 Doug Evans <dje@google.com>
8575
8576 Global renaming of find_thread_pid to find_thread_ptid.
8577 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8578 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8579 All callers updated.
8580
8581 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8582 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8583 directly.
8584
8585 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8586 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8587 (linux_resume_one_lwp): Ditto.
8588
8589 2009-05-23 Doug Evans <dje@google.com>
8590
8591 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8592 from struct inferior_list_entry * to struct lwp_info *.
8593 All callers updated.
8594
8595 2009-05-13 Doug Evans <dje@google.com>
8596
8597 * linux-x86-low.c: Don't include assert.h.
8598 (x86_siginfo_fixup): Use fatal, not assert.
8599 (x86_arch_setup): Fix comment.
8600
8601 2009-05-12 Doug Evans <dje@google.com>
8602
8603 Biarch support for i386/amd64 gdbserver.
8604 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8605 Add linux-x86-low.c.
8606 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8607 (linux-x86-low.o): Add.
8608 * linux-x86-64-low.c: Delete.
8609 * linux-i386-low.c: Delete.
8610 * linux-x86-low.c: New file.
8611 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8612 linux-x86-low.o.
8613 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8614 linux-x86-low.o.
8615 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8616 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8617 (linux_child_pid_to_exec_file): New function.
8618 (elf_64_header_p, elf_64_file_p): New functions.
8619 (siginfo_fixup): New function.
8620 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8621 give target a chance to convert layout.
8622 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8623 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8624
8625 2009-05-07 Doug Evans <dje@google.com>
8626
8627 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8628 (regsets_store_inferior_registers): Ditto.
8629
8630 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8631
8632 PR server/10048
8633
8634 * linux-low.c (must_set_ptrace_flags): Delete.
8635 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8636 of the global.
8637 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8638 `lwp->must_set_ptrace_flags' instead.
8639 (linux_wait_for_event_1): Set ptrace options here.
8640 (linux_wait_1): ... not here.
8641
8642 2009-04-30 Doug Evans <dje@google.com>
8643
8644 * inferiors.c (started_inferior_callback): New function.
8645 (attached_inferior_callback): New function.
8646 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8647 * server.c (print_started_pid, print_attached_pid): New functions.
8648 (detach_or_kill_for_exit): New function.
8649 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8650 * server.h (have_started_inferiors_p): Declare.
8651 (have_attached_inferiors_p): Declare.
8652
8653 * inferiors.c (remove_process): Fix memory leak, free process.
8654 * linux-low.c (linux_remove_process): New function.
8655 (linux_kill): Call it instead of remove_process.
8656 (linux_detach, linux_wait_1): Ditto.
8657
8658 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8659
8660 * configure.srv: Add x86 Windows CE target.
8661
8662 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8663
8664 * inferiors.c (get_thread_process): Make global.
8665 * server.h (get_thread_process): Add prototype.
8666 * thread-db.c (find_one_thread): Use get_thread_process
8667 instead of current_process.
8668 (thread_db_get_tls_address): Do not crash if called when
8669 thread layer is not yet initialized.
8670
8671 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8672
8673 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8674 * spu-low.c (current_tid): Rename to ...
8675 (current_ptid): ... this.
8676 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8677 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8678 ptid_get_lwp (current_ptid) instead of current_tid.
8679 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8680 instead of current_tid. Use find_process_pid to verify pid
8681 argument is valid. Pass proper argument to remove_process.
8682 (spu_thread_alive): Compare current_ptid instead of current_tid.
8683 (spu_resume): Likewise.
8684
8685 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8686
8687 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8688 variable.
8689
8690 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8691
8692 Implement the multiprocess extensions, and add linux multiprocess
8693 support.
8694
8695 * server.h (ULONGEST): Declare.
8696 (struct ptid, ptid_t): New.
8697 (minus_one_ptid, null_ptid): Declare.
8698 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8699 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8700 (struct inferior_list_entry): Change `id' type from unsigned from
8701 to ptid_t.
8702 (struct sym_cache, struct breakpoint, struct
8703 process_info_private): Forward declare.
8704 (struct process_info): Declare.
8705 (current_process): Declare.
8706 (all_processes): Declare.
8707 (initialize_inferiors): Declare.
8708 (add_thread): Adjust to use ptid_t.
8709 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8710 (add_process, remove_process, find_thread_pid): Declare.
8711 (find_inferior_id): Adjust to use ptid_t.
8712 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8713 (multi_process): Declare.
8714 (push_event): Adjust to use ptid_t.
8715 (read_ptid, write_ptid): Declare.
8716 (prepare_resume_reply): Adjust to use ptid_t.
8717 (clear_symbol_cache): Declare.
8718 * inferiors.c (all_processes): New.
8719 (null_ptid, minus_one_ptid): New.
8720 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8721 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8722 (add_thread): Change unsigned long to ptid. Remove gdb_id
8723 parameter. Adjust.
8724 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8725 (gdb_id_to_thread): Rename to ...
8726 (find_thread_pid): ... this. Change unsigned long to ptid.
8727 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8728 (loaded_dll, pull_pid_from_list): Adjust.
8729 (add_process, remove_process, find_process_pid)
8730 (get_thread_process, current_process, initialize_inferiors): New.
8731 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8732 (struct target_waitstatus) <related_pid>: Ditto.
8733 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8734 return type to int.
8735 (struct target_ops) <join>: Add `pid' argument.
8736 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8737 (struct target_ops) <wait>: Add `ptid' field. Change return type
8738 to ptid.
8739 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8740 (mywait): Add `ptid' argument. Change return type to ptid_t.
8741 (target_pid_to_str): Declare.
8742 * target.c (set_desired_inferior): Adjust to use ptids.
8743 (mywait): Add new `ptid' argument. Adjust.
8744 (target_pid_to_str): New.
8745 * mem-break.h (free_all_breakpoints): Declare.
8746 * mem-break.c (breakpoints): Delelete.
8747 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8748 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8749 to use per-process breakpoint list.
8750 (free_all_breakpoints): New.
8751 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8752 (symbol_cache, all_symbols_looked_up): Delete.
8753 (hexchars): New.
8754 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8755 read_ptid): New.
8756 (prepare_resume_reply): Change ptid argument's type from unsigned
8757 long to ptid_t. Adjust. Implement W;process and X;process.
8758 (free_sym_cache, clear_symbol_cache): New.
8759 (look_up_one_symbol): Adjust to per-process symbol cache. *
8760 * server.c (cont_thread, general_thread, step_thread): Change type
8761 to ptid_t.
8762 (attached): Delete.
8763 (multi_process): New.
8764 (last_ptid): Change type to ptid_t.
8765 (struct vstop_notif) <ptid>: Change type to ptid_t.
8766 (queue_stop_reply, push_event): Change `ptid' argument's type to
8767 ptid_t.
8768 (discard_queued_stop_replies): Add `pid' argument.
8769 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8770 changes. Don't reference the `attached' global.
8771 (attach_inferior): Adjust to mywait interface changes.
8772 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8773 features. Handle and report "multiprocess+". Handle
8774 "qAttached:PID".
8775 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8776 changes.
8777 (handle_v_kill): New.
8778 (handle_v_stopped): Adjust to use target_pid_to_str.
8779 (handle_v_requests): Allow multiple attaches and runs when
8780 multiprocess extensions are in effect. Handle "vKill".
8781 (myresume): Adjust to use ptids.
8782 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8783 (handle_status): Adjust to discard_queued_stop_replies interface
8784 change.
8785 (first_thread_of, kill_inferior_callback)
8786 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8787 (main): Call initialize_inferiors. Adjust to use ptids, killing
8788 and detaching from all inferiors. Handle multiprocess packet
8789 variants.
8790 * linux-low.h: Include gdb_proc_service.h.
8791 (struct process_info_private): New.
8792 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8793 <lwpid_of>: Use ptid_get_lwp.
8794 (get_lwp_thread): Adjust.
8795 (struct lwp_info): Add `dead' member.
8796 (find_lwp_pid): Declare.
8797 * linux-low.c (thread_db_active): Delete.
8798 (new_inferior): Adjust comment.
8799 (inferior_pid): Delete.
8800 (linux_add_process): New.
8801 (handle_extended_wait): Adjust.
8802 (add_lwp): Change unsigned long to ptid.
8803 (linux_create_inferior): Add process to processes table. Adjust
8804 to use ptids. Don't set new_inferior here.
8805 (linux_attach_lwp): Rename to ...
8806 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8807 it. Adjust to use ptids.
8808 (linux_attach_lwp): New.
8809 (linux_attach): Add process to processes table. Don't set
8810 new_inferior here.
8811 (struct counter): New.
8812 (second_thread_of_pid_p, last_thread_of_process_p): New.
8813 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8814 multiple processes.
8815 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8816 processes. Remove process from process table.
8817 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8818 to multiple processes.
8819 (any_thread_of): New.
8820 (linux_detach): Add `pid' argument, and handle it. Remove process
8821 from processes table.
8822 (linux_join): Add `pid' argument. Handle it.
8823 (linux_thread_alive): Change unsighed long argument to ptid_t.
8824 Consider dead lwps as not being alive.
8825 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8826 threads we're not interested in.
8827 (same_lwp, find_lwp_pid): New.
8828 (linux_wait_for_lwp): Change `pid' argument's type from int to
8829 ptid_t. Adjust.
8830 (linux_wait_for_event): Rename to ...
8831 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8832 from int to ptid_t. Adjust.
8833 (linux_wait_for_event): New.
8834 (linux_wait_1): Add `ptid' argument. Change return type to
8835 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8836 that exit from the process table.
8837 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8838 Adjust.
8839 (mark_lwp_dead): New.
8840 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8841 stopping all threads, mark its main lwp as dead.
8842 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8843 ptids.
8844 (fetch_register, usr_store_inferior_registers)
8845 (regsets_fetch_inferior_registers)
8846 (regsets_store_inferior_registers, linux_read_memory)
8847 (linux_write_memory): Inline `inferior_pid'.
8848 (linux_look_up_symbols): Adjust to use per-process
8849 `thread_db_active'.
8850 (linux_request_interrupt): Adjust to use ptids.
8851 (linux_read_auxv): Inline `inferior_pid'.
8852 (initialize_low): Don't reference thread_db_active.
8853 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8854 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8855 (ps_getpid): Return the pid of the current inferior.
8856 * thread-db.c (proc_handle, thread_agent): Delete.
8857 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8858 per-process data.
8859 (find_one_thread): Change argument type to ptid_t. Adjust to
8860 per-process data.
8861 (maybe_attach_thread): Adjust to per-process data and ptids.
8862 (thread_db_find_new_threads): Ditto.
8863 (thread_db_init): Ditto.
8864 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8865 processes table. Adjust to use ptids.
8866 (spu_kill, spu_detach): Adjust interface. Remove process from
8867 processes table.
8868 (spu_join, spu_thread_alive): Adjust interface.
8869 (spu_wait): Adjust interface. Remove process from processes
8870 table. Adjust to use ptids.
8871 * win32-low.c (current_inferior_tid): Delete.
8872 (current_inferior_ptid): New.
8873 (debug_event_ptid): New.
8874 (thread_rec): Take a ptid. Adjust.
8875 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8876 (child_delete_thread): Ditto.
8877 (do_initial_child_stuff): Add `attached' argument. Add process to
8878 processes table.
8879 (child_fetch_inferior_registers, child_store_inferior_registers):
8880 Adjust.
8881 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8882 (win32_attach): Pass 1 to do_initial_child_stuff.
8883 (win32_kill): Adjust interface. Remove process from processes
8884 table.
8885 (win32_detach): Ditto.
8886 (win32_join): Adjust interface.
8887 (win32_thread_alive): Take a ptid.
8888 (win32_resume): Adjust to use ptids.
8889 (get_child_debug_event): Ditto.
8890 (win32_wait): Adjust interface. Remove exiting process from
8891 processes table.
8892
8893 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8894
8895 Non-stop mode support.
8896
8897 * server.h (non_stop): Declare.
8898 (gdb_client_data, handler_func): Declare.
8899 (delete_file_handler, add_file_handler, start_event_loop):
8900 Declare.
8901 (handle_serial_event, handle_target_event, push_event)
8902 (putpkt_notif): Declare.
8903 * target.h (enum resume_kind): New.
8904 (struct thread_resume): Replace `step' field by `kind' field.
8905 (TARGET_WNOHANG): Define.
8906 (struct target_ops) <wait>: Add `options' argument.
8907 <supports_non_stop, async, start_non_stop>: New fields.
8908 (target_supports_non_stop, target_async): New.
8909 (start_non_stop): Declare.
8910 (mywait): Add `options' argument.
8911 * target.c (mywait): Add `options' argument. Print child exit
8912 notifications here.
8913 (start_non_stop): New.
8914 * server.c (non_stop, own_buf, mem_buf): New globals.
8915 (struct vstop_notif): New.
8916 (notif_queue): New global.
8917 (queue_stop_reply, push_event, discard_queued_stop_replies)
8918 (send_next_stop_reply): New.
8919 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8920 interface changes.
8921 (attach_inferior): In non-stop mode, don't wait for the target
8922 here.
8923 (handle_general_set): Handle QNonStop.
8924 (handle_query): When handling qC, return the current general
8925 thread, instead of the first thread of the list.
8926 (handle_query): If the backend supports non-stop mode, include
8927 QNonStop+ in the qSupported query response.
8928 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8929 and non-stop mode.
8930 (handle_v_attach, handle_v_run): Handle non-stop mode.
8931 (handle_v_stopped): New.
8932 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8933 (myresume): Adjust to use resume_kind. Handle non-stop.
8934 (queue_stop_reply_callback): New.
8935 (handle_status): Handle non-stop mode.
8936 (main): Clear non_stop flag on reconnection. Use the event-loop.
8937 Refactor serial protocol handling from here ...
8938 (process_serial_event): ... to this new function. When GDB
8939 selects any thread, select one here. In non-stop mode, wait until
8940 GDB acks all pending events before exiting.
8941 (handle_serial_event, handle_target_event): New.
8942 * remote-utils.c (remote_open): Install remote_desc in the event
8943 loop.
8944 (remote_close): Remove remote_desc from the event loop.
8945 (putpkt_binary): Rename to...
8946 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8947 (putpkt_binary): New as wrapper around putpkt_binary_1.
8948 (putpkt_notif): New.
8949 (prepare_resume_reply): In non-stop mode, don't change the
8950 general_thread.
8951 * event-loop.c: New.
8952 * Makefile.in (OBJ): Add event-loop.o.
8953 (event-loop.o): New rule.
8954
8955 * linux-low.h (pid_of): Moved here.
8956 (lwpid_of): New.
8957 (get_lwp_thread): Use lwpid_of.
8958 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8959 * linux-low.c (pid_of): Delete.
8960 (inferior_pid): Use lwpid_of.
8961 (linux_event_pipe): New.
8962 (target_is_async_p): New.
8963 (delete_lwp): New.
8964 (handle_extended_wait): Use lwpid_of.
8965 (add_lwp): Don't set lwpid field.
8966 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8967 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8968 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8969 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8970 first. Adjust to linux_wait_for_event interface changes. Use
8971 lwpid_of.
8972 (linux_detach): Don't delete the main lwp here.
8973 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8974 (status_pending_p): Don't consider explicitly suspended lwps.
8975 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8976 pointer. Add OPTIONS argument. Change return type to int. Use
8977 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8978 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8979 pointer. Add status pointer argument. Return a pid instead of a
8980 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8981 changes. In non-stop mode, don't switch to a random thread.
8982 (linux_wait): Rename to...
8983 (linux_wait_1): ... this. Add target_options argument, and handle
8984 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8985 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8986 clean exit and signal exit code. Don't stop all threads in
8987 non-stop mode. In all-stop mode, only stop all threads when
8988 reporting a stop to GDB. Handle explicit thread stop requests.
8989 (async_file_flush, async_file_mark): New.
8990 (linux_wait): New.
8991 (send_sigstop): Use lwpid_of.
8992 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8993 interface changes. In non-stop mode, don't switch to a random
8994 thread.
8995 (linux_resume_one_lwp): Use lwpid_of.
8996 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8997 (linux_resume_one_thread): ... this. Handle resume_stop. In
8998 non-stop mode, don't look for pending flag in all threads.
8999 (resume_status_pending_p): Don't consider explicitly suspended
9000 threads.
9001 (my_waitpid): Reimplement. Emulate __WALL.
9002 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9003 Use lwpid_of.
9004 (sigchld_handler, linux_supports_non_stop, linux_async)
9005 (linux_start_non_stop): New.
9006 (linux_target_ops): Register linux_supports_non_stop, linux_async
9007 and linux_start_non_stop.
9008 (initialize_low): Install SIGCHLD handler.
9009 * thread-db.c (thread_db_create_event, find_one_thread)
9010 (thread_db_get_tls_address): Use lwpid_of.
9011 * win32-low.c (win32_detach): Adjust to use resume_kind.
9012 (win32_wait): Add `options' argument.
9013 * spu-low.c (spu_resume): Adjust to use resume_kind.
9014 (spu_wait): Add `options' argument.
9015
9016 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9017
9018 Decouple target code from remote protocol.
9019
9020 * target.h (enum target_waitkind): New.
9021 (struct target_waitstatus): New.
9022 (struct target_ops) <wait>: Return an unsigned long. Take a
9023 target_waitstatus pointer instead of a char pointer.
9024 (mywait): Likewise.
9025 * target.c (mywait): Change prototype to return an unsigned long.
9026 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9027 * server.h (thread_from_wait, old_thread_from_wait): Delete
9028 declarations.
9029 (prepare_resume_reply): Change prototype to take a
9030 target_waitstatus.
9031 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9032 (last_status, last_ptid): New.
9033 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9034 pid instead of a signal.
9035 (attach_inferior): Remove "status" and "signal" parameters.
9036 Adjust.
9037 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9038 not as an address.
9039 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9040 (handle_v_requests, myresume): Remove "status" and "signal"
9041 parameters. Adjust.
9042 (handle_status): New.
9043 (main): Delete local `status'. Adjust.
9044 * remote-utils.c: Include target.h.
9045 (prepare_resume_reply): Change prototype to take a
9046 target_waitstatus. Adjust.
9047
9048 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9049 interface.
9050 * spu-low.c (spu_wait): Adjust.
9051 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9052 Delete.
9053 (win32_wait): Adjust.
9054
9055 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9056
9057 * target.h (struct thread_resume): Delete leave_stopped member.
9058 (struct target_ops): Add a `n' argument to the `resume' callback.
9059 * server.c (start_inferior): Adjust.
9060 (handle_v_cont, myresume): Adjust.
9061 * linux-low.c (check_removed_breakpoint): Adjust to resume
9062 interface change, and to removed leave_stopped field.
9063 (resume_ptr): Delete.
9064 (struct thread_resume_array): New.
9065 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9066 resume interface change.
9067 (linux_continue_one_thread, linux_queue_one_thread)
9068 (resume_status_pending_p): Check if the resume field is NULL
9069 instead of checking the leave_stopped member.
9070 (linux_resume): Adjust to the target resume interface change.
9071 * spu-low.c (spu_resume): Adjust to the target resume interface
9072 change.
9073 * win32-low.c (win32_detach, win32_resume): Ditto.
9074
9075 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9076
9077 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9078 flag.
9079 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9080 pending.
9081 (linux_continue_one_thread): Only preserve the stepping flag if
9082 there's a pending breakpoint.
9083
9084 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9085
9086 * server.c (main): After the inferior having exited, call
9087 remote_close before exiting gdbserver.
9088
9089 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9090
9091 Fix size of FPSCR in Power 7 processors.
9092 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9093 (PPC_FEATURE_HAS_DFP): New #define.
9094 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9095 size of the FPSCR.
9096
9097 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9098
9099 * server.c (handle_query) Whitespace and formatting.
9100
9101 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9102
9103 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9104 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9105 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9106 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9107 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9108 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9109 Makefile.in, configure.ac: Fix whitespace throughout.
9110 * configure: Regenerate.
9111
9112 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9113
9114 * inferiors.c (find_inferior): Make it safe for the callback
9115 function to delete the currently iterated inferior.
9116
9117 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9118
9119 * Makefile.in (linuw_low_h): Move higher.
9120 (thread-db.o): Depend on $(linux_low_h).
9121
9122 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9123
9124 Rename "process" to "lwp" throughout.
9125
9126 * linux-low.c (all_processes): Rename to...
9127 (all_lwps): ... this.
9128 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9129 (add_process): Rename to ...
9130 (add_lwp): ... this. Adjust.
9131 (linux_create_inferior): Adjust.
9132 (linux_attach_lwp): Adjust.
9133 (linux_attach): Adjust.
9134 (linux_kill_one_process): Rename to ...
9135 (linux_kill_one_lwp): ... this. Adjust.
9136 (linux_kill): Adjust.
9137 (linux_detach_one_process): Rename to ...
9138 (linux_detach_one_lwp): ... this. Adjust.
9139 (linux_detach): Adjust.
9140 (check_removed_breakpoint): Adjust.
9141 (status_pending_p): Adjust.
9142 (linux_wait_for_process): Rename to ...
9143 (linux_wait_for_lwp): ... this. Adjust.
9144 (linux_wait_for_event): Adjust.
9145 (send_sigstop): Adjust.
9146 (wait_for_sigstop): Adjust.
9147 (stop_all_processes): Rename to ...
9148 (stop_all_lwps): ... this.
9149 (linux_resume_one_process): Rename to ...
9150 (linux_resume_one_lwp): ... this. Adjust.
9151 (linux_set_resume_request, linux_continue_one_thread)
9152 (linux_queue_one_thread, resume_status_pending_p)
9153 (usr_store_inferior_registers, regsets_store_inferior_registers)
9154 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9155 Adjust.
9156 * linux-low.h (get_process): Rename to ...
9157 (get_lwp): ... this. Adjust.
9158 (get_thread_process): Rename to ...
9159 (get_thread_lwp): ... this. Adjust.
9160 (get_process_thread): Rename to ...
9161 (get_lwp_thread): ... this. Adjust.
9162 (struct process_info): Rename to ...
9163 (struct lwp_info): ... this.
9164 (all_processes): Rename to ...
9165 (all_lwps): ... this.
9166 * proc-service.c (ps_lgetregs): Adjust.
9167 * thread-db.c (thread_db_create_event, find_one_thread)
9168 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9169
9170 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9171
9172 * server.c (handle_query): Handle "qAttached".
9173
9174 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9175
9176 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9177 GPLv3, update license URL.
9178
9179 2009-03-01 Doug Evans <dje@google.com>
9180
9181 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9182 (server_h): Add gdb_signals.h.
9183 (signals.o): Update.
9184 * server.h (target_signal_from_host,target_signal_to_host_p)
9185 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9186
9187 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9188
9189 * remote-utils.c (getpkt): Also generate remote-debug
9190 information if noack_mode is set.
9191
9192 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9193
9194 * server.c (handle_query): Report qXfer:siginfo:read and
9195 qXfer:siginfo:write as supported and handle them.
9196 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9197 * linux-low.c (linux_xfer_siginfo): New.
9198 (linux_target_ops): Set it.
9199
9200 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9201
9202 * server.c (gdbserver_usage): Mention --remote-debug.
9203 (main): Accept '--remote-debug' switch.
9204
9205 2009-01-18 Doug Evans <dje@google.com>
9206
9207 * regcache.c (new_register_cache): No need to check result of xcalloc.
9208 * server.c (handle_search_memory): Back out calls to xmalloc,
9209 result is checked and error is returned to user upon failure.
9210 (handle_query): Ditto. Add more checks for result of malloc.
9211 (handle_v_cont): Check result of malloc, report error back to
9212 user upon failure.
9213 (handle_v_run): Ditto. Call freeargv.
9214 * server.h (freeargv): Declare.
9215 * utils.c (freeargv): New fn.
9216
9217 2009-01-15 Doug Evans <dje@google.com>
9218
9219 * gdbreplay.c (perror_with_name): Make arg const char *.
9220 * server.h (target_signal_to_name): Make return type const char *.
9221 * thread-db.c (thread_db_err_str): Make return type const char *.
9222 * utils.c (perror_with_name): Make arg const char *.
9223
9224 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9225
9226 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9227 when handling a EXIT_PROCESS_DEBUG_EVENT.
9228
9229 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9230
9231 * gdbreplay.c (gdbreplay_version): Update copyright year.
9232 * server.c (gdbserver_version): Likewise.
9233
9234 2009-01-05 Doug Evans <dje@google.com>
9235
9236 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9237 (handle_extended_wait): Improve comment.
9238
9239 2008-12-13 Doug Evans <dje@google.com>
9240
9241 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9242 * server.h (ATTR_MALLOC): New macro.
9243 (xmalloc,xcalloc,xstrdup): Declare.
9244 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9245 * inferiors.c: Ditto.
9246 * linux-low.c: Ditto.
9247 * mem-break.c: Ditto.
9248 * regcache.c: Ditto.
9249 * remote-utils.c: Ditto.
9250 * server.c: Ditto.
9251 * target.c: Ditto.
9252 * win32-low.c: Ditto.
9253
9254 2008-12-12 Doug Evans <dje@google.com>
9255
9256 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9257 in debugging printf.
9258
9259 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9260
9261 2008-12-09 Doug Evans <dje@google.com>
9262
9263 * linux-low.h (struct process_info): Delete member tid, unused.
9264 * thread-db.c (find_one_thread): Update.
9265 (maybe_attach_thread): Update.
9266
9267 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9268
9269 * target.h (struct target_ops): Add qxfer_osdata member.
9270 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9271 and dirent.h.
9272 (linux_qxfer_osdata): New functions.
9273 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9274 callback.
9275 * server.c (handle_query): Handle "qXfer:osdata:read:".
9276 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9277 (buffer_xml_printf): New functions.
9278 * server.h (struct buffer): New.
9279 (buffer_grow_str, buffer_grow_str0): New macros.
9280 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9281 (buffer_xml_printf): Declare.
9282
9283 2008-11-24 Doug Evans <dje@google.com>
9284
9285 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9286
9287 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9288
9289 * server.c (handle_v_run): Always use the supplied argument list.
9290
9291 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9292
9293 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9294 (xtensa_regmap_table): Add entry for scompare1.
9295
9296 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9297
9298 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9299 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9300 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9301 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9302 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9303 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9304 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9305 XML target descriptions.
9306 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9307 when inferior is running on an ISA 2.05 or later processor. Add
9308 special case to return offset for full 64-bit slot of FPSCR when
9309 in 32-bits.
9310
9311 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9312
9313 * Makefile.in (SFILES, clean): Added sparc64 files.
9314 (reg-sparc64.o, reg-sparc64.c): New.
9315 * configure.srv (sparc*-*-linux*): New configuration.
9316 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9317 syscall arguments for SPARC.
9318 (regsets_store_inferior_registers): Likewise.
9319 * linux-sparc-low.c: New file.
9320
9321 2008-10-21 Doug Evans <dje@google.com>
9322
9323 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9324 (READLINE_DIR,READLINE_DEP): Delete.
9325 (INTERNAL_CFLAGS): Update.
9326 (LINTFLAGS): Update.
9327
9328 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9329
9330 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9331 whole argv from the last run, not just argv[0].
9332
9333 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9334
9335 * regcache.c (new_register_cache): Return NULL if the register
9336 cache size isn't known yet.
9337 (free_register_cache): Avoid dereferencing a NULL regcache.
9338
9339 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9340
9341 * configure.srv: Merge MIPS and MIPS64.
9342
9343 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9344
9345 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9346
9347 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9348
9349 * Makefile.in: Add required vsx dependencies.
9350
9351 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9352 Declare init_registers_powerpc_vsx32l.
9353 Declare init_registers_powerpc_vsx64l.
9354 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9355 (ppc_arch_setup): Check for VSX in hwcap.
9356 (ppc_fill_vsxregset): New function.
9357 (ppc_store_vsxregset): New function.
9358 Add new VSX entry in regset_info target_regsets.
9359
9360 * configure.srv: Add new VSX dependencies.
9361
9362 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9363
9364 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9365 (remote_open): Set or clear transport_is_reliable.
9366 (putpkt_binary): Don't expect acks in noack mode.
9367 (getpkt): Don't send ack/nac in noack mode.
9368 * server.c (handle_general_set): Handle QStartNoAckMode.
9369 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9370 qSupported.
9371 (main): Reset noack_mode on every connection.
9372 * server.h (noack_mode): Declare.
9373
9374 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9375
9376 * Makefile.in (GDBREPLAY_OBS): New variable.
9377 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9378
9379 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9380 Daniel Jacobowitz <dan@codesourcery.com>
9381
9382 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9383 (usr_store_inferior_registers): Likewise.
9384 (regsets_store_inferior_registers): Likewise.
9385
9386 2008-07-31 Rolf Jansen <rj@surtec.com>
9387 Pedro Alves <pedro@codesourcery.com>
9388
9389 * configure.ac: Check for memmem declaration.
9390 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9391 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9392 (disable_packet_qfThreadInfo): Unconditionally compile.
9393 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9394 * configure, config.in: Regenerate.
9395
9396 2008-07-28 Doug Kwan <dougkwan@google.com>
9397
9398 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9399 (linux_write_memory): Remove declaration of errno.
9400
9401 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9402
9403 * linux-low.c (handle_extended_wait): Do not use "status"
9404 variable uninitialized.
9405
9406 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9407
9408 * server.c (handle_v_attach): Inhibit reporting dll changes.
9409
9410 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9411
9412 * remote-utils.c (prepare_resume_reply): If requested, don't
9413 output "thread:TID" in the T stop reply.
9414
9415 * server.c (disable_packet_vCont, disable_packet_Tthread)
9416 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9417 (handle_query): If requested, disable support for qC, qfThreadInfo
9418 and qsThreadInfo.
9419 (handle_v_requests): If requested, disable support for vCont.
9420 (gdbserver_show_disableable): New.
9421 (main): Handle --disable-packet and --disable-packet=LIST.
9422
9423 * server.h (disable_packet_vCont, disable_packet_Tthread)
9424 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9425
9426 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9427
9428 * server.c (gdbserver_usage): Mention --version.
9429
9430 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9431
9432 * Makefile.in (gdbreplay.o): New rule.
9433
9434 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9435
9436 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9437 message, not gdbserver.
9438
9439 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9440 Nathan Sidwell <nathan@codesourcery.com>
9441 Joseph Myers <joseph@codesourcery.com>
9442
9443 * acinclude.m4: Include ../../config/acx.m4.
9444 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9445 * configure, config.in: Regenerate.
9446 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9447 * server.c (gdbserver_version): Print PKGVERSION.
9448 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9449 (main): Adjust gdbserver_usage calls.
9450 * gdbreplay.c (version, host_name): Add declarations.
9451 (gdbreplay_version, gdbreplay_usage): New.
9452 (main): Accept --version and --help options.
9453
9454 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9455
9456 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9457 (arm_breakpoint_at): Handle Thumb.
9458 (the_low_target): Add comment.
9459
9460 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9461
9462 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9463
9464 2008-05-09 Doug Evans <dje@google.com>
9465
9466 * server.h (decode_search_memory_packet): Declare.
9467 * remote-utils.c (decode_search_memory_packet): New fn.
9468 * server.c (handle_search_memory_1): New fn.
9469 (handle_search_memory): New fn.
9470 (handle_query): Process qSearch:memory packets.
9471
9472 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9473
9474 * regcache.c (registers_length): Remove.
9475 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9476 full register packet.
9477 * regcache.h (registers_length): Remove prototype.
9478 * server.h (PBUFSIZ): Define to 16384.
9479
9480 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9481
9482 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9483 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9484 powerpc-64l.o, and powerpc-altivec64l.o.
9485 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9486 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9487 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9488 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9489 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9490 to srv_xmlfiles.
9491
9492 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9493 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9494 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9495 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9496 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9497 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9498 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9499 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9500 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9501 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9502 (clean): Update.
9503
9504 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9505 (init_registers_powerpc_32l): ... this new prototype.
9506 (init_registers_powerpc_32): Remove, replace by ...
9507 (init_registers_powerpc_altivec32l): ... this new prototype.
9508 (init_registers_powerpc_e500): Remove, replace by ...
9509 (init_registers_powerpc_e500l): ... this new prototype.
9510 (init_registers_ppc64): Remove, replace by ...
9511 (init_registers_powerpc_64l): ... this new prototype.
9512 (init_registers_powerpc_64): Remove, replace by ...
9513 (init_registers_powerpc_altivec64l): ... this new prototype.
9514 (ppc_num_regs): Set to 73.
9515 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9516 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9517 (ppc_cannot_store_register): Handle orig_r3 and trap.
9518 (ppc_arch_setup): Update init_registers_... calls.
9519 (ppc_fill_gregset): Handle orig_r3 and trap.
9520
9521 * inferiors.c (clear_inferiors): Reset current_inferior.
9522
9523 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9524
9525 * acinclude.m4: Add override.m4.
9526 * configure: Regenerate.
9527
9528 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9529
9530 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9531 initial call to init_register_ppc64.
9532
9533 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9534
9535 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9536 single powerpc*-*-linux* case.
9537 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9538
9539 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9540
9541 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9542 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9543 from reg_xmlfiles.
9544 * linux-ppc-low.c: Include <elf.h>.
9545 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9546 (ppc_hwcap): New global variable.
9547 (ppc_regmap): Remove __SPE__ #ifdef sections.
9548 (ppc_regmap_e500): New global variable.
9549 (ppc_cannot_store_register): Update __SPE__ special case.
9550 (ppc_get_hwcap): New function.
9551 (ppc_arch_setup): Use it to determine whether inferior supports
9552 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9553 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9554 Do not access registers if target does not support AltiVec.
9555 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9556 Do not access registers if target does not support SPE.
9557 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9558
9559 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9560
9561 * linux-low.c (disabled_regsets, num_regsets): New.
9562 (use_regsets_p): Delete.
9563 (linux_wait_for_process): Clear disabled_regsets.
9564 (regsets_fetch_inferior_registers): Check and set it.
9565 (regsets_store_inferior_registers): Likewise.
9566 (linux_fetch_registers, linux_store_registers): Do not use
9567 use_regsets_p.
9568 (initialize_low): Allocate disabled_regsets.
9569
9570 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9571
9572 * Makefile.in (LIBOBJS): New.
9573 (OBS): Use LIBOBJS.
9574 (memmem.o): New rule.
9575 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9576 * configure: Regenerated.
9577
9578 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9579
9580 * server.c (handle_query): Never return "unsupported" for
9581 qXfer:features:read queries.
9582
9583 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9584
9585 * server.c (get_features_xml): Fix inverted condition.
9586 (handle_query): Always support qXfer:feature:read.
9587
9588 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9589
9590 * server.c (wrapper_argv): New.
9591 (start_inferior): Handle wrapper_argv. If set, expect an extra
9592 trap.
9593 (gdbserver_usage): Document --wrapper.
9594 (main): Parse --wrapper.
9595
9596 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9597
9598 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9599 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9600 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9601 (ppc_set_pc): Likewise.
9602 (ppc_arch_setup): New function.
9603 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9604 of collect_register.
9605 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9606
9607 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9608
9609 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9610 instead of linux-ppc64-low.o.
9611 * linux-ppc64-low.c: Remove file.
9612 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9613 (linux-ppc64-low.o): Remove rule.
9614
9615 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9616 (init_registers_powerpc_64): Likewise.
9617 (ppc_regmap): Conditionally define depending on __powerpc64__.
9618 (ppc_cannot_store_register): Do not special-case "fpscr" when
9619 compiled on __powerpc64__.
9620 (ppc_collect_ptrace_register): New function.
9621 (ppc_supply_ptrace_register): New function.
9622 (ppc_breakpoint): Change type to "unsigned int".
9623 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9624 (the_low_target): Conditionally provide initializers for the
9625 arch_setup member depending on __powerpc64__. Install
9626 collect_ptrace_register and supply_ptrace_register members.
9627
9628 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9629
9630 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9631 * server.c (gdbserver_xmltarget): Define.
9632 (get_features_xml): Use it to replace "target.xml" and arch_string.
9633
9634 * configure.srv: Remove srv_xmltarget. Add XML files that were
9635 mentioned there to srv_xmlfiles instead. Remove conditional tests
9636 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9637 srv_xmlfiles and srv_regobj to include all possible choices.
9638 * configure.ac (srv_xmltarget): Remove.
9639 (srv_xmlfiles): Do not add "target.xml".
9640 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9641 checks for supplementary target information.
9642 * configure: Regenerate.
9643 * Makefile.in (XML_TARGET): Remove.
9644 (target.xml): Remove rule.
9645 (clean): Do not clean up target.xml.
9646 (.PRECIOUS): Do not mention target.xml.
9647
9648 * target.h (struct target_ops): Remove arch_string member.
9649 * linux-low.c (linux_arch_string): Remove.
9650 (linux_target_ops): Remove arch_string initializer.
9651 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9652 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9653 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9654 * spu-low.c (spu_arch_string): Remove.
9655 (spu_target_ops): Remove arch_string initializer.
9656 * win32-low.c (win32_arch_string): Remove.
9657 (win32_target_ops): Remove arch_string initializer.
9658 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9659 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9660 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9661
9662 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9663
9664 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9665 by collect_ptrace_register and supply_ptrace_register hooks.
9666 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9667 instead of checking for the_low_target.left_pad_xfer.
9668 (usr_store_inferior_registers): Use collect_ptrace_register callback
9669 instead of checking for the_low_target.left_pad_xfer.
9670
9671 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9672 (s390_supply_ptrace_register): Likewise.
9673 (s390_fill_gregset): Call s390_collect_ptrace_register.
9674 (the_low_target): Update.
9675
9676 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9677 (ppc_supply_ptrace_register): Likewise.
9678 (the_low_target): Update.
9679
9680 * linux-i386-low.c (the_low_target): Update.
9681 * linux-x86-64-low.c (the_low_target): Update.
9682
9683 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9684
9685 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9686 reg-s390.o and reg-s390x.o.
9687
9688 * linux-low.c (new_inferior): New global variable.
9689 (linux_create_inferior, linux_attach): Set it.
9690 (linux_wait_for_process): Call the_low_target.arch_setup after the
9691 target has stopped for the first time.
9692 (initialize_low): Do not call the_low_target.arch_setup.
9693
9694 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9695 (s390_set_pc): Likewise.
9696 (s390_arch_setup): New function.
9697 (the_low_target): Use s390_arch_setup as arch_setup routine.
9698
9699 * regcache.c (realloc_register_cache): New function.
9700 (set_register_cache): Call it for each existing regcache.
9701
9702 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9703
9704 * server.h (init_registers): Remove prototype.
9705
9706 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9707 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9708 instead of init_registers ().
9709 * linux-arm-low.c (init_registers_arm): Add prototype.
9710 (init_registers_arm_with_iwmmxt): Likewise.
9711 (the_low_target): Add initializer for arch_setup field.
9712 * linux-cris-low.c (init_registers_cris): Add prototype.
9713 (the_low_target): Add initializer for arch_setup field.
9714 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9715 (the_low_target): Add initializer for arch_setup field.
9716 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9717 (the_low_target): Add initializer for arch_setup field.
9718 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9719 (the_low_target): Add initializer for arch_setup field.
9720 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9721 (the_low_target): Add initializer for arch_setup field.
9722 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9723 (the_low_target): Add initializer for arch_setup field.
9724 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9725 (init_registers_mips64_linux): Likewise.
9726 (the_low_target): Add initializer for arch_setup field.
9727 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9728 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9729 (the_low_target): Add initializer for arch_setup field.
9730 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9731 (init_registers_powerpc_64): Likewise.
9732 (the_low_target): Add initializer for arch_setup field.
9733 * linux-s390-low.c (init_registers_s390): Add prototype.
9734 (init_registers_s390x): Likewise.
9735 (the_low_target): Add initializer for arch_setup field.
9736 * linux-sh-low.c (init_registers_sh): Add prototype.
9737 (the_low_target): Add initializer for arch_setup field.
9738 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9739 (the_low_target): Add initializer for arch_setup field.
9740 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9741 (the_low_target): Add initializer for arch_setup field.
9742
9743 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9744 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9745 instead of init_registers ().
9746 * win32-arm-low.c (init_registers_arm): Add prototype.
9747 (the_low_target): Add initializer for arch_setup field.
9748 * win32-i386-low.c (init_registers_i386): Add prototype.
9749 (the_low_target): Add initializer for arch_setup field.
9750
9751 * spu-low.c (init_registers_spu): Add prototype.
9752 (initialize_low): Call initialie_registers_spu () instead of
9753 initialize_registers ().
9754
9755 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9756
9757 * server.c (handle_v_requests): When handling the vRun and vAttach
9758 packets, if already debugging a process, don't kill it. Return an
9759 error instead.
9760
9761 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9762
9763 * server.c (handle_query): Correct length check.
9764
9765 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9766
9767 * win32-low.c (do_initial_child_stuff): Add process handle
9768 parameter. Set current_process_handle and current_process_id from the
9769 parameters. Clear globals.
9770 (win32_create_inferior): Don't set current_process_handle and
9771 current_process_id here. Instead pass them on the call to
9772 do_initial_child_stuff.
9773 (win32_attach): Likewise.
9774 (win32_clear_inferiors): New.
9775 (win32_kill): Don't close the current process handle or the
9776 current thread handle here. Instead call win32_clear_inferiors.
9777 (win32_detach): Don't open a new handle to the process. Call
9778 win32_clear_inferiors.
9779 (win32_join): Don't rely on current_process_handle; open a new
9780 handle using the process id.
9781 (win32_wait): Call win32_clear_inferiors when the inferior process
9782 has exited.
9783
9784 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * server.c (monitor_show_help): Add "exit".
9787
9788 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9789
9790 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9791 (clean): Add reg-xtensa.c.
9792 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9793 * configure.srv (xtensa*-*-linux*) New target.
9794 * linux-xtensa-low.c: New.
9795 * xtensa-xtregs.c: New.
9796
9797 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9798
9799 * hostio.c: Don't include errno.h.
9800 (errno_to_fileio_errno): Move to hostio-errno.
9801 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9802 error number outputting to the target->hostio_last_error callback.
9803 (hostio_packet_error): Use FILEIO_EINVAL directly.
9804 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9805 calls to hostio_error.
9806 * hostio-errno.c: New.
9807 * server.h (hostio_last_error_from_errno): Declare.
9808 * target.h (target_ops): Add hostio_last_error member.
9809 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9810 as hostio_last_error handler.
9811 * spu-low.c (spu_target_ops): Likewise.
9812 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9813 (wince_hostio_last_error): New functions.
9814 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9815 as hostio_last_error handler.
9816 (win32_target_ops) [!_WIN32_WCE]: Register
9817 hostio_last_error_from_errno as hostio_last_error handler.
9818 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9819 (hostio-errno.o): New rule.
9820 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9821 * configure.srv (srv_hostio_err_objs): New variable. Default to
9822 hostio-errno.o.
9823 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9824 * configure: Regenerate.
9825
9826 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9827
9828 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9829 (linux_kill, linux_detach): Clean up the process list.
9830 * remote-utils.c (remote_open): Improve port number parsing.
9831 (putpkt_binary, input_interrupt): Only send interrupts if the target
9832 is running.
9833 * server.c (extended_protocol): Make static.
9834 (attached): Define earlier.
9835 (exit_requested, response_needed, program_argv): New variables.
9836 (target_running): New.
9837 (start_inferior): Clear attached here.
9838 (attach_inferior): Set attached here.
9839 (require_running): Define.
9840 (handle_query): Use require_running and target_running. Implement
9841 "monitor exit".
9842 (handle_v_attach, handle_v_run): New.
9843 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9844 (gdbserver_usage): Update.
9845 (main): Redo argument parsing. Handle --debug and --multi. Handle
9846 --attach along with other options or after the port. Save
9847 program_argv. Support no initial program. Resynchronize
9848 communication with GDB after an error. Handle "monitor exit".
9849 Use require_running and target_running. Always allow the extended
9850 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9851 restart in extended mode.
9852 * README: Refer to the GDB manual. Update --attach usage.
9853
9854 2007-12-20 Andreas Schwab <schwab@suse.de>
9855
9856 * linux-low.c (STACK_SIZE): Define.
9857 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9858 (linux_test_for_tracefork): Likewise.
9859
9860 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9861
9862 * linux-low.c (linux_wait_for_event): Update messages. Do not
9863 reinsert auto-delete breakpoints.
9864 * mem-break.c (struct breakpoint): Change return type of handler to
9865 int.
9866 (set_breakpoint_at): Update handler type.
9867 (reinsert_breakpoint_handler): Return 1 instead of calling
9868 delete_breakpoint.
9869 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9870 setting a new one.
9871 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9872 * mem-break.h (set_breakpoint_at): Update handler type.
9873 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9874 * win32-low.c (auto_delete_breakpoint): New.
9875 (get_child_debug_event): Use it.
9876
9877 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9878
9879 * configure.ac: Check for pread and pwrite.
9880 * hostio.c (handle_pread): Fall back to lseek and read.
9881 (handle_pwrite): Fall back to lseek and write.
9882 * config.in, configure: Regenerated.
9883
9884 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9885
9886 * server.c (myresume): Add own_buf argument.
9887 (main): Update calls.
9888
9889 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9890
9891 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9892 * remote-utils.c (remote_open): Do not call disable_async_io.
9893 (block_async_io): Delete.
9894 (unblock_async_io): Make static.
9895 (initialize_async_io): New.
9896 * server.c (handle_v_cont): Handle async I/O here.
9897 (myresume): Likewise. Move other common resume tasks here...
9898 (main): ... from here. Call initialize_async_io. Disable async
9899 I/O before the main loop.
9900 * server.h (initialize_async_io): Declare.
9901 (block_async_io, unblock_async_io): Delete prototypes.
9902 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9903
9904 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9905
9906 * remote-utils.c (readchar): Allow binary data in received messages.
9907
9908 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9909
9910 * win32-low.c (attaching): New global.
9911 (win32_create_inferior): Clear the `attaching' global.
9912 (win32_attach): Set the `attaching' global.
9913 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9914 attaching. Only set a breakpoint at the entry point if not
9915 attaching.
9916
9917 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9918
9919 * server.c (main): Don't report dll events on the initial
9920 connection on attaches.
9921
9922 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9923
9924 * server.c (main): Relax numerical bases supported for the pid of
9925 the --attach command line argument.
9926
9927 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9928
9929 * win32-low.c (win32_attach): Call OpenProcess before
9930 DebugActiveProcess, not after. Add last error output to error
9931 call.
9932
9933 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9934
9935 * win32-low.c (win32_get_thread_context)
9936 (win32_set_thread_context): New functions.
9937 (thread_rec): Use win32_get_thread_context.
9938 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9939 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9940 field.
9941
9942 2007-12-03 Leo Zayas
9943 Pedro Alves <pedro_alves@portugalmail.pt>
9944
9945 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9946 global variables.
9947 (child_add_thread): Minor cleanup.
9948 (child_continue): Resume artificially suspended threads before
9949 calling ContinueDebugEvent.
9950 (suspend_one_thread): New.
9951 (fake_breakpoint_event): New.
9952 (get_child_debug_event): Change return type to int. Check here if
9953 gdb sent an interrupt request. If a soft interrupt was requested,
9954 fake a breakpoint event. Return 0 if there is no event to handle,
9955 and 1 otherwise.
9956 (win32_wait): Don't check here if gdb sent an interrupt request.
9957 Ensure there is a valid event to handle.
9958 (win32_request_interrupt): Add soft interruption method as last
9959 resort.
9960
9961 2007-12-03 Leo Zayas
9962 Pedro Alves <pedro_alves@portugalmail.pt>
9963
9964 * win32-low.h (win32_thread_info): Add descriptions to the
9965 structure members. Replace `suspend_count' counter by a
9966 `suspended' flag.
9967 * win32-low.c (thread_rec): Update condition of when to get the
9968 context from the inferior. Rely on ContextFlags being set if it
9969 has already been retrieved. Only suspend the inferior thread if
9970 we haven't already. Warn if that fails.
9971 (continue_one_thread): s/suspend_count/suspended/. Only call
9972 ResumeThread once. Warn if that fails.
9973
9974 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9975
9976 * win32-low.c (win32_wait): Don't read from the inferior when it
9977 has already exited.
9978
9979 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9980
9981 * Makefile.in (win32_low_h): New variable.
9982 (win32-low.o): Add dependency on $(win32_low_h).
9983 (win32-arm-low.o, win32-i386-low.o): New rules.
9984
9985 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9986
9987 * hostio.c: Correct copyright year.
9988
9989 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9990
9991 * Makefile.in (OBS): Add hostio.o.
9992 (hostio.o): New rule.
9993 * server.h (handle_vFile): Declare.
9994 * hostio.c: New file.
9995 * server.c (handle_v_requests): Take packet_len and new_packet_len
9996 for binary packets. Call handle_vFile.
9997 (main): Update call to handle_v_requests.
9998
9999 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10000
10001 * linux-low.c: Include <sched.h>.
10002
10003 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * linux-low.c (linux_tracefork_grandchild): New.
10006 (linux_tracefork_child): Use clone.
10007 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10008
10009 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10010
10011 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10012
10013 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10014
10015 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10016
10017 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * inferiors.c (change_inferior_id): Delete.
10020 (add_pid_to_list, pull_pid_from_list): New.
10021 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10022 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10023 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10024 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10025 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10026 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10027 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10028 (using_threads): Always set to 1.
10029 (handle_extended_wait): New.
10030 (add_process): Do not set TID.
10031 (linux_create_inferior): Set must_set_ptrace_flags.
10032 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10033 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10034 (linux_thread_alive): Rename TID argument to LWPID.
10035 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10036 (linux_wait_for_event): Do not use TID or check using_threads. Update
10037 call to dead_thread_notify. Call handle_extended_wait.
10038 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10039 (send_sigstop): Delete sigstop_sent.
10040 (wait_for_sigstop): Avoid TID.
10041 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10042 (linux_test_for_tracefork): New.
10043 (linux_lookup_signals): Use thread_db_active and
10044 linux_supports_tracefork_flag.
10045 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10046 * linux-low.h (get_process_thread): Avoid TID.
10047 (struct process_ifo): Move thread_known and tid to the end. Remove
10048 sigstop_sent.
10049 (linux_attach_lwp, thread_db_init): Update prototypes.
10050 * server.h (change_inferior_id): Delete prototype.
10051 (add_pid_to_list, pull_pid_from_list): New prototypes.
10052 * thread-db.c (thread_db_use_events): New.
10053 (find_first_thread): Rename to...
10054 (find_one_thread): ...this. Update callers and messages. Do not
10055 call fatal. Check thread_db_use_events. Do not call
10056 change_inferior_id or new_thread_notify.
10057 (maybe_attach_thread): Update. Do not call new_thread_notify.
10058 (thread_db_init): Set thread_db_use_events. Check use_events.
10059 * utils.c (fatal, warning): Correct message prefix.
10060
10061 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10062
10063 * Makefile.in (clean): Remove new files.
10064 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10065 (powerpc-64.o, powerpc-64.c): New rules.
10066 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10067 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10068 with SPE.
10069 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10070 SPE targets.
10071 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10072 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10073 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10074 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10075 (target_regsets): Add AltiVec and SPE register sets.
10076 * configure.ac: Check for AltiVec and SPE.
10077 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10078 (ppc_fill_vrregset, ppc_store_vrregset): New.
10079 (target_regsets): Add AltiVec register set.
10080 * configure: Regenerated.
10081
10082 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10083
10084 * linux-low.c (O_LARGEFILE): Define.
10085 (linux_read_memory): Use /proc/PID/mem.
10086 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10087 * configure, config.in: Regenerated.
10088
10089 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10090
10091 * linux-low.c (linux_wait_for_event): Do not pass signals while
10092 single-stepping.
10093
10094 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10095
10096 * win32-low.c (create_process): New.
10097 (win32_create_inferior): Use create_process instead of
10098 CreateProcess. If create_process failed retry appending an ".exe"
10099 suffix. Store the GetLastError result immediatelly after
10100 create_process calls and use it on the call to error.
10101
10102 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10103
10104 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10105
10106 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10107
10108 * configure.ac: Switch license to GPLv3.
10109
10110 2007-08-01 Michael Snyder <msnyder@access-company.com>
10111
10112 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10113
10114 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10115
10116 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10117 typedef.
10118 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10119 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10120 CloseToolhelp32Snapshot.
10121 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10122 CloseToolhelp32Snapshot.
10123
10124 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10125
10126 * server.c (main): Check for inferior exit before main loop.
10127
10128 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10129
10130 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10131 instead of on tmp_desc.
10132
10133 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10134 Daniel Jacobowitz <dan@codesourcery.com>
10135
10136 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10137 (add_thread): Minor cleanups.
10138 (clear_inferiors): Move lower in the file. Clear the DLL
10139 list.
10140 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10141 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10142 (xml_escape_text): New.
10143 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10144 for qSupported.
10145 (handle_v_cont): Report errors.
10146 (gdbserver_version): Update.
10147 (main): Correct size of own_buf. Do not report initial DLL events.
10148 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10149 (unloaded_dll, xml_escape_text): New.
10150 * win32-low.c (enum target_waitkind): Update comments.
10151 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10152 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10153 (win32_EnumProcessModules, win32_GetModuleInformation)
10154 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10155 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10156 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10157 (win32_Module32First, win32_Module32Next, load_toolhelp)
10158 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10159 (get_child_debug_event): Handle DLL events.
10160 (win32_wait): Likewise.
10161
10162 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10163
10164 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10165 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10166
10167 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10168
10169 * win32-low.c (handle_output_debug_string): Ignore event if not
10170 waiting.
10171
10172 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10173
10174 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10175
10176 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10177
10178 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10179
10180 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10181
10182 * inferiors.c (change_inferior_id): Add comment.
10183 * linux-low.c (check_removed_breakpoint): Add an early
10184 prototype. Improve debug output.
10185 (linux_attach): Doc update.
10186 (linux_detach_one_process, linux_detach): Clean up before releasing
10187 each process.
10188 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10189 * linux-low.h (struct process_info): Doc improvement.
10190 * mem-break.c (delete_all_breakpoints): New.
10191 * mem-break.h (delete_all_breakpoints): New prototype.
10192 * thread-db.c (find_first_thread): New.
10193 (thread_db_create_event): Call it instead of
10194 thread_db_find_new_threads. Clean up unused variables.
10195 (maybe_attach_thread): Remove first thread handling.
10196 (thread_db_find_new_threads): Use find_first_thread.
10197 (thread_db_get_tls_address): Likewise.
10198
10199 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10200
10201 * thread-db.c (thread_db_find_new_threads): Add prototype.
10202 (thread_db_create_event): Check for the main thread before adding
10203 a new thread.
10204 (maybe_attach_thread): Only enable event reporting if TID == 0.
10205 (thread_db_get_tls_address): Check for new threads.
10206
10207 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10208
10209 * linux-low.c (linux_create_inferior): Try execv before execvp.
10210 * spu-low.c (spu_create_inferior): Likewise.
10211
10212 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10213
10214 * linux-low.c (linux_create_inferior): Change execv to execvp.
10215 * spu-low.c (spu_create_inferior): Likewies.
10216
10217 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10218
10219 * Makefile.in (clean): Clean new files instead of deleted ones.
10220 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10221 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10222 rules.
10223 * configure.srv: Specify XML files and new regformats for MIPS and
10224 MIPS64 GNU/Linux.
10225 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10226 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10227 an entry for the restart register.
10228 (mips_cannot_fetch_register, mips_cannot_store_register)
10229 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10230 register names to match the XML descriptions.
10231 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10232 restart register instead of $0.
10233
10234 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10235 Markus Deuling <deuling@de.ibm.com>
10236
10237 * remote-utils.c (decode_xfer_write): New function.
10238 * server.h (decode_xfer_write): Add prototype.
10239 * server.c (handle_query): Add PACKET_LEN argument. Support
10240 qXfer:spu:read and qXfer:spu:write packets.
10241 (main): Pass packet_len to handle_query.
10242 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10243 * target.h (target_ops): Add qxfer_spu.
10244
10245 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10246
10247 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10248 accessing non-seekable spufs files.
10249
10250 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10251
10252 * server.c (handle_query): Add reply for qC packet.
10253
10254 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10255 Leo Zayas <lerele@champenstudios@com>
10256
10257 * server.h (check_remote_input_interrupt_request): New function.
10258 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10259 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10260 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10261 (check_remote_input_interrupt_request): New function.
10262 * server.h (check_remote_input_interrupt_request): Declare.
10263 * win32-low.c (winapi_DebugBreakProcess,
10264 winapi_GenerateConsoleCtrlEvent): New typedefs.
10265 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10266 to 250 ms.
10267 (win32_wait): Check for remote interrupt request
10268 with check_remote_input_interrupt_request.
10269 (win32_request_interrupt): New function.
10270 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10271
10272 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10273
10274 * win32-low.c (debug_registers_changed,
10275 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10276 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10277 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10278 (thread_rec): Get context using the low target.
10279 (child_add_thread): Call thread_added on the low target,
10280 which does the same thing.
10281 (regptr): Delete.
10282 (do_initial_child_stuff): Remove debug registers references.
10283 Set context using the low target. Resume threads after
10284 setting the contexts.
10285 (child_continue): Remove dead variable. Remove debug
10286 registers references.
10287 (child_fetch_inferior_registers): Go through the low target.
10288 (do_child_store_inferior_registers): Remove.
10289 (child_store_inferior_registers): Go through the low target.
10290 (win32_resume): Remove debug registers references.
10291 Set context using the low target.
10292 (handle_exception): Change return type to void. Don't record
10293 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10294 first chance exception.
10295 (get_child_debug_event): Change return type to void. Remove
10296 goto loop. Always return after waiting for debug event.
10297 (win32_wait): Convert to switch statement. Handle spurious
10298 events.
10299
10300 * win32-i386-low.c (debug_registers_changed,
10301 debug_registers_used): New.
10302 (initial_stuff): Rename to ...
10303 (i386_initial_stuff): ... this. Clear debug registers
10304 state variables.
10305 (store_debug_registers): Delete.
10306 (i386_get_thread_context): New.
10307 (load_debug_registers): Delete.
10308 (i386_set_thread_context): New.
10309 (i386_thread_added): New.
10310 (single_step): Rename to ...
10311 (i386_single_step): ... this.
10312 (do_fetch_inferior_registers): Rename to ...
10313 (i386_fetch_inferior_register): ... this.
10314 (i386_store_inferior_register): New.
10315 (the_low_target): Adapt to new interface.
10316
10317 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10318 (arm_get_thread_context): New.
10319 (arm_set_thread_context): New.
10320 (regptr): New.
10321 (do_fetch_inferior_registers): Rename to ...
10322 (arm_fetch_inferior_register): ... this.
10323 (arm_store_inferior_register): New.
10324 (arm_wince_breakpoint): Reimplement as unsigned long.
10325 (arm_wince_breakpoint_len): Define.
10326 (the_low_target): Adapt to new interface.
10327
10328 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10329 load_debug_registers. Add get_thread_context, set_thread_context,
10330 thread_added and store_inferior_register. Rename
10331 fetch_inferior_registers to fetch_inferior_register.
10332 (regptr): Remove declaration.
10333
10334 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10335
10336 * linux-low.c (linux_detach): Change return type to int. Return 0.
10337 * spu-low.c (spu_detach): Likewise.
10338
10339 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10340
10341 * target.h (target_ops): Change return type of detach to int.
10342 Add join.
10343 (join_inferior): New.
10344 * server.c (main): Don't skip detach support on mingw32.
10345 If the inferior doesn't support detaching return error.
10346 Call join_inferior instead of using waitpid.
10347 * linux-low.c (linux_join): New.
10348 (linux_target_op): Add linux_join.
10349 * spu-low.c (spu_join): New.
10350 (spu_target_ops): Add spu_join.
10351 * win32-low.c (win32_detach): Adapt to new interface.
10352 Reopen current_process_handle before detaching. Issue a child
10353 resume before detaching.
10354 (win32_join): New.
10355 (win32_target_op): Add win32_join.
10356
10357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10358
10359 * win32-low.c (win32-attach): Fix return value.
10360 * target.h (target_ops): Describe ATTACH return values.
10361
10362 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10363
10364 * win32-low.c (GETPROCADDRESS): Define.
10365 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10366 (winapi_DebugSetProcessKillOnExit): Likewise.
10367 (win32_create_inferior): Force usage of ansi CreateProcessA.
10368 (win32_attach): Use GETPROCADDRESS.
10369 (win32_detach): Likewise.
10370
10371 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10372
10373 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10374
10375 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10376
10377 * win32-low.c: Commit leftover changes from 2007-03-29.
10378
10379 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10380
10381 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10382 fields short instead of int. Add explicit padding.
10383 (i387_cache_to_fsave): Remove unnecessary casts.
10384 (i387_fsave_to_cache): Doc fix.
10385 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10386
10387 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10390 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10391
10392 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10393
10394 * configure.srv (arm*-*-mingw32ce*): Move near the other
10395 arm targets.
10396
10397 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10398
10399 * configure.ac: Add errno checking.
10400 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10401 sys/file.h and malloc.h.
10402 (AC_CHECK_DECLS): Add perror.
10403 (srv_mingwce): Handle.
10404 * configure.srv (i[34567]86-*-cygwin*): Add
10405 win32-i386-low.o to srv_tgtobj.
10406 (i[34567]86-*-mingw*): Likewise.
10407 (arm*-*-mingw32ce*): Add case.
10408 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10409 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10410 [__MINGW32CE__] (strerror): New function.
10411 [__MINGW32CE__] (errno): Define to GetLastError.
10412 [__MINGW32CE__] (COUNTOF): New macro.
10413 (remote_open): Remove extra close call.
10414 * mem-break.c (delete_breakpoint_at): New function.
10415 * mem-break.h (delete_breakpoint_at): Declare.
10416 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10417 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10418 [USE_WIN32API] (read, write): Add char* casts.
10419 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10420 * server.h: Include wincecompat.h on Windows CE.
10421 [HAVE_ERRNO_H]: Check.
10422 (perror): Declare if not declared.
10423 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10424 (perror_with_name): Remove errno declaration.
10425 * wincecompat.h: New.
10426 * wincecompat.c: New.
10427 * win32-low.h: New.
10428 * win32-arm-low.c: New.
10429 * win32-i386-low.c: New.
10430 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10431 (OUTMSG2): Make it safe.
10432 (_T): New macro.
10433 (COUNTOF): New macro.
10434 (NUM_REGS): Get it from the low target.
10435 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10436 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10437 (thread_rec): Let low target handle debug registers.
10438 (child_add_thread): Likewise.
10439 (child_init_thread_list): Likewise.
10440 (continue_one_thread): Likewise.
10441 (regptr): New.
10442 (do_child_fetch_inferior_registers): Move to ...
10443 * win32-i386-low.c: ... here, and rename to ...
10444 (do_fetch_inferior_registers): ... this.
10445 * win32-low.c (child_fetch_inferior_registers):
10446 Go through the low target.
10447 (do_child_store_inferior_registers): Use regptr.
10448 (strwinerror): New function.
10449 (win32_create_inferior): Handle Windows CE.
10450 Use strwinerror instead of strerror on Windows error
10451 codes. Add program to the error output.
10452 Don't close the main thread handle on Windows CE.
10453 (win32_attach): Use coredll.dll on Windows CE.
10454 (win32_kill): Close current process and current
10455 thread handles.
10456 (win32_detach): Use coredll.dll on Windows CE.
10457 (win32_resume): Let low target handle debug registers, and
10458 step request.
10459 (handle_exception): Add/Remove initial breakpoint. Avoid
10460 non-existant WSTOPSIG on Windows CE.
10461 (win32_read_inferior_memory): Cast to remove warning.
10462 (win32_arch_string): Go through the low target.
10463 (initialize_low): Call set_breakpoint_data with the low
10464 target's breakpoint.
10465 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10466 FOP_REGNUM, mappings): Move to ...
10467 * win32-i386-low.c: ... here.
10468 * win32-low.c (win32_thread_info): Move to ...
10469 * win32-low.h: ... here.
10470 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10471 win32-arm-low.c and wincecompat.c.
10472 (all:): Add $EXEEXT.
10473 (install-only:): Likewise.
10474 (gdbserver:): Likewise.
10475 (gdbreplay:): Likewise.
10476 * config.in: Regenerate.
10477 * configure: Regenerate.
10478
10479 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10480
10481 * win32-low.c: Rename typedef thread_info to
10482 win32_thread_info throughout.
10483
10484 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10485
10486 * win32-i386-low.c: Rename to ...
10487 * win32-low.c: ... this.
10488 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10489 * Makefile.in: Likewise.
10490
10491 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10492
10493 * remote-utils.c (monitor_output): Constify msg parameter.
10494 * server.h (monitor_output): Likewise.
10495 * win32-i386-low.c (handle_output_debug_string): New.
10496 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10497 handle_output_debug_string.
10498 (get_child_debug_event): Likewise.
10499
10500 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10501
10502 * server.c (main): Correct strtoul check.
10503
10504 2007-03-27 Jon Ringle <jon@ringle.org>
10505
10506 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10507
10508 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10509
10510 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10511
10512 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10513
10514 * terminal.h: Check HAVE_SGTTY_H.
10515
10516 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10517
10518 * remote-utils.c (remote_open): Print out the assigned port number.
10519
10520 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * remote-utils.c (monitor_output): New function.
10523 * server.c (debug_threads): Define here.
10524 (monitor_show_help): New function.
10525 (handle_query): Handle qRcmd.
10526 (main): Do not handle 'd' packet.
10527 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10528 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10529 of debug_threads.
10530
10531 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10532
10533 * Makefile.in (EXEEXT): New.
10534 (clean): Use $(EXEEXT).
10535
10536 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10537
10538 * target.h (target_ops): Rename send_signal to request_interrupt,
10539 and remove enum target_signal parameter.
10540 * linux-low.c (linux_request_interrupt): Rename from
10541 linux_send_signal, and always send SIGINT.
10542 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10543 and always send SIGINT.
10544 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10545 of send_signal.
10546 (input_interrupt): Likewise.
10547
10548 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10549
10550 * server.c (get_features_xml): Check if target implemented
10551 arch_string.
10552 * win32-i386-low.c (win32_arch_string): New.
10553 (win32_target_ops): Add win32_arch_string as arch_string member.
10554
10555 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10556
10557 * spu-low.c (spu_arch_string): New.
10558 (spu_target_ops): Add spu_arch_string.
10559
10560 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10561
10562 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10563 * configure.ac: Do not check for terminal.h.
10564 * configure, config.in: Regenerated.
10565
10566 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10567
10568 * Makefile.in (OBS): Add $(XML_BUILTIN).
10569 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10570 (clean): Update.
10571 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10572 (arm-with-iwmmxt.c): New.
10573 * config.in, configure: Regenerate.
10574 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10575 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10576 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10577 (arm*-*-linux*): Add iWMMXt and regset support.
10578 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10579 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10580 (arm_store_wmmxregset, target_regsets): New.
10581 * server.c (get_features_xml): Take annex argument. Check builtin
10582 XML documents.
10583 (handle_query): Handle multiple annexes.
10584
10585 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * remote-utils.c [USE_WIN32API] (read, write): Define.
10588 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10589 write.
10590
10591 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10592
10593 * linux-i386-low.c (the_low_target): Set arch_string.
10594 * linux-x86-64-low.c (the_low_target): Likewise.
10595 * linux-low.c (linux_arch_string): New.
10596 (linux_target_ops): Add it.
10597 * linux-low.h (struct linux_target_ops): Add arch_string.
10598 * server.c (write_qxfer_response): Use const void * for DATA.
10599 (get_features_xml): New.
10600 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10601 * target.h (struct target_ops): Add arch_string method.
10602
10603 2007-01-03 Denis Pilat <denis.pilat@st.com>
10604 Daniel Jacobowitz <dan@codesourcery.com>
10605
10606 * linux-low.c (linux_kill): Handle being called with no threads.
10607 * win32-i386-low.c (win32_kill): Likewise.
10608 (get_child_debug_event): Clear current_process_handle.
10609
10610 2006-12-30 Denis PILAT <denis.pilat@st.com>
10611 Daniel Jacobowitz <dan@codesourcery.com>
10612
10613 * remote-utils.c (remote_open): Check the type of specified
10614 serial port devices before opening them.
10615 * server.c (main): Kill the inferior if an error occurs during
10616 the first remote_open.
10617
10618 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10619
10620 * README: Update supported targets.
10621
10622 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10623
10624 * Makefile.in (clean): Remove reg-mips64.c.
10625 (reg-mips64.c, reg-mips64.o): New rules.
10626 * configure.srv: Handle mips64. Include regset support for mips.
10627 * linux-mips-low.c (union mips_register): New.
10628 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10629 (mips_breakpoint, mips_breakpoint_at): Use int.
10630 (mips_collect_register, mips_supply_register)
10631 (mips_collect_register_32bit, mips_supply_register_32bit)
10632 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10633 (mips_store_fpregset, target_regsets): New.
10634 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10635
10636 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10637
10638 * configure.srv: Add target "spu*-*-*".
10639 * Makefile.in (clean): Remove reg-spu.c.
10640 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10641 * spu-low.c: New file.
10642
10643 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10644
10645 * configure.ac: Correct td_thr_tls_get_addr test.
10646 * configure: Regenerated.
10647
10648 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10649
10650 * linux-low.c (linux_wait_for_event): Reformat. Use the
10651 pass_signals array.
10652 * remote-utils.c (decode_address_to_semicolon): New.
10653 * server.c (pass_signals, handle_general_set): New.
10654 (handle_query): Mention QPassSignals for qSupported.
10655 (main): Call handle_general_set.
10656 * server.h (pass_signals, decode_address_to_semicolon): New.
10657
10658 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10659
10660 * server.c (handle_query): Correct error handling for read_auxv.
10661
10662 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10663
10664 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10665 and srv_linux_thread_db to yes.
10666 * linux-s390-low.c (s390_fill_gregset): New function.
10667 (target_regsets): Define data structure.
10668
10669 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10670
10671 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10672 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10673 * config.in, configure: Regenerated.
10674 * inferiors.c (gdb_id_to_thread): New function.
10675 (gdb_id_to_thread_id): Use it.
10676 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10677 * linux-low.h (struct process_info): Add th member.
10678 (thread_db_get_tls_address): New prototype.
10679 * remote-utils.c (decode_address): Make non-static.
10680 * server.c (handle_query): Handle qGetTLSAddr.
10681 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10682 * target.h (struct target_ops): Add get_tls_address.
10683 * thread-db.c (maybe_attach_thread): Save the thread handle.
10684 (thread_db_get_tls_address): New.
10685
10686 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10687
10688 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10689 (linux_resume_one_process): Take a siginfo_t *. Update all
10690 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10691 (struct pending_signals): Add a siginfo_t.
10692 (linux_wait_for_process): Always set last_status.
10693 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10694 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10695 * linux-low.h (struct process_info): Add last_status.
10696
10697 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * remote-utils.c (try_rle): New function.
10700 (putpkt_binary): Use it.
10701
10702 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10703
10704 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10705 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10706 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10707 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10708 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10709 point registers.
10710
10711 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10712
10713 * server.c (terminal_fd): New variable.
10714 (old_foreground_pgrp): Likewise.
10715 (restore_old_foreground_pgrp): New function.
10716 (start_inferior): Record the terminal file descriptor in terminal_fd
10717 and its original foreground group in old_foreground_pgrp. Register
10718 restore_old_foreground_pgrp with atexit().
10719
10720 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10721
10722 * server.c (handle_query): Correct qPart to qXfer.
10723
10724 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10725
10726 * configure.ac: Check for more headers which are missing on
10727 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10728 * configure.srv: Add Cygwin and mingw32.
10729 * remote-utils.c: Don't include headers unconditionally which
10730 are missing on mingw32. Include <winsock.h> for mingw32.
10731 (remote_open): Adjust for mingw32 support. Flush
10732 standard error after writing to it.
10733 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10734 (unblock_async_io, enable_async_io, disable_async_io)
10735 (readchar, getpkt): Update for Winsock support.
10736 (prepare_resume_reply): Expect a protocol signal number.
10737 * server.c: Disable <sys/wait.h> on mingw32.
10738 (start_inferior): Adjust for mingw32 support. Flush
10739 standard error after writing to it.
10740 (attach_inferior): Likewise. Use protocol signal
10741 numbers.
10742 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10743 and names.
10744 * win32-i386-low.c: New file.
10745 * Makefile.in (XM_CLIBS): Set.
10746 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10747 (win32-i386-low.o): New dependency rule.
10748 * linux-low.c (linux_wait): Use target signal numbers.
10749 * target.h (struct target_ops): Doc fix.
10750 * server.h (target_signal_to_name): New prototype.
10751 * gdbreplay.c: Don't include headers unconditionally which
10752 are missing on mingw32. Include <winsock.h> for mingw32.
10753 (remote_close, remote_open): Adjust for Winsock support.
10754 * configure, config.in: Regenerated.
10755
10756 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10757
10758 * server.c (decode_xfer_read, write_qxfer_response): New.
10759 (handle_query): Take a packet length argument. Handle
10760 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10761 the qSupported response.
10762 (main): Update call to handle_query.
10763
10764 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10765
10766 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10767 (putpkt_binary): Renamed from putpkt and adjusted for binary
10768 data.
10769 (putpkt): New wrapper for putpkt_binary.
10770 (readchar): Don't mask off the high bit.
10771 (decode_X_packet): New function.
10772 * server.c (main): Call putpkt_binary if a handler sets the packet
10773 length. Save the length of the incoming packet. Handle 'X'.
10774 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10775
10776 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10777
10778 * server.c (handle_query): Handle qSupported.
10779
10780 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * remote-utils.c (all_symbols_looked_up): New variable.
10783 (look_up_one_symbol): Check it.
10784 * server.h (look_up_one_symbol): New declaration.
10785 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10786
10787 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10788
10789 * Makefile.in (linux-arm-low.o): Update dependencies.
10790 * linux-arm-low.c: Include "gdb_proc_service.h".
10791 (PTRACE_GET_THREAD_AREA): Define.
10792 (ps_get_thread_area): New function.
10793
10794 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10795
10796 * configure.srv (m68k*-*-uclinux*): New target.
10797 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10798 (linux_resume_one_process): Remove extraneous cast.
10799 (linux_read_offsets): New.
10800 (linux_target_op): Add linux_read_offsets on mmuless systems.
10801 * server.c (handle_query): Add qOffsets logic.
10802 * target.h (struct target_ops): Add read_offsets.
10803
10804 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10805
10806 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10807 (PTRACE_GET_THREAD_AREA): Define.
10808 (ps_get_thread_area): New function.
10809 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10810 (linux-x86-64-low.o): Update.
10811
10812 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10813
10814 * configure.ac: Remove checks for prfpregset_t.
10815 * gdb_proc_service.h: New file.
10816 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10817 new "gdb_proc_service.h".
10818 * proc-service.c: Likewise.
10819 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10820 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10821 * Makefile.in (gdb_proc_service_h): Updated.
10822 * configure, config.in: Regenerated.
10823
10824 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10825
10826 * remote-utils.c (prepare_resume_reply): Move declaration
10827 of gdb_id_from_wait to the top of the block.
10828
10829 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10830
10831 * linux-low.c (regsets_store_inferior_registers): Read the regset
10832 from the target before filling it.
10833
10834 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10835
10836 * server.c (attach_inferior): Return SIGTRAP for a successful
10837 attach.
10838
10839 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10840
10841 * Makefile.in (OBS): Add version.o.
10842 (STAGESTUFF): Delete.
10843 (version.o): Add dependencies.
10844 (version.c): Replace rule.
10845 (clean): Remove version.c.
10846 * server.c (gdbserver_version): New.
10847 (gdbserver_usage): Use printf.
10848 (main): Handle --version and --help.
10849 * server.h (version, host_name): Add declarations.
10850
10851 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10852
10853 * linux-arm-low.c:
10854 * linux-arm-low.c:
10855 * inferiors.c:
10856 * i387-fp.h:
10857 * i387-fp.c:
10858 * gdbreplay.c:
10859 * regcache.c:
10860 * proc-service.c:
10861 * mem-break.h:
10862 * mem-break.c:
10863 * linux-x86-64-low.c:
10864 * linux-sh-low.c:
10865 * linux-s390-low.c:
10866 * linux-ppc64-low.c:
10867 * linux-ppc-low.c:
10868 * linux-mips-low.c:
10869 * linux-m68k-low.c:
10870 * linux-m32r-low.c:
10871 * linux-low.h:
10872 * linux-low.c:
10873 * linux-ia64-low.c:
10874 * linux-i386-low.c:
10875 * linux-crisv32-low.c:
10876 * thread-db.c:
10877 * terminal.h:
10878 * target.h:
10879 * target.c:
10880 * server.h:
10881 * server.c:
10882 * remote-utils.c:
10883 * regcache.h:
10884 * utils.c:
10885 * Makefile.in:
10886 * configure.ac:
10887 * gdbserver.1: Add (C) after Copyright. Update the FSF
10888 address.
10889
10890 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10891
10892 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10893 (arm_breakpoint_at): Recognize both breakpoints.
10894 (the_low_target): Use the correct breakpoint instruction.
10895
10896 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10897
10898 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10899 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10900 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10901 (the_low_target): Update.
10902
10903 2005-10-25 Andreas Schwab <schwab@suse.de>
10904
10905 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10906
10907 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10908 (ia64_num_regs): Reduce to 462.
10909
10910 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10911
10912 * acinclude.m4: Correct quoting.
10913 * aclocal.m4: Regenerated.
10914
10915 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10916 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10917 (thread_db_init): Call thread_db_err_str.
10918 * configure.ac: Check for TD_VERSION.
10919 * config.in, configure: Regenerated.
10920
10921 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10922
10923 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10924
10925 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10926
10927 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10928 is not available. Define HAVE_PTRACE_GETREGS if it is.
10929 * config.in, configure: Regenerated.
10930 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10931 * linux-i386-low.c, linux-m68k-low.c: Update to use
10932 HAVE_PTRACE_GETREGS.
10933 * linux-low.c (regsets_fetch_inferior_registers)
10934 (regsets_store_inferior_registers): Only return 0 if we processed
10935 GENERAL_REGS.
10936 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10937 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10938
10939 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10940
10941 * inferiors.c (struct thread_info): Add gdb_id.
10942 (add_thread): Add gdb_id argument.
10943 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10944 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10945 calls to add_thread.
10946 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10947 * server.c (handle_query): Use thread_to_gdb_id.
10948 (handle_v_cont, main): Use gdb_id_to_thread_id.
10949 * server.h (add_thread): Update prototype.
10950 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10951 prototypes.
10952
10953 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10954
10955 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10956 left-padded registers.
10957 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10958 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10959
10960 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10961
10962 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10963 * configure: Regenerate.
10964 * config.in: Regenerate.
10965 * server.h (NEED_DECLARATION_STRERROR):
10966 Replace with !HAVE_DECL_STRERROR.
10967
10968 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10969
10970 * linux-low.c (linux_wait, linux_send_signal): Don't test
10971 an unsigned long variable for > 0 if it could be MAX_ULONG.
10972 * server.c (myresume): Likewise.
10973 * target.c (set_desired_inferior): Likewise.
10974
10975 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10976
10977 * configure.ac: Simplify and improve check for socklen_t.
10978 * configure, config.in: Regenerate.
10979
10980 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10981
10982 * acconfig.h: Remove.
10983 * configure.ac: Add a test for socklen_t. Use three-argument
10984 AC_DEFINE throughout.
10985 * config.in: Regenerated using autoheader 2.59.
10986 * configure: Regenerated.
10987
10988 * gdbreplay.c (socklen_t): Provide a default.
10989 (remote_open): Use socklen_t.
10990 * remote-utils.c (socklen_t): Provide a default.
10991 (remote_open): Use socklen_t.
10992 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10993 unsigned char.
10994
10995 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10996 char for buffers.
10997 * linux-low.c (linux_read_memory, linux_write_memory)
10998 (linux_read_auxv): Likewise.
10999 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11000 (check_mem_write): Likewise.
11001 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11002 Likewise.
11003 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11004 (registers_from_string, register_data): Likewise.
11005 * server.c (handle_query, main): Likewise.
11006 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11007 (decode_M_packet): Likewise.
11008 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11009 * target.h (struct target_ops): Update read_memory, write_memory,
11010 and read_auxv.
11011 (read_inferior_memory, write_inferior_memory): Update.
11012 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11013 to unsigned char *.
11014 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11015 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11016 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11017 linux-s390-low.c, linux-sh-low.c: Update for changes in
11018 read_inferior_memory and the_low_target->breakpoint.
11019
11020 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11021
11022 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11023 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11024 * configure.srv: Add powerpc64-*-linux*.
11025 * linux-ppc64-low.c: New file.
11026
11027 2005-05-23 Orjan Friberg <orjanf@axis.com>
11028
11029 * linux-cris-low.c: New file with support for CRIS.
11030 * linux-crisv32-low.c: Ditto for CRISv32.
11031 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11032 (clean): Add reg-cris.c and reg-crisv32.c.
11033 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11034 reg-crisv32.o, and reg-crisv32.c to make rules.
11035 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11036 recognized targets.
11037
11038 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11039
11040 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11041 of sizeof (PTRACE_XFER_TYPE).
11042 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11043
11044 2005-05-12 Orjan Friberg <orjanf@axis.com>
11045
11046 * target.h (struct target_ops): Add insert_watchpoint,
11047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11048 pointers for hardware watchpoint support.
11049 * linux-low.h (struct linux_target_ops): Ditto.
11050 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11051 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11052 to linux_target_ops.
11053 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11054 reply packet.
11055 * server.c (main): Recognize 'Z' and 'z' packets.
11056
11057 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11058
11059 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11060 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11061 (the_low_target): Add new members.
11062
11063 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11064
11065 * proc-service.c (ps_lgetregs): Search all_processes instead of
11066 all_threads.
11067
11068 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11069
11070 * server.c (start_inferior): Change return type to int.
11071 (attach_inferior): Change sigptr to int *.
11072 (handle_v_cont, handle_v_requests): Change signal to int *.
11073 (main): Change signal to int.
11074
11075 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11076
11077 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11078 * configure.srv: Add m32r*-*-linux*.
11079 * linux-m32r-low.c: New file.
11080
11081 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11082
11083 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11084
11085 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11086
11087 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11088 Take unsigned long arguments for PIDs.
11089 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11090 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11091 (wait_for_sigstop, linux_resume_one_process)
11092 (regsets_fetch_inferior_registers, linux_send_signal)
11093 (linux_read_auxv): Likewise. Update the types of variables holding
11094 PIDs. Update format string specifiers.
11095 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11096 * remote-utils.c (prepare_resume_reply): Likewise.
11097 * server.c (cont_thread, general_thread, step_thread)
11098 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11099 unsigned long.
11100 (handle_query): Update format specifiers.
11101 (handle_v_cont, main): Use strtoul for thread IDs.
11102 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11103 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11104 (general_thread, step_thread, thread_from_wait)
11105 (old_thread_from_wait): Update.
11106 * target.h (struct thread_resume): Use unsigned long for THREAD.
11107 (struct target_ops): Use unsigned long for arguments to attach and
11108 thread_alive.
11109
11110 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11111
11112 * acinclude.m4: Include bfd/bfd.m4 directly.
11113 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11114 <agriffis@toolchain.org>.
11115 * aclocal.m4, configure: Regenerated.
11116
11117 2005-01-07 Andrew Cagney <cagney@gnu.org>
11118
11119 * configure.ac: Rename configure.in, require autoconf 2.59.
11120 * configure: Re-generate.
11121
11122 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11123
11124 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11125 LIBS when finished.
11126 * aclocal.m4: Regenerated.
11127 * configure: Regenerated.
11128
11129 2004-11-21 Andreas Schwab <schwab@suse.de>
11130
11131 * linux-m68k-low.c (m68k_num_gregs): Define.
11132 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11133 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11134 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11135 (m68k_breakpoint_at): New. Add to the_low_target.
11136
11137 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11138 srv_linux_thread_db to yes.
11139
11140 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11141
11142 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11143 (ARCH_SET_FS): Likewise.
11144 (ARCH_GET_FS): Likewise.
11145 (ARCH_GET_GS): Likewise.
11146
11147 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11148
11149 * linux-i386-low.c (ps_get_thread_area): New.
11150 * linux-x86-64-low.c (ps_get_thread_area): New.
11151 * linux-low.c: Include <sys/syscall.h>.
11152 (linux_kill_one_process): Don't kill the first thread here.
11153 (linux_kill): Kill the first thread here.
11154 (kill_lwp): New function.
11155 (send_sigstop, linux_send_signal): Use it.
11156 * proc-service.c: Clean up #ifdefs.
11157 (fpregset_info): Delete.
11158 (ps_lgetregs): Update and enable implementation.
11159 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11160 implementations.
11161 * remote-utils.c (struct sym_cache, symbol_cache): New.
11162 (input_interrupt): Print a clearer message.
11163 (async_io_enabled): New variable.
11164 (enable_async_io, disable_async_io): Use it. Update comments.
11165 (look_up_one_symbol): Use the symbol cache.
11166 * thread-db.c (thread_db_look_up_symbols): New function.
11167 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11168
11169 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11170
11171 * configure.in: Test for -rdynamic.
11172 * configure: Regenerated.
11173 * Makefile (INTERNAL_LDFLAGS): New.
11174 (gdbserver, gdbreplay): Use it.
11175
11176 2004-09-02 Andrew Cagney <cagney@gnu.org>
11177
11178 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11179
11180 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11181
11182 * linux-low.c (linux_wait): Clear all_processes list also.
11183
11184 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11185
11186 * linux-low.c: Include <errno.h>. Remove extern declaration of
11187 errno.
11188
11189 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11190
11191 * gdbreplay.c, server.h, utils.c: Update copyright years.
11192
11193 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11194
11195 * server.c (main): Print child status or termination signal from
11196 variable 'signal', not 'sig'.
11197
11198 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11199
11200 * linux-low.c (linux_read_memory): Change return type to
11201 int. Check for and return error from ptrace().
11202 * target.c (read_inferior_memory): Change return type to int. Pass
11203 back return status from the_target->read_memory().
11204 * target.h (struct target_ops): Adapt *read_memory() prototype.
11205 Update comment.
11206 (read_inferior_memory): Adapt prototype.
11207 * server.c (main): Return an error packet if
11208 read_inferior_memory() returns an error.
11209
11210 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11211
11212 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11213 Unify with other clean targets.
11214
11215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11216
11217 * server.c (handle_v_cont): Call set_desired_inferior.
11218
11219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11220
11221 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11222
11223 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11224
11225 * linux-low.c (linux_wait): Unblock async I/O.
11226 (linux_resume): Block and enable async I/O.
11227 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11228 * server.h (block_async_io, unblock_async_io): Add prototypes.
11229
11230 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11231
11232 * remote-utils.c (remote_open): Print a status notice after
11233 opening a TCP port.
11234 * server.c (attach_inferior): Print a status notice after
11235 attaching.
11236
11237 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11238
11239 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11240
11241 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11242
11243 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11244 error packet.
11245 * server.c, target.h: Update copyright years.
11246
11247 2004-02-25 Roland McGrath <roland@redhat.com>
11248
11249 * target.h (struct target_ops): New member `read_auxv'.
11250 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11251 * linux-low.c (linux_read_auxv): New function.
11252 (linux_target_ops): Initialize `read_auxv' member to that.
11253
11254 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11255
11256 Committed by Jim Blandy <jimb@redhat.com>.
11257
11258 * linux-s390-low.c (s390_num_regs): Update.
11259 (s390_regmap): Remove control registers. Use __s390x__ predefine
11260 instead of GPR_SIZE to distiguish s390 and s390x targets.
11261
11262 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11263
11264 * linux-low.c: Update copyright year.
11265 (check_removed_breakpoint): Clear pending_is_breakpoint.
11266 (linux_set_resume_request, linux_queue_one_thread)
11267 (resume_status_pending_p): New functions.
11268 (linux_continue_one_thread): Use process->resume.
11269 (linux_resume): Only resume threads if there are no pending events.
11270 * linux-low.h (struct process_info): Add resume request
11271 pointer.
11272
11273 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11274
11275 * regcache.c (new_register_cache): Clear the allocated register
11276 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11277
11278 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11279
11280 * linux-low.c (linux_resume): Take a struct thread_resume *
11281 argument.
11282 (linux_wait): Update call.
11283 (resume_ptr): New static variable.
11284 (linux_continue_one_thread): Renamed from
11285 linux_continue_one_process. Use resume_ptr.
11286 (linux_resume): Use linux_continue_one_thread.
11287 * server.c (handle_v_cont, handle_v_requests): New functions.
11288 (myresume): New function.
11289 (main): Handle 'v' case.
11290 * target.h (struct thread_resume): New type.
11291 (struct target_ops): Change argument of "resume" to struct
11292 thread_resume *.
11293 (myresume): Delete macro.
11294
11295 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11296
11297 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11298 (uninstall): Support DESTDIR.
11299
11300 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11301
11302 * configure.srv: Add xscale*linux copy of arm*linux entry.
11303
11304 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11305
11306 * linux-arm-low.c (arm_reinsert_addr): New function.
11307 (the_low_target): Add arm_reinsert_addr.
11308
11309 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11310
11311 * mem-break.c: Remove whitespace at end of file.
11312
11313 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11314
11315 * configure.in: Check whether we need to prototype strerror.
11316 * server.h: Optionally prototype strerror.
11317 * gdbreplay.c (perror_with_name): Use strerror.
11318 * linux-low.c (linux_attach_lwp): Use strerror.
11319 * utils.c (perror_with_name): Use strerror.
11320 * config.in, configure: Regenerated.
11321
11322 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11323
11324 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11325 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11326
11327 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11328
11329 * Makefile.in (SFILES): Update.
11330 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11331 low-sun3.c: Remove files.
11332
11333 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11334
11335 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11336 (linux_detach_one_process, linux_detach): New functions.
11337 (linux_target_ops): Add linux_detach.
11338 * server.c (main): Handle 'D' packet.
11339 * target.h (struct target_ops): Add "detach" member.
11340 (detach_inferior): Define.
11341
11342 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11343
11344 From Kelley Cook <kelleycook@wideopenwest.com>:
11345 * configure.srv: Accept i[34567]86 variants.
11346
11347 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11348
11349 * linux-low.c (linux_wait_for_event): Correct comment typos.
11350 (linux_resume_one_process): Call check_removed_breakpoint.
11351 (linux_send_signal): New function.
11352 (linux_target_ops): Add linux_send_signal.
11353 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11354 of kill.
11355 * target.h (struct target_ops): Add send_signal.
11356
11357 2003-05-29 Jim Blandy <jimb@redhat.com>
11358
11359 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11360 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11361 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11362 away part of the register's value.
11363
11364 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11365
11366 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11367 (linux_wait_for_event, linux_init_signals): Likewise.
11368
11369 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11370
11371 * configure.in: Check for stdlib.h.
11372 * configure: Regenerated.
11373 * config.in: Regenerated.
11374
11375 2003-01-04 Andreas Schwab <schwab@suse.de>
11376
11377 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11378
11379 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11380
11381 * Makefile.in: Remove obsolete code.
11382
11383 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11384
11385 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11386 defined(PT_FPR0_HI).
11387
11388 2002-11-17 Stuart Hughes <seh@zee2.com>
11389
11390 * linux-arm-low.c (arm_num_regs): Increase.
11391 (arm_regmap): Include status register.
11392
11393 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11394
11395 * linux-low.c (register_addr): Remove incorrect -1 check.
11396
11397 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11398
11399 * linux-low.c (linux_create_inferior): Call setpgid. Return
11400 the new PID.
11401 (unstopped_p, linux_signal_pid): Remove.
11402 (linux_target_ops): Remove linux_signal_pid.
11403 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11404 global instead of target method.
11405 * target.h (struct target_ops): Remove signal_pid. Update comment
11406 for create_inferior.
11407 * server.c (signal_pid): New variable.
11408 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11409 gdbserver. Set the child to be the foreground process group.
11410 (attach_inferior): Set signal_pid.
11411
11412 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11413
11414 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11415
11416 2002-08-20 Jim Blandy <jimb@redhat.com>
11417
11418 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11419 default for this.
11420
11421 2002-08-01 Andrew Cagney <cagney@redhat.com>
11422
11423 * Makefile.in: Make chill references obsolete.
11424
11425 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11426
11427 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11428 * configure: Regenerate.
11429 * config.in: Regenerate.
11430
11431 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11432
11433 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11434 (perror_with_name, remote_close, remote_open, expect, play): Static.
11435
11436 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11437
11438 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11439 byte offsets instead of an array of indexes.
11440 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11441
11442 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11443
11444 * regcache.c: Add comment.
11445
11446 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11447
11448 * thread-db.c: New file.
11449 * proc-service.c: New file.
11450 * acinclude.m4: New file.
11451 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11452 proc-service.o, and thread-db.o.
11453 (linux-low.o): Add USE_THREAD_DB.
11454 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11455 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11456 * aclocal.m4: Regenerated.
11457 * config.in: Regenerated.
11458 * configure: Regenerated.
11459 * configure.in: Check for proc_service.h, sys/procfs.h,
11460 thread_db.h, and linux/elf.h headrs.
11461 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11462 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11463 Check for -lthread_db and thread support.
11464 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11465 PowerPC, and SuperH.
11466 * i387-fp.c: Constify arguments.
11467 * i387-fp.h: Likewise.
11468 * inferiors.c: (struct thread_info): Renamed from
11469 `struct inferior_info'. Remove PID member. Use generic inferior
11470 list header. All uses updated.
11471 (inferiors, signal_pid): Removed.
11472 (all_threads): New variable.
11473 (get_thread): Define.
11474 (add_inferior_to_list): New function.
11475 (for_each_inferior): New function.
11476 (change_inferior_id): New function.
11477 (add_inferior): Removed.
11478 (remove_inferior): New function.
11479 (add_thread): New function.
11480 (free_one_thread): New function.
11481 (remove_thread): New function.
11482 (clear_inferiors): Use for_each_inferior and free_one_thread.
11483 (find_inferior): New function.
11484 (find_inferior_id): New function.
11485 (inferior_target_data): Update argument type.
11486 (set_inferior_target_data): Likewise.
11487 (inferior_regcache_data): Likewise.
11488 (set_inferior_regcache_data): Likewise.
11489 * linux-low.c (linux_bp_reinsert): Remove.
11490 (all_processes, stopping_threads, using_thrads)
11491 (struct pending_signals, debug_threads, pid_of): New.
11492 (inferior_pid): Replace with macro.
11493 (struct inferior_linux_data): Remove.
11494 (get_stop_pc, add_process): New functions.
11495 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11496 Use add_process and add_thread.
11497 (linux_attach_lwp): New function, based on old linux_attach. Use
11498 add_process and add_thread. Set stop_expected for new threads.
11499 (linux_attach): New function.
11500 (linux_kill_one_process): New function.
11501 (linux_kill): Kill all LWPs.
11502 (linux_thread_alive): Use find_inferior_id.
11503 (check_removed_breakpoints, status_pending_p): New functions.
11504 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11505 Update. Use WNOHANG. Wait for cloned processes also. Update process
11506 struct for the found process.
11507 (linux_wait_for_event): New function.
11508 (linux_wait): Use it. Support LWPs.
11509 (send_sigstop, wait_for_sigstop, stop_all_processes)
11510 (linux_resume_one_process, linux_continue_one_process): New functions.
11511 (linux_resume): Support LWPs.
11512 (REGISTER_RAW_SIZE): Remove.
11513 (fetch_register): Use register_size instead. Call supply_register.
11514 (usr_store_inferior_registers): Likewise. Call collect_register.
11515 Fix recursive case.
11516 (regsets_fetch_inferior_registers): Improve error message.
11517 (regsets_store_inferior_registers): Add debugging.
11518 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11519 (unstopped_p, linux_signal_pid): New functions.
11520 (linux_target_ops): Add linux_signal_pid.
11521 (linux_init_signals): New function.
11522 (initialize_low): Call it. Initialize using_threads.
11523 * regcache.c (inferior_regcache_data): Add valid
11524 flag.
11525 (get_regcache): Fetch registers lazily. Add fetch argument
11526 and update all callers.
11527 (regcache_invalidate_one, regcache_invalidate): New
11528 functions.
11529 (new_register_cache): Renamed from create_register_cache.
11530 Return the new regcache.
11531 (free_register_cache): Change argument to a void *.
11532 (registers_to_string, registers_from_string): Call get_regcache
11533 with fetch flag set.
11534 (register_data): Make static. Pass fetch flag to get_regcache.
11535 (supply_register): Call get_regcache with fetch flag clear.
11536 (collect_register): Call get_regcache with fetch flag set.
11537 (collect_register_as_string): New function.
11538 * regcache.h: Update.
11539 * remote-utils.c (putpkt): Flush after debug output and use
11540 stderr.
11541 Handle input interrupts while waiting for an ACK.
11542 (input_interrupt): Use signal_pid method.
11543 (getpkt): Flush after debug output and use stderr.
11544 (outreg): Use collect_register_as_string.
11545 (new_thread_notify, dead_thread_notify): New functions.
11546 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11547 and general_thread.
11548 (look_up_one_symbol): Flush after debug output.
11549 * server.c (step_thread, server_waiting): New variables.
11550 (start_inferior): Don't use signal_pid. Update call to mywait.
11551 (attach_inferior): Update call to mywait.
11552 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11553 (main): Don't fetch/store registers explicitly. Use
11554 set_desired_inferior. Support proposed ``Hs'' packet. Update
11555 calls to mywait.
11556 * server.h: Update.
11557 (struct inferior_list, struct_inferior_list_entry): New.
11558 * target.c (set_desired_inferior): New.
11559 (write_inferior_memory): Constify.
11560 (mywait): New function.
11561 * target.h: Update.
11562 (struct target_ops): New signal_pid method.
11563 (mywait): Removed macro, added prototype.
11564
11565 * linux-low.h (regset_func): Removed.
11566 (regset_fill_func, regset_store_func): New.
11567 (enum regset_type): New.
11568 (struct regset_info): Add type field. Use new operation types.
11569 (struct linux_target_ops): stop_pc renamed to get_pc.
11570 Add decr_pc_after_break and breakpoint_at.
11571 (get_process, get_thread_proess, get_process_thread)
11572 (strut process_info, all_processes, linux_attach_lwp)
11573 (thread_db_init): New.
11574
11575 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11576 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11577 (the_low_target): Add new members.
11578 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11579 (i386_store_fpxregset): Constify.
11580 (target_regsets): Add new kind identifier.
11581 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11582 (i386_set_pc): Add debugging.
11583 (i386_breakpoint_at): New function.
11584 (the_low_target): Add new members.
11585 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11586 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11587 (mips_breakpoint_at): New.
11588 (the_low_target): Add new members.
11589 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11590 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11591 (the_low_target): Add new members.
11592 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11593 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11594 (the_low_target): Add new members.
11595 * linux-x86-64-low.c (target_regsets): Add new kind
11596 identifier.
11597
11598 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11599
11600 From Martin Pool <mbp@samba.org>:
11601 * server.c (gdbserver_usage): New function.
11602 (main): Call it.
11603
11604 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11605
11606 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11607 stop_at -> stop_pc.
11608
11609 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11610
11611 * Makefile.in: Remove obsolete code.
11612
11613 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11614
11615 * linux-low.c (regsets_fetch_inferior_registers),
11616 (regsets_store_inferior_registers): Removed cast to int from
11617 ptrace() calls.
11618 * regcache.h: Added declaration of struct inferior_info.
11619
11620 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11621
11622 * inferiors.c (struct inferior_info): Add regcache_data.
11623 (add_inferior): Call create_register_cache.
11624 (clear_inferiors): Call free_register_cache.
11625 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11626 * regcache.c (struct inferior_regcache_data): New.
11627 (registers): Remove.
11628 (get_regcache): New function.
11629 (create_register_cache, free_register_cache): New functions.
11630 (set_register_cache): Don't initialize the register cache here.
11631 (registers_to_string, registers_from_string, register_data): Call
11632 get_regcache.
11633 * regcache.h: Add prototypes.
11634 * server.h: Likewise.
11635
11636 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11637
11638 * mem-break.c: New file.
11639 * mem-break.h: New file.
11640 * Makefile.in: Add mem-break.o rule; update server.h
11641 dependencies.
11642 * inferiors.c (struct inferior_info): Add target_data
11643 member.
11644 (clear_inferiors): Free target_data member if set.
11645 (inferior_target_data, set_inferior_target_data): New functions.
11646 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11647 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11648 * linux-low.c (linux_bp_reinsert): New variable.
11649 (struct inferior_linux_data): New.
11650 (linux_create_inferior): Use set_inferior_target_data.
11651 (linux_attach): Likewise. Call add_inferior.
11652 (linux_wait_for_one_inferior): New function.
11653 (linux_wait): Call it.
11654 (linux_write_memory): Add const.
11655 (initialize_low): Call set_breakpoint_data.
11656 * linux-low.h (struct linux_target_ops): Add breakpoint
11657 handling members.
11658 * server.c (attach_inferior): Remove extra add_inferior
11659 call.
11660 * server.h: Include mem-break.h. Update inferior.c
11661 prototypes.
11662 * target.c (read_inferior_memory)
11663 (write_inferior_memory): New functions.
11664 * target.h (read_inferior_memory)
11665 (write_inferior_memory): Change macros to prototypes.
11666 (struct target_ops): Update comments. Add const to write_memory
11667 definition.
11668
11669 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11670
11671 * linux-low.c (usr_store_inferior_registers): Support
11672 registers which are allowed to fail to store.
11673 * linux-low.h (linux_target_ops): Likewise.
11674 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11675 (ppc_cannot_store_register): FPSCR may not be storable.
11676
11677 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11678
11679 * server.h: Include <string.h> if HAVE_STRING_H.
11680 * ChangeLog: Correct paths in last ChangeLog entry.
11681
11682 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11683
11684 * linux-low.h: Remove obsolete prototypes.
11685 (struct linux_target_ops): New.
11686 (extern the_low_target): New.
11687 * linux-low.c (num_regs, regmap): Remove declarations.
11688 (register_addr): Use the_low_target explicitly.
11689 (fetch_register): Likewise.
11690 (usr_fetch_inferior_registers): Likewise.
11691 (usr_store_inferior_registers): Likewise.
11692 * linux-arm-low.c (num_regs): Remove.
11693 (arm_num_regs): Define.
11694 (arm_regmap): Renamed from regmap, made static.
11695 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11696 made static.
11697 (arm_cannot_store_register): Renamed from cannot_store_register,
11698 made static.
11699 (the_low_target): New.
11700 * linux-i386-low.c (num_regs): Remove.
11701 (i386_num_regs): Define.
11702 (i386_regmap): Renamed from regmap, made static.
11703 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11704 made static.
11705 (i386_cannot_store_register): Renamed from cannot_store_register,
11706 made static.
11707 (the_low_target): New.
11708 * linux-ia64-low.c (num_regs): Remove.
11709 (ia64_num_regs): Define.
11710 (ia64_regmap): Renamed from regmap, made static.
11711 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11712 made static.
11713 (ia64_cannot_store_register): Renamed from cannot_store_register,
11714 made static.
11715 (the_low_target): New.
11716 * linux-m68k-low.c (num_regs): Remove.
11717 (m68k_num_regs): Define.
11718 (m68k_regmap): Renamed from regmap, made static.
11719 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11720 made static.
11721 (m68k_cannot_store_register): Renamed from cannot_store_register,
11722 made static.
11723 (the_low_target): New.
11724 * linux-mips-low.c (num_regs): Remove.
11725 (mips_num_regs): Define.
11726 (mips_regmap): Renamed from regmap, made static.
11727 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11728 made static.
11729 (mips_cannot_store_register): Renamed from cannot_store_register,
11730 made static.
11731 (the_low_target): New.
11732 * linux-ppc-low.c (num_regs): Remove.
11733 (ppc_num_regs): Define.
11734 (ppc_regmap): Renamed from regmap, made static.
11735 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11736 made static.
11737 (ppc_cannot_store_register): Renamed from cannot_store_register,
11738 made static.
11739 (the_low_target): New.
11740 * linux-s390-low.c (num_regs): Remove.
11741 (s390_num_regs): Define.
11742 (s390_regmap): Renamed from regmap, made static.
11743 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11744 made static.
11745 (s390_cannot_store_register): Renamed from cannot_store_register,
11746 made static.
11747 (the_low_target): New.
11748 * linux-sh-low.c (num_regs): Remove.
11749 (sh_num_regs): Define.
11750 (sh_regmap): Renamed from regmap, made static.
11751 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11752 made static.
11753 (sh_cannot_store_register): Renamed from cannot_store_register,
11754 made static.
11755 (the_low_target): New.
11756 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11757 (the_low_target): New.
11758
11759 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11760
11761 * Makefile.in: Add stamp-h target.
11762 * configure.in: Create stamp-h.
11763 * configure: Regenerated.
11764
11765 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11766
11767 * inferiors.c: New file.
11768 * target.c: New file.
11769 * target.h: New file.
11770 * Makefile.in: Add target.o and inferiors.o. Update
11771 dependencies.
11772 * linux-low.c (inferior_pid): New static variable,
11773 moved from server.c.
11774 (linux_create_inferior): Renamed from create_inferior.
11775 Call add_inferior. Return 0 on success instead of a PID.
11776 (linux_attach): Renamed from myattach.
11777 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11778 (linux_thread_alive): Renamed from mythread_alive.
11779 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11780 child dies.
11781 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11782 (regsets_store_inferior_registers): Correct error message.
11783 Add missing ``return 0''.
11784 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11785 (linux_store_registers): Renamed from store_inferior_registers.
11786 (linux_read_memory): Renamed from read_inferior_memory.
11787 (linux_write_memory): Renamed from write_inferior_memory.
11788 (linux_target_ops): New structure.
11789 (initialize_low): Call set_target_ops ().
11790 * remote-utils.c (unhexify): New function.
11791 (hexify): New function.
11792 (input_interrupt): Send signals to ``signal_pid''.
11793 * server.c (inferior_pid): Remove.
11794 (start_inferior): Update create_inferior call.
11795 (attach_inferior): Call add_inferior.
11796 (handle_query): New function.
11797 (main): Call handle_query for `q' packets.
11798 * server.h: Include "target.h". Remove obsolete prototypes.
11799 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11800
11801 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11802
11803 * Makefile.in: Add WARN_CFLAGS. Update configury
11804 dependencies.
11805 * configure.in: Check for <string.h>
11806 * configure: Regenerate.
11807 * config.in: Regenerate.
11808 * gdbreplay.c: Include needed system headers.
11809 (remote_open): Remove strchr prototype.
11810 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11811 * regcache.c (supply_register): Change buf argument to const void *.
11812 (supply_register_by_name): Likewise.
11813 (collect_register): Change buf argument to void *.
11814 (collect_register_by_name): Likewise.
11815 * regcache.h: Add missing prototypes.
11816 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11817 * server.c (handle_query): New function.
11818 (attached): New static variable, moved out of main.
11819 (main): Quiet longjmp clobber warnings.
11820 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11821 * utils.c (error): Remove NORETURN.
11822 (fatal): Likewise.
This page took 0.298729 seconds and 4 git commands to generate.