Nios II R2 support for GDB.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2
3 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4 arch variant.
5 (CDX_BREAKPOINT): Define for R2.
6 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7 (the_low_target): Add comments.
8
9 2015-07-30 Yao Qi <yao.qi@linaro.org>
10
11 * linux-arm-low.c (arm_hwcap): Remove it.
12 (arm_read_description): New local variable arm_hwcap. Don't
13 set arm_hwcap to zero.
14
15 2015-07-30 Yao Qi <yao.qi@linaro.org>
16
17 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
18 Use regcache->tdesc instead.
19 (arm_store_wmmxregset): Likewise.
20 (arm_fill_vfpregset): Likewise.
21 (arm_store_vfpregset): Likewise.
22
23 2015-07-30 Yao Qi <yao.qi@linaro.org>
24
25 * linux-arm-low.c: Include arch/arm.h.
26 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
27 (arm_store_gregset): Likewise.
28
29 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
30
31 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
32 ptrace's 4th parameter.
33
34 2015-07-27 Yao Qi <yao.qi@linaro.org>
35
36 * configure.srv (case aarch64*-*-linux*): Don't set
37 srv_linux_usrregs.
38
39 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
40
41 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
42 sys/ptrace.h.
43 * linux-arm-low.c: Likewise.
44 * linux-cris-low.c: Likewise.
45 * linux-crisv32-low.c: Likewise.
46 * linux-low.c: Likewise.
47 * linux-m68k-low.c: Likewise.
48 * linux-mips-low.c: Likewise.
49 * linux-nios2-low.c: Likewise.
50 * linux-s390-low.c: Likewise.
51 * linux-sparc-low.c: Likewise.
52 * linux-tic6x-low.c: Likewise.
53 * linux-tile-low.c: Likewise.
54 * linux-x86-low.c: Likewise.
55
56 2015-07-24 Pedro Alves <palves@redhat.com>
57
58 * config.in: Regenerate.
59 * configure: Regenerate.
60
61 2015-07-24 Pedro Alves <palves@redhat.com>
62
63 * acinclude.m4: Include ../ptrace.m4.
64 * configure.ac: Call GDB_AC_PTRACE.
65 * config.in, configure: Regenerate.
66
67 2015-07-24 Yao Qi <yao.qi@linaro.org>
68
69 * linux-low.c (linux_create_inferior): Remove setting to
70 proc->priv->new_inferior.
71 (linux_attach): Likewise.
72 (linux_low_filter_event): Likewise.
73 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
74
75 2015-07-24 Yao Qi <yao.qi@linaro.org>
76
77 * linux-low.c (linux_arch_setup): New function.
78 (linux_low_filter_event): If proc->tdesc is NULL and
79 proc->attached is true, call the_low_target.arch_setup.
80 Otherwise, keep status pending, and return.
81 (linux_resume_one_lwp_throw): Don't call get_pc if
82 thread->while_stepping isn't NULL. Don't call
83 get_thread_regcache if proc->tdesc is NULL.
84 (need_step_over_p): Return 0 if proc->tdesc is NULL.
85 (linux_target_ops): Install arch_setup.
86 * server.c (start_inferior): Call the_target->arch_setup.
87 * target.h (struct target_ops) <arch_setup>: New field.
88 (target_arch_setup): New marco.
89 * lynx-low.c (lynx_target_ops): Update.
90 * nto-low.c (nto_target_ops): Update.
91 * spu-low.c (spu_target_ops): Update.
92 * win32-low.c (win32_target_ops): Update.
93
94 2015-07-24 Yao Qi <yao.qi@linaro.org>
95
96 * linux-low.c (linux_add_process): Don't set
97 proc->priv->new_inferior.
98 (linux_create_inferior): Set proc->priv->new_inferior to 1.
99 (linux_attach): Likewise.
100
101 2015-07-24 Yao Qi <yao.qi@linaro.org>
102
103 * server.c (start_inferior): Code refactor.
104
105 2015-07-24 Yao Qi <yao.qi@linaro.org>
106
107 * server.c (process_serial_event): Set general_thread.
108
109 2015-07-21 Yao Qi <yao.qi@linaro.org>
110
111 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
112 aarch64_linux_get_debug_reg_capacity.
113
114 2015-07-17 Yao Qi <yao.qi@linaro.org>
115
116 * Makefile.in (aarch64-linux-hw-point.o): New rule.
117 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
118 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
119 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
120 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
121 (AARCH64_HWP_ALIGNMENT): Likewise.
122 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
123 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
124 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
125 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
126 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
127 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
128 (struct aarch64_debug_reg_state): Likewise.
129 (struct arch_lwp_info): Likewise.
130 (aarch64_align_watchpoint): Likewise.
131 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
132 (aarch64_watchpoint_length): Likewise.
133 (aarch64_point_encode_ctrl_reg): Likewise
134 (aarch64_point_is_aligned): Likewise.
135 (aarch64_align_watchpoint): Likewise.
136 (aarch64_linux_set_debug_regs):
137 (aarch64_dr_state_insert_one_point): Likewise.
138 (aarch64_dr_state_remove_one_point): Likewise.
139 (aarch64_handle_breakpoint): Likewise.
140 (aarch64_handle_aligned_watchpoint): Likewise.
141 (aarch64_handle_unaligned_watchpoint): Likewise.
142 (aarch64_handle_watchpoint): Likewise.
143
144 2015-07-17 Yao Qi <yao.qi@linaro.org>
145
146 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
147 and don't aarch64_get_debug_reg_state. All callers update.
148 (aarch64_handle_aligned_watchpoint): Likewise.
149 (aarch64_handle_unaligned_watchpoint): Likewise.
150 (aarch64_handle_watchpoint): Likewise.
151 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
152 (aarch64_remove_point): Likewise.
153
154 2015-07-17 Yao Qi <yao.qi@linaro.org>
155
156 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
157 debug_printf.
158 (aarch64_handle_unaligned_watchpoint): Likewise.
159
160 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
161
162 Revert the previous 3 commits:
163 Move gdb_regex* to common/
164 Move linux_find_memory_regions_full & co.
165 gdbserver build-id attribute generator
166
167 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
168 Jan Kratochvil <jan.kratochvil@redhat.com>
169
170 gdbserver build-id attribute generator.
171 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
172 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
173 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
174 (find_phdr): New.
175 (get_dynamic): Use find_pdhr to traverse program headers.
176 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
177 (compare_mapping_entry_range, struct find_memory_region_callback_data)
178 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
179 (get_hex_build_id): New.
180 (linux_qxfer_libraries_svr4): Add optional build-id attribute
181 to reply XML document.
182
183 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
184 Jan Kratochvil <jan.kratochvil@redhat.com>
185
186 * target.c: Include target/target-utils.h and fcntl.h.
187 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
188 (target_fileio_read_stralloc): New functions.
189
190 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
191
192 * Makefile.in (OBS): Add gdb_regex.o.
193 (gdb_regex.o): New.
194 * config.in: Rebuilt.
195 * configure: Rebuilt.
196
197 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
198 Jan Kratochvil <jan.kratochvil@redhat.com>
199
200 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
201 * Makefile.in (OBS): Add target-utils.o.
202 (linux-maps.o, target-utils.o): New.
203 * configure.srv (srv_linux_obj): Add linux-maps.o.
204
205 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
206
207 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
208 function, return 1.
209 (the_low_target): Install it.
210
211 2015-07-14 Pedro Alves <palves@redhat.com>
212
213 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
214 Instead, ignore ECHILD, and throw an error for other errnos.
215
216 2015-07-10 Pedro Alves <palves@redhat.com>
217
218 * event-loop.c (struct callback_event) <data>: Change type to
219 gdb_client_data instance instead of gdb_client_data pointer.
220 (append_callback_event): Adjust.
221
222 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
223
224 * linux-aarch64-low.c: Add comments for each linux_target_ops
225 method. Remove comments already covered in target_ops and
226 linux_target_ops definitions.
227 (the_low_target): Add comments for each unimplemented method.
228
229 2015-07-09 Yao Qi <yao.qi@linaro.org>
230
231 * linux-aarch64-low.c (aarch64_regmap): Remove.
232 (aarch64_usrregs_info): Remove.
233 (regs_info): Set field usrregs to NULL.
234
235 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
236
237 * linux-low.c: Include "rsp-low.h"
238 (linux_low_encode_pt_config, linux_low_encode_raw): New.
239 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
240 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
241 (handle_btrace_enable_pt): New.
242 (handle_btrace_general_set): Support "pt".
243 (handle_btrace_conf_general_set): Support "pt:size".
244
245 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
246
247 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
248 Z_PACKET_SW_BP.
249
250 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
251
252 * linux-aarch64-low.c: Remove comment about endianness.
253 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
254 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
255 memcmp.
256
257 2015-06-24 Gary Benson <gbenson@redhat.com>
258
259 * linux-i386-ipa.c (stdint.h): Do not include.
260 * lynx-i386-low.c (stdint.h): Likewise.
261 * lynx-ppc-low.c (stdint.h): Likewise.
262 * mem-break.c (stdint.h): Likewise.
263 * thread-db.c (stdint.h): Likewise.
264 * tracepoint.c (stdint.h): Likewise.
265 * win32-low.c (stdint.h): Likewise.
266
267 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
268
269 * server.c (write_qxfer_response): Update call to
270 remote_escape_output.
271
272 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
273 Jan Kratochvil <jan.kratochvil@redhat.com>
274
275 Merge multiple hex conversions.
276 * gdbreplay.c (tohex): Rename to 'fromhex'.
277 (logchar): Use fromhex.
278
279 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
280
281 * server.c (handle_qxfer_libraries): Set `version' attribute for
282 <library-list>.
283
284 2015-06-10 Gary Benson <gbenson@redhat.com>
285
286 * target.h (struct target_ops) <multifs_open>: New field.
287 <multifs_unlink>: Likewise.
288 <multifs_readlink>: Likewise.
289 * linux-low.c (nat/linux-namespaces.h): New include.
290 (linux_target_ops): Initialize the_target->multifs_open,
291 the_target->multifs_unlink and the_target->multifs_readlink.
292 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
293 * hostio.c (hostio_fs_pid): New static variable.
294 (hostio_handle_new_gdb_connection): New function.
295 (handle_setfs): Likewise.
296 (handle_open): Use the_target->multifs_open as appropriate.
297 (handle_unlink): Use the_target->multifs_unlink as appropriate.
298 (handle_readlink): Use the_target->multifs_readlink as
299 appropriate.
300 (handle_vFile): Handle vFile:setfs packets.
301 * server.c (handle_query): Call hostio_handle_new_gdb_connection
302 after target_handle_new_gdb_connection.
303
304 2015-06-10 Gary Benson <gbenson@redhat.com>
305
306 * configure.ac (AC_CHECK_FUNCS): Add setns.
307 * config.in: Regenerate.
308 * configure: Likewise.
309 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
310 (linux-namespaces.o): New rule.
311 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
312
313 2015-06-09 Gary Benson <gbenson@redhat.com>
314
315 * hostio.c (handle_open): Process mode argument with
316 fileio_to_host_mode.
317
318 2015-06-01 Yao Qi <yao.qi@linaro.org>
319
320 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
321 * linux-x86-low.c: Likewise.
322
323 2015-05-28 Don Breazeal <donb@codesourcery.com>
324
325 * linux-low.c (handle_extended_wait): Initialize
326 thread_info.last_resume_kind for new fork children.
327
328 2015-05-15 Pedro Alves <palves@redhat.com>
329
330 * target.h (target_handle_new_gdb_connection): Rewrite using if
331 wrapped in do/while.
332
333 2015-05-14 Joel Brobecker <brobecker@adacore.com>
334
335 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
336 * configure, config.in: Regenerate.
337 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
338 Declare typedef.
339
340 2015-05-12 Don Breazeal <donb@codesourcery.com>
341
342 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
343 PTRACE_EVENT_VFORK_DONE.
344 (linux_low_ptrace_options, extended_event_reported): Add vfork
345 events.
346 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
347 and "vforkdone" for RSP 'T' Stop Reply Packet.
348 * server.h (report_vfork_events): Declare
349 global variable.
350
351 2015-05-12 Don Breazeal <donb@codesourcery.com>
352
353 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
354 (the_low_target) <new_fork>: Initialize new member.
355 * linux-arm-low.c (arm_new_fork): New function.
356 (the_low_target) <new_fork>: Initialize new member.
357 * linux-low.c (handle_extended_wait): Call new target function
358 new_fork.
359 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
360 * linux-mips-low.c (mips_add_watchpoint): New function
361 extracted from mips_insert_point.
362 (the_low_target) <new_fork>: Initialize new member.
363 (mips_linux_new_fork): New function.
364 (mips_insert_point): Call mips_add_watchpoint.
365 * linux-x86-low.c (x86_linux_new_fork): New function.
366 (the_low_target) <new_fork>: Initialize new member.
367
368 2015-05-12 Don Breazeal <donb@codesourcery.com>
369
370 * linux-low.c (handle_extended_wait): Implement return value,
371 rename argument 'event_child' to 'event_lwp', handle
372 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
373 (linux_low_ptrace_options): New function.
374 (linux_low_filter_event): Call linux_low_ptrace_options,
375 use different argument fo linux_enable_event_reporting,
376 use return value from handle_extended_wait.
377 (extended_event_reported): New function.
378 (linux_wait_1): Call extended_event_reported and set
379 status to report fork events.
380 (linux_write_memory): Add pid to debug message.
381 (reset_lwp_ptrace_options_callback): New function.
382 (linux_handle_new_gdb_connection): New function.
383 (linux_target_ops): Initialize new structure member.
384 * linux-low.h (struct lwp_info) <waitstatus>: New member.
385 * lynx-low.c: Initialize new structure member.
386 * remote-utils.c (prepare_resume_reply): Implement stop reason
387 "fork" for "T" stop message.
388 * server.c (handle_query): Call handle_new_gdb_connection.
389 * server.h (report_fork_events): Declare global flag.
390 * target.h (struct target_ops) <handle_new_gdb_connection>:
391 New member.
392 (target_handle_new_gdb_connection): New macro.
393 * win32-low.c: Initialize new structure member.
394
395 2015-05-12 Don Breazeal <donb@codesourcery.com>
396
397 * mem-break.c (APPEND_TO_LIST): Define macro.
398 (clone_agent_expr): New function.
399 (clone_one_breakpoint): New function.
400 (clone_all_breakpoints): New function.
401 * mem-break.h: Declare new functions.
402
403 2015-05-12 Don Breazeal <donb@codesourcery.com>
404
405 * linux-low.c (linux_supports_fork_events): New function.
406 (linux_supports_vfork_events): New function.
407 (linux_target_ops): Initialize new structure members.
408 (initialize_low): Call linux_check_ptrace_features.
409 * lynx-low.c (lynx_target_ops): Initialize new structure
410 members.
411 * server.c (report_fork_events, report_vfork_events):
412 New global flags.
413 (handle_query): Add new features to qSupported packet and
414 response.
415 (captured_main): Initialize new global variables.
416 * target.h (struct target_ops) <supports_fork_events>:
417 New member.
418 <supports_vfork_events>: New member.
419 (target_supports_fork_events): New macro.
420 (target_supports_vfork_events): New macro.
421 * win32-low.c (win32_target_ops): Initialize new structure
422 members.
423
424 2015-05-12 Gary Benson <gbenson@redhat.com>
425
426 * server.c (handle_qxfer_exec_file): Use current process
427 if annex is empty.
428
429 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
430
431 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
432 Remove HAVE_PTRACE_GETREGS conditionals.
433 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
434 instead of PTRACE_GETREGS and PTRACE_SETREGS.
435
436 2015-05-08 Yao Qi <yao.qi@linaro.org>
437
438 * linux-low.c (linux_supports_conditional_breakpoints): New
439 function.
440 (linux_target_ops): Install new target method.
441 * lynx-low.c (lynx_target_ops): Install NULL hook for
442 supports_conditional_breakpoints.
443 * nto-low.c (nto_target_ops): Likewise.
444 * spu-low.c (spu_target_ops): Likewise.
445 * win32-low.c (win32_target_ops): Likewise.
446 * server.c (handle_query): Check
447 target_supports_conditional_breakpoints.
448 * target.h (struct target_ops) <supports_conditional_breakpoints>:
449 New field.
450 (target_supports_conditional_breakpoints): New macro.
451
452 2015-05-06 Pedro Alves <palves@redhat.com>
453
454 PR server/18081
455 * server.c (start_inferior): If the process exits, mourn it.
456
457 2015-04-21 Gary Benson <gbenson@redhat.com>
458
459 * hostio.c (fileio_open_flags_to_host): Factored out to
460 fileio_to_host_openflags in common/fileio.c. Single use
461 updated.
462
463 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
464
465 * linux-xtensa-low.c (xtensa_fill_gregset)
466 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
467 XCHAL_HAVE_LOOP.
468
469 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
470
471 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
472 (regs_info): Replace usrregs pointer with NULL.
473
474 2015-04-17 Gary Benson <gbenson@redhat.com>
475
476 * target.h (struct target_ops) <pid_to_exec_file>: New field.
477 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
478 * server.c (handle_qxfer_exec_file): New function.
479 (qxfer_packets): Add exec-file entry.
480 (handle_query): Report qXfer:exec-file:read as supported packet.
481
482 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
483
484 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
485
486 2015-04-09 Gary Benson <gbenson@redhat.com>
487
488 * hostio-errno.c (errno_to_fileio_error): Remove function.
489 Update caller to use remote_fileio_to_fio_error.
490
491 2015-04-09 Yao Qi <yao.qi@linaro.org>
492
493 * linux-low.c (linux_insert_point): Call
494 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
495 (linux_remove_point): Call remove_memory_breakpoint if type is
496 raw_bkpt_type_sw.
497 * linux-x86-low.c (x86_insert_point): Don't call
498 insert_memory_breakpoint.
499 (x86_remove_point): Don't call remove_memory_breakpoint.
500
501 2015-04-01 Pedro Alves <palves@redhat.com>
502 Cleber Rosa <crosa@redhat.com>
503
504 * server.c (gdbserver_usage): Reorganize and extend the usage
505 message.
506
507 2015-03-24 Pedro Alves <palves@redhat.com>
508
509 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
510 output. Also dump TRAP_TRACE.
511 (linux_low_filter_event): In debug output, distinguish a
512 resume_stop SIGSTOP from a delayed SIGSTOP.
513
514 2015-03-24 Gary Benson <gbenson@redhat.com>
515
516 * linux-x86-low.c (x86_linux_new_thread): Moved to
517 nat/x86-linux.c.
518 (x86_linux_prepare_to_resume): Likewise.
519
520 2015-03-24 Gary Benson <gbenson@redhat.com>
521
522 * Makefile.in (x86-linux-dregs.o): New rule.
523 * configure.srv: Add x86-linux-dregs.o to relevant targets.
524 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
525 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
526 (x86_linux_dr_get): Likewise.
527 (x86_linux_dr_set): Likewise.
528 (update_debug_registers_callback): Likewise.
529 (x86_linux_dr_set_addr): Likewise.
530 (x86_linux_dr_get_addr): Likewise.
531 (x86_linux_dr_set_control): Likewise.
532 (x86_linux_dr_get_control): Likewise.
533 (x86_linux_dr_get_status): Likewise.
534 (x86_linux_update_debug_registers): Likewise.
535
536 2015-03-24 Gary Benson <gbenson@redhat.com>
537
538 * linux-x86-low.c (x86_linux_update_debug_registers):
539 New function, factored out from...
540 (x86_linux_prepare_to_resume): ...this.
541
542 2015-03-24 Gary Benson <gbenson@redhat.com>
543
544 * linux-x86-low.c (x86_linux_dr_get): Update comments.
545 (x86_linux_dr_set): Likewise.
546 (update_debug_registers_callback): Likewise.
547 (x86_linux_dr_set_addr): Likewise.
548 (x86_linux_dr_get_addr): Likewise.
549 (x86_linux_dr_set_control): Likewise.
550 (x86_linux_dr_get_control): Likewise.
551 (x86_linux_dr_get_status): Likewise.
552 (x86_linux_prepare_to_resume): Likewise.
553
554 2015-03-24 Gary Benson <gbenson@redhat.com>
555
556 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
557 Use perror_with_name. Pass string through gettext.
558 (x86_linux_dr_set): Likewise.
559
560 2015-03-24 Gary Benson <gbenson@redhat.com>
561
562 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
563 (x86_linux_dr_set_addr): ...this.
564 (x86_dr_low_get_addr): Rename to...
565 (x86_linux_dr_get_addr): ...this.
566 (x86_dr_low_set_control): Rename to...
567 (x86_linux_dr_set_control): ...this.
568 (x86_dr_low_get_control): Rename to...
569 (x86_linux_dr_get_control): ...this.
570 (x86_dr_low_get_status): Rename to...
571 (x86_linux_dr_get_status): ...this.
572 (x86_dr_low): Update with new function names.
573
574 2015-03-24 Gary Benson <gbenson@redhat.com>
575
576 * Makefile.in (x86-linux.o): New rule.
577 * configure.srv: Add x86-linux.o to relevant targets.
578 * linux-low.c (lwp_set_arch_private_info): New function.
579 (lwp_arch_private_info): Likewise.
580 * linux-x86-low.c: Include nat/x86-linux.h.
581 (arch_lwp_info): Removed structure.
582 (update_debug_registers_callback):
583 Use lwp_set_debug_registers_changed.
584 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
585 and lwp_set_debug_registers_changed.
586 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
587
588 2015-03-24 Gary Benson <gbenson@redhat.com>
589
590 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
591 * linux-arm-low.c (arm_new_thread): Likewise.
592 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
593 * linux-mips-low.c (mips_linux_new_thread): Likewise.
594 * linux-x86-low.c (x86_linux_new_thread): Likewise.
595 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
596
597 2015-03-24 Gary Benson <gbenson@redhat.com>
598
599 * linux-low.c (ptid_of_lwp): New function.
600 (lwp_is_stopped): Likewise.
601 (lwp_stop_reason): Likewise.
602 * linux-x86-low.c (update_debug_registers_callback):
603 Use lwp_is_stopped.
604 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
605 lwp_stop_reason.
606
607 2015-03-24 Gary Benson <gbenson@redhat.com>
608
609 * linux-low.h (linux_stop_lwp): Remove declaration.
610
611 2015-03-24 Gary Benson <gbenson@redhat.com>
612
613 * linux-low.h: Include nat/linux-nat.h.
614 * linux-low.c (iterate_over_lwps_args): New structure.
615 (iterate_over_lwps_filter): New function.
616 (iterate_over_lwps): Likewise.
617 * linux-x86-low.c (update_debug_registers_callback):
618 Update signature to what iterate_over_lwps expects.
619 Remove PID check that iterate_over_lwps now performs.
620 (x86_dr_low_set_addr): Use iterate_over_lwps.
621 (x86_dr_low_set_control): Likewise.
622
623 2015-03-24 Gary Benson <gbenson@redhat.com>
624
625 * linux-x86-low.c (x86_debug_reg_state): New function.
626 (x86_linux_prepare_to_resume): Use the above.
627
628 2015-03-24 Gary Benson <gbenson@redhat.com>
629
630 * linux-low.c (current_lwp_ptid): New function.
631 * linux-x86-low.c: Include nat/linux-nat.h.
632 (x86_dr_low_get_addr): Use current_lwp_ptid.
633 (x86_dr_low_get_control): Likewise.
634 (x86_dr_low_get_status): Likewise.
635
636 2015-03-20 Pedro Alves <palves@redhat.com>
637
638 * tracepoint.c (cmd_qtstatus): Make "str" const.
639
640 2015-03-20 Pedro Alves <palves@redhat.com>
641
642 * server.c (handle_general_set): Make "req_str" const.
643
644 2015-03-19 Pedro Alves <palves@redhat.com>
645
646 * linux-low.c (linux_resume_one_lwp): Rename to ...
647 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
648 instead call perror_with_name.
649 (check_ptrace_stopped_lwp_gone): New function.
650 (linux_resume_one_lwp): Reimplement as wrapper around
651 linux_resume_one_lwp_throw that swallows errors if the LWP is
652 gone.
653
654 2015-03-19 Pedro Alves <palves@redhat.com>
655
656 * linux-low.c (count_events_callback, select_event_lwp_callback):
657 No longer check whether the thread has resume_stop as last resume
658 kind.
659
660 2015-03-19 Pedro Alves <palves@redhat.com>
661
662 * linux-low.c (count_events_callback, select_event_lwp_callback):
663 Use the lwp's status_pending_p field, not the thread's.
664
665 2015-03-19 Pedro Alves <palves@redhat.com>
666
667 * linux-low.c (select_event_lwp_callback): Update comments to
668 no longer mention SIGTRAP.
669
670 2015-03-18 Gary Benson <gbenson@redhat.com>
671
672 * server.c (handle_query): Do not report vFile:fstat as supported.
673
674 2015-03-11 Gary Benson <gbenson@redhat.com>
675
676 * hostio.c (sys/types.h): New include.
677 (sys/stat.h): Likewise.
678 (common-remote-fileio.h): Likewise.
679 (handle_fstat): New function.
680 (handle_vFile): Handle vFile:fstat packets.
681
682 2015-03-11 Gary Benson <gbenson@redhat.com>
683
684 * configure.ac (AC_CHECK_MEMBERS): Add checks for
685 struct stat.st_blocks and struct stat.st_blksize.
686 * configure: Regenerate.
687 * config.in: Likewise.
688 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
689 (OBS): Add common-remote-fileio.o.
690 (common-remote-fileio.o): New rule.
691
692 2015-03-09 Pedro Alves <palves@redhat.com>
693
694 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
695 'struct sockaddr' pointer in 'accept' call.
696
697 2015-03-09 Pedro Alves <palves@redhat.com>
698
699 Revert:
700 2015-03-07 Pedro Alves <palves@redhat.com>
701 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
702 or <winsock2.h> here. Instead include "gdb_socket.h".
703 (remote_open): Use union gdb_sockaddr_u.
704 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
705 or <winsock2.h> here. Instead include "gdb_socket.h".
706 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
707 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
708 or <sys/un.h>.
709 (init_named_socket, gdb_agent_helper_thread): Use union
710 gdb_sockaddr_u.
711
712 2015-03-07 Pedro Alves <palves@redhat.com>
713
714 * configure.ac (build_warnings): Move
715 -Wdeclaration-after-statement to the C-specific set.
716 * configure: Regenerate.
717
718 2015-03-07 Pedro Alves <palves@redhat.com>
719
720 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
721 or <winsock2.h> here. Instead include "gdb_socket.h".
722 (remote_open): Use union gdb_sockaddr_u.
723 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
724 or <winsock2.h> here. Instead include "gdb_socket.h".
725 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
726 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
727 or <sys/un.h>.
728 (init_named_socket, gdb_agent_helper_thread): Use union
729 gdb_sockaddr_u.
730
731 2015-03-07 Pedro Alves <palves@redhat.com>
732
733 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
734 instead.
735
736 2015-03-06 Yao Qi <yao.qi@linaro.org>
737
738 * linux-aarch64-low.c (aarch64_insert_point): Use
739 show_debug_regs as a boolean.
740 (aarch64_remove_point): Likewise.
741
742 2015-03-05 Pedro Alves <palves@redhat.com>
743
744 * lynx-low.c (lynx_target_ops): Install NULL hooks for
745 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
746 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
747 * nto-low.c (nto_target_ops): Likewise.
748 * spu-low.c (spu_target_ops): Likewise.
749 * win32-low.c (win32_target_ops): Likewise.
750
751 2015-03-04 Pedro Alves <palves@redhat.com>
752
753 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
754 Decide whether a breakpoint triggered based on the SIGTRAP's
755 siginfo.si_code.
756 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
757 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
758 (linux_low_filter_event): Check for breakpoints before checking
759 watchpoints.
760 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
761 siginfo.si_code.
762 (linux_stopped_by_sw_breakpoint)
763 (linux_supports_stopped_by_sw_breakpoint)
764 (linux_stopped_by_hw_breakpoint)
765 (linux_supports_stopped_by_hw_breakpoint): New functions.
766 (linux_target_ops): Install new target methods.
767
768 2015-03-04 Pedro Alves <palves@redhat.com>
769
770 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
771 * server.c (swbreak_feature, hwbreak_feature): New globals.
772 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
773 (captured_main): Clear swbreak_feature and hwbreak_feature.
774 * server.h (swbreak_feature, hwbreak_feature): Declare.
775 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
776 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
777 supports_stopped_by_hw_breakpoint>: New fields.
778 (target_supports_stopped_by_sw_breakpoint)
779 (target_stopped_by_sw_breakpoint)
780 (target_supports_stopped_by_hw_breakpoint)
781 (target_stopped_by_hw_breakpoint): Declare.
782
783 2015-03-04 Pedro Alves <palves@redhat.com>
784
785 enum lwp_stop_reason -> enum target_stop_reason
786 * linux-low.c (check_stopped_by_breakpoint): Adjust.
787 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
788 (linux_wait_1, stuck_in_jump_pad_callback)
789 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
790 (linux_stopped_by_watchpoint):
791 * linux-low.h (enum lwp_stop_reason): Delete.
792 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
793 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
794
795 2015-03-04 Yao Qi <yao.qi@linaro.org>
796
797 * Makefile.in (SFILES): Add linux-aarch64-low.c.
798
799 2015-03-03 Gary Benson <gbenson@redhat.com>
800
801 * hostio.c (handle_vFile): Fix prefix lengths.
802
803 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
804
805 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
806 ptr_bits.
807
808 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
809
810 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
811 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
812 (clean): Add "rm -f" for above C files.
813 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
814 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
815 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
816 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
817 * linux-s390-low.c (HWCAP_S390_VX): New macro.
818 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
819 (init_registers_s390x_vx_linux64)
820 (init_registers_s390x_tevx_linux64)
821 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
822 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
823 declarations.
824 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
825 (s390_store_vxrs_high): New functions.
826 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
827 NT_S390_VXRS_HIGH.
828 (s390_arch_setup): Add logic for selecting one of the new target
829 descriptions. Activate the new vector regsets if applicable.
830 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
831 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
832 and init_registers_s390x_tevx_linux64.
833
834 2015-03-01 Pedro Alves <palves@redhat.com>
835
836 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
837 parameter.
838
839 2015-02-27 Pedro Alves <palves@redhat.com>
840
841 * linux-x86-low.c (u_debugreg_offset): New function.
842 (x86_linux_dr_get, x86_linux_dr_set): Use it.
843
844 2015-02-27 Pedro Alves <palves@redhat.com>
845
846 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
847 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
848 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
849 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
850 (ps_lsetfpregs, ps_getpid)
851 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
852 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
853 (ps_lsetxregs, ps_plog): Declare.
854
855 2015-02-27 Pedro Alves <palves@redhat.com>
856
857 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
858 IP_AGENT_EXPORT_FUNC.
859 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
860 IP_AGENT_EXPORT_FUNC.
861 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
862 (IP_AGENT_EXPORT): Delete.
863 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
864 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
865 (gdb_trampoline_buffer_error, collecting, gdb_collect)
866 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
867 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
868 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
869 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
870 (traceframe_read_count, traceframe_write_count)
871 (traceframes_created, trace_state_variables, get_raw_reg)
872 (get_trace_state_variable_value, set_trace_state_variable_value)
873 (ust_loaded, helper_thread_id, cmd_buf): Use
874 IPA_SYM_EXPORTED_NAME.
875 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
876 (tracepoints) Use IP_AGENT_EXPORT_VAR.
877 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
878 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
879 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
880 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
881 EXTERN_C_PUSH/EXTERN_C_POP.
882 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
883 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
884 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
885 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
886 (traceframe_write_count, traceframe_read_count)
887 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
888 (about_to_request_buffer_space, get_trace_state_variable_value)
889 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
890 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
891 EXTERN_C_PUSH/EXTERN_C_POP.
892 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
893 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
894 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
895 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
896 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
897 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
898 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
899 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
900 Define.
901 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
902 (IP_AGENT_EXPORT_VAR_DECL): Define.
903 (tracing): Declare.
904 (gdb_agent_get_raw_reg): Declare.
905
906 2015-02-27 Tom Tromey <tromey@redhat.com>
907 Pedro Alves <palves@redhat.com>
908
909 Rename symbols whose names are reserved C++ keywords throughout.
910
911 2015-02-27 Pedro Alves <palves@redhat.com>
912
913 * Makefile.in (COMPILER): New, get it from autoconf.
914 (CXX): Get from autoconf instead.
915 (COMPILE.pre): Use COMPILER.
916 (CC-LD): Rename to ...
917 (CC_LD): ... this. Use COMPILER.
918 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
919 (CXX_FOR_TARGET): Default to g++ instead of gcc.
920 * acinclude.m4: Include build-with-cxx.m4.
921 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
922 Disable -Werror by default if building in C++ mode.
923 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
924 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
925 the C++ compiler. Save/restore CXXFLAGS too.
926 * configure: Regenerate.
927
928 2015-02-27 Pedro Alves <palves@redhat.com>
929
930 * acinclude.m4: Include libiberty.m4.
931 * configure.ac: Call libiberty_INIT.
932 * config.in, configure: Regenerate.
933
934 2015-02-26 Pedro Alves <palves@redhat.com>
935
936 * linux-low.c (linux_wait_1): When incrementing the PC past a
937 program breakpoint always use the_low_target.breakpoint_len as
938 increment, rather than the maximum between that and
939 the_low_target.decr_pc_after_break.
940
941 2015-02-23 Pedro Alves <palves@redhat.com>
942
943 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
944 thread was doing a step-over; always adjust the PC if
945 we stepped over a permanent breakpoint.
946 (linux_wait_1): If we stepped over breakpoint that was on top of a
947 permanent breakpoint, manually advance the PC past it.
948
949 2015-02-23 Pedro Alves <palves@redhat.com>
950
951 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
952 modes.
953 (x86_fill_gregset, x86_store_gregset): Use it when handling
954 $orig_eax.
955
956 2015-02-20 Pedro Alves <palves@redhat.com>
957
958 * thread-db.c: Include "nat/linux-procfs.h".
959 (thread_db_init): Skip listing new threads if the kernel supports
960 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
961
962 2015-02-20 Pedro Alves <palves@redhat.com>
963
964 * linux-low.c (status_pending_p_callback): Use ptid_match.
965
966 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
967
968 PR breakpoints/16812
969 * linux-low.c (wstatus_maybe_breakpoint): Remove.
970 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
971 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
972
973 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
974
975 PR breakpoints/15956
976 * tracepoint.c (cmd_qtinit): Add check for current_thread.
977
978 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
979
980 * linux-low.c (linux_low_btrace_conf): Print size.
981 * server.c (handle_btrace_conf_general_set): New.
982 (hanle_general_set): Call handle_btrace_conf_general_set.
983 (handle_query): Report Qbtrace-conf:bts:size as supported.
984
985 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
986
987 * linux-low.c (linux_low_enable_btrace): Update parameters.
988 (linux_low_btrace_conf): New.
989 (linux_target_ops)<to_btrace_conf>: Initialize.
990 * server.c (current_btrace_conf): New.
991 (handle_btrace_enable): Rename to ...
992 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
993 to target_enable_btrace. Update comment. Update users.
994 (handle_qxfer_btrace_conf): New.
995 (qxfer_packets): Add btrace-conf entry.
996 (handle_query): Report qXfer:btrace-conf:read as supported packet.
997 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
998 (target_ops)<read_btrace_conf>: New.
999 (target_enable_btrace): Update parameters.
1000 (target_read_btrace_conf): New.
1001
1002 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1003
1004 * server.c (handle_btrace_general_set): Remove call to
1005 target_supports_btrace.
1006 (supported_btrace_packets): New.
1007 (handle_query): Call supported_btrace_packets.
1008 * target.h: include btrace-common.h.
1009 (btrace_target_info): Removed.
1010 (supports_btrace, target_supports_btrace): Update parameters.
1011
1012 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1013
1014 * Makefile.in (SFILES): Add common/btrace-common.c.
1015 (OBS): Add common/btrace-common.o.
1016 (btrace-common.o): Add build rules.
1017 * linux-low: Include btrace-common.h.
1018 (linux_low_read_btrace): Use struct btrace_data. Call
1019 btrace_data_init and btrace_data_fini.
1020
1021 2015-02-06 Pedro Alves <palves@redhat.com>
1022
1023 * thread-db.c (find_new_threads_callback): Add debug output.
1024
1025 2015-02-04 Pedro Alves <palves@redhat.com>
1026
1027 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1028 (resume_stopped_resumed_lwps): New function.
1029 (linux_wait_for_event_filtered): Use it.
1030
1031 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1032
1033 * Makefile.in (SFILES): Add linux-personality.c.
1034 (linux-personality.o): New rule.
1035 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1036 list of objects to be built.
1037 * linux-low.c: Include nat/linux-personality.h.
1038 (linux_create_inferior): Remove code to disable address space
1039 randomization (moved to ../nat/linux-personality.c). Create
1040 cleanup to disable address space randomization.
1041
1042 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1043
1044 * Makefile.in (posix-strerror.o): New rule.
1045 (mingw-strerror.o): Likewise.
1046 * configure: Regenerated.
1047 * configure.ac: Source file ../common/common.host. Initialize new
1048 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1049
1050 2015-01-14 Yao Qi <yao@codesourcery.com>
1051
1052 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1053 (ppc-linux.o): New rule.
1054 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1055 * configure.ac: AC_CHECK_FUNCS(getauxval).
1056 * config.in: Re-generated.
1057 * configure: Re-generated.
1058 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1059 ppc64_64bit_inferior_p
1060
1061 2015-01-14 Yao Qi <yao@codesourcery.com>
1062
1063 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1064 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1065 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1066 (PT_ORIG_R3, PT_TRAP): Likewise.
1067 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1068 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1069 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1070
1071 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1072
1073 * i387-fp.c (i387_cache_to_xsave): In look over
1074 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1075 zmmh_low_space field by use of zmmh_high_space.
1076
1077 2015-01-09 Pedro Alves <palves@redhat.com>
1078
1079 * linux-low.c (step_over_bkpt): Move higher up in the file.
1080 (handle_extended_wait): Don't store the stop_pc here.
1081 (get_stop_pc): Adjust comments and rename to ...
1082 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1083 stopped for a software breakpoint or hardware breakpoint.
1084 (thread_still_has_status_pending_p): New function.
1085 (status_pending_p_callback): Use
1086 thread_still_has_status_pending_p. If the event is no longer
1087 interesting, resume the LWP.
1088 (handle_tracepoints): Add assert.
1089 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1090 (wstatus_maybe_breakpoint): New function.
1091 (cancel_breakpoint): Delete function.
1092 (check_stopped_by_watchpoint): New function, factored out from
1093 linux_low_filter_event.
1094 (lp_status_maybe_breakpoint): Delete function.
1095 (linux_low_filter_event): Remove filter_ptid argument.
1096 Leave thread group exits pending here. Store the LWP's stop PC.
1097 Always leave events pending.
1098 (linux_wait_for_event_filtered): Pull all events out of the
1099 kernel, and leave them all pending.
1100 (count_events_callback, select_event_lwp_callback): Consider all
1101 events.
1102 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1103 (select_event_lwp): Only give preference to the stepping LWP in
1104 all-stop mode. Adjust comments.
1105 (ignore_event): New function.
1106 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1107 references to cancel_breakpoints. Adjust to renames. Also give
1108 equal priority to all LWPs that have had events in non-stop mode.
1109 If reporting a software breakpoint event, unadjust the LWP's PC.
1110 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1111 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1112 Adjust.
1113 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1114 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1115 (linux_stopped_by_watchpoint): Adjust.
1116 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1117 * linux-low.h (enum lwp_stop_reason): New.
1118 (struct lwp_info) <stop_pc>: Adjust comment.
1119 <stopped_by_watchpoint>: Delete field.
1120 <stop_reason>: New field.
1121 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1122 * mem-break.c (software_breakpoint_inserted_here)
1123 (hardware_breakpoint_inserted_here): New function.
1124 * mem-break.h (software_breakpoint_inserted_here)
1125 (hardware_breakpoint_inserted_here): Declare.
1126 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1127 (cancel_breakpoints): Delete.
1128 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1129 (upload_fast_traceframes): Remove references to
1130 cancel_breakpoints.
1131
1132 2015-01-09 Pedro Alves <palves@redhat.com>
1133
1134 * thread-db.c (find_new_threads_callback): Ignore thread if the
1135 kernel thread ID is -1.
1136
1137 2015-01-09 Pedro Alves <palves@redhat.com>
1138
1139 * linux-low.c (linux_attach_fail_reason_string): Move to
1140 nat/linux-ptrace.c, and rename.
1141 (linux_attach_lwp): Update comment.
1142 (attach_proc_task_lwp_callback): New function.
1143 (linux_attach): Adjust to rename and use
1144 linux_proc_attach_tgid_threads.
1145 (linux_attach_fail_reason_string): Delete declaration.
1146
1147 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1148
1149 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1150 * server.c (gdbserver_version): Likewise.
1151
1152 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1153
1154 * remote-utils.c: Include ctype.h.
1155 (input_interrupt): Explicitly handle the case when the char
1156 received is the NUL byte. Improve the printing of non-ASCII
1157 characters.
1158
1159 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1160
1161 * linux-low.c (linux_low_filter_event): Update call to
1162 linux_enable_event_reporting following the addition of
1163 a new parameter to that function.
1164
1165 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1166
1167 PR server/17457
1168 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1169 (AARCH64_FPCR_REGNO): Likewise.
1170 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1171 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1172 (aarch64_store_fpregset): Likewise.
1173
1174 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1175
1176 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1177 Remove FIXME comment about assumption about N.
1178
1179 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1180
1181 * configure.ac: If large-file support is disabled in GDBserver,
1182 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1183 * configure: Regenerate.
1184
1185 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1186
1187 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1188 warning upon ENODATA from ptrace.
1189 * linux-s390-low.c (s390_store_tdb): New.
1190 (s390_regsets): Add regset for NT_S390_TDB.
1191
1192 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1193
1194 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1195 without a fill_function.
1196 * linux-s390-low.c (s390_fill_last_break): Remove.
1197 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1198 (s390_arch_setup): Use regset's size instead of fill_function for
1199 loop end condition.
1200
1201 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1202
1203 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1204 the regset's store function when ptrace returned an error.
1205 * regcache.c (get_thread_regcache): Invalidate register cache
1206 before fetching inferior's registers.
1207
1208 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1209
1210 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1211 while-loop as for-loop.
1212 (regsets_store_inferior_registers): Likewise.
1213
1214 2014-11-28 Yao Qi <yao@codesourcery.com>
1215
1216 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1217 * config.in, configure: Re-generate.
1218 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1219 is defined.
1220
1221 2014-11-21 Yao Qi <yao@codesourcery.com>
1222
1223 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1224 (AC_CHECK_HEADERS): Remove malloc.h.
1225 * configure: Re-generated.
1226 * config.in: Re-generated.
1227 * server.h: Don't include alloca.h and malloc.h.
1228 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1229 Don't include malloc.h.
1230
1231 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1232
1233 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1234 corresponding ERRNO check in same block.
1235
1236 2014-11-12 Pedro Alves <palves@redhat.com>
1237
1238 * server.c (cont_thread): Update comment.
1239 (start_inferior, attach_inferior): No longer clear cont_thread.
1240 (handle_v_cont): No longer set cont_thread.
1241 (captured_main): Clear cont_thread each time a GDB connects.
1242
1243 2014-11-12 Pedro Alves <palves@redhat.com>
1244
1245 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1246 thread, and don't resume all threads if the Hc thread has exited.
1247
1248 2014-11-12 Pedro Alves <palves@redhat.com>
1249
1250 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1251 the process group instead of to a specific LWP.
1252
1253 2014-10-15 Pedro Alves <palves@redhat.com>
1254
1255 PR server/17487
1256 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1257 parameter.
1258 (arm_set_thread_context): Delete.
1259 (the_low_target): Adjust.
1260 * win32-i386-low.c (debug_registers_changed)
1261 (debug_registers_used): Delete.
1262 (update_debug_registers_callback): New function.
1263 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1264 needing to update their debug registers.
1265 (win32_get_current_dr): New function.
1266 (x86_dr_low_get_addr, x86_dr_low_get_control)
1267 (x86_dr_low_get_status): Fetch the debug register from the thread
1268 record's context.
1269 (i386_initial_stuff): Adjust.
1270 (i386_get_thread_context): Remove current_event parameter. Don't
1271 clear debug_registers_changed nor copy DR values to
1272 debug_reg_state.
1273 (i386_set_thread_context): Delete.
1274 (i386_prepare_to_resume): New function.
1275 (i386_thread_added): Mark the thread as needing to update irs
1276 debug registers.
1277 (the_low_target): Remove i386_set_thread_context and install
1278 i386_prepare_to_resume.
1279 * win32-low.c (win32_get_thread_context): Adjust.
1280 (win32_set_thread_context): Use SetThreadContext
1281 directly.
1282 (win32_prepare_to_resume): New function.
1283 (win32_require_context): New function, factored out from ...
1284 (thread_rec): ... this.
1285 (continue_one_thread): Call win32_prepare_to_resume on each thread
1286 we're about to continue.
1287 (win32_resume): Call win32_prepare_to_resume on the event thread.
1288 * win32-low.h (struct win32_thread_info)
1289 <debug_registers_changed>: New field.
1290 (struct win32_target_ops): Change prototype of set_thread_context,
1291 delete set_thread_context and add prepare_to_resume.
1292 (win32_require_context): New declaration.
1293
1294 2014-10-08 Gary Benson <gbenson@redhat.com>
1295
1296 * server.h: Do not include common-exceptions.h.
1297
1298 2014-10-08 Gary Benson <gbenson@redhat.com>
1299
1300 * server.h: Do not include cleanups.h.
1301
1302 2014-09-30 James Hogan <james.hogan@imgtec.com>
1303
1304 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1305 mips64-dsp-linux.c.
1306
1307 2014-09-23 Yao Qi <yao@codesourcery.com>
1308
1309 * linux-low.c (lp_status_maybe_breakpoint): New function.
1310 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1311 (count_events_callback): Likewise.
1312 (select_event_lwp_callback): Likewise.
1313 (cancel_breakpoints_callback): Likewise.
1314
1315 2014-09-19 Don Breazeal <donb@codesourcery.com>
1316
1317 * linux-low.c (handle_extended_wait): Call
1318 linux_ptrace_get_extended_event.
1319 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1320 linux_is_extended_waitstatus.
1321
1322 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1323
1324 * Makefile.in (CPPFLAGS): Define.
1325 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1326 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1327
1328 2014-09-16 Gary Benson <gbenson@redhat.com>
1329
1330 * inferiors.h (current_inferior): Renamed as...
1331 (current_thread): New variable. All uses updated.
1332 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1333 (maybe_move_out_of_jump_pad): Likewise.
1334 (cancel_breakpoint): Likewise.
1335 (linux_low_filter_event): Likewise.
1336 (wait_for_sigstop): Likewise.
1337 (linux_resume_one_lwp): Likewise.
1338 (need_step_over_p): Likewise.
1339 (start_step_over): Likewise.
1340 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1341 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1342 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1343 and save_inferior as saved_thread.
1344 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1345 saved_thread.
1346 (regcache_invalidate_thread): Likewise.
1347 * remote-utils.c (prepare_resume_reply): Likewise.
1348 * thread-db.c (thread_db_get_tls_address): Likewise.
1349 (disable_thread_event_reporting): Likewise.
1350 (remove_thread_event_breakpoints): Likewise.
1351 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1352 as saved_thread.
1353 * target.h (set_desired_inferior): Renamed as...
1354 (set_desired_thread): New declaration. All uses updated.
1355 * server.c (myresume): Updated comment to reference thread instead
1356 of inferior.
1357 (handle_serial_event): Likewise.
1358 (handle_target_event): Likewise.
1359
1360 2014-09-12 Tom Tromey <tromey@redhat.com>
1361 Gary Benson <gbenson@redhat.com>
1362
1363 * regcache.h: Include common-regcache.h.
1364 (regcache_read_pc): Don't declare.
1365 * regcache.c (get_thread_regcache_for_ptid): New function.
1366
1367 2014-09-11 Tom Tromey <tromey@redhat.com>
1368 Gary Benson <gbenson@redhat.com>
1369
1370 * symbol.c: New file.
1371 * Makefile.in (SFILES): Add symbol.c.
1372 (OBS): Add symbol.o.
1373
1374 2014-09-11 Gary Benson <gbenson@redhat.com>
1375
1376 * target.c (target_stop_ptid, target_continue_ptid): New
1377 functions.
1378
1379 2014-09-11 Tom Tromey <tromey@redhat.com>
1380 Gary Benson <gbenson@redhat.com>
1381
1382 * target.h: Include target/target.h.
1383 * target.c (target_read_memory, target_read_uint32)
1384 (target_write_memory): New functions.
1385
1386 2014-09-11 Gary Benson <gbenson@redhat.com>
1387
1388 * server.h (debug_hw_points): Don't declare.
1389 * server.c (debug_hw_points): Don't define. Replace all uses
1390 with show_debug_regs.
1391 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1392 all uses with show_debug_regs.
1393
1394 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1395
1396 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1397 endianness into account.
1398 (ppc_supply_ptrace_register): Likewise.
1399
1400 2014-09-03 James Hogan <james.hogan@imgtec.com>
1401
1402 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1403 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1404
1405 2014-09-03 Gary Benson <gbenson@redhat.com>
1406
1407 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1408 ALL_DEBUG_ADDRESS_REGISTERS.
1409
1410 2014-09-02 Gary Benson <gbenson@redhat.com>
1411
1412 * i386-low.h: Renamed as...
1413 * x86-low.h: New file. All type, function and variable name
1414 prefixes changed from "i386_" to "x86_". All references updated.
1415 * i386-low.c: Renamed as...
1416 * x86-low.c: New file. All type, function and variable name
1417 prefixes changed from "i386_" to "x86_". All references updated.
1418
1419 2014-09-02 Gary Benson <gbenson@redhat.com>
1420
1421 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1422 (x86_linux_new_thread): Likewise.
1423
1424 2014-08-29 Gary Benson <gbenson@redhat.com>
1425
1426 * server.h (setjmp.h): Do not include.
1427 (toplevel): Do not declare.
1428 (common-exceptions.h): Include.
1429 (cleanups.h): Likewise.
1430 * server.c (toplevel): Do not define.
1431 (exit_code): New static global.
1432 (detach_or_kill_for_exit_cleanup): New function.
1433 (main): New function. Original main renamed to...
1434 (captured_main): New function.
1435 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1436
1437 2014-08-29 Gary Benson <gbenson@redhat.com>
1438
1439 * Makefile.in (SFILES): Add common/common-exceptions.c.
1440 (OBS): Add common-exceptions.o.
1441 (common-exceptions.o): New rule.
1442 * utils.c (prepare_to_throw_exception): New function.
1443
1444 2014-08-29 Gary Benson <gbenson@redhat.com>
1445
1446 * config.in: Regenerate.
1447 * configure: Likewise.
1448
1449 2014-08-29 Gary Benson <gbenson@redhat.com>
1450
1451 * Makefile.in (SFILES): Add common/cleanups.c.
1452 (OBS): cleanups.o.
1453 (cleanups.o): New rule.
1454
1455 2014-08-29 Gary Benson <gbenson@redhat.com>
1456
1457 * utils.c (internal_vwarning): New function.
1458
1459 2014-08-28 Gary Benson <gbenson@redhat.com>
1460
1461 * utils.h (fatal): Remove declaration.
1462 * utils.c (fatal): Remove function.
1463
1464 2014-08-28 Gary Benson <gbenson@redhat.com>
1465
1466 * tracepoint.c (gdb_agent_init): Replace fatal with
1467 perror_with_name.
1468 (initialize_tracepoint): Likewise.
1469
1470 2014-08-28 Gary Benson <gbenson@redhat.com>
1471
1472 * remote-utils.c (remote_prepare): Replace fatal with error.
1473
1474 2014-08-28 Gary Benson <gbenson@redhat.com>
1475
1476 * linux-low.c (linux_async): Replace fatal with warning.
1477 Tidy up and return.
1478 (linux_start_non_stop): Return -1 if linux_async failed.
1479
1480 2014-08-28 Gary Benson <gbenson@redhat.com>
1481
1482 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1483 gdb_assert.
1484 (i386_dr_low_get_addr): Remove vague comment.
1485 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1486 gdb_assert.
1487
1488 2014-08-28 Gary Benson <gbenson@redhat.com>
1489
1490 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1491 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1492 internal_error.
1493 (linux_resume_one_lwp): Likewise.
1494 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1495 gdb_assert.
1496 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1497 with internal_error.
1498 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1499 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1500 (find_register_by_name): Replace fatal with internal_error.
1501 (find_regno): Likewise.
1502 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1503 * thread-db.c (thread_db_create_event): Likewise.
1504 (thread_db_load_search): Likewise.
1505 (try_thread_db_load_1): Likewise.
1506 * tracepoint.c (get_jump_space_head): Replace fatal with
1507 internal_error.
1508 (claim_trampoline_space): Likewise.
1509 (have_fast_tracepoint_trampoline_buffer): Likewise.
1510 (cmd_qtstart): Likewise.
1511 (stop_tracing): Likewise.
1512 (fast_tracepoint_collecting): Likewise.
1513 (target_malloc): Likewise.
1514 (download_tracepoint): Likewise.
1515 (download_trace_state_variables): Replace check with gdb_assert.
1516 (upload_fast_traceframes): Replace fatal with internal_error.
1517
1518 2014-08-19 Tom Tromey <tromey@redhat.com>
1519 Gary Benson <gbenson@redhat.com>
1520
1521 * Makefile.in (SFILES): Add common/common-debug.c.
1522 (OBS): Add common-debug.o.
1523 (common-debug.o): New rule.
1524 * debug.h (debug_printf): Don't declare.
1525 * debug.c (debug_printf): Renamed and rewritten as...
1526 (debug_vprintf): New function.
1527
1528 2014-08-19 Gary Benson <gbenson@redhat.com>
1529
1530 * utils.h: Do not include print-utils.h.
1531
1532 2014-08-19 Tom Tromey <tromey@redhat.com>
1533 Gary Benson <gbenson@redhat.com>
1534
1535 * server.h: Add static assertion.
1536 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1537
1538 2014-08-19 Tom Tromey <tromey@redhat.com>
1539 Gary Benson <gbenson@redhat.com>
1540
1541 * Makefile.in (SFILES): Add common/errors.c.
1542 (OBS): Add errors.o.
1543 (IPA_OBS): Add errors-ipa.o.
1544 (errors.o): New rule.
1545 (errors-ipa.o): Likewise.
1546 * utils.h (perror_with_name, error, warning): Don't declare.
1547 * utils.c (warning): Renamed and rewritten as...
1548 (vwarning): New function.
1549 (error): Renamed and rewritten as...
1550 (verror): New function.
1551 (internal_error): Renamed and rewritten as...
1552 (internal_verror): New function.
1553
1554 2014-08-07 Gary Benson <gbenson@redhat.com>
1555
1556 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1557 * configure: Regenerate.
1558 * config.in: Likewise.
1559 * server.h: Do not include errno.h.
1560 * event-loop.c: Likewise.
1561 * hostio-errno.c: Likewise.
1562 * linux-low.c: Likewise.
1563 * remote-utils.c: Likewise.
1564 * spu-low.c: Likewise.
1565 * utils.c: Likewise.
1566 * gdbreplay.c: Unconditionally include errno.h.
1567
1568 2014-08-07 Gary Benson <gbenson@redhat.com>
1569
1570 * server.h: Do not include string.h.
1571 * event-loop.c: Likewise.
1572 * linux-low.c: Likewise.
1573 * regcache.c: Likewise.
1574 * remote-utils.c: Likewise.
1575 * spu-low.c: Likewise.
1576 * utils.c: Likewise.
1577
1578 2014-08-07 Gary Benson <gbenson@redhat.com>
1579
1580 * server.h: Do not include gdb_assert.h.
1581
1582 2014-08-07 Gary Benson <gbenson@redhat.com>
1583
1584 * server.h: Do not include common-utils.h.
1585
1586 2014-08-07 Gary Benson <gbenson@redhat.com>
1587
1588 * server.h: Do not include ptid.h.
1589 * notif.h: Likewise.
1590
1591 2014-08-07 Gary Benson <gbenson@redhat.com>
1592
1593 * server.h: Do not include gdb_locale.h.
1594
1595 2014-08-07 Gary Benson <gbenson@redhat.com>
1596
1597 * server.h: Do not include gdb/signals.h.
1598 * win32-low.c: Likewise.
1599
1600 2014-08-07 Gary Benson <gbenson@redhat.com>
1601
1602 * server.h: Do not include pathmax.h.
1603
1604 2014-08-07 Gary Benson <gbenson@redhat.com>
1605
1606 * server.h: Do not include libiberty.h.
1607 * linux-bfin-low.c: Likewise.
1608
1609 2014-08-07 Gary Benson <gbenson@redhat.com>
1610
1611 * server.h: Do not include ansidecl.h.
1612
1613 2014-08-07 Gary Benson <gbenson@redhat.com>
1614
1615 * linux-x86-low.c: Do not include stddef.h.
1616 * lynx-ppc-low.c: Likewise.
1617 * tracepoint.c: Likewise.
1618
1619 2014-08-07 Gary Benson <gbenson@redhat.com>
1620
1621 * server.h: Do not include stdarg.h.
1622 * nto-low.c: Likewise.
1623
1624 2014-08-07 Gary Benson <gbenson@redhat.com>
1625
1626 * server.h: Do not include stdlib.h.
1627 * inferiors.c: Likewise.
1628 * linux-low.c: Likewise.
1629 * regcache.c: Likewise.
1630 * spu-low.c: Likewise.
1631 * tracepoint.c: Likewise.
1632 * utils.c: Likewise.
1633
1634 2014-08-07 Gary Benson <gbenson@redhat.com>
1635
1636 * server.h: Do not include stdio.h.
1637 * linux-low.c: Likewise.
1638 * remote-utils.c: Likewise.
1639 * spu-low.c: Likewise.
1640 * utils.c: Likewise.
1641 * wincecompat.c: Likewise.
1642
1643 2014-08-06 Gary Benson <gbenson@redhat.com>
1644
1645 * regcache.c (init_register_cache): Move conditionals inside if.
1646
1647 2014-08-06 Gary Benson <gbenson@redhat.com>
1648
1649 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1650
1651 2014-07-31 Gary Benson <gbenson@redhat.com>
1652
1653 * ax.h: Do not include server.h.
1654 * gdbthread.h: Likewise.
1655 * lynx-low.h: Likewise.
1656 * notif.h: Likewise.
1657
1658 2014-07-30 Gary Benson <gbenson@redhat.com>
1659
1660 * server.h: Include common-defs.h.
1661 Do not include config.h or build-gnulib-gdbserver/config.h.
1662
1663 2014-07-30 Gary Benson <gbenson@redhat.com>
1664
1665 * hostio-errno.c: Move server.h to top of includes list.
1666 * inferiors.c: Likewise.
1667 * linux-x86-low.c: Likewise.
1668 * notif.c: Include server.h.
1669
1670 2014-07-24 Tom Tromey <tromey@redhat.com>
1671 Gary Benson <gbenson@redhat.com>
1672
1673 * server.h (CORE_ADDR): Now unsigned.
1674
1675 2014-07-16 Pedro Alves <palves@redhat.com>
1676
1677 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1678
1679 2014-07-15 Pedro Alves <palves@redhat.com>
1680
1681 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1682 copy.
1683
1684 2014-07-11 Pedro Alves <palves@redhat.com>
1685
1686 * linux-low.c (kill_wait_lwp): New function, based on
1687 kill_one_lwp_callback, but use my_waitpid directly.
1688 (kill_one_lwp_callback, linux_kill): Use it.
1689
1690 2014-06-23 Pedro Alves <palves@redhat.com>
1691
1692 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1693 before setting DR0..DR3.
1694
1695 2014-06-20 Gary Benson <gbenson@redhat.com>
1696
1697 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1698 * configure: Regenerated.
1699 * config.in: Likewise.
1700
1701 2014-06-20 Gary Benson <gbenson@redhat.com>
1702
1703 * Makefile.in (SFILES): Update locations for files moved
1704 from common to nat.
1705 (object file files): Reordered.
1706
1707 2014-06-20 Gary Benson <gbenson@redhat.com>
1708
1709 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1710 (i386_dr_low_set_addr): Likewise.
1711 (i386_dr_low_get_addr): Likewise.
1712 (i386_dr_low_can_set_control): Likewise.
1713 (i386_dr_low_set_control): Likewise.
1714 (i386_dr_low_get_control): Likewise.
1715 (i386_dr_low_get_status): Likewise.
1716 (i386_get_debug_register_length): Likewise.
1717 * linux-x86-low.c (i386_dr_low_set_addr):
1718 Changed signature. Made static.
1719 (i386_dr_low_get_addr): Likewise.
1720 (i386_dr_low_set_control): Likewise.
1721 (i386_dr_low_get_control): Likewise.
1722 (i386_dr_low_get_status): Likewise.
1723 (i386_dr_low): New global variable.
1724 * win32-i386-low.c (i386_dr_low_set_addr):
1725 Changed signature. Made static.
1726 (i386_dr_low_get_addr): Likewise.
1727 (i386_dr_low_set_control): Likewise.
1728 (i386_dr_low_get_control): Likewise.
1729 (i386_dr_low_get_status): Likewise.
1730 (i386_dr_low): New global variable.
1731
1732 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1733
1734 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1735 * Makefile.in (AR, AR_FLAGS): Define.
1736 * configure: Regenerate.
1737
1738 2014-06-19 Gary Benson <gbenson@redhat.com>
1739
1740 * Makefile.in (i386-dregs.o): New rule.
1741 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1742 * i386-low.c (target.h): Remove include.
1743 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1744 (DR_CONTROL_SHIFT): Likewise.
1745 (DR_CONTROL_SIZE): Likewise.
1746 (DR_RW_EXECUTE): Likewise.
1747 (DR_RW_WRITE): Likewise.
1748 (DR_RW_READ): Likewise.
1749 (DR_RW_IORW): Likewise.
1750 (DR_LEN_1): Likewise.
1751 (DR_LEN_2): Likewise.
1752 (DR_LEN_4): Likewise.
1753 (DR_LEN_8): Likewise.
1754 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1755 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1756 (DR_ENABLE_SIZE): Likewise.
1757 (DR_LOCAL_SLOWDOWN): Likewise.
1758 (DR_GLOBAL_SLOWDOWN): Likewise.
1759 (DR_CONTROL_RESERVED): Likewise.
1760 (I386_DR_CONTROL_MASK): Likewise.
1761 (I386_DR_VACANT): Likewise.
1762 (I386_DR_LOCAL_ENABLE): Likewise.
1763 (I386_DR_GLOBAL_ENABLE): Likewise.
1764 (I386_DR_DISABLE): Likewise.
1765 (I386_DR_SET_RW_LEN): Likewise.
1766 (I386_DR_GET_RW_LEN): Likewise.
1767 (I386_DR_WATCH_HIT): Likewise.
1768 (i386_wp_op_t): Likewise.
1769 (i386_show_dr): Likewise.
1770 (i386_length_and_rw_bits): Likewise.
1771 (i386_insert_aligned_watchpoint): Likewise.
1772 (i386_remove_aligned_watchpoint): Likewise.
1773 (i386_handle_nonaligned_watchpoint): Likewise.
1774 i386_update_inferior_debug_regs(): Likewise.
1775 (i386_dr_insert_watchpoint): Likewise.
1776 (i386_dr_remove_watchpoint): Likewise.
1777 (i386_dr_region_ok_for_watchpoint): Likewise.
1778 (i386_dr_stopped_data_address): Likewise.
1779 (i386_dr_stopped_by_watchpoint): Likewise.
1780
1781 2014-06-19 Gary Benson <gbenson@redhat.com>
1782
1783 * i386-low.c (i386_dr_show): Renamed to
1784 i386_show_dr and made static. All uses updated.
1785 (i386_dr_length_and_rw_bits): Renamed to
1786 i386_length_and_rw_bits and made static.
1787 All uses updated.
1788 (i386_dr_insert_aligned_watchpoint): Renamed to
1789 i386_insert_aligned_watchpoint and made static.
1790 All uses updated.
1791 (i386_dr_remove_aligned_watchpoint): Renamed to
1792 i386_remove_aligned_watchpoint and made static.
1793 All uses updated.
1794 (i386_dr_update_inferior_debug_regs): Renamed to
1795 i386_update_inferior_debug_regs and made static.
1796 All uses updated.
1797
1798 2014-06-18 Gary Benson <gbenson@redhat.com>
1799
1800 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1801 (i386_dr_low_can_set_control): Likewise.
1802 (i386_get_debug_register_length): Likewise.
1803 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1804 (i386_dr_low_can_set_control): Likewise.
1805 (i386_get_debug_register_length): Likewise.
1806
1807 2014-06-17 Gary Benson <gbenson@redhat.com>
1808
1809 * i386-low.h (i386-dregs.h): New include.
1810 (DR_FIRSTADDR): Now in i386-dregs.h.
1811 (DR_LASTADDR): Likewise.
1812 (DR_NADDR): Likewise.
1813 (DR_STATUS): Likewise.
1814 (DR_CONTROL): Likewise.
1815 (i386_debug_reg_state): Likewise.
1816 (i386_dr_insert_watchpoint): Likewise.
1817 (i386_dr_remove_watchpoint): Likewise.
1818 (i386_dr_region_ok_for_watchpoint): Likewise.
1819 (i386_dr_stopped_data_address): Likewise.
1820 (i386_dr_stopped_by_watchpoint): Likewise.
1821 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1822
1823 2014-06-18 Gary Benson <gbenson@redhat.com>
1824
1825 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1826 i386_dr_insert_watchpoint.
1827 (i386_low_remove_watchpoint): Renamed to
1828 i386_dr_remove_watchpoint.
1829 (i386_low_region_ok_for_watchpoint): Renamed to
1830 i386_dr_region_ok_for_watchpoint.
1831 (i386_low_stopped_data_address): Renamed to
1832 i386_dr_stopped_data_address.
1833 (i386_low_stopped_by_watchpoint): Renamed to
1834 i386_dr_stopped_by_watchpoint.
1835 * i386-low.c (i386_show_dr): Renamed to
1836 i386_dr_show and made nonstatic. All uses updated.
1837 (i386_length_and_rw_bits): Renamed to
1838 i386_dr_length_and_rw_bits and made nonstatic.
1839 All uses updated.
1840 (i386_insert_aligned_watchpoint): Renamed to
1841 i386_dr_insert_aligned_watchpoint and made nonstatic.
1842 All uses updated.
1843 (i386_remove_aligned_watchpoint): Renamed to
1844 i386_dr_remove_aligned_watchpoint and made nonstatic.
1845 All uses updated.
1846 (i386_update_inferior_debug_regs): Renamed to
1847 i386_dr_update_inferior_debug_regs and made nonstatic.
1848 All uses updated.
1849 (i386_low_insert_watchpoint): Renamed to
1850 i386_dr_insert_watchpoint. All uses updated.
1851 (i386_low_remove_watchpoint): Renamed to
1852 i386_dr_remove_watchpoint. All uses updated.
1853 (i386_low_region_ok_for_watchpoint): Renamed to
1854 i386_dr_region_ok_for_watchpoint. All uses updated.
1855 (i386_low_stopped_data_address): Renamed to
1856 i386_dr_stopped_data_address. All uses updated.
1857 (i386_low_stopped_by_watchpoint): Renamed to
1858 i386_dr_stopped_by_watchpoint. All uses updated.
1859
1860 2014-06-18 Gary Benson <gbenson@redhat.com>
1861
1862 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1863 (i386_dr_low_can_set_control): Likewise.
1864 (i386_insert_aligned_watchpoint): New check.
1865
1866 2014-06-18 Gary Benson <gbenson@redhat.com>
1867
1868 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1869 Renamed to state.
1870
1871 2014-06-18 Gary Benson <gbenson@redhat.com>
1872
1873 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1874 instead of fatal and error.
1875 (i386_handle_nonaligned_watchpoint): Likewise.
1876
1877 2014-06-18 Gary Benson <gbenson@redhat.com>
1878
1879 * i386-low.c (i386_get_debug_register_length): New macro.
1880 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1881 (i386_show_dr): Use debug_printf instead of fprintf. Use
1882 phex to format values.
1883
1884 2014-06-18 Gary Benson <gbenson@redhat.com>
1885
1886 * i386-low.h: Comment changes.
1887 * i386-low.c: Likewise.
1888
1889 2014-06-18 Gary Benson <gbenson@redhat.com>
1890
1891 * i386-low.c: Whitespace changes.
1892
1893 2014-06-12 Tom Tromey <tromey@redhat.com>
1894
1895 * utils.c (freeargv): Remove.
1896
1897 2014-06-12 Tom Tromey <tromey@redhat.com>
1898
1899 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1900 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1901 (parse_debug_format_options): Likewise.
1902 (gdbserver_usage): Likewise.
1903 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1904 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1905 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1906 against libiberty.
1907 ($(LIBGNU)): Depend on libiberty.
1908 (all-lib): Recurse into all subdirs.
1909 (install-only): Invoke "install" target in subdirs.
1910 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1911 targets.
1912 * configure: Rebuild.
1913 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1914 for vasprintf, vsnprintf, or gettimeofday.
1915 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1916 srv_tgtobj.
1917
1918 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1919
1920 * development.sh: Delete.
1921 * Makefile.in (config.status): Adjust dependency on development.sh.
1922 * configure.ac: Adjust development.sh source call.
1923 * configure: Regenerate.
1924
1925 2014-06-02 Pedro Alves <palves@redhat.com>
1926
1927 * ax.c (gdb_free_agent_expr): New function.
1928 * ax.h (gdb_free_agent_expr): New declaration.
1929 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1930 list.
1931 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1932 static.
1933 (clear_breakpoint_conditions_and_commands): New function.
1934 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1935 (clear_breakpoint_conditions_and_commands): New declaration.
1936
1937 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1938
1939 * linux-aarch64-low.c (asm/ptrace.h): Include.
1940
1941 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1942
1943 Fix TLS access for -static -pthread.
1944 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1945 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1946 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1947
1948 2014-05-20 Pedro Alves <palves@redhat.com>
1949
1950 * linux-aarch64-low.c (aarch64_insert_point)
1951 (aarch64_remove_point): No longer check whether the type is
1952 supported here. Adjust to new interface.
1953 (the_low_target): Install aarch64_supports_z_point_type as
1954 supports_z_point_type method.
1955 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1956 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1957 instead of a Z packet char. Adjust.
1958 (arm_supports_z_point_type): New function.
1959 (arm_insert_point, arm_remove_point): Adjust to new interface.
1960 (the_low_target): Install arm_supports_z_point_type.
1961 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1962 (cris_insert_point, cris_remove_point): Adjust to new interface.
1963 Don't check whether the type is supported here.
1964 (the_low_target): Install cris_supports_z_point_type.
1965 * linux-low.c (linux_supports_z_point_type): New function.
1966 (linux_insert_point, linux_remove_point): Adjust to new interface.
1967 * linux-low.h (struct linux_target_ops) <insert_point,
1968 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1969 raw_breakpoint pointer parameter.
1970 <supports_z_point_type>: New method.
1971 * linux-mips-low.c (mips_supports_z_point_type): New function.
1972 (mips_insert_point, mips_remove_point): Adjust to new interface.
1973 Use mips_supports_z_point_type.
1974 (the_low_target): Install mips_supports_z_point_type.
1975 * linux-ppc-low.c (the_low_target): Install NULL as
1976 supports_z_point_type method.
1977 * linux-s390-low.c (the_low_target): Install NULL as
1978 supports_z_point_type method.
1979 * linux-sparc-low.c (the_low_target): Install NULL as
1980 supports_z_point_type method.
1981 * linux-x86-low.c (x86_supports_z_point_type): New function.
1982 (x86_insert_point): Adjust to new insert_point interface. Use
1983 insert_memory_breakpoint. Adjust to new
1984 i386_low_insert_watchpoint interface.
1985 (x86_remove_point): Adjust to remove_point interface. Use
1986 remove_memory_breakpoint. Adjust to new
1987 i386_low_remove_watchpoint interface.
1988 (the_low_target): Install x86_supports_z_point_type.
1989 * lynx-low.c (lynx_target_ops): Install NULL as
1990 supports_z_point_type callback.
1991 * nto-low.c (nto_supports_z_point_type): New.
1992 (nto_insert_point, nto_remove_point): Adjust to new interface.
1993 (nto_target_ops): Install nto_supports_z_point_type.
1994 * mem-break.c: Adjust intro comment.
1995 (struct raw_breakpoint) <raw_type, size>: New fields.
1996 <inserted>: Update comment.
1997 <shlib_disabled>: Delete field.
1998 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1999 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2000 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2001 (raw_bkpt_type_to_target_hw_bp_type): New function.
2002 (find_enabled_raw_code_breakpoint_at): New function.
2003 (find_raw_breakpoint_at): New type and size parameters. Use them.
2004 (insert_memory_breakpoint): New function, based off
2005 set_raw_breakpoint_at.
2006 (remove_memory_breakpoint): New function.
2007 (set_raw_breakpoint_at): Reimplement.
2008 (set_breakpoint): New, based on set_breakpoint_at.
2009 (set_breakpoint_at): Reimplement.
2010 (delete_raw_breakpoint): Go through the_target->remove_point
2011 instead of assuming memory breakpoints.
2012 (find_gdb_breakpoint_at): Delete.
2013 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2014 (find_gdb_breakpoint): New function.
2015 (set_gdb_breakpoint_at): Delete.
2016 (z_type_supported): New function.
2017 (set_gdb_breakpoint_1): New function, loosely based off
2018 set_gdb_breakpoint_at.
2019 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2020 (delete_gdb_breakpoint_at): Delete.
2021 (delete_gdb_breakpoint_1): New function, loosely based off
2022 delete_gdb_breakpoint_at.
2023 (delete_gdb_breakpoint): New function.
2024 (clear_gdb_breakpoint_conditions): Rename to ...
2025 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2026 breakpoint.
2027 (add_condition_to_breakpoint): Make static.
2028 (add_breakpoint_condition): Take a struct breakpoint pointer
2029 instead of an address. Adjust.
2030 (gdb_condition_true_at_breakpoint): Rename to ...
2031 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2032 z_type parameter.
2033 (gdb_condition_true_at_breakpoint): Reimplement.
2034 (add_breakpoint_commands): Take a struct breakpoint pointer
2035 instead of an address. Adjust.
2036 (gdb_no_commands_at_breakpoint): Rename to ...
2037 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2038 parameter. Return true if no breakpoint was found. Change debug
2039 output.
2040 (gdb_no_commands_at_breakpoint): Reimplement.
2041 (run_breakpoint_commands): Rename to ...
2042 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2043 and change return type to boolean.
2044 (run_breakpoint_commands): New function.
2045 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2046 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2047 breakpoint. Go through the_target->remove_point instead of
2048 assuming memory breakpoint.
2049 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2050 software and hardware breakpoints.
2051 (reinsert_raw_breakpoint): Go through the_target->insert_point
2052 instead of assuming memory breakpoint.
2053 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2054 software and hardware breakpoints.
2055 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2056 Check both software and hardware breakpoints.
2057 (validate_inserted_breakpoint): Assert the breakpoint is a
2058 software breakpoint. Set the inserted flag to -1 instead of
2059 setting shlib_disabled.
2060 (delete_disabled_breakpoints): Adjust.
2061 (validate_breakpoints): Only validate software breakpoints.
2062 Adjust to inserted flag change.
2063 (check_mem_read, check_mem_write): Skip breakpoint types other
2064 than software breakpoints. Adjust to inserted flag change.
2065 * mem-break.h (enum raw_bkpt_type): New enum.
2066 (raw_breakpoint, struct process_info): Forward declare.
2067 (Z_packet_to_target_hw_bp_type): Delete declaration.
2068 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2069 (set_gdb_breakpoint, delete_gdb_breakpoint)
2070 (clear_breakpoint_conditions): New declarations.
2071 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2072 (breakpoint_inserted_here): Update comment.
2073 (add_breakpoint_condition, add_breakpoint_commands): Replace
2074 address parameter with a breakpoint pointer parameter.
2075 (gdb_breakpoint_here): Update comment.
2076 (delete_gdb_breakpoint_at): Delete.
2077 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2078 * server.c (process_point_options): Take a struct breakpoint
2079 pointer instead of an address. Adjust.
2080 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2081 delete_gdb_breakpoint.
2082 * spu-low.c (spu_target_ops): Install NULL as
2083 supports_z_point_type method.
2084 * target.h: Include mem-break.h.
2085 (struct target_ops) <prepare_to_access_memory>: Update comment.
2086 <supports_z_point_type>: New field.
2087 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2088 instead of a char. Also take a raw breakpoint pointer.
2089 * win32-arm-low.c (the_low_target): Install NULL as
2090 supports_z_point_type.
2091 * win32-i386-low.c (i386_supports_z_point_type): New function.
2092 (i386_insert_point, i386_remove_point): Adjust to new interface.
2093 (the_low_target): Install i386_supports_z_point_type.
2094 * win32-low.c (win32_supports_z_point_type): New function.
2095 (win32_insert_point, win32_remove_point): Adjust to new interface.
2096 (win32_target_ops): Install win32_supports_z_point_type.
2097 * win32-low.h (struct win32_target_ops):
2098 <supports_z_point_type>: New method.
2099 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2100 instead of a char. Also take a raw breakpoint pointer.
2101
2102 2014-05-20 Pedro Alves <palves@redhat.com>
2103
2104 * mem-break.h: Include break-common.h.
2105 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2106 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2107 (Z_packet_to_target_hw_bp_type): New declaration.
2108 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2109 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2110 (Z_PACKET_ACCESS_WP): Delete macros.
2111 (Z_packet_to_hw_type): Delete function.
2112 * i386-low.h: Don't include break-common.h here.
2113 (Z_packet_to_hw_type): Delete declaration.
2114 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2115 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2116 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2117 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2118 * linux-aarch64-low.c: Don't include break-common.h here.
2119 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2120 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2121 (Z_packet_to_target_hw_bp_type): Delete function.
2122 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2123 function.
2124 (mips_insert_point, mips_remove_point): Use
2125 Z_packet_to_target_hw_bp_type.
2126
2127 2014-05-20 Pedro Alves <palves@redhat.com>
2128
2129 * linux-aarch64-low.c: Include break-common.h.
2130 (enum target_point_type): Delete.
2131 (Z_packet_to_point_type): Rename to ...
2132 (Z_packet_to_target_hw_bp_type): ... this, and return a
2133 target_hw_bp_type instead.
2134 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2135 instead of an enum target_point_type.
2136 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2137 breakpoint type.
2138 (aarch64_dr_state_insert_one_point)
2139 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2140 (aarch64_handle_aligned_watchpoint)
2141 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2142 Take an enum target_hw_bp_type instead of an enum
2143 target_point_type.
2144 (aarch64_supports_z_point_type): New function.
2145 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2146 use Z_packet_to_target_hw_bp_type.
2147
2148 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2149
2150 * configure.ac: Only use -Werror by default when DEVELOPMENT
2151 is true.
2152 * configure: Regenerate.
2153
2154 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2155
2156 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2157 * linux-x86-low.c (X86_64_USER_REGS): New.
2158 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2159
2160 2014-04-28 Yao Qi <yao@codesourcery.com>
2161
2162 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2163 name.
2164
2165 2014-04-25 Pedro Alves <palves@redhat.com>
2166
2167 PR server/16255
2168 * linux-low.c (linux_attach_fail_reason_string): New function.
2169 (linux_attach_lwp): Delete.
2170 (linux_attach_lwp_1): Rename to ...
2171 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2172 argument. Remove "initial" parameter. Return int instead of
2173 void. Don't error or warn here.
2174 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2175 failure to attach to the tgid. Call warning when failing to
2176 attach to an lwp.
2177 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2178 argument. Remove "initial" parameter. Return int instead of
2179 void. Don't error or warn here.
2180 (linux_attach_fail_reason_string): New declaration.
2181 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2182 interface change. Use linux_attach_fail_reason_string.
2183
2184 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2185 Walfred Tedeschi <walfred.tedeschi@intel.com>
2186
2187 * Makefile.in: Added rules to handle new files
2188 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2189 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2190 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2191 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2192 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2193 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2194 x32-avx512-linux.o.
2195 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2196 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2197 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2198 i386/x32-avx512.xml.
2199 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2200 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2201 i386/x32-avx512-linux.xml.
2202 * i387-fp.c (num_avx512_k_registers): New constant for number
2203 of K registers.
2204 (num_avx512_zmmh_low_registers): New constant for number of
2205 lower ZMM registers (0-15).
2206 (num_avx512_zmmh_high_registers): New constant for number of
2207 higher ZMM registers (16-31).
2208 (num_avx512_ymmh_registers): New contant for number of higher
2209 YMM registers (ymm16-31 added by avx521 on x86_64).
2210 (num_avx512_xmm_registers): New constant for number of higher
2211 XMM registers (xmm16-31 added by AVX512 on x86_64).
2212 (struct i387_xsave): Add space for AVX512 registers.
2213 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2214 Add code to handle AVX512 registers.
2215 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2216 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2217 prototypei from generated file.
2218 (tdesc_amd64_avx512_linux): Likewise.
2219 (init_registers_x32_avx512_linux): Likewise.
2220 (tdesc_x32_avx512_linux): Likewise.
2221 (init_registers_i386_avx512_linux): Likewise.
2222 (tdesc_i386_avx512_linux): Likewise.
2223 (x86_64_regmap): Add AVX512 registers.
2224 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2225 mask.
2226 (initialize_low_arch): Add code to initialize AVX512 registers.
2227
2228 2014-04-23 Pedro Alves <palves@redhat.com>
2229
2230 * mem-break.c (find_gdb_breakpoint_at): Make static.
2231 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2232
2233 2014-04-23 Pedro Alves <palves@redhat.com>
2234
2235 * i386-low.c: Don't include break-common.h here.
2236 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2237 prototype to take target_hw_bp_type as argument instead of a Z
2238 packet char.
2239 * i386-low.h: Include break-common.h here.
2240 (Z_packet_to_hw_type): Declare.
2241 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2242 prototypes.
2243 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2244 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2245 (x86_remove_point): Convert the packet number to a
2246 target_hw_bp_type before calling i386_low_remove_watchpoint.
2247 * win32-i386-low.c (i386_insert_point): Convert the packet number
2248 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2249 (i386_remove_point): Convert the packet number to a
2250 target_hw_bp_type before calling i386_low_remove_watchpoint.
2251
2252 2014-04-23 Pedro Alves <palves@redhat.com>
2253
2254 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2255
2256 2014-04-10 Pedro Alves <palves@redhat.com>
2257
2258 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2259 Check if the condition or command is NULL before checking if the
2260 breakpoint is known. On success, return true.
2261 * mem-break.h (add_breakpoint_condition): Document return.
2262 (add_breakpoint_commands): Add describing comment.
2263 * server.c (skip_to_semicolon): New function.
2264 (process_point_options): Use it.
2265
2266 2014-04-09 Pedro Alves <palves@redhat.com>
2267
2268 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2269 to lwpid_of.
2270
2271 2014-02-27 Pedro Alves <palves@redhat.com>
2272
2273 PR 12702
2274 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2275 macros.
2276 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2277 output.
2278 (last_thread_of_process_p): Take a PID argument instead of a
2279 thread pointer.
2280 (linux_wait_for_lwp): Delete.
2281 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2282 functions.
2283 (linux_low_filter_event): New function, party factored out from
2284 linux_wait_for_event.
2285 (linux_wait_for_event): Rename to ...
2286 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2287 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2288 sigsuspend. Check for zombie leaders.
2289 (linux_wait_for_event): Reimplement as wrapper around
2290 linux_wait_for_event_filtered.
2291 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2292 a normal or signal exit is seen, it's the whole process exiting.
2293 (wait_for_sigstop): No longer a for_each_inferior callback.
2294 Rewrite on top of linux_wait_for_event_filtered.
2295 (stop_all_lwps): Call wait_for_sigstop directly.
2296 * server.c (resume, handle_target_event): Handle
2297 TARGET_WAITKIND_NO_RESUMED.
2298
2299 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2300
2301 * win32-low.c (psapi_get_dll_name,
2302 * win32_CreateToolhelp32Snapshot): Delete.
2303 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2304 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2305 Delete.
2306 (handle_load_dll): Add function description.
2307 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2308
2309 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2310
2311 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2312 Add comment.
2313 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2314 base address when calling win32_add_one_solib.
2315 (handle_load_dll): Delete local variable load_addr.
2316 Remove 0x1000 offset applied to DLL base address when calling
2317 win32_add_one_solib.
2318 (handle_unload_dll): Add comment.
2319
2320 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2321
2322 * win32-low.c (win32_add_all_dlls): Renames
2323 win32_ensure_ntdll_loaded. Rewrite function documentation.
2324 Adjust implementation to always load all DLLs.
2325 Add 0x1000 offset to DLL base address when calling
2326 win32_add_one_solib.
2327 (child_initialization_done): New static global.
2328 (do_initial_child_stuff): Set child_initialization_done to
2329 zero during child initialization, and 1 after. Replace call
2330 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2331 Add comment.
2332 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2333 (handle_unload_dll): Add function documentation.
2334 (get_child_debug_event): Ignore load and unload DLL events
2335 during child initialization.
2336
2337 2014-02-20 Doug Evans <dje@google.com>
2338
2339 Remove global all_lwps.
2340 * inferiors.h (ptid_of): Move here from linux-low.h.
2341 (pid_of, lwpid_of): Ditto.
2342 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2343 parameter is a struct thread_info * now.
2344 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2345 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2346 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2347 directly.
2348 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2349 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2350 * linux-arm-low.c (update_registers_callback): Update, "entry"
2351 parameter is a struct thread_info * now.
2352 Fetch lwpid from current_inferior directly.
2353 (arm_insert_point): Pass &all_threads to find_inferior instead of
2354 &all_lwps.
2355 (arm_remove_point): Ditto.
2356 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2357 (arm_prepare_to_resume): Fetch pid from thread.
2358 (arm_read_description): Fetch lwpid from current_inferior directly.
2359 * linux-low.c (all_lwps): Delete.
2360 (delete_lwp): Delete call to remove_inferior.
2361 (handle_extended_wait): Fetch lwpid from thread.
2362 (add_lwp): Don't set lwp->entry.id. Remove call to
2363 add_inferior_to_list.
2364 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2365 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2366 (kill_one_lwp_callback): Ditto.
2367 (linux_kill): Don't dereference NULL pointer.
2368 Fetch ptid,lwpid from thread.
2369 (get_detach_signal): Fetch ptid from thread.
2370 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2371 Simplify call to regcache_invalidate_thread.
2372 (delete_lwp_callback): Update, "entry" parameter is a
2373 struct thread_info * now. Fetch pid from thread.
2374 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2375 (status_pending_p_callback): Update, "entry" parameter is a
2376 struct thread_info * now. Fetch ptid from thread.
2377 (find_lwp_pid): Update, "entry" parameter is a
2378 struct thread_info * now.
2379 (linux_wait_for_lwp): Fetch pid from thread.
2380 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2381 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2382 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2383 (dequeue_one_deferred_signal): Ditto.
2384 (cancel_breakpoint): Fetch ptid from current_inferior.
2385 (linux_wait_for_event): Pass &all_threads to find_inferior,
2386 not &all_lwps. Fetch ptid, lwpid from thread.
2387 (count_events_callback): Update, "entry" parameter is a
2388 struct thread_info * now.
2389 (select_singlestep_lwp_callback): Ditto.
2390 (select_event_lwp_callback): Ditto.
2391 (cancel_breakpoints_callback): Ditto.
2392 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2393 not &all_lwps.
2394 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2395 (unsuspend_one_lwp): Update, "entry" parameter is a
2396 struct thread_info * now.
2397 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2398 not &all_lwps.
2399 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2400 Fetch lwpid from thread, not lwp.
2401 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2402 Pass &all_threads to find_inferior, not &all_lwps.
2403 (send_sigstop): Fetch lwpid from thread, not lwp.
2404 (send_sigstop_callback): Update, "entry" parameter is a
2405 struct thread_info * now.
2406 (suspend_and_send_sigstop_callback): Ditto.
2407 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2408 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2409 struct thread_info * now.
2410 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2411 from thread, lwp.
2412 (lwp_running): Update, "entry" parameter is a
2413 struct thread_info * now.
2414 (stop_all_lwps): Fetch ptid from thread.
2415 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2416 (linux_resume_one_lwp): Fetch lwpid from thread.
2417 (linux_set_resume_request): Update, "entry" parameter is a
2418 struct thread_info * now. Fetch pid, lwpid from thread.
2419 (resume_status_pending_p): Update, "entry" parameter is a
2420 struct thread_info * now.
2421 (need_step_over_p): Ditto. Fetch lwpid from thread.
2422 (start_step_over): Fetch lwpid from thread.
2423 (linux_resume_one_thread): Update, "entry" parameter is a
2424 struct thread_info * now. Fetch lwpid from thread.
2425 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2426 (proceed_one_lwp): Update, "entry" parameter is a
2427 struct thread_info * now. Fetch lwpid from thread.
2428 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2429 struct thread_info * now.
2430 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2431 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2432 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2433 directly.
2434 (regsets_store_inferior_registers): Ditto.
2435 (fetch_register, store_register): Ditto.
2436 (linux_read_memory, linux_write_memory): Ditto.
2437 (linux_request_interrupt): Ditto.
2438 (linux_read_auxv): Ditto.
2439 (linux_xfer_siginfo): Ditto.
2440 (linux_qxfer_spu): Ditto.
2441 (linux_qxfer_libraries_svr4): Ditto.
2442 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2443 moved to inferiors.h.
2444 (get_lwp): Delete.
2445 (get_thread_lwp): Update.
2446 (struct lwp_info): Delete member "entry". Simplify comment for
2447 member "thread".
2448 (all_lwps): Delete.
2449 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2450 current_inferior directly.
2451 (update_watch_registers_callback): Update, "entry" parameter is a
2452 struct thread_info * now. Fetch pid from thread.
2453 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2454 (mips_insert_point): Fetch lwpid from current_inferior.
2455 Pass &all_threads to find_inferior, not &all_lwps.
2456 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2457 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2458 directly.
2459 (mips_stopped_data_address): Ditto.
2460 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2461 directly.
2462 * linux-tile-low.c (tile_arch_setup): Ditto.
2463 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2464 (update_debug_registers_callback): Update, "entry" parameter is a
2465 struct thread_info * now. Fetch pid from thread.
2466 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2467 Pass &all_threads to find_inferior, not &all_lwps.
2468 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2469 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2470 Pass &all_threads to find_inferior, not &all_lwps.
2471 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2472 (i386_dr_low_get_status): Ditto.
2473 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2474 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2475 (x86_linux_read_description): Ditto.
2476 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2477
2478 2014-02-20 Doug Evans <dje@google.com>
2479
2480 * inferiors.c (get_first_inferior): Fix buglet.
2481
2482 2014-02-19 Doug Evans <dje@google.com>
2483
2484 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2485 * inferiors.c (add_thread): Change result type to struct thread_info *.
2486 All callers updated.
2487 (add_lwp): Call add_thread here instead of in callers.
2488 All callers updated.
2489 * linux-low.h (get_lwp_thread): Rewrite.
2490 (struct lwp_info): New member "thread".
2491
2492 2014-02-19 Doug Evans <dje@google.com>
2493
2494 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2495 All callers updated.
2496
2497 2014-02-19 Doug Evans <dje@google.com>
2498
2499 * inferiors.c (add_thread): Fix whitespace.
2500
2501 2014-02-19 Doug Evans <dje@google.com>
2502
2503 * dll.c (clear_dlls): Replace accessing list implemention details
2504 with API function.
2505 * gdbthread.h (get_first_thread): Declare.
2506 * inferiors.c (for_each_inferior_with_data): New function.
2507 (get_first_thread): New function.
2508 (find_thread_ptid): Simplify.
2509 (get_first_inferior): New function.
2510 (clear_list): Delete.
2511 (one_inferior_p): New function.
2512 (clear_inferior_list): New function.
2513 (clear_inferiors): Update.
2514 * inferiors.h (for_each_inferior_with_data): Declare.
2515 (clear_inferior_list): Declare.
2516 (one_inferior_p): Declare.
2517 (get_first_inferior): Declare.
2518 * linux-low.c (linux_wait_for_event): Replace accessing list
2519 implemention details with API function.
2520 * server.c (target_running): Ditto.
2521 (accumulate_file_name_length): New function.
2522 (emit_dll_description): New function.
2523 (handle_qxfer_libraries): Replace accessing list implemention
2524 details with API function.
2525 (handle_qxfer_threads_worker): New function.
2526 (handle_qxfer_threads_proper): Replace accessing list implemention
2527 details with API function.
2528 (handle_query): Ditto.
2529 (visit_actioned_threads_callback_ftype): New typedef.
2530 (visit_actioned_threads_data): New struct.
2531 (visit_actioned_threads): Rewrite to be find_inferior callback.
2532 (resume): Call find_inferior.
2533 (handle_status): Replace accessing list implemention
2534 details with API function.
2535 (process_serial_event): Replace accessing list implemention details
2536 with API function.
2537 * target.c (set_desired_inferior): Replace accessing list implemention
2538 details with API function.
2539 * tracepoint.c (same_process_p): New function.
2540 (gdb_agent_about_to_close): Replace accessing list implemention
2541 details with API function.
2542 * win32-low.c (child_delete_thread): Replace accessing list
2543 implemention details with API function.
2544 (match_dll_by_basename): New function.
2545 (dll_is_loaded_by_basename): New function.
2546 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2547 details call to dll_is_loaded_by_basename.
2548
2549 2014-02-19 Doug Evans <dje@google.com>
2550
2551 * dll.h (struct dll_info): Add comment.
2552 * gdbthread.h (struct thread_info): Add comment.
2553 (current_ptid): Simplify.
2554 * inferiors.c (add_process): Update.
2555 (remove_process): Update.
2556 * inferiors.h (struct process_info): Rename member "head" to "entry".
2557 * linux-low.c (delete_lwp): Update.
2558 (add_lwp): Update.
2559 (last_thread_of_process_p): Update.
2560 (kill_one_lwp_callback, linux_kill): Update.
2561 (status_pending_p_callback): Update.
2562 (wait_for_sigstop): Update. Simplify read of ptid.
2563 (start_step_over): Update.
2564 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2565 (get_lwp_thread): Update.
2566 (struct lwp_info): Rename member "head" to "entry".
2567 * regcache.h (inferior_list_entry): Delete.
2568 * server.c (kill_inferior_callback): Update.
2569 (detach_or_kill_inferior_callback): Update.
2570 (print_started_pid): Update.
2571 (print_attached_pid): Update.
2572 (process_serial_event): Simplify read of ptid.
2573 * thread-db.c (thread_db_create_event): Update.
2574 (thread_db_get_tls_address): Update.
2575 * win32-low.c (current_inferior_ptid): Simplify.
2576
2577 2014-02-19 Tom Tromey <tromey@redhat.com>
2578
2579 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2580 argument.
2581 (target_supports_btrace): Update.
2582
2583 2014-02-14 Yao Qi <yao@codesourcery.com>
2584
2585 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2586 (rsp-low-ipa.o): New target.
2587
2588 2014-02-12 Tom Tromey <tromey@redhat.com>
2589
2590 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2591 convert_ascii_to_int.
2592 * regcache.c (registers_to_string): Likewise.
2593 * remote-utils.c (decode_M_packet): Likewise.
2594 * server.c (process_serial_event): Likewise.
2595
2596 2014-02-12 Tom Tromey <tromey@redhat.com>
2597
2598 * server.c (handle_query, handle_v_run): Use hex2bin, not
2599 unhexify.
2600 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2601
2602 2014-02-12 Tom Tromey <tromey@redhat.com>
2603
2604 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2605 convert_int_to_ascii.
2606 * regcache.c (registers_to_string, collect_register_as_string):
2607 Likewise.
2608 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2609 Likewise.
2610 * server.c (process_serial_event): Likewise.
2611 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2612 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2613
2614 2014-02-12 Tom Tromey <tromey@redhat.com>
2615
2616 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2617 bin2hex, not hexify.
2618 * tracepoint.c (cmd_qtstatus): Likewise.
2619
2620 2014-02-12 Tom Tromey <tromey@redhat.com>
2621
2622 * remote-utils.c (monitor_output): Pass explicit length to
2623 hexify.
2624
2625 2014-02-12 Tom Tromey <tromey@redhat.com>
2626
2627 * tracepoint.c: Include rsp-low.h.
2628 * server.c: Include rsp-low.h.
2629 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2630 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2631 declare.
2632 * remote-utils.c: Include rsp-low.h.
2633 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2634 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2635 (convert_int_to_ascii, convert_ascii_to_int): Move to
2636 common/rsp-low.c.
2637 * regcache.c: Include rsp-low.h.
2638 * ax.c: Include rsp-low.h.
2639 * Makefile.in (SFILES): Add common/rsp-low.c.
2640 (OBS): Add rsp-low.o.
2641 (rsp-low.o): New target.
2642
2643 2014-02-12 Tom Tromey <tromey@redhat.com>
2644
2645 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2646 Include print-utils.h.
2647 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2648 (plongest, thirty_two, phex_nz): Remove.
2649 * Makefile.in (SFILES): Add common/print-utils.c.
2650 (OBS): Add print-utils.o.
2651 (print-utils-ipa.o): New target.
2652 (print-utils.o): New target.
2653 (IPA_OBJS): Add print-utils-ipa.o.
2654
2655 2014-02-06 Tom Tromey <tromey@redhat.com>
2656
2657 * Makefile.in (SFILES): Fix indentation.
2658
2659 2014-02-05 Doug Evans <dje@google.com>
2660
2661 * linux-low.c (linux_wait_for_event): Improve comment.
2662 (linux_wait_1): Keep current_inferior in sync with event_child.
2663
2664 2014-01-22 Doug Evans <dje@google.com>
2665
2666 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2667
2668 2014-01-22 Doug Evans <dje@google.com>
2669
2670 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2671 * configure: Regenerate.
2672 * config.in: Regenerate.
2673 * Makefile.in (SFILES): Add debug.c.
2674 (OBS): Add debug.o.
2675 * debug.c: New file.
2676 * debug.h: New file.
2677 * linux-aarch64-low.c (*): Update all debugging printfs to use
2678 debug_printf instead of fprintf.
2679 * linux-arm-low.c (*): Ditto.
2680 * linux-cris-low.c (*): Ditto.
2681 * linux-crisv32-low.c (*): Ditto.
2682 * linux-m32r-low.c (*): Ditto.
2683 * linux-sparc-low.c (*): Ditto.
2684 * linux-x86.c (*): Ditto.
2685 * linux-low.c (*): Ditto.
2686 (linux_wait_1): Add calls to debug_enter, debug_exit.
2687 (linux_wait): Remove redundant debugging printf.
2688 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2689 (linux_resume, unstop_all_lwps): Ditto.
2690 * mem-break.c (*): Update all debugging printfs to use
2691 debug_printf instead of fprintf.
2692 * remote-utils.c (*): Ditto.
2693 * thread-db.c (*): Ditto.
2694 * server.c #include <ctype.h>, "gdb_vecs.h".
2695 (debug_threads): Moved to debug.c.
2696 (*): Update all debugging printfs to use debug_printf instead of
2697 fprintf.
2698 (start_inferior): Replace call to fflush with call to debug_flush.
2699 (monitor_show_help): Mention set debug-format.
2700 (parse_debug_format_options): New function.
2701 (handle_monitor_command): Handle "monitor set debug-format".
2702 (gdbserver_usage): Mention --debug-format.
2703 (main): Parse --debug-format.
2704 * server.h (debug_threads): Declaration moved to debug.h.
2705 #include "debug.h".
2706 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2707 trace_debug_1 that uses debug_printf.
2708 (tracepoint_look_up_symbols): Update all debugging printfs to use
2709 debug_printf instead of fprintf.
2710
2711 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2712
2713 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2714 sys/ptrace.h.
2715
2716 2014-01-17 Pedro Alves <palves@redhat.com>
2717
2718 PR build/16445
2719 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2720 defined after including gdb_proc_service.h.
2721
2722 2014-01-16 Doug Evans <dje@google.com>
2723
2724 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2725 (match_dll): Use it.
2726
2727 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2728
2729 * target.h (target_ops) <read_btrace>: Change parameters and
2730 return type to allow error reporting.
2731 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2732 trace reading errors on.
2733 * linux-low.c (linux_low_read_btrace): Pass trace reading
2734 errors on.
2735 (linux_low_disable_btrace): New.
2736
2737 2014-01-15 Doug Evans <dje@google.com>
2738
2739 * inferiors.c (thread_id_to_gdb_id): Delete.
2740 * inferiors.h (thread_id_to_gdb_id): Delete.
2741
2742 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2743
2744 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2745 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2746 versions.
2747
2748 2014-01-08 Pedro Alves <palves@redhat.com>
2749
2750 * server.c (handle_status): Don't discard previous queued stop
2751 replies or thread's pending status here.
2752 (main) <disconnection>: Do it here instead.
2753
2754 2014-01-08 Pedro Alves <palves@redhat.com>
2755
2756 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2757 * server.c (visit_actioned_threads, handle_pending_status): New
2758 function.
2759 (handle_v_cont): Factor out parts to ...
2760 (resume): ... this new function. If in all-stop, and a thread
2761 being resumed has a pending status, report it without actually
2762 resuming.
2763 (myresume): Adjust to use the new 'resume' function.
2764 (clear_pending_status_callback, set_pending_status_callback)
2765 (find_status_pending_thread_callback): New functions.
2766 (handle_status): Handle the case of multiple threads having
2767 interesting statuses to report. Report threads' real last signal
2768 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2769 with an interesting thread to report the status for, instead of
2770 always reporting the status of the first thread.
2771
2772 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2773
2774 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2775 * gdbreplay.c (gdbreplay_version): Likewise.
2776
2777 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2778
2779 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2780 iov.iov_len with the real length in use.
2781
2782 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2783
2784 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2785 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2786 for all targets that use win32-low.c.
2787 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2788 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2789
2790 2013-12-13 Pedro Alves <palves@redhat.com>
2791
2792 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2793 if equal to TARGET_WAITKIND_LOADED.
2794 * win32-low.c (cached_status): New static global.
2795 (win32_wait): Add declaration.
2796 (do_initial_child_stuff): Flush all initial pending debug events
2797 up to the initial breakpoint.
2798 (win32_wait): If CACHED_STATUS was set, return that instead
2799 of doing a real wait. Remove the code resuming the execution
2800 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2801 during the initial phase. Also remove the code changing
2802 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2803 TARGET_WAITKIND_STOPPED.
2804
2805 2013-12-11 Yao Qi <yao@codesourcery.com>
2806
2807 * notif.c (handle_notif_ack): Return 0 if no notification
2808 matches.
2809
2810 2013-11-20 Doug Evans <dje@google.com>
2811
2812 * linux-low.c (linux_set_resume_request): Fix comment.
2813
2814 2013-11-20 Doug Evans <dje@google.com>
2815
2816 * linux-low.c (resume_status_pending_p): Tweak comment.
2817
2818 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2819
2820 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2821 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2822 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2823 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2824 (srv_amd64_regobj): Add amd64-mpx.o.
2825 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2826 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2827 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2828 * i387-fp.c (num_pl_bnd_register) Added constant.
2829 (num_pl_bnd_cfg_registers) Added constant.
2830 (struct i387_xsave) Added reserved area and MPX fields.
2831 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2832 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2833 function.
2834 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2835 (init_registers_amd64_mpx_linux): Declare new function.
2836 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2837 (x86_64_regmap): Add MPX registers.
2838 (x86_linux_read_description): Add MPX case.
2839 (initialize_low_arch): Initialize MPX targets.
2840
2841 2013-11-18 Tom Tromey <tromey@redhat.com>
2842
2843 * configure: Rebuild.
2844 * configure.ac: Don't check for stdlib.h.
2845 * gdbreplay.c: Unconditionally include stdlib.h.
2846
2847 2013-11-18 Tom Tromey <tromey@redhat.com>
2848
2849 * config.in: Rebuild.
2850 * configure: Rebuild.
2851 * configure.ac: Don't use AC_HEADER_DIRENT.
2852
2853 2013-11-18 Tom Tromey <tromey@redhat.com>
2854
2855 * server.h: Don't check HAVE_STRING_H.
2856 * gdbreplay.c: Don't check HAVE_STRING_H.
2857 * configure: Rebuild.
2858
2859 2013-11-18 Tom Tromey <tromey@redhat.com>
2860
2861 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2862 LIBGNU.
2863
2864 2013-11-08 Tom Tromey <tromey@redhat.com>
2865
2866 * configure, config.in: Rebuild.
2867 * configure.ac: Remove unused configury.
2868
2869 2013-11-08 Tom Tromey <tromey@redhat.com>
2870
2871 * acinclude.m4: Include common.m4, codeset.m4.
2872 * configure, config.in: Rebuild.
2873 * configure.ac: Use GDB_AC_COMMON.
2874
2875 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2876
2877 * linux-s390-low.c (HWCAP_S390_TE): New define.
2878 (s390_arch_setup): Consider the TE field in the HWCAP for
2879 determining 'have_regset_tdb'.
2880
2881 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2882
2883 PR gdb/16014
2884 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2885 call to sizeof.
2886
2887 2013-10-02 Pedro Alves <palves@redhat.com>
2888
2889 * server.c (process_serial_event): Don't output "GDBserver
2890 exiting" if GDB is connected through stdio.
2891 * target.c (mywait): Likewise, be silent if GDB is connected
2892 through stdio.
2893
2894 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2895
2896 * lynx-low.c (lynx_add_threads_after_attach): New function.
2897 (lynx_attach): Remove call to add_thread. Add call to
2898 lynx_add_threads_after_attach instead.
2899
2900 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2901
2902 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2903 * config.in, configure: Regenerated.
2904
2905 2013-09-18 Yao Qi <yao@codesourcery.com>
2906
2907 PR server/15959
2908 * server.c (start_inferior): Clear 'resume_info'.
2909
2910 2013-09-16 Jiong Wang <jiwang@tilera.com>
2911
2912 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2913 for each register.
2914
2915 2013-09-16 Jiong Wang <jiwang@tilera.com>
2916
2917 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2918 linux-tile-low.o to srv_tgtobj.
2919
2920 2013-09-16 Will Newton <will.newton@linaro.org>
2921
2922 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2923 out regs.
2924
2925 2013-09-06 Pedro Alves <palves@redhat.com>
2926
2927 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2928 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2929 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2930 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2931 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2932 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2933
2934 2013-09-06 Pedro Alves <palves@redhat.com>
2935
2936 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2937 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2938
2939 2013-09-06 Pedro Alves <palves@redhat.com>
2940
2941 * linux-amd64-ipa.c: Include tracepoint.h.
2942 * linux-i386-ipa.c: Include tracepoint.h.
2943
2944 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2945
2946 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2947 (ps_get_thread_area): New function.
2948
2949 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2950
2951 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2952 (initialize_low_arch): Call init_registers_crisv32 rather than
2953 init_register_crisv32.
2954
2955 2013-09-05 Pedro Alves <palves@redhat.com>
2956
2957 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2958 to ...
2959 * hostio.h: ... this new file.
2960 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2961 win32-low.c: Include hostio.h.
2962
2963 2013-09-05 Pedro Alves <palves@redhat.com>
2964
2965 * server.h (gdb_client_data, handler_func, callback_handler_func)
2966 (delete_file_handler, add_file_handler, append_callback_event)
2967 (delete_callback_event, start_event_loop, initialize_event_loop):
2968 Move to event-loop.h and include it.
2969 * event-loop.h: New file.
2970
2971 2013-09-05 Pedro Alves <palves@redhat.com>
2972
2973 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2974 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2975 (loaded_dll, unloaded_dll): Move to ...
2976 * dll.h: ... this new file.
2977 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2978
2979 2013-09-05 Pedro Alves <palves@redhat.com>
2980
2981 * server.h (current_process, get_thread_process, all_processes)
2982 (add_inferior_to_list, for_each_inferior, current_inferior)
2983 (remove_inferior, add_process, remove_process, find_process_pid)
2984 (have_started_inferiors_p, have_attached_inferiors_p)
2985 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2986 (clear_inferiors, find_inferior, find_inferior_id)
2987 (inferior_target_data, set_inferior_target_data)
2988 (inferior_regcache_data, set_inferior_regcache_data): Move to
2989 inferiors.h, and include it.
2990 * inferiors.h: New file.
2991
2992 2013-09-05 Pedro Alves <palves@redhat.com>
2993
2994 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2995 Move ...
2996 * ax.h: ... here.
2997
2998 2013-09-05 Pedro Alves <palves@redhat.com>
2999
3000 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3001 tracepoint.h.
3002 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3003 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3004 (handle_tracepoint_general_set, handle_tracepoint_query)
3005 (tracepoint_finished_step, tracepoint_was_hit)
3006 (release_while_stepping_state_list, current_traceframe)
3007 (in_readonly_region, traceframe_read_mem)
3008 (fetch_traceframe_registers, traceframe_read_sdata)
3009 (traceframe_read_info, struct fast_tpoint_collect_status)
3010 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3011 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3012 (supply_fast_tracepoint_registers)
3013 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3014 (ipa_tdesc, claim_trampoline_space)
3015 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3016 (agent_mem_read, agent_get_trace_state_variable_value)
3017 (agent_set_trace_state_variable_value, agent_tsv_read)
3018 (agent_mem_read_string, get_raw_reg_func_addr)
3019 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3020 * tracepoint.h: ... this new file.
3021
3022 2013-09-05 Pedro Alves <palves@redhat.com>
3023
3024 * server.h (perror_with_name, error, fatal, warning, paddress)
3025 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3026 include it.
3027 * utils.h: New file.
3028
3029 2013-09-05 Pedro Alves <palves@redhat.com>
3030
3031 * server.h (remote_debug, noack_mode, transport_is_reliable)
3032 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3033 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3034 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3035 (write_enn, initialize_async_io, enable_async_io)
3036 (disable_async_io, check_remote_input_interrupt_request)
3037 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3038 (dead_thread_notify, prepare_resume_reply)
3039 (decode_address_to_semicolon, decode_address, decode_m_packet)
3040 (decode_M_packet, decode_X_packet, decode_xfer_write)
3041 (decode_search_memory_packet, unhexify, hexify)
3042 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3043 (look_up_one_symbol, relocate_instruction)
3044 (monitor_output): Move to remote-utils.h, and include it.
3045 * remote-utils.h: New file.
3046
3047 2013-09-05 Pedro Alves <palves@redhat.com>
3048
3049 * server.h (_): Delete.
3050
3051 2013-09-02 Pedro Alves <palves@redhat.com>
3052
3053 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3054 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3055 allocated.
3056 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3057
3058 2013-09-02 Pierre Muller <muller@sourceware.org>
3059
3060 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3061 or WriteProcessMemory complete successfully and handle
3062 ERROR_PARTIAL_COPY error.
3063
3064 2013-09-02 Pedro Alves <palves@redhat.com>
3065
3066 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3067 error instead of EIO.
3068
3069 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3070
3071 PR server/15604
3072 * linux-low.c: Include filestuff.h.
3073 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3074 * lynx-low.c: Include filestuff.h.
3075 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3076 * server.c: Include filestuff.h.
3077 (main): Call notice_open_fds.
3078 * spu-low.c: Include filestuff.h.
3079 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3080
3081 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3082
3083 * Makefile.in: Explain why ../target and ../nat are not
3084 listed as include file search paths.
3085 (linux-waitpid.o): New object file rule.
3086 * configure.srv (srv_native_linux_obj): New variable.
3087 Replace all occurrences of linux native object files with
3088 $srv_native_linux_obj.
3089 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3090 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3091 (linux_enable_event_reporting): Remove declaration.
3092 (my_waitpid): Moved to common/linux-waitpid.c.
3093 (linux_wait_for_event): Pass ptid when calling
3094 linux_enable_event_reporting.
3095 (linux_supports_tracefork_flag): Remove.
3096 (linux_enable_event_reporting): Likewise.
3097 (linux_tracefork_grandchild): Remove.
3098 (STACK_SIZE): Moved to common/linux-ptrace.c.
3099 (linux_tracefork_child): Remove.
3100 (linux_test_for_tracefork): Remove.
3101 (linux_look_up_symbols): Call linux_supports_traceclone.
3102 (initialize_low): Remove call to linux_test_for_tracefork.
3103 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3104 common/linux-ptrace.h.
3105 (PTRACE_TYPE_ARG4): Likewise.
3106 Include linux-ptrace.h.
3107
3108 2013-08-21 Pedro Alves <palves@redhat.com>
3109
3110 * config.in: Renegerate.
3111
3112 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3113
3114 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3115 (SFILES): Remove $(srcdir)/common/target-common.c and
3116 add $(srcdir)/target/waitstatus.c.
3117 (OBS): Remove target-common.o and add waitstatus.o.
3118 (server_h): Remove $(srcdir)/../common/target-common.h and
3119 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3120 and $(srcdir)/../target/waitstatus.h.
3121 (target-common.o): Remove.
3122 (waitstatus.o): New target object file.
3123 * target.h: Do not include target-common.h and
3124 include target/resume.h, target/wait.h and
3125 target/waitstatus.h.
3126
3127 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3128
3129 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3130 to PTRACE_TYPE_ARG3.
3131 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3132 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3133 PTRACE_TYPE_ARG4.
3134 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3135 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3136
3137 2013-07-27 Jie Zhang <jie@codesourcery.com>
3138 Daniel Jacobowitz <dan@codesourcery.com>
3139 Yao Qi <yao@codesourcery.com>
3140
3141 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3142 (mips-linux-watch.o): New rule.
3143 (mips_linux_watch_h): New variable.
3144 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3145 srv_tgtobj.
3146 * linux-mips-low.c: Include mips-linux-watch.h.
3147 (struct arch_process_info, struct arch_lwp_info): New.
3148 (update_watch_registers_callback): New function.
3149 (mips_linux_new_process, mips_linux_new_thread) New functions.
3150 (mips_linux_prepare_to_resume, mips_insert_point): New
3151 functions.
3152 (mips_remove_point, mips_stopped_by_watchpoint): New
3153 functions.
3154 (rsp_bp_type_to_target_hw_bp_type): New function.
3155 (mips_stopped_data_address): New function.
3156 (the_low_target): Add watchpoint support functions.
3157
3158 2013-07-27 Yao Qi <yao@codesourcery.com>
3159
3160 * i386-low.c: Include break-common.h.
3161 (enum target_hw_bp_type): Remove.
3162
3163 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3164
3165 * Makefile.in (SFILES): /common/target-common.c.
3166 (OBS): Add target-common.o.
3167 (server_h): Add $(srcdir)/../common/target-common.h.
3168 (target-common.o): New target.
3169 * server.c (queue_stop_reply_callback): Free
3170 status string after use.
3171 * target.c (target_waitstatus_to_string): Remove.
3172 * target.h: Include target-common.h.
3173 (resume_kind): Likewise.
3174 (target_waitkind): Likewise.
3175 (target_waitstatus): Likewise.
3176 (TARGET_WNOHANG): Likewise.
3177
3178 2013-07-04 Yao Qi <yao@codesourcery.com>
3179
3180 * Makefile.in (host_alias): Use @host_noncanonical@.
3181 (target_alias): Use @target_noncanonical@.
3182 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3183 ACX_NONCANONICAL_HOST.
3184 * configure: Regenerated.
3185
3186 Revert:
3187 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3188
3189 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3190 * configure: Rebuild.
3191 * Makefile.in (version_host, version_target): Get from configure.
3192 (version.c): Use $(version_host) and $(version_target).
3193
3194 2013-07-03 Pedro Alves <palves@redhat.com>
3195
3196 * Makefile.in (config.status): Depend on development.sh.
3197 * acinclude.m4: Include libmcheck.m4.
3198 * configure: Regenerate.
3199
3200 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3201
3202 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3203 attribute inside the parentheses.
3204 (winapi_DebugSetProcessKillOnExit): Ditto.
3205 (winapi_DebugBreakProcess): Ditto.
3206 (winapi_GenerateConsoleCtrlEvent): Ditto.
3207
3208 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3209
3210 * notif.h (notif_event): Add a dummy member to avoid compiler
3211 errors.
3212
3213 2013-07-01 Pedro Alves <palves@redhat.com>
3214
3215 * hostio.c (HOSTIO_PATH_MAX): Define.
3216 (require_filename, handle_open, handle_unlink, handle_readlink):
3217 Use it.
3218
3219 2013-07-01 Pedro Alves <palves@redhat.com>
3220
3221 * server.h: Include "pathmax.h".
3222 * linux-low.c: Don't include sys/param.h.
3223 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3224 MAXPATHLEN.
3225 * win32-low.c: Don't include sys/param.h.
3226 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3227
3228 2013-07-01 Pedro Alves <palves@redhat.com>
3229
3230 * event-loop.c: Don't check HAVE_UNISTD_H before including
3231 <unistd.h>.
3232 * gdbreplay.c: Likewise.
3233 * remote-utils.c: Likewise.
3234 * server.c: Likewise.
3235 * configure.ac: Don't check for unistd.h.
3236 * configure: Regenerate.
3237
3238 2013-06-28 Tom Tromey <tromey@redhat.com>
3239
3240 * Makefile.in (version.c): Use version.in, not
3241 common/version.in.
3242
3243 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3244
3245 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3246 * configure: Rebuild.
3247 * Makefile.in (version_host, version_target): Get from configure.
3248 (version.c): Use $(version_host) and $(version_target).
3249
3250 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3251
3252 Fix trace-status to output user name without trailing colon.
3253 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3254
3255 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3256
3257 Fix trace-status to output proper start-time and stop-time.
3258 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3259 output start time and stop time in hex as gdb expects.
3260
3261 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3262
3263 * tracepoint.c (build_traceframe_info_xml): Output trace state
3264 variables present in the trace buffer.
3265
3266 2013-06-24 Tom Tromey <tromey@redhat.com>
3267
3268 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3269 create-version.sh.
3270 (version.o): Remove.
3271 * gdbreplay.c: Include version.h.
3272 (version, host_name): Don't declare.
3273 * server.h: Include version.h.
3274 (version, host_name): Don't declare.
3275
3276 2013-06-12 Pedro Alves <palves@redhat.com>
3277
3278 * linux-x86-low.c (linux_is_elf64): Delete global.
3279 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3280 with local linux_pid_exe_is_elf_64_file use.
3281
3282 2013-06-11 Pedro Alves <palves@redhat.com>
3283
3284 * linux-low.c (regset_disabled, disable_regset): New functions.
3285 (regsets_fetch_inferior_registers)
3286 (regsets_store_inferior_registers): Use them.
3287 (initialize_regsets_info); Don't allocate the disabled_regsets
3288 array here.
3289 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3290 comment.
3291
3292 2013-06-11 Pedro Alves <palves@redhat.com>
3293
3294 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3295 xmalloc.
3296
3297 2013-06-11 Pedro Alves <palves@redhat.com>
3298
3299 * linux-x86-low.c (initialize_low_arch): Call
3300 init_registers_x32_avx_linux.
3301
3302 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3303
3304 Fix compatibility with Android Bionic.
3305 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3306 it is not empty.
3307
3308 2013-06-07 Pedro Alves <palves@redhat.com>
3309
3310 PR server/14823
3311 * Makefile.in (OBS): Add tdesc.o.
3312 (IPA_OBJS): Add tdesc-ipa.o.
3313 (tdesc-ipa.o): New rule.
3314 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3315 interface.
3316 * linux-low.c (new_inferior): Delete.
3317 (disabled_regsets, num_regsets): Delete.
3318 (linux_add_process): Adjust to set the new per-process
3319 new_inferior flag.
3320 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3321 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3322 was a stop. When calling arch_setup, switch the current inferior
3323 to the thread that got an event.
3324 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3325 (regsets_fetch_inferior_registers)
3326 (regsets_store_inferior_registers): New regsets_info parameter.
3327 Adjust to use it.
3328 (linux_register_in_regsets): New regs_info parameter. Adjust to
3329 use it.
3330 (register_addr, fetch_register, store_register): New usrregs_info
3331 parameter. Adjust to use it.
3332 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3333 parameter regs_info. Adjust to use it.
3334 (linux_fetch_registers): Get the current inferior's regs_info, and
3335 adjust to use it.
3336 (linux_store_registers): Ditto.
3337 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3338 (initialize_low): Don't initialize the target_regsets here. Call
3339 initialize_low_arch.
3340 * linux-low.h (target_regsets): Delete declaration.
3341 (struct regsets_info): New.
3342 (struct usrregs_info): New.
3343 (struct regs_info): New.
3344 (struct process_info_private) <new_inferior>: New field.
3345 (struct linux_target_ops): Delete the num_regs, regmap, and
3346 regset_bitmap fields. New field regs_info.
3347 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3348 * i387-fp.c (num_xmm_registers): Delete.
3349 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3350 calls to new interface.
3351 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3352 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3353 Infer the number of xmm registers from the regcache's target
3354 description.
3355 * i387-fp.h (num_xmm_registers): Delete.
3356 * inferiors.c (add_thread): Don't install the thread's regcache
3357 here.
3358 * proc-service.c (gregset_info): Fetch the current inferior's
3359 regs_info. Adjust to use it.
3360 * regcache.c: Include tdesc.h.
3361 (register_bytes, reg_defs, num_registers)
3362 (gdbserver_expedite_regs): Delete.
3363 (get_thread_regcache): If the thread doesn't have a regcache yet,
3364 create one, instead of aborting gdbserver.
3365 (regcache_invalidate_one): Rename to ...
3366 (regcache_invalidate_thread): ... this.
3367 (regcache_invalidate_one): New.
3368 (regcache_invalidate): Only invalidate registers of the current
3369 process.
3370 (init_register_cache): Add target_desc parameter, and use it.
3371 (new_register_cache): Ditto. Assert the target description has a
3372 non zero registers_size.
3373 (regcache_cpy): Add assertions. Adjust.
3374 (realloc_register_cache, set_register_cache): Delete.
3375 (registers_to_string, registers_from_string): Adjust.
3376 (find_register_by_name, find_regno, find_register_by_number)
3377 (register_cache_size): Add target_desc parameter, and use it.
3378 (free_register_cache_thread, free_register_cache_thread_one)
3379 (regcache_release, register_cache_size): New.
3380 (register_size): Add target_desc parameter, and use it.
3381 (register_data, supply_register, supply_register_zeroed)
3382 (supply_regblock, supply_register_by_name, collect_register)
3383 (collect_register_as_string, collect_register_by_name): Adjust.
3384 * regcache.h (struct target_desc): Forward declare.
3385 (struct regcache) <tdesc>: New field.
3386 (init_register_cache, new_register_cache): Add target_desc
3387 parameter.
3388 (regcache_invalidate_thread): Declare.
3389 (regcache_invalidate_one): Delete declaration.
3390 (regcache_release): Declare.
3391 (find_register_by_number, register_cache_size, register_size)
3392 (find_regno): Add target_desc parameter.
3393 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3394 declarations.
3395 * remote-utils.c: Include tdesc.h.
3396 (outreg, prepare_resume_reply): Adjust.
3397 * server.c: Include tdesc.h.
3398 (gdbserver_xmltarget): Delete declaration.
3399 (get_features_xml, process_serial_event): Adjust.
3400 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3401 declare.
3402 (struct process_info) <tdesc>: New field.
3403 (ipa_tdesc): Declare.
3404 * tdesc.c: New file.
3405 * tdesc.h: New file.
3406 * tracepoint.c: Include tdesc.h.
3407 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3408 (get_context_regcache): Adjust to pass ipa_tdesc down.
3409 (do_action_at_tracepoint): Adjust to get the register cache size
3410 from the context regcache's description.
3411 (traceframe_walk_blocks): Adjust to get the register cache size
3412 from the current trace frame's description.
3413 (traceframe_get_pc): Adjust to get current trace frame's
3414 description and pass it down.
3415 (gdb_collect): Adjust to get the register cache size from the
3416 IPA's description.
3417 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3418 (gdbserver_xmltarget): Delete.
3419 (initialize_low_tracepoint): Set the ipa's target description.
3420 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3421 (initialize_low_tracepoint): Set the ipa's target description.
3422 * linux-x86-low.c: Include tdesc.h.
3423 [__x86_64__] (is_64bit_tdesc): New.
3424 (ps_get_thread_area, x86_get_thread_area): Use it.
3425 (i386_cannot_store_register): Rename to ...
3426 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3427 (i386_cannot_fetch_register): Rename to ...
3428 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3429 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3430 to new interface.
3431 (target_regsets): Rename to ...
3432 (x86_regsets): ... this.
3433 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3434 interface.
3435 (x86_siginfo_fixup): Use is_64bit_tdesc.
3436 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3437 (tdesc_x32_avx_linux, tdesc_x32_linux)
3438 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3439 Declare.
3440 (x86_linux_update_xmltarget): Delete.
3441 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3442 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3443 (AMD64_LINUX_USER64_CS): New.
3444 (x86_linux_read_description): New, based on
3445 x86_linux_update_xmltarget.
3446 (same_process_callback): New.
3447 (x86_arch_setup_process_callback): New.
3448 (x86_linux_update_xmltarget): New.
3449 (x86_regsets_info): New.
3450 (amd64_linux_regs_info): New.
3451 (i386_linux_usrregs_info): New.
3452 (i386_linux_regs_info): New.
3453 (x86_linux_regs_info): New.
3454 (x86_arch_setup): Reimplement.
3455 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3456 (x86_emit_ops): Ditto.
3457 (the_low_target): Adjust. Install x86_linux_regs_info,
3458 x86_cannot_fetch_register, and x86_cannot_store_register.
3459 (initialize_low_arch): New.
3460 * linux-ia64-low.c (tdesc_ia64): Declare.
3461 (ia64_fetch_register): Adjust.
3462 (ia64_usrregs_info, regs_info): New globals.
3463 (ia64_regs_info): New function.
3464 (the_low_target): Adjust.
3465 (initialize_low_arch): New function.
3466 * linux-sparc-low.c (tdesc_sparc64): Declare.
3467 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3468 Adjust.
3469 (sparc_arch_setup): New function.
3470 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3471 (the_low_target): Adjust.
3472 (initialize_low_arch): New function.
3473 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3474 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3475 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3476 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3477 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3478 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3479 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3480 (tdesc_powerpc_isa205_vsx64l): Declare.
3481 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3482 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3483 (ppc_set_pc, ppc_get_hwcap): Adjust.
3484 (ppc_usrregs_info): Forward declare.
3485 (!__powerpc64__) ppc_regmap_adjusted: New global.
3486 (ppc_arch_setup): Adjust to the current process'es target
3487 description.
3488 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3489 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3490 (ppc_store_evrregset): Adjust.
3491 (target_regsets): Rename to ...
3492 (ppc_regsets): ... this, and make static.
3493 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3494 (ppc_regs_info): New function.
3495 (the_low_target): Adjust.
3496 (initialize_low_arch): New function.
3497 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3498 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3499 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3500 (tdesc_s390x_linux64v2): Declare.
3501 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3502 (s390_fill_gregset, s390_store_last_break): Adjust.
3503 (target_regsets): Rename to ...
3504 (s390_regsets): ... this, and make static.
3505 (s390_get_pc, s390_set_pc): Adjust.
3506 (s390_get_hwcap): New target_desc parameter, and use it.
3507 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3508 (s390_arch_setup): Adjust to set the current process'es target
3509 description. Don't adjust the regmap.
3510 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3511 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3512 (regs_info_3264): New globals.
3513 (s390_regs_info): New function.
3514 (the_low_target): Adjust.
3515 (initialize_low_arch): New function.
3516 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3517 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3518 [__mips64] (init_registers_mips_linux)
3519 (init_registers_mips_dsp_linux): Delete defines.
3520 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3521 (have_dsp): New global.
3522 (mips_read_description): New, based on mips_arch_setup.
3523 (mips_arch_setup): Reimplement.
3524 (get_usrregs_info): New function.
3525 (mips_cannot_fetch_register, mips_cannot_store_register)
3526 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3527 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3528 (target_regsets): Rename to ...
3529 (mips_regsets): ... this, and make static.
3530 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3531 (dsp_regs_info, regs_info): New globals.
3532 (mips_regs_info): New function.
3533 (the_low_target): Adjust.
3534 (initialize_low_arch): New function.
3535 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3536 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3537 Declare.
3538 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3539 (arm_read_description): New, with bits factored from
3540 arm_arch_setup.
3541 (arm_arch_setup): Reimplement.
3542 (target_regsets): Rename to ...
3543 (arm_regsets): ... this, and make static.
3544 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3545 (arm_regs_info): New function.
3546 (the_low_target): Adjust.
3547 (initialize_low_arch): New function.
3548 * linux-m68k-low.c (tdesc_m68k): Declare.
3549 (target_regsets): Rename to ...
3550 (m68k_regsets): ... this, and make static.
3551 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3552 (m68k_regs_info): New function.
3553 (m68k_arch_setup): New function.
3554 (the_low_target): Adjust.
3555 (initialize_low_arch): New function.
3556 * linux-sh-low.c (tdesc_sharch): Declare.
3557 (target_regsets): Rename to ...
3558 (sh_regsets): ... this, and make static.
3559 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3560 (sh_regs_info, sh_arch_setup): New functions.
3561 (the_low_target): Adjust.
3562 (initialize_low_arch): New function.
3563 * linux-bfin-low.c (tdesc_bfin): Declare.
3564 (bfin_arch_setup): New function.
3565 (bfin_usrregs_info, regs_info): New globals.
3566 (bfin_regs_info): New function.
3567 (the_low_target): Adjust.
3568 (initialize_low_arch): New function.
3569 * linux-cris-low.c (tdesc_cris): Declare.
3570 (cris_arch_setup): New function.
3571 (cris_usrregs_info, regs_info): New globals.
3572 (cris_regs_info): New function.
3573 (the_low_target): Adjust.
3574 (initialize_low_arch): New function.
3575 * linux-cris-low.c (tdesc_crisv32): Declare.
3576 (cris_arch_setup): New function.
3577 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3578 (cris_regs_info): New function.
3579 (the_low_target): Adjust.
3580 (initialize_low_arch): New function.
3581 * linux-m32r-low.c (tdesc_m32r): Declare.
3582 (m32r_arch_setup): New function.
3583 (m32r_usrregs_info, regs_info): New globals.
3584 (m32r_regs_info): Adjust.
3585 (initialize_low_arch): New function.
3586 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3587 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3588 (tic6x_usrregs_info): Forward declare.
3589 (tic6x_read_description): New function, based on ...
3590 (tic6x_arch_setup): ... this. Reimplement.
3591 (target_regsets): Rename to ...
3592 (tic6x_regsets): ... this, and make static.
3593 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3594 (tic6x_regs_info): New function.
3595 (the_low_target): Adjust.
3596 (initialize_low_arch): New function.
3597 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3598 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3599 (target_regsets): Rename to ...
3600 (xtensa_regsets): ... this, and make static.
3601 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3602 globals.
3603 (xtensa_arch_setup, xtensa_regs_info): New functions.
3604 (the_low_target): Adjust.
3605 (initialize_low_arch): New function.
3606 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3607 (nios2_arch_setup): Set the current process'es tdesc.
3608 (target_regsets): Rename to ...
3609 (nios2_regsets): ... this.
3610 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3611 (nios2_regs_info): New function.
3612 (the_low_target): Adjust.
3613 (initialize_low_arch): New function.
3614 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3615 (aarch64_arch_setup): Set the current process'es tdesc.
3616 (target_regsets): Rename to ...
3617 (aarch64_regsets): ... this.
3618 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3619 (aarch64_regs_info): New function.
3620 (the_low_target): Adjust.
3621 (initialize_low_arch): New function.
3622 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3623 globals.
3624 (target_regsets): Rename to ...
3625 (tile_regsets): ... this.
3626 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3627 (tile_regs_info): New function.
3628 (tile_arch_setup): Set the current process'es tdesc.
3629 (the_low_target): Adjust.
3630 (initialize_low_arch): New function.
3631 * spu-low.c (tdesc_spu): Declare.
3632 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3633 * win32-arm-low.c (tdesc_arm): Declare.
3634 (arm_arch_setup): New function.
3635 (the_low_target): Install arm_arch_setup instead of
3636 init_registers_arm.
3637 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3638 (init_windows_x86): Rename to ...
3639 (i386_arch_setup): ... this. Set `win32_tdesc'.
3640 (the_low_target): Adjust.
3641 * win32-low.c (win32_tdesc): New global.
3642 (child_add_thread): Don't create the thread cache here.
3643 (do_initial_child_stuff): Set the new process'es tdesc.
3644 * win32-low.h (struct target_desc): Forward declare.
3645 (win32_tdesc): Declare.
3646 * lynx-i386-low.c (tdesc_i386): Declare global.
3647 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3648 * lynx-low.c (lynx_tdesc): New global.
3649 (lynx_add_process): Set the new process'es tdesc.
3650 * lynx-low.h (struct target_desc): Forward declare.
3651 (lynx_tdesc): Declare global.
3652 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3653 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3654 * nto-low.c (nto_tdesc): New global.
3655 (do_attach): Set the new process'es tdesc.
3656 * nto-low.h (struct target_desc): Forward declare.
3657 (nto_tdesc): Declare.
3658 * nto-x86-low.c (tdesc_i386): Declare.
3659 (nto_x86_arch_setup): Set `nto_tdesc'.
3660
3661 2013-06-04 Gary Benson <gbenson@redhat.com>
3662
3663 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3664 to qSupported response when appropriate.
3665 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3666 with nonzero-length annex.
3667 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3668 arguments supplied in annex.
3669
3670 2013-05-31 Doug Evans <dje@google.com>
3671
3672 PR server/15594
3673 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3674 64 bits in 64-cross-32 environment.
3675
3676 2013-05-28 Pedro Alves <palves@redhat.com>
3677
3678 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3679 (aarch64-without-fpu.c): Delete rule.
3680 * configure.srv (aarch64*-*-linux*): Remove references to
3681 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3682 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3683 declaration.
3684
3685 2013-05-24 Pedro Alves <palves@redhat.com>
3686
3687 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3688 instead of strchr/decode_address. Error if the range isn't split
3689 with a ','. Don't assume there's be a ':' in the action.
3690
3691 2013-05-23 Yao Qi <yao@codesourcery.com>
3692 Pedro Alves <palves@redhat.com>
3693
3694 * linux-low.c (lwp_in_step_range): New function.
3695 (linux_wait_1): If the thread was range stepping and stopped
3696 outside the stepping range, report the stop to GDB. Otherwise,
3697 continue stepping. Add range stepping debug output.
3698 (linux_set_resume_request): Copy the step range from the resume
3699 request to the lwp.
3700 (linux_supports_range_stepping): New.
3701 (linux_target_ops) <supports_range_stepping>: Set to
3702 linux_supports_range_stepping.
3703 * linux-low.h (struct linux_target_ops)
3704 <supports_range_stepping>: New field.
3705 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3706 * linux-x86-low.c (x86_supports_range_stepping): New.
3707 (the_low_target) <supports_range_stepping>: Set to
3708 x86_supports_range_stepping.
3709 * server.c (handle_v_cont): Handle 'r' action.
3710 (handle_v_requests): Append ";r" if the target supports range
3711 stepping.
3712 * target.h (struct thread_resume) <step_range_start,
3713 step_range_end>: New fields.
3714 (struct target_ops) <supports_range_stepping>:
3715 New field.
3716 (target_supports_range_stepping): New macro.
3717
3718 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3719
3720 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3721 confusion in comment.
3722
3723 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3724
3725 * lynx-low.c (struct process_info_private): New type.
3726 (lynx_add_process): New function.
3727 (lynx_create_inferior, lynx_attach): Replace calls to
3728 add_process by calls to lynx_add_process.
3729 (lynx_resume): If PTID is null, then try using
3730 current_process()->private->last_wait_event_ptid.
3731 Add comments.
3732 (lynx_clear_inferiors): Delete. The contents of that function
3733 has been inlined in lynx_mourn;
3734 (lynx_wait_1): Save the ptid in the process's private data.
3735 (lynx_mourn): Free the process' private data. Replace call
3736 to lynx_clear_inferiors by call to clear_inferiors.
3737
3738 2013-05-17 Yao Qi <yao@codesourcery.com>
3739
3740 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3741 the right place.
3742
3743 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3744
3745 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3746 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3747 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3748 PT_TEXT_END_ADDR guards. Update comments.
3749 (linux_target_op) <read_offsets>: Conditionally define to
3750 linux_read_offsets if the target is UCLIBC and if it defines
3751 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3752
3753 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3754 Andrew Jenner <andrew@codesourcery.com>
3755
3756 * Makefile.in (SFILES): Add linux-nios2-low.c.
3757 (clean): Add action to delete nios2-linux.c.
3758 (nios2-linux.c): New rule.
3759 * configure.srv: Add nios2*-*-linux*.
3760 * linux-nios2-low.c: New.
3761
3762 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3763
3764 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3765
3766 2013-04-25 Hui Zhu <hui@codesourcery.com>
3767
3768 PR gdb/15186
3769 * ax.c (ax_printf): Add fflush.
3770
3771 2013-04-22 Tom Tromey <tromey@redhat.com>
3772
3773 * Makefile.in (SFILES): Add filestuff.c.
3774 (OBS): Add filestuff.o.
3775 (filestuff.o): New target.
3776 * config.in, configure: Rebuild.
3777 * configure.ac: Check for fdwalk, pipe2.
3778
3779 2013-04-17 Pedro Alves <palves@redhat.com>
3780
3781 * configure.ac (USE_THREAD_DB): Delete variable.
3782 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3783 Don't AC_SUBST USE_THREAD_DB.
3784 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3785 * config.in, configure: Regenerate.
3786
3787 2013-04-16 Pedro Alves <palves@redhat.com>
3788
3789 * linux-low.h (struct lwp_info) <thread_known>: Move under
3790 the USE_THREAD_DB #ifdef.
3791
3792 2013-04-16 Pedro Alves <palves@redhat.com>
3793
3794 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3795 (linux-low.o): Delete rule.
3796 * linux-low.h: Always include "gdb_thread_db.h" instead of
3797 conditionally including thread_db.h.
3798 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3799 HAVE_THREAD_DB_H.
3800
3801 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3802
3803 * Makefile.in (install-only): Fix make install regression.
3804
3805 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3806
3807 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3808 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3809 installation.
3810 * gdbserver.1: Remove.
3811
3812 2013-03-22 Pedro Alves <palves@redhat.com>
3813
3814 * linux-low.c (handle_extended_wait): Don't call
3815 linux_enable_event_reporting.
3816
3817 2013-03-15 Tony Theodore <tonyt@logyst.com>
3818
3819 PR build/9098:
3820 * Makefile.in (SHELL): Use @SHELL@.
3821
3822 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3823
3824 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3825 compiler warning.
3826
3827 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3828
3829 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3830 Remove extraneous NULL element.
3831
3832 2013-03-13 Yao Qi <yao@codesourcery.com>
3833
3834 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3835 'V' block in trace frame.
3836
3837 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3838
3839 * target.h (struct target_ops): Add btrace ops.
3840 (target_supports_btrace): New macro.
3841 (target_enable_btrace): New macro.
3842 (target_disable_btrace): New macro.
3843 (target_read_btrace): New macro.
3844 * gdbthread.h (struct thread_info): Add btrace field.
3845 * server.c: Include btrace-common.h.
3846 (handle_btrace_general_set): New function.
3847 (handle_btrace_enable): New function.
3848 (handle_btrace_disable): New function.
3849 (handle_general_set): Call handle_btrace_general_set.
3850 (handle_qxfer_btrace): New function.
3851 (struct qxfer qxfer_packets[]): Add btrace entry.
3852 * inferiors.c (remove_thread): Disable btrace.
3853 * linux-low: Include linux-btrace.h.
3854 (linux_low_enable_btrace): New function.
3855 (linux_low_read_btrace): New function.
3856 (linux_target_ops): Add btrace ops.
3857 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3858 Add srv_linux_btrace=yes.
3859 (x86_64-*-linux*): Add linux-btrace.o.
3860 Add srv_linux_btrace=yes.
3861 * configure.ac: Define HAVE_LINUX_BTRACE.
3862 * config.in: Regenerated.
3863 * configure: Regenerated.
3864
3865 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3866
3867 * server.c (handle_qxfer): Preserve error message if -3 is
3868 returned.
3869 (qxfer): Document the -3 return value.
3870
3871 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3872
3873 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3874 (linux_btrace_h): New variable.
3875 (linux-btrace.o): New rule.
3876
3877 2013-03-08 Stan Shebs <stan@codesourcery.com>
3878 Hafiz Abid Qadeer <abidh@codesourcery.com>
3879
3880 * tracepoint.c (trace_buffer_size): New global.
3881 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3882 (init_trace_buffer): Change to one-argument function. Allocate
3883 trace buffer memory.
3884 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3885 handle QTBuffer:size packet.
3886 (cmd_bigqtbuffer_size): New function.
3887 (initialize_tracepoint): Call init_trace_buffer with
3888 DEFAULT_TRACE_BUFFER_SIZE.
3889 * server.c (handle_query): Add QTBuffer:size in the
3890 supported packets.
3891
3892 2013-03-07 Yao Qi <yao@codesourcery.com>
3893
3894 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3895 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3896 of -1.
3897 (cmd_qtsp): Adjust condition. Do post increment.
3898 Set cur_action and cur_step_action back to 0.
3899
3900 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3901
3902 PR server/15236
3903 * linux-low.c (linux_write_memory): Return early success if LEN is
3904 zero.
3905
3906 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3907
3908 * configure.srv: Add x86_64-*-cygwin* as target.
3909
3910 2013-02-28 Tom Tromey <tromey@redhat.com>
3911
3912 * configure.ac: Invoke AC_SYS_LARGEFILE.
3913 * configure, config.in: Rebuild.
3914
3915 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3916
3917 * win32-low.c: Throughout, fix format strings and casts of
3918 printf-like functions to avoid type related warnings on all
3919 platforms.
3920 (get_child_debug_event): Print dwDebugEventCode as hex since
3921 that's how it's usually documented.
3922
3923 2013-02-28 Yao Qi <yao@codesourcery.com>
3924
3925 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3926 pulongest.
3927
3928 2013-02-27 Jiong Wang <jiwang@tilera.com>
3929
3930 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3931 (reg-tilegx32.c): New rule.
3932 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3933 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3934 different register info initializer according to elf class.
3935 (init_registers_tilgx32): New function. The tilegx32 register info
3936 initializer.
3937 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3938 (tile_store_gregset): Likewise.
3939
3940 2013-02-27 Yao Qi <yao@codesourcery.com>
3941
3942 * server.c (process_point_options): Print debug message when
3943 debug_threads is true.
3944
3945 2013-02-26 Yao Qi <yao@codesourcery.com>
3946
3947 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3948
3949 2013-02-19 Pedro Alves <palves@redhat.com>
3950 Kai Tietz <ktietz@redhat.com>
3951
3952 PR gdb/15161
3953
3954 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3955 instead of strtoul to extract address from packet.
3956 (process_serial_event) <'z'>: Likewise.
3957
3958 2013-02-18 Yao Qi <yao@codesourcery.com>
3959
3960 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3961
3962 2013-02-14 Pedro Alves <palves@redhat.com>
3963
3964 Plug memory leak.
3965
3966 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3967 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3968
3969 2013-02-14 Pedro Alves <palves@redhat.com>
3970
3971 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3972
3973 2013-02-14 Pedro Alves <palves@redhat.com>
3974
3975 * tracepoint.c (save_string): Delete.
3976 (add_tracepoint_action): Use savestring instead of save_string.
3977
3978 2013-02-12 Pedro Alves <palves@redhat.com>
3979
3980 * linux-xtensa-low.c: Ditto.
3981 * xtensa-xtregs.c: Ditto.
3982
3983 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3984
3985 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3986 thread_db.
3987
3988 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3989
3990 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3991 aarch64_num_wp_regs and aarch64_num_bp_regs to
3992 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3993
3994 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3995
3996 * linux-aarch64-low.c (ps_get_thread_area): Replace
3997 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3998
3999 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4000 Marcus Shawcroft <marcus.shawcroft@arm.com>
4001 Nigel Stephens <nigel.stephens@arm.com>
4002 Yufeng Zhang <yufeng.zhang@arm.com>
4003
4004 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4005 (aarch64.c, aarch64-without-fpu.c): New targets.
4006 * configure.srv (aarch64*-*-linux*): New.
4007 * linux-aarch64-low.c: New file.
4008
4009 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4010
4011 * linux-low.c (handle_extended_wait, linux_create_inferior)
4012 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4013 (dequeue_one_deferred_signal, linux_resume_one_thread)
4014 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4015 (linux_tracefork_grandchild, linux_test_for_tracefork)
4016 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4017 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4018 where the argument is 0.
4019
4020 2013-01-25 Yao Qi <yao@codesourcery.com>
4021
4022 * event-loop.c: Include "queue.h".
4023 (gdb_event_p): New typedef.
4024 (struct gdb_event) <next_event>: Remove.
4025 (event_queue): Change to QUEUE(gdb_event_p).
4026 (async_queue_event): Remove.
4027 (gdb_event_xfree): New.
4028 (initialize_event_loop): New.
4029 (process_event): Use API from QUEUE.
4030 (wait_for_event): Likewise.
4031 * server.c (main): Call initialize_event_loop.
4032 * server.h (initialize_event_loop): Declare.
4033
4034 2013-01-18 Yao Qi <yao@codesourcery.com>
4035
4036 * ax.h (struct eval_agent_expr_context): New.
4037 (gdb_eval_agent_expr): Update declaration.
4038 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4039 TFRAME. Add new argument CTX.
4040 * server.h (struct eval_agent_expr_context): Declare.
4041 (agent_mem_read, agent_tsv_read): Update declaration.
4042 (agent_mem_read_string): Likewise.
4043 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4044 (add_traceframe_block): Add new argument TPOINT.
4045 Increase TPOINT->traceframe_usage.
4046 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4047 eval_tracepoint_agent_expr.
4048 (condition_true_at_tracepoint): Likewise.
4049 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4050 (agent_mem_read_string, agent_tsv_read): Likewise.
4051
4052 2013-01-16 Yao Qi <yao@codesourcery.com>
4053
4054 * linux-low.c (linux_resume_one_lwp): Don't check
4055 'lwp->bp_reinsert != 0'.
4056
4057 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4058 Pedro Alves <palves@redhat.com>
4059
4060 * lynx-low.c (ptrace_request_to_str): Define a temporary
4061 macro and use it to simplify this function's implementation.
4062
4063 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4064
4065 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4066 sets errno.
4067
4068 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4069
4070 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4071
4072 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4073
4074 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4075
4076 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4077
4078 * lynx-low.c (lynx_resume): Use the resume_info parameter
4079 to determine the ptid for the lynx_ptrace call, unless
4080 it is equal to minus_one_ptid, in which case we use the
4081 ptid of the current_inferior.
4082 (lynx_wait_1): After having received a thread create/exit
4083 event, resume the inferior's execution using the signaling
4084 thread's ptid, rather than the old ptid.
4085
4086 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4087
4088 * lynx-low.c (lynx_resume): Delete variable ret.
4089
4090 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4091
4092 * gdbreplay.c (gdbreplay_version): Update copyright year.
4093 * server.c (gdbserver_version): Likewise.
4094
4095 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4096
4097 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4098 new thread.
4099
4100 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4101
4102 * lynx-low.c (ptrace_request_to_str): Add handling for
4103 PTRACE_GETTRACESIG.
4104
4105 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4106
4107 * lynx-low.c (lynx_attach): Delete variable new_process.
4108
4109 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4110
4111 * lynx-low.c (lynx_create_inferior): Delete variable
4112 new_process.
4113
4114 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4115
4116 * lynx-low.c (ptrace_request_to_str): Do not handle
4117 PTRACE_GETTHREADLIST if this macro does not exist.
4118
4119 2012-12-15 Yao Qi <yao@codesourcery.com>
4120
4121 * Makefile.in (OBS): Add notif.o.
4122 * notif.c, notif.h: New.
4123 * server.c: Include "notif.h".
4124 (struct vstop_notif) <next>: Remove.
4125 <base>: New field.
4126 (queue_stop_reply): Update.
4127 (push_event, send_next_stop_reply): Remove.
4128 (discard_queued_stop_replies): Update.
4129 (notif_stop): New variable.
4130 (handle_v_stopped): Remove.
4131 (handle_v_requests): Don't call handle_v_stopped. Call
4132 handle_ack_notif instead.
4133 (queue_stop_reply_callback): Call notif_event_enque instead
4134 of queue_stop_reply.
4135 (handle_status): Don't call send_next_stop_reply, call
4136 notif_write_event instead.
4137 (kill_inferior_callback): Likewise.
4138 (detach_or_kill_inferior_callback): Likewise.
4139 (main): Call initialize_notif.
4140 (process_serial_event): Call QUEUE_is_empty.
4141 (handle_target_event): Call notif_push instead of push event.
4142 * server.h (push_event): Remove declaration.
4143
4144 2012-12-10 Tom Tromey <tromey@redhat.com>
4145
4146 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4147 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4148 macros.
4149 (.c.o): Rewrite.
4150 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4151 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4152 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4153 (amd64-linux-ipa.o, ax.o): Rewrite.
4154 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4155 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4156 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4157 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4158 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4159 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4160 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4161 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4162 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4163 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4164 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4165 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4166 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4167 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4168 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4169 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4170 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4171 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4172 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4173 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4174 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4175 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4176 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4177 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4178 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4179 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4180 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4181 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4182 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4183 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4184 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4185 (reg-tilegx.o): Remove.
4186 (all_object_files): New macro.
4187 Include .deps files.
4188 * aclocal.m4, configure: Rebuild.
4189 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4190 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4191 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4192
4193 2012-12-05 Tom Tromey <tromey@redhat.com>
4194
4195 PR gdb/14917:
4196 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4197
4198 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4199
4200 * configure.ac: Check for linux/perf_event.h.
4201 * config.in: Regenerated.
4202 * configure: Regenerated.
4203
4204 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4205
4206 * hostio.c (handle_readlink): Decrease buffer size
4207 parameter passed to readlink by one byte.
4208
4209 2012-11-26 Yao Qi <yao@codesourcery.com>
4210
4211 * configure.ac (build_warnings): Append '-Wempty-body'.
4212 * configure: Regenerated.
4213 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4214 body.
4215
4216 2012-11-15 Pierre Muller <muller@sourceware.org>
4217
4218 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4219 * config.in: Regenerate.
4220 * configure: Regenerate.
4221 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4222 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4223 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4224 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4225 header.
4226 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4227 instead of <sys/wait.h> header.
4228 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4229
4230 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4231
4232 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4233 (various make rules): Remove -DGDBSERVER
4234
4235 2012-11-09 Yao Qi <yao@codesourcery.com>
4236
4237 * spu-low.c (current_ptid): Move it to ..
4238 * gdbthread.h: ... here. New.
4239 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4240 * server.c (myresume, process_serial_event): Likewise.
4241 * thread-db.c (thread_db_find_new_threads): Likewise.
4242 * tracepoint.c (run_inferior_command): Likewise.
4243
4244 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4245
4246 * server.c (handle_search_memory_1): Include access length in
4247 warning message.
4248
4249 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4250
4251 * linux-crisv32-low.c: Fix compile errors.
4252
4253 2012-09-04 Yao Qi <yao@codesourcery.com>
4254
4255 * tracepoint.c (cmd_qtsv): Adjust debug message.
4256 Don't check CUR_TPOINT.
4257
4258 2012-08-28 Yao Qi <yao@codesourcery.com>
4259
4260 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4261 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4262 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4263 Remove declarations of xmalloc, xreallloc, xstrdup and
4264 freeargv.
4265 * Makefile.in (libiberty_h): New.
4266 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4267 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4268
4269 2012-08-23 Yao Qi <yao@codesourcery.com>
4270
4271 * server.h: Remove declaration of 'xsnprintf'.
4272
4273 2012-08-22 Keith Seitz <keiths@redhat.com>
4274
4275 * server.h: Include build-gnulib-gbserver/config.h.
4276 * gdbreplay.c: Likewise.
4277
4278 2012-08-08 Doug Evans <dje@google.com>
4279
4280 * Makefile.in (SFILES): Add gdb_vecs.c.
4281 (OBS): Add gdb_vecs.o.
4282 (gdb_vecs_h, host_defs_h): New variables.
4283 (thread-db.o): Add $(gdb_vecs_h) dependency.
4284 (gdb_vecs.o): New rule.
4285 * thread-db.c: #include "gdb_vecs.h".
4286 (thread_db_load_search): Use a vector to iterate over path elements.
4287 Handle text appearing after "$pdir".
4288
4289 * configure.ac: Add check for strstr.
4290 * config.in: Regenerate.
4291 * configure: Regenerate.
4292
4293 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4294
4295 * hostio.c (handle_pread): If pread fails, fall back to attempting
4296 lseek/read.
4297 (handle_pwrite): Likewise for pwrite.
4298
4299 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4300
4301 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4302 between unsupported TYPE and unimplementable ADDR/LEN combination.
4303 (arm_insert_point): Act on new return value.
4304
4305 2012-07-31 Pedro Alves <palves@redhat.com>
4306
4307 * server.c (process_point_options): Only skip tokens if we find
4308 one that is unrecognized. Don't treat 'X' specially while
4309 skipping unrecognized tokens.
4310
4311 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4312
4313 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4314 to 4-byte-align HW breakpoint addresses for Thumb.
4315
4316 2012-07-27 Yao Qi <yao@codesourcery.com>
4317
4318 PR remote/14161.
4319
4320 * server.h: Declare gdb_agent_about_to_close.
4321 * target.c (kill_inferior): Include "agent.h".
4322 New. Send command 'kill'.
4323 * target.h (kill_inferior): Removed macro.
4324 * tracepoint.c (gdb_agent_about_to_close): New.
4325 (gdb_agent_helper_thread): Handle command 'close'.
4326 Wait endlessly until the inferior stops.
4327 Install gdb_agent_remove_socket to atexit hook.
4328 (agent_socket_name): New static variable.
4329 (gdb_agent_socket_init): Replace local variable 'name' with
4330 'agent_socket_name'.
4331 (gdb_agent_remove_socket): New.
4332
4333 2012-07-27 Yao Qi <yao@codesourcery.com>
4334
4335 * server.c (process_point_options): Stop at 'X' when parsing.
4336
4337 2012-07-19 Michael Eager <eager@eagercon.com>
4338
4339 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4340 to hw_execute.
4341 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4342 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4343 hardware breakpoint.
4344
4345 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4346
4347 * gdbserver/linux-low.c (initialize_low): Call
4348 linux_ptrace_init_warnings.
4349
4350 2012-07-02 Doug Evans <dje@google.com>
4351
4352 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4353 pointer to int.
4354
4355 2012-07-02 Stan Shebs <stan@codesourcery.com>
4356
4357 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4358 (ax.o): Add it to build rule.
4359 (ax-ipa.o): Ditto.
4360 (OBS): Add format.o.
4361 (IPA_OBS): Add format.o.
4362 * server.c (handle_query): Claim support for breakpoint commands.
4363 (process_point_options): Add command case.
4364 (process_serial_event): Leave running if there are printfs in
4365 effect.
4366 * mem-break.h (any_persistent_commands): Declare.
4367 (add_breakpoint_commands): Declare.
4368 (gdb_no_commands_at_breakpoint): Declare.
4369 (run_breakpoint_commands): Declare.
4370 * mem-break.c (struct point_command_list): New struct.
4371 (struct breakpoint): New field command_list.
4372 (any_persistent_commands): New function.
4373 (add_commands_to_breakpoint): New function.
4374 (add_breakpoint_commands): New function.
4375 (gdb_no_commands_at_breakpoint): New function.
4376 (run_breakpoint_commands): New function.
4377 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4378 locally.
4379 * ax.c: Include format.h.
4380 (ax_printf): New function.
4381 (gdb_eval_agent_expr): Add printf opcode.
4382
4383 2012-06-13 Yao Qi <yao@codesourcery.com>
4384
4385 * server.c (start_inferior): Remove duplicated writes to fields
4386 'last_resume_kind' and 'last_status' of 'current_inferior'.
4387
4388 2012-06-12 Yao Qi <yao@codesourcery.com>
4389 Pedro Alves <palves@redhat.com>
4390
4391 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4392 comment.
4393 * server.c (handle_v_cont): Extend comment.
4394
4395 2012-06-11 Yao Qi <yao@codesourcery.com>
4396
4397 * linux-low.c (linux_attach): Add 'static'.
4398
4399 2012-06-06 Yao Qi <yao@codesourcery.com>
4400
4401 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4402
4403 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4404
4405 Fix gcc -flto compilation warning.
4406 * server.c (main): Make variable multi_mode and attach volatile.
4407
4408 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4409
4410 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4411 if the platform doesn't know about it.
4412
4413 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4414
4415 * Makefile.in (SFILES): Add linux-tile-low.c.
4416 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4417 * configure.srv: Handle tilegx-*-linux*.
4418 * linux-tile-low.c: New file.
4419
4420 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4421
4422 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4423
4424 2012-05-24 Pedro Alves <palves@redhat.com>
4425
4426 PR gdb/7205
4427
4428 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4429
4430 2012-05-24 Pedro Alves <palves@redhat.com>
4431
4432 PR gdb/7205
4433
4434 Replace target_signal with gdb_signal throughout.
4435
4436 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4437
4438 * linux-low.c (linux_store_registers): Avoid the copying sequence
4439 when no data has been retrieved by ptrace.
4440
4441 2012-05-22 Will Deacon <will.deacon@arm.com>
4442
4443 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4444 Include asm/ptrace.h.
4445 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4446 already defined.
4447
4448 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4449
4450 * linux-low.c (linux_store_registers): Don't re-retrieve data
4451 with ptrace that has already been obtained from /proc. Always
4452 copy any data retrieved with ptrace to the buffer supplied.
4453
4454 2012-05-11 Yao Qi <yao@codesourcery.com>
4455 Pedro Alves <palves@redhat.com>
4456
4457 * linux-low.c (enum stopping_threads_kind): New.
4458 (stopping_threads): Change type to `enum stopping_threads_kind'.
4459 (handle_extended_wait): If stopping and suspending threads, leave
4460 the new_lwp suspended too.
4461 (linux_wait_for_event): Adjust.
4462 (stop_all_lwps): Set `stopping_threads' to
4463 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4464 whether we're suspending threads or just stopping them. Assert no
4465 recursion happens.
4466
4467 2012-04-29 Yao Qi <yao@codesourcery.com>
4468
4469 * server.h: Move some code to ...
4470 * gdbthread.h: ... here. New.
4471 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4472 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4473 (nto-low.o, win32-low.o): Likewise.
4474 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4475 * regcache.c, remote-utils.c, server.c: Likewise.
4476 * target.c, tracepoint.c, win32-low.c: Likewise.
4477
4478 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4479
4480 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4481 (PTRACE_ARG4_TYPE): Likewise.
4482 (PTRACE_XFER_TYPE): Likewise.
4483 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4484 ptrace to PTRACE_ARG3_TYPE.
4485 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4486 (PTRACE_ARG4_TYPE): Likewise.
4487 (PTRACE_XFER_TYPE): Likewise.
4488 (linux_detach_one_lwp): Cast fourth argument of
4489 ptrace to long then PTRACE_ARG4_TYPE.
4490 (regsets_fetch_inferior_registers): Cast third argument of
4491 ptrace to long then PTRACE_ARG3_TYPE.
4492 (regsets_store_inferior_registers): Likewise.
4493
4494 2012-04-20 Pedro Alves <palves@redhat.com>
4495
4496 * configure: Regenerate.
4497
4498 2012-04-19 Pedro Alves <palves@redhat.com>
4499
4500 * Makefile.in (GNULIB_BUILDDIR): New.
4501 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4502 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4503 (all, install-only, uninstall, clean-info, all-lib, clean): No
4504 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4505 (maintainer-clean realclean distclean): Use subdir_do.
4506 (subdir_do): New.
4507 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4508 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4509 * acinclude.m4: Include acx_configure_dir.m4.
4510 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4511 calls. Call AC_PROG_RANLIB. Configure gnulib using
4512 ACX_CONFIGURE_DIR.
4513 (GNULIB): New.
4514 (GNULIB_STDINT_H): Adjust.
4515 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4516 * gdbreplay.c: Include build-gnulib/config.h.
4517 * server.h: Likewise.
4518 * aclocal.m4: Regenerate.
4519 * config.in: Regenerate.
4520 * configure: Regenerate.
4521
4522 2012-04-19 Pedro Alves <palves@redhat.com>
4523
4524 * Makefile.in (LIBGNU, INCGNU): Adjust.
4525 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4526 (all, install-only, uninstall, clean-info, all-lib, clean)
4527 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4528 * configure.ac: Adjust AC_OUTPUT output.
4529 * aclocal.m4: Regenerate.
4530 * configure: Regenerate.
4531
4532 2012-04-19 Pedro Alves <palves@redhat.com>
4533
4534 * Makefile.in (generated_files): New.
4535 (server_h): Remove the explicit dependency on config.h, and depend
4536 on $generated_files.
4537
4538 2012-04-19 Pedro Alves <palves@redhat.com>
4539
4540 * Makefile.in (INCGNU): Add -Ignulib.
4541
4542 2012-04-19 Pedro Alves <palves@redhat.com>
4543
4544 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4545 (INCGNU): ... this, and spell out -I here.
4546 (GNULIB_LIB): Rename to ...
4547 (LIBGNU): ... this.
4548 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4549
4550 2012-04-19 Pedro Alves <palves@redhat.com>
4551
4552 * config.in: Regenerate.
4553
4554 2012-04-19 Pedro Alves <palves@redhat.com>
4555
4556 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4557 * server.h (memmem): Remove declaration.
4558 * config.in: Regenerate.
4559 * configure: Regenerate.
4560
4561 2012-04-19 Yao Qi <yao@codesourcery.com>
4562
4563 * Makefile.in (SFILES): Add common/vec.c.
4564 (OBS): Add vec.o.
4565 (vec.o): New rule.
4566
4567 2012-04-19 Yao Qi <yao@codesourcery.com>
4568
4569 * remote-utils.c (prepare_resume_reply): Replace with macro
4570 target_core_of_thread.
4571 * server.c (handle_qxfer_threads_proper): Likewise.
4572 * target.h (traget_core_of_thread): New macro.
4573
4574 2012-04-18 Pedro Alves <palves@redhat.com>
4575
4576 * aclocal.m4: Regenerate.
4577 * configure: Regenerate.
4578
4579 2012-04-16 Yao Qi <yao@codesourcery.com>
4580
4581 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4582 duplicated on address.
4583
4584 2012-04-16 Yao Qi <yao@codesourcery.com>
4585
4586 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4587 (struct tracepoint_action_ops) <send>: New field.
4588 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4589 (agent_expr_send, x_tracepoint_action_send): New.
4590 (l_tracepoint_action_send): New.
4591 (cmd_qtdp): Download and install tracepoint
4592 according to `use_agent'.
4593 (run_inferior_command): Add one more parameter `len'.
4594 Update callers.
4595 (tracepoint_send_agent): New.
4596 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4597
4598 2012-04-16 Yao Qi <yao@codesourcery.com>
4599
4600 * tracepoint.c (download_tracepoints): Moved to ...
4601 (cmd_qtstart): ... here.
4602
4603 2012-04-14 Yao Qi <yao@codesourcery.com>
4604
4605 * tracepoint.c: Include inttypes.h.
4606 (struct collect_memory_action): Use sized types.
4607 (struct tracepoint): Likewise.
4608 (cmd_qtdp, stop_tracing): Update print specifiers.
4609 (cmd_qtp, response_tracepoint): Likewise.
4610 (collect_data_at_tracepoint): Likewise.
4611 (collect_data_at_step): Likewise.
4612
4613 2012-04-14 Yao Qi <yao@codesourcery.com>
4614
4615 Import gnulib module inttypes.
4616 * aclocal.m4, config.in, configure: Regenerated.
4617
4618 2012-04-14 Yao Qi <yao@codesourcery.com>
4619
4620 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4621 Makefile and config.status at last.
4622
4623 2012-04-13 Yao Qi <yao@codesourcery.com>
4624
4625 * tracepoint.c: Include stdint.h unconditionally.
4626
4627 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4628
4629 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4630 on BFD_HAVE_SYS_PROCFS_TYPE.
4631 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4632 * configure: Regenerate.
4633 * config.in: Likewise.
4634
4635 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4636
4637 * Makefile.in (clean): Also remove x32.c x32-linux.c
4638 x32-avx.c x32-avx-linux.c.
4639 (x32.o): New target.
4640 (x32.c): Likewise.
4641 (x32-linux.o): Likewise.
4642 (x32-linux.c): Likewise.
4643 (x32-avx.o): Likewise.
4644 (x32-avx.c): Likewise.
4645 (x32-avx-linux.o): Likewise.
4646 (x32-avx-linux.c): Likewise.
4647
4648 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4649 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4650 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4651 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4652 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4653 i386/x32-avx-linux.xml.
4654
4655 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4656 (init_registers_x32_avx_linux): Likwise.
4657 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4658 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4659
4660 2012-04-13 Pedro Alves <palves@redhat.com>
4661
4662 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4663 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4664 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4665 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4666 the sub-make.
4667
4668 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4669
4670 * linux-x86-low.c (compat_x32_clock_t): New.
4671 (compat_x32_siginfo_t): Likewise.
4672 (compat_x32_siginfo_from_siginfo): Likewise.
4673 (siginfo_from_compat_x32_siginfo): Likewise.
4674 (linux_is_elf64): Likewise.
4675 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4676 and siginfo_from_compat_x32_siginfo for x32.
4677 (x86_arch_setup): Set linux_is_elf64.
4678
4679 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4680
4681 PR gdb/13969
4682 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4683 e_machine field.
4684 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4685 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4686 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4687 compatible with process.
4688
4689 2012-04-12 Yao Qi <yao@codesourcery.com>
4690
4691 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4692 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4693 (install-only, install-info, clean): Handle sub dir gnulib.
4694 (all-lib, am--refresh): New targets.
4695 (memmem.o): Remove target.
4696 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4697 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4698 (AC_REPLACE_FUNCS): Remove memmem.
4699 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4700 (AC_OUTPUT): Generate Makefile in gnulib/.
4701 * aclocal.m4, config.in, configure: Regenerated.
4702
4703 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4704
4705 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4706
4707 2012-04-05 Pedro Alves <palves@redhat.com>
4708
4709 -Werror=strict-aliasing
4710
4711 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4712 pointer.
4713
4714 2012-04-04 Pedro Alves <palves@redhat.com>
4715
4716 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4717 (sparc_store_gregset_from_stack, sparc_store_gregset)
4718 (sparc_breakpoint_at): Fix formatting.
4719
4720 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4721
4722 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4723 are available.
4724 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4725 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4726 * config.in: Regenerate.
4727 * configure: Likewise.
4728
4729 2012-03-29 Pedro Alves <palves@redhat.com>
4730
4731 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4732 Correct ptrace arguments.
4733
4734 2012-03-28 Pedro Alves <palves@redhat.com>
4735
4736 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4737 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4738 (IA64_FR1_REGNUM): New defines.
4739 (ia64_fetch_register): New.
4740 (the_low_target): Install it.
4741 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4742 field.
4743 * linux-low.c (linux_fetch_registers): Try the
4744 the_low_target.fetch_register hook first.
4745
4746 * linux-arm-low.c (the_low_target): Adjust.
4747 * linux-bfin-low.c (the_low_target): Adjust.
4748 * linux-cris-low.c (the_low_target): Adjust.
4749 * linux-crisv32-low.c (the_low_target): Adjust.
4750 * linux-m32r-low.c (the_low_target): Adjust.
4751 * linux-m68k-low.c (the_low_target): Adjust.
4752 * linux-mips-low.c (the_low_target): Adjust.
4753 * linux-ppc-low.c (the_low_target): Adjust.
4754 * linux-s390-low.c (the_low_target): Adjust.
4755 * linux-sh-low.c (the_low_target): Adjust.
4756 * linux-sparc-low.c (the_low_target): Adjust.
4757 * linux-tic6x-low.c (the_low_target): Adjust.
4758 * linux-x86-low.c (the_low_target): Adjust.
4759 * linux-xtensa-low.c (the_low_target): Adjust.
4760
4761 2012-03-26 Pedro Alves <palves@redhat.com>
4762
4763 * server.c (handle_qxfer_libraries): Don't bail early if
4764 the_target->qxfer_libraries_svr4 is not NULL.
4765
4766 2012-03-26 Pedro Alves <palves@redhat.com>
4767
4768 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4769
4770 2012-03-23 Pedro Alves <palves@redhat.com>
4771
4772 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4773 "library-list-svr4" element's start tag when the the DSO list is
4774 empty.
4775
4776 2012-03-23 Pedro Alves <palves@redhat.com>
4777
4778 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4779 a variable whose type size is the same as the inferior's pointer
4780 size.
4781
4782 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4783
4784 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4785 struct siginfo.
4786 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4787 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4788 * linux-low.h: Include <signal.h>.
4789 (struct siginfo): Remove forward declaration.
4790 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4791 struct siginfo.
4792
4793 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4794
4795 * .gitignore: Ignore more files.
4796
4797 2012-03-19 Pedro Alves <palves@redhat.com>
4798 Jan Kratochvil <jan.kratochvil@redhat.com>
4799
4800 * server.c (cont_thread, general_thread): Add describing comments.
4801 (start_inferior): Clear `cont_thread'.
4802 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4803 of a process.
4804
4805 2012-03-15 Yao Qi <yao@codesourcery.com>
4806
4807 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4808 handling to ...
4809 (cmd_qtdp): ... here.
4810
4811 2012-03-15 Yao Qi <yao@codesourcery.com>
4812
4813 * tracepoint.c (struct tracepoint_action_ops): New.
4814 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4815 (m_tracepoint_action_download): New.
4816 (r_tracepoint_action_download): New.
4817 (x_tracepoint_action_download): New.
4818 (l_tracepoint_action_download): New.
4819 (add_tracepoint_action): Install `action->ops' according type.
4820 (download_tracepoint_1): Move code `download' function pointer
4821 of various tracepoint_action_ops.
4822
4823 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4824
4825 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4826 linux_ptrace_attach_warnings.
4827
4828 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4829
4830 * Makefile.in (linux-ptrace.o): New.
4831 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4832 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4833 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4834 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4835 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4836 of these targets.
4837 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4838
4839 2012-03-08 Yao Qi <yao@codesourcery.com>
4840 Pedro Alves <palves@redhat.com>
4841
4842 Fix PR server/13392.
4843 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4844 offset of JMP insn.
4845 * tracepoint.c (remove_tracepoint): New.
4846 (cmd_qtdp): Call remove_tracepoint when failed to install.
4847
4848 2012-03-07 Pedro Alves <palves@redhat.com>
4849
4850 * linux-low.c (get_detach_signal): New.
4851 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4852 Pass on pending signals to PTRACE_DETACH. Check the result of the
4853 ptrace call.
4854 * server.c (program_signals, program_signals_p): New.
4855 (handle_general_set): Handle QProgramSignals.
4856 * server.h (program_signals, program_signals_p): Declare.
4857
4858 2012-03-05 Pedro Alves <palves@redhat.com>
4859 Jan Kratochvil <jan.kratochvil@redhat.com>
4860
4861 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4862 New comment why.
4863
4864 2012-03-03 Yao Qi <yao@codesourcery.com>
4865
4866 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4867 agent_look_up_symbols.
4868
4869 2012-03-03 Yao Qi <yao@codesourcery.com>
4870
4871 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4872 (linux-x86-low.o): Likewise.
4873 * server.h: Remove in_process_agent_loaded.
4874 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4875 common/agent.c.
4876 Update callers.
4877
4878 2012-03-03 Yao Qi <yao@codesourcery.com>
4879
4880 * tracepoint.c (gdb_agent_capability): New global.
4881 (in_process_agent_loaded_ust): Renamed to
4882 `in_process_agent_supports_ust'.
4883 Update callers.
4884 (in_process_agent_supports_ust): Call agent_capability_check.
4885 (clear_installed_tracepoints): Assert that agent supports
4886 agent.
4887
4888 2012-03-03 Yao Qi <yao@codesourcery.com>
4889
4890 * linux-low.c (linux_supports_agent): New.
4891 (linux_target_ops): Initialize field `supports_agent' with
4892 linux_supports_agent.
4893 * target.h (struct target_ops) <supports_agent>: New.
4894 (target_supports_agent): New macro.
4895 * server.c (handle_general_set): Handle packet 'QAgent'.
4896 (handle_query): Send `QAgent+'.
4897 * Makefile.in (server.o): Depends on agent.h.
4898
4899 2012-03-03 Yao Qi <yao@codesourcery.com>
4900
4901 * Makefile.in (OBS): Add agent.o.
4902 Add new rule for agent.o.
4903 Track dependence of tracepoint.c on agent.h.
4904 * tracepoint.c (run_inferior_command_1):
4905 (run_inferior_command): Call agent_run_command.
4906 (gdb_ust_connect_sync_socket): Deleted. Move it to
4907 common/agent.c.
4908 (resume_thread, stop_thread): Likewise.
4909 (gdb_ust_socket_init): Renamed to ...
4910 (gdb_agent_socket_init): ... New.
4911 (gdb_ust_thread): Renamed to ...
4912 (gdb_agent_helper_thread): ... New.
4913 (gdb_ust_init): Move some code to ...
4914 (gdb_agent_init): ... here. New.
4915 [HAVE_UST]: Call gdb_ust_init.
4916 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4917 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4918 * config.in, configure: Regenerated.
4919
4920 2012-03-02 Pedro Alves <palves@redhat.com>
4921
4922 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4923 * linux-low.c (struct simple_pid_list): New.
4924 (stopped_pids): New a struct simple_pid_list pointer.
4925 (add_to_pid_list, pull_pid_from_list): New.
4926 (handle_extended_wait): Don't assume the first signal new children
4927 report is SIGSTOP. Adjust call to pull_pid_from_list.
4928 (linux_wait_for_lwp): Adjust.
4929
4930 2012-03-02 Yao Qi <yao@codesourcery.com>
4931
4932 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4933 debug log.
4934
4935 2012-03-02 Yao Qi <yao@codesourcery.com>
4936
4937 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4938 `stop_pc' and `tpoint'. Update caller.
4939
4940 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4941
4942 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4943 * linux-low.c (use_linux_regsets): New macro.
4944 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4945 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4946 (linux_register_in_regsets): New function.
4947 (usr_fetch_inferior_registers): Skip registers covered by
4948 regsets.
4949 (usr_store_inferior_registers): Likewise.
4950 (usr_fetch_inferior_registers): New macro.
4951 (usr_store_inferior_registers): Likewise.
4952 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4953 (linux_store_registers): Likewise.
4954 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4955 prototype.
4956 (init_registers_mips64_dsp_linux): Likewise.
4957 (init_registers_mips_linux): New macro.
4958 (init_registers_mips_dsp_linux): Likewise.
4959 (mips_dsp_num_regs): Likewise.
4960 (DSP_BASE, DSP_CONTROL): New fallback macros.
4961 (mips_base_regs): New macro.
4962 (mips_regmap): Use it. Fix the size.
4963 (mips_dsp_regmap): New variable.
4964 (mips_dsp_regset_bitmap): Likewise.
4965 (mips_arch_setup): New function.
4966 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4967 than mips_regmap.
4968 (mips_cannot_store_register): Likewise.
4969 (the_low_target): Update .arch_setup, .num_regs and .regmap
4970 initializers. Add .regset_bitmap initializer.
4971 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4972 initializer.
4973 * linux-bfin-low.c (the_low_target): Likewise.
4974 * linux-cris-low.c (the_low_target): Likewise.
4975 * linux-crisv32-low.c (the_low_target): Likewise.
4976 * linux-ia64-low.c (the_low_target): Likewise.
4977 * linux-m32r-low.c (the_low_target): Likewise.
4978 * linux-m68k-low.c (the_low_target): Likewise.
4979 * linux-ppc-low.c (the_low_target): Likewise.
4980 * linux-s390-low.c (the_low_target): Likewise.
4981 * linux-sh-low.c (the_low_target): Likewise.
4982 * linux-sparc-low.c (the_low_target): Likewise.
4983 * linux-tic6x-low.c (the_low_target): Likewise.
4984 * linux-x86-low.c (the_low_target): Likewise.
4985 * linux-xtensa-low.c (the_low_target): Likewise.
4986 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4987 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4988 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4989 srv_xmlfiles.
4990 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4991 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4992
4993 2012-02-29 Yao Qi <yao@codesourcery.com>
4994 Pedro Alves <palves@redhat.com>
4995
4996 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4997 `step_over_finished' is true.
4998
4999 2012-02-27 Pedro Alves <palves@redhat.com>
5000
5001 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5002 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5003
5004 2012-02-27 Pedro Alves <palves@redhat.com>
5005
5006 PR server/9684
5007 * linux-low.c (pid_is_stopped): New.
5008 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5009
5010 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5011
5012 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5013 of conditions.
5014
5015 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5016
5017 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5018
5019 2012-02-24 Luis Machado <lgustavo@codesourcery>
5020
5021 * server.c (handle_query): Advertise support for target-side
5022 breakpoint condition evaluation.
5023 (process_point_options): New function.
5024 (process_serial_event): When inserting a breakpoint, check for
5025 a target-side condition that should be evaluated.
5026
5027 * mem-break.c: Include regcache.h and ax.h.
5028 (point_cond_list_t): New data structure.
5029 (breakpoint) <cond_list>: New field.
5030 (find_gdb_breakpoint_at): Make non-static.
5031 (delete_gdb_breakpoint_at): Clear any target-side
5032 conditions.
5033 (clear_gdb_breakpoint_conditions): New function.
5034 (add_condition_to_breakpoint): Likewise.
5035 (add_breakpoint_condition): Likewise.
5036 (gdb_condition_true_at_breakpoint): Likewise.
5037 (gdb_breakpoint_here): Return result directly instead
5038 of going through a local variable.
5039
5040 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5041 (clear_gdb_breakpoint_conditions): Likewise.
5042 (add_breakpoint_condition): Likewise.
5043 (gdb_condition_true_at_breakpoint): Likewise.
5044
5045 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5046 (need_step_over_p): Take target-side breakpoint condition into
5047 consideration.
5048
5049 2012-02-24 Luis Machado <lgustavo@codesourcery>
5050
5051 * server.h: Include tracepoint.h.
5052 (agent_mem_read, agent_get_trace_state_variable_value,
5053 agent_set_trace_state_variable_value,
5054 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5055 get_set_tsv_func_addr): New prototypes.
5056
5057 * ax.h: New include file.
5058 * ax.c: New source file.
5059
5060 * tracepoint.c: Include ax.h.
5061 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5062 agent_expr, eval_result_type): Move to ax.h.
5063 (parse_agent_expr): Rename to ...
5064 (gdb_parse_agent_expr): ... this, make it non-static and move
5065 to ax.h.
5066 (unparse_agent_expr) Rename to ...
5067 (gdb_unparse_agent_expr): ... this, make it non-static and move
5068 to ax.h.
5069 (eval_agent_expr): Rename to ...
5070 (eval_tracepoint_agent_expr): ... this.
5071 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5072 forward declarations.
5073 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5074 (agent_get_trace_state_variable_value): New function.
5075 (agent_set_trace_state_variable_value): New function.
5076 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5077 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5078 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5079 (condition_true_at_tracepoint): Likewise.
5080 (parse_agent_expr): Rename to ...
5081 (gdb_parse_agent_expr): ... this and move to ax.c.
5082 (unparse_agent_expr): Rename to ...
5083 (gdb_unparse_agent_expr): ... this and move to ax.c.
5084 (gdb_agent_op_name): Move to ax.c.
5085 (eval_agent_expr): Rename to ...
5086 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5087 and move to ax.c.
5088 (eval_tracepoint_agent_expr): New function.
5089 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5090 non-static.
5091 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5092 ax.c.
5093 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5094 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5095 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5096 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5097 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5098 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5099 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5100 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5101 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5102 (compile_bytecodes): Remove forward declaration.
5103 (is_goto_target): Move to ax.c.
5104 (compile_bytecodes): Move to ax.c and call
5105 agent_get_trace_state_variable_value (...) and
5106 agent_set_trace_state_variable_value (...).
5107
5108 * Makefile.in: Update ax.c and IPA dependencies.
5109
5110 2012-02-24 Pedro Alves <palves@redhat.com>
5111
5112 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5113 (cmd_bigqtbuffer_circular): ... this. Only handle
5114 'QTBuffer:circular:'.
5115 (handle_tracepoint_general_set): Adjust.
5116
5117 2012-02-16 Yao Qi <yao@codesourcery.com>
5118
5119 * inferiors.c: Move code to ...
5120 * dll.c: .... here. New.
5121 * server.h: Declare clear_dlls.
5122 * Makefile.in (SFILES): Add dll.c.
5123 (OBS): Add dll.o
5124 (dll.o): New rule.
5125
5126 2012-02-11 Yao Qi <yao@codesourcery.com>
5127
5128 * server.c: (handle_monitor_command): Add a new parameter
5129 `own_buf'.
5130 (handle_query): Update caller.
5131
5132 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5133
5134 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5135 * configure, config.in: Regenerate.
5136 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5137 is not defined.
5138
5139 2012-02-02 Pedro Alves <palves@redhat.com>
5140
5141 Try SIGKILL first, then PTRACE_KILL.
5142 * linux-low.c (linux_kill_one_lwp): New.
5143 (linux_kill_one_lwp): Rename to ...
5144 (kill_one_lwp_callback): ... this. Use the new
5145 linux_kill_one_lwp.
5146
5147 2012-02-02 Pedro Alves <palves@redhat.com>
5148
5149 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5150 inferior.
5151
5152 2012-01-27 Pedro Alves <palves@redhat.com>
5153
5154 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5155 (elf_64_file_p): Make static.
5156 (linux_pid_exe_is_elf_64_file): New.
5157 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5158 Delete declarations.
5159 (linux_pid_exe_is_elf_64_file): Declare.
5160 * linux-x86-low.c (x86_arch_setup): Use
5161 linux_pid_exe_is_elf_64_file.
5162
5163 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5164
5165 * linux-low.c (linux_wait_for_event_1): Rename to ...
5166 (linux_wait_for_event): ... here and merge it with former
5167 linux_wait_for_event - new variable wait_ptid, use it.
5168 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5169
5170 2012-01-23 Pedro Alves <palves@redhat.com>
5171
5172 * server.c (main): Avoid yet another case of infinite loop while
5173 detaching/killing after a longjmp.
5174
5175 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5176
5177 Code cleanup.
5178 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5179
5180 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5181
5182 * hostio.c (handle_readlink): New function.
5183 (handle_vFile): Call it to handle "vFile:readlink" packets.
5184
5185 2012-01-20 Pedro Alves <palves@redhat.com>
5186 Ulrich Weigand <ulrich.weigand@linaro.org>
5187
5188 * server.c (handle_v_requests): Only support vAttach and vRun to
5189 start multiple processes when in extended protocol mode.
5190
5191 2012-01-17 Pedro Alves <palves@redhat.com>
5192
5193 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5194 memalign plus mprotect to allocate the scratch buffer.
5195
5196 2012-01-13 Pedro Alves <palves@redhat.com>
5197
5198 * server.c (attach_inferior): Clear `cont_thread'.
5199
5200 2012-01-13 Pedro Alves <palves@redhat.com>
5201
5202 * server.c (main): Avoid infinite loop while detaching/killing
5203 after a longjmp.
5204
5205 2012-01-09 Doug Evans <dje@google.com>
5206
5207 * server.c (start_inferior): Set last_ptid in --wrapper case.
5208
5209 2012-01-06 Yao Qi <yao@codesourcery.com>
5210
5211 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5212 defined.
5213 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5214
5215 2012-01-04 Yao Qi <yao@codesourcery.com>
5216
5217 * tracepoint.c (cmd_qtdp): Print debug message
5218 for static tracepoint.
5219
5220 2012-01-04 Yao Qi <yao@codesourcery.com>
5221
5222 * tracepoint.c (trace_vdebug): Differentiate debug message
5223 between gdbserver and IPA.
5224
5225 2012-01-03 Yao Qi <yao@codesourcery.com>
5226
5227 * tracepoint.c (tracepoint_was_hit): Don't collect for
5228 static tracepoint.
5229
5230 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5231
5232 * terminal.h: Reformat copyright header.
5233
5234 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5235
5236 * server.c (gdbserver_version): Update copyright year.
5237 * gdbreplay.c (gdbreplay_version): Likewise.
5238
5239 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5240
5241 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5242
5243 Revert:
5244 2011-12-18 Hui Zhu <teawater@gmail.com>
5245 * linux-low.c (linux_create_inferior): Save return value to ret.
5246
5247 2011-12-18 Hui Zhu <teawater@gmail.com>
5248
5249 * linux-low.c (linux_create_inferior): Save return value to ret.
5250
5251 2011-12-16 Doug Evans <dje@google.com>
5252
5253 * linux-low.c (linux_create_inferior): If stdio connection,
5254 redirect stdin from /dev/null, stdout to stderr.
5255 * remote-utils.c (remote_is_stdio): New static global.
5256 (remote_connection_is_stdio): New function.
5257 (remote_prepare): Handle stdio connection.
5258 (remote_open): Ditto.
5259 (remote_close): Don't close stdin for stdio connections.
5260 (read_prim,write_prim): New functions. Replace all calls to
5261 read/write to these.
5262 * server.c (main): Watch for "-" argument. Move call to
5263 remote_prepare before start_inferior.
5264 * server.h (STDIO_CONNECTION_NAME): New macro.
5265 (remote_connection_is_stdio): Declare.
5266
5267 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5268 in debugging output.
5269
5270 2011-12-15 Yao Qi <yao@codesourcery.com>
5271
5272 * tracepoint.c: Include sys/syscall.h.
5273 (gdb_ust_thread): Remove preprocessor conditional.
5274
5275 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5276
5277 * linux-low.c (linux_detach_one_lwp): Call
5278 the_low_target.prepare_to_resume before detaching.
5279
5280 2011-12-14 Yao Qi <yao@codesourcery.com>
5281
5282 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5283 of write.
5284
5285 2011-12-14 Yao Qi <yao@codesourcery.com>
5286
5287 * i386-low.c (i386_low_stopped_data_address): Initialize local
5288 variable `control'.
5289
5290 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5291
5292 PR remote/13492
5293
5294 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5295 DR_CONTROL unless necessary. Extend comments.
5296 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5297 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5298
5299 2011-12-13 Yao Qi <yao@codesourcery.com>
5300
5301 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5302 macros.
5303 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5304
5305 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5306
5307 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5308 Print new debug message for such case.
5309
5310 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5311
5312 Fix overlapping memcpy.
5313 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5314 the read_inferior_memory transfer.
5315 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5316 write_inferior_memory transfer.
5317 (set_fast_tracepoint_jump): New variable buf. Use it for the
5318 read_inferior_memory and write_inferior_memory transfers.
5319 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5320 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5321 Use it for the write_inferior_memory transfer.
5322 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5323 buffers.
5324
5325 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5326
5327 * linux-low.c (fetch_register, store_register): Make code
5328 consistent, fix formatting.
5329
5330 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5331
5332 * linux-low.c (usr_store_inferior_registers): Factor out code
5333 to handle individual registers into...
5334 (store_register): ... this new function.
5335
5336 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5337
5338 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5339 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5340 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5341 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5342 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5343 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5344 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5345 (srv_xmlfiles): Add new XML files.
5346
5347 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5348 and <sys/uio.h>.
5349 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5350 (init_registers_s390_linux32v1): Add prototype.
5351 (init_registers_s390_linux32v2): Likewise.
5352 (init_registers_s390_linux64v1): Likewise.
5353 (init_registers_s390_linux64v2): Likewise.
5354 (init_registers_s390x_linux64v1): Likewise.
5355 (init_registers_s390x_linux64v2): Likewise.
5356 (s390_num_regs): Increment to 52.
5357 (s390_regmap): Add orig_r2 register.
5358 (s390_num_regs_3264): Increment to 68.
5359 (s390_regmap_3264): Add orig_r2 register.
5360 (s390_collect_ptrace_register): Handle orig_r2 register.
5361 (s390_supply_ptrace_register): Likewise.
5362 (s390_fill_last_break): New function.
5363 (s390_store_last_break): Likewise.
5364 (s390_fill_system_call): New function.
5365 (s390_store_system_call): Likewise.
5366 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5367 register sets.
5368 (s390_check_regset): New function.
5369 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5370 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5371 Update target_regsets for available register sets.
5372
5373 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5374 Jan Kratochvil <jan.kratochvil@redhat.com>
5375
5376 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5377 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5378 New.
5379 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5380 * linux-low.h (struct process_info_private): New member r_debug.
5381 * server.c (handle_qxfer_libraries): Call
5382 the_target->qxfer_libraries_svr4.
5383 (handle_qxfer_libraries_svr4): New function.
5384 (qxfer_packets): New entry "libraries-svr4".
5385 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5386 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5387 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5388 PACKET_qXfer_libraries_svr4.
5389
5390 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5391
5392 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5393 PSW address/mask between 8-byte and 16-byte formats.
5394 (s390_supply_ptrace_register): Likewise.
5395 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5396 basic addressing mode bit.
5397
5398 2011-11-24 Stan Shebs <stan@codesourcery.com>
5399
5400 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5401
5402 2011-11-17 Stan Shebs <stan@codesourcery.com>
5403
5404 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5405 (tracing_start_time): New global.
5406 (tracing_stop_time): New global.
5407 (tracing_user_name): New global.
5408 (tracing_notes): New global.
5409 (tracing_stop_note): New global.
5410 (cmd_qtstart): Set traceframe_usage, start_time.
5411 (stop_tracing): Set stop_time.
5412 (cmd_qtstatus): Report additional status.
5413 (cmd_qtp): New function.
5414 (handle_tracepoint_query): Call it.
5415 (cmd_qtnotes): New function.
5416 (handle_tracepoint_general_set): Call it.
5417 (get_timestamp): Rename from tsv_get_timestamp.
5418
5419 2011-11-14 Stan Shebs <stan@codesourcery.com>
5420 Kwok Cheung Yeung <kcy@codesourcery.com>
5421
5422 * linux-x86-low.c (small_jump_insn): New.
5423 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5424 trampoline and error message, build a trampoline and issue a small
5425 jump instruction to it.
5426 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5427 trampoline and error message.
5428 (x86_get_min_fast_tracepoint_insn_len): New.
5429 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5430 * linux-low.h (struct linux_target_ops): Add arguments to
5431 install_fast_tracepoint_jump_pad operation, add new operation.
5432 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5433 arguments.
5434 (linux_get_min_fast_tracepoint_insn_len): New function.
5435 (linux_target_op): Add new operation.
5436 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5437 (gdb_trampoline_buffer_end): Ditto.
5438 (gdb_trampoline_buffer_error): Ditto.
5439 (struct ipa_sym_addresses): Add fields for new IPA variables.
5440 (symbol_list): Add entries for new IPA variables.
5441 (struct tracepoint): Add fields to hold the address range of the
5442 trampoline used by the tracepoint.
5443 (trampoline_buffer_head): New static variable.
5444 (trampoline_buffer_tail): Ditto.
5445 (claim_trampoline_space): New function.
5446 (have_fast_tracepoint_trampoline_buffer): New function.
5447 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5448 structure.
5449 (install_fast_tracepoint): Ditto, also add error buffer argument.
5450 (cmd_qtminftpilen): New function.
5451 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5452 (fast_tracepoint_from_trampoline_address): New function.
5453 (fast_tracepoint_collecting): Handle trampoline as part of jump
5454 pad space.
5455 (set_trampoline_buffer_space): New function.
5456 (initialize_tracepoint): Initialize new IPA variables.
5457 * target.h (struct target_ops): Add arguments to
5458 install_fast_tracepoint_jump_pad operation, add new
5459 get_min_fast_tracepoint_insn_len operation.
5460 (target_get_min_fast_tracepoint_insn_len): New.
5461 (install_fast_tracepoint_jump_pad): Add arguments.
5462 * server.h (IPA_BUFSIZ): Define.
5463 * linux-i386-ipa.c: Include extra header files.
5464 (initialize_fast_tracepoint_trampoline_buffer): New function.
5465 (initialize_low_tracepoint): Call it.
5466 * server.h (set_trampoline_buffer_space): Declare.
5467 (claim_trampoline_space): Ditto.
5468 (have_fast_tracepoint_trampoline_buffer): Ditto.
5469
5470 2011-11-14 Yao Qi <yao@codesourcery.com>
5471
5472 * server.c (handle_query): Handle InstallInTrace for qSupported.
5473 * tracepoint.c (add_tracepoint): Sort list.
5474 (install_tracepoint, download_tracepoint): New.
5475 (cmd_qtdp): Call them to install and download tracepoints.
5476 (sort_tracepoints): Removed.
5477 (cmd_qtstart): Update.
5478
5479 2011-11-14 Yao Qi <yao@codesourcery.com>
5480
5481 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5482 * mem-break.h: Declare.
5483 * tracepoint.c (cmd_qtstart): Move some code to ...
5484 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5485 New.
5486 (download_tracepoints): Move some code to ...
5487 (download_tracepoint_1): ... here. New.
5488
5489 2011-11-08 Yao Qi <yao@codesourcery.com>
5490
5491 * remote-utils.c (relocate_instruction): A comment fix.
5492
5493 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5494
5495 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5496 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5497 dr_status_mirror and dr_control_mirror from debug_reg_state.
5498 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5499 (i386_initial_stuff): Remove use of deleted globals.
5500 (i386_get_thread_context, i386_set_thread_context,
5501 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5502 from debug_reg_state.
5503
5504 2011-11-05 Yao Qi <yao@codesourcery.com>
5505
5506 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5507 address as TPOINT's.
5508
5509 2011-11-02 Stan Shebs <stan@codesourcery.com>
5510
5511 * tracepoint.c (agent_mem_read_string): New function.
5512 (eval_agent_expr): Call it for tracenz.
5513 * server.c (handle_query): Report support for tracenz.
5514
5515 2011-11-02 Yao Qi <yao@codesourcery.com>
5516
5517 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5518
5519 2011-11-02 Yao Qi <yao@codesourcery.com>
5520
5521 * target.h: Fix a typo in comment.
5522
5523 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5524
5525 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5526 clobber the breakpoints' shadows with fast tracepoint jumps.
5527 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5528 * target.c (write_inferior_memory): Also pass MYADDR down to
5529 check_mem_write.
5530
5531 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5532
5533 * configure.ac: Check support for personality routine.
5534 * configure: Regenerate.
5535 * config.in: Likewise.
5536 * linux-low.c: Include <sys/personality.h>.
5537 Define ADDR_NO_RANDOMIZE if necessary.
5538 (linux_create_inferior): Disable address space randomization when
5539 forking inferior, if requested.
5540 (linux_supports_disable_randomization): New function.
5541 (linux_target_ops): Install it.
5542 * server.h (disable_randomization): Declare.
5543 * server.c (disable_randomization): New global variable.
5544 (handle_general_set): Handle QDisableRandomization.
5545 (handle_query): Likewise for qSupported.
5546 (main): Support --disable-randomization and --no-disable-randomization
5547 command line arguments.
5548 * target.h (struct target_ops): Add supports_disable_randomization.
5549 (target_supports_disable_randomization): New macro.
5550
5551 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5552
5553 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5554 ifdef check.
5555 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5556 [!PT_GETDSBT] (target_loadmap): New definition.
5557 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5558 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5559 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5560 and PT_GETDSBT to LINUX_LOADMAP.
5561 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5562 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5563
5564 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5565
5566 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5567 (arm_linux_hwbp_cap): New static variable.
5568 (arm_linux_get_hwbp_cap): Replace by ...
5569 (arm_linux_init_hwbp_cap): ... this new function.
5570 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5571 (arm_linux_get_hw_watchpoint_count): Likewise.
5572 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5573 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5574 (arm_prepare_to_resume): Use perror_with_name instead of error.
5575
5576 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5577
5578 * linux-arm-low.c: Include <signal.h>.
5579 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5580 (struct arm_linux_hwbp_cap): New data type.
5581 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5582 (struct arm_linux_hw_breakpoint): New data type.
5583 (MAX_BPTS, MAX_WPTS): Define.
5584 (struct arch_process_info, struct arch_lwp_info): New data types.
5585 (arm_linux_get_hwbp_cap): New function.
5586 (arm_linux_get_hw_breakpoint_count): Likewise.
5587 (arm_linux_get_hw_watchpoint_count): Likewise.
5588 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5589 (arm_hwbp_control_initialize): Likewise.
5590 (arm_hwbp_control_is_enabled): Likewise.
5591 (arm_hwbp_control_is_initialized): Likewise.
5592 (arm_hwbp_control_disable): Likewise.
5593 (arm_linux_hw_breakpoint_equal): Likewise.
5594 (arm_linux_hw_point_initialize): Likewise.
5595 (struct update_registers_data): New data structure.
5596 (update_registers_callback: New function.
5597 (arm_insert_point): Likewise.
5598 (arm_remove_point): Likewise.
5599 (arm_stopped_by_watchpoint): Likewise.
5600 (arm_stopped_data_address): Likewise.
5601 (arm_new_process): Likewise.
5602 (arm_new_thread): Likewise.
5603 (arm_prepare_to_resume): Likewise.
5604 (the_low_target): Register arm_insert_point, arm_remove_point,
5605 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5606 arm_new_thread, and arm_prepare_to_resume.
5607
5608 2011-09-15 Stan Shebs <stan@codesourcery.com>
5609
5610 * server.h (struct emit_ops): Add compare-goto fields.
5611 * tracepoint.c (gdb_agent_op_sizes): New table.
5612 (emit_eq_goto): New function.
5613 (emit_ne_goto): New function.
5614 (emit_lt_goto): New function.
5615 (emit_le_goto): New function.
5616 (emit_gt_goto): New function.
5617 (emit_ge_goto): New function.
5618 (is_goto_target): New function.
5619 (compile_bytecodes): Recognize special cases of compare-goto
5620 combinations and call specialized emitters for them.
5621 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5622 (amd64_emit_ne_goto): New function.
5623 (amd64_emit_lt_goto): New function.
5624 (amd64_emit_le_goto): New function.
5625 (amd64_emit_gt_goto): New function.
5626 (amd64_emit_ge_goto): New function.
5627 (amd64_emit_ops): Add the new functions.
5628 (i386_emit_eq_goto): New function.
5629 (i386_emit_ne_goto): New function.
5630 (i386_emit_lt_goto): New function.
5631 (i386_emit_le_goto): New function.
5632 (i386_emit_gt_goto): New function.
5633 (i386_emit_ge_goto): New function.
5634 (i386_emit_ops): Add the new functions.
5635
5636 2011-09-08 Stan Shebs <stan@codesourcery.com>
5637
5638 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5639 (i386_emit_epilogue): Restore %ebx.
5640
5641 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5642
5643 * server.c (step_thread): Remove definition.
5644 (process_serial_event): Don't handle Hs.
5645 * server.h (step_thread): Remove declaration.
5646 * target.c (set_desired_inferior): Remove use of step_thread.
5647
5648 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5649
5650 * linux-low.c: Include linux-procfs.h.
5651 (linux_attach_lwp_1): Update comments.
5652 (linux_attach): Scan for existing threads when attaching to a
5653 process that is the tgid.
5654 * Makefile.in: Update dependencies.
5655
5656 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5657
5658 * configure.srv: Add linux-procfs.o dependencies.
5659
5660 2011-08-14 Yao Qi <yao@codesourcery.com>
5661
5662 * target.h (struct target_ops): Fix indent.
5663 * win32-low.c (win32_target_ops): Fix comment.
5664
5665 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5666 Yao Qi <yao@codesourcery.com>
5667
5668 * Makefile.in (clean): Remove tic6x-*.c files.
5669 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5670 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5671 (tic6x-c64xp-linux.c): Likewise.
5672 * configure.srv: Add support for tic6x-*-uclinux.
5673 * linux-tic6x-low.c: New.
5674 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5675
5676 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5677 Yao Qi <yao@codesourcery.com>
5678
5679 * target.h (struct target_ops): Add read_loadmap.
5680 * linux-low.c (struct target_loadseg): New type.
5681 (struct target_loadmap): New type.
5682 (linux_read_loadmap): New function.
5683 (linux_target_ops): Add linux_read_loadmap.
5684 * server.c (handle_query): Support qXfer:fdpic:read packet.
5685 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5686 to NULL.
5687
5688 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5689
5690 * win32-low.c: Include <stdint.h>.
5691
5692 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5693
5694 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5695 to the inferior here.
5696 (i386_remove_aligned_watchpoint): Ditto.
5697 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5698 fit part of the watchpoint in the debug registers.
5699 (i386_update_inferior_debug_regs): New.
5700 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5701 registers, and only update the inferior on success.
5702 (i386_low_remove_watchpoint): Ditto.
5703
5704 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5705
5706 * linux-low.c (compare_ints, unique, list_threads, show_process,
5707 linux_core_of_thread): Delete.
5708 (linux_target_ops): Change linux_core_of_thread to
5709 linux_common_core_of_thread.
5710 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5711 * utils.c (malloc_failure): Change type of argument.
5712 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5713 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5714 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5715 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5716 (IPA_OBJS): Add common-utils-ipa.o.
5717 (ptid_h, linux_osdata_h): New macros.
5718 (server_h): Add common/common-utils.h, common/xml-utils.h,
5719 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5720 common/ptid.h.
5721 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5722 ptid.o, buffer.o): New rules.
5723 (linux-low.o): Add common/linux-osdata.h as a dependency.
5724 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5725 * configure.ac: Add AC_HEADER_DIRENT check.
5726 * config.in: Regenerate.
5727 * configure: Regenerate.
5728 * remote-utils.c (xml_escape_text): Delete.
5729 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5730 buffer_xml_printf): Move to common/buffer.c.
5731 * server.c (main): Remove call to initialize_inferiors.
5732 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5733 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5734 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5735 internal_error, gdb_assert, gdb_assert_fail): Delete.
5736 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5737 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5738 common/buffer.h.
5739 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5740 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5741 initialize_inferiors): Delete.
5742
5743 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5744
5745 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5746 symbol error.
5747
5748 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5749
5750 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5751 assertion.
5752 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5753
5754 2011-05-26 Yao Qi <yao@codesourcery.com>
5755
5756 * Makefile.in (thread-db.o): Track dependence to
5757 common/gdb_thread_db.h.
5758 * thread-db.c: include gdb_thread_db.h from right place.
5759
5760 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5761
5762 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5763 __FILE__ and __LINE__ to internal_error.
5764
5765 2011-05-13 Doug Evans <dje@google.com>
5766
5767 * thread-db.c (try_thread_db_load_from_sdir): New function.
5768 (try_thread_db_load_from_dir): New function.
5769 (thread_db_load_search): Handle $sdir, ignore $pdir.
5770 Remove trying of system directories if search of
5771 libthread-db-search-path fails, that is now done via $sdir.
5772
5773 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5774
5775 * server.c (handle_query): Add EnableDisableTracepoints to the list
5776 of supported features.
5777 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5778 tracepoints.
5779 (cmd_qtenable_disable): New.
5780 (cmd_qtstart): Install tracepoints even if disabled.
5781 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5782 receiving a QTEnable or QTDisable packet.
5783 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5784 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5785 tracepoints.
5786 (gdb_probe): Skip data collection if static tracepoint is disabled.
5787
5788 2011-05-10 Doug Evans <dje@google.com>
5789
5790 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5791
5792 2011-05-04 Doug Evans <dje@google.com>
5793
5794 * linux-low.c (linux_join): Skip process lookup.
5795 * spu-low.c (spu_join): Ditto.
5796 * server.c (join_inferiors_callback): Delete.
5797 (process_serial_event): For 'D' packet (detach) call join_inferior
5798 directly.
5799
5800 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5801
5802 * README: Don't mention xscale*-*-linux*.
5803 * configure.srv (xscale*-*-linux*): Don't handle target.
5804
5805 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5806
5807 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5808 casting pointers.
5809 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5810 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5811 (i386_emit_void_call_2): Likewise.
5812
5813 2011-04-26 Yao Qi <yao@codesourcery.com>
5814
5815 * linux-low.c: Move common macros to linux-ptrace.h.
5816 Include linux-ptrace.h.
5817 * Makefile.in (linux_ptrace_h): New.
5818 (linux-low.o): Depends on linux-ptrace.h.
5819
5820 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5821
5822 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5823 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5824 (remote_prepare): New function with most of the TCP code from ...
5825 (remote_open): ... here. Detect PORT here unconditionally. Move also
5826 setting transport_is_reliable.
5827 * server.c (run_once): New variable.
5828 (gdbserver_usage): Document it.
5829 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5830 the first run if RUN_ONCE.
5831 * server.h (run_once, remote_prepare): New declarations.
5832
5833 2011-04-19 Tom Tromey <tromey@redhat.com>
5834
5835 * win32-low.c (handle_load_dll): Remove duplicate "the".
5836
5837 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5838
5839 Remove support for old Cygwin 1.5 versions.
5840 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5841 function to avoid warning.
5842 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5843 warning.
5844
5845 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5846
5847 * gdbserver/server.h (Macro _): Define it if not available.
5848
5849 2011-03-14 Michael Snyder <msnyder@vmware.com>
5850
5851 * hostio.c (handle_close): Remove unnecessary null test.
5852
5853 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5854
5855 * Makefile.in (maintainer-clean realclean distclean): Remove
5856 "make ... subdir_do" command.
5857
5858 2011-03-10 Michael Snyder <msnyder@vmware.com>
5859
5860 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5861
5862 * server.c (handle_v_run): Free alloced buffer on early return.
5863
5864 2011-03-09 Yao Qi <yao@codesourcery.com>
5865
5866 Revert:
5867 2011-03-04 Yao Qi <yao@codesourcery.com>
5868
5869 * Makefile.in: Remove GNU make feature --directory.
5870
5871 2011-03-05 Yao Qi <yao@codesourcery.com>
5872
5873 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5874 (subdir_do): New make target. Copied from gdb/Makefile.
5875 (maintainer-clean, realclean, distclean, clean): Call corresponding
5876 make targets in common/Makefile.
5877
5878 2011-02-11 Yao Qi <yao@codesourcery.com>
5879
5880 * configure.ac: Call AC_PROG_RANLIB.
5881 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5882 * configure: Regenerate.
5883
5884 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5885
5886 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5887
5888 2011-03-06 Yao Qi <yao@codesourcery.com>
5889
5890 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5891
5892 2011-03-05 Yao Qi <yao@codesourcery.com>
5893
5894 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5895 (subdir_do): New make target. Copied from gdb/Makefile.
5896 (maintainer-clean, realclean, distclean, clean): Call corresponding
5897 make targets in common/Makefile.
5898
5899 2011-03-04 Yao Qi <yao@codesourcery.com>
5900
5901 * Makefile.in: Remove GNU make feature --directory.
5902
5903 2011-03-04 Michael Snyder <msnyder@vmware.com>
5904
5905 * server.c (queue_stop_reply): Call xmalloc not malloc.
5906
5907 2011-03-02 Michael Snyder <msnyder@vmware.com>
5908
5909 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5910
5911 2011-02-28 Michael Snyder <msnyder@vmware.com>
5912
5913 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5914 (cmd_qtframe): Ditto.
5915 (cmd_qtbuffer): Ditto.
5916 (cmd_bigqtbuffer): Ditto.
5917
5918 * utils.c (decimal2str): Initialize 'width' to nine, then
5919 don't mess with it.
5920
5921 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5922
5923 * hostio.c (require_data): Free *data, not data.
5924
5925 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5926
5927 * hostio.c (require_data): Use free, not xfree.
5928
5929 2011-02-27 Michael Snyder <msnyder@vmware.com>
5930
5931 * server.c (handle_query): Discard unused value.
5932
5933 * hostio.c (require_data): Free malloc memory before returning
5934 error.
5935
5936 2011-02-26 Michael Snyder <msnyder@vmware.com>
5937
5938 * linux-low.c (list_threads): Call closedir for dirent.
5939
5940 2011-02-27 Michael Snyder <msnyder@vmware.com>
5941
5942 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5943 a case statement falls through.
5944
5945 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5946
5947 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5948 in comparison.
5949
5950 2011-02-26 Michael Snyder <msnyder@vmware.com>
5951
5952 * utils.c (decimal2str): Eliminate dead code and dead param.
5953 (pulongest): Drop dead param from call to decimal2str.
5954 (plongest): Ditto.
5955
5956 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5957
5958 Revert the following patch (not approved yet):
5959 2011-02-21 Hui Zhu <teawater@gmail.com>
5960 * tracepoint.c (tp_printf): New function.
5961 (eval_agent_expr): Handle gdb_agent_op_printf.
5962
5963 2011-02-21 Hui Zhu <teawater@gmail.com>
5964
5965 * tracepoint.c (tp_printf): New function.
5966 (eval_agent_expr): Handle gdb_agent_op_printf.
5967
5968 2011-02-18 Tom Tromey <tromey@redhat.com>
5969
5970 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5971 (tracepoint.o): Likewise.
5972 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5973 (gdb_agent_op_names): Likewise.
5974
5975 2011-02-18 Tom Tromey <tromey@redhat.com>
5976
5977 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5978 gdb_agent_op_rot>: New constants.
5979 (gdb_agent_op_names): Add pick and roll.
5980 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5981 cases.
5982
5983 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5984
5985 * aclocal.m4: Regenerated with aclocal-1.11.1.
5986
5987 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5988
5989 * server.c (handle_qxfer_traceframe_info): New.
5990 (qxfer_packets): Register "traceframe-info".
5991 (handle_query): Report support for qXfer:traceframe-info:read+.
5992 * tracepoint.c (match_blocktype): New.
5993 (traceframe_find_block_type): Rename to ...
5994 (traceframe_walk_blocks): ... this. Add callback filter argument,
5995 and use it.
5996 (traceframe_find_block_type): New, reimplemented on top of
5997 traceframe_walk_blocks.
5998 (build_traceframe_info_xml): New.
5999 (traceframe_read_info): New.
6000 * server.h (traceframe_read_info): Declare.
6001
6002 2011-02-11 Yao Qi <yao@codesourcery.com>
6003
6004 * configure.ac: Call AC_PROG_RANLIB.
6005 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6006 * configure: Regenerate.
6007
6008 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6009
6010 * server.c (gdb_read_memory): Change return semantics to allow
6011 partial transfers.
6012 (handle_search_memory_1): Adjust.
6013 (process_serial_event) <'m' packet>: Handle partial transfers.
6014 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6015
6016 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6017
6018 * regcache.c (init_register_cache): Initialize
6019 regcache->register_status.
6020 (free_register_cache): Release regcache->register_status.
6021 (regcache_cpy): Copy register_status.
6022 (registers_to_string): Print 'x's for unavailable registers.
6023 (supply_register): Mark the register's status valid or
6024 unavailable, depending on whether a buffer was passed in or not.
6025 (supply_register_zeroed): New.
6026 (supply_regblock): Mark the registers' status valid or
6027 unavailable, depending on whether a buffer was passed in or not.
6028 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6029 (struct regcache): New `register_status' field.
6030 (supply_register_zeroed): Declare.
6031 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6032 supply_register_zeroed, rather than passing a NULL buffer to
6033 supply_register.
6034 * tracepoint.c (fetch_traceframe_registers): Update comment.
6035
6036 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6037
6038 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6039 buffer explicit.
6040
6041 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6042
6043 * server.h (decode_xfer_write): Change prototype.
6044 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6045 and don't extract the annex here.
6046 * server.c (decode_xfer_read): Remove `annex' parameter,
6047 and don't extract the annex here.
6048 (decode_xfer): New.
6049 (struct qxfer): New.
6050 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6051 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6052 (handle_qxfer_statictrace): New functions, abstracted out from
6053 handle_query, and made to use the struct qxfer interface.
6054 (handle_threads_qxfer_proper): Rename to ...
6055 (handle_qxfer_threads_proper): ... this.
6056 (handle_threads_qxfer): Rename to ...
6057 (handle_qxfer_threads): ... this. Adjust.
6058 (qxfer_packets): New array.
6059 (handle_qxfer): New function.
6060 (handle_query): Use handle_qxfer.
6061
6062 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6063
6064 * gdbreplay.c: Shorten lines of >= 80 columns.
6065 * linux-low.c: Ditto.
6066 * linux-ppc-low.c: Ditto.
6067 * linux-s390-low.c: Ditto.
6068 * linux-sparc-low.c: Ditto.
6069 * linux-x86-low.c: Ditto.
6070 * linux-xtensa-low.c: Ditto.
6071 * mem-break.c: Ditto.
6072 * nto-low.c: Ditto.
6073 * regcache.h: Ditto.
6074 * remote-utils.c: Ditto.
6075 * server.c: Ditto.
6076 * server.h: Ditto.
6077 * thread-db.c: Ditto.
6078 * tracepoint.c: Ditto.
6079 * utils.c: Ditto.
6080 * win32-low.h: Ditto.
6081
6082 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6083
6084 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6085 update.
6086
6087 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6088
6089 * server.c (gdbserver_version): Update copyright year in version
6090 output.
6091 * gdbreplay.c (gdbreplay_version): Ditto.
6092
6093 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6094
6095 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6096 * linux-bfin-low.c: New file.
6097 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6098 PT_DATA_ADDR for BFIN targets.
6099 * Makefile.in (SFILES): Add linux-bfin-low.c.
6100 (clean): Remove reg-bfin.c.
6101 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6102 * README: Mention supported Blackfin targets.
6103
6104 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6105
6106 * .gitignore: New file.
6107
6108 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6109
6110 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6111
6112 2010-10-22 Jie Zhang <jie@codesourcery.com>
6113
6114 * Makefile.in: Add FLAGS_TO_PASS variable.
6115 (install): Remove dependency of install-only and recursively
6116 invoke make for install-only.
6117
6118 2010-10-04 Doug Evans <dje@google.com>
6119
6120 * Makefile.in (uninstall): Use $(DESTDIR).
6121
6122 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6123
6124 PR gdb/11842
6125
6126 * linux-x86-low.c (compat_siginfo_from_siginfo)
6127 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6128 si_code is < 0. Check for si_code == SI_TIMER before checking for
6129 si_code < 0.
6130
6131 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6132
6133 * lynx-i386-low.c: New file.
6134 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6135
6136 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6137
6138 * lynx-low.c (ptrace_request_to_str): Remove handling for
6139 request values that have been removed in LynxOS 5.x.
6140
6141 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6142
6143 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6144 <ptrace.h>
6145
6146 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6147
6148 * configure.ac: Add --enable-inprocess-agent option.
6149 * configure: Rebuilt.
6150
6151 2010-09-06 Yao Qi <yao@codesourcery.com>
6152
6153 * linux-low.c (linux_kill): Remove unused variable.
6154 (linux_stabilize_threads): Likewise.
6155 * server.c (start_inferior): Likewise.
6156 (queue_stop_reply_callback): Likewise.
6157 * tracepoint.c (do_action_at_tracepoint): Likewise.
6158
6159 2010-09-06 Yao Qi <yao@codesourcery.com>
6160
6161 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6162 on return.
6163
6164 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6165
6166 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6167
6168 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6169
6170 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6171 "$(IPA_DEPFILES)".
6172
6173 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6174
6175 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6176 gdbserver/lynx-ppc-low.c: New files.
6177 * Makefile.in (lynx_low_h): New variable.
6178 (lynx-low.o, lynx-ppc-low.o): New rules.
6179 * configure.ac: On LynxOS, link with -lnetinet.
6180 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6181 * configure: regenerate.
6182
6183 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6184
6185 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6186 * configure.ac: Add check for vasprintf and vsnprintf.
6187 * configure, config.in: Regenerate.
6188 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6189
6190 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6191
6192 * gdbreplay.c: Move include of alloca.h up, next to include of
6193 malloc.h.
6194 * server.h: Add include of malloc.h.
6195 * mem-break.c: Remove include of malloc.h.
6196 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6197
6198 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6199
6200 * Makefile.in (memmem.o): Build with -Wno-error.
6201
6202 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6203
6204 * utils.c (xsnprintf): Make non-static.
6205 * server.h: Add xsnprintf declaration.
6206 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6207 replace calls to snprintf by calls to xsnprintf throughout.
6208
6209 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6210
6211 * configure.ac: Add configure check for alloca.
6212 * configure, config.in: Regenerate.
6213 * server.h: Include alloca.h if it exists.
6214 * gdbreplay.c: Include alloca.h if it exists.
6215
6216 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6217
6218 * linux-low.c (__SIGRTMIN): Define if not already defined.
6219 (linux_create_inferior): Check for __ANDROID__ rather than
6220 __SIGRTMIN.
6221 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6222 are already deferred.
6223 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6224 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6225 stopped and already has a pending signal to report.
6226 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6227 a pending signal to report or is moving out of a jump pad.
6228 (linux_init_signals): Check for __ANDROID__ rather than
6229 __SIGRTMIN.
6230
6231 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6232
6233 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6234 debug_threads check. Avoid a linear search when not doing debug
6235 output.
6236
6237 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6238
6239 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6240 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6241 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6242 (process_event): Change local fd's type to gdb_fildes_t.
6243 (create_file_handler): Adjust prototype.
6244 (delete_file_handler): Adjust prototype.
6245 (handle_file_event): Adjust prototype. Use pfildes.
6246 (create_file_event): Adjsut prototype.
6247 * remote-utils.c (remote_desc, listen_desc): Change type to
6248 gdb_fildes_t.
6249 * server.h: New gdb_fildes_t typedef.
6250 [USE_WIN32API]: Include winsock2.h.
6251 (delete_file_handler, add_file_handler): Adjust prototypes.
6252 (pfildes): Declare.
6253 * utils.c (pfildes): New.
6254
6255 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6256
6257 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6258 * configure: Regenerate.
6259
6260 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6261
6262 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6263 (linux_done_accessing_memory): ... this.
6264 (linux_target_ops): Adjust.
6265 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6266 * nto-low.c (nto_target_ops): Adjust comment.
6267 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6268 * spu-low.c (spu_target_ops): Adjust comment.
6269 * target.h (target_ops): Rename unprepare_to_access_memory field
6270 to done_accessing_memory.
6271 (unprepare_to_access_memory): Rename to ...
6272 (done_accessing_memory): ... this.
6273
6274 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6275
6276 * linux-low.c (linux_prepare_to_access_memory): New.
6277 (linux_unprepare_to_access_memory): New.
6278 (linux_target_ops): Install them.
6279 * server.c (read_memory): Rename to ...
6280 (gdb_read_memory): ... this. Use
6281 prepare_to_access_memory/prepare_to_access_memory.
6282 (write_memory): Rename to ...
6283 (gdb_write_memory): ... this. Use
6284 prepare_to_access_memory/prepare_to_access_memory.
6285 (handle_search_memory_1): Adjust.
6286 (process_serial_event): Adjust.
6287 * target.h (struct target_ops): New fields
6288 prepare_to_access_memory and unprepare_to_access_memory.
6289 (prepare_to_access_memory, unprepare_to_access_memory): New.
6290 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6291 prepare_to_access_memory/prepare_to_access_memory.
6292 * nto-low.c (nto_target_ops): Adjust.
6293 * spu-low.c (spu_target_ops): Adjust.
6294 * win32-low.c (win32_target_ops): Adjust.
6295
6296 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6297
6298 * Makefile.in (WARN_CFLAGS): Get it from configure.
6299 (WERROR_CFLAGS): New.
6300 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6301 * configure.ac: Introduce --enable-werror, which adds -Werror to
6302 the compiler command line. Enabled by default. Disable with
6303 --disable-werror. Add -Wdeclaration-after-statement
6304 Wpointer-arith and -Wformat-nonliteral to warning flags.
6305 * configure: Regenerate.
6306
6307 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6308
6309 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6310
6311 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6312
6313 * gdbreplay.c (remote_error): New.
6314 (gdbchar): New.
6315 (expect): Use gdbchar. Check for error reading from GDB.
6316 Clarify sync error output.
6317 (play): Check for errors writing to GDB.
6318 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6319 * remote-utils.c (getpkt): Check for errors writing to the remote
6320 descriptor.
6321
6322 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6323
6324 * linux-low.c (linux_wait_1): Move non-debugging code out of
6325 `debug_threads' control.
6326
6327 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6328
6329 * linux-low.c (linux_wait_1): Don't set last_status here.
6330 * server.c (push_event, queue_stop_reply_callback): Assert we're
6331 not pushing a TARGET_WAITKIND_IGNORE event.
6332 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6333 (myresume, handle_target_event): Set the thread's last_resume_kind
6334 and last_status from the target returned status.
6335
6336 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6337
6338 PR threads/10729
6339
6340 * linux-x86-low.c (update_debug_registers_callback): New.
6341 (i386_dr_low_set_addr): Use it.
6342 (i386_dr_low_get_addr): New.
6343 (i386_dr_low_set_control): Use update_debug_registers_callback.
6344 (i386_dr_low_get_control): New.
6345 (i386_dr_low_get_status): Adjust.
6346 * linux-low.c (linux_stop_lwp): New.
6347 * linux-low.h (linux_stop_lwp): Declare.
6348
6349 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6350 argument instead of a i386_debug_reg_state.
6351 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6352 a i386_debug_reg_state.
6353 (i386_insert_aligned_watchpoint): Adjust.
6354 (i386_remove_aligned_watchpoint): Adjust.
6355 (i386_low_stopped_data_address): Read the debug registers from the
6356 inferior instead of from the mirrors.
6357 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6358 (i386_dr_low_get_addr): Declare.
6359 (i386_dr_low_get_control): Declare.
6360 (i386_dr_low_get_status): Change prototype.
6361
6362 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6363 (i386_dr_low_get_addr): New.
6364 (i386_dr_low_get_control): New.
6365 (i386_dr_low_get_status): Adjust prototype. Return
6366 dr_status_mirror.
6367 (i386_initial_stuff): Clear dr_status_mirror and
6368 dr_control_mirror.
6369 (i386_get_thread_context): Adjust.
6370 (i386_set_thread_context): Adjust.
6371 (i386_thread_added): Adjust.
6372
6373 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6374
6375 * linux-low.h (linux_thread_area): Delete declaration.
6376
6377 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6378
6379 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6380 after its termination.
6381
6382 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6383
6384 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6385 (gdb_wants_all_stopped): Delete.
6386 (linux_wait_1): Don't call them.
6387 * server.c (handle_v_cont): Tag all threads as want-stopped.
6388 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6389 stopped as "client-wants-stopped".
6390
6391 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6392
6393 * Makefile.in (signals_h): New.
6394 (server_h): Depend on it.
6395 (server.o): Don't depend on $(signals_def).
6396 (signals.o): Depend on $(signals_def).
6397
6398 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6399
6400 * Makefile.in (signals_def): New.
6401 (server_h): Append include/gdb/signals.h and signals_def.
6402 (server.o): Append signals_def.
6403
6404 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6405
6406 * server.c (handle_target_event): Use target_signal_to_host for
6407 resume_info.sig initialization.
6408 * target.h (struct thread_resume) <sig>: New comment.
6409
6410 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6411
6412 * server.c (handle_query): strcpy() the returned string from paddress()
6413 instead of sprintf().
6414 * utils.c (paddress): Return phex_nz().
6415
6416 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6417
6418 * server.c (handle_v_cont): Call mourn_inferior if process
6419 just exited.
6420 (myresume): Likewise.
6421
6422 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6423
6424 Static tracepoints, and integration with UST.
6425
6426 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6427 * mem-break.c (uninsert_all_breakpoints)
6428 (reinsert_all_breakpoints): New.
6429 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6430 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6431 (gdb_agent_ust_loaded, helper_thread_id)
6432 (gdb_agent_helper_thread_id): New macros.
6433 (struct ipa_sym_addresses): Add addr_ust_loaded,
6434 addr_helper_thread_id, addr_cmd_buf.
6435 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6436 (in_process_agent_loaded_ust): New.
6437 (write_e_ust_not_loaded): New.
6438 (maybe_write_ipa_ust_not_loaded): New.
6439 (struct collect_static_trace_data_action): New.
6440 (enum tracepoint_type) <static_tracepoint>: New.
6441 (struct tracepoint) <handle>: Mention static tracepoints.
6442 (struct static_tracepoint_ctx): New.
6443 (CMD_BUF_SIZE): New.
6444 (add_tracepoint_action): Handle static tracepoint actions.
6445 (unprobe_marker_at): New.
6446 (clear_installed_tracepoints): Handle static tracepoints.
6447 (cmd_qtdp): Handle static tracepoints.
6448 (probe_marker_at): New.
6449 (cmd_qtstart): Handle static tracepoints.
6450 (response_tracepoint): Handle static tracepoints.
6451 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6452 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6453 (get_context_regcache): Handle static tracepoints.
6454 (do_action_at_tracepoint): Handle static tracepoint actions.
6455 (traceframe_find_block_type): Handle static trace data blocks.
6456 (traceframe_read_sdata): New.
6457 (download_tracepoints): Download static tracepoint actions.
6458 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6459 (GDB_PROBE_NAME): New.
6460 (ust_ops): New.
6461 (GET_UST_SYM): New.
6462 (USTF): New.
6463 (dlsym_ust): New.
6464 (ust_marker_to_static_tracepoint): New.
6465 (gdb_probe): New.
6466 (collect_ust_data_at_tracepoint): New.
6467 (gdb_ust_probe): New.
6468 (UNIX_PATH_MAX, SOCK_DIR): New.
6469 (gdb_ust_connect_sync_socket): New.
6470 (resume_thread, stop_thread): New.
6471 (run_inferior_command): New.
6472 (init_named_socket): New.
6473 (gdb_ust_socket_init): New.
6474 (cstr_to_hexstr): New.
6475 (next_st): New.
6476 (first_marker, next_marker): New.
6477 (response_ust_marker): New.
6478 (cmd_qtfstm, cmd_qtsstm): New.
6479 (unprobe_marker_at, probe_marker_at): New.
6480 (cmd_qtstmat, gdb_ust_thread): New.
6481 (gdb_ust_init): New.
6482 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6483 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6484 (ST_REGENTRY): New.
6485 (x86_64_st_collect_regmap): New.
6486 (X86_64_NUM_ST_COLLECT_GREGS): New.
6487 (AMD64_RIP_REGNUM): New.
6488 (supply_static_tracepoint_registers): New.
6489 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6490 (ST_REGENTRY): New.
6491 (i386_st_collect_regmap): New.
6492 (i386_NUM_ST_COLLECT_GREGS): New.
6493 (supply_static_tracepoint_registers): New.
6494 * server.c (handle_query): Handle qXfer:statictrace:read.
6495 <qSupported>: Report support for StaticTracepoints, and
6496 qXfer:statictrace:read features.
6497 * server.h (traceframe_read_sdata)
6498 (supply_static_tracepoint_registers): Declare.
6499 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6500 (unpack_varlen_hex): Include in IPA build.
6501 * Makefile.in (ustlibs, ustinc): New.
6502 (IPA_OBJS): Add remote-utils-ipa.o.
6503 ($(IPA_LIB)): Link -ldl and -lpthread.
6504 (UST_CFLAGS): New.
6505 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6506 * config.in, configure: Regenerate.
6507
6508 2010-06-20 Ian Lance Taylor <iant@google.com>
6509 Pedro Alves <pedro@codesourcery.com>
6510
6511 * linux-x86-low.c (always_true): Delete.
6512 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6513 trying to fool the compiler with always_true.
6514
6515 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6516
6517 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6518 conditions in gdbserver.
6519
6520 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6521
6522 * spu-low.c (spu_read_memory): Wrap around local store limit.
6523 (spu_write_memory): Likewise.
6524
6525 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6526
6527 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6528 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6529 LONGEST uses.
6530 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6531 uses.
6532 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6533 uses with LONGEST uses.
6534
6535 2010-06-14 Stan Shebs <stan@codesourcery.com>
6536 Pedro Alves <pedro@codesourcery.com>
6537
6538 Bytecode compiler.
6539
6540 * linux-x86-low.c: Include limits.h.
6541 (add_insns): New.
6542 (always_true): New.
6543 (EMIT_ASM): New.
6544 (EMIT_ASM32): New.
6545 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6546 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6547 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6548 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6549 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6550 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6551 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6552 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6553 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6554 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6555 (amd64_emit_void_call_2): New.
6556 (amd64_emit_ops): New.
6557 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6558 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6559 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6560 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6561 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6562 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6563 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6564 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6565 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6566 (i386_emit_stack_adjust, i386_emit_int_call_1)
6567 (i386_emit_void_call_2): New.
6568 (i386_emit_ops): New.
6569 (x86_emit_ops): New.
6570 (the_low_target): Install x86_emit_ops.
6571 * server.h (struct emit_ops): New.
6572 (get_raw_reg_func_addr): Declare.
6573 (current_insn_ptr, emit_error): Declare.
6574 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6575 (set_trace_state_variable_value): New defines.
6576 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6577 addr_get_trace_state_variable_value and
6578 addr_set_trace_state_variable_value.
6579 (symbol_list): New fields for get_raw_reg,
6580 get_trace_state_variable_value and set_trace_state_variable_value.
6581 (condfn): New typedef.
6582 (struct tracepoint): New field `compiled_cond'.
6583 (do_action_at_tracepoint): Clear compiled_cond.
6584 (get_trace_state_variable_value, set_trace_state_variable_value):
6585 Export in the IPA.
6586 (condition_true_at_tracepoint): If there's a compiled condition,
6587 run that.
6588 (current_insn_ptr, emit_error): New globals.
6589 (struct bytecode_address): New.
6590 (get_raw_reg_func_addr): New.
6591 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6592 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6593 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6594 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6595 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6596 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6597 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6598 (compile_tracepoint_condition, compile_bytecodes): New.
6599 * target.h (emit_ops): Forward declare.
6600 (struct target_ops): New field emit_ops.
6601 (target_emit_ops): New.
6602 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6603 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6604 * linux-low.c (linux_emit_ops): New.
6605 (linux_target_ops): Install it.
6606 * linux-low.h (struct linux_target_ops): New field emit_ops.
6607
6608 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6609
6610 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6611 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6612
6613 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6614 Stan Shebs <stan@codesourcery.com>
6615
6616 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6617 (all): Depend on $(extra_libraries).
6618 (install-only): Install the IPA.
6619 (IPA_OBJS, IPA_LIB): New.
6620 (clean): Remove the IPA lib.
6621 (IPAGENT_CFLAGS): New.
6622 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6623 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6624 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6625 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6626 * configure.ac: Check for atomic builtins support in the compiler.
6627 (IPA_DEPFILES, extra_libraries): Define.
6628 * configure.srv (ipa_obj): Add description.
6629 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6630 (i[34567]86-*-linux*): Set ipa_obj.
6631 (x86_64-*-linux*): Set ipa_obj.
6632 * linux-low.c (stabilizing_threads): New.
6633 (supports_fast_tracepoints): New.
6634 (linux_detach): Stabilize threads before detaching.
6635 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6636 the lwp is either not stabilizing, or is moving out of a jump pad.
6637 (linux_fast_tracepoint_collecting): New.
6638 (maybe_move_out_of_jump_pad): New.
6639 (enqueue_one_deferred_signal): New.
6640 (dequeue_one_deferred_signal): New.
6641 (linux_wait_for_event_1): If moving out of a jump pad, defer
6642 pending signals to later.
6643 (linux_stabilize_threads): New.
6644 (linux_wait_1): Check if threads need moving out of jump pads, and
6645 do it if so.
6646 (stuck_in_jump_pad_callback): New.
6647 (move_out_of_jump_pad_callback): New.
6648 (lwp_running): New.
6649 (linux_resume_one_lwp): Handle moving out of jump pads.
6650 (linux_set_resume_request): Dequeue deferred signals.
6651 (need_step_over_p): Also step over fast tracepoint jumps.
6652 (start_step_over): Also uninsert fast tracepoint jumps.
6653 (finish_step_over): Also reinsert fast tracepoint jumps.
6654 (linux_install_fast_tracepoint_jump): New.
6655 (linux_target_ops): Install linux_stabilize_threads and
6656 linux_install_fast_tracepoint_jump_pad.
6657 * linux-low.h (linux_target_ops) <get_thread_area,
6658 install_fast_tracepoint_jump_pad>: New fields.
6659 (struct lwp_info) <collecting_fast_tracepoint,
6660 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6661 (linux_get_thread_area): Declare.
6662 * linux-x86-low.c (jump_insn): New.
6663 (x86_get_thread_area): New.
6664 (append_insns): New.
6665 (push_opcode): New.
6666 (amd64_install_fast_tracepoint_jump_pad): New.
6667 (i386_install_fast_tracepoint_jump_pad): New.
6668 (x86_install_fast_tracepoint_jump_pad): New.
6669 (the_low_target): Install x86_get_thread_area and
6670 x86_install_fast_tracepoint_jump_pad.
6671 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6672 (struct fast_tracepoint_jump): New.
6673 (fast_tracepoint_jump_insn): New.
6674 (fast_tracepoint_jump_shadow): New.
6675 (find_fast_tracepoint_jump_at): New.
6676 (fast_tracepoint_jump_here): New.
6677 (delete_fast_tracepoint_jump): New.
6678 (set_fast_tracepoint_jump): New.
6679 (uninsert_fast_tracepoint_jumps_at): New.
6680 (reinsert_fast_tracepoint_jumps_at): New.
6681 (set_breakpoint_at): Use write_inferior_memory.
6682 (uninsert_raw_breakpoint): Use write_inferior_memory.
6683 (check_mem_read): Mask out fast tracepoint jumps.
6684 (check_mem_write): Mask out fast tracepoint jumps.
6685 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6686 (set_fast_tracepoint_jump): Declare.
6687 (delete_fast_tracepoint_jump)
6688 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6689 (reinsert_fast_tracepoint_jumps_at): Declare.
6690 * regcache.c: Don't compile many functions when building the
6691 in-process agent library.
6692 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6693 the register buffer in the heap.
6694 (free_register_cache): If the register buffer isn't owned by the
6695 regcache, don't free it.
6696 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6697 pre-existing register caches.
6698 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6699 type.
6700 (convert_ascii_to_int): : Constify `from' parameter type.
6701 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6702 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6703 the needed buffer in-place.
6704 (relocate_instruction): New.
6705 * server.c (handle_query) <qSymbols>: If the target supports
6706 tracepoints, give it a chance of looking up symbols. Report
6707 support for fast tracepoints.
6708 (handle_status): Stabilize threads.
6709 (process_serial_event): Adjust.
6710 * server.h (struct fast_tracepoint_jump): Forward declare.
6711 (struct process_info) <fast_tracepoint_jumps>: New field.
6712 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6713 (decode_X_packet, decode_M_packet): Adjust.
6714 (relocate_instruction): Declare.
6715 (in_process_agent_loaded): Declare.
6716 (tracepoint_look_up_symbols): Declare.
6717 (struct fast_tpoint_collect_status): Declare.
6718 (fast_tracepoint_collecting): Declare.
6719 (force_unlock_trace_buffer): Declare.
6720 (handle_tracepoint_bkpts): Declare.
6721 (initialize_low_tracepoint)
6722 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6723 * target.h (struct target_ops) <stabilize_threads,
6724 install_fast_tracepoint_jump_pad>: New fields.
6725 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6726 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6727 [HAVE_STDINT_H]: Include stdint.h.
6728 (trace_debug_1): Rename to ...
6729 (trace_vdebug): ... this.
6730 (trace_debug): Rename to ...
6731 (trace_debug_1): ... this. Add `level' parameter.
6732 (trace_debug): New.
6733 (ATTR_USED, ATTR_NOINLINE): New.
6734 (IP_AGENT_EXPORT): New.
6735 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6736 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6737 (about_to_request_buffer_space, trace_buffer_is_full)
6738 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6739 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6740 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6741 (traceframe_write_count, traceframes_created)
6742 (trace_state_variables)
6743 New renaming defines.
6744 (struct ipa_sym_addresses): New.
6745 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6746 (symbol_list): New.
6747 (ipa_sym_addrs): New.
6748 (all_tracepoint_symbols_looked_up): New.
6749 (in_process_agent_loaded): New.
6750 (write_e_ipa_not_loaded): New.
6751 (maybe_write_ipa_not_loaded): New.
6752 (tracepoint_look_up_symbols): New.
6753 (debug_threads) [IN_PROCESS_AGENT]: New.
6754 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6755 (UNKNOWN_SIDE_EFFECTS): New.
6756 (stop_tracing): New.
6757 (flush_trace_buffer): New.
6758 (stop_tracing_bkpt): New.
6759 (flush_trace_buffer_bkpt): New.
6760 (read_inferior_integer): New.
6761 (read_inferior_uinteger): New.
6762 (read_inferior_data_pointer): New.
6763 (write_inferior_data_pointer): New.
6764 (write_inferior_integer): New.
6765 (write_inferior_uinteger): New.
6766 (struct collect_static_trace_data_action): Delete.
6767 (enum tracepoint_type): New.
6768 (struct tracepoint) <type>: New field `type'.
6769 <actions_str, step_actions, step_actions_str>: Only include in
6770 GDBserver.
6771 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6772 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6773 (tracepoints): Use IP_AGENT_EXPORT.
6774 (last_tracepoint): Don't include in the IPA.
6775 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6776 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6777 (alloced_trace_state_variables): New.
6778 (trace_state_variables): Use IP_AGENT_EXPORT.
6779 (traceframe_t): Delete unused variable.
6780 (circular_trace_buffer): Don't include in the IPA.
6781 (trace_buffer_start): Delete.
6782 (struct trace_buffer_control): New.
6783 (trace_buffer_free): Delete.
6784 (struct ipa_trace_buffer_control): New.
6785 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6786 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6787 New.
6788 (trace_buffer_ctrl): New.
6789 (TRACE_BUFFER_CTRL_CURR): New.
6790 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6791 Reimplement as macros.
6792 (trace_buffer_wrap): Delete.
6793 (traceframe_write_count, traceframe_read_count)
6794 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6795 (struct tracepoint_hit_ctx) <type>: New field.
6796 (struct fast_tracepoint_ctx): New.
6797 (memory_barrier): New.
6798 (cmpxchg): New.
6799 (record_tracepoint_error): Update atomically in the IPA.
6800 (clear_inferior_trace_buffer): New.
6801 (about_to_request_buffer_space): New.
6802 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6803 updating the same buffer.
6804 (add_tracepoint): Default the tracepoint's type to trap
6805 tracepoint, and orig_size to -1.
6806 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6807 internal variables.
6808 (create_trace_state_variable): New parameter `gdb'. Handle it.
6809 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6810 (cmd_qtdp): Handle fast tracepoints.
6811 (cmd_qtdv): Adjust.
6812 (max_jump_pad_size): New.
6813 (gdb_jump_pad_head): New.
6814 (get_jump_space_head): New.
6815 (claim_jump_space): New.
6816 (sort_tracepoints): New.
6817 (MAX_JUMP_SIZE): New.
6818 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6819 IPA.
6820 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6821 support. Upload fast traceframes, and delete internal IPA
6822 breakpoints.
6823 (stop_tracing_handler): New.
6824 (flush_trace_buffer_handler): New.
6825 (cmd_qtstop): Upload fast tracepoints.
6826 (response_tracepoint): Handle fast tracepoints.
6827 (tracepoint_finished_step): Upload fast traceframes. Set the
6828 tracepoint hit context's tracepoint type.
6829 (handle_tracepoint_bkpts): New.
6830 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6831 type. Add comment about fast tracepoints.
6832 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6833 non-existing action_str field.
6834 (get_context_regcache): Handle fast tracepoints.
6835 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6836 to the regcache.
6837 (fast_tracepoint_from_jump_pad_address): New.
6838 (fast_tracepoint_from_ipa_tpoint_address): New.
6839 (collecting_t): New.
6840 (force_unlock_trace_buffer): New.
6841 (fast_tracepoint_collecting): New.
6842 (collecting): New.
6843 (gdb_collect): New.
6844 (write_inferior_data_ptr): New.
6845 (target_tp_heap): New.
6846 (target_malloc): New.
6847 (download_agent_expr): New.
6848 (UALIGN): New.
6849 (download_tracepoints): New.
6850 (download_trace_state_variables): New.
6851 (upload_fast_traceframes): New.
6852 (IPA_FIRST_TRACEFRAME): New.
6853 (IPA_NEXT_TRACEFRAME_1): New.
6854 (IPA_NEXT_TRACEFRAME): New.
6855 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6856 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6857 (gdb_jump_pad_buffer_end): New.
6858 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6859 (initialize_tracepoint): Adjust.
6860 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6861 buffer. Initialize the low module.
6862 * utils.c (PREFIX, TOOLNAME): New.
6863 (malloc_failure): Use PREFIX.
6864 (error): In the IPA, an error causes an exit.
6865 (fatal, warning): Use PREFIX.
6866 (internal_error): Use TOOLNAME.
6867 (NUMCELLS): Increase to 10.
6868 * configure, config.in: Regenerate.
6869
6870 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6871
6872 * server.c (handle_query) <qSupported>: Do two passes over the
6873 qSupported string to avoid nesting strtok.
6874
6875 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6876
6877 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6878 (CDEPS): New.
6879 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6880 -Wl,--dynamic-list.
6881 * configure: Regenerate.
6882 * proc-service.list: New.
6883
6884 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6885
6886 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6887 New comment.
6888
6889 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6890
6891 * gdbreplay.c (remote_open): Check error return from socket() call by
6892 its equality to -1 not by it being negative.
6893 * remote-utils.c (remote_open): Likewise.
6894
6895 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6896
6897 * config.h: Regenerate.
6898
6899 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6900
6901 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6902 doesn't provide PTRACE_GET_THREAD_AREA.
6903
6904 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6905
6906 * linux-m68k-low.c: Include <asm/ptrace.h>
6907 (ps_get_thread_area): Implement.
6908
6909 2010-05-03 Doug Evans <dje@google.com>
6910
6911 * event-loop.c (struct callback_event): New struct.
6912 (callback_list): New global.
6913 (append_callback_event, delete_callback_event): New functions.
6914 (process_callback): New function.
6915 (start_event_loop): Call it.
6916 * remote-utils.c (NOT_SCHEDULED): Define.
6917 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6918 moved out of readchar.
6919 (readchar): Rewrite. Call reschedule before returning.
6920 (reset_readchar): New function.
6921 (remote_close): Call it.
6922 (process_remaining, reschedule): New functions.
6923 * server.h (callback_handler_func): New typedef.
6924 (append_callback_event, delete_callback_event): Declare.
6925
6926 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6927
6928 * proc-service.c (ps_pglobal_lookup): Use
6929 thread_db_look_up_one_symbol.
6930 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6931 parameter. Use it instead of all_symbols_looked_up.
6932 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6933 field.
6934 (all_symbols_looked_up): Don't declare.
6935 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6936 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6937 field.
6938 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6939 Set all_symbols_looked_up here.
6940 (thread_db_look_up_one_symbol): New.
6941 (thread_db_get_tls_address): Adjust.
6942 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6943 thread_db object on the heap, and tentatively set it in the
6944 process structure.
6945 (thread_db_init): Don't set all_symbols_looked_up here.
6946 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6947
6948 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6949
6950 * linux-low.c (linux_kill, linux_detach): Adjust.
6951 (status_pending_p_callback): Remove redundant statement. Check
6952 for !TARGET_WAITIKIND_IGNORE, instead of
6953 TARGET_WAITKIND_STOPPED.
6954 (handle_tracepoints): Make sure LWP is locked. Adjust.
6955 (linux_wait_for_event_1): Adjust.
6956 (linux_cancel_breakpoints): New.
6957 (unsuspend_one_lwp): New.
6958 (unsuspend_all_lwps): New.
6959 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6960 (send_sigstop_callback): Change return type to int, add new
6961 `except' parameter and handle it.
6962 (suspend_and_send_sigstop_callback): New.
6963 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6964 pass them down. If SUSPEND, also increment the lwp's suspend
6965 count.
6966 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6967 (need_step_over_p): Don't consider suspended LWPs.
6968 (start_step_over): Adjust.
6969 (proceed_one_lwp): Change return type to int, add new `except'
6970 parameter and handle it.
6971 (unsuspend_and_proceed_one_lwp): New.
6972 (proceed_all_lwps): Use find_inferior instead of
6973 for_each_inferior.
6974 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6975 also decrement the suspend count of LWPs. Pass `except' down,
6976 instead of hacking its suspend count.
6977 (linux_pause_all): Add `freeze' parameter. Adjust.
6978 (linux_unpause_all): New.
6979 (linux_target_ops): Install linux_unpause_all.
6980 * server.c (handle_status): Adjust.
6981 * target.h (struct target_ops): New fields `unpause_all' and
6982 `cancel_breakpoints'. Add new parameter to `pause_all'.
6983 (pause_all): Add new `freeze' parameter.
6984 (unpause_all): New.
6985 (cancel_breakpoints): New.
6986 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6987 cancel breakpoints.
6988 (cmd_qtstart): Pause threads.
6989 (stop_tracing): Pause threads, and cancel breakpoints.
6990 * win32-low.c (win32_target_ops): Adjust.
6991
6992 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6993
6994 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6995 the inferior right away from here...
6996 (linux_wait_1): ... to here, and adjust to check the thread's
6997 last_resume_kind instead of the lwp's step or stop_expected flags.
6998
6999 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7000
7001 * README: Use consistent `GDB' and `GDBserver' spellings.
7002
7003 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7004
7005 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7006 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7007 (linux_detach_one_lwp): Assume the lwp is stopped.
7008 (any_thread_of): Delete.
7009 (linux_detach): Stop all lwps here. Don't blindly delete all
7010 breakpoints.
7011 (delete_lwp_callback): New.
7012 (linux_mourn): Delete all lwps of the process that is gone.
7013 (linux_wait_1): Don't delete the last lwp of the process here.
7014 * mem-break.h (mark_breakpoints_out): Declare.
7015 * mem-break.c (mark_breakpoints_out): New.
7016 (free_all_breakpoints): Use it.
7017 * server.c (handle_target_event): If the process is gone, mark
7018 breakpoints out.
7019 * thread-db.c (struct thread_db) <create_bp>: New field.
7020 (thread_db_enable_reporting): Fix prototype. Store a thread event
7021 breakpoint reference in the thread_db struct.
7022 (thread_db_load_search): Clear the thread_db object.
7023 (try_thread_db_load_1): Ditto.
7024 (switch_to_process): New.
7025 (disable_thread_event_reporting): Use it.
7026 (remove_thread_event_breakpoints): New.
7027 (thread_db_detach, thread_db_mourn): Use it.
7028
7029 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7030
7031 * linux-low.c (linux_enable_event_reporting): New.
7032 (linux_wait_for_event_1, handle_extended_wait): Use it.
7033
7034 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7035
7036 * linux-low.c (linux_kill_one_lwp, linux_kill)
7037 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7038 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7039 SIGSTOP even if the LWP is stopped.
7040 (send_sigstop_callback): New.
7041 (stop_all_lwps): Use send_sigstop_callback instead.
7042 (linux_resume_one_thread): Adjust.
7043 (proceed_one_lwp): Still proceed an LWP that the client has
7044 requested to stop, if we haven't reported it as stopped yet. Make
7045 sure that LWPs the client want stopped, have a pending SIGSTOP.
7046
7047 2010-04-26 Doug Evans <dje@google.com>
7048
7049 * server.c (handle_general_set): Make static.
7050
7051 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7052 Print received char after testing for error/eof instead of before.
7053 (input_interrupt): Tweak comment.
7054
7055 2010-04-23 Doug Evans <dje@google.com>
7056
7057 * server.c (start_inferior): Print inferior argv if --debug.
7058
7059 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7060
7061 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7062 * nto-x86-low.c: Include server.h
7063
7064 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7065
7066 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7067 be consistent with other sources of this directory.
7068 (init_registers_amd64): Correct name of source file of this function
7069 in the comment.
7070
7071 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7072
7073 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7074 64-bit executables.
7075
7076 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7077
7078 * win32-i386-low.c: Add 64-bit support.
7079 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7080 (init_registers_amd64): Declare.
7081 (mappings): Add 64-bit version of array.
7082 (init_windows_x86): New function.
7083 (the_low_target): Change init_arch field to init_windows_x86.
7084
7085 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7086
7087 * win32-low.c: Adapt to support also 64-bit architecture.
7088 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7089 (get_image_name): Use SIZE_T type for local variable `done'.
7090 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7091 (toolhelp_get_dll_name): Idem.
7092 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7093 Use uintptr_t typecast to avoid warning.
7094 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7095 (handle_exception): Use phex_nz to avoid warning.
7096 (win32_wait): Remove unused local variable `process'.
7097
7098 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7099
7100 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7101 `amd64-avx.o'.
7102
7103 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7104
7105 * configure.ac: Use `ws2_32' library for srv_mingw.
7106 * configure: Regenerate.
7107 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7108 * remote-utils.c: Likewise.
7109
7110 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7111
7112 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7113 if __x86_64__ is defined.
7114
7115 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7116
7117 * configure: Regenerate.
7118
7119 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7120
7121 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7122 * target.h (target_ops): New get_tib_address field.
7123 * win32-low.h (win32_thread_info): Add thread_local_base field.
7124 * win32-low.c (child_add_thread): Add tlb argument.
7125 Set thread_local_base field to TLB.
7126 (get_child_debug_event): Adapt to child_add_thread change.
7127 (win32_get_tib_address): New function.
7128 (win32_target_ops): Set get_tib_address field to
7129 win32_get_tib_address.
7130 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7131
7132 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7133
7134 * linux-low.c (linux_mourn): Also remove the process.
7135 * server.c (handle_target_event): Don't remove the process here.
7136 * nto-low.c (nto_mourn): New.
7137 (nto_target_ops): Install it.
7138 * spu-low.c (spu_mourn): New.
7139 (spu_target_ops): Install it.
7140 * win32-low.c (win32_mourn): New.
7141 (win32_target_ops): Install it.
7142
7143 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7144
7145 * server.h (buffer_xml_printf): Remove redundant `;'.
7146
7147 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7148
7149 * regcache.c (set_register_cache): Invalidate regcaches before
7150 changing the register cache layout.
7151 (regcache_invalidate_one): Allow a NULL regcache.
7152 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7153 regcaches before changing the register cache layout or the target
7154 regsets.
7155
7156 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7157
7158 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7159 variable warning on Linux/x86-64.
7160
7161 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7162
7163 GDBserver disconnected tracing support.
7164
7165 * linux-low.c (linux_remove_process): Delete.
7166 (add_lwp): Don't set last_resume_kind here.
7167 (linux_kill): Use `mourn'.
7168 (linux_detach): Use `thread_db_detach', and `mourn'.
7169 (linux_mourn): New.
7170 (linux_attach_lwp_1): Adjust comment.
7171 (linux_attach): last_resume_kind moved the thread_info; adjust.
7172 (status_pending_p_callback): Adjust.
7173 (linux_wait_for_event_1): Adjust.
7174 (count_events_callback, select_singlestep_lwp_callback)
7175 (select_event_lwp_callback, cancel_breakpoints_callback)
7176 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7177 (proceed_one_lwp): Adjust.
7178 (linux_async): Add debug output.
7179 (linux_thread_stopped): New.
7180 (linux_pause_all): New.
7181 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7182 linux_pause_all.
7183 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7184 (thread_db_free): Delete declaration.
7185 (thread_db_detach, thread_db_mourn): Declare.
7186 * thread-db.c (thread_db_init): Use thread_db_mourn.
7187 (thread_db_free): Delete, split in two.
7188 (disable_thread_event_reporting): New.
7189 (thread_db_detach): New.
7190 (thread_db_mourn): New.
7191
7192 * server.h (struct thread_info) <last_resume_kind>: New field.
7193 <attached>: Add comment.
7194 <gdb_detached>: New field.
7195 (handler_func): Change return type to int.
7196 (handle_serial_event, handle_target_event): Ditto.
7197 (gdb_connected): Declare.
7198 (tracing): Delete.
7199 (disconnected_tracing): Declare.
7200 (stop_tracing): Declare.
7201
7202 * server.c (handle_query) <qSupported>: Report support for
7203 disconnected tracing.
7204 (queue_stop_reply_callback): Account for running threads.
7205 (gdb_wants_thread_stopped): New.
7206 (gdb_wants_all_threads_stopped): New.
7207 (gdb_reattached_process): New.
7208 (handle_status): Clear the `gdb_detached' flag of all processes.
7209 In all-stop, stop all threads.
7210 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7211 (process_serial_event): If the remote connection breaks, or if an
7212 exit was forced with "monitor exit", force an event loop exit.
7213 Handle disconnected tracing on detach.
7214 (handle_serial_event): Adjust.
7215 (handle_target_event): If GDB isn't connected, forward events back
7216 to the inferior, unless the last process exited, in which case,
7217 exit gdbserver. Adjust interface.
7218
7219 * remote-utils.c (remote_open): Don't block in accept. Instead
7220 register an event loop source on the listen socket file
7221 descriptor. Refactor bits into ...
7222 (listen_desc): ... this new global.
7223 (gdb_connected): ... this new function.
7224 (enable_async_notification): ... this new function.
7225 (handle_accept_event): ... this new function.
7226 (remote_close): Clear remote_desc.
7227
7228 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7229
7230 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7231 New fields.
7232 (mourn_inferior): Define.
7233 (target_process_qsupported): Avoid the dangling else problem.
7234 (thread_stopped): Define.
7235 (pause_all): Define.
7236 (target_waitstatus_to_string): Declare.
7237 * target.c (target_waitstatus_to_string): New.
7238
7239 * tracepoint.c (tracing): Make extern.
7240 (disconnected_tracing): New.
7241 (stop_tracing): Make extern. Handle tracing stops due to GDB
7242 disconnecting.
7243 (cmd_qtdisconnected): New.
7244 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7245 (handle_tracepoint_general_set): Handle QTDisconnected.
7246
7247 * event-loop.c (event_handler_func): Change return type to int.
7248 (process_event): Bail out if the event handler wants the event
7249 loop to stop.
7250 (handle_file_event): Ditto.
7251 (start_event_loop): Bail out if the event handler wants the event
7252 loop to stop.
7253
7254 * nto-low.c (nto_target_ops): Adjust.
7255 * spu-low.c (spu_wait): Don't remove the process here.
7256 (spu_target_ops): Adjust.
7257 * win32-low.c (win32_wait): Don't remove the process here.
7258 (win32_target_ops): Adjust.
7259
7260 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7261
7262 * regcache.c (realloc_register_cache): Invalidate inferior's
7263 regcache before recreating it.
7264
7265 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7266
7267 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7268
7269 2010-04-09 Stan Shebs <stan@codesourcery.com>
7270 Pedro Alves <pedro@codesourcery.com>
7271
7272 * server.h (LONGEST): New.
7273 (struct thread_info) <while_stepping>: New field.
7274 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7275 Declare.
7276 (initialize_tracepoint, handle_tracepoint_general_set)
7277 (handle_tracepoint_query, tracepoint_finished_step)
7278 (tracepoint_was_hit, release_while_stepping_state_list):
7279 (current_traceframe): Declare.
7280 * server.c (handle_general_set): Handle tracepoint packets.
7281 (read_memory): New.
7282 (write_memory): New.
7283 (handle_search_memory_1): Use read_memory.
7284 (handle_query): Report support for conditional tracepoints, trace
7285 state variables, and tracepoint sources. Handle tracepoint
7286 queries.
7287 (main): Initialize the tracepoints module.
7288 (process_serial_event): Handle traceframe reads/writes.
7289
7290 * linux-low.c (handle_tracepoints): New.
7291 (linux_wait_1): Call it.
7292 (linux_resume_one_lwp): Handle while-stepping.
7293 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7294 (linux_target_ops): Install them.
7295 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7296 New field.
7297 * linux-x86-low.c (x86_supports_tracepoints): New.
7298 (the_low_target). Install it.
7299
7300 * mem-break.h (delete_breakpoint): Declare.
7301 * mem-break.c (delete_breakpoint): Make external.
7302
7303 * target.h (struct target_ops): Add `supports_tracepoints',
7304 `read_pc', and `write_pc' fields.
7305 (target_supports_tracepoints): Define.
7306 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7307 (phex_nz): New.
7308
7309 * regcache.h (struct regcache) <registers_owned>: New field.
7310 (init_register_cache, regcache_cpy): Declare.
7311 (regcache_read_pc, regcache_write_pc): Declare.
7312 (register_cache_size): Declare.
7313 (supply_regblock): Declare.
7314 * regcache.c (init_register_cache): New.
7315 (new_register_cache): Use it.
7316 (regcache_cpy): New.
7317 (register_cache_size): New.
7318 (supply_regblock): New.
7319 (regcache_read_pc, regcache_write_pc): New.
7320
7321 * tracepoint.c: New.
7322
7323 * Makefile.in (OBS): Add tracepoint.o.
7324 (tracepoint.o): New rule.
7325
7326 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7327
7328 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7329 (i386-mmx.o): New.
7330 (i386-mmx.c): Likewise.
7331 (i386-mmx-linux.o): Likewise.
7332 (i386-mmx-linux.c): Likewise.
7333
7334 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7335 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7336 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7337 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7338
7339 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7340 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7341 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7342
7343 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7344
7345 * Makefile.in (clean): Updated.
7346 (i386-avx.o): New.
7347 (i386-avx.c): Likewise.
7348 (i386-avx-linux.o): Likewise.
7349 (i386-avx-linux.c): Likewise.
7350 (amd64-avx.o): Likewise.
7351 (amd64-avx.c): Likewise.
7352 (amd64-avx-linux.o): Likewise.
7353 (amd64-avx-linux.c): Likewise.
7354
7355 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7356 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7357 (srv_amd64_regobj): Add amd64-avx.o.
7358 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7359 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7360 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7361 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7362 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7363 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7364 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7365
7366 * i387-fp.c: Include "i386-xstate.h".
7367 (i387_xsave): New.
7368 (i387_cache_to_xsave): Likewise.
7369 (i387_xsave_to_cache): Likewise.
7370 (x86_xcr0): Likewise.
7371
7372 * i387-fp.h (i387_cache_to_xsave): Likewise.
7373 (i387_xsave_to_cache): Likewise.
7374 (x86_xcr0): Likewise.
7375
7376 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7377 * linux-crisv32-low.c (target_regsets): Likewise.
7378 * linux-m68k-low.c (target_regsets): Likewise.
7379 * linux-mips-low.c (target_regsets): Likewise.
7380 * linux-ppc-low.c (target_regsets): Likewise.
7381 * linux-s390-low.c (target_regsets): Likewise.
7382 * linux-sh-low.c (target_regsets): Likewise.
7383 * linux-sparc-low.c (target_regsets): Likewise.
7384 * linux-xtensa-low.c (target_regsets): Likewise.
7385
7386 * linux-low.c: Include <sys/uio.h>.
7387 (regsets_fetch_inferior_registers): Support nt_type.
7388 (regsets_store_inferior_registers): Likewise.
7389 (linux_process_qsupported): New.
7390 (linux_target_ops): Add linux_process_qsupported.
7391
7392 * linux-low.h (regset_info): Add nt_type.
7393 (linux_target_ops): Add process_qsupported.
7394
7395 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7396 and <sys/uio.h>.
7397 (init_registers_i386_avx_linux): New.
7398 (init_registers_amd64_avx_linux): Likewise.
7399 (xmltarget_i386_linux_no_xml): Likewise.
7400 (xmltarget_amd64_linux_no_xml): Likewise.
7401 (PTRACE_GETREGSET): Likewise.
7402 (PTRACE_SETREGSET): Likewise.
7403 (x86_fill_xstateregset): Likewise.
7404 (x86_store_xstateregset): Likewise.
7405 (use_xml): Likewise.
7406 (x86_linux_update_xmltarget): Likewise.
7407 (x86_linux_process_qsupported): Likewise.
7408 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7409 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7410 init_registers_i386_linux here. Call
7411 x86_linux_update_xmltarget.
7412 (the_low_target): Add x86_linux_process_qsupported.
7413
7414 * server.c (handle_query): Call target_process_qsupported.
7415
7416 * target.h (target_ops): Add process_qsupported.
7417 (target_process_qsupported): New.
7418
7419 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7420
7421 * inferiors.c (add_thread): Set last_status kind to
7422 TARGET_WAITKIND_IGNORE.
7423 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7424 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7425 (linux_wait_1): Move `thread' local definition to block that uses
7426 it. Don't NULL initialize `event_child'.
7427 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7428 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7429 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7430
7431 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7432
7433 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7434 an extended waitstatus, or by a watchpoint.
7435 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7436 thread was stepping or has been stopped by a watchpoint.
7437
7438 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7439
7440 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7441 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7442 of another, then delete the previous, and validate all
7443 breakpoints.
7444 (validate_inserted_breakpoint): New.
7445 (delete_disabled_breakpoints): New.
7446 (validate_breakpoints): New.
7447 (check_mem_read): Validate breakpoints before trusting their
7448 shadow. Delete disabled breakpoints.
7449 (check_mem_write): Validate breakpoints before trusting they
7450 should be inserted. Delete disabled breakpoints.
7451 * mem-break.h (validate_breakpoints):
7452 * server.c (handle_query): Validate breakpoints when we see a
7453 qSymbol query.
7454
7455 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7456
7457 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7458 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7459 if we could tell there's a GDB breakpoint at stop_pc.
7460 (need_step_over_p): Don't do a step over if we find a GDB
7461 breakpoint at the resume PC.
7462
7463 * mem-break.c (struct raw_breakpoint): New.
7464 (enum bkpt_type): New type `gdb_breakpoint'.
7465 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7466 fields. New field `raw'.
7467 (find_raw_breakpoint_at): New.
7468 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7469 breakpoint instead.
7470 (set_breakpoint_at): Adjust.
7471 (delete_raw_breakpoint): New.
7472 (release_breakpoint): New.
7473 (delete_breakpoint): Rename to...
7474 (delete_breakpoint_1): ... this. Add proc parameter. Use
7475 release_breakpoint. Return ENOENT.
7476 (delete_breakpoint): Reimplement.
7477 (find_breakpoint_at): Delete.
7478 (find_gdb_breakpoint_at): New.
7479 (delete_breakpoint_at): Delete.
7480 (set_gdb_breakpoint_at): New.
7481 (delete_gdb_breakpoint_at): New.
7482 (gdb_breakpoint_here): New.
7483 (set_reinsert_breakpoint): Use release_breakpoint.
7484 (uninsert_breakpoint): Rename to ...
7485 (uninsert_raw_breakpoint): ... this.
7486 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7487 (reinsert_raw_breakpoint): Change parameter type to
7488 raw_breakpoint.
7489 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7490 instead.
7491 (check_breakpoints): Adjust. Use release_breakpoint.
7492 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7493 (breakpoint_inserted_here): Ditto.
7494 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7495 Don't trust the breakpoint's shadow if it is not inserted.
7496 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7497 (delete_all_breakpoints): Adjust.
7498 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7499 use delete_breakpoint_1.
7500
7501 * mem-break.h (breakpoints_supported): Delete declaration.
7502 (set_gdb_breakpoint_at): Declare.
7503 (gdb_breakpoint_here): Declare.
7504 (delete_breakpoint_at): Delete.
7505 (delete_gdb_breakpoint_at): Declare.
7506
7507 * server.h (struct raw_breakpoint): Forward declare.
7508 (struct process_info): New field `raw_breakpoints'.
7509
7510 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7511 breakpoints.
7512
7513 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7514
7515 * linux-low.c (status_pending_p_callback): Fix comment.
7516 (linux_wait_for_event_1): Move most of the internal breakpoint
7517 handling from here...
7518 (linux_wait_1): ... to here.
7519 (count_events_callback): New.
7520 (select_singlestep_lwp_callback): New.
7521 (select_event_lwp_callback): New.
7522 (cancel_breakpoints_callback): New.
7523 (select_event_lwp): New.
7524 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7525 priority to all LWPs that have had events that should be reported
7526 to the client. Cancel breakpoints when about to reporting the
7527 event to the client, not while stopping lwps. No longer cancel
7528 finished single-steps here.
7529 (cancel_finished_single_step): Delete.
7530 (cancel_finished_single_steps): Delete.
7531
7532 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7533
7534 * mem-break.c (enum bkpt_type): New.
7535 (struct breakpoint): New field `type'.
7536 (set_breakpoint_at): Change return type to struct breakpoint
7537 pointer. Set type to `other_breakpoint' by default.
7538 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7539 in the breakpoint list.
7540 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7541 (reinsert_breakpoint): Rename to ...
7542 (reinsert_raw_breakpoint): ... this.
7543 (reinsert_breakpoints_at): Adjust.
7544 * mem-break.h (struct breakpoint): Declare.
7545 (set_breakpoint_at): Change return type to struct breakpoint
7546 pointer.
7547
7548 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7549
7550 * server.c (handle_query): Assign, not compare.
7551
7552 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7553
7554 Teach linux gdbserver to step-over-breakpoints.
7555
7556 * linux-low.c (can_hardware_single_step): New.
7557 (supports_breakpoints): New.
7558 (handle_extended_wait): If stopping threads, read the stop pc of
7559 the new cloned LWP.
7560 (get_pc): New.
7561 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7562 low target doesn't support retrieving the PC.
7563 (add_lwp): Set last_resume_kind to resume_continue.
7564 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7565 (linux_attach): Don't clear stop_expected. Set the lwp's
7566 last_resume_kind to resume_stop.
7567 (linux_detach_one_lwp): Don't check for removed breakpoints.
7568 (check_removed_breakpoint): Delete.
7569 (status_pending_p): Rename to ...
7570 (status_pending_p_callback): ... this. Don't check for removed
7571 breakpoints. Don't consider threads that are stopped from GDB's
7572 perspective.
7573 (linux_wait_for_lwp): Always read the stop_pc here.
7574 (cancel_breakpoint): New.
7575 (step_over_bkpt): New global.
7576 (linux_wait_for_event_1): Implement stepping over breakpoints.
7577 (gdb_wants_lwp_stopped): New.
7578 (gdb_wants_all_stopped): New.
7579 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7580 single-step traps here. Store the thread's last reported target
7581 wait status.
7582 (send_sigstop): Don't clear stop_expected. Always set it,
7583 instead.
7584 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7585 (cancel_finished_single_step): New.
7586 (cancel_finished_single_steps): New.
7587 (wait_for_sigstop): Don't cancel finished single-step traps here.
7588 (linux_resume_one_lwp): Don't check for removed breakpoints.
7589 Don't set `step' on non-hardware step archs.
7590 (linux_set_resume_request): Ignore resume_stop requests if already
7591 stopping or stopped. Set the lwp's last_resume_kind.
7592 (resume_status_pending_p): Don't check for removed breakpoints.
7593 (need_step_over_p): New.
7594 (start_step_over): New.
7595 (finish_step_over): New.
7596 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7597 requests. Clear the thread's last reported target waitstatus.
7598 Don't use the `suspended' flag. Don't consider pending breakpoints.
7599 (linux_resume): Start a step-over if necessary.
7600 (proceed_one_lwp): New.
7601 (proceed_all_lwps): New.
7602 (unstop_all_lwps): New.
7603 * linux-low.h (struct lwp_info): Rewrite comment for the
7604 `suspended' flag. Add the `stop_pc' field. Delete the
7605 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7606 Add `'last_resume_kind' and `need_step_over' fields.
7607 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7608 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7609 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7610 (set_raw_breakpoint_at): New.
7611 (set_breakpoint_at): Rewrite to use it.
7612 (reinsert_breakpoint_handler): Delete.
7613 (set_reinsert_breakpoint): New.
7614 (reinsert_breakpoint_by_bp): Delete.
7615 (delete_reinsert_breakpoints): New.
7616 (uninsert_breakpoint): Rewrite.
7617 (uninsert_breakpoints_at): New.
7618 (reinsert_breakpoint): Rewrite.
7619 (reinsert_breakpoints_at): New.
7620 (check_breakpoints): Rewrite.
7621 (breakpoint_here): New.
7622 (breakpoint_inserted_here): New.
7623 (check_mem_read): Adjust.
7624 * mem-break.h (breakpoints_supported, breakpoint_here)
7625 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7626 (reinsert_breakpoint_by_bp): Delete declaration.
7627 (delete_reinsert_breakpoints): Declare.
7628 (reinsert_breakpoint): Delete declaration.
7629 (reinsert_breakpoints_at): Declare.
7630 (uninsert_breakpoint): Delete declaration.
7631 (uninsert_breakpoints_at): Declare.
7632 (check_breakpoints): Adjust prototype.
7633 * server.h: Adjust include order.
7634 (struct thread_info): Declare here. Add a `last_status' field.
7635
7636 2010-03-23 Michael Snyder <msnyder@vmware.com>
7637
7638 * server.c (crc32): New function.
7639 (handle_query): Add handling for 'qCRC:' request.
7640
7641 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7642
7643 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7644 lwp had been stopped by a watchpoint.
7645
7646 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7647
7648 * server.h (internal_error): Declare.
7649 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7650 * utils.c (internal_error): New function.
7651
7652 2010-03-15 Andreas Schwab <schwab@redhat.com>
7653
7654 * configure.srv: Fix typo setting srv_regobj.
7655
7656 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7657
7658 * linux-low.c (fetch_register): Avoid passing a non string literal
7659 format to `error'.
7660 (usr_store_inferior_registers): Ditto.
7661
7662 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7663
7664 * linux-low.c (linux_write_memory): Bail out early if peeking
7665 memory failed.
7666
7667 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7668
7669 * linux-low.h (struct lwp_info): New fields
7670 `stopped_by_watchpoint' and `stopped_data_address'.
7671 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7672 here, and cache them in the lwp object.
7673 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7674 directly.
7675 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7676 field.
7677 (linux_stopped_by_watchpoint): Rewrite.
7678 (linux_stopped_data_address): Rewrite.
7679
7680 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7681
7682 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7683 switching the current inferior, not before.
7684
7685 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7686
7687 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7688 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7689 i386-linux.c and amd64-linux.c.
7690 (reg-i386.o): Removed.
7691 (reg-i386.c): Likewise.
7692 (reg-i386-linux.o): Likewise.
7693 (reg-i386-linux.c): Likewise.
7694 (reg-x86-64.o): Likewise.
7695 (reg-x86-64.c): Likewise.
7696 (reg-x86-64-linux.o): Likewise.
7697 (reg-x86-64-linux.c): Likewise.
7698 (i386.o): New.
7699 (i386.c): Likewise.
7700 (i386-linux.o): Likewise.
7701 (i386-linux.c): Likewise.
7702 (amd64.o): Likewise.
7703 (amd64.c): Likewise.
7704 (amd64-linux.o): Likewise.
7705 (amd64-linux.c): Likewise.
7706
7707 * configure.srv (srv_i386_regobj): New.
7708 (srv_i386_linux_regobj): Likewise.
7709 (srv_amd64_regobj): Likewise.
7710 (srv_amd64_linux_regobj): Likewise.
7711 (srv_i386_32bit_xmlfiles): Likewise.
7712 (srv_i386_64bit_xmlfiles): Likewise.
7713 (srv_i386_xmlfiles): Likewise.
7714 (srv_amd64_xmlfiles): Likewise.
7715 (srv_i386_linux_xmlfiles): Likewise.
7716 (srv_amd64_linux_xmlfiles): Likewise.
7717 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7718 srv_xmlfiles to $srv_i386_xmlfiles.
7719 (i[34567]86-*-mingw32ce*): Likewise.
7720 (i[34567]86-*-mingw*): Likewise.
7721 (i[34567]86-*-nto*): Likewise.
7722 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7723 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7724 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7725 (x86_64-*-linux*): Likewise.
7726
7727 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7728 (init_registers_amd64_linux): New.
7729 (x86_arch_setup): Replace init_registers_x86_64_linux with
7730 init_registers_amd64_linux.
7731
7732 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7733
7734 * configure.ac: Check for libdl. If it is not available link against
7735 static libthread_db.
7736 * configure: Regenerate.
7737
7738 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7739
7740 PR9605
7741
7742 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7743 handing a read watchpoint.
7744 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7745
7746 2010-02-12 Doug Evans <dje@google.com>
7747
7748 * linux-low.c (linux_supports_tracefork_flag): Document.
7749 (linux_look_up_symbols): Add comment.
7750
7751 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7752
7753 * regcache.c (supply_register): Clear regcache if buf is NULL.
7754
7755 2010-02-02 Nicolas Roche <roche@sourceware.org>
7756 Joel Brobecker <brobecker@adacore.com>
7757
7758 * inferiors.c (find_inferior): Add function documentation.
7759 (unloaded_dll): Handle the case where the unloaded dll has not
7760 been previously registered in the dll list.
7761
7762 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7763
7764 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7765 (thumb2_breakpoint): New.
7766 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7767
7768 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7769
7770 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7771 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7772 breakpoints.
7773
7774 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7775
7776 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7777
7778 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7779
7780 * linux-s390-low.c (s390_collect_ptrace_register)
7781 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7782
7783 2010-01-21 Doug Evans <dje@google.com>
7784
7785 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7786 (PTRACE_ARG4_TYPE): New macro.
7787 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7788 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7789 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7790 (usr_store_inferior_registers): Ditto.
7791 (linux_read_memory, linux_write_memory): Ditto.
7792 (linux_test_for_tracefork): Ditto.
7793
7794 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7795 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7796
7797 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7798
7799 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7800 target.
7801
7802 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7803
7804 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7805 prototype to take a regcache. Adjust.
7806
7807 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7808
7809 * regcache.h (struct thread_info): Forward declare.
7810 (struct regcache): New.
7811 (new_register_cache): Adjust prototype.
7812 (get_thread_regcache): Declare.
7813 (free_register_cache): Adjust prototype.
7814 (registers_to_string, registers_from_string): Ditto.
7815 (supply_register, supply_register_by_name, collect_register)
7816 (collect_register_as_string, collect_register_by_name): Ditto.
7817 * regcache.c (struct inferior_regcache_data): Delete.
7818 (get_regcache): Rename to ...
7819 (get_thread_regcache): ... this. Adjust. Switch inferior before
7820 fetching registers.
7821 (regcache_invalidate_one): Adjust.
7822 (regcache_invalidate): Fix prototype.
7823 (new_register_cache): Return the new register cache.
7824 (free_register_cache): Change prototype.
7825 (realloc_register_cache): Adjust.
7826 (registers_to_string): Change prototype to take a regcache. Adjust.
7827 (registers_from_string): Ditto.
7828 (register_data): Ditto.
7829 (supply_register): Ditto.
7830 (supply_register_by_name): Ditto.
7831 (collect_register): Ditto.
7832 (collect_register_as_string): Ditto.
7833 (collect_register_by_name): Ditto.
7834 * server.c (process_serial_event): Adjust.
7835 * linux-low.h (regset_fill_func, regset_store_func): Change
7836 prototype.
7837 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7838 Change prototype.
7839 * linux-low.c (get_stop_pc): Adjust.
7840 (check_removed_breakpoint): Adjust.
7841 (linux_wait_for_event): Adjust.
7842 (linux_resume_one_lwp): Adjust.
7843 (fetch_register): Add regcache parameter. Adjust.
7844 (usr_store_inferior_registers): Ditto.
7845 (regsets_fetch_inferior_registers): Ditto.
7846 (regsets_store_inferior_registers): Ditto.
7847 (linux_fetch_registers, linux_store_registers): Ditto.
7848 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7849 regcache. Adjust.
7850 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7851 Ditto.
7852 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7853 prototype to take a regcache.
7854 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7855 * remote-utils.c (convert_ascii_to_int, outreg)
7856 (prepare_resume_reply): Change prototype to take a regcache.
7857 Adjust.
7858 * target.h (struct target_ops) <fetch_registers, store_registers>:
7859 Change prototype to take a regcache.
7860 (fetch_inferior_registers, store_inferior_registers): Change
7861 prototype to take a regcache. Adjust.
7862 * proc-service.c (ps_lgetregs): Adjust.
7863 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7864 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7865 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7866 take a regcache. Adjust.
7867 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7868 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7869 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7870 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7871 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7872 (cris_cannot_fetch_register):
7873 (cris_breakpoint_at): Change prototype to take a regcache.
7874 Adjust.
7875 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7876 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7877 to take a regcache. Adjust.
7878 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7879 Adjust.
7880 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7881 take a regcache. Adjust.
7882 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7883 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7884 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7885 * linux-mips-low.c (mips_get_pc):
7886 (mips_set_pc): Change prototype to take a regcache. Adjust.
7887 (mips_reinsert_addr): Adjust.
7888 (mips_collect_register): Change prototype to take a regcache.
7889 Adjust.
7890 (mips_supply_register):
7891 (mips_collect_register_32bit, mips_supply_register_32bit)
7892 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7893 (mips_store_fpregset): Ditto.
7894 * linux-ppc-low.c (ppc_supply_ptrace_register)
7895 (ppc_supply_ptrace_register): Ditto.
7896 (parse_spufs_run): Adjust.
7897 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7898 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7899 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7900 take a regcache. Adjust.
7901 * linux-s390-low.c (s390_collect_ptrace_register)
7902 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7903 (s390_set_pc): Change prototype to take a regcache. Adjust.
7904 (s390_arch_setup): Adjust.
7905 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7906 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7907 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7908 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7909 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7910 regcache. Adjust.
7911 (sparc_breakpoint_at): Adjust.
7912 * linux-xtensa-low.c (xtensa_fill_gregset):
7913 (xtensa_store_gregset):
7914 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7915 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7916 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7917 prototype to take a regcache. Adjust.
7918 * win32-arm-low.c (arm_fetch_inferior_register)
7919 (arm_store_inferior_register): Change prototype to take a
7920 regcache. Adjust.
7921 * win32-i386-low.c (i386_fetch_inferior_register)
7922 (i386_store_inferior_register): Change prototype to take a
7923 regcache. Adjust.
7924 * win32-low.c (child_fetch_inferior_registers)
7925 (child_store_inferior_registers): Change prototype to take a
7926 regcache. Adjust.
7927 (win32_wait): Adjust.
7928 (win32_fetch_inferior_registers): Change prototype to take a
7929 regcache. Adjust.
7930 (win32_store_inferior_registers): Adjust.
7931 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7932 store_inferior_register>: Change prototype to take a regcache.
7933
7934 2010-01-20 Doug Evans <dje@google.com>
7935
7936 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7937 #ifdef.
7938 (linux_wait_for_event1, linux_init_signals): Ditto.
7939 (W_STOPCODE): Provide definition if missing.
7940
7941 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7942
7943 * linux-low.c (linux_core_of_thread): New.
7944 (compare_ints, show_process, list_threads): New.
7945 (linux_qxfer_osdata): Report threads and cores.
7946 (linux_target_op): Register linux_core_of_thread.
7947 * remote-utils.c (prepare_resume_reply): Report the core.
7948 (buffer_xml_printf): Support %d specifier.
7949 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7950 New.
7951 (handle_query): Handle qXfer:threads. Announce availability
7952 thereof.
7953 * target.h (struct target_ops): New field core_of_thread.
7954
7955 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7956
7957 * Makefile.in (clean): Remove new generated files.
7958 (reg-s390.o, reg-s390.c): Remove rules.
7959 (reg-s390x.o, reg-s390x.c): Likewise.
7960 (s390-linux32.o, s390-linux32.c): Add rules.
7961 (s390-linux64.o, s390-linux64.c): Likewise.
7962 (s390x-linux64.o, s390x-linux64.c): Likewise.
7963 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7964 * linux-s390-low.c: Include <elf.h>.
7965 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7966 (init_registers_s390): Remove prototype.
7967 (init_registers_s390x): Likewise.
7968 (init_registers_s390_linux32): Add prototype.
7969 (init_registers_s390_linux64): Likewise.
7970 (init_registers_s390x_linux64): Likewise.
7971 (s390_num_regs_3264): New define.
7972 (s390_regmap_3264): New global variable.
7973 (s390_cannot_fetch_register): Remove obsolete check.
7974 (s390_cannot_store_register): Likewise.
7975 (s390_collect_ptrace_register): Handle upper/lower register halves.
7976 (s390_supply_ptrace_register): Likewise.
7977 (s390_fill_gregset): Update to register number changes.
7978 (s390_get_hwcap): New routine.
7979 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7980 Install appropriate regmap and register set.
7981
7982 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7983
7984 * server.c (gdbserver_version): Update copyright year to 2010.
7985 * gdbreplay.c (gdbreplay_version): Likewise.
7986
7987 2009-12-28 Doug Evans <dje@google.com>
7988
7989 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7990 elf/external.h. Include <elf.h> instead but only if necessary.
7991
7992 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7993
7994 * linux-low.c (linux_remove_process): Remove `detaching'
7995 parameter. Don't release/detach from thread_db here.
7996 (linux_kill): Release/detach from thread_db here, ...
7997 (linux_detach): ... and here, before actually detaching.
7998 (linux_wait_1): ... and here, when a process exits.
7999 * thread-db.c (any_thread_of): New.
8000 (thread_db_free): Switch the current inferior to a thread of the
8001 passed in process.
8002
8003 2009-12-21 Doug Evans <dje@google.com>
8004
8005 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8006
8007 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8008 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8009 warning ifndef __NR_tkill. Move setting of errno there too.
8010 Delete unnecessary resetting of errno after syscall.
8011 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8012
8013 * configure.ac: Check for dladdr.
8014 * config.in: Regenerate.
8015 * configure: Regenerate.
8016 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8017 (try_thread_db_load): Update.
8018
8019 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8020
8021 2009-12-18 Doug Evans <dje@google.com>
8022
8023 * event-loop.c: Include unistd.h if it exists.
8024
8025 * linux-low.c (my_waitpid): Move definition away from being in
8026 between linux_tracefork_child/linux_test_for_tracefork.
8027
8028 * gdb_proc_service.h (psaddr_t): Fix type.
8029 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8030 signature to match glibc.
8031
8032 2009-12-16 Doug Evans <dje@google.com>
8033
8034 * linux-low.c (linux_read_memory): Fix argument to read.
8035
8036 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8037
8038 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8039 events, don't leave current_inferior pointing at null.
8040
8041 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8042
8043 * win32-low.c (LOG): Delete.
8044 (OUTMSG): Output to stderr.
8045 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8046 on compile time LOG macro.
8047 (win32_wait): Fix debug output.
8048
8049 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8050
8051 * win32-low.c (win32_add_one_solib): If the dll name is
8052 "ntdll.dll", prepend the system directory to the dll path.
8053
8054 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8055
8056 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8057
8058 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8059 Vladimir Prus <vladimir@codesourcery.com>
8060
8061 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8062 * configure.ac: Check for __mcoldfire__ and set
8063 gdb_cv_m68k_is_coldfire.
8064 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8065 reg-cf.o and reg-m68k.o.
8066 * configure: Regenerated.
8067
8068 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8069
8070 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8071 Pass it to thread_db_free.
8072 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8073 proper `detaching' argument to linux_remove_process.
8074 * linux-low.h (thread_db_free): Add `detaching' parameter.
8075 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8076 to thread_db_free.
8077 (thread_db_free): Add `detaching' parameter. Only
8078 call td_ta_clear_event if detaching from process.
8079
8080 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8081
8082 * thread-db.c (thread_db_free): Fix typo.
8083
8084 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8085
8086 PR gdb/10838
8087 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8088
8089 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8090
8091 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8092 with an i686 compiler.
8093 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8094 needed.
8095 * configure: Rebuilt.
8096
8097 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8098
8099 PR gdb/10783
8100
8101 * server.c (handle_search_memory_1): Correct read_addr initialization
8102 in loop for searching subsequent chunks.
8103
8104 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8105
8106 * configure.ac: New --with-libthread-db option.
8107 * thread-db.c: Allow direct dependence on libthread_db.
8108 (thread_db_free): Adjust.
8109 * config.in: Regenerate.
8110 * configure: Likewise.
8111
8112 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8113
8114 PR gdb/10757
8115 * thread-db.c (attach_thread): New function.
8116 (maybe_attach_thread): Return success/failure.
8117 (find_new_threads_callback): Adjust.
8118 (thread_db_find_new_threads): Loop until no new threads.
8119
8120 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8121
8122 * proc-service.c (ps_lgetregs): Formatting.
8123
8124 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8125
8126 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8127 * configure.ac: Adjust.
8128 * linux-low.h (struct process_info_private): Move members to struct
8129 thread_db.
8130 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8131 * linux-low.c (linux_remove_process): Adjust.
8132 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8133 * server.c (handle_query): Move code ...
8134 (handle_monitor_command): ... here. New function.
8135 * target.h (struct target_ops): New member.
8136 * thread-db.c (struct thread_db): New.
8137 (libthread_db_search_path): New variable.
8138 (thread_db_create_event, thread_db_enable_reporting)
8139 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8140 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8141 (try_thread_db_load_1, dladdr_to_soname): New functions.
8142 (try_thread_db_load, thread_db_load_search): New functions.
8143 (thread_db_init): Search for libthread_db.
8144 (thread_db_free): New function.
8145 (thread_db_handle_monitor_command): Likewise.
8146 * config.in: Regenerate.
8147 * configure: Regenerate.
8148
8149 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8150
8151 * spu-low.c (spu_kill): Wait for inferior to terminate.
8152 Call clear_inferiors.
8153 (spu_detach): Call clear_inferiors.
8154
8155 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8156
8157 * aclocal.m4: Regenerate.
8158 * config.in: Likewise.
8159 * configure: Likewise.
8160
8161 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8162
8163 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8164 (parse_spufs_run): New function.
8165 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8166 (ppc_breakpoint_at): Handle SPU breakpoints.
8167
8168 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8169
8170 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8171 (SPUFS_MAGIC): Define.
8172 (spu_enumerate_spu_ids): New function.
8173 (linux_qxfer_spu): New function.
8174 (linux_target_ops): Install linux_qxfer_spu.
8175
8176 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8177
8178 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8179 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8180 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8181 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8182 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8183 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8184 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8185 (init_registers_powerpc_cell32l): Add prototype.
8186 (init_registers_powerpc_cell64l): Likewise.
8187 (ppc_arch_setup): Detect Cell/B.E. architecture.
8188
8189 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8190
8191 * Makefile.in (datarootdir): New variable.
8192
8193 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8194
8195 * linux-low.c (linux_write_memory): Update debugging output.
8196 * Makefile.in (clean): Add new descriptions.
8197 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8198 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8199 * configure.srv: Add new files for arm*-*-linux*.
8200 * linux-arm-low.c: Add new declarations.
8201 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8202 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8203 (HWCAP_VFPv3D16): New.
8204 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8205 instead of __IWMMXT__.
8206 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8207 (arm_arch_setup): New.
8208 (target_regsets): Remove #ifdef. Add VFP regset.
8209 (the_low_target): Use arm_arch_setup.
8210
8211 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8212
8213 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8214 the main thread again.
8215
8216 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8217
8218 Adding Neutrino gdbserver.
8219 * configure: Regenerated.
8220 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8221 * configure.srv (i[34567]86-*-nto*): New target.
8222 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8223 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8224 (nto_comctrl) [__QNX__]: New function.
8225 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8226
8227 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8228
8229 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8230 srv_tgtobj.
8231
8232 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8233 Pedro Alves <pedro@codesourcery.com>
8234
8235 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8236 don't support CONTEXT_EXTENDED_REGISTERS.
8237 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8238 (the_low_target): Install them.
8239 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8240 failing with ERROR_PIPE_NOT_CONNECTED.
8241
8242 2009-06-30 Doug Evans <dje@google.com>
8243 Pierre Muller <muller@ics.u-strasbg.fr>
8244
8245 Add h/w watchpoint support to x86-linux, win32-i386.
8246 * Makefile.in (SFILES): Add i386-low.c
8247 (i386_low_h): Define.
8248 (i386-low.o): Add dependencies.
8249 (linux-x86-low.o): Add i386-low.h dependency.
8250 (win32-i386-low.o): Ditto.
8251 * i386-low.c: New file.
8252 * i386-low.h: New file.
8253 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8254 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8255 * linux-low.c (linux_add_process): Initialize arch_private.
8256 (linux_remove_process): Free arch_private.
8257 (add_lwp): Initialize arch_private.
8258 (delete_lwp): Free arch_private.
8259 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8260 provided.
8261 * linux-low.h (process_info_private): New member arch_private.
8262 (lwp_info): New member arch_private.
8263 (linux_target_ops): New members new_process, new_thread,
8264 prepare_to_resume.
8265 (ptid_of): New macro.
8266 * linux-x86-low.c: Include stddef.h, i386-low.h.
8267 (arch_process_info): New struct.
8268 (arch_lwp_info): New struct.
8269 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8270 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8271 (i386_dr_low_get_status): New function.
8272 (x86_insert_point, x86_remove_point): New functions.
8273 (x86_stopped_by_watchpoint): New function.
8274 (x86_stopped_data_address): New function.
8275 (x86_linux_new_process, x86_linux_new_thread): New functions.
8276 (x86_linux_prepare_to_resume): New function.
8277 (the_low_target): Add entries for insert_point, remove_point,
8278 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8279 prepare_to_resume.
8280 * server.c (debug_hw_points): New global.
8281 (monitor_show_help): Document set debug-hw-points.
8282 (handle_query): Process "set debug-hw-points".
8283 * server.h (debug_hw_points): Declare.
8284 (paddress): Declare.
8285 * utils.c (NUMCELLS, CELLSIZE): New macros.
8286 (get_sell, xsnprintf, paddress): New functions.
8287 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8288 remove_point, stopped_by_watchpoint, stopped_data_address.
8289 * win32-i386-low.c: Include i386-low.h.
8290 (debug_reg_state): Replaces dr.
8291 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8292 (i386_dr_low_get_status): New function.
8293 (i386_insert_point, i386_remove_point): New functions.
8294 (i386_stopped_by_watchpoint): New function.
8295 (i386_stopped_data_address): New function.
8296 (i386_initial_stuff): Update.
8297 (get_thread_context,set_thread_context,i386_thread_added): Update.
8298 (the_low_target): Add entries for insert_point,
8299 remove_point, stopped_by_watchpoint, stopped_data_address.
8300 * win32-low.c (win32_insert_watchpoint): New function.
8301 (win32_remove_watchpoint): New function.
8302 (win32_stopped_by_watchpoint): New function.
8303 (win32_stopped_data_address): New function.
8304 (win32_target_ops): Add entries for insert_watchpoint,
8305 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8306 * win32-low.h (win32_target_ops): New members insert_point,
8307 remove_point, stopped_by_watchpoint, stopped_data_address.
8308
8309 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8310
8311 * server.c (process_serial_event): Re-return unsupported, not
8312 error, if the type isn't recognized. Re-allow supporting only
8313 insert or remove packets. Also call require_running for
8314 breakpoints. Add missing break statement to default case. Tidy.
8315 * target.h (struct target_ops): Rename insert_watchpoint to
8316 insert_point, and remove_watchpoint to remove_point.
8317
8318 * linux-low.h (struct linux_target_ops): Likewise.
8319 * linux-low.c (linux_insert_watchpoint): Rename to ...
8320 (linux_insert_point): ... this. Adjust.
8321 (linux_remove_watchpoint): Rename to ...
8322 (linux_remove_point): ... this. Adjust.
8323 (linux_target_ops): Adjust.
8324 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8325 (cris_insert_point): ... this.
8326 (cris_remove_watchpoint): Rename to ...
8327 (cris_remove_point): ... this.
8328 (the_low_target): Adjust.
8329
8330 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8331
8332 * server.c (handle_v_kill): Pass signal_pid to
8333 kill_inferior if multi_process is zero.
8334
8335 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8336
8337 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8338 * target.h (target_ops): Comment for *_watchpoint to make it clear
8339 the functions can get types '0' and '1'.
8340
8341 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8342
8343 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8344 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8345 * regcache.c (get_regcache): Likewise.
8346 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8347 * win32-low.c (child_fetch_inferior_registers): Remove check for
8348 regno 0.
8349
8350 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8351 Pedro Alves <pedro@codesourcery.com>
8352
8353 * target.h (struct target_ops) <supports_multi_process>: New
8354 callback.
8355 (target_supports_multi_process): New.
8356 * server.c (handle_query): Even if GDB reports support, only
8357 enable multi-process if the target also supports it. Report
8358 multi-process support only if the target backend supports it.
8359 * linux-low.c (linux_supports_multi_process): New function.
8360 (linux_target_ops): Install it as target_supports_multi_process
8361 callback.
8362
8363 2009-05-24 Doug Evans <dje@google.com>
8364
8365 Global renaming of find_thread_pid to find_thread_ptid.
8366 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8367 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8368 All callers updated.
8369
8370 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8371 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8372 directly.
8373
8374 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8375 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8376 (linux_resume_one_lwp): Ditto.
8377
8378 2009-05-23 Doug Evans <dje@google.com>
8379
8380 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8381 from struct inferior_list_entry * to struct lwp_info *.
8382 All callers updated.
8383
8384 2009-05-13 Doug Evans <dje@google.com>
8385
8386 * linux-x86-low.c: Don't include assert.h.
8387 (x86_siginfo_fixup): Use fatal, not assert.
8388 (x86_arch_setup): Fix comment.
8389
8390 2009-05-12 Doug Evans <dje@google.com>
8391
8392 Biarch support for i386/amd64 gdbserver.
8393 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8394 Add linux-x86-low.c.
8395 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8396 (linux-x86-low.o): Add.
8397 * linux-x86-64-low.c: Delete.
8398 * linux-i386-low.c: Delete.
8399 * linux-x86-low.c: New file.
8400 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8401 linux-x86-low.o.
8402 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8403 linux-x86-low.o.
8404 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8405 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8406 (linux_child_pid_to_exec_file): New function.
8407 (elf_64_header_p, elf_64_file_p): New functions.
8408 (siginfo_fixup): New function.
8409 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8410 give target a chance to convert layout.
8411 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8412 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8413
8414 2009-05-07 Doug Evans <dje@google.com>
8415
8416 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8417 (regsets_store_inferior_registers): Ditto.
8418
8419 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8420
8421 PR server/10048
8422
8423 * linux-low.c (must_set_ptrace_flags): Delete.
8424 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8425 of the global.
8426 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8427 `lwp->must_set_ptrace_flags' instead.
8428 (linux_wait_for_event_1): Set ptrace options here.
8429 (linux_wait_1): ... not here.
8430
8431 2009-04-30 Doug Evans <dje@google.com>
8432
8433 * inferiors.c (started_inferior_callback): New function.
8434 (attached_inferior_callback): New function.
8435 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8436 * server.c (print_started_pid, print_attached_pid): New functions.
8437 (detach_or_kill_for_exit): New function.
8438 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8439 * server.h (have_started_inferiors_p): Declare.
8440 (have_attached_inferiors_p): Declare.
8441
8442 * inferiors.c (remove_process): Fix memory leak, free process.
8443 * linux-low.c (linux_remove_process): New function.
8444 (linux_kill): Call it instead of remove_process.
8445 (linux_detach, linux_wait_1): Ditto.
8446
8447 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8448
8449 * configure.srv: Add x86 Windows CE target.
8450
8451 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8452
8453 * inferiors.c (get_thread_process): Make global.
8454 * server.h (get_thread_process): Add prototype.
8455 * thread-db.c (find_one_thread): Use get_thread_process
8456 instead of current_process.
8457 (thread_db_get_tls_address): Do not crash if called when
8458 thread layer is not yet initialized.
8459
8460 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8461
8462 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8463 * spu-low.c (current_tid): Rename to ...
8464 (current_ptid): ... this.
8465 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8466 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8467 ptid_get_lwp (current_ptid) instead of current_tid.
8468 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8469 instead of current_tid. Use find_process_pid to verify pid
8470 argument is valid. Pass proper argument to remove_process.
8471 (spu_thread_alive): Compare current_ptid instead of current_tid.
8472 (spu_resume): Likewise.
8473
8474 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8475
8476 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8477 variable.
8478
8479 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8480
8481 Implement the multiprocess extensions, and add linux multiprocess
8482 support.
8483
8484 * server.h (ULONGEST): Declare.
8485 (struct ptid, ptid_t): New.
8486 (minus_one_ptid, null_ptid): Declare.
8487 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8488 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8489 (struct inferior_list_entry): Change `id' type from unsigned from
8490 to ptid_t.
8491 (struct sym_cache, struct breakpoint, struct
8492 process_info_private): Forward declare.
8493 (struct process_info): Declare.
8494 (current_process): Declare.
8495 (all_processes): Declare.
8496 (initialize_inferiors): Declare.
8497 (add_thread): Adjust to use ptid_t.
8498 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8499 (add_process, remove_process, find_thread_pid): Declare.
8500 (find_inferior_id): Adjust to use ptid_t.
8501 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8502 (multi_process): Declare.
8503 (push_event): Adjust to use ptid_t.
8504 (read_ptid, write_ptid): Declare.
8505 (prepare_resume_reply): Adjust to use ptid_t.
8506 (clear_symbol_cache): Declare.
8507 * inferiors.c (all_processes): New.
8508 (null_ptid, minus_one_ptid): New.
8509 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8510 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8511 (add_thread): Change unsigned long to ptid. Remove gdb_id
8512 parameter. Adjust.
8513 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8514 (gdb_id_to_thread): Rename to ...
8515 (find_thread_pid): ... this. Change unsigned long to ptid.
8516 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8517 (loaded_dll, pull_pid_from_list): Adjust.
8518 (add_process, remove_process, find_process_pid)
8519 (get_thread_process, current_process, initialize_inferiors): New.
8520 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8521 (struct target_waitstatus) <related_pid>: Ditto.
8522 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8523 return type to int.
8524 (struct target_ops) <join>: Add `pid' argument.
8525 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8526 (struct target_ops) <wait>: Add `ptid' field. Change return type
8527 to ptid.
8528 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8529 (mywait): Add `ptid' argument. Change return type to ptid_t.
8530 (target_pid_to_str): Declare.
8531 * target.c (set_desired_inferior): Adjust to use ptids.
8532 (mywait): Add new `ptid' argument. Adjust.
8533 (target_pid_to_str): New.
8534 * mem-break.h (free_all_breakpoints): Declare.
8535 * mem-break.c (breakpoints): Delelete.
8536 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8537 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8538 to use per-process breakpoint list.
8539 (free_all_breakpoints): New.
8540 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8541 (symbol_cache, all_symbols_looked_up): Delete.
8542 (hexchars): New.
8543 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8544 read_ptid): New.
8545 (prepare_resume_reply): Change ptid argument's type from unsigned
8546 long to ptid_t. Adjust. Implement W;process and X;process.
8547 (free_sym_cache, clear_symbol_cache): New.
8548 (look_up_one_symbol): Adjust to per-process symbol cache. *
8549 * server.c (cont_thread, general_thread, step_thread): Change type
8550 to ptid_t.
8551 (attached): Delete.
8552 (multi_process): New.
8553 (last_ptid): Change type to ptid_t.
8554 (struct vstop_notif) <ptid>: Change type to ptid_t.
8555 (queue_stop_reply, push_event): Change `ptid' argument's type to
8556 ptid_t.
8557 (discard_queued_stop_replies): Add `pid' argument.
8558 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8559 changes. Don't reference the `attached' global.
8560 (attach_inferior): Adjust to mywait interface changes.
8561 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8562 features. Handle and report "multiprocess+". Handle
8563 "qAttached:PID".
8564 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8565 changes.
8566 (handle_v_kill): New.
8567 (handle_v_stopped): Adjust to use target_pid_to_str.
8568 (handle_v_requests): Allow multiple attaches and runs when
8569 multiprocess extensions are in effect. Handle "vKill".
8570 (myresume): Adjust to use ptids.
8571 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8572 (handle_status): Adjust to discard_queued_stop_replies interface
8573 change.
8574 (first_thread_of, kill_inferior_callback)
8575 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8576 (main): Call initialize_inferiors. Adjust to use ptids, killing
8577 and detaching from all inferiors. Handle multiprocess packet
8578 variants.
8579 * linux-low.h: Include gdb_proc_service.h.
8580 (struct process_info_private): New.
8581 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8582 <lwpid_of>: Use ptid_get_lwp.
8583 (get_lwp_thread): Adjust.
8584 (struct lwp_info): Add `dead' member.
8585 (find_lwp_pid): Declare.
8586 * linux-low.c (thread_db_active): Delete.
8587 (new_inferior): Adjust comment.
8588 (inferior_pid): Delete.
8589 (linux_add_process): New.
8590 (handle_extended_wait): Adjust.
8591 (add_lwp): Change unsigned long to ptid.
8592 (linux_create_inferior): Add process to processes table. Adjust
8593 to use ptids. Don't set new_inferior here.
8594 (linux_attach_lwp): Rename to ...
8595 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8596 it. Adjust to use ptids.
8597 (linux_attach_lwp): New.
8598 (linux_attach): Add process to processes table. Don't set
8599 new_inferior here.
8600 (struct counter): New.
8601 (second_thread_of_pid_p, last_thread_of_process_p): New.
8602 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8603 multiple processes.
8604 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8605 processes. Remove process from process table.
8606 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8607 to multiple processes.
8608 (any_thread_of): New.
8609 (linux_detach): Add `pid' argument, and handle it. Remove process
8610 from processes table.
8611 (linux_join): Add `pid' argument. Handle it.
8612 (linux_thread_alive): Change unsighed long argument to ptid_t.
8613 Consider dead lwps as not being alive.
8614 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8615 threads we're not interested in.
8616 (same_lwp, find_lwp_pid): New.
8617 (linux_wait_for_lwp): Change `pid' argument's type from int to
8618 ptid_t. Adjust.
8619 (linux_wait_for_event): Rename to ...
8620 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8621 from int to ptid_t. Adjust.
8622 (linux_wait_for_event): New.
8623 (linux_wait_1): Add `ptid' argument. Change return type to
8624 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8625 that exit from the process table.
8626 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8627 Adjust.
8628 (mark_lwp_dead): New.
8629 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8630 stopping all threads, mark its main lwp as dead.
8631 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8632 ptids.
8633 (fetch_register, usr_store_inferior_registers)
8634 (regsets_fetch_inferior_registers)
8635 (regsets_store_inferior_registers, linux_read_memory)
8636 (linux_write_memory): Inline `inferior_pid'.
8637 (linux_look_up_symbols): Adjust to use per-process
8638 `thread_db_active'.
8639 (linux_request_interrupt): Adjust to use ptids.
8640 (linux_read_auxv): Inline `inferior_pid'.
8641 (initialize_low): Don't reference thread_db_active.
8642 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8643 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8644 (ps_getpid): Return the pid of the current inferior.
8645 * thread-db.c (proc_handle, thread_agent): Delete.
8646 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8647 per-process data.
8648 (find_one_thread): Change argument type to ptid_t. Adjust to
8649 per-process data.
8650 (maybe_attach_thread): Adjust to per-process data and ptids.
8651 (thread_db_find_new_threads): Ditto.
8652 (thread_db_init): Ditto.
8653 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8654 processes table. Adjust to use ptids.
8655 (spu_kill, spu_detach): Adjust interface. Remove process from
8656 processes table.
8657 (spu_join, spu_thread_alive): Adjust interface.
8658 (spu_wait): Adjust interface. Remove process from processes
8659 table. Adjust to use ptids.
8660 * win32-low.c (current_inferior_tid): Delete.
8661 (current_inferior_ptid): New.
8662 (debug_event_ptid): New.
8663 (thread_rec): Take a ptid. Adjust.
8664 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8665 (child_delete_thread): Ditto.
8666 (do_initial_child_stuff): Add `attached' argument. Add process to
8667 processes table.
8668 (child_fetch_inferior_registers, child_store_inferior_registers):
8669 Adjust.
8670 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8671 (win32_attach): Pass 1 to do_initial_child_stuff.
8672 (win32_kill): Adjust interface. Remove process from processes
8673 table.
8674 (win32_detach): Ditto.
8675 (win32_join): Adjust interface.
8676 (win32_thread_alive): Take a ptid.
8677 (win32_resume): Adjust to use ptids.
8678 (get_child_debug_event): Ditto.
8679 (win32_wait): Adjust interface. Remove exiting process from
8680 processes table.
8681
8682 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8683
8684 Non-stop mode support.
8685
8686 * server.h (non_stop): Declare.
8687 (gdb_client_data, handler_func): Declare.
8688 (delete_file_handler, add_file_handler, start_event_loop):
8689 Declare.
8690 (handle_serial_event, handle_target_event, push_event)
8691 (putpkt_notif): Declare.
8692 * target.h (enum resume_kind): New.
8693 (struct thread_resume): Replace `step' field by `kind' field.
8694 (TARGET_WNOHANG): Define.
8695 (struct target_ops) <wait>: Add `options' argument.
8696 <supports_non_stop, async, start_non_stop>: New fields.
8697 (target_supports_non_stop, target_async): New.
8698 (start_non_stop): Declare.
8699 (mywait): Add `options' argument.
8700 * target.c (mywait): Add `options' argument. Print child exit
8701 notifications here.
8702 (start_non_stop): New.
8703 * server.c (non_stop, own_buf, mem_buf): New globals.
8704 (struct vstop_notif): New.
8705 (notif_queue): New global.
8706 (queue_stop_reply, push_event, discard_queued_stop_replies)
8707 (send_next_stop_reply): New.
8708 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8709 interface changes.
8710 (attach_inferior): In non-stop mode, don't wait for the target
8711 here.
8712 (handle_general_set): Handle QNonStop.
8713 (handle_query): When handling qC, return the current general
8714 thread, instead of the first thread of the list.
8715 (handle_query): If the backend supports non-stop mode, include
8716 QNonStop+ in the qSupported query response.
8717 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8718 and non-stop mode.
8719 (handle_v_attach, handle_v_run): Handle non-stop mode.
8720 (handle_v_stopped): New.
8721 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8722 (myresume): Adjust to use resume_kind. Handle non-stop.
8723 (queue_stop_reply_callback): New.
8724 (handle_status): Handle non-stop mode.
8725 (main): Clear non_stop flag on reconnection. Use the event-loop.
8726 Refactor serial protocol handling from here ...
8727 (process_serial_event): ... to this new function. When GDB
8728 selects any thread, select one here. In non-stop mode, wait until
8729 GDB acks all pending events before exiting.
8730 (handle_serial_event, handle_target_event): New.
8731 * remote-utils.c (remote_open): Install remote_desc in the event
8732 loop.
8733 (remote_close): Remove remote_desc from the event loop.
8734 (putpkt_binary): Rename to...
8735 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8736 (putpkt_binary): New as wrapper around putpkt_binary_1.
8737 (putpkt_notif): New.
8738 (prepare_resume_reply): In non-stop mode, don't change the
8739 general_thread.
8740 * event-loop.c: New.
8741 * Makefile.in (OBJ): Add event-loop.o.
8742 (event-loop.o): New rule.
8743
8744 * linux-low.h (pid_of): Moved here.
8745 (lwpid_of): New.
8746 (get_lwp_thread): Use lwpid_of.
8747 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8748 * linux-low.c (pid_of): Delete.
8749 (inferior_pid): Use lwpid_of.
8750 (linux_event_pipe): New.
8751 (target_is_async_p): New.
8752 (delete_lwp): New.
8753 (handle_extended_wait): Use lwpid_of.
8754 (add_lwp): Don't set lwpid field.
8755 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8756 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8757 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8758 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8759 first. Adjust to linux_wait_for_event interface changes. Use
8760 lwpid_of.
8761 (linux_detach): Don't delete the main lwp here.
8762 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8763 (status_pending_p): Don't consider explicitly suspended lwps.
8764 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8765 pointer. Add OPTIONS argument. Change return type to int. Use
8766 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8767 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8768 pointer. Add status pointer argument. Return a pid instead of a
8769 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8770 changes. In non-stop mode, don't switch to a random thread.
8771 (linux_wait): Rename to...
8772 (linux_wait_1): ... this. Add target_options argument, and handle
8773 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8774 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8775 clean exit and signal exit code. Don't stop all threads in
8776 non-stop mode. In all-stop mode, only stop all threads when
8777 reporting a stop to GDB. Handle explicit thread stop requests.
8778 (async_file_flush, async_file_mark): New.
8779 (linux_wait): New.
8780 (send_sigstop): Use lwpid_of.
8781 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8782 interface changes. In non-stop mode, don't switch to a random
8783 thread.
8784 (linux_resume_one_lwp): Use lwpid_of.
8785 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8786 (linux_resume_one_thread): ... this. Handle resume_stop. In
8787 non-stop mode, don't look for pending flag in all threads.
8788 (resume_status_pending_p): Don't consider explicitly suspended
8789 threads.
8790 (my_waitpid): Reimplement. Emulate __WALL.
8791 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8792 Use lwpid_of.
8793 (sigchld_handler, linux_supports_non_stop, linux_async)
8794 (linux_start_non_stop): New.
8795 (linux_target_ops): Register linux_supports_non_stop, linux_async
8796 and linux_start_non_stop.
8797 (initialize_low): Install SIGCHLD handler.
8798 * thread-db.c (thread_db_create_event, find_one_thread)
8799 (thread_db_get_tls_address): Use lwpid_of.
8800 * win32-low.c (win32_detach): Adjust to use resume_kind.
8801 (win32_wait): Add `options' argument.
8802 * spu-low.c (spu_resume): Adjust to use resume_kind.
8803 (spu_wait): Add `options' argument.
8804
8805 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8806
8807 Decouple target code from remote protocol.
8808
8809 * target.h (enum target_waitkind): New.
8810 (struct target_waitstatus): New.
8811 (struct target_ops) <wait>: Return an unsigned long. Take a
8812 target_waitstatus pointer instead of a char pointer.
8813 (mywait): Likewise.
8814 * target.c (mywait): Change prototype to return an unsigned long.
8815 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8816 * server.h (thread_from_wait, old_thread_from_wait): Delete
8817 declarations.
8818 (prepare_resume_reply): Change prototype to take a
8819 target_waitstatus.
8820 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8821 (last_status, last_ptid): New.
8822 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8823 pid instead of a signal.
8824 (attach_inferior): Remove "status" and "signal" parameters.
8825 Adjust.
8826 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8827 not as an address.
8828 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8829 (handle_v_requests, myresume): Remove "status" and "signal"
8830 parameters. Adjust.
8831 (handle_status): New.
8832 (main): Delete local `status'. Adjust.
8833 * remote-utils.c: Include target.h.
8834 (prepare_resume_reply): Change prototype to take a
8835 target_waitstatus. Adjust.
8836
8837 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8838 interface.
8839 * spu-low.c (spu_wait): Adjust.
8840 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8841 Delete.
8842 (win32_wait): Adjust.
8843
8844 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8845
8846 * target.h (struct thread_resume): Delete leave_stopped member.
8847 (struct target_ops): Add a `n' argument to the `resume' callback.
8848 * server.c (start_inferior): Adjust.
8849 (handle_v_cont, myresume): Adjust.
8850 * linux-low.c (check_removed_breakpoint): Adjust to resume
8851 interface change, and to removed leave_stopped field.
8852 (resume_ptr): Delete.
8853 (struct thread_resume_array): New.
8854 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8855 resume interface change.
8856 (linux_continue_one_thread, linux_queue_one_thread)
8857 (resume_status_pending_p): Check if the resume field is NULL
8858 instead of checking the leave_stopped member.
8859 (linux_resume): Adjust to the target resume interface change.
8860 * spu-low.c (spu_resume): Adjust to the target resume interface
8861 change.
8862 * win32-low.c (win32_detach, win32_resume): Ditto.
8863
8864 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8865
8866 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8867 flag.
8868 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8869 pending.
8870 (linux_continue_one_thread): Only preserve the stepping flag if
8871 there's a pending breakpoint.
8872
8873 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8874
8875 * server.c (main): After the inferior having exited, call
8876 remote_close before exiting gdbserver.
8877
8878 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8879
8880 Fix size of FPSCR in Power 7 processors.
8881 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8882 (PPC_FEATURE_HAS_DFP): New #define.
8883 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8884 size of the FPSCR.
8885
8886 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8887
8888 * server.c (handle_query) Whitespace and formatting.
8889
8890 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8891
8892 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8893 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8894 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8895 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8896 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8897 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8898 Makefile.in, configure.ac: Fix whitespace throughout.
8899 * configure: Regenerate.
8900
8901 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8902
8903 * inferiors.c (find_inferior): Make it safe for the callback
8904 function to delete the currently iterated inferior.
8905
8906 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8907
8908 * Makefile.in (linuw_low_h): Move higher.
8909 (thread-db.o): Depend on $(linux_low_h).
8910
8911 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8912
8913 Rename "process" to "lwp" throughout.
8914
8915 * linux-low.c (all_processes): Rename to...
8916 (all_lwps): ... this.
8917 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8918 (add_process): Rename to ...
8919 (add_lwp): ... this. Adjust.
8920 (linux_create_inferior): Adjust.
8921 (linux_attach_lwp): Adjust.
8922 (linux_attach): Adjust.
8923 (linux_kill_one_process): Rename to ...
8924 (linux_kill_one_lwp): ... this. Adjust.
8925 (linux_kill): Adjust.
8926 (linux_detach_one_process): Rename to ...
8927 (linux_detach_one_lwp): ... this. Adjust.
8928 (linux_detach): Adjust.
8929 (check_removed_breakpoint): Adjust.
8930 (status_pending_p): Adjust.
8931 (linux_wait_for_process): Rename to ...
8932 (linux_wait_for_lwp): ... this. Adjust.
8933 (linux_wait_for_event): Adjust.
8934 (send_sigstop): Adjust.
8935 (wait_for_sigstop): Adjust.
8936 (stop_all_processes): Rename to ...
8937 (stop_all_lwps): ... this.
8938 (linux_resume_one_process): Rename to ...
8939 (linux_resume_one_lwp): ... this. Adjust.
8940 (linux_set_resume_request, linux_continue_one_thread)
8941 (linux_queue_one_thread, resume_status_pending_p)
8942 (usr_store_inferior_registers, regsets_store_inferior_registers)
8943 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8944 Adjust.
8945 * linux-low.h (get_process): Rename to ...
8946 (get_lwp): ... this. Adjust.
8947 (get_thread_process): Rename to ...
8948 (get_thread_lwp): ... this. Adjust.
8949 (get_process_thread): Rename to ...
8950 (get_lwp_thread): ... this. Adjust.
8951 (struct process_info): Rename to ...
8952 (struct lwp_info): ... this.
8953 (all_processes): Rename to ...
8954 (all_lwps): ... this.
8955 * proc-service.c (ps_lgetregs): Adjust.
8956 * thread-db.c (thread_db_create_event, find_one_thread)
8957 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8958
8959 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8960
8961 * server.c (handle_query): Handle "qAttached".
8962
8963 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8964
8965 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8966 GPLv3, update license URL.
8967
8968 2009-03-01 Doug Evans <dje@google.com>
8969
8970 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8971 (server_h): Add gdb_signals.h.
8972 (signals.o): Update.
8973 * server.h (target_signal_from_host,target_signal_to_host_p)
8974 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8975
8976 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8977
8978 * remote-utils.c (getpkt): Also generate remote-debug
8979 information if noack_mode is set.
8980
8981 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8982
8983 * server.c (handle_query): Report qXfer:siginfo:read and
8984 qXfer:siginfo:write as supported and handle them.
8985 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8986 * linux-low.c (linux_xfer_siginfo): New.
8987 (linux_target_ops): Set it.
8988
8989 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8990
8991 * server.c (gdbserver_usage): Mention --remote-debug.
8992 (main): Accept '--remote-debug' switch.
8993
8994 2009-01-18 Doug Evans <dje@google.com>
8995
8996 * regcache.c (new_register_cache): No need to check result of xcalloc.
8997 * server.c (handle_search_memory): Back out calls to xmalloc,
8998 result is checked and error is returned to user upon failure.
8999 (handle_query): Ditto. Add more checks for result of malloc.
9000 (handle_v_cont): Check result of malloc, report error back to
9001 user upon failure.
9002 (handle_v_run): Ditto. Call freeargv.
9003 * server.h (freeargv): Declare.
9004 * utils.c (freeargv): New fn.
9005
9006 2009-01-15 Doug Evans <dje@google.com>
9007
9008 * gdbreplay.c (perror_with_name): Make arg const char *.
9009 * server.h (target_signal_to_name): Make return type const char *.
9010 * thread-db.c (thread_db_err_str): Make return type const char *.
9011 * utils.c (perror_with_name): Make arg const char *.
9012
9013 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9014
9015 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9016 when handling a EXIT_PROCESS_DEBUG_EVENT.
9017
9018 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9019
9020 * gdbreplay.c (gdbreplay_version): Update copyright year.
9021 * server.c (gdbserver_version): Likewise.
9022
9023 2009-01-05 Doug Evans <dje@google.com>
9024
9025 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9026 (handle_extended_wait): Improve comment.
9027
9028 2008-12-13 Doug Evans <dje@google.com>
9029
9030 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9031 * server.h (ATTR_MALLOC): New macro.
9032 (xmalloc,xcalloc,xstrdup): Declare.
9033 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9034 * inferiors.c: Ditto.
9035 * linux-low.c: Ditto.
9036 * mem-break.c: Ditto.
9037 * regcache.c: Ditto.
9038 * remote-utils.c: Ditto.
9039 * server.c: Ditto.
9040 * target.c: Ditto.
9041 * win32-low.c: Ditto.
9042
9043 2008-12-12 Doug Evans <dje@google.com>
9044
9045 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9046 in debugging printf.
9047
9048 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9049
9050 2008-12-09 Doug Evans <dje@google.com>
9051
9052 * linux-low.h (struct process_info): Delete member tid, unused.
9053 * thread-db.c (find_one_thread): Update.
9054 (maybe_attach_thread): Update.
9055
9056 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9057
9058 * target.h (struct target_ops): Add qxfer_osdata member.
9059 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9060 and dirent.h.
9061 (linux_qxfer_osdata): New functions.
9062 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9063 callback.
9064 * server.c (handle_query): Handle "qXfer:osdata:read:".
9065 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9066 (buffer_xml_printf): New functions.
9067 * server.h (struct buffer): New.
9068 (buffer_grow_str, buffer_grow_str0): New macros.
9069 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9070 (buffer_xml_printf): Declare.
9071
9072 2008-11-24 Doug Evans <dje@google.com>
9073
9074 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9075
9076 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9077
9078 * server.c (handle_v_run): Always use the supplied argument list.
9079
9080 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9081
9082 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9083 (xtensa_regmap_table): Add entry for scompare1.
9084
9085 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9086
9087 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9088 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9089 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9090 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9091 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9092 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9093 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9094 XML target descriptions.
9095 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9096 when inferior is running on an ISA 2.05 or later processor. Add
9097 special case to return offset for full 64-bit slot of FPSCR when
9098 in 32-bits.
9099
9100 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9101
9102 * Makefile.in (SFILES, clean): Added sparc64 files.
9103 (reg-sparc64.o, reg-sparc64.c): New.
9104 * configure.srv (sparc*-*-linux*): New configuration.
9105 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9106 syscall arguments for SPARC.
9107 (regsets_store_inferior_registers): Likewise.
9108 * linux-sparc-low.c: New file.
9109
9110 2008-10-21 Doug Evans <dje@google.com>
9111
9112 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9113 (READLINE_DIR,READLINE_DEP): Delete.
9114 (INTERNAL_CFLAGS): Update.
9115 (LINTFLAGS): Update.
9116
9117 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9118
9119 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9120 whole argv from the last run, not just argv[0].
9121
9122 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9123
9124 * regcache.c (new_register_cache): Return NULL if the register
9125 cache size isn't known yet.
9126 (free_register_cache): Avoid dereferencing a NULL regcache.
9127
9128 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9129
9130 * configure.srv: Merge MIPS and MIPS64.
9131
9132 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9133
9134 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9135
9136 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9137
9138 * Makefile.in: Add required vsx dependencies.
9139
9140 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9141 Declare init_registers_powerpc_vsx32l.
9142 Declare init_registers_powerpc_vsx64l.
9143 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9144 (ppc_arch_setup): Check for VSX in hwcap.
9145 (ppc_fill_vsxregset): New function.
9146 (ppc_store_vsxregset): New function.
9147 Add new VSX entry in regset_info target_regsets.
9148
9149 * configure.srv: Add new VSX dependencies.
9150
9151 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9152
9153 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9154 (remote_open): Set or clear transport_is_reliable.
9155 (putpkt_binary): Don't expect acks in noack mode.
9156 (getpkt): Don't send ack/nac in noack mode.
9157 * server.c (handle_general_set): Handle QStartNoAckMode.
9158 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9159 qSupported.
9160 (main): Reset noack_mode on every connection.
9161 * server.h (noack_mode): Declare.
9162
9163 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9164
9165 * Makefile.in (GDBREPLAY_OBS): New variable.
9166 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9167
9168 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9169 Daniel Jacobowitz <dan@codesourcery.com>
9170
9171 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9172 (usr_store_inferior_registers): Likewise.
9173 (regsets_store_inferior_registers): Likewise.
9174
9175 2008-07-31 Rolf Jansen <rj@surtec.com>
9176 Pedro Alves <pedro@codesourcery.com>
9177
9178 * configure.ac: Check for memmem declaration.
9179 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9180 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9181 (disable_packet_qfThreadInfo): Unconditionally compile.
9182 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9183 * configure, config.in: Regenerate.
9184
9185 2008-07-28 Doug Kwan <dougkwan@google.com>
9186
9187 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9188 (linux_write_memory): Remove declaration of errno.
9189
9190 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9191
9192 * linux-low.c (handle_extended_wait): Do not use "status"
9193 variable uninitialized.
9194
9195 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9196
9197 * server.c (handle_v_attach): Inhibit reporting dll changes.
9198
9199 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9200
9201 * remote-utils.c (prepare_resume_reply): If requested, don't
9202 output "thread:TID" in the T stop reply.
9203
9204 * server.c (disable_packet_vCont, disable_packet_Tthread)
9205 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9206 (handle_query): If requested, disable support for qC, qfThreadInfo
9207 and qsThreadInfo.
9208 (handle_v_requests): If requested, disable support for vCont.
9209 (gdbserver_show_disableable): New.
9210 (main): Handle --disable-packet and --disable-packet=LIST.
9211
9212 * server.h (disable_packet_vCont, disable_packet_Tthread)
9213 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9214
9215 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9216
9217 * server.c (gdbserver_usage): Mention --version.
9218
9219 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9220
9221 * Makefile.in (gdbreplay.o): New rule.
9222
9223 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9224
9225 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9226 message, not gdbserver.
9227
9228 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9229 Nathan Sidwell <nathan@codesourcery.com>
9230 Joseph Myers <joseph@codesourcery.com>
9231
9232 * acinclude.m4: Include ../../config/acx.m4.
9233 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9234 * configure, config.in: Regenerate.
9235 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9236 * server.c (gdbserver_version): Print PKGVERSION.
9237 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9238 (main): Adjust gdbserver_usage calls.
9239 * gdbreplay.c (version, host_name): Add declarations.
9240 (gdbreplay_version, gdbreplay_usage): New.
9241 (main): Accept --version and --help options.
9242
9243 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9244
9245 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9246 (arm_breakpoint_at): Handle Thumb.
9247 (the_low_target): Add comment.
9248
9249 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9250
9251 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9252
9253 2008-05-09 Doug Evans <dje@google.com>
9254
9255 * server.h (decode_search_memory_packet): Declare.
9256 * remote-utils.c (decode_search_memory_packet): New fn.
9257 * server.c (handle_search_memory_1): New fn.
9258 (handle_search_memory): New fn.
9259 (handle_query): Process qSearch:memory packets.
9260
9261 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9262
9263 * regcache.c (registers_length): Remove.
9264 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9265 full register packet.
9266 * regcache.h (registers_length): Remove prototype.
9267 * server.h (PBUFSIZ): Define to 16384.
9268
9269 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9270
9271 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9272 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9273 powerpc-64l.o, and powerpc-altivec64l.o.
9274 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9275 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9276 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9277 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9278 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9279 to srv_xmlfiles.
9280
9281 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9282 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9283 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9284 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9285 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9286 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9287 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9288 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9289 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9290 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9291 (clean): Update.
9292
9293 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9294 (init_registers_powerpc_32l): ... this new prototype.
9295 (init_registers_powerpc_32): Remove, replace by ...
9296 (init_registers_powerpc_altivec32l): ... this new prototype.
9297 (init_registers_powerpc_e500): Remove, replace by ...
9298 (init_registers_powerpc_e500l): ... this new prototype.
9299 (init_registers_ppc64): Remove, replace by ...
9300 (init_registers_powerpc_64l): ... this new prototype.
9301 (init_registers_powerpc_64): Remove, replace by ...
9302 (init_registers_powerpc_altivec64l): ... this new prototype.
9303 (ppc_num_regs): Set to 73.
9304 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9305 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9306 (ppc_cannot_store_register): Handle orig_r3 and trap.
9307 (ppc_arch_setup): Update init_registers_... calls.
9308 (ppc_fill_gregset): Handle orig_r3 and trap.
9309
9310 * inferiors.c (clear_inferiors): Reset current_inferior.
9311
9312 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9313
9314 * acinclude.m4: Add override.m4.
9315 * configure: Regenerate.
9316
9317 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9318
9319 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9320 initial call to init_register_ppc64.
9321
9322 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9323
9324 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9325 single powerpc*-*-linux* case.
9326 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9327
9328 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9329
9330 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9331 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9332 from reg_xmlfiles.
9333 * linux-ppc-low.c: Include <elf.h>.
9334 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9335 (ppc_hwcap): New global variable.
9336 (ppc_regmap): Remove __SPE__ #ifdef sections.
9337 (ppc_regmap_e500): New global variable.
9338 (ppc_cannot_store_register): Update __SPE__ special case.
9339 (ppc_get_hwcap): New function.
9340 (ppc_arch_setup): Use it to determine whether inferior supports
9341 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9342 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9343 Do not access registers if target does not support AltiVec.
9344 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9345 Do not access registers if target does not support SPE.
9346 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9347
9348 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9349
9350 * linux-low.c (disabled_regsets, num_regsets): New.
9351 (use_regsets_p): Delete.
9352 (linux_wait_for_process): Clear disabled_regsets.
9353 (regsets_fetch_inferior_registers): Check and set it.
9354 (regsets_store_inferior_registers): Likewise.
9355 (linux_fetch_registers, linux_store_registers): Do not use
9356 use_regsets_p.
9357 (initialize_low): Allocate disabled_regsets.
9358
9359 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9360
9361 * Makefile.in (LIBOBJS): New.
9362 (OBS): Use LIBOBJS.
9363 (memmem.o): New rule.
9364 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9365 * configure: Regenerated.
9366
9367 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9368
9369 * server.c (handle_query): Never return "unsupported" for
9370 qXfer:features:read queries.
9371
9372 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9373
9374 * server.c (get_features_xml): Fix inverted condition.
9375 (handle_query): Always support qXfer:feature:read.
9376
9377 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9378
9379 * server.c (wrapper_argv): New.
9380 (start_inferior): Handle wrapper_argv. If set, expect an extra
9381 trap.
9382 (gdbserver_usage): Document --wrapper.
9383 (main): Parse --wrapper.
9384
9385 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9386
9387 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9388 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9389 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9390 (ppc_set_pc): Likewise.
9391 (ppc_arch_setup): New function.
9392 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9393 of collect_register.
9394 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9395
9396 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9397
9398 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9399 instead of linux-ppc64-low.o.
9400 * linux-ppc64-low.c: Remove file.
9401 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9402 (linux-ppc64-low.o): Remove rule.
9403
9404 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9405 (init_registers_powerpc_64): Likewise.
9406 (ppc_regmap): Conditionally define depending on __powerpc64__.
9407 (ppc_cannot_store_register): Do not special-case "fpscr" when
9408 compiled on __powerpc64__.
9409 (ppc_collect_ptrace_register): New function.
9410 (ppc_supply_ptrace_register): New function.
9411 (ppc_breakpoint): Change type to "unsigned int".
9412 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9413 (the_low_target): Conditionally provide initializers for the
9414 arch_setup member depending on __powerpc64__. Install
9415 collect_ptrace_register and supply_ptrace_register members.
9416
9417 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9418
9419 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9420 * server.c (gdbserver_xmltarget): Define.
9421 (get_features_xml): Use it to replace "target.xml" and arch_string.
9422
9423 * configure.srv: Remove srv_xmltarget. Add XML files that were
9424 mentioned there to srv_xmlfiles instead. Remove conditional tests
9425 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9426 srv_xmlfiles and srv_regobj to include all possible choices.
9427 * configure.ac (srv_xmltarget): Remove.
9428 (srv_xmlfiles): Do not add "target.xml".
9429 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9430 checks for supplementary target information.
9431 * configure: Regenerate.
9432 * Makefile.in (XML_TARGET): Remove.
9433 (target.xml): Remove rule.
9434 (clean): Do not clean up target.xml.
9435 (.PRECIOUS): Do not mention target.xml.
9436
9437 * target.h (struct target_ops): Remove arch_string member.
9438 * linux-low.c (linux_arch_string): Remove.
9439 (linux_target_ops): Remove arch_string initializer.
9440 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9441 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9442 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9443 * spu-low.c (spu_arch_string): Remove.
9444 (spu_target_ops): Remove arch_string initializer.
9445 * win32-low.c (win32_arch_string): Remove.
9446 (win32_target_ops): Remove arch_string initializer.
9447 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9448 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9449 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9450
9451 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9452
9453 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9454 by collect_ptrace_register and supply_ptrace_register hooks.
9455 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9456 instead of checking for the_low_target.left_pad_xfer.
9457 (usr_store_inferior_registers): Use collect_ptrace_register callback
9458 instead of checking for the_low_target.left_pad_xfer.
9459
9460 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9461 (s390_supply_ptrace_register): Likewise.
9462 (s390_fill_gregset): Call s390_collect_ptrace_register.
9463 (the_low_target): Update.
9464
9465 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9466 (ppc_supply_ptrace_register): Likewise.
9467 (the_low_target): Update.
9468
9469 * linux-i386-low.c (the_low_target): Update.
9470 * linux-x86-64-low.c (the_low_target): Update.
9471
9472 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9473
9474 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9475 reg-s390.o and reg-s390x.o.
9476
9477 * linux-low.c (new_inferior): New global variable.
9478 (linux_create_inferior, linux_attach): Set it.
9479 (linux_wait_for_process): Call the_low_target.arch_setup after the
9480 target has stopped for the first time.
9481 (initialize_low): Do not call the_low_target.arch_setup.
9482
9483 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9484 (s390_set_pc): Likewise.
9485 (s390_arch_setup): New function.
9486 (the_low_target): Use s390_arch_setup as arch_setup routine.
9487
9488 * regcache.c (realloc_register_cache): New function.
9489 (set_register_cache): Call it for each existing regcache.
9490
9491 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9492
9493 * server.h (init_registers): Remove prototype.
9494
9495 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9496 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9497 instead of init_registers ().
9498 * linux-arm-low.c (init_registers_arm): Add prototype.
9499 (init_registers_arm_with_iwmmxt): Likewise.
9500 (the_low_target): Add initializer for arch_setup field.
9501 * linux-cris-low.c (init_registers_cris): Add prototype.
9502 (the_low_target): Add initializer for arch_setup field.
9503 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9504 (the_low_target): Add initializer for arch_setup field.
9505 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9506 (the_low_target): Add initializer for arch_setup field.
9507 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9508 (the_low_target): Add initializer for arch_setup field.
9509 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9510 (the_low_target): Add initializer for arch_setup field.
9511 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9512 (the_low_target): Add initializer for arch_setup field.
9513 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9514 (init_registers_mips64_linux): Likewise.
9515 (the_low_target): Add initializer for arch_setup field.
9516 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9517 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9518 (the_low_target): Add initializer for arch_setup field.
9519 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9520 (init_registers_powerpc_64): Likewise.
9521 (the_low_target): Add initializer for arch_setup field.
9522 * linux-s390-low.c (init_registers_s390): Add prototype.
9523 (init_registers_s390x): Likewise.
9524 (the_low_target): Add initializer for arch_setup field.
9525 * linux-sh-low.c (init_registers_sh): Add prototype.
9526 (the_low_target): Add initializer for arch_setup field.
9527 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9528 (the_low_target): Add initializer for arch_setup field.
9529 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9530 (the_low_target): Add initializer for arch_setup field.
9531
9532 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9533 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9534 instead of init_registers ().
9535 * win32-arm-low.c (init_registers_arm): Add prototype.
9536 (the_low_target): Add initializer for arch_setup field.
9537 * win32-i386-low.c (init_registers_i386): Add prototype.
9538 (the_low_target): Add initializer for arch_setup field.
9539
9540 * spu-low.c (init_registers_spu): Add prototype.
9541 (initialize_low): Call initialie_registers_spu () instead of
9542 initialize_registers ().
9543
9544 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9545
9546 * server.c (handle_v_requests): When handling the vRun and vAttach
9547 packets, if already debugging a process, don't kill it. Return an
9548 error instead.
9549
9550 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9551
9552 * server.c (handle_query): Correct length check.
9553
9554 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9555
9556 * win32-low.c (do_initial_child_stuff): Add process handle
9557 parameter. Set current_process_handle and current_process_id from the
9558 parameters. Clear globals.
9559 (win32_create_inferior): Don't set current_process_handle and
9560 current_process_id here. Instead pass them on the call to
9561 do_initial_child_stuff.
9562 (win32_attach): Likewise.
9563 (win32_clear_inferiors): New.
9564 (win32_kill): Don't close the current process handle or the
9565 current thread handle here. Instead call win32_clear_inferiors.
9566 (win32_detach): Don't open a new handle to the process. Call
9567 win32_clear_inferiors.
9568 (win32_join): Don't rely on current_process_handle; open a new
9569 handle using the process id.
9570 (win32_wait): Call win32_clear_inferiors when the inferior process
9571 has exited.
9572
9573 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9574
9575 * server.c (monitor_show_help): Add "exit".
9576
9577 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9578
9579 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9580 (clean): Add reg-xtensa.c.
9581 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9582 * configure.srv (xtensa*-*-linux*) New target.
9583 * linux-xtensa-low.c: New.
9584 * xtensa-xtregs.c: New.
9585
9586 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9587
9588 * hostio.c: Don't include errno.h.
9589 (errno_to_fileio_errno): Move to hostio-errno.
9590 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9591 error number outputting to the target->hostio_last_error callback.
9592 (hostio_packet_error): Use FILEIO_EINVAL directly.
9593 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9594 calls to hostio_error.
9595 * hostio-errno.c: New.
9596 * server.h (hostio_last_error_from_errno): Declare.
9597 * target.h (target_ops): Add hostio_last_error member.
9598 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9599 as hostio_last_error handler.
9600 * spu-low.c (spu_target_ops): Likewise.
9601 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9602 (wince_hostio_last_error): New functions.
9603 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9604 as hostio_last_error handler.
9605 (win32_target_ops) [!_WIN32_WCE]: Register
9606 hostio_last_error_from_errno as hostio_last_error handler.
9607 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9608 (hostio-errno.o): New rule.
9609 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9610 * configure.srv (srv_hostio_err_objs): New variable. Default to
9611 hostio-errno.o.
9612 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9613 * configure: Regenerate.
9614
9615 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9616
9617 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9618 (linux_kill, linux_detach): Clean up the process list.
9619 * remote-utils.c (remote_open): Improve port number parsing.
9620 (putpkt_binary, input_interrupt): Only send interrupts if the target
9621 is running.
9622 * server.c (extended_protocol): Make static.
9623 (attached): Define earlier.
9624 (exit_requested, response_needed, program_argv): New variables.
9625 (target_running): New.
9626 (start_inferior): Clear attached here.
9627 (attach_inferior): Set attached here.
9628 (require_running): Define.
9629 (handle_query): Use require_running and target_running. Implement
9630 "monitor exit".
9631 (handle_v_attach, handle_v_run): New.
9632 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9633 (gdbserver_usage): Update.
9634 (main): Redo argument parsing. Handle --debug and --multi. Handle
9635 --attach along with other options or after the port. Save
9636 program_argv. Support no initial program. Resynchronize
9637 communication with GDB after an error. Handle "monitor exit".
9638 Use require_running and target_running. Always allow the extended
9639 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9640 restart in extended mode.
9641 * README: Refer to the GDB manual. Update --attach usage.
9642
9643 2007-12-20 Andreas Schwab <schwab@suse.de>
9644
9645 * linux-low.c (STACK_SIZE): Define.
9646 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9647 (linux_test_for_tracefork): Likewise.
9648
9649 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9650
9651 * linux-low.c (linux_wait_for_event): Update messages. Do not
9652 reinsert auto-delete breakpoints.
9653 * mem-break.c (struct breakpoint): Change return type of handler to
9654 int.
9655 (set_breakpoint_at): Update handler type.
9656 (reinsert_breakpoint_handler): Return 1 instead of calling
9657 delete_breakpoint.
9658 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9659 setting a new one.
9660 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9661 * mem-break.h (set_breakpoint_at): Update handler type.
9662 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9663 * win32-low.c (auto_delete_breakpoint): New.
9664 (get_child_debug_event): Use it.
9665
9666 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * configure.ac: Check for pread and pwrite.
9669 * hostio.c (handle_pread): Fall back to lseek and read.
9670 (handle_pwrite): Fall back to lseek and write.
9671 * config.in, configure: Regenerated.
9672
9673 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9674
9675 * server.c (myresume): Add own_buf argument.
9676 (main): Update calls.
9677
9678 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9679
9680 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9681 * remote-utils.c (remote_open): Do not call disable_async_io.
9682 (block_async_io): Delete.
9683 (unblock_async_io): Make static.
9684 (initialize_async_io): New.
9685 * server.c (handle_v_cont): Handle async I/O here.
9686 (myresume): Likewise. Move other common resume tasks here...
9687 (main): ... from here. Call initialize_async_io. Disable async
9688 I/O before the main loop.
9689 * server.h (initialize_async_io): Declare.
9690 (block_async_io, unblock_async_io): Delete prototypes.
9691 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9692
9693 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9694
9695 * remote-utils.c (readchar): Allow binary data in received messages.
9696
9697 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9698
9699 * win32-low.c (attaching): New global.
9700 (win32_create_inferior): Clear the `attaching' global.
9701 (win32_attach): Set the `attaching' global.
9702 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9703 attaching. Only set a breakpoint at the entry point if not
9704 attaching.
9705
9706 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9707
9708 * server.c (main): Don't report dll events on the initial
9709 connection on attaches.
9710
9711 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9712
9713 * server.c (main): Relax numerical bases supported for the pid of
9714 the --attach command line argument.
9715
9716 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9717
9718 * win32-low.c (win32_attach): Call OpenProcess before
9719 DebugActiveProcess, not after. Add last error output to error
9720 call.
9721
9722 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9723
9724 * win32-low.c (win32_get_thread_context)
9725 (win32_set_thread_context): New functions.
9726 (thread_rec): Use win32_get_thread_context.
9727 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9728 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9729 field.
9730
9731 2007-12-03 Leo Zayas
9732 Pedro Alves <pedro_alves@portugalmail.pt>
9733
9734 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9735 global variables.
9736 (child_add_thread): Minor cleanup.
9737 (child_continue): Resume artificially suspended threads before
9738 calling ContinueDebugEvent.
9739 (suspend_one_thread): New.
9740 (fake_breakpoint_event): New.
9741 (get_child_debug_event): Change return type to int. Check here if
9742 gdb sent an interrupt request. If a soft interrupt was requested,
9743 fake a breakpoint event. Return 0 if there is no event to handle,
9744 and 1 otherwise.
9745 (win32_wait): Don't check here if gdb sent an interrupt request.
9746 Ensure there is a valid event to handle.
9747 (win32_request_interrupt): Add soft interruption method as last
9748 resort.
9749
9750 2007-12-03 Leo Zayas
9751 Pedro Alves <pedro_alves@portugalmail.pt>
9752
9753 * win32-low.h (win32_thread_info): Add descriptions to the
9754 structure members. Replace `suspend_count' counter by a
9755 `suspended' flag.
9756 * win32-low.c (thread_rec): Update condition of when to get the
9757 context from the inferior. Rely on ContextFlags being set if it
9758 has already been retrieved. Only suspend the inferior thread if
9759 we haven't already. Warn if that fails.
9760 (continue_one_thread): s/suspend_count/suspended/. Only call
9761 ResumeThread once. Warn if that fails.
9762
9763 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9764
9765 * win32-low.c (win32_wait): Don't read from the inferior when it
9766 has already exited.
9767
9768 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9769
9770 * Makefile.in (win32_low_h): New variable.
9771 (win32-low.o): Add dependency on $(win32_low_h).
9772 (win32-arm-low.o, win32-i386-low.o): New rules.
9773
9774 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * hostio.c: Correct copyright year.
9777
9778 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * Makefile.in (OBS): Add hostio.o.
9781 (hostio.o): New rule.
9782 * server.h (handle_vFile): Declare.
9783 * hostio.c: New file.
9784 * server.c (handle_v_requests): Take packet_len and new_packet_len
9785 for binary packets. Call handle_vFile.
9786 (main): Update call to handle_v_requests.
9787
9788 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9789
9790 * linux-low.c: Include <sched.h>.
9791
9792 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9793
9794 * linux-low.c (linux_tracefork_grandchild): New.
9795 (linux_tracefork_child): Use clone.
9796 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9797
9798 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9799
9800 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9801
9802 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9803
9804 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9805
9806 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9807
9808 * inferiors.c (change_inferior_id): Delete.
9809 (add_pid_to_list, pull_pid_from_list): New.
9810 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9811 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9812 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9813 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9814 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9815 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9816 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9817 (using_threads): Always set to 1.
9818 (handle_extended_wait): New.
9819 (add_process): Do not set TID.
9820 (linux_create_inferior): Set must_set_ptrace_flags.
9821 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9822 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9823 (linux_thread_alive): Rename TID argument to LWPID.
9824 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9825 (linux_wait_for_event): Do not use TID or check using_threads. Update
9826 call to dead_thread_notify. Call handle_extended_wait.
9827 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9828 (send_sigstop): Delete sigstop_sent.
9829 (wait_for_sigstop): Avoid TID.
9830 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9831 (linux_test_for_tracefork): New.
9832 (linux_lookup_signals): Use thread_db_active and
9833 linux_supports_tracefork_flag.
9834 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9835 * linux-low.h (get_process_thread): Avoid TID.
9836 (struct process_ifo): Move thread_known and tid to the end. Remove
9837 sigstop_sent.
9838 (linux_attach_lwp, thread_db_init): Update prototypes.
9839 * server.h (change_inferior_id): Delete prototype.
9840 (add_pid_to_list, pull_pid_from_list): New prototypes.
9841 * thread-db.c (thread_db_use_events): New.
9842 (find_first_thread): Rename to...
9843 (find_one_thread): ...this. Update callers and messages. Do not
9844 call fatal. Check thread_db_use_events. Do not call
9845 change_inferior_id or new_thread_notify.
9846 (maybe_attach_thread): Update. Do not call new_thread_notify.
9847 (thread_db_init): Set thread_db_use_events. Check use_events.
9848 * utils.c (fatal, warning): Correct message prefix.
9849
9850 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9851
9852 * Makefile.in (clean): Remove new files.
9853 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9854 (powerpc-64.o, powerpc-64.c): New rules.
9855 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9856 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9857 with SPE.
9858 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9859 SPE targets.
9860 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9861 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9862 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9863 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9864 (target_regsets): Add AltiVec and SPE register sets.
9865 * configure.ac: Check for AltiVec and SPE.
9866 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9867 (ppc_fill_vrregset, ppc_store_vrregset): New.
9868 (target_regsets): Add AltiVec register set.
9869 * configure: Regenerated.
9870
9871 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9872
9873 * linux-low.c (O_LARGEFILE): Define.
9874 (linux_read_memory): Use /proc/PID/mem.
9875 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9876 * configure, config.in: Regenerated.
9877
9878 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9879
9880 * linux-low.c (linux_wait_for_event): Do not pass signals while
9881 single-stepping.
9882
9883 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9884
9885 * win32-low.c (create_process): New.
9886 (win32_create_inferior): Use create_process instead of
9887 CreateProcess. If create_process failed retry appending an ".exe"
9888 suffix. Store the GetLastError result immediatelly after
9889 create_process calls and use it on the call to error.
9890
9891 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9892
9893 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9894
9895 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9896
9897 * configure.ac: Switch license to GPLv3.
9898
9899 2007-08-01 Michael Snyder <msnyder@access-company.com>
9900
9901 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9902
9903 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9904
9905 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9906 typedef.
9907 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9908 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9909 CloseToolhelp32Snapshot.
9910 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9911 CloseToolhelp32Snapshot.
9912
9913 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9914
9915 * server.c (main): Check for inferior exit before main loop.
9916
9917 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9918
9919 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9920 instead of on tmp_desc.
9921
9922 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9923 Daniel Jacobowitz <dan@codesourcery.com>
9924
9925 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9926 (add_thread): Minor cleanups.
9927 (clear_inferiors): Move lower in the file. Clear the DLL
9928 list.
9929 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9930 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9931 (xml_escape_text): New.
9932 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9933 for qSupported.
9934 (handle_v_cont): Report errors.
9935 (gdbserver_version): Update.
9936 (main): Correct size of own_buf. Do not report initial DLL events.
9937 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9938 (unloaded_dll, xml_escape_text): New.
9939 * win32-low.c (enum target_waitkind): Update comments.
9940 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9941 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9942 (win32_EnumProcessModules, win32_GetModuleInformation)
9943 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9944 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9945 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9946 (win32_Module32First, win32_Module32Next, load_toolhelp)
9947 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9948 (get_child_debug_event): Handle DLL events.
9949 (win32_wait): Likewise.
9950
9951 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9952
9953 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9954 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9955
9956 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9957
9958 * win32-low.c (handle_output_debug_string): Ignore event if not
9959 waiting.
9960
9961 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9962
9963 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9964
9965 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9966
9967 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9968
9969 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9970
9971 * inferiors.c (change_inferior_id): Add comment.
9972 * linux-low.c (check_removed_breakpoint): Add an early
9973 prototype. Improve debug output.
9974 (linux_attach): Doc update.
9975 (linux_detach_one_process, linux_detach): Clean up before releasing
9976 each process.
9977 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9978 * linux-low.h (struct process_info): Doc improvement.
9979 * mem-break.c (delete_all_breakpoints): New.
9980 * mem-break.h (delete_all_breakpoints): New prototype.
9981 * thread-db.c (find_first_thread): New.
9982 (thread_db_create_event): Call it instead of
9983 thread_db_find_new_threads. Clean up unused variables.
9984 (maybe_attach_thread): Remove first thread handling.
9985 (thread_db_find_new_threads): Use find_first_thread.
9986 (thread_db_get_tls_address): Likewise.
9987
9988 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9989
9990 * thread-db.c (thread_db_find_new_threads): Add prototype.
9991 (thread_db_create_event): Check for the main thread before adding
9992 a new thread.
9993 (maybe_attach_thread): Only enable event reporting if TID == 0.
9994 (thread_db_get_tls_address): Check for new threads.
9995
9996 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9997
9998 * linux-low.c (linux_create_inferior): Try execv before execvp.
9999 * spu-low.c (spu_create_inferior): Likewise.
10000
10001 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10002
10003 * linux-low.c (linux_create_inferior): Change execv to execvp.
10004 * spu-low.c (spu_create_inferior): Likewies.
10005
10006 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10007
10008 * Makefile.in (clean): Clean new files instead of deleted ones.
10009 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10010 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10011 rules.
10012 * configure.srv: Specify XML files and new regformats for MIPS and
10013 MIPS64 GNU/Linux.
10014 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10015 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10016 an entry for the restart register.
10017 (mips_cannot_fetch_register, mips_cannot_store_register)
10018 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10019 register names to match the XML descriptions.
10020 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10021 restart register instead of $0.
10022
10023 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10024 Markus Deuling <deuling@de.ibm.com>
10025
10026 * remote-utils.c (decode_xfer_write): New function.
10027 * server.h (decode_xfer_write): Add prototype.
10028 * server.c (handle_query): Add PACKET_LEN argument. Support
10029 qXfer:spu:read and qXfer:spu:write packets.
10030 (main): Pass packet_len to handle_query.
10031 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10032 * target.h (target_ops): Add qxfer_spu.
10033
10034 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10035
10036 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10037 accessing non-seekable spufs files.
10038
10039 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10040
10041 * server.c (handle_query): Add reply for qC packet.
10042
10043 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10044 Leo Zayas <lerele@champenstudios@com>
10045
10046 * server.h (check_remote_input_interrupt_request): New function.
10047 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10048 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10049 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10050 (check_remote_input_interrupt_request): New function.
10051 * server.h (check_remote_input_interrupt_request): Declare.
10052 * win32-low.c (winapi_DebugBreakProcess,
10053 winapi_GenerateConsoleCtrlEvent): New typedefs.
10054 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10055 to 250 ms.
10056 (win32_wait): Check for remote interrupt request
10057 with check_remote_input_interrupt_request.
10058 (win32_request_interrupt): New function.
10059 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10060
10061 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10062
10063 * win32-low.c (debug_registers_changed,
10064 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10065 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10066 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10067 (thread_rec): Get context using the low target.
10068 (child_add_thread): Call thread_added on the low target,
10069 which does the same thing.
10070 (regptr): Delete.
10071 (do_initial_child_stuff): Remove debug registers references.
10072 Set context using the low target. Resume threads after
10073 setting the contexts.
10074 (child_continue): Remove dead variable. Remove debug
10075 registers references.
10076 (child_fetch_inferior_registers): Go through the low target.
10077 (do_child_store_inferior_registers): Remove.
10078 (child_store_inferior_registers): Go through the low target.
10079 (win32_resume): Remove debug registers references.
10080 Set context using the low target.
10081 (handle_exception): Change return type to void. Don't record
10082 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10083 first chance exception.
10084 (get_child_debug_event): Change return type to void. Remove
10085 goto loop. Always return after waiting for debug event.
10086 (win32_wait): Convert to switch statement. Handle spurious
10087 events.
10088
10089 * win32-i386-low.c (debug_registers_changed,
10090 debug_registers_used): New.
10091 (initial_stuff): Rename to ...
10092 (i386_initial_stuff): ... this. Clear debug registers
10093 state variables.
10094 (store_debug_registers): Delete.
10095 (i386_get_thread_context): New.
10096 (load_debug_registers): Delete.
10097 (i386_set_thread_context): New.
10098 (i386_thread_added): New.
10099 (single_step): Rename to ...
10100 (i386_single_step): ... this.
10101 (do_fetch_inferior_registers): Rename to ...
10102 (i386_fetch_inferior_register): ... this.
10103 (i386_store_inferior_register): New.
10104 (the_low_target): Adapt to new interface.
10105
10106 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10107 (arm_get_thread_context): New.
10108 (arm_set_thread_context): New.
10109 (regptr): New.
10110 (do_fetch_inferior_registers): Rename to ...
10111 (arm_fetch_inferior_register): ... this.
10112 (arm_store_inferior_register): New.
10113 (arm_wince_breakpoint): Reimplement as unsigned long.
10114 (arm_wince_breakpoint_len): Define.
10115 (the_low_target): Adapt to new interface.
10116
10117 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10118 load_debug_registers. Add get_thread_context, set_thread_context,
10119 thread_added and store_inferior_register. Rename
10120 fetch_inferior_registers to fetch_inferior_register.
10121 (regptr): Remove declaration.
10122
10123 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10124
10125 * linux-low.c (linux_detach): Change return type to int. Return 0.
10126 * spu-low.c (spu_detach): Likewise.
10127
10128 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10129
10130 * target.h (target_ops): Change return type of detach to int.
10131 Add join.
10132 (join_inferior): New.
10133 * server.c (main): Don't skip detach support on mingw32.
10134 If the inferior doesn't support detaching return error.
10135 Call join_inferior instead of using waitpid.
10136 * linux-low.c (linux_join): New.
10137 (linux_target_op): Add linux_join.
10138 * spu-low.c (spu_join): New.
10139 (spu_target_ops): Add spu_join.
10140 * win32-low.c (win32_detach): Adapt to new interface.
10141 Reopen current_process_handle before detaching. Issue a child
10142 resume before detaching.
10143 (win32_join): New.
10144 (win32_target_op): Add win32_join.
10145
10146 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10147
10148 * win32-low.c (win32-attach): Fix return value.
10149 * target.h (target_ops): Describe ATTACH return values.
10150
10151 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10152
10153 * win32-low.c (GETPROCADDRESS): Define.
10154 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10155 (winapi_DebugSetProcessKillOnExit): Likewise.
10156 (win32_create_inferior): Force usage of ansi CreateProcessA.
10157 (win32_attach): Use GETPROCADDRESS.
10158 (win32_detach): Likewise.
10159
10160 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10161
10162 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10163
10164 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10165
10166 * win32-low.c: Commit leftover changes from 2007-03-29.
10167
10168 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10169
10170 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10171 fields short instead of int. Add explicit padding.
10172 (i387_cache_to_fsave): Remove unnecessary casts.
10173 (i387_fsave_to_cache): Doc fix.
10174 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10175
10176 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10177
10178 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10179 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10180
10181 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10182
10183 * configure.srv (arm*-*-mingw32ce*): Move near the other
10184 arm targets.
10185
10186 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10187
10188 * configure.ac: Add errno checking.
10189 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10190 sys/file.h and malloc.h.
10191 (AC_CHECK_DECLS): Add perror.
10192 (srv_mingwce): Handle.
10193 * configure.srv (i[34567]86-*-cygwin*): Add
10194 win32-i386-low.o to srv_tgtobj.
10195 (i[34567]86-*-mingw*): Likewise.
10196 (arm*-*-mingw32ce*): Add case.
10197 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10198 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10199 [__MINGW32CE__] (strerror): New function.
10200 [__MINGW32CE__] (errno): Define to GetLastError.
10201 [__MINGW32CE__] (COUNTOF): New macro.
10202 (remote_open): Remove extra close call.
10203 * mem-break.c (delete_breakpoint_at): New function.
10204 * mem-break.h (delete_breakpoint_at): Declare.
10205 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10206 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10207 [USE_WIN32API] (read, write): Add char* casts.
10208 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10209 * server.h: Include wincecompat.h on Windows CE.
10210 [HAVE_ERRNO_H]: Check.
10211 (perror): Declare if not declared.
10212 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10213 (perror_with_name): Remove errno declaration.
10214 * wincecompat.h: New.
10215 * wincecompat.c: New.
10216 * win32-low.h: New.
10217 * win32-arm-low.c: New.
10218 * win32-i386-low.c: New.
10219 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10220 (OUTMSG2): Make it safe.
10221 (_T): New macro.
10222 (COUNTOF): New macro.
10223 (NUM_REGS): Get it from the low target.
10224 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10225 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10226 (thread_rec): Let low target handle debug registers.
10227 (child_add_thread): Likewise.
10228 (child_init_thread_list): Likewise.
10229 (continue_one_thread): Likewise.
10230 (regptr): New.
10231 (do_child_fetch_inferior_registers): Move to ...
10232 * win32-i386-low.c: ... here, and rename to ...
10233 (do_fetch_inferior_registers): ... this.
10234 * win32-low.c (child_fetch_inferior_registers):
10235 Go through the low target.
10236 (do_child_store_inferior_registers): Use regptr.
10237 (strwinerror): New function.
10238 (win32_create_inferior): Handle Windows CE.
10239 Use strwinerror instead of strerror on Windows error
10240 codes. Add program to the error output.
10241 Don't close the main thread handle on Windows CE.
10242 (win32_attach): Use coredll.dll on Windows CE.
10243 (win32_kill): Close current process and current
10244 thread handles.
10245 (win32_detach): Use coredll.dll on Windows CE.
10246 (win32_resume): Let low target handle debug registers, and
10247 step request.
10248 (handle_exception): Add/Remove initial breakpoint. Avoid
10249 non-existant WSTOPSIG on Windows CE.
10250 (win32_read_inferior_memory): Cast to remove warning.
10251 (win32_arch_string): Go through the low target.
10252 (initialize_low): Call set_breakpoint_data with the low
10253 target's breakpoint.
10254 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10255 FOP_REGNUM, mappings): Move to ...
10256 * win32-i386-low.c: ... here.
10257 * win32-low.c (win32_thread_info): Move to ...
10258 * win32-low.h: ... here.
10259 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10260 win32-arm-low.c and wincecompat.c.
10261 (all:): Add $EXEEXT.
10262 (install-only:): Likewise.
10263 (gdbserver:): Likewise.
10264 (gdbreplay:): Likewise.
10265 * config.in: Regenerate.
10266 * configure: Regenerate.
10267
10268 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10269
10270 * win32-low.c: Rename typedef thread_info to
10271 win32_thread_info throughout.
10272
10273 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10274
10275 * win32-i386-low.c: Rename to ...
10276 * win32-low.c: ... this.
10277 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10278 * Makefile.in: Likewise.
10279
10280 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10281
10282 * remote-utils.c (monitor_output): Constify msg parameter.
10283 * server.h (monitor_output): Likewise.
10284 * win32-i386-low.c (handle_output_debug_string): New.
10285 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10286 handle_output_debug_string.
10287 (get_child_debug_event): Likewise.
10288
10289 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10290
10291 * server.c (main): Correct strtoul check.
10292
10293 2007-03-27 Jon Ringle <jon@ringle.org>
10294
10295 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10296
10297 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10298
10299 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10300
10301 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * terminal.h: Check HAVE_SGTTY_H.
10304
10305 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10306
10307 * remote-utils.c (remote_open): Print out the assigned port number.
10308
10309 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10310
10311 * remote-utils.c (monitor_output): New function.
10312 * server.c (debug_threads): Define here.
10313 (monitor_show_help): New function.
10314 (handle_query): Handle qRcmd.
10315 (main): Do not handle 'd' packet.
10316 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10317 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10318 of debug_threads.
10319
10320 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10321
10322 * Makefile.in (EXEEXT): New.
10323 (clean): Use $(EXEEXT).
10324
10325 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10326
10327 * target.h (target_ops): Rename send_signal to request_interrupt,
10328 and remove enum target_signal parameter.
10329 * linux-low.c (linux_request_interrupt): Rename from
10330 linux_send_signal, and always send SIGINT.
10331 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10332 and always send SIGINT.
10333 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10334 of send_signal.
10335 (input_interrupt): Likewise.
10336
10337 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10338
10339 * server.c (get_features_xml): Check if target implemented
10340 arch_string.
10341 * win32-i386-low.c (win32_arch_string): New.
10342 (win32_target_ops): Add win32_arch_string as arch_string member.
10343
10344 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10345
10346 * spu-low.c (spu_arch_string): New.
10347 (spu_target_ops): Add spu_arch_string.
10348
10349 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10350
10351 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10352 * configure.ac: Do not check for terminal.h.
10353 * configure, config.in: Regenerated.
10354
10355 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10356
10357 * Makefile.in (OBS): Add $(XML_BUILTIN).
10358 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10359 (clean): Update.
10360 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10361 (arm-with-iwmmxt.c): New.
10362 * config.in, configure: Regenerate.
10363 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10364 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10365 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10366 (arm*-*-linux*): Add iWMMXt and regset support.
10367 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10368 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10369 (arm_store_wmmxregset, target_regsets): New.
10370 * server.c (get_features_xml): Take annex argument. Check builtin
10371 XML documents.
10372 (handle_query): Handle multiple annexes.
10373
10374 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10375
10376 * remote-utils.c [USE_WIN32API] (read, write): Define.
10377 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10378 write.
10379
10380 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10381
10382 * linux-i386-low.c (the_low_target): Set arch_string.
10383 * linux-x86-64-low.c (the_low_target): Likewise.
10384 * linux-low.c (linux_arch_string): New.
10385 (linux_target_ops): Add it.
10386 * linux-low.h (struct linux_target_ops): Add arch_string.
10387 * server.c (write_qxfer_response): Use const void * for DATA.
10388 (get_features_xml): New.
10389 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10390 * target.h (struct target_ops): Add arch_string method.
10391
10392 2007-01-03 Denis Pilat <denis.pilat@st.com>
10393 Daniel Jacobowitz <dan@codesourcery.com>
10394
10395 * linux-low.c (linux_kill): Handle being called with no threads.
10396 * win32-i386-low.c (win32_kill): Likewise.
10397 (get_child_debug_event): Clear current_process_handle.
10398
10399 2006-12-30 Denis PILAT <denis.pilat@st.com>
10400 Daniel Jacobowitz <dan@codesourcery.com>
10401
10402 * remote-utils.c (remote_open): Check the type of specified
10403 serial port devices before opening them.
10404 * server.c (main): Kill the inferior if an error occurs during
10405 the first remote_open.
10406
10407 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10408
10409 * README: Update supported targets.
10410
10411 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10412
10413 * Makefile.in (clean): Remove reg-mips64.c.
10414 (reg-mips64.c, reg-mips64.o): New rules.
10415 * configure.srv: Handle mips64. Include regset support for mips.
10416 * linux-mips-low.c (union mips_register): New.
10417 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10418 (mips_breakpoint, mips_breakpoint_at): Use int.
10419 (mips_collect_register, mips_supply_register)
10420 (mips_collect_register_32bit, mips_supply_register_32bit)
10421 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10422 (mips_store_fpregset, target_regsets): New.
10423 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10424
10425 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10426
10427 * configure.srv: Add target "spu*-*-*".
10428 * Makefile.in (clean): Remove reg-spu.c.
10429 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10430 * spu-low.c: New file.
10431
10432 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10433
10434 * configure.ac: Correct td_thr_tls_get_addr test.
10435 * configure: Regenerated.
10436
10437 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10438
10439 * linux-low.c (linux_wait_for_event): Reformat. Use the
10440 pass_signals array.
10441 * remote-utils.c (decode_address_to_semicolon): New.
10442 * server.c (pass_signals, handle_general_set): New.
10443 (handle_query): Mention QPassSignals for qSupported.
10444 (main): Call handle_general_set.
10445 * server.h (pass_signals, decode_address_to_semicolon): New.
10446
10447 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10448
10449 * server.c (handle_query): Correct error handling for read_auxv.
10450
10451 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10452
10453 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10454 and srv_linux_thread_db to yes.
10455 * linux-s390-low.c (s390_fill_gregset): New function.
10456 (target_regsets): Define data structure.
10457
10458 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10459
10460 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10461 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10462 * config.in, configure: Regenerated.
10463 * inferiors.c (gdb_id_to_thread): New function.
10464 (gdb_id_to_thread_id): Use it.
10465 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10466 * linux-low.h (struct process_info): Add th member.
10467 (thread_db_get_tls_address): New prototype.
10468 * remote-utils.c (decode_address): Make non-static.
10469 * server.c (handle_query): Handle qGetTLSAddr.
10470 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10471 * target.h (struct target_ops): Add get_tls_address.
10472 * thread-db.c (maybe_attach_thread): Save the thread handle.
10473 (thread_db_get_tls_address): New.
10474
10475 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10476
10477 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10478 (linux_resume_one_process): Take a siginfo_t *. Update all
10479 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10480 (struct pending_signals): Add a siginfo_t.
10481 (linux_wait_for_process): Always set last_status.
10482 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10483 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10484 * linux-low.h (struct process_info): Add last_status.
10485
10486 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10487
10488 * remote-utils.c (try_rle): New function.
10489 (putpkt_binary): Use it.
10490
10491 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10492
10493 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10494 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10495 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10496 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10497 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10498 point registers.
10499
10500 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10501
10502 * server.c (terminal_fd): New variable.
10503 (old_foreground_pgrp): Likewise.
10504 (restore_old_foreground_pgrp): New function.
10505 (start_inferior): Record the terminal file descriptor in terminal_fd
10506 and its original foreground group in old_foreground_pgrp. Register
10507 restore_old_foreground_pgrp with atexit().
10508
10509 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10510
10511 * server.c (handle_query): Correct qPart to qXfer.
10512
10513 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10514
10515 * configure.ac: Check for more headers which are missing on
10516 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10517 * configure.srv: Add Cygwin and mingw32.
10518 * remote-utils.c: Don't include headers unconditionally which
10519 are missing on mingw32. Include <winsock.h> for mingw32.
10520 (remote_open): Adjust for mingw32 support. Flush
10521 standard error after writing to it.
10522 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10523 (unblock_async_io, enable_async_io, disable_async_io)
10524 (readchar, getpkt): Update for Winsock support.
10525 (prepare_resume_reply): Expect a protocol signal number.
10526 * server.c: Disable <sys/wait.h> on mingw32.
10527 (start_inferior): Adjust for mingw32 support. Flush
10528 standard error after writing to it.
10529 (attach_inferior): Likewise. Use protocol signal
10530 numbers.
10531 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10532 and names.
10533 * win32-i386-low.c: New file.
10534 * Makefile.in (XM_CLIBS): Set.
10535 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10536 (win32-i386-low.o): New dependency rule.
10537 * linux-low.c (linux_wait): Use target signal numbers.
10538 * target.h (struct target_ops): Doc fix.
10539 * server.h (target_signal_to_name): New prototype.
10540 * gdbreplay.c: Don't include headers unconditionally which
10541 are missing on mingw32. Include <winsock.h> for mingw32.
10542 (remote_close, remote_open): Adjust for Winsock support.
10543 * configure, config.in: Regenerated.
10544
10545 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10546
10547 * server.c (decode_xfer_read, write_qxfer_response): New.
10548 (handle_query): Take a packet length argument. Handle
10549 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10550 the qSupported response.
10551 (main): Update call to handle_query.
10552
10553 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10554
10555 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10556 (putpkt_binary): Renamed from putpkt and adjusted for binary
10557 data.
10558 (putpkt): New wrapper for putpkt_binary.
10559 (readchar): Don't mask off the high bit.
10560 (decode_X_packet): New function.
10561 * server.c (main): Call putpkt_binary if a handler sets the packet
10562 length. Save the length of the incoming packet. Handle 'X'.
10563 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10564
10565 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10566
10567 * server.c (handle_query): Handle qSupported.
10568
10569 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10570
10571 * remote-utils.c (all_symbols_looked_up): New variable.
10572 (look_up_one_symbol): Check it.
10573 * server.h (look_up_one_symbol): New declaration.
10574 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10575
10576 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10577
10578 * Makefile.in (linux-arm-low.o): Update dependencies.
10579 * linux-arm-low.c: Include "gdb_proc_service.h".
10580 (PTRACE_GET_THREAD_AREA): Define.
10581 (ps_get_thread_area): New function.
10582
10583 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10584
10585 * configure.srv (m68k*-*-uclinux*): New target.
10586 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10587 (linux_resume_one_process): Remove extraneous cast.
10588 (linux_read_offsets): New.
10589 (linux_target_op): Add linux_read_offsets on mmuless systems.
10590 * server.c (handle_query): Add qOffsets logic.
10591 * target.h (struct target_ops): Add read_offsets.
10592
10593 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10594
10595 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10596 (PTRACE_GET_THREAD_AREA): Define.
10597 (ps_get_thread_area): New function.
10598 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10599 (linux-x86-64-low.o): Update.
10600
10601 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10602
10603 * configure.ac: Remove checks for prfpregset_t.
10604 * gdb_proc_service.h: New file.
10605 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10606 new "gdb_proc_service.h".
10607 * proc-service.c: Likewise.
10608 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10609 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10610 * Makefile.in (gdb_proc_service_h): Updated.
10611 * configure, config.in: Regenerated.
10612
10613 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10614
10615 * remote-utils.c (prepare_resume_reply): Move declaration
10616 of gdb_id_from_wait to the top of the block.
10617
10618 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10619
10620 * linux-low.c (regsets_store_inferior_registers): Read the regset
10621 from the target before filling it.
10622
10623 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10624
10625 * server.c (attach_inferior): Return SIGTRAP for a successful
10626 attach.
10627
10628 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10629
10630 * Makefile.in (OBS): Add version.o.
10631 (STAGESTUFF): Delete.
10632 (version.o): Add dependencies.
10633 (version.c): Replace rule.
10634 (clean): Remove version.c.
10635 * server.c (gdbserver_version): New.
10636 (gdbserver_usage): Use printf.
10637 (main): Handle --version and --help.
10638 * server.h (version, host_name): Add declarations.
10639
10640 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10641
10642 * linux-arm-low.c:
10643 * linux-arm-low.c:
10644 * inferiors.c:
10645 * i387-fp.h:
10646 * i387-fp.c:
10647 * gdbreplay.c:
10648 * regcache.c:
10649 * proc-service.c:
10650 * mem-break.h:
10651 * mem-break.c:
10652 * linux-x86-64-low.c:
10653 * linux-sh-low.c:
10654 * linux-s390-low.c:
10655 * linux-ppc64-low.c:
10656 * linux-ppc-low.c:
10657 * linux-mips-low.c:
10658 * linux-m68k-low.c:
10659 * linux-m32r-low.c:
10660 * linux-low.h:
10661 * linux-low.c:
10662 * linux-ia64-low.c:
10663 * linux-i386-low.c:
10664 * linux-crisv32-low.c:
10665 * thread-db.c:
10666 * terminal.h:
10667 * target.h:
10668 * target.c:
10669 * server.h:
10670 * server.c:
10671 * remote-utils.c:
10672 * regcache.h:
10673 * utils.c:
10674 * Makefile.in:
10675 * configure.ac:
10676 * gdbserver.1: Add (C) after Copyright. Update the FSF
10677 address.
10678
10679 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10680
10681 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10682 (arm_breakpoint_at): Recognize both breakpoints.
10683 (the_low_target): Use the correct breakpoint instruction.
10684
10685 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10686
10687 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10688 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10689 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10690 (the_low_target): Update.
10691
10692 2005-10-25 Andreas Schwab <schwab@suse.de>
10693
10694 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10695
10696 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10697 (ia64_num_regs): Reduce to 462.
10698
10699 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10700
10701 * acinclude.m4: Correct quoting.
10702 * aclocal.m4: Regenerated.
10703
10704 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10705 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10706 (thread_db_init): Call thread_db_err_str.
10707 * configure.ac: Check for TD_VERSION.
10708 * config.in, configure: Regenerated.
10709
10710 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10711
10712 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10713
10714 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10715
10716 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10717 is not available. Define HAVE_PTRACE_GETREGS if it is.
10718 * config.in, configure: Regenerated.
10719 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10720 * linux-i386-low.c, linux-m68k-low.c: Update to use
10721 HAVE_PTRACE_GETREGS.
10722 * linux-low.c (regsets_fetch_inferior_registers)
10723 (regsets_store_inferior_registers): Only return 0 if we processed
10724 GENERAL_REGS.
10725 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10726 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10727
10728 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10729
10730 * inferiors.c (struct thread_info): Add gdb_id.
10731 (add_thread): Add gdb_id argument.
10732 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10733 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10734 calls to add_thread.
10735 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10736 * server.c (handle_query): Use thread_to_gdb_id.
10737 (handle_v_cont, main): Use gdb_id_to_thread_id.
10738 * server.h (add_thread): Update prototype.
10739 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10740 prototypes.
10741
10742 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10745 left-padded registers.
10746 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10747 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10748
10749 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10750
10751 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10752 * configure: Regenerate.
10753 * config.in: Regenerate.
10754 * server.h (NEED_DECLARATION_STRERROR):
10755 Replace with !HAVE_DECL_STRERROR.
10756
10757 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10758
10759 * linux-low.c (linux_wait, linux_send_signal): Don't test
10760 an unsigned long variable for > 0 if it could be MAX_ULONG.
10761 * server.c (myresume): Likewise.
10762 * target.c (set_desired_inferior): Likewise.
10763
10764 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10765
10766 * configure.ac: Simplify and improve check for socklen_t.
10767 * configure, config.in: Regenerate.
10768
10769 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10770
10771 * acconfig.h: Remove.
10772 * configure.ac: Add a test for socklen_t. Use three-argument
10773 AC_DEFINE throughout.
10774 * config.in: Regenerated using autoheader 2.59.
10775 * configure: Regenerated.
10776
10777 * gdbreplay.c (socklen_t): Provide a default.
10778 (remote_open): Use socklen_t.
10779 * remote-utils.c (socklen_t): Provide a default.
10780 (remote_open): Use socklen_t.
10781 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10782 unsigned char.
10783
10784 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10785 char for buffers.
10786 * linux-low.c (linux_read_memory, linux_write_memory)
10787 (linux_read_auxv): Likewise.
10788 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10789 (check_mem_write): Likewise.
10790 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10791 Likewise.
10792 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10793 (registers_from_string, register_data): Likewise.
10794 * server.c (handle_query, main): Likewise.
10795 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10796 (decode_M_packet): Likewise.
10797 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10798 * target.h (struct target_ops): Update read_memory, write_memory,
10799 and read_auxv.
10800 (read_inferior_memory, write_inferior_memory): Update.
10801 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10802 to unsigned char *.
10803 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10804 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10805 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10806 linux-s390-low.c, linux-sh-low.c: Update for changes in
10807 read_inferior_memory and the_low_target->breakpoint.
10808
10809 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10810
10811 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10812 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10813 * configure.srv: Add powerpc64-*-linux*.
10814 * linux-ppc64-low.c: New file.
10815
10816 2005-05-23 Orjan Friberg <orjanf@axis.com>
10817
10818 * linux-cris-low.c: New file with support for CRIS.
10819 * linux-crisv32-low.c: Ditto for CRISv32.
10820 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10821 (clean): Add reg-cris.c and reg-crisv32.c.
10822 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10823 reg-crisv32.o, and reg-crisv32.c to make rules.
10824 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10825 recognized targets.
10826
10827 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10828
10829 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10830 of sizeof (PTRACE_XFER_TYPE).
10831 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10832
10833 2005-05-12 Orjan Friberg <orjanf@axis.com>
10834
10835 * target.h (struct target_ops): Add insert_watchpoint,
10836 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10837 pointers for hardware watchpoint support.
10838 * linux-low.h (struct linux_target_ops): Ditto.
10839 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10840 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10841 to linux_target_ops.
10842 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10843 reply packet.
10844 * server.c (main): Recognize 'Z' and 'z' packets.
10845
10846 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10847
10848 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10849 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10850 (the_low_target): Add new members.
10851
10852 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10853
10854 * proc-service.c (ps_lgetregs): Search all_processes instead of
10855 all_threads.
10856
10857 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10858
10859 * server.c (start_inferior): Change return type to int.
10860 (attach_inferior): Change sigptr to int *.
10861 (handle_v_cont, handle_v_requests): Change signal to int *.
10862 (main): Change signal to int.
10863
10864 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10865
10866 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10867 * configure.srv: Add m32r*-*-linux*.
10868 * linux-m32r-low.c: New file.
10869
10870 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10871
10872 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10873
10874 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10875
10876 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10877 Take unsigned long arguments for PIDs.
10878 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10879 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10880 (wait_for_sigstop, linux_resume_one_process)
10881 (regsets_fetch_inferior_registers, linux_send_signal)
10882 (linux_read_auxv): Likewise. Update the types of variables holding
10883 PIDs. Update format string specifiers.
10884 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10885 * remote-utils.c (prepare_resume_reply): Likewise.
10886 * server.c (cont_thread, general_thread, step_thread)
10887 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10888 unsigned long.
10889 (handle_query): Update format specifiers.
10890 (handle_v_cont, main): Use strtoul for thread IDs.
10891 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10892 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10893 (general_thread, step_thread, thread_from_wait)
10894 (old_thread_from_wait): Update.
10895 * target.h (struct thread_resume): Use unsigned long for THREAD.
10896 (struct target_ops): Use unsigned long for arguments to attach and
10897 thread_alive.
10898
10899 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10900
10901 * acinclude.m4: Include bfd/bfd.m4 directly.
10902 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10903 <agriffis@toolchain.org>.
10904 * aclocal.m4, configure: Regenerated.
10905
10906 2005-01-07 Andrew Cagney <cagney@gnu.org>
10907
10908 * configure.ac: Rename configure.in, require autoconf 2.59.
10909 * configure: Re-generate.
10910
10911 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10912
10913 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10914 LIBS when finished.
10915 * aclocal.m4: Regenerated.
10916 * configure: Regenerated.
10917
10918 2004-11-21 Andreas Schwab <schwab@suse.de>
10919
10920 * linux-m68k-low.c (m68k_num_gregs): Define.
10921 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10922 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10923 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10924 (m68k_breakpoint_at): New. Add to the_low_target.
10925
10926 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10927 srv_linux_thread_db to yes.
10928
10929 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10930
10931 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10932 (ARCH_SET_FS): Likewise.
10933 (ARCH_GET_FS): Likewise.
10934 (ARCH_GET_GS): Likewise.
10935
10936 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10937
10938 * linux-i386-low.c (ps_get_thread_area): New.
10939 * linux-x86-64-low.c (ps_get_thread_area): New.
10940 * linux-low.c: Include <sys/syscall.h>.
10941 (linux_kill_one_process): Don't kill the first thread here.
10942 (linux_kill): Kill the first thread here.
10943 (kill_lwp): New function.
10944 (send_sigstop, linux_send_signal): Use it.
10945 * proc-service.c: Clean up #ifdefs.
10946 (fpregset_info): Delete.
10947 (ps_lgetregs): Update and enable implementation.
10948 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10949 implementations.
10950 * remote-utils.c (struct sym_cache, symbol_cache): New.
10951 (input_interrupt): Print a clearer message.
10952 (async_io_enabled): New variable.
10953 (enable_async_io, disable_async_io): Use it. Update comments.
10954 (look_up_one_symbol): Use the symbol cache.
10955 * thread-db.c (thread_db_look_up_symbols): New function.
10956 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10957
10958 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10959
10960 * configure.in: Test for -rdynamic.
10961 * configure: Regenerated.
10962 * Makefile (INTERNAL_LDFLAGS): New.
10963 (gdbserver, gdbreplay): Use it.
10964
10965 2004-09-02 Andrew Cagney <cagney@gnu.org>
10966
10967 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10968
10969 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10970
10971 * linux-low.c (linux_wait): Clear all_processes list also.
10972
10973 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10974
10975 * linux-low.c: Include <errno.h>. Remove extern declaration of
10976 errno.
10977
10978 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10979
10980 * gdbreplay.c, server.h, utils.c: Update copyright years.
10981
10982 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10983
10984 * server.c (main): Print child status or termination signal from
10985 variable 'signal', not 'sig'.
10986
10987 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10988
10989 * linux-low.c (linux_read_memory): Change return type to
10990 int. Check for and return error from ptrace().
10991 * target.c (read_inferior_memory): Change return type to int. Pass
10992 back return status from the_target->read_memory().
10993 * target.h (struct target_ops): Adapt *read_memory() prototype.
10994 Update comment.
10995 (read_inferior_memory): Adapt prototype.
10996 * server.c (main): Return an error packet if
10997 read_inferior_memory() returns an error.
10998
10999 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11000
11001 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11002 Unify with other clean targets.
11003
11004 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11005
11006 * server.c (handle_v_cont): Call set_desired_inferior.
11007
11008 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11009
11010 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11011
11012 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11013
11014 * linux-low.c (linux_wait): Unblock async I/O.
11015 (linux_resume): Block and enable async I/O.
11016 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11017 * server.h (block_async_io, unblock_async_io): Add prototypes.
11018
11019 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11020
11021 * remote-utils.c (remote_open): Print a status notice after
11022 opening a TCP port.
11023 * server.c (attach_inferior): Print a status notice after
11024 attaching.
11025
11026 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11027
11028 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11029
11030 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11031
11032 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11033 error packet.
11034 * server.c, target.h: Update copyright years.
11035
11036 2004-02-25 Roland McGrath <roland@redhat.com>
11037
11038 * target.h (struct target_ops): New member `read_auxv'.
11039 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11040 * linux-low.c (linux_read_auxv): New function.
11041 (linux_target_ops): Initialize `read_auxv' member to that.
11042
11043 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11044
11045 Committed by Jim Blandy <jimb@redhat.com>.
11046
11047 * linux-s390-low.c (s390_num_regs): Update.
11048 (s390_regmap): Remove control registers. Use __s390x__ predefine
11049 instead of GPR_SIZE to distiguish s390 and s390x targets.
11050
11051 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11052
11053 * linux-low.c: Update copyright year.
11054 (check_removed_breakpoint): Clear pending_is_breakpoint.
11055 (linux_set_resume_request, linux_queue_one_thread)
11056 (resume_status_pending_p): New functions.
11057 (linux_continue_one_thread): Use process->resume.
11058 (linux_resume): Only resume threads if there are no pending events.
11059 * linux-low.h (struct process_info): Add resume request
11060 pointer.
11061
11062 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11063
11064 * regcache.c (new_register_cache): Clear the allocated register
11065 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11066
11067 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11068
11069 * linux-low.c (linux_resume): Take a struct thread_resume *
11070 argument.
11071 (linux_wait): Update call.
11072 (resume_ptr): New static variable.
11073 (linux_continue_one_thread): Renamed from
11074 linux_continue_one_process. Use resume_ptr.
11075 (linux_resume): Use linux_continue_one_thread.
11076 * server.c (handle_v_cont, handle_v_requests): New functions.
11077 (myresume): New function.
11078 (main): Handle 'v' case.
11079 * target.h (struct thread_resume): New type.
11080 (struct target_ops): Change argument of "resume" to struct
11081 thread_resume *.
11082 (myresume): Delete macro.
11083
11084 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11085
11086 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11087 (uninstall): Support DESTDIR.
11088
11089 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11090
11091 * configure.srv: Add xscale*linux copy of arm*linux entry.
11092
11093 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11094
11095 * linux-arm-low.c (arm_reinsert_addr): New function.
11096 (the_low_target): Add arm_reinsert_addr.
11097
11098 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11099
11100 * mem-break.c: Remove whitespace at end of file.
11101
11102 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11103
11104 * configure.in: Check whether we need to prototype strerror.
11105 * server.h: Optionally prototype strerror.
11106 * gdbreplay.c (perror_with_name): Use strerror.
11107 * linux-low.c (linux_attach_lwp): Use strerror.
11108 * utils.c (perror_with_name): Use strerror.
11109 * config.in, configure: Regenerated.
11110
11111 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11112
11113 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11114 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11115
11116 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11117
11118 * Makefile.in (SFILES): Update.
11119 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11120 low-sun3.c: Remove files.
11121
11122 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11123
11124 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11125 (linux_detach_one_process, linux_detach): New functions.
11126 (linux_target_ops): Add linux_detach.
11127 * server.c (main): Handle 'D' packet.
11128 * target.h (struct target_ops): Add "detach" member.
11129 (detach_inferior): Define.
11130
11131 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11132
11133 From Kelley Cook <kelleycook@wideopenwest.com>:
11134 * configure.srv: Accept i[34567]86 variants.
11135
11136 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11137
11138 * linux-low.c (linux_wait_for_event): Correct comment typos.
11139 (linux_resume_one_process): Call check_removed_breakpoint.
11140 (linux_send_signal): New function.
11141 (linux_target_ops): Add linux_send_signal.
11142 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11143 of kill.
11144 * target.h (struct target_ops): Add send_signal.
11145
11146 2003-05-29 Jim Blandy <jimb@redhat.com>
11147
11148 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11149 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11150 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11151 away part of the register's value.
11152
11153 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11154
11155 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11156 (linux_wait_for_event, linux_init_signals): Likewise.
11157
11158 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11159
11160 * configure.in: Check for stdlib.h.
11161 * configure: Regenerated.
11162 * config.in: Regenerated.
11163
11164 2003-01-04 Andreas Schwab <schwab@suse.de>
11165
11166 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11167
11168 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11169
11170 * Makefile.in: Remove obsolete code.
11171
11172 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11173
11174 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11175 defined(PT_FPR0_HI).
11176
11177 2002-11-17 Stuart Hughes <seh@zee2.com>
11178
11179 * linux-arm-low.c (arm_num_regs): Increase.
11180 (arm_regmap): Include status register.
11181
11182 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11183
11184 * linux-low.c (register_addr): Remove incorrect -1 check.
11185
11186 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11187
11188 * linux-low.c (linux_create_inferior): Call setpgid. Return
11189 the new PID.
11190 (unstopped_p, linux_signal_pid): Remove.
11191 (linux_target_ops): Remove linux_signal_pid.
11192 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11193 global instead of target method.
11194 * target.h (struct target_ops): Remove signal_pid. Update comment
11195 for create_inferior.
11196 * server.c (signal_pid): New variable.
11197 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11198 gdbserver. Set the child to be the foreground process group.
11199 (attach_inferior): Set signal_pid.
11200
11201 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11202
11203 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11204
11205 2002-08-20 Jim Blandy <jimb@redhat.com>
11206
11207 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11208 default for this.
11209
11210 2002-08-01 Andrew Cagney <cagney@redhat.com>
11211
11212 * Makefile.in: Make chill references obsolete.
11213
11214 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11215
11216 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11217 * configure: Regenerate.
11218 * config.in: Regenerate.
11219
11220 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11221
11222 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11223 (perror_with_name, remote_close, remote_open, expect, play): Static.
11224
11225 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11226
11227 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11228 byte offsets instead of an array of indexes.
11229 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11230
11231 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11232
11233 * regcache.c: Add comment.
11234
11235 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11236
11237 * thread-db.c: New file.
11238 * proc-service.c: New file.
11239 * acinclude.m4: New file.
11240 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11241 proc-service.o, and thread-db.o.
11242 (linux-low.o): Add USE_THREAD_DB.
11243 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11244 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11245 * aclocal.m4: Regenerated.
11246 * config.in: Regenerated.
11247 * configure: Regenerated.
11248 * configure.in: Check for proc_service.h, sys/procfs.h,
11249 thread_db.h, and linux/elf.h headrs.
11250 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11251 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11252 Check for -lthread_db and thread support.
11253 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11254 PowerPC, and SuperH.
11255 * i387-fp.c: Constify arguments.
11256 * i387-fp.h: Likewise.
11257 * inferiors.c: (struct thread_info): Renamed from
11258 `struct inferior_info'. Remove PID member. Use generic inferior
11259 list header. All uses updated.
11260 (inferiors, signal_pid): Removed.
11261 (all_threads): New variable.
11262 (get_thread): Define.
11263 (add_inferior_to_list): New function.
11264 (for_each_inferior): New function.
11265 (change_inferior_id): New function.
11266 (add_inferior): Removed.
11267 (remove_inferior): New function.
11268 (add_thread): New function.
11269 (free_one_thread): New function.
11270 (remove_thread): New function.
11271 (clear_inferiors): Use for_each_inferior and free_one_thread.
11272 (find_inferior): New function.
11273 (find_inferior_id): New function.
11274 (inferior_target_data): Update argument type.
11275 (set_inferior_target_data): Likewise.
11276 (inferior_regcache_data): Likewise.
11277 (set_inferior_regcache_data): Likewise.
11278 * linux-low.c (linux_bp_reinsert): Remove.
11279 (all_processes, stopping_threads, using_thrads)
11280 (struct pending_signals, debug_threads, pid_of): New.
11281 (inferior_pid): Replace with macro.
11282 (struct inferior_linux_data): Remove.
11283 (get_stop_pc, add_process): New functions.
11284 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11285 Use add_process and add_thread.
11286 (linux_attach_lwp): New function, based on old linux_attach. Use
11287 add_process and add_thread. Set stop_expected for new threads.
11288 (linux_attach): New function.
11289 (linux_kill_one_process): New function.
11290 (linux_kill): Kill all LWPs.
11291 (linux_thread_alive): Use find_inferior_id.
11292 (check_removed_breakpoints, status_pending_p): New functions.
11293 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11294 Update. Use WNOHANG. Wait for cloned processes also. Update process
11295 struct for the found process.
11296 (linux_wait_for_event): New function.
11297 (linux_wait): Use it. Support LWPs.
11298 (send_sigstop, wait_for_sigstop, stop_all_processes)
11299 (linux_resume_one_process, linux_continue_one_process): New functions.
11300 (linux_resume): Support LWPs.
11301 (REGISTER_RAW_SIZE): Remove.
11302 (fetch_register): Use register_size instead. Call supply_register.
11303 (usr_store_inferior_registers): Likewise. Call collect_register.
11304 Fix recursive case.
11305 (regsets_fetch_inferior_registers): Improve error message.
11306 (regsets_store_inferior_registers): Add debugging.
11307 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11308 (unstopped_p, linux_signal_pid): New functions.
11309 (linux_target_ops): Add linux_signal_pid.
11310 (linux_init_signals): New function.
11311 (initialize_low): Call it. Initialize using_threads.
11312 * regcache.c (inferior_regcache_data): Add valid
11313 flag.
11314 (get_regcache): Fetch registers lazily. Add fetch argument
11315 and update all callers.
11316 (regcache_invalidate_one, regcache_invalidate): New
11317 functions.
11318 (new_register_cache): Renamed from create_register_cache.
11319 Return the new regcache.
11320 (free_register_cache): Change argument to a void *.
11321 (registers_to_string, registers_from_string): Call get_regcache
11322 with fetch flag set.
11323 (register_data): Make static. Pass fetch flag to get_regcache.
11324 (supply_register): Call get_regcache with fetch flag clear.
11325 (collect_register): Call get_regcache with fetch flag set.
11326 (collect_register_as_string): New function.
11327 * regcache.h: Update.
11328 * remote-utils.c (putpkt): Flush after debug output and use
11329 stderr.
11330 Handle input interrupts while waiting for an ACK.
11331 (input_interrupt): Use signal_pid method.
11332 (getpkt): Flush after debug output and use stderr.
11333 (outreg): Use collect_register_as_string.
11334 (new_thread_notify, dead_thread_notify): New functions.
11335 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11336 and general_thread.
11337 (look_up_one_symbol): Flush after debug output.
11338 * server.c (step_thread, server_waiting): New variables.
11339 (start_inferior): Don't use signal_pid. Update call to mywait.
11340 (attach_inferior): Update call to mywait.
11341 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11342 (main): Don't fetch/store registers explicitly. Use
11343 set_desired_inferior. Support proposed ``Hs'' packet. Update
11344 calls to mywait.
11345 * server.h: Update.
11346 (struct inferior_list, struct_inferior_list_entry): New.
11347 * target.c (set_desired_inferior): New.
11348 (write_inferior_memory): Constify.
11349 (mywait): New function.
11350 * target.h: Update.
11351 (struct target_ops): New signal_pid method.
11352 (mywait): Removed macro, added prototype.
11353
11354 * linux-low.h (regset_func): Removed.
11355 (regset_fill_func, regset_store_func): New.
11356 (enum regset_type): New.
11357 (struct regset_info): Add type field. Use new operation types.
11358 (struct linux_target_ops): stop_pc renamed to get_pc.
11359 Add decr_pc_after_break and breakpoint_at.
11360 (get_process, get_thread_proess, get_process_thread)
11361 (strut process_info, all_processes, linux_attach_lwp)
11362 (thread_db_init): New.
11363
11364 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11365 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11366 (the_low_target): Add new members.
11367 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11368 (i386_store_fpxregset): Constify.
11369 (target_regsets): Add new kind identifier.
11370 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11371 (i386_set_pc): Add debugging.
11372 (i386_breakpoint_at): New function.
11373 (the_low_target): Add new members.
11374 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11375 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11376 (mips_breakpoint_at): New.
11377 (the_low_target): Add new members.
11378 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11379 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11380 (the_low_target): Add new members.
11381 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11382 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11383 (the_low_target): Add new members.
11384 * linux-x86-64-low.c (target_regsets): Add new kind
11385 identifier.
11386
11387 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11388
11389 From Martin Pool <mbp@samba.org>:
11390 * server.c (gdbserver_usage): New function.
11391 (main): Call it.
11392
11393 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11394
11395 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11396 stop_at -> stop_pc.
11397
11398 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11399
11400 * Makefile.in: Remove obsolete code.
11401
11402 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11403
11404 * linux-low.c (regsets_fetch_inferior_registers),
11405 (regsets_store_inferior_registers): Removed cast to int from
11406 ptrace() calls.
11407 * regcache.h: Added declaration of struct inferior_info.
11408
11409 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11410
11411 * inferiors.c (struct inferior_info): Add regcache_data.
11412 (add_inferior): Call create_register_cache.
11413 (clear_inferiors): Call free_register_cache.
11414 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11415 * regcache.c (struct inferior_regcache_data): New.
11416 (registers): Remove.
11417 (get_regcache): New function.
11418 (create_register_cache, free_register_cache): New functions.
11419 (set_register_cache): Don't initialize the register cache here.
11420 (registers_to_string, registers_from_string, register_data): Call
11421 get_regcache.
11422 * regcache.h: Add prototypes.
11423 * server.h: Likewise.
11424
11425 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11426
11427 * mem-break.c: New file.
11428 * mem-break.h: New file.
11429 * Makefile.in: Add mem-break.o rule; update server.h
11430 dependencies.
11431 * inferiors.c (struct inferior_info): Add target_data
11432 member.
11433 (clear_inferiors): Free target_data member if set.
11434 (inferior_target_data, set_inferior_target_data): New functions.
11435 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11436 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11437 * linux-low.c (linux_bp_reinsert): New variable.
11438 (struct inferior_linux_data): New.
11439 (linux_create_inferior): Use set_inferior_target_data.
11440 (linux_attach): Likewise. Call add_inferior.
11441 (linux_wait_for_one_inferior): New function.
11442 (linux_wait): Call it.
11443 (linux_write_memory): Add const.
11444 (initialize_low): Call set_breakpoint_data.
11445 * linux-low.h (struct linux_target_ops): Add breakpoint
11446 handling members.
11447 * server.c (attach_inferior): Remove extra add_inferior
11448 call.
11449 * server.h: Include mem-break.h. Update inferior.c
11450 prototypes.
11451 * target.c (read_inferior_memory)
11452 (write_inferior_memory): New functions.
11453 * target.h (read_inferior_memory)
11454 (write_inferior_memory): Change macros to prototypes.
11455 (struct target_ops): Update comments. Add const to write_memory
11456 definition.
11457
11458 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11459
11460 * linux-low.c (usr_store_inferior_registers): Support
11461 registers which are allowed to fail to store.
11462 * linux-low.h (linux_target_ops): Likewise.
11463 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11464 (ppc_cannot_store_register): FPSCR may not be storable.
11465
11466 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11467
11468 * server.h: Include <string.h> if HAVE_STRING_H.
11469 * ChangeLog: Correct paths in last ChangeLog entry.
11470
11471 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11472
11473 * linux-low.h: Remove obsolete prototypes.
11474 (struct linux_target_ops): New.
11475 (extern the_low_target): New.
11476 * linux-low.c (num_regs, regmap): Remove declarations.
11477 (register_addr): Use the_low_target explicitly.
11478 (fetch_register): Likewise.
11479 (usr_fetch_inferior_registers): Likewise.
11480 (usr_store_inferior_registers): Likewise.
11481 * linux-arm-low.c (num_regs): Remove.
11482 (arm_num_regs): Define.
11483 (arm_regmap): Renamed from regmap, made static.
11484 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11485 made static.
11486 (arm_cannot_store_register): Renamed from cannot_store_register,
11487 made static.
11488 (the_low_target): New.
11489 * linux-i386-low.c (num_regs): Remove.
11490 (i386_num_regs): Define.
11491 (i386_regmap): Renamed from regmap, made static.
11492 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11493 made static.
11494 (i386_cannot_store_register): Renamed from cannot_store_register,
11495 made static.
11496 (the_low_target): New.
11497 * linux-ia64-low.c (num_regs): Remove.
11498 (ia64_num_regs): Define.
11499 (ia64_regmap): Renamed from regmap, made static.
11500 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11501 made static.
11502 (ia64_cannot_store_register): Renamed from cannot_store_register,
11503 made static.
11504 (the_low_target): New.
11505 * linux-m68k-low.c (num_regs): Remove.
11506 (m68k_num_regs): Define.
11507 (m68k_regmap): Renamed from regmap, made static.
11508 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11509 made static.
11510 (m68k_cannot_store_register): Renamed from cannot_store_register,
11511 made static.
11512 (the_low_target): New.
11513 * linux-mips-low.c (num_regs): Remove.
11514 (mips_num_regs): Define.
11515 (mips_regmap): Renamed from regmap, made static.
11516 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11517 made static.
11518 (mips_cannot_store_register): Renamed from cannot_store_register,
11519 made static.
11520 (the_low_target): New.
11521 * linux-ppc-low.c (num_regs): Remove.
11522 (ppc_num_regs): Define.
11523 (ppc_regmap): Renamed from regmap, made static.
11524 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11525 made static.
11526 (ppc_cannot_store_register): Renamed from cannot_store_register,
11527 made static.
11528 (the_low_target): New.
11529 * linux-s390-low.c (num_regs): Remove.
11530 (s390_num_regs): Define.
11531 (s390_regmap): Renamed from regmap, made static.
11532 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11533 made static.
11534 (s390_cannot_store_register): Renamed from cannot_store_register,
11535 made static.
11536 (the_low_target): New.
11537 * linux-sh-low.c (num_regs): Remove.
11538 (sh_num_regs): Define.
11539 (sh_regmap): Renamed from regmap, made static.
11540 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11541 made static.
11542 (sh_cannot_store_register): Renamed from cannot_store_register,
11543 made static.
11544 (the_low_target): New.
11545 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11546 (the_low_target): New.
11547
11548 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11549
11550 * Makefile.in: Add stamp-h target.
11551 * configure.in: Create stamp-h.
11552 * configure: Regenerated.
11553
11554 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11555
11556 * inferiors.c: New file.
11557 * target.c: New file.
11558 * target.h: New file.
11559 * Makefile.in: Add target.o and inferiors.o. Update
11560 dependencies.
11561 * linux-low.c (inferior_pid): New static variable,
11562 moved from server.c.
11563 (linux_create_inferior): Renamed from create_inferior.
11564 Call add_inferior. Return 0 on success instead of a PID.
11565 (linux_attach): Renamed from myattach.
11566 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11567 (linux_thread_alive): Renamed from mythread_alive.
11568 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11569 child dies.
11570 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11571 (regsets_store_inferior_registers): Correct error message.
11572 Add missing ``return 0''.
11573 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11574 (linux_store_registers): Renamed from store_inferior_registers.
11575 (linux_read_memory): Renamed from read_inferior_memory.
11576 (linux_write_memory): Renamed from write_inferior_memory.
11577 (linux_target_ops): New structure.
11578 (initialize_low): Call set_target_ops ().
11579 * remote-utils.c (unhexify): New function.
11580 (hexify): New function.
11581 (input_interrupt): Send signals to ``signal_pid''.
11582 * server.c (inferior_pid): Remove.
11583 (start_inferior): Update create_inferior call.
11584 (attach_inferior): Call add_inferior.
11585 (handle_query): New function.
11586 (main): Call handle_query for `q' packets.
11587 * server.h: Include "target.h". Remove obsolete prototypes.
11588 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11589
11590 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11591
11592 * Makefile.in: Add WARN_CFLAGS. Update configury
11593 dependencies.
11594 * configure.in: Check for <string.h>
11595 * configure: Regenerate.
11596 * config.in: Regenerate.
11597 * gdbreplay.c: Include needed system headers.
11598 (remote_open): Remove strchr prototype.
11599 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11600 * regcache.c (supply_register): Change buf argument to const void *.
11601 (supply_register_by_name): Likewise.
11602 (collect_register): Change buf argument to void *.
11603 (collect_register_by_name): Likewise.
11604 * regcache.h: Add missing prototypes.
11605 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11606 * server.c (handle_query): New function.
11607 (attached): New static variable, moved out of main.
11608 (main): Quiet longjmp clobber warnings.
11609 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11610 * utils.c (error): Remove NORETURN.
11611 (fatal): Likewise.
This page took 0.314695 seconds and 4 git commands to generate.