More C++ build fixing
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-05-15 Pedro Alves <palves@redhat.com>
2
3 * target.h (target_handle_new_gdb_connection): Rewrite using if
4 wrapped in do/while.
5
6 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7
8 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
9 * configure, config.in: Regenerate.
10 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11 Declare typedef.
12
13 2015-05-12 Don Breazeal <donb@codesourcery.com>
14
15 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
16 PTRACE_EVENT_VFORK_DONE.
17 (linux_low_ptrace_options, extended_event_reported): Add vfork
18 events.
19 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
20 and "vforkdone" for RSP 'T' Stop Reply Packet.
21 * server.h (report_vfork_events): Declare
22 global variable.
23
24 2015-05-12 Don Breazeal <donb@codesourcery.com>
25
26 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
27 (the_low_target) <new_fork>: Initialize new member.
28 * linux-arm-low.c (arm_new_fork): New function.
29 (the_low_target) <new_fork>: Initialize new member.
30 * linux-low.c (handle_extended_wait): Call new target function
31 new_fork.
32 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
33 * linux-mips-low.c (mips_add_watchpoint): New function
34 extracted from mips_insert_point.
35 (the_low_target) <new_fork>: Initialize new member.
36 (mips_linux_new_fork): New function.
37 (mips_insert_point): Call mips_add_watchpoint.
38 * linux-x86-low.c (x86_linux_new_fork): New function.
39 (the_low_target) <new_fork>: Initialize new member.
40
41 2015-05-12 Don Breazeal <donb@codesourcery.com>
42
43 * linux-low.c (handle_extended_wait): Implement return value,
44 rename argument 'event_child' to 'event_lwp', handle
45 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
46 (linux_low_ptrace_options): New function.
47 (linux_low_filter_event): Call linux_low_ptrace_options,
48 use different argument fo linux_enable_event_reporting,
49 use return value from handle_extended_wait.
50 (extended_event_reported): New function.
51 (linux_wait_1): Call extended_event_reported and set
52 status to report fork events.
53 (linux_write_memory): Add pid to debug message.
54 (reset_lwp_ptrace_options_callback): New function.
55 (linux_handle_new_gdb_connection): New function.
56 (linux_target_ops): Initialize new structure member.
57 * linux-low.h (struct lwp_info) <waitstatus>: New member.
58 * lynx-low.c: Initialize new structure member.
59 * remote-utils.c (prepare_resume_reply): Implement stop reason
60 "fork" for "T" stop message.
61 * server.c (handle_query): Call handle_new_gdb_connection.
62 * server.h (report_fork_events): Declare global flag.
63 * target.h (struct target_ops) <handle_new_gdb_connection>:
64 New member.
65 (target_handle_new_gdb_connection): New macro.
66 * win32-low.c: Initialize new structure member.
67
68 2015-05-12 Don Breazeal <donb@codesourcery.com>
69
70 * mem-break.c (APPEND_TO_LIST): Define macro.
71 (clone_agent_expr): New function.
72 (clone_one_breakpoint): New function.
73 (clone_all_breakpoints): New function.
74 * mem-break.h: Declare new functions.
75
76 2015-05-12 Don Breazeal <donb@codesourcery.com>
77
78 * linux-low.c (linux_supports_fork_events): New function.
79 (linux_supports_vfork_events): New function.
80 (linux_target_ops): Initialize new structure members.
81 (initialize_low): Call linux_check_ptrace_features.
82 * lynx-low.c (lynx_target_ops): Initialize new structure
83 members.
84 * server.c (report_fork_events, report_vfork_events):
85 New global flags.
86 (handle_query): Add new features to qSupported packet and
87 response.
88 (captured_main): Initialize new global variables.
89 * target.h (struct target_ops) <supports_fork_events>:
90 New member.
91 <supports_vfork_events>: New member.
92 (target_supports_fork_events): New macro.
93 (target_supports_vfork_events): New macro.
94 * win32-low.c (win32_target_ops): Initialize new structure
95 members.
96
97 2015-05-12 Gary Benson <gbenson@redhat.com>
98
99 * server.c (handle_qxfer_exec_file): Use current process
100 if annex is empty.
101
102 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
103
104 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
105 Remove HAVE_PTRACE_GETREGS conditionals.
106 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
107 instead of PTRACE_GETREGS and PTRACE_SETREGS.
108
109 2015-05-08 Yao Qi <yao.qi@linaro.org>
110
111 * linux-low.c (linux_supports_conditional_breakpoints): New
112 function.
113 (linux_target_ops): Install new target method.
114 * lynx-low.c (lynx_target_ops): Install NULL hook for
115 supports_conditional_breakpoints.
116 * nto-low.c (nto_target_ops): Likewise.
117 * spu-low.c (spu_target_ops): Likewise.
118 * win32-low.c (win32_target_ops): Likewise.
119 * server.c (handle_query): Check
120 target_supports_conditional_breakpoints.
121 * target.h (struct target_ops) <supports_conditional_breakpoints>:
122 New field.
123 (target_supports_conditional_breakpoints): New macro.
124
125 2015-05-06 Pedro Alves <palves@redhat.com>
126
127 PR server/18081
128 * server.c (start_inferior): If the process exits, mourn it.
129
130 2015-04-21 Gary Benson <gbenson@redhat.com>
131
132 * hostio.c (fileio_open_flags_to_host): Factored out to
133 fileio_to_host_openflags in common/fileio.c. Single use
134 updated.
135
136 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
137
138 * linux-xtensa-low.c (xtensa_fill_gregset)
139 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
140 XCHAL_HAVE_LOOP.
141
142 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
143
144 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
145 (regs_info): Replace usrregs pointer with NULL.
146
147 2015-04-17 Gary Benson <gbenson@redhat.com>
148
149 * target.h (struct target_ops) <pid_to_exec_file>: New field.
150 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
151 * server.c (handle_qxfer_exec_file): New function.
152 (qxfer_packets): Add exec-file entry.
153 (handle_query): Report qXfer:exec-file:read as supported packet.
154
155 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
156
157 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
158
159 2015-04-09 Gary Benson <gbenson@redhat.com>
160
161 * hostio-errno.c (errno_to_fileio_error): Remove function.
162 Update caller to use remote_fileio_to_fio_error.
163
164 2015-04-09 Yao Qi <yao.qi@linaro.org>
165
166 * linux-low.c (linux_insert_point): Call
167 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
168 (linux_remove_point): Call remove_memory_breakpoint if type is
169 raw_bkpt_type_sw.
170 * linux-x86-low.c (x86_insert_point): Don't call
171 insert_memory_breakpoint.
172 (x86_remove_point): Don't call remove_memory_breakpoint.
173
174 2015-04-01 Pedro Alves <palves@redhat.com>
175 Cleber Rosa <crosa@redhat.com>
176
177 * server.c (gdbserver_usage): Reorganize and extend the usage
178 message.
179
180 2015-03-24 Pedro Alves <palves@redhat.com>
181
182 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
183 output. Also dump TRAP_TRACE.
184 (linux_low_filter_event): In debug output, distinguish a
185 resume_stop SIGSTOP from a delayed SIGSTOP.
186
187 2015-03-24 Gary Benson <gbenson@redhat.com>
188
189 * linux-x86-low.c (x86_linux_new_thread): Moved to
190 nat/x86-linux.c.
191 (x86_linux_prepare_to_resume): Likewise.
192
193 2015-03-24 Gary Benson <gbenson@redhat.com>
194
195 * Makefile.in (x86-linux-dregs.o): New rule.
196 * configure.srv: Add x86-linux-dregs.o to relevant targets.
197 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
198 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
199 (x86_linux_dr_get): Likewise.
200 (x86_linux_dr_set): Likewise.
201 (update_debug_registers_callback): Likewise.
202 (x86_linux_dr_set_addr): Likewise.
203 (x86_linux_dr_get_addr): Likewise.
204 (x86_linux_dr_set_control): Likewise.
205 (x86_linux_dr_get_control): Likewise.
206 (x86_linux_dr_get_status): Likewise.
207 (x86_linux_update_debug_registers): Likewise.
208
209 2015-03-24 Gary Benson <gbenson@redhat.com>
210
211 * linux-x86-low.c (x86_linux_update_debug_registers):
212 New function, factored out from...
213 (x86_linux_prepare_to_resume): ...this.
214
215 2015-03-24 Gary Benson <gbenson@redhat.com>
216
217 * linux-x86-low.c (x86_linux_dr_get): Update comments.
218 (x86_linux_dr_set): Likewise.
219 (update_debug_registers_callback): Likewise.
220 (x86_linux_dr_set_addr): Likewise.
221 (x86_linux_dr_get_addr): Likewise.
222 (x86_linux_dr_set_control): Likewise.
223 (x86_linux_dr_get_control): Likewise.
224 (x86_linux_dr_get_status): Likewise.
225 (x86_linux_prepare_to_resume): Likewise.
226
227 2015-03-24 Gary Benson <gbenson@redhat.com>
228
229 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
230 Use perror_with_name. Pass string through gettext.
231 (x86_linux_dr_set): Likewise.
232
233 2015-03-24 Gary Benson <gbenson@redhat.com>
234
235 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
236 (x86_linux_dr_set_addr): ...this.
237 (x86_dr_low_get_addr): Rename to...
238 (x86_linux_dr_get_addr): ...this.
239 (x86_dr_low_set_control): Rename to...
240 (x86_linux_dr_set_control): ...this.
241 (x86_dr_low_get_control): Rename to...
242 (x86_linux_dr_get_control): ...this.
243 (x86_dr_low_get_status): Rename to...
244 (x86_linux_dr_get_status): ...this.
245 (x86_dr_low): Update with new function names.
246
247 2015-03-24 Gary Benson <gbenson@redhat.com>
248
249 * Makefile.in (x86-linux.o): New rule.
250 * configure.srv: Add x86-linux.o to relevant targets.
251 * linux-low.c (lwp_set_arch_private_info): New function.
252 (lwp_arch_private_info): Likewise.
253 * linux-x86-low.c: Include nat/x86-linux.h.
254 (arch_lwp_info): Removed structure.
255 (update_debug_registers_callback):
256 Use lwp_set_debug_registers_changed.
257 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
258 and lwp_set_debug_registers_changed.
259 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
260
261 2015-03-24 Gary Benson <gbenson@redhat.com>
262
263 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
264 * linux-arm-low.c (arm_new_thread): Likewise.
265 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
266 * linux-mips-low.c (mips_linux_new_thread): Likewise.
267 * linux-x86-low.c (x86_linux_new_thread): Likewise.
268 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
269
270 2015-03-24 Gary Benson <gbenson@redhat.com>
271
272 * linux-low.c (ptid_of_lwp): New function.
273 (lwp_is_stopped): Likewise.
274 (lwp_stop_reason): Likewise.
275 * linux-x86-low.c (update_debug_registers_callback):
276 Use lwp_is_stopped.
277 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
278 lwp_stop_reason.
279
280 2015-03-24 Gary Benson <gbenson@redhat.com>
281
282 * linux-low.h (linux_stop_lwp): Remove declaration.
283
284 2015-03-24 Gary Benson <gbenson@redhat.com>
285
286 * linux-low.h: Include nat/linux-nat.h.
287 * linux-low.c (iterate_over_lwps_args): New structure.
288 (iterate_over_lwps_filter): New function.
289 (iterate_over_lwps): Likewise.
290 * linux-x86-low.c (update_debug_registers_callback):
291 Update signature to what iterate_over_lwps expects.
292 Remove PID check that iterate_over_lwps now performs.
293 (x86_dr_low_set_addr): Use iterate_over_lwps.
294 (x86_dr_low_set_control): Likewise.
295
296 2015-03-24 Gary Benson <gbenson@redhat.com>
297
298 * linux-x86-low.c (x86_debug_reg_state): New function.
299 (x86_linux_prepare_to_resume): Use the above.
300
301 2015-03-24 Gary Benson <gbenson@redhat.com>
302
303 * linux-low.c (current_lwp_ptid): New function.
304 * linux-x86-low.c: Include nat/linux-nat.h.
305 (x86_dr_low_get_addr): Use current_lwp_ptid.
306 (x86_dr_low_get_control): Likewise.
307 (x86_dr_low_get_status): Likewise.
308
309 2015-03-20 Pedro Alves <palves@redhat.com>
310
311 * tracepoint.c (cmd_qtstatus): Make "str" const.
312
313 2015-03-20 Pedro Alves <palves@redhat.com>
314
315 * server.c (handle_general_set): Make "req_str" const.
316
317 2015-03-19 Pedro Alves <palves@redhat.com>
318
319 * linux-low.c (linux_resume_one_lwp): Rename to ...
320 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
321 instead call perror_with_name.
322 (check_ptrace_stopped_lwp_gone): New function.
323 (linux_resume_one_lwp): Reimplement as wrapper around
324 linux_resume_one_lwp_throw that swallows errors if the LWP is
325 gone.
326
327 2015-03-19 Pedro Alves <palves@redhat.com>
328
329 * linux-low.c (count_events_callback, select_event_lwp_callback):
330 No longer check whether the thread has resume_stop as last resume
331 kind.
332
333 2015-03-19 Pedro Alves <palves@redhat.com>
334
335 * linux-low.c (count_events_callback, select_event_lwp_callback):
336 Use the lwp's status_pending_p field, not the thread's.
337
338 2015-03-19 Pedro Alves <palves@redhat.com>
339
340 * linux-low.c (select_event_lwp_callback): Update comments to
341 no longer mention SIGTRAP.
342
343 2015-03-18 Gary Benson <gbenson@redhat.com>
344
345 * server.c (handle_query): Do not report vFile:fstat as supported.
346
347 2015-03-11 Gary Benson <gbenson@redhat.com>
348
349 * hostio.c (sys/types.h): New include.
350 (sys/stat.h): Likewise.
351 (common-remote-fileio.h): Likewise.
352 (handle_fstat): New function.
353 (handle_vFile): Handle vFile:fstat packets.
354
355 2015-03-11 Gary Benson <gbenson@redhat.com>
356
357 * configure.ac (AC_CHECK_MEMBERS): Add checks for
358 struct stat.st_blocks and struct stat.st_blksize.
359 * configure: Regenerate.
360 * config.in: Likewise.
361 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
362 (OBS): Add common-remote-fileio.o.
363 (common-remote-fileio.o): New rule.
364
365 2015-03-09 Pedro Alves <palves@redhat.com>
366
367 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
368 'struct sockaddr' pointer in 'accept' call.
369
370 2015-03-09 Pedro Alves <palves@redhat.com>
371
372 Revert:
373 2015-03-07 Pedro Alves <palves@redhat.com>
374 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
375 or <winsock2.h> here. Instead include "gdb_socket.h".
376 (remote_open): Use union gdb_sockaddr_u.
377 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
378 or <winsock2.h> here. Instead include "gdb_socket.h".
379 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
380 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
381 or <sys/un.h>.
382 (init_named_socket, gdb_agent_helper_thread): Use union
383 gdb_sockaddr_u.
384
385 2015-03-07 Pedro Alves <palves@redhat.com>
386
387 * configure.ac (build_warnings): Move
388 -Wdeclaration-after-statement to the C-specific set.
389 * configure: Regenerate.
390
391 2015-03-07 Pedro Alves <palves@redhat.com>
392
393 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
394 or <winsock2.h> here. Instead include "gdb_socket.h".
395 (remote_open): Use union gdb_sockaddr_u.
396 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
397 or <winsock2.h> here. Instead include "gdb_socket.h".
398 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
399 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
400 or <sys/un.h>.
401 (init_named_socket, gdb_agent_helper_thread): Use union
402 gdb_sockaddr_u.
403
404 2015-03-07 Pedro Alves <palves@redhat.com>
405
406 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
407 instead.
408
409 2015-03-06 Yao Qi <yao.qi@linaro.org>
410
411 * linux-aarch64-low.c (aarch64_insert_point): Use
412 show_debug_regs as a boolean.
413 (aarch64_remove_point): Likewise.
414
415 2015-03-05 Pedro Alves <palves@redhat.com>
416
417 * lynx-low.c (lynx_target_ops): Install NULL hooks for
418 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
419 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
420 * nto-low.c (nto_target_ops): Likewise.
421 * spu-low.c (spu_target_ops): Likewise.
422 * win32-low.c (win32_target_ops): Likewise.
423
424 2015-03-04 Pedro Alves <palves@redhat.com>
425
426 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
427 Decide whether a breakpoint triggered based on the SIGTRAP's
428 siginfo.si_code.
429 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
430 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
431 (linux_low_filter_event): Check for breakpoints before checking
432 watchpoints.
433 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
434 siginfo.si_code.
435 (linux_stopped_by_sw_breakpoint)
436 (linux_supports_stopped_by_sw_breakpoint)
437 (linux_stopped_by_hw_breakpoint)
438 (linux_supports_stopped_by_hw_breakpoint): New functions.
439 (linux_target_ops): Install new target methods.
440
441 2015-03-04 Pedro Alves <palves@redhat.com>
442
443 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
444 * server.c (swbreak_feature, hwbreak_feature): New globals.
445 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
446 (captured_main): Clear swbreak_feature and hwbreak_feature.
447 * server.h (swbreak_feature, hwbreak_feature): Declare.
448 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
449 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
450 supports_stopped_by_hw_breakpoint>: New fields.
451 (target_supports_stopped_by_sw_breakpoint)
452 (target_stopped_by_sw_breakpoint)
453 (target_supports_stopped_by_hw_breakpoint)
454 (target_stopped_by_hw_breakpoint): Declare.
455
456 2015-03-04 Pedro Alves <palves@redhat.com>
457
458 enum lwp_stop_reason -> enum target_stop_reason
459 * linux-low.c (check_stopped_by_breakpoint): Adjust.
460 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
461 (linux_wait_1, stuck_in_jump_pad_callback)
462 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
463 (linux_stopped_by_watchpoint):
464 * linux-low.h (enum lwp_stop_reason): Delete.
465 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
466 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
467
468 2015-03-04 Yao Qi <yao.qi@linaro.org>
469
470 * Makefile.in (SFILES): Add linux-aarch64-low.c.
471
472 2015-03-03 Gary Benson <gbenson@redhat.com>
473
474 * hostio.c (handle_vFile): Fix prefix lengths.
475
476 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
477
478 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
479 ptr_bits.
480
481 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
482
483 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
484 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
485 (clean): Add "rm -f" for above C files.
486 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
487 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
488 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
489 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
490 * linux-s390-low.c (HWCAP_S390_VX): New macro.
491 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
492 (init_registers_s390x_vx_linux64)
493 (init_registers_s390x_tevx_linux64)
494 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
495 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
496 declarations.
497 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
498 (s390_store_vxrs_high): New functions.
499 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
500 NT_S390_VXRS_HIGH.
501 (s390_arch_setup): Add logic for selecting one of the new target
502 descriptions. Activate the new vector regsets if applicable.
503 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
504 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
505 and init_registers_s390x_tevx_linux64.
506
507 2015-03-01 Pedro Alves <palves@redhat.com>
508
509 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
510 parameter.
511
512 2015-02-27 Pedro Alves <palves@redhat.com>
513
514 * linux-x86-low.c (u_debugreg_offset): New function.
515 (x86_linux_dr_get, x86_linux_dr_set): Use it.
516
517 2015-02-27 Pedro Alves <palves@redhat.com>
518
519 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
520 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
521 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
522 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
523 (ps_lsetfpregs, ps_getpid)
524 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
525 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
526 (ps_lsetxregs, ps_plog): Declare.
527
528 2015-02-27 Pedro Alves <palves@redhat.com>
529
530 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
531 IP_AGENT_EXPORT_FUNC.
532 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
533 IP_AGENT_EXPORT_FUNC.
534 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
535 (IP_AGENT_EXPORT): Delete.
536 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
537 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
538 (gdb_trampoline_buffer_error, collecting, gdb_collect)
539 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
540 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
541 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
542 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
543 (traceframe_read_count, traceframe_write_count)
544 (traceframes_created, trace_state_variables, get_raw_reg)
545 (get_trace_state_variable_value, set_trace_state_variable_value)
546 (ust_loaded, helper_thread_id, cmd_buf): Use
547 IPA_SYM_EXPORTED_NAME.
548 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
549 (tracepoints) Use IP_AGENT_EXPORT_VAR.
550 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
551 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
552 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
553 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
554 EXTERN_C_PUSH/EXTERN_C_POP.
555 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
556 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
557 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
558 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
559 (traceframe_write_count, traceframe_read_count)
560 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
561 (about_to_request_buffer_space, get_trace_state_variable_value)
562 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
563 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
564 EXTERN_C_PUSH/EXTERN_C_POP.
565 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
566 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
567 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
568 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
569 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
570 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
571 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
572 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
573 Define.
574 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
575 (IP_AGENT_EXPORT_VAR_DECL): Define.
576 (tracing): Declare.
577 (gdb_agent_get_raw_reg): Declare.
578
579 2015-02-27 Tom Tromey <tromey@redhat.com>
580 Pedro Alves <palves@redhat.com>
581
582 Rename symbols whose names are reserved C++ keywords throughout.
583
584 2015-02-27 Pedro Alves <palves@redhat.com>
585
586 * Makefile.in (COMPILER): New, get it from autoconf.
587 (CXX): Get from autoconf instead.
588 (COMPILE.pre): Use COMPILER.
589 (CC-LD): Rename to ...
590 (CC_LD): ... this. Use COMPILER.
591 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
592 (CXX_FOR_TARGET): Default to g++ instead of gcc.
593 * acinclude.m4: Include build-with-cxx.m4.
594 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
595 Disable -Werror by default if building in C++ mode.
596 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
597 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
598 the C++ compiler. Save/restore CXXFLAGS too.
599 * configure: Regenerate.
600
601 2015-02-27 Pedro Alves <palves@redhat.com>
602
603 * acinclude.m4: Include libiberty.m4.
604 * configure.ac: Call libiberty_INIT.
605 * config.in, configure: Regenerate.
606
607 2015-02-26 Pedro Alves <palves@redhat.com>
608
609 * linux-low.c (linux_wait_1): When incrementing the PC past a
610 program breakpoint always use the_low_target.breakpoint_len as
611 increment, rather than the maximum between that and
612 the_low_target.decr_pc_after_break.
613
614 2015-02-23 Pedro Alves <palves@redhat.com>
615
616 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
617 thread was doing a step-over; always adjust the PC if
618 we stepped over a permanent breakpoint.
619 (linux_wait_1): If we stepped over breakpoint that was on top of a
620 permanent breakpoint, manually advance the PC past it.
621
622 2015-02-23 Pedro Alves <palves@redhat.com>
623
624 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
625 modes.
626 (x86_fill_gregset, x86_store_gregset): Use it when handling
627 $orig_eax.
628
629 2015-02-20 Pedro Alves <palves@redhat.com>
630
631 * thread-db.c: Include "nat/linux-procfs.h".
632 (thread_db_init): Skip listing new threads if the kernel supports
633 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
634
635 2015-02-20 Pedro Alves <palves@redhat.com>
636
637 * linux-low.c (status_pending_p_callback): Use ptid_match.
638
639 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
640
641 PR breakpoints/16812
642 * linux-low.c (wstatus_maybe_breakpoint): Remove.
643 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
644 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
645
646 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
647
648 PR breakpoints/15956
649 * tracepoint.c (cmd_qtinit): Add check for current_thread.
650
651 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
652
653 * linux-low.c (linux_low_btrace_conf): Print size.
654 * server.c (handle_btrace_conf_general_set): New.
655 (hanle_general_set): Call handle_btrace_conf_general_set.
656 (handle_query): Report Qbtrace-conf:bts:size as supported.
657
658 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
659
660 * linux-low.c (linux_low_enable_btrace): Update parameters.
661 (linux_low_btrace_conf): New.
662 (linux_target_ops)<to_btrace_conf>: Initialize.
663 * server.c (current_btrace_conf): New.
664 (handle_btrace_enable): Rename to ...
665 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
666 to target_enable_btrace. Update comment. Update users.
667 (handle_qxfer_btrace_conf): New.
668 (qxfer_packets): Add btrace-conf entry.
669 (handle_query): Report qXfer:btrace-conf:read as supported packet.
670 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
671 (target_ops)<read_btrace_conf>: New.
672 (target_enable_btrace): Update parameters.
673 (target_read_btrace_conf): New.
674
675 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
676
677 * server.c (handle_btrace_general_set): Remove call to
678 target_supports_btrace.
679 (supported_btrace_packets): New.
680 (handle_query): Call supported_btrace_packets.
681 * target.h: include btrace-common.h.
682 (btrace_target_info): Removed.
683 (supports_btrace, target_supports_btrace): Update parameters.
684
685 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
686
687 * Makefile.in (SFILES): Add common/btrace-common.c.
688 (OBS): Add common/btrace-common.o.
689 (btrace-common.o): Add build rules.
690 * linux-low: Include btrace-common.h.
691 (linux_low_read_btrace): Use struct btrace_data. Call
692 btrace_data_init and btrace_data_fini.
693
694 2015-02-06 Pedro Alves <palves@redhat.com>
695
696 * thread-db.c (find_new_threads_callback): Add debug output.
697
698 2015-02-04 Pedro Alves <palves@redhat.com>
699
700 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
701 (resume_stopped_resumed_lwps): New function.
702 (linux_wait_for_event_filtered): Use it.
703
704 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
705
706 * Makefile.in (SFILES): Add linux-personality.c.
707 (linux-personality.o): New rule.
708 * configure.srv (srv_linux_obj): Add linux-personality.o to the
709 list of objects to be built.
710 * linux-low.c: Include nat/linux-personality.h.
711 (linux_create_inferior): Remove code to disable address space
712 randomization (moved to ../nat/linux-personality.c). Create
713 cleanup to disable address space randomization.
714
715 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
716
717 * Makefile.in (posix-strerror.o): New rule.
718 (mingw-strerror.o): Likewise.
719 * configure: Regenerated.
720 * configure.ac: Source file ../common/common.host. Initialize new
721 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
722
723 2015-01-14 Yao Qi <yao@codesourcery.com>
724
725 * Makefile.in (SFILES): Add nat/ppc-linux.c.
726 (ppc-linux.o): New rule.
727 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
728 * configure.ac: AC_CHECK_FUNCS(getauxval).
729 * config.in: Re-generated.
730 * configure: Re-generated.
731 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
732 ppc64_64bit_inferior_p
733
734 2015-01-14 Yao Qi <yao@codesourcery.com>
735
736 * linux-ppc-low.c: Include "nat/ppc-linux.h".
737 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
738 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
739 (PT_ORIG_R3, PT_TRAP): Likewise.
740 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
741 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
742 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
743
744 2015-01-10 Joel Brobecker <brobecker@adacore.com>
745
746 * i387-fp.c (i387_cache_to_xsave): In look over
747 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
748 zmmh_low_space field by use of zmmh_high_space.
749
750 2015-01-09 Pedro Alves <palves@redhat.com>
751
752 * linux-low.c (step_over_bkpt): Move higher up in the file.
753 (handle_extended_wait): Don't store the stop_pc here.
754 (get_stop_pc): Adjust comments and rename to ...
755 (check_stopped_by_breakpoint): ... this. Record whether the LWP
756 stopped for a software breakpoint or hardware breakpoint.
757 (thread_still_has_status_pending_p): New function.
758 (status_pending_p_callback): Use
759 thread_still_has_status_pending_p. If the event is no longer
760 interesting, resume the LWP.
761 (handle_tracepoints): Add assert.
762 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
763 (wstatus_maybe_breakpoint): New function.
764 (cancel_breakpoint): Delete function.
765 (check_stopped_by_watchpoint): New function, factored out from
766 linux_low_filter_event.
767 (lp_status_maybe_breakpoint): Delete function.
768 (linux_low_filter_event): Remove filter_ptid argument.
769 Leave thread group exits pending here. Store the LWP's stop PC.
770 Always leave events pending.
771 (linux_wait_for_event_filtered): Pull all events out of the
772 kernel, and leave them all pending.
773 (count_events_callback, select_event_lwp_callback): Consider all
774 events.
775 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
776 (select_event_lwp): Only give preference to the stepping LWP in
777 all-stop mode. Adjust comments.
778 (ignore_event): New function.
779 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
780 references to cancel_breakpoints. Adjust to renames. Also give
781 equal priority to all LWPs that have had events in non-stop mode.
782 If reporting a software breakpoint event, unadjust the LWP's PC.
783 (linux_wait): If linux_wait_1 returned an ignored event, retry.
784 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
785 Adjust.
786 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
787 (resume_status_pending_p): Use thread_still_has_status_pending_p.
788 (linux_stopped_by_watchpoint): Adjust.
789 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
790 * linux-low.h (enum lwp_stop_reason): New.
791 (struct lwp_info) <stop_pc>: Adjust comment.
792 <stopped_by_watchpoint>: Delete field.
793 <stop_reason>: New field.
794 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
795 * mem-break.c (software_breakpoint_inserted_here)
796 (hardware_breakpoint_inserted_here): New function.
797 * mem-break.h (software_breakpoint_inserted_here)
798 (hardware_breakpoint_inserted_here): Declare.
799 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
800 (cancel_breakpoints): Delete.
801 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
802 (upload_fast_traceframes): Remove references to
803 cancel_breakpoints.
804
805 2015-01-09 Pedro Alves <palves@redhat.com>
806
807 * thread-db.c (find_new_threads_callback): Ignore thread if the
808 kernel thread ID is -1.
809
810 2015-01-09 Pedro Alves <palves@redhat.com>
811
812 * linux-low.c (linux_attach_fail_reason_string): Move to
813 nat/linux-ptrace.c, and rename.
814 (linux_attach_lwp): Update comment.
815 (attach_proc_task_lwp_callback): New function.
816 (linux_attach): Adjust to rename and use
817 linux_proc_attach_tgid_threads.
818 (linux_attach_fail_reason_string): Delete declaration.
819
820 2015-01-01 Joel Brobecker <brobecker@adacore.com>
821
822 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
823 * server.c (gdbserver_version): Likewise.
824
825 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
826
827 * remote-utils.c: Include ctype.h.
828 (input_interrupt): Explicitly handle the case when the char
829 received is the NUL byte. Improve the printing of non-ASCII
830 characters.
831
832 2014-12-16 Joel Brobecker <brobecker@adacore.com>
833
834 * linux-low.c (linux_low_filter_event): Update call to
835 linux_enable_event_reporting following the addition of
836 a new parameter to that function.
837
838 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
839
840 PR server/17457
841 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
842 (AARCH64_FPCR_REGNO): Likewise.
843 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
844 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
845 (aarch64_store_fpregset): Likewise.
846
847 2014-12-15 Joel Brobecker <brobecker@adacore.com>
848
849 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
850 Remove FIXME comment about assumption about N.
851
852 2014-12-13 Joel Brobecker <brobecker@adacore.com>
853
854 * configure.ac: If large-file support is disabled in GDBserver,
855 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
856 * configure: Regenerate.
857
858 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
859
860 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
861 warning upon ENODATA from ptrace.
862 * linux-s390-low.c (s390_store_tdb): New.
863 (s390_regsets): Add regset for NT_S390_TDB.
864
865 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
866
867 * linux-low.c (regsets_store_inferior_registers): Skip regsets
868 without a fill_function.
869 * linux-s390-low.c (s390_fill_last_break): Remove.
870 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
871 (s390_arch_setup): Use regset's size instead of fill_function for
872 loop end condition.
873
874 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
875
876 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
877 the regset's store function when ptrace returned an error.
878 * regcache.c (get_thread_regcache): Invalidate register cache
879 before fetching inferior's registers.
880
881 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
882
883 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
884 while-loop as for-loop.
885 (regsets_store_inferior_registers): Likewise.
886
887 2014-11-28 Yao Qi <yao@codesourcery.com>
888
889 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
890 * config.in, configure: Re-generate.
891 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
892 is defined.
893
894 2014-11-21 Yao Qi <yao@codesourcery.com>
895
896 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
897 (AC_CHECK_HEADERS): Remove malloc.h.
898 * configure: Re-generated.
899 * config.in: Re-generated.
900 * server.h: Don't include alloca.h and malloc.h.
901 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
902 Don't include malloc.h.
903
904 2014-11-17 Joel Brobecker <brobecker@adacore.com>
905
906 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
907 corresponding ERRNO check in same block.
908
909 2014-11-12 Pedro Alves <palves@redhat.com>
910
911 * server.c (cont_thread): Update comment.
912 (start_inferior, attach_inferior): No longer clear cont_thread.
913 (handle_v_cont): No longer set cont_thread.
914 (captured_main): Clear cont_thread each time a GDB connects.
915
916 2014-11-12 Pedro Alves <palves@redhat.com>
917
918 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
919 thread, and don't resume all threads if the Hc thread has exited.
920
921 2014-11-12 Pedro Alves <palves@redhat.com>
922
923 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
924 the process group instead of to a specific LWP.
925
926 2014-10-15 Pedro Alves <palves@redhat.com>
927
928 PR server/17487
929 * win32-arm-low.c (arm_set_thread_context): Remove current_event
930 parameter.
931 (arm_set_thread_context): Delete.
932 (the_low_target): Adjust.
933 * win32-i386-low.c (debug_registers_changed)
934 (debug_registers_used): Delete.
935 (update_debug_registers_callback): New function.
936 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
937 needing to update their debug registers.
938 (win32_get_current_dr): New function.
939 (x86_dr_low_get_addr, x86_dr_low_get_control)
940 (x86_dr_low_get_status): Fetch the debug register from the thread
941 record's context.
942 (i386_initial_stuff): Adjust.
943 (i386_get_thread_context): Remove current_event parameter. Don't
944 clear debug_registers_changed nor copy DR values to
945 debug_reg_state.
946 (i386_set_thread_context): Delete.
947 (i386_prepare_to_resume): New function.
948 (i386_thread_added): Mark the thread as needing to update irs
949 debug registers.
950 (the_low_target): Remove i386_set_thread_context and install
951 i386_prepare_to_resume.
952 * win32-low.c (win32_get_thread_context): Adjust.
953 (win32_set_thread_context): Use SetThreadContext
954 directly.
955 (win32_prepare_to_resume): New function.
956 (win32_require_context): New function, factored out from ...
957 (thread_rec): ... this.
958 (continue_one_thread): Call win32_prepare_to_resume on each thread
959 we're about to continue.
960 (win32_resume): Call win32_prepare_to_resume on the event thread.
961 * win32-low.h (struct win32_thread_info)
962 <debug_registers_changed>: New field.
963 (struct win32_target_ops): Change prototype of set_thread_context,
964 delete set_thread_context and add prepare_to_resume.
965 (win32_require_context): New declaration.
966
967 2014-10-08 Gary Benson <gbenson@redhat.com>
968
969 * server.h: Do not include common-exceptions.h.
970
971 2014-10-08 Gary Benson <gbenson@redhat.com>
972
973 * server.h: Do not include cleanups.h.
974
975 2014-09-30 James Hogan <james.hogan@imgtec.com>
976
977 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
978 mips64-dsp-linux.c.
979
980 2014-09-23 Yao Qi <yao@codesourcery.com>
981
982 * linux-low.c (lp_status_maybe_breakpoint): New function.
983 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
984 (count_events_callback): Likewise.
985 (select_event_lwp_callback): Likewise.
986 (cancel_breakpoints_callback): Likewise.
987
988 2014-09-19 Don Breazeal <donb@codesourcery.com>
989
990 * linux-low.c (handle_extended_wait): Call
991 linux_ptrace_get_extended_event.
992 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
993 linux_is_extended_waitstatus.
994
995 2014-09-16 Joel Brobecker <brobecker@adacore.com>
996
997 * Makefile.in (CPPFLAGS): Define.
998 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
999 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1000
1001 2014-09-16 Gary Benson <gbenson@redhat.com>
1002
1003 * inferiors.h (current_inferior): Renamed as...
1004 (current_thread): New variable. All uses updated.
1005 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1006 (maybe_move_out_of_jump_pad): Likewise.
1007 (cancel_breakpoint): Likewise.
1008 (linux_low_filter_event): Likewise.
1009 (wait_for_sigstop): Likewise.
1010 (linux_resume_one_lwp): Likewise.
1011 (need_step_over_p): Likewise.
1012 (start_step_over): Likewise.
1013 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1014 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1015 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1016 and save_inferior as saved_thread.
1017 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1018 saved_thread.
1019 (regcache_invalidate_thread): Likewise.
1020 * remote-utils.c (prepare_resume_reply): Likewise.
1021 * thread-db.c (thread_db_get_tls_address): Likewise.
1022 (disable_thread_event_reporting): Likewise.
1023 (remove_thread_event_breakpoints): Likewise.
1024 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1025 as saved_thread.
1026 * target.h (set_desired_inferior): Renamed as...
1027 (set_desired_thread): New declaration. All uses updated.
1028 * server.c (myresume): Updated comment to reference thread instead
1029 of inferior.
1030 (handle_serial_event): Likewise.
1031 (handle_target_event): Likewise.
1032
1033 2014-09-12 Tom Tromey <tromey@redhat.com>
1034 Gary Benson <gbenson@redhat.com>
1035
1036 * regcache.h: Include common-regcache.h.
1037 (regcache_read_pc): Don't declare.
1038 * regcache.c (get_thread_regcache_for_ptid): New function.
1039
1040 2014-09-11 Tom Tromey <tromey@redhat.com>
1041 Gary Benson <gbenson@redhat.com>
1042
1043 * symbol.c: New file.
1044 * Makefile.in (SFILES): Add symbol.c.
1045 (OBS): Add symbol.o.
1046
1047 2014-09-11 Gary Benson <gbenson@redhat.com>
1048
1049 * target.c (target_stop_ptid, target_continue_ptid): New
1050 functions.
1051
1052 2014-09-11 Tom Tromey <tromey@redhat.com>
1053 Gary Benson <gbenson@redhat.com>
1054
1055 * target.h: Include target/target.h.
1056 * target.c (target_read_memory, target_read_uint32)
1057 (target_write_memory): New functions.
1058
1059 2014-09-11 Gary Benson <gbenson@redhat.com>
1060
1061 * server.h (debug_hw_points): Don't declare.
1062 * server.c (debug_hw_points): Don't define. Replace all uses
1063 with show_debug_regs.
1064 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1065 all uses with show_debug_regs.
1066
1067 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1068
1069 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1070 endianness into account.
1071 (ppc_supply_ptrace_register): Likewise.
1072
1073 2014-09-03 James Hogan <james.hogan@imgtec.com>
1074
1075 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1076 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1077
1078 2014-09-03 Gary Benson <gbenson@redhat.com>
1079
1080 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1081 ALL_DEBUG_ADDRESS_REGISTERS.
1082
1083 2014-09-02 Gary Benson <gbenson@redhat.com>
1084
1085 * i386-low.h: Renamed as...
1086 * x86-low.h: New file. All type, function and variable name
1087 prefixes changed from "i386_" to "x86_". All references updated.
1088 * i386-low.c: Renamed as...
1089 * x86-low.c: New file. All type, function and variable name
1090 prefixes changed from "i386_" to "x86_". All references updated.
1091
1092 2014-09-02 Gary Benson <gbenson@redhat.com>
1093
1094 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1095 (x86_linux_new_thread): Likewise.
1096
1097 2014-08-29 Gary Benson <gbenson@redhat.com>
1098
1099 * server.h (setjmp.h): Do not include.
1100 (toplevel): Do not declare.
1101 (common-exceptions.h): Include.
1102 (cleanups.h): Likewise.
1103 * server.c (toplevel): Do not define.
1104 (exit_code): New static global.
1105 (detach_or_kill_for_exit_cleanup): New function.
1106 (main): New function. Original main renamed to...
1107 (captured_main): New function.
1108 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1109
1110 2014-08-29 Gary Benson <gbenson@redhat.com>
1111
1112 * Makefile.in (SFILES): Add common/common-exceptions.c.
1113 (OBS): Add common-exceptions.o.
1114 (common-exceptions.o): New rule.
1115 * utils.c (prepare_to_throw_exception): New function.
1116
1117 2014-08-29 Gary Benson <gbenson@redhat.com>
1118
1119 * config.in: Regenerate.
1120 * configure: Likewise.
1121
1122 2014-08-29 Gary Benson <gbenson@redhat.com>
1123
1124 * Makefile.in (SFILES): Add common/cleanups.c.
1125 (OBS): cleanups.o.
1126 (cleanups.o): New rule.
1127
1128 2014-08-29 Gary Benson <gbenson@redhat.com>
1129
1130 * utils.c (internal_vwarning): New function.
1131
1132 2014-08-28 Gary Benson <gbenson@redhat.com>
1133
1134 * utils.h (fatal): Remove declaration.
1135 * utils.c (fatal): Remove function.
1136
1137 2014-08-28 Gary Benson <gbenson@redhat.com>
1138
1139 * tracepoint.c (gdb_agent_init): Replace fatal with
1140 perror_with_name.
1141 (initialize_tracepoint): Likewise.
1142
1143 2014-08-28 Gary Benson <gbenson@redhat.com>
1144
1145 * remote-utils.c (remote_prepare): Replace fatal with error.
1146
1147 2014-08-28 Gary Benson <gbenson@redhat.com>
1148
1149 * linux-low.c (linux_async): Replace fatal with warning.
1150 Tidy up and return.
1151 (linux_start_non_stop): Return -1 if linux_async failed.
1152
1153 2014-08-28 Gary Benson <gbenson@redhat.com>
1154
1155 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1156 gdb_assert.
1157 (i386_dr_low_get_addr): Remove vague comment.
1158 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1159 gdb_assert.
1160
1161 2014-08-28 Gary Benson <gbenson@redhat.com>
1162
1163 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1164 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1165 internal_error.
1166 (linux_resume_one_lwp): Likewise.
1167 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1168 gdb_assert.
1169 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1170 with internal_error.
1171 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1172 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1173 (find_register_by_name): Replace fatal with internal_error.
1174 (find_regno): Likewise.
1175 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1176 * thread-db.c (thread_db_create_event): Likewise.
1177 (thread_db_load_search): Likewise.
1178 (try_thread_db_load_1): Likewise.
1179 * tracepoint.c (get_jump_space_head): Replace fatal with
1180 internal_error.
1181 (claim_trampoline_space): Likewise.
1182 (have_fast_tracepoint_trampoline_buffer): Likewise.
1183 (cmd_qtstart): Likewise.
1184 (stop_tracing): Likewise.
1185 (fast_tracepoint_collecting): Likewise.
1186 (target_malloc): Likewise.
1187 (download_tracepoint): Likewise.
1188 (download_trace_state_variables): Replace check with gdb_assert.
1189 (upload_fast_traceframes): Replace fatal with internal_error.
1190
1191 2014-08-19 Tom Tromey <tromey@redhat.com>
1192 Gary Benson <gbenson@redhat.com>
1193
1194 * Makefile.in (SFILES): Add common/common-debug.c.
1195 (OBS): Add common-debug.o.
1196 (common-debug.o): New rule.
1197 * debug.h (debug_printf): Don't declare.
1198 * debug.c (debug_printf): Renamed and rewritten as...
1199 (debug_vprintf): New function.
1200
1201 2014-08-19 Gary Benson <gbenson@redhat.com>
1202
1203 * utils.h: Do not include print-utils.h.
1204
1205 2014-08-19 Tom Tromey <tromey@redhat.com>
1206 Gary Benson <gbenson@redhat.com>
1207
1208 * server.h: Add static assertion.
1209 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1210
1211 2014-08-19 Tom Tromey <tromey@redhat.com>
1212 Gary Benson <gbenson@redhat.com>
1213
1214 * Makefile.in (SFILES): Add common/errors.c.
1215 (OBS): Add errors.o.
1216 (IPA_OBS): Add errors-ipa.o.
1217 (errors.o): New rule.
1218 (errors-ipa.o): Likewise.
1219 * utils.h (perror_with_name, error, warning): Don't declare.
1220 * utils.c (warning): Renamed and rewritten as...
1221 (vwarning): New function.
1222 (error): Renamed and rewritten as...
1223 (verror): New function.
1224 (internal_error): Renamed and rewritten as...
1225 (internal_verror): New function.
1226
1227 2014-08-07 Gary Benson <gbenson@redhat.com>
1228
1229 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1230 * configure: Regenerate.
1231 * config.in: Likewise.
1232 * server.h: Do not include errno.h.
1233 * event-loop.c: Likewise.
1234 * hostio-errno.c: Likewise.
1235 * linux-low.c: Likewise.
1236 * remote-utils.c: Likewise.
1237 * spu-low.c: Likewise.
1238 * utils.c: Likewise.
1239 * gdbreplay.c: Unconditionally include errno.h.
1240
1241 2014-08-07 Gary Benson <gbenson@redhat.com>
1242
1243 * server.h: Do not include string.h.
1244 * event-loop.c: Likewise.
1245 * linux-low.c: Likewise.
1246 * regcache.c: Likewise.
1247 * remote-utils.c: Likewise.
1248 * spu-low.c: Likewise.
1249 * utils.c: Likewise.
1250
1251 2014-08-07 Gary Benson <gbenson@redhat.com>
1252
1253 * server.h: Do not include gdb_assert.h.
1254
1255 2014-08-07 Gary Benson <gbenson@redhat.com>
1256
1257 * server.h: Do not include common-utils.h.
1258
1259 2014-08-07 Gary Benson <gbenson@redhat.com>
1260
1261 * server.h: Do not include ptid.h.
1262 * notif.h: Likewise.
1263
1264 2014-08-07 Gary Benson <gbenson@redhat.com>
1265
1266 * server.h: Do not include gdb_locale.h.
1267
1268 2014-08-07 Gary Benson <gbenson@redhat.com>
1269
1270 * server.h: Do not include gdb/signals.h.
1271 * win32-low.c: Likewise.
1272
1273 2014-08-07 Gary Benson <gbenson@redhat.com>
1274
1275 * server.h: Do not include pathmax.h.
1276
1277 2014-08-07 Gary Benson <gbenson@redhat.com>
1278
1279 * server.h: Do not include libiberty.h.
1280 * linux-bfin-low.c: Likewise.
1281
1282 2014-08-07 Gary Benson <gbenson@redhat.com>
1283
1284 * server.h: Do not include ansidecl.h.
1285
1286 2014-08-07 Gary Benson <gbenson@redhat.com>
1287
1288 * linux-x86-low.c: Do not include stddef.h.
1289 * lynx-ppc-low.c: Likewise.
1290 * tracepoint.c: Likewise.
1291
1292 2014-08-07 Gary Benson <gbenson@redhat.com>
1293
1294 * server.h: Do not include stdarg.h.
1295 * nto-low.c: Likewise.
1296
1297 2014-08-07 Gary Benson <gbenson@redhat.com>
1298
1299 * server.h: Do not include stdlib.h.
1300 * inferiors.c: Likewise.
1301 * linux-low.c: Likewise.
1302 * regcache.c: Likewise.
1303 * spu-low.c: Likewise.
1304 * tracepoint.c: Likewise.
1305 * utils.c: Likewise.
1306
1307 2014-08-07 Gary Benson <gbenson@redhat.com>
1308
1309 * server.h: Do not include stdio.h.
1310 * linux-low.c: Likewise.
1311 * remote-utils.c: Likewise.
1312 * spu-low.c: Likewise.
1313 * utils.c: Likewise.
1314 * wincecompat.c: Likewise.
1315
1316 2014-08-06 Gary Benson <gbenson@redhat.com>
1317
1318 * regcache.c (init_register_cache): Move conditionals inside if.
1319
1320 2014-08-06 Gary Benson <gbenson@redhat.com>
1321
1322 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1323
1324 2014-07-31 Gary Benson <gbenson@redhat.com>
1325
1326 * ax.h: Do not include server.h.
1327 * gdbthread.h: Likewise.
1328 * lynx-low.h: Likewise.
1329 * notif.h: Likewise.
1330
1331 2014-07-30 Gary Benson <gbenson@redhat.com>
1332
1333 * server.h: Include common-defs.h.
1334 Do not include config.h or build-gnulib-gdbserver/config.h.
1335
1336 2014-07-30 Gary Benson <gbenson@redhat.com>
1337
1338 * hostio-errno.c: Move server.h to top of includes list.
1339 * inferiors.c: Likewise.
1340 * linux-x86-low.c: Likewise.
1341 * notif.c: Include server.h.
1342
1343 2014-07-24 Tom Tromey <tromey@redhat.com>
1344 Gary Benson <gbenson@redhat.com>
1345
1346 * server.h (CORE_ADDR): Now unsigned.
1347
1348 2014-07-16 Pedro Alves <palves@redhat.com>
1349
1350 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1351
1352 2014-07-15 Pedro Alves <palves@redhat.com>
1353
1354 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1355 copy.
1356
1357 2014-07-11 Pedro Alves <palves@redhat.com>
1358
1359 * linux-low.c (kill_wait_lwp): New function, based on
1360 kill_one_lwp_callback, but use my_waitpid directly.
1361 (kill_one_lwp_callback, linux_kill): Use it.
1362
1363 2014-06-23 Pedro Alves <palves@redhat.com>
1364
1365 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1366 before setting DR0..DR3.
1367
1368 2014-06-20 Gary Benson <gbenson@redhat.com>
1369
1370 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1371 * configure: Regenerated.
1372 * config.in: Likewise.
1373
1374 2014-06-20 Gary Benson <gbenson@redhat.com>
1375
1376 * Makefile.in (SFILES): Update locations for files moved
1377 from common to nat.
1378 (object file files): Reordered.
1379
1380 2014-06-20 Gary Benson <gbenson@redhat.com>
1381
1382 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1383 (i386_dr_low_set_addr): Likewise.
1384 (i386_dr_low_get_addr): Likewise.
1385 (i386_dr_low_can_set_control): Likewise.
1386 (i386_dr_low_set_control): Likewise.
1387 (i386_dr_low_get_control): Likewise.
1388 (i386_dr_low_get_status): Likewise.
1389 (i386_get_debug_register_length): Likewise.
1390 * linux-x86-low.c (i386_dr_low_set_addr):
1391 Changed signature. Made static.
1392 (i386_dr_low_get_addr): Likewise.
1393 (i386_dr_low_set_control): Likewise.
1394 (i386_dr_low_get_control): Likewise.
1395 (i386_dr_low_get_status): Likewise.
1396 (i386_dr_low): New global variable.
1397 * win32-i386-low.c (i386_dr_low_set_addr):
1398 Changed signature. Made static.
1399 (i386_dr_low_get_addr): Likewise.
1400 (i386_dr_low_set_control): Likewise.
1401 (i386_dr_low_get_control): Likewise.
1402 (i386_dr_low_get_status): Likewise.
1403 (i386_dr_low): New global variable.
1404
1405 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1406
1407 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1408 * Makefile.in (AR, AR_FLAGS): Define.
1409 * configure: Regenerate.
1410
1411 2014-06-19 Gary Benson <gbenson@redhat.com>
1412
1413 * Makefile.in (i386-dregs.o): New rule.
1414 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1415 * i386-low.c (target.h): Remove include.
1416 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1417 (DR_CONTROL_SHIFT): Likewise.
1418 (DR_CONTROL_SIZE): Likewise.
1419 (DR_RW_EXECUTE): Likewise.
1420 (DR_RW_WRITE): Likewise.
1421 (DR_RW_READ): Likewise.
1422 (DR_RW_IORW): Likewise.
1423 (DR_LEN_1): Likewise.
1424 (DR_LEN_2): Likewise.
1425 (DR_LEN_4): Likewise.
1426 (DR_LEN_8): Likewise.
1427 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1428 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1429 (DR_ENABLE_SIZE): Likewise.
1430 (DR_LOCAL_SLOWDOWN): Likewise.
1431 (DR_GLOBAL_SLOWDOWN): Likewise.
1432 (DR_CONTROL_RESERVED): Likewise.
1433 (I386_DR_CONTROL_MASK): Likewise.
1434 (I386_DR_VACANT): Likewise.
1435 (I386_DR_LOCAL_ENABLE): Likewise.
1436 (I386_DR_GLOBAL_ENABLE): Likewise.
1437 (I386_DR_DISABLE): Likewise.
1438 (I386_DR_SET_RW_LEN): Likewise.
1439 (I386_DR_GET_RW_LEN): Likewise.
1440 (I386_DR_WATCH_HIT): Likewise.
1441 (i386_wp_op_t): Likewise.
1442 (i386_show_dr): Likewise.
1443 (i386_length_and_rw_bits): Likewise.
1444 (i386_insert_aligned_watchpoint): Likewise.
1445 (i386_remove_aligned_watchpoint): Likewise.
1446 (i386_handle_nonaligned_watchpoint): Likewise.
1447 i386_update_inferior_debug_regs(): Likewise.
1448 (i386_dr_insert_watchpoint): Likewise.
1449 (i386_dr_remove_watchpoint): Likewise.
1450 (i386_dr_region_ok_for_watchpoint): Likewise.
1451 (i386_dr_stopped_data_address): Likewise.
1452 (i386_dr_stopped_by_watchpoint): Likewise.
1453
1454 2014-06-19 Gary Benson <gbenson@redhat.com>
1455
1456 * i386-low.c (i386_dr_show): Renamed to
1457 i386_show_dr and made static. All uses updated.
1458 (i386_dr_length_and_rw_bits): Renamed to
1459 i386_length_and_rw_bits and made static.
1460 All uses updated.
1461 (i386_dr_insert_aligned_watchpoint): Renamed to
1462 i386_insert_aligned_watchpoint and made static.
1463 All uses updated.
1464 (i386_dr_remove_aligned_watchpoint): Renamed to
1465 i386_remove_aligned_watchpoint and made static.
1466 All uses updated.
1467 (i386_dr_update_inferior_debug_regs): Renamed to
1468 i386_update_inferior_debug_regs and made static.
1469 All uses updated.
1470
1471 2014-06-18 Gary Benson <gbenson@redhat.com>
1472
1473 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1474 (i386_dr_low_can_set_control): Likewise.
1475 (i386_get_debug_register_length): Likewise.
1476 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1477 (i386_dr_low_can_set_control): Likewise.
1478 (i386_get_debug_register_length): Likewise.
1479
1480 2014-06-17 Gary Benson <gbenson@redhat.com>
1481
1482 * i386-low.h (i386-dregs.h): New include.
1483 (DR_FIRSTADDR): Now in i386-dregs.h.
1484 (DR_LASTADDR): Likewise.
1485 (DR_NADDR): Likewise.
1486 (DR_STATUS): Likewise.
1487 (DR_CONTROL): Likewise.
1488 (i386_debug_reg_state): Likewise.
1489 (i386_dr_insert_watchpoint): Likewise.
1490 (i386_dr_remove_watchpoint): Likewise.
1491 (i386_dr_region_ok_for_watchpoint): Likewise.
1492 (i386_dr_stopped_data_address): Likewise.
1493 (i386_dr_stopped_by_watchpoint): Likewise.
1494 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1495
1496 2014-06-18 Gary Benson <gbenson@redhat.com>
1497
1498 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1499 i386_dr_insert_watchpoint.
1500 (i386_low_remove_watchpoint): Renamed to
1501 i386_dr_remove_watchpoint.
1502 (i386_low_region_ok_for_watchpoint): Renamed to
1503 i386_dr_region_ok_for_watchpoint.
1504 (i386_low_stopped_data_address): Renamed to
1505 i386_dr_stopped_data_address.
1506 (i386_low_stopped_by_watchpoint): Renamed to
1507 i386_dr_stopped_by_watchpoint.
1508 * i386-low.c (i386_show_dr): Renamed to
1509 i386_dr_show and made nonstatic. All uses updated.
1510 (i386_length_and_rw_bits): Renamed to
1511 i386_dr_length_and_rw_bits and made nonstatic.
1512 All uses updated.
1513 (i386_insert_aligned_watchpoint): Renamed to
1514 i386_dr_insert_aligned_watchpoint and made nonstatic.
1515 All uses updated.
1516 (i386_remove_aligned_watchpoint): Renamed to
1517 i386_dr_remove_aligned_watchpoint and made nonstatic.
1518 All uses updated.
1519 (i386_update_inferior_debug_regs): Renamed to
1520 i386_dr_update_inferior_debug_regs and made nonstatic.
1521 All uses updated.
1522 (i386_low_insert_watchpoint): Renamed to
1523 i386_dr_insert_watchpoint. All uses updated.
1524 (i386_low_remove_watchpoint): Renamed to
1525 i386_dr_remove_watchpoint. All uses updated.
1526 (i386_low_region_ok_for_watchpoint): Renamed to
1527 i386_dr_region_ok_for_watchpoint. All uses updated.
1528 (i386_low_stopped_data_address): Renamed to
1529 i386_dr_stopped_data_address. All uses updated.
1530 (i386_low_stopped_by_watchpoint): Renamed to
1531 i386_dr_stopped_by_watchpoint. All uses updated.
1532
1533 2014-06-18 Gary Benson <gbenson@redhat.com>
1534
1535 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1536 (i386_dr_low_can_set_control): Likewise.
1537 (i386_insert_aligned_watchpoint): New check.
1538
1539 2014-06-18 Gary Benson <gbenson@redhat.com>
1540
1541 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1542 Renamed to state.
1543
1544 2014-06-18 Gary Benson <gbenson@redhat.com>
1545
1546 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1547 instead of fatal and error.
1548 (i386_handle_nonaligned_watchpoint): Likewise.
1549
1550 2014-06-18 Gary Benson <gbenson@redhat.com>
1551
1552 * i386-low.c (i386_get_debug_register_length): New macro.
1553 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1554 (i386_show_dr): Use debug_printf instead of fprintf. Use
1555 phex to format values.
1556
1557 2014-06-18 Gary Benson <gbenson@redhat.com>
1558
1559 * i386-low.h: Comment changes.
1560 * i386-low.c: Likewise.
1561
1562 2014-06-18 Gary Benson <gbenson@redhat.com>
1563
1564 * i386-low.c: Whitespace changes.
1565
1566 2014-06-12 Tom Tromey <tromey@redhat.com>
1567
1568 * utils.c (freeargv): Remove.
1569
1570 2014-06-12 Tom Tromey <tromey@redhat.com>
1571
1572 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1573 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1574 (parse_debug_format_options): Likewise.
1575 (gdbserver_usage): Likewise.
1576 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1577 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1578 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1579 against libiberty.
1580 ($(LIBGNU)): Depend on libiberty.
1581 (all-lib): Recurse into all subdirs.
1582 (install-only): Invoke "install" target in subdirs.
1583 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1584 targets.
1585 * configure: Rebuild.
1586 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1587 for vasprintf, vsnprintf, or gettimeofday.
1588 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1589 srv_tgtobj.
1590
1591 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1592
1593 * development.sh: Delete.
1594 * Makefile.in (config.status): Adjust dependency on development.sh.
1595 * configure.ac: Adjust development.sh source call.
1596 * configure: Regenerate.
1597
1598 2014-06-02 Pedro Alves <palves@redhat.com>
1599
1600 * ax.c (gdb_free_agent_expr): New function.
1601 * ax.h (gdb_free_agent_expr): New declaration.
1602 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1603 list.
1604 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1605 static.
1606 (clear_breakpoint_conditions_and_commands): New function.
1607 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1608 (clear_breakpoint_conditions_and_commands): New declaration.
1609
1610 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1611
1612 * linux-aarch64-low.c (asm/ptrace.h): Include.
1613
1614 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1615
1616 Fix TLS access for -static -pthread.
1617 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1618 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1619 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1620
1621 2014-05-20 Pedro Alves <palves@redhat.com>
1622
1623 * linux-aarch64-low.c (aarch64_insert_point)
1624 (aarch64_remove_point): No longer check whether the type is
1625 supported here. Adjust to new interface.
1626 (the_low_target): Install aarch64_supports_z_point_type as
1627 supports_z_point_type method.
1628 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1629 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1630 instead of a Z packet char. Adjust.
1631 (arm_supports_z_point_type): New function.
1632 (arm_insert_point, arm_remove_point): Adjust to new interface.
1633 (the_low_target): Install arm_supports_z_point_type.
1634 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1635 (cris_insert_point, cris_remove_point): Adjust to new interface.
1636 Don't check whether the type is supported here.
1637 (the_low_target): Install cris_supports_z_point_type.
1638 * linux-low.c (linux_supports_z_point_type): New function.
1639 (linux_insert_point, linux_remove_point): Adjust to new interface.
1640 * linux-low.h (struct linux_target_ops) <insert_point,
1641 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1642 raw_breakpoint pointer parameter.
1643 <supports_z_point_type>: New method.
1644 * linux-mips-low.c (mips_supports_z_point_type): New function.
1645 (mips_insert_point, mips_remove_point): Adjust to new interface.
1646 Use mips_supports_z_point_type.
1647 (the_low_target): Install mips_supports_z_point_type.
1648 * linux-ppc-low.c (the_low_target): Install NULL as
1649 supports_z_point_type method.
1650 * linux-s390-low.c (the_low_target): Install NULL as
1651 supports_z_point_type method.
1652 * linux-sparc-low.c (the_low_target): Install NULL as
1653 supports_z_point_type method.
1654 * linux-x86-low.c (x86_supports_z_point_type): New function.
1655 (x86_insert_point): Adjust to new insert_point interface. Use
1656 insert_memory_breakpoint. Adjust to new
1657 i386_low_insert_watchpoint interface.
1658 (x86_remove_point): Adjust to remove_point interface. Use
1659 remove_memory_breakpoint. Adjust to new
1660 i386_low_remove_watchpoint interface.
1661 (the_low_target): Install x86_supports_z_point_type.
1662 * lynx-low.c (lynx_target_ops): Install NULL as
1663 supports_z_point_type callback.
1664 * nto-low.c (nto_supports_z_point_type): New.
1665 (nto_insert_point, nto_remove_point): Adjust to new interface.
1666 (nto_target_ops): Install nto_supports_z_point_type.
1667 * mem-break.c: Adjust intro comment.
1668 (struct raw_breakpoint) <raw_type, size>: New fields.
1669 <inserted>: Update comment.
1670 <shlib_disabled>: Delete field.
1671 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1672 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1673 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1674 (raw_bkpt_type_to_target_hw_bp_type): New function.
1675 (find_enabled_raw_code_breakpoint_at): New function.
1676 (find_raw_breakpoint_at): New type and size parameters. Use them.
1677 (insert_memory_breakpoint): New function, based off
1678 set_raw_breakpoint_at.
1679 (remove_memory_breakpoint): New function.
1680 (set_raw_breakpoint_at): Reimplement.
1681 (set_breakpoint): New, based on set_breakpoint_at.
1682 (set_breakpoint_at): Reimplement.
1683 (delete_raw_breakpoint): Go through the_target->remove_point
1684 instead of assuming memory breakpoints.
1685 (find_gdb_breakpoint_at): Delete.
1686 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1687 (find_gdb_breakpoint): New function.
1688 (set_gdb_breakpoint_at): Delete.
1689 (z_type_supported): New function.
1690 (set_gdb_breakpoint_1): New function, loosely based off
1691 set_gdb_breakpoint_at.
1692 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1693 (delete_gdb_breakpoint_at): Delete.
1694 (delete_gdb_breakpoint_1): New function, loosely based off
1695 delete_gdb_breakpoint_at.
1696 (delete_gdb_breakpoint): New function.
1697 (clear_gdb_breakpoint_conditions): Rename to ...
1698 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1699 breakpoint.
1700 (add_condition_to_breakpoint): Make static.
1701 (add_breakpoint_condition): Take a struct breakpoint pointer
1702 instead of an address. Adjust.
1703 (gdb_condition_true_at_breakpoint): Rename to ...
1704 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1705 z_type parameter.
1706 (gdb_condition_true_at_breakpoint): Reimplement.
1707 (add_breakpoint_commands): Take a struct breakpoint pointer
1708 instead of an address. Adjust.
1709 (gdb_no_commands_at_breakpoint): Rename to ...
1710 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1711 parameter. Return true if no breakpoint was found. Change debug
1712 output.
1713 (gdb_no_commands_at_breakpoint): Reimplement.
1714 (run_breakpoint_commands): Rename to ...
1715 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1716 and change return type to boolean.
1717 (run_breakpoint_commands): New function.
1718 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1719 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1720 breakpoint. Go through the_target->remove_point instead of
1721 assuming memory breakpoint.
1722 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1723 software and hardware breakpoints.
1724 (reinsert_raw_breakpoint): Go through the_target->insert_point
1725 instead of assuming memory breakpoint.
1726 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1727 software and hardware breakpoints.
1728 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1729 Check both software and hardware breakpoints.
1730 (validate_inserted_breakpoint): Assert the breakpoint is a
1731 software breakpoint. Set the inserted flag to -1 instead of
1732 setting shlib_disabled.
1733 (delete_disabled_breakpoints): Adjust.
1734 (validate_breakpoints): Only validate software breakpoints.
1735 Adjust to inserted flag change.
1736 (check_mem_read, check_mem_write): Skip breakpoint types other
1737 than software breakpoints. Adjust to inserted flag change.
1738 * mem-break.h (enum raw_bkpt_type): New enum.
1739 (raw_breakpoint, struct process_info): Forward declare.
1740 (Z_packet_to_target_hw_bp_type): Delete declaration.
1741 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1742 (set_gdb_breakpoint, delete_gdb_breakpoint)
1743 (clear_breakpoint_conditions): New declarations.
1744 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1745 (breakpoint_inserted_here): Update comment.
1746 (add_breakpoint_condition, add_breakpoint_commands): Replace
1747 address parameter with a breakpoint pointer parameter.
1748 (gdb_breakpoint_here): Update comment.
1749 (delete_gdb_breakpoint_at): Delete.
1750 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1751 * server.c (process_point_options): Take a struct breakpoint
1752 pointer instead of an address. Adjust.
1753 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1754 delete_gdb_breakpoint.
1755 * spu-low.c (spu_target_ops): Install NULL as
1756 supports_z_point_type method.
1757 * target.h: Include mem-break.h.
1758 (struct target_ops) <prepare_to_access_memory>: Update comment.
1759 <supports_z_point_type>: New field.
1760 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1761 instead of a char. Also take a raw breakpoint pointer.
1762 * win32-arm-low.c (the_low_target): Install NULL as
1763 supports_z_point_type.
1764 * win32-i386-low.c (i386_supports_z_point_type): New function.
1765 (i386_insert_point, i386_remove_point): Adjust to new interface.
1766 (the_low_target): Install i386_supports_z_point_type.
1767 * win32-low.c (win32_supports_z_point_type): New function.
1768 (win32_insert_point, win32_remove_point): Adjust to new interface.
1769 (win32_target_ops): Install win32_supports_z_point_type.
1770 * win32-low.h (struct win32_target_ops):
1771 <supports_z_point_type>: New method.
1772 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1773 instead of a char. Also take a raw breakpoint pointer.
1774
1775 2014-05-20 Pedro Alves <palves@redhat.com>
1776
1777 * mem-break.h: Include break-common.h.
1778 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1779 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1780 (Z_packet_to_target_hw_bp_type): New declaration.
1781 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1782 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1783 (Z_PACKET_ACCESS_WP): Delete macros.
1784 (Z_packet_to_hw_type): Delete function.
1785 * i386-low.h: Don't include break-common.h here.
1786 (Z_packet_to_hw_type): Delete declaration.
1787 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1788 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1789 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1790 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1791 * linux-aarch64-low.c: Don't include break-common.h here.
1792 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1793 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1794 (Z_packet_to_target_hw_bp_type): Delete function.
1795 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1796 function.
1797 (mips_insert_point, mips_remove_point): Use
1798 Z_packet_to_target_hw_bp_type.
1799
1800 2014-05-20 Pedro Alves <palves@redhat.com>
1801
1802 * linux-aarch64-low.c: Include break-common.h.
1803 (enum target_point_type): Delete.
1804 (Z_packet_to_point_type): Rename to ...
1805 (Z_packet_to_target_hw_bp_type): ... this, and return a
1806 target_hw_bp_type instead.
1807 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1808 instead of an enum target_point_type.
1809 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1810 breakpoint type.
1811 (aarch64_dr_state_insert_one_point)
1812 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1813 (aarch64_handle_aligned_watchpoint)
1814 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1815 Take an enum target_hw_bp_type instead of an enum
1816 target_point_type.
1817 (aarch64_supports_z_point_type): New function.
1818 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1819 use Z_packet_to_target_hw_bp_type.
1820
1821 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1822
1823 * configure.ac: Only use -Werror by default when DEVELOPMENT
1824 is true.
1825 * configure: Regenerate.
1826
1827 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1828
1829 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1830 * linux-x86-low.c (X86_64_USER_REGS): New.
1831 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1832
1833 2014-04-28 Yao Qi <yao@codesourcery.com>
1834
1835 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1836 name.
1837
1838 2014-04-25 Pedro Alves <palves@redhat.com>
1839
1840 PR server/16255
1841 * linux-low.c (linux_attach_fail_reason_string): New function.
1842 (linux_attach_lwp): Delete.
1843 (linux_attach_lwp_1): Rename to ...
1844 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1845 argument. Remove "initial" parameter. Return int instead of
1846 void. Don't error or warn here.
1847 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1848 failure to attach to the tgid. Call warning when failing to
1849 attach to an lwp.
1850 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1851 argument. Remove "initial" parameter. Return int instead of
1852 void. Don't error or warn here.
1853 (linux_attach_fail_reason_string): New declaration.
1854 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1855 interface change. Use linux_attach_fail_reason_string.
1856
1857 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1858 Walfred Tedeschi <walfred.tedeschi@intel.com>
1859
1860 * Makefile.in: Added rules to handle new files
1861 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1862 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1863 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1864 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1865 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1866 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1867 x32-avx512-linux.o.
1868 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1869 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1870 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1871 i386/x32-avx512.xml.
1872 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1873 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1874 i386/x32-avx512-linux.xml.
1875 * i387-fp.c (num_avx512_k_registers): New constant for number
1876 of K registers.
1877 (num_avx512_zmmh_low_registers): New constant for number of
1878 lower ZMM registers (0-15).
1879 (num_avx512_zmmh_high_registers): New constant for number of
1880 higher ZMM registers (16-31).
1881 (num_avx512_ymmh_registers): New contant for number of higher
1882 YMM registers (ymm16-31 added by avx521 on x86_64).
1883 (num_avx512_xmm_registers): New constant for number of higher
1884 XMM registers (xmm16-31 added by AVX512 on x86_64).
1885 (struct i387_xsave): Add space for AVX512 registers.
1886 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1887 Add code to handle AVX512 registers.
1888 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1889 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1890 prototypei from generated file.
1891 (tdesc_amd64_avx512_linux): Likewise.
1892 (init_registers_x32_avx512_linux): Likewise.
1893 (tdesc_x32_avx512_linux): Likewise.
1894 (init_registers_i386_avx512_linux): Likewise.
1895 (tdesc_i386_avx512_linux): Likewise.
1896 (x86_64_regmap): Add AVX512 registers.
1897 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1898 mask.
1899 (initialize_low_arch): Add code to initialize AVX512 registers.
1900
1901 2014-04-23 Pedro Alves <palves@redhat.com>
1902
1903 * mem-break.c (find_gdb_breakpoint_at): Make static.
1904 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1905
1906 2014-04-23 Pedro Alves <palves@redhat.com>
1907
1908 * i386-low.c: Don't include break-common.h here.
1909 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1910 prototype to take target_hw_bp_type as argument instead of a Z
1911 packet char.
1912 * i386-low.h: Include break-common.h here.
1913 (Z_packet_to_hw_type): Declare.
1914 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1915 prototypes.
1916 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1917 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1918 (x86_remove_point): Convert the packet number to a
1919 target_hw_bp_type before calling i386_low_remove_watchpoint.
1920 * win32-i386-low.c (i386_insert_point): Convert the packet number
1921 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1922 (i386_remove_point): Convert the packet number to a
1923 target_hw_bp_type before calling i386_low_remove_watchpoint.
1924
1925 2014-04-23 Pedro Alves <palves@redhat.com>
1926
1927 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1928
1929 2014-04-10 Pedro Alves <palves@redhat.com>
1930
1931 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1932 Check if the condition or command is NULL before checking if the
1933 breakpoint is known. On success, return true.
1934 * mem-break.h (add_breakpoint_condition): Document return.
1935 (add_breakpoint_commands): Add describing comment.
1936 * server.c (skip_to_semicolon): New function.
1937 (process_point_options): Use it.
1938
1939 2014-04-09 Pedro Alves <palves@redhat.com>
1940
1941 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1942 to lwpid_of.
1943
1944 2014-02-27 Pedro Alves <palves@redhat.com>
1945
1946 PR 12702
1947 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1948 macros.
1949 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1950 output.
1951 (last_thread_of_process_p): Take a PID argument instead of a
1952 thread pointer.
1953 (linux_wait_for_lwp): Delete.
1954 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1955 functions.
1956 (linux_low_filter_event): New function, party factored out from
1957 linux_wait_for_event.
1958 (linux_wait_for_event): Rename to ...
1959 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1960 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1961 sigsuspend. Check for zombie leaders.
1962 (linux_wait_for_event): Reimplement as wrapper around
1963 linux_wait_for_event_filtered.
1964 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1965 a normal or signal exit is seen, it's the whole process exiting.
1966 (wait_for_sigstop): No longer a for_each_inferior callback.
1967 Rewrite on top of linux_wait_for_event_filtered.
1968 (stop_all_lwps): Call wait_for_sigstop directly.
1969 * server.c (resume, handle_target_event): Handle
1970 TARGET_WAITKIND_NO_RESUMED.
1971
1972 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1973
1974 * win32-low.c (psapi_get_dll_name,
1975 * win32_CreateToolhelp32Snapshot): Delete.
1976 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1977 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1978 Delete.
1979 (handle_load_dll): Add function description.
1980 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1981
1982 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1983
1984 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1985 Add comment.
1986 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1987 base address when calling win32_add_one_solib.
1988 (handle_load_dll): Delete local variable load_addr.
1989 Remove 0x1000 offset applied to DLL base address when calling
1990 win32_add_one_solib.
1991 (handle_unload_dll): Add comment.
1992
1993 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1994
1995 * win32-low.c (win32_add_all_dlls): Renames
1996 win32_ensure_ntdll_loaded. Rewrite function documentation.
1997 Adjust implementation to always load all DLLs.
1998 Add 0x1000 offset to DLL base address when calling
1999 win32_add_one_solib.
2000 (child_initialization_done): New static global.
2001 (do_initial_child_stuff): Set child_initialization_done to
2002 zero during child initialization, and 1 after. Replace call
2003 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2004 Add comment.
2005 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2006 (handle_unload_dll): Add function documentation.
2007 (get_child_debug_event): Ignore load and unload DLL events
2008 during child initialization.
2009
2010 2014-02-20 Doug Evans <dje@google.com>
2011
2012 Remove global all_lwps.
2013 * inferiors.h (ptid_of): Move here from linux-low.h.
2014 (pid_of, lwpid_of): Ditto.
2015 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2016 parameter is a struct thread_info * now.
2017 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2018 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2019 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2020 directly.
2021 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2022 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2023 * linux-arm-low.c (update_registers_callback): Update, "entry"
2024 parameter is a struct thread_info * now.
2025 Fetch lwpid from current_inferior directly.
2026 (arm_insert_point): Pass &all_threads to find_inferior instead of
2027 &all_lwps.
2028 (arm_remove_point): Ditto.
2029 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2030 (arm_prepare_to_resume): Fetch pid from thread.
2031 (arm_read_description): Fetch lwpid from current_inferior directly.
2032 * linux-low.c (all_lwps): Delete.
2033 (delete_lwp): Delete call to remove_inferior.
2034 (handle_extended_wait): Fetch lwpid from thread.
2035 (add_lwp): Don't set lwp->entry.id. Remove call to
2036 add_inferior_to_list.
2037 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2038 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2039 (kill_one_lwp_callback): Ditto.
2040 (linux_kill): Don't dereference NULL pointer.
2041 Fetch ptid,lwpid from thread.
2042 (get_detach_signal): Fetch ptid from thread.
2043 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2044 Simplify call to regcache_invalidate_thread.
2045 (delete_lwp_callback): Update, "entry" parameter is a
2046 struct thread_info * now. Fetch pid from thread.
2047 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2048 (status_pending_p_callback): Update, "entry" parameter is a
2049 struct thread_info * now. Fetch ptid from thread.
2050 (find_lwp_pid): Update, "entry" parameter is a
2051 struct thread_info * now.
2052 (linux_wait_for_lwp): Fetch pid from thread.
2053 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2054 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2055 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2056 (dequeue_one_deferred_signal): Ditto.
2057 (cancel_breakpoint): Fetch ptid from current_inferior.
2058 (linux_wait_for_event): Pass &all_threads to find_inferior,
2059 not &all_lwps. Fetch ptid, lwpid from thread.
2060 (count_events_callback): Update, "entry" parameter is a
2061 struct thread_info * now.
2062 (select_singlestep_lwp_callback): Ditto.
2063 (select_event_lwp_callback): Ditto.
2064 (cancel_breakpoints_callback): Ditto.
2065 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2066 not &all_lwps.
2067 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2068 (unsuspend_one_lwp): Update, "entry" parameter is a
2069 struct thread_info * now.
2070 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2071 not &all_lwps.
2072 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2073 Fetch lwpid from thread, not lwp.
2074 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2075 Pass &all_threads to find_inferior, not &all_lwps.
2076 (send_sigstop): Fetch lwpid from thread, not lwp.
2077 (send_sigstop_callback): Update, "entry" parameter is a
2078 struct thread_info * now.
2079 (suspend_and_send_sigstop_callback): Ditto.
2080 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2081 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2082 struct thread_info * now.
2083 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2084 from thread, lwp.
2085 (lwp_running): Update, "entry" parameter is a
2086 struct thread_info * now.
2087 (stop_all_lwps): Fetch ptid from thread.
2088 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2089 (linux_resume_one_lwp): Fetch lwpid from thread.
2090 (linux_set_resume_request): Update, "entry" parameter is a
2091 struct thread_info * now. Fetch pid, lwpid from thread.
2092 (resume_status_pending_p): Update, "entry" parameter is a
2093 struct thread_info * now.
2094 (need_step_over_p): Ditto. Fetch lwpid from thread.
2095 (start_step_over): Fetch lwpid from thread.
2096 (linux_resume_one_thread): Update, "entry" parameter is a
2097 struct thread_info * now. Fetch lwpid from thread.
2098 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2099 (proceed_one_lwp): Update, "entry" parameter is a
2100 struct thread_info * now. Fetch lwpid from thread.
2101 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2102 struct thread_info * now.
2103 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2104 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2105 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2106 directly.
2107 (regsets_store_inferior_registers): Ditto.
2108 (fetch_register, store_register): Ditto.
2109 (linux_read_memory, linux_write_memory): Ditto.
2110 (linux_request_interrupt): Ditto.
2111 (linux_read_auxv): Ditto.
2112 (linux_xfer_siginfo): Ditto.
2113 (linux_qxfer_spu): Ditto.
2114 (linux_qxfer_libraries_svr4): Ditto.
2115 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2116 moved to inferiors.h.
2117 (get_lwp): Delete.
2118 (get_thread_lwp): Update.
2119 (struct lwp_info): Delete member "entry". Simplify comment for
2120 member "thread".
2121 (all_lwps): Delete.
2122 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2123 current_inferior directly.
2124 (update_watch_registers_callback): Update, "entry" parameter is a
2125 struct thread_info * now. Fetch pid from thread.
2126 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2127 (mips_insert_point): Fetch lwpid from current_inferior.
2128 Pass &all_threads to find_inferior, not &all_lwps.
2129 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2130 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2131 directly.
2132 (mips_stopped_data_address): Ditto.
2133 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2134 directly.
2135 * linux-tile-low.c (tile_arch_setup): Ditto.
2136 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2137 (update_debug_registers_callback): Update, "entry" parameter is a
2138 struct thread_info * now. Fetch pid from thread.
2139 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2140 Pass &all_threads to find_inferior, not &all_lwps.
2141 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2142 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2143 Pass &all_threads to find_inferior, not &all_lwps.
2144 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2145 (i386_dr_low_get_status): Ditto.
2146 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2147 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2148 (x86_linux_read_description): Ditto.
2149 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2150
2151 2014-02-20 Doug Evans <dje@google.com>
2152
2153 * inferiors.c (get_first_inferior): Fix buglet.
2154
2155 2014-02-19 Doug Evans <dje@google.com>
2156
2157 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2158 * inferiors.c (add_thread): Change result type to struct thread_info *.
2159 All callers updated.
2160 (add_lwp): Call add_thread here instead of in callers.
2161 All callers updated.
2162 * linux-low.h (get_lwp_thread): Rewrite.
2163 (struct lwp_info): New member "thread".
2164
2165 2014-02-19 Doug Evans <dje@google.com>
2166
2167 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2168 All callers updated.
2169
2170 2014-02-19 Doug Evans <dje@google.com>
2171
2172 * inferiors.c (add_thread): Fix whitespace.
2173
2174 2014-02-19 Doug Evans <dje@google.com>
2175
2176 * dll.c (clear_dlls): Replace accessing list implemention details
2177 with API function.
2178 * gdbthread.h (get_first_thread): Declare.
2179 * inferiors.c (for_each_inferior_with_data): New function.
2180 (get_first_thread): New function.
2181 (find_thread_ptid): Simplify.
2182 (get_first_inferior): New function.
2183 (clear_list): Delete.
2184 (one_inferior_p): New function.
2185 (clear_inferior_list): New function.
2186 (clear_inferiors): Update.
2187 * inferiors.h (for_each_inferior_with_data): Declare.
2188 (clear_inferior_list): Declare.
2189 (one_inferior_p): Declare.
2190 (get_first_inferior): Declare.
2191 * linux-low.c (linux_wait_for_event): Replace accessing list
2192 implemention details with API function.
2193 * server.c (target_running): Ditto.
2194 (accumulate_file_name_length): New function.
2195 (emit_dll_description): New function.
2196 (handle_qxfer_libraries): Replace accessing list implemention
2197 details with API function.
2198 (handle_qxfer_threads_worker): New function.
2199 (handle_qxfer_threads_proper): Replace accessing list implemention
2200 details with API function.
2201 (handle_query): Ditto.
2202 (visit_actioned_threads_callback_ftype): New typedef.
2203 (visit_actioned_threads_data): New struct.
2204 (visit_actioned_threads): Rewrite to be find_inferior callback.
2205 (resume): Call find_inferior.
2206 (handle_status): Replace accessing list implemention
2207 details with API function.
2208 (process_serial_event): Replace accessing list implemention details
2209 with API function.
2210 * target.c (set_desired_inferior): Replace accessing list implemention
2211 details with API function.
2212 * tracepoint.c (same_process_p): New function.
2213 (gdb_agent_about_to_close): Replace accessing list implemention
2214 details with API function.
2215 * win32-low.c (child_delete_thread): Replace accessing list
2216 implemention details with API function.
2217 (match_dll_by_basename): New function.
2218 (dll_is_loaded_by_basename): New function.
2219 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2220 details call to dll_is_loaded_by_basename.
2221
2222 2014-02-19 Doug Evans <dje@google.com>
2223
2224 * dll.h (struct dll_info): Add comment.
2225 * gdbthread.h (struct thread_info): Add comment.
2226 (current_ptid): Simplify.
2227 * inferiors.c (add_process): Update.
2228 (remove_process): Update.
2229 * inferiors.h (struct process_info): Rename member "head" to "entry".
2230 * linux-low.c (delete_lwp): Update.
2231 (add_lwp): Update.
2232 (last_thread_of_process_p): Update.
2233 (kill_one_lwp_callback, linux_kill): Update.
2234 (status_pending_p_callback): Update.
2235 (wait_for_sigstop): Update. Simplify read of ptid.
2236 (start_step_over): Update.
2237 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2238 (get_lwp_thread): Update.
2239 (struct lwp_info): Rename member "head" to "entry".
2240 * regcache.h (inferior_list_entry): Delete.
2241 * server.c (kill_inferior_callback): Update.
2242 (detach_or_kill_inferior_callback): Update.
2243 (print_started_pid): Update.
2244 (print_attached_pid): Update.
2245 (process_serial_event): Simplify read of ptid.
2246 * thread-db.c (thread_db_create_event): Update.
2247 (thread_db_get_tls_address): Update.
2248 * win32-low.c (current_inferior_ptid): Simplify.
2249
2250 2014-02-19 Tom Tromey <tromey@redhat.com>
2251
2252 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2253 argument.
2254 (target_supports_btrace): Update.
2255
2256 2014-02-14 Yao Qi <yao@codesourcery.com>
2257
2258 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2259 (rsp-low-ipa.o): New target.
2260
2261 2014-02-12 Tom Tromey <tromey@redhat.com>
2262
2263 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2264 convert_ascii_to_int.
2265 * regcache.c (registers_to_string): Likewise.
2266 * remote-utils.c (decode_M_packet): Likewise.
2267 * server.c (process_serial_event): Likewise.
2268
2269 2014-02-12 Tom Tromey <tromey@redhat.com>
2270
2271 * server.c (handle_query, handle_v_run): Use hex2bin, not
2272 unhexify.
2273 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2274
2275 2014-02-12 Tom Tromey <tromey@redhat.com>
2276
2277 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2278 convert_int_to_ascii.
2279 * regcache.c (registers_to_string, collect_register_as_string):
2280 Likewise.
2281 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2282 Likewise.
2283 * server.c (process_serial_event): Likewise.
2284 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2285 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2286
2287 2014-02-12 Tom Tromey <tromey@redhat.com>
2288
2289 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2290 bin2hex, not hexify.
2291 * tracepoint.c (cmd_qtstatus): Likewise.
2292
2293 2014-02-12 Tom Tromey <tromey@redhat.com>
2294
2295 * remote-utils.c (monitor_output): Pass explicit length to
2296 hexify.
2297
2298 2014-02-12 Tom Tromey <tromey@redhat.com>
2299
2300 * tracepoint.c: Include rsp-low.h.
2301 * server.c: Include rsp-low.h.
2302 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2303 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2304 declare.
2305 * remote-utils.c: Include rsp-low.h.
2306 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2307 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2308 (convert_int_to_ascii, convert_ascii_to_int): Move to
2309 common/rsp-low.c.
2310 * regcache.c: Include rsp-low.h.
2311 * ax.c: Include rsp-low.h.
2312 * Makefile.in (SFILES): Add common/rsp-low.c.
2313 (OBS): Add rsp-low.o.
2314 (rsp-low.o): New target.
2315
2316 2014-02-12 Tom Tromey <tromey@redhat.com>
2317
2318 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2319 Include print-utils.h.
2320 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2321 (plongest, thirty_two, phex_nz): Remove.
2322 * Makefile.in (SFILES): Add common/print-utils.c.
2323 (OBS): Add print-utils.o.
2324 (print-utils-ipa.o): New target.
2325 (print-utils.o): New target.
2326 (IPA_OBJS): Add print-utils-ipa.o.
2327
2328 2014-02-06 Tom Tromey <tromey@redhat.com>
2329
2330 * Makefile.in (SFILES): Fix indentation.
2331
2332 2014-02-05 Doug Evans <dje@google.com>
2333
2334 * linux-low.c (linux_wait_for_event): Improve comment.
2335 (linux_wait_1): Keep current_inferior in sync with event_child.
2336
2337 2014-01-22 Doug Evans <dje@google.com>
2338
2339 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2340
2341 2014-01-22 Doug Evans <dje@google.com>
2342
2343 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2344 * configure: Regenerate.
2345 * config.in: Regenerate.
2346 * Makefile.in (SFILES): Add debug.c.
2347 (OBS): Add debug.o.
2348 * debug.c: New file.
2349 * debug.h: New file.
2350 * linux-aarch64-low.c (*): Update all debugging printfs to use
2351 debug_printf instead of fprintf.
2352 * linux-arm-low.c (*): Ditto.
2353 * linux-cris-low.c (*): Ditto.
2354 * linux-crisv32-low.c (*): Ditto.
2355 * linux-m32r-low.c (*): Ditto.
2356 * linux-sparc-low.c (*): Ditto.
2357 * linux-x86.c (*): Ditto.
2358 * linux-low.c (*): Ditto.
2359 (linux_wait_1): Add calls to debug_enter, debug_exit.
2360 (linux_wait): Remove redundant debugging printf.
2361 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2362 (linux_resume, unstop_all_lwps): Ditto.
2363 * mem-break.c (*): Update all debugging printfs to use
2364 debug_printf instead of fprintf.
2365 * remote-utils.c (*): Ditto.
2366 * thread-db.c (*): Ditto.
2367 * server.c #include <ctype.h>, "gdb_vecs.h".
2368 (debug_threads): Moved to debug.c.
2369 (*): Update all debugging printfs to use debug_printf instead of
2370 fprintf.
2371 (start_inferior): Replace call to fflush with call to debug_flush.
2372 (monitor_show_help): Mention set debug-format.
2373 (parse_debug_format_options): New function.
2374 (handle_monitor_command): Handle "monitor set debug-format".
2375 (gdbserver_usage): Mention --debug-format.
2376 (main): Parse --debug-format.
2377 * server.h (debug_threads): Declaration moved to debug.h.
2378 #include "debug.h".
2379 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2380 trace_debug_1 that uses debug_printf.
2381 (tracepoint_look_up_symbols): Update all debugging printfs to use
2382 debug_printf instead of fprintf.
2383
2384 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2385
2386 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2387 sys/ptrace.h.
2388
2389 2014-01-17 Pedro Alves <palves@redhat.com>
2390
2391 PR build/16445
2392 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2393 defined after including gdb_proc_service.h.
2394
2395 2014-01-16 Doug Evans <dje@google.com>
2396
2397 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2398 (match_dll): Use it.
2399
2400 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2401
2402 * target.h (target_ops) <read_btrace>: Change parameters and
2403 return type to allow error reporting.
2404 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2405 trace reading errors on.
2406 * linux-low.c (linux_low_read_btrace): Pass trace reading
2407 errors on.
2408 (linux_low_disable_btrace): New.
2409
2410 2014-01-15 Doug Evans <dje@google.com>
2411
2412 * inferiors.c (thread_id_to_gdb_id): Delete.
2413 * inferiors.h (thread_id_to_gdb_id): Delete.
2414
2415 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2416
2417 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2418 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2419 versions.
2420
2421 2014-01-08 Pedro Alves <palves@redhat.com>
2422
2423 * server.c (handle_status): Don't discard previous queued stop
2424 replies or thread's pending status here.
2425 (main) <disconnection>: Do it here instead.
2426
2427 2014-01-08 Pedro Alves <palves@redhat.com>
2428
2429 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2430 * server.c (visit_actioned_threads, handle_pending_status): New
2431 function.
2432 (handle_v_cont): Factor out parts to ...
2433 (resume): ... this new function. If in all-stop, and a thread
2434 being resumed has a pending status, report it without actually
2435 resuming.
2436 (myresume): Adjust to use the new 'resume' function.
2437 (clear_pending_status_callback, set_pending_status_callback)
2438 (find_status_pending_thread_callback): New functions.
2439 (handle_status): Handle the case of multiple threads having
2440 interesting statuses to report. Report threads' real last signal
2441 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2442 with an interesting thread to report the status for, instead of
2443 always reporting the status of the first thread.
2444
2445 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2446
2447 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2448 * gdbreplay.c (gdbreplay_version): Likewise.
2449
2450 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2451
2452 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2453 iov.iov_len with the real length in use.
2454
2455 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2456
2457 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2458 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2459 for all targets that use win32-low.c.
2460 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2461 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2462
2463 2013-12-13 Pedro Alves <palves@redhat.com>
2464
2465 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2466 if equal to TARGET_WAITKIND_LOADED.
2467 * win32-low.c (cached_status): New static global.
2468 (win32_wait): Add declaration.
2469 (do_initial_child_stuff): Flush all initial pending debug events
2470 up to the initial breakpoint.
2471 (win32_wait): If CACHED_STATUS was set, return that instead
2472 of doing a real wait. Remove the code resuming the execution
2473 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2474 during the initial phase. Also remove the code changing
2475 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2476 TARGET_WAITKIND_STOPPED.
2477
2478 2013-12-11 Yao Qi <yao@codesourcery.com>
2479
2480 * notif.c (handle_notif_ack): Return 0 if no notification
2481 matches.
2482
2483 2013-11-20 Doug Evans <dje@google.com>
2484
2485 * linux-low.c (linux_set_resume_request): Fix comment.
2486
2487 2013-11-20 Doug Evans <dje@google.com>
2488
2489 * linux-low.c (resume_status_pending_p): Tweak comment.
2490
2491 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2492
2493 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2494 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2495 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2496 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2497 (srv_amd64_regobj): Add amd64-mpx.o.
2498 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2499 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2500 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2501 * i387-fp.c (num_pl_bnd_register) Added constant.
2502 (num_pl_bnd_cfg_registers) Added constant.
2503 (struct i387_xsave) Added reserved area and MPX fields.
2504 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2505 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2506 function.
2507 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2508 (init_registers_amd64_mpx_linux): Declare new function.
2509 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2510 (x86_64_regmap): Add MPX registers.
2511 (x86_linux_read_description): Add MPX case.
2512 (initialize_low_arch): Initialize MPX targets.
2513
2514 2013-11-18 Tom Tromey <tromey@redhat.com>
2515
2516 * configure: Rebuild.
2517 * configure.ac: Don't check for stdlib.h.
2518 * gdbreplay.c: Unconditionally include stdlib.h.
2519
2520 2013-11-18 Tom Tromey <tromey@redhat.com>
2521
2522 * config.in: Rebuild.
2523 * configure: Rebuild.
2524 * configure.ac: Don't use AC_HEADER_DIRENT.
2525
2526 2013-11-18 Tom Tromey <tromey@redhat.com>
2527
2528 * server.h: Don't check HAVE_STRING_H.
2529 * gdbreplay.c: Don't check HAVE_STRING_H.
2530 * configure: Rebuild.
2531
2532 2013-11-18 Tom Tromey <tromey@redhat.com>
2533
2534 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2535 LIBGNU.
2536
2537 2013-11-08 Tom Tromey <tromey@redhat.com>
2538
2539 * configure, config.in: Rebuild.
2540 * configure.ac: Remove unused configury.
2541
2542 2013-11-08 Tom Tromey <tromey@redhat.com>
2543
2544 * acinclude.m4: Include common.m4, codeset.m4.
2545 * configure, config.in: Rebuild.
2546 * configure.ac: Use GDB_AC_COMMON.
2547
2548 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2549
2550 * linux-s390-low.c (HWCAP_S390_TE): New define.
2551 (s390_arch_setup): Consider the TE field in the HWCAP for
2552 determining 'have_regset_tdb'.
2553
2554 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2555
2556 PR gdb/16014
2557 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2558 call to sizeof.
2559
2560 2013-10-02 Pedro Alves <palves@redhat.com>
2561
2562 * server.c (process_serial_event): Don't output "GDBserver
2563 exiting" if GDB is connected through stdio.
2564 * target.c (mywait): Likewise, be silent if GDB is connected
2565 through stdio.
2566
2567 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2568
2569 * lynx-low.c (lynx_add_threads_after_attach): New function.
2570 (lynx_attach): Remove call to add_thread. Add call to
2571 lynx_add_threads_after_attach instead.
2572
2573 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2574
2575 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2576 * config.in, configure: Regenerated.
2577
2578 2013-09-18 Yao Qi <yao@codesourcery.com>
2579
2580 PR server/15959
2581 * server.c (start_inferior): Clear 'resume_info'.
2582
2583 2013-09-16 Jiong Wang <jiwang@tilera.com>
2584
2585 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2586 for each register.
2587
2588 2013-09-16 Jiong Wang <jiwang@tilera.com>
2589
2590 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2591 linux-tile-low.o to srv_tgtobj.
2592
2593 2013-09-16 Will Newton <will.newton@linaro.org>
2594
2595 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2596 out regs.
2597
2598 2013-09-06 Pedro Alves <palves@redhat.com>
2599
2600 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2601 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2602 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2603 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2604 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2605 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2606
2607 2013-09-06 Pedro Alves <palves@redhat.com>
2608
2609 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2610 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2611
2612 2013-09-06 Pedro Alves <palves@redhat.com>
2613
2614 * linux-amd64-ipa.c: Include tracepoint.h.
2615 * linux-i386-ipa.c: Include tracepoint.h.
2616
2617 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2618
2619 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2620 (ps_get_thread_area): New function.
2621
2622 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2623
2624 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2625 (initialize_low_arch): Call init_registers_crisv32 rather than
2626 init_register_crisv32.
2627
2628 2013-09-05 Pedro Alves <palves@redhat.com>
2629
2630 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2631 to ...
2632 * hostio.h: ... this new file.
2633 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2634 win32-low.c: Include hostio.h.
2635
2636 2013-09-05 Pedro Alves <palves@redhat.com>
2637
2638 * server.h (gdb_client_data, handler_func, callback_handler_func)
2639 (delete_file_handler, add_file_handler, append_callback_event)
2640 (delete_callback_event, start_event_loop, initialize_event_loop):
2641 Move to event-loop.h and include it.
2642 * event-loop.h: New file.
2643
2644 2013-09-05 Pedro Alves <palves@redhat.com>
2645
2646 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2647 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2648 (loaded_dll, unloaded_dll): Move to ...
2649 * dll.h: ... this new file.
2650 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2651
2652 2013-09-05 Pedro Alves <palves@redhat.com>
2653
2654 * server.h (current_process, get_thread_process, all_processes)
2655 (add_inferior_to_list, for_each_inferior, current_inferior)
2656 (remove_inferior, add_process, remove_process, find_process_pid)
2657 (have_started_inferiors_p, have_attached_inferiors_p)
2658 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2659 (clear_inferiors, find_inferior, find_inferior_id)
2660 (inferior_target_data, set_inferior_target_data)
2661 (inferior_regcache_data, set_inferior_regcache_data): Move to
2662 inferiors.h, and include it.
2663 * inferiors.h: New file.
2664
2665 2013-09-05 Pedro Alves <palves@redhat.com>
2666
2667 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2668 Move ...
2669 * ax.h: ... here.
2670
2671 2013-09-05 Pedro Alves <palves@redhat.com>
2672
2673 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2674 tracepoint.h.
2675 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2676 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2677 (handle_tracepoint_general_set, handle_tracepoint_query)
2678 (tracepoint_finished_step, tracepoint_was_hit)
2679 (release_while_stepping_state_list, current_traceframe)
2680 (in_readonly_region, traceframe_read_mem)
2681 (fetch_traceframe_registers, traceframe_read_sdata)
2682 (traceframe_read_info, struct fast_tpoint_collect_status)
2683 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2684 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2685 (supply_fast_tracepoint_registers)
2686 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2687 (ipa_tdesc, claim_trampoline_space)
2688 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2689 (agent_mem_read, agent_get_trace_state_variable_value)
2690 (agent_set_trace_state_variable_value, agent_tsv_read)
2691 (agent_mem_read_string, get_raw_reg_func_addr)
2692 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2693 * tracepoint.h: ... this new file.
2694
2695 2013-09-05 Pedro Alves <palves@redhat.com>
2696
2697 * server.h (perror_with_name, error, fatal, warning, paddress)
2698 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2699 include it.
2700 * utils.h: New file.
2701
2702 2013-09-05 Pedro Alves <palves@redhat.com>
2703
2704 * server.h (remote_debug, noack_mode, transport_is_reliable)
2705 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2706 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2707 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2708 (write_enn, initialize_async_io, enable_async_io)
2709 (disable_async_io, check_remote_input_interrupt_request)
2710 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2711 (dead_thread_notify, prepare_resume_reply)
2712 (decode_address_to_semicolon, decode_address, decode_m_packet)
2713 (decode_M_packet, decode_X_packet, decode_xfer_write)
2714 (decode_search_memory_packet, unhexify, hexify)
2715 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2716 (look_up_one_symbol, relocate_instruction)
2717 (monitor_output): Move to remote-utils.h, and include it.
2718 * remote-utils.h: New file.
2719
2720 2013-09-05 Pedro Alves <palves@redhat.com>
2721
2722 * server.h (_): Delete.
2723
2724 2013-09-02 Pedro Alves <palves@redhat.com>
2725
2726 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2727 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2728 allocated.
2729 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2730
2731 2013-09-02 Pierre Muller <muller@sourceware.org>
2732
2733 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2734 or WriteProcessMemory complete successfully and handle
2735 ERROR_PARTIAL_COPY error.
2736
2737 2013-09-02 Pedro Alves <palves@redhat.com>
2738
2739 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2740 error instead of EIO.
2741
2742 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2743
2744 PR server/15604
2745 * linux-low.c: Include filestuff.h.
2746 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2747 * lynx-low.c: Include filestuff.h.
2748 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2749 * server.c: Include filestuff.h.
2750 (main): Call notice_open_fds.
2751 * spu-low.c: Include filestuff.h.
2752 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2753
2754 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2755
2756 * Makefile.in: Explain why ../target and ../nat are not
2757 listed as include file search paths.
2758 (linux-waitpid.o): New object file rule.
2759 * configure.srv (srv_native_linux_obj): New variable.
2760 Replace all occurrences of linux native object files with
2761 $srv_native_linux_obj.
2762 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2763 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2764 (linux_enable_event_reporting): Remove declaration.
2765 (my_waitpid): Moved to common/linux-waitpid.c.
2766 (linux_wait_for_event): Pass ptid when calling
2767 linux_enable_event_reporting.
2768 (linux_supports_tracefork_flag): Remove.
2769 (linux_enable_event_reporting): Likewise.
2770 (linux_tracefork_grandchild): Remove.
2771 (STACK_SIZE): Moved to common/linux-ptrace.c.
2772 (linux_tracefork_child): Remove.
2773 (linux_test_for_tracefork): Remove.
2774 (linux_look_up_symbols): Call linux_supports_traceclone.
2775 (initialize_low): Remove call to linux_test_for_tracefork.
2776 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2777 common/linux-ptrace.h.
2778 (PTRACE_TYPE_ARG4): Likewise.
2779 Include linux-ptrace.h.
2780
2781 2013-08-21 Pedro Alves <palves@redhat.com>
2782
2783 * config.in: Renegerate.
2784
2785 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2786
2787 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2788 (SFILES): Remove $(srcdir)/common/target-common.c and
2789 add $(srcdir)/target/waitstatus.c.
2790 (OBS): Remove target-common.o and add waitstatus.o.
2791 (server_h): Remove $(srcdir)/../common/target-common.h and
2792 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2793 and $(srcdir)/../target/waitstatus.h.
2794 (target-common.o): Remove.
2795 (waitstatus.o): New target object file.
2796 * target.h: Do not include target-common.h and
2797 include target/resume.h, target/wait.h and
2798 target/waitstatus.h.
2799
2800 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2801
2802 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2803 to PTRACE_TYPE_ARG3.
2804 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2805 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2806 PTRACE_TYPE_ARG4.
2807 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2808 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2809
2810 2013-07-27 Jie Zhang <jie@codesourcery.com>
2811 Daniel Jacobowitz <dan@codesourcery.com>
2812 Yao Qi <yao@codesourcery.com>
2813
2814 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2815 (mips-linux-watch.o): New rule.
2816 (mips_linux_watch_h): New variable.
2817 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2818 srv_tgtobj.
2819 * linux-mips-low.c: Include mips-linux-watch.h.
2820 (struct arch_process_info, struct arch_lwp_info): New.
2821 (update_watch_registers_callback): New function.
2822 (mips_linux_new_process, mips_linux_new_thread) New functions.
2823 (mips_linux_prepare_to_resume, mips_insert_point): New
2824 functions.
2825 (mips_remove_point, mips_stopped_by_watchpoint): New
2826 functions.
2827 (rsp_bp_type_to_target_hw_bp_type): New function.
2828 (mips_stopped_data_address): New function.
2829 (the_low_target): Add watchpoint support functions.
2830
2831 2013-07-27 Yao Qi <yao@codesourcery.com>
2832
2833 * i386-low.c: Include break-common.h.
2834 (enum target_hw_bp_type): Remove.
2835
2836 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2837
2838 * Makefile.in (SFILES): /common/target-common.c.
2839 (OBS): Add target-common.o.
2840 (server_h): Add $(srcdir)/../common/target-common.h.
2841 (target-common.o): New target.
2842 * server.c (queue_stop_reply_callback): Free
2843 status string after use.
2844 * target.c (target_waitstatus_to_string): Remove.
2845 * target.h: Include target-common.h.
2846 (resume_kind): Likewise.
2847 (target_waitkind): Likewise.
2848 (target_waitstatus): Likewise.
2849 (TARGET_WNOHANG): Likewise.
2850
2851 2013-07-04 Yao Qi <yao@codesourcery.com>
2852
2853 * Makefile.in (host_alias): Use @host_noncanonical@.
2854 (target_alias): Use @target_noncanonical@.
2855 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2856 ACX_NONCANONICAL_HOST.
2857 * configure: Regenerated.
2858
2859 Revert:
2860 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2861
2862 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2863 * configure: Rebuild.
2864 * Makefile.in (version_host, version_target): Get from configure.
2865 (version.c): Use $(version_host) and $(version_target).
2866
2867 2013-07-03 Pedro Alves <palves@redhat.com>
2868
2869 * Makefile.in (config.status): Depend on development.sh.
2870 * acinclude.m4: Include libmcheck.m4.
2871 * configure: Regenerate.
2872
2873 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2874
2875 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2876 attribute inside the parentheses.
2877 (winapi_DebugSetProcessKillOnExit): Ditto.
2878 (winapi_DebugBreakProcess): Ditto.
2879 (winapi_GenerateConsoleCtrlEvent): Ditto.
2880
2881 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2882
2883 * notif.h (notif_event): Add a dummy member to avoid compiler
2884 errors.
2885
2886 2013-07-01 Pedro Alves <palves@redhat.com>
2887
2888 * hostio.c (HOSTIO_PATH_MAX): Define.
2889 (require_filename, handle_open, handle_unlink, handle_readlink):
2890 Use it.
2891
2892 2013-07-01 Pedro Alves <palves@redhat.com>
2893
2894 * server.h: Include "pathmax.h".
2895 * linux-low.c: Don't include sys/param.h.
2896 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2897 MAXPATHLEN.
2898 * win32-low.c: Don't include sys/param.h.
2899 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2900
2901 2013-07-01 Pedro Alves <palves@redhat.com>
2902
2903 * event-loop.c: Don't check HAVE_UNISTD_H before including
2904 <unistd.h>.
2905 * gdbreplay.c: Likewise.
2906 * remote-utils.c: Likewise.
2907 * server.c: Likewise.
2908 * configure.ac: Don't check for unistd.h.
2909 * configure: Regenerate.
2910
2911 2013-06-28 Tom Tromey <tromey@redhat.com>
2912
2913 * Makefile.in (version.c): Use version.in, not
2914 common/version.in.
2915
2916 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2917
2918 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2919 * configure: Rebuild.
2920 * Makefile.in (version_host, version_target): Get from configure.
2921 (version.c): Use $(version_host) and $(version_target).
2922
2923 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2924
2925 Fix trace-status to output user name without trailing colon.
2926 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2927
2928 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2929
2930 Fix trace-status to output proper start-time and stop-time.
2931 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2932 output start time and stop time in hex as gdb expects.
2933
2934 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2935
2936 * tracepoint.c (build_traceframe_info_xml): Output trace state
2937 variables present in the trace buffer.
2938
2939 2013-06-24 Tom Tromey <tromey@redhat.com>
2940
2941 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2942 create-version.sh.
2943 (version.o): Remove.
2944 * gdbreplay.c: Include version.h.
2945 (version, host_name): Don't declare.
2946 * server.h: Include version.h.
2947 (version, host_name): Don't declare.
2948
2949 2013-06-12 Pedro Alves <palves@redhat.com>
2950
2951 * linux-x86-low.c (linux_is_elf64): Delete global.
2952 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2953 with local linux_pid_exe_is_elf_64_file use.
2954
2955 2013-06-11 Pedro Alves <palves@redhat.com>
2956
2957 * linux-low.c (regset_disabled, disable_regset): New functions.
2958 (regsets_fetch_inferior_registers)
2959 (regsets_store_inferior_registers): Use them.
2960 (initialize_regsets_info); Don't allocate the disabled_regsets
2961 array here.
2962 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2963 comment.
2964
2965 2013-06-11 Pedro Alves <palves@redhat.com>
2966
2967 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2968 xmalloc.
2969
2970 2013-06-11 Pedro Alves <palves@redhat.com>
2971
2972 * linux-x86-low.c (initialize_low_arch): Call
2973 init_registers_x32_avx_linux.
2974
2975 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2976
2977 Fix compatibility with Android Bionic.
2978 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2979 it is not empty.
2980
2981 2013-06-07 Pedro Alves <palves@redhat.com>
2982
2983 PR server/14823
2984 * Makefile.in (OBS): Add tdesc.o.
2985 (IPA_OBJS): Add tdesc-ipa.o.
2986 (tdesc-ipa.o): New rule.
2987 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2988 interface.
2989 * linux-low.c (new_inferior): Delete.
2990 (disabled_regsets, num_regsets): Delete.
2991 (linux_add_process): Adjust to set the new per-process
2992 new_inferior flag.
2993 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2994 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2995 was a stop. When calling arch_setup, switch the current inferior
2996 to the thread that got an event.
2997 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2998 (regsets_fetch_inferior_registers)
2999 (regsets_store_inferior_registers): New regsets_info parameter.
3000 Adjust to use it.
3001 (linux_register_in_regsets): New regs_info parameter. Adjust to
3002 use it.
3003 (register_addr, fetch_register, store_register): New usrregs_info
3004 parameter. Adjust to use it.
3005 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3006 parameter regs_info. Adjust to use it.
3007 (linux_fetch_registers): Get the current inferior's regs_info, and
3008 adjust to use it.
3009 (linux_store_registers): Ditto.
3010 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3011 (initialize_low): Don't initialize the target_regsets here. Call
3012 initialize_low_arch.
3013 * linux-low.h (target_regsets): Delete declaration.
3014 (struct regsets_info): New.
3015 (struct usrregs_info): New.
3016 (struct regs_info): New.
3017 (struct process_info_private) <new_inferior>: New field.
3018 (struct linux_target_ops): Delete the num_regs, regmap, and
3019 regset_bitmap fields. New field regs_info.
3020 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3021 * i387-fp.c (num_xmm_registers): Delete.
3022 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3023 calls to new interface.
3024 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3025 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3026 Infer the number of xmm registers from the regcache's target
3027 description.
3028 * i387-fp.h (num_xmm_registers): Delete.
3029 * inferiors.c (add_thread): Don't install the thread's regcache
3030 here.
3031 * proc-service.c (gregset_info): Fetch the current inferior's
3032 regs_info. Adjust to use it.
3033 * regcache.c: Include tdesc.h.
3034 (register_bytes, reg_defs, num_registers)
3035 (gdbserver_expedite_regs): Delete.
3036 (get_thread_regcache): If the thread doesn't have a regcache yet,
3037 create one, instead of aborting gdbserver.
3038 (regcache_invalidate_one): Rename to ...
3039 (regcache_invalidate_thread): ... this.
3040 (regcache_invalidate_one): New.
3041 (regcache_invalidate): Only invalidate registers of the current
3042 process.
3043 (init_register_cache): Add target_desc parameter, and use it.
3044 (new_register_cache): Ditto. Assert the target description has a
3045 non zero registers_size.
3046 (regcache_cpy): Add assertions. Adjust.
3047 (realloc_register_cache, set_register_cache): Delete.
3048 (registers_to_string, registers_from_string): Adjust.
3049 (find_register_by_name, find_regno, find_register_by_number)
3050 (register_cache_size): Add target_desc parameter, and use it.
3051 (free_register_cache_thread, free_register_cache_thread_one)
3052 (regcache_release, register_cache_size): New.
3053 (register_size): Add target_desc parameter, and use it.
3054 (register_data, supply_register, supply_register_zeroed)
3055 (supply_regblock, supply_register_by_name, collect_register)
3056 (collect_register_as_string, collect_register_by_name): Adjust.
3057 * regcache.h (struct target_desc): Forward declare.
3058 (struct regcache) <tdesc>: New field.
3059 (init_register_cache, new_register_cache): Add target_desc
3060 parameter.
3061 (regcache_invalidate_thread): Declare.
3062 (regcache_invalidate_one): Delete declaration.
3063 (regcache_release): Declare.
3064 (find_register_by_number, register_cache_size, register_size)
3065 (find_regno): Add target_desc parameter.
3066 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3067 declarations.
3068 * remote-utils.c: Include tdesc.h.
3069 (outreg, prepare_resume_reply): Adjust.
3070 * server.c: Include tdesc.h.
3071 (gdbserver_xmltarget): Delete declaration.
3072 (get_features_xml, process_serial_event): Adjust.
3073 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3074 declare.
3075 (struct process_info) <tdesc>: New field.
3076 (ipa_tdesc): Declare.
3077 * tdesc.c: New file.
3078 * tdesc.h: New file.
3079 * tracepoint.c: Include tdesc.h.
3080 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3081 (get_context_regcache): Adjust to pass ipa_tdesc down.
3082 (do_action_at_tracepoint): Adjust to get the register cache size
3083 from the context regcache's description.
3084 (traceframe_walk_blocks): Adjust to get the register cache size
3085 from the current trace frame's description.
3086 (traceframe_get_pc): Adjust to get current trace frame's
3087 description and pass it down.
3088 (gdb_collect): Adjust to get the register cache size from the
3089 IPA's description.
3090 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3091 (gdbserver_xmltarget): Delete.
3092 (initialize_low_tracepoint): Set the ipa's target description.
3093 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3094 (initialize_low_tracepoint): Set the ipa's target description.
3095 * linux-x86-low.c: Include tdesc.h.
3096 [__x86_64__] (is_64bit_tdesc): New.
3097 (ps_get_thread_area, x86_get_thread_area): Use it.
3098 (i386_cannot_store_register): Rename to ...
3099 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3100 (i386_cannot_fetch_register): Rename to ...
3101 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3102 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3103 to new interface.
3104 (target_regsets): Rename to ...
3105 (x86_regsets): ... this.
3106 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3107 interface.
3108 (x86_siginfo_fixup): Use is_64bit_tdesc.
3109 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3110 (tdesc_x32_avx_linux, tdesc_x32_linux)
3111 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3112 Declare.
3113 (x86_linux_update_xmltarget): Delete.
3114 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3115 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3116 (AMD64_LINUX_USER64_CS): New.
3117 (x86_linux_read_description): New, based on
3118 x86_linux_update_xmltarget.
3119 (same_process_callback): New.
3120 (x86_arch_setup_process_callback): New.
3121 (x86_linux_update_xmltarget): New.
3122 (x86_regsets_info): New.
3123 (amd64_linux_regs_info): New.
3124 (i386_linux_usrregs_info): New.
3125 (i386_linux_regs_info): New.
3126 (x86_linux_regs_info): New.
3127 (x86_arch_setup): Reimplement.
3128 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3129 (x86_emit_ops): Ditto.
3130 (the_low_target): Adjust. Install x86_linux_regs_info,
3131 x86_cannot_fetch_register, and x86_cannot_store_register.
3132 (initialize_low_arch): New.
3133 * linux-ia64-low.c (tdesc_ia64): Declare.
3134 (ia64_fetch_register): Adjust.
3135 (ia64_usrregs_info, regs_info): New globals.
3136 (ia64_regs_info): New function.
3137 (the_low_target): Adjust.
3138 (initialize_low_arch): New function.
3139 * linux-sparc-low.c (tdesc_sparc64): Declare.
3140 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3141 Adjust.
3142 (sparc_arch_setup): New function.
3143 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3144 (the_low_target): Adjust.
3145 (initialize_low_arch): New function.
3146 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3147 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3148 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3149 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3150 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3151 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3152 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3153 (tdesc_powerpc_isa205_vsx64l): Declare.
3154 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3155 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3156 (ppc_set_pc, ppc_get_hwcap): Adjust.
3157 (ppc_usrregs_info): Forward declare.
3158 (!__powerpc64__) ppc_regmap_adjusted: New global.
3159 (ppc_arch_setup): Adjust to the current process'es target
3160 description.
3161 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3162 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3163 (ppc_store_evrregset): Adjust.
3164 (target_regsets): Rename to ...
3165 (ppc_regsets): ... this, and make static.
3166 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3167 (ppc_regs_info): New function.
3168 (the_low_target): Adjust.
3169 (initialize_low_arch): New function.
3170 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3171 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3172 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3173 (tdesc_s390x_linux64v2): Declare.
3174 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3175 (s390_fill_gregset, s390_store_last_break): Adjust.
3176 (target_regsets): Rename to ...
3177 (s390_regsets): ... this, and make static.
3178 (s390_get_pc, s390_set_pc): Adjust.
3179 (s390_get_hwcap): New target_desc parameter, and use it.
3180 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3181 (s390_arch_setup): Adjust to set the current process'es target
3182 description. Don't adjust the regmap.
3183 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3184 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3185 (regs_info_3264): New globals.
3186 (s390_regs_info): New function.
3187 (the_low_target): Adjust.
3188 (initialize_low_arch): New function.
3189 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3190 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3191 [__mips64] (init_registers_mips_linux)
3192 (init_registers_mips_dsp_linux): Delete defines.
3193 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3194 (have_dsp): New global.
3195 (mips_read_description): New, based on mips_arch_setup.
3196 (mips_arch_setup): Reimplement.
3197 (get_usrregs_info): New function.
3198 (mips_cannot_fetch_register, mips_cannot_store_register)
3199 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3200 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3201 (target_regsets): Rename to ...
3202 (mips_regsets): ... this, and make static.
3203 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3204 (dsp_regs_info, regs_info): New globals.
3205 (mips_regs_info): New function.
3206 (the_low_target): Adjust.
3207 (initialize_low_arch): New function.
3208 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3209 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3210 Declare.
3211 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3212 (arm_read_description): New, with bits factored from
3213 arm_arch_setup.
3214 (arm_arch_setup): Reimplement.
3215 (target_regsets): Rename to ...
3216 (arm_regsets): ... this, and make static.
3217 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3218 (arm_regs_info): New function.
3219 (the_low_target): Adjust.
3220 (initialize_low_arch): New function.
3221 * linux-m68k-low.c (tdesc_m68k): Declare.
3222 (target_regsets): Rename to ...
3223 (m68k_regsets): ... this, and make static.
3224 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3225 (m68k_regs_info): New function.
3226 (m68k_arch_setup): New function.
3227 (the_low_target): Adjust.
3228 (initialize_low_arch): New function.
3229 * linux-sh-low.c (tdesc_sharch): Declare.
3230 (target_regsets): Rename to ...
3231 (sh_regsets): ... this, and make static.
3232 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3233 (sh_regs_info, sh_arch_setup): New functions.
3234 (the_low_target): Adjust.
3235 (initialize_low_arch): New function.
3236 * linux-bfin-low.c (tdesc_bfin): Declare.
3237 (bfin_arch_setup): New function.
3238 (bfin_usrregs_info, regs_info): New globals.
3239 (bfin_regs_info): New function.
3240 (the_low_target): Adjust.
3241 (initialize_low_arch): New function.
3242 * linux-cris-low.c (tdesc_cris): Declare.
3243 (cris_arch_setup): New function.
3244 (cris_usrregs_info, regs_info): New globals.
3245 (cris_regs_info): New function.
3246 (the_low_target): Adjust.
3247 (initialize_low_arch): New function.
3248 * linux-cris-low.c (tdesc_crisv32): Declare.
3249 (cris_arch_setup): New function.
3250 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3251 (cris_regs_info): New function.
3252 (the_low_target): Adjust.
3253 (initialize_low_arch): New function.
3254 * linux-m32r-low.c (tdesc_m32r): Declare.
3255 (m32r_arch_setup): New function.
3256 (m32r_usrregs_info, regs_info): New globals.
3257 (m32r_regs_info): Adjust.
3258 (initialize_low_arch): New function.
3259 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3260 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3261 (tic6x_usrregs_info): Forward declare.
3262 (tic6x_read_description): New function, based on ...
3263 (tic6x_arch_setup): ... this. Reimplement.
3264 (target_regsets): Rename to ...
3265 (tic6x_regsets): ... this, and make static.
3266 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3267 (tic6x_regs_info): New function.
3268 (the_low_target): Adjust.
3269 (initialize_low_arch): New function.
3270 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3271 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3272 (target_regsets): Rename to ...
3273 (xtensa_regsets): ... this, and make static.
3274 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3275 globals.
3276 (xtensa_arch_setup, xtensa_regs_info): New functions.
3277 (the_low_target): Adjust.
3278 (initialize_low_arch): New function.
3279 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3280 (nios2_arch_setup): Set the current process'es tdesc.
3281 (target_regsets): Rename to ...
3282 (nios2_regsets): ... this.
3283 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3284 (nios2_regs_info): New function.
3285 (the_low_target): Adjust.
3286 (initialize_low_arch): New function.
3287 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3288 (aarch64_arch_setup): Set the current process'es tdesc.
3289 (target_regsets): Rename to ...
3290 (aarch64_regsets): ... this.
3291 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3292 (aarch64_regs_info): New function.
3293 (the_low_target): Adjust.
3294 (initialize_low_arch): New function.
3295 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3296 globals.
3297 (target_regsets): Rename to ...
3298 (tile_regsets): ... this.
3299 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3300 (tile_regs_info): New function.
3301 (tile_arch_setup): Set the current process'es tdesc.
3302 (the_low_target): Adjust.
3303 (initialize_low_arch): New function.
3304 * spu-low.c (tdesc_spu): Declare.
3305 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3306 * win32-arm-low.c (tdesc_arm): Declare.
3307 (arm_arch_setup): New function.
3308 (the_low_target): Install arm_arch_setup instead of
3309 init_registers_arm.
3310 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3311 (init_windows_x86): Rename to ...
3312 (i386_arch_setup): ... this. Set `win32_tdesc'.
3313 (the_low_target): Adjust.
3314 * win32-low.c (win32_tdesc): New global.
3315 (child_add_thread): Don't create the thread cache here.
3316 (do_initial_child_stuff): Set the new process'es tdesc.
3317 * win32-low.h (struct target_desc): Forward declare.
3318 (win32_tdesc): Declare.
3319 * lynx-i386-low.c (tdesc_i386): Declare global.
3320 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3321 * lynx-low.c (lynx_tdesc): New global.
3322 (lynx_add_process): Set the new process'es tdesc.
3323 * lynx-low.h (struct target_desc): Forward declare.
3324 (lynx_tdesc): Declare global.
3325 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3326 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3327 * nto-low.c (nto_tdesc): New global.
3328 (do_attach): Set the new process'es tdesc.
3329 * nto-low.h (struct target_desc): Forward declare.
3330 (nto_tdesc): Declare.
3331 * nto-x86-low.c (tdesc_i386): Declare.
3332 (nto_x86_arch_setup): Set `nto_tdesc'.
3333
3334 2013-06-04 Gary Benson <gbenson@redhat.com>
3335
3336 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3337 to qSupported response when appropriate.
3338 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3339 with nonzero-length annex.
3340 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3341 arguments supplied in annex.
3342
3343 2013-05-31 Doug Evans <dje@google.com>
3344
3345 PR server/15594
3346 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3347 64 bits in 64-cross-32 environment.
3348
3349 2013-05-28 Pedro Alves <palves@redhat.com>
3350
3351 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3352 (aarch64-without-fpu.c): Delete rule.
3353 * configure.srv (aarch64*-*-linux*): Remove references to
3354 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3355 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3356 declaration.
3357
3358 2013-05-24 Pedro Alves <palves@redhat.com>
3359
3360 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3361 instead of strchr/decode_address. Error if the range isn't split
3362 with a ','. Don't assume there's be a ':' in the action.
3363
3364 2013-05-23 Yao Qi <yao@codesourcery.com>
3365 Pedro Alves <palves@redhat.com>
3366
3367 * linux-low.c (lwp_in_step_range): New function.
3368 (linux_wait_1): If the thread was range stepping and stopped
3369 outside the stepping range, report the stop to GDB. Otherwise,
3370 continue stepping. Add range stepping debug output.
3371 (linux_set_resume_request): Copy the step range from the resume
3372 request to the lwp.
3373 (linux_supports_range_stepping): New.
3374 (linux_target_ops) <supports_range_stepping>: Set to
3375 linux_supports_range_stepping.
3376 * linux-low.h (struct linux_target_ops)
3377 <supports_range_stepping>: New field.
3378 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3379 * linux-x86-low.c (x86_supports_range_stepping): New.
3380 (the_low_target) <supports_range_stepping>: Set to
3381 x86_supports_range_stepping.
3382 * server.c (handle_v_cont): Handle 'r' action.
3383 (handle_v_requests): Append ";r" if the target supports range
3384 stepping.
3385 * target.h (struct thread_resume) <step_range_start,
3386 step_range_end>: New fields.
3387 (struct target_ops) <supports_range_stepping>:
3388 New field.
3389 (target_supports_range_stepping): New macro.
3390
3391 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3392
3393 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3394 confusion in comment.
3395
3396 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3397
3398 * lynx-low.c (struct process_info_private): New type.
3399 (lynx_add_process): New function.
3400 (lynx_create_inferior, lynx_attach): Replace calls to
3401 add_process by calls to lynx_add_process.
3402 (lynx_resume): If PTID is null, then try using
3403 current_process()->private->last_wait_event_ptid.
3404 Add comments.
3405 (lynx_clear_inferiors): Delete. The contents of that function
3406 has been inlined in lynx_mourn;
3407 (lynx_wait_1): Save the ptid in the process's private data.
3408 (lynx_mourn): Free the process' private data. Replace call
3409 to lynx_clear_inferiors by call to clear_inferiors.
3410
3411 2013-05-17 Yao Qi <yao@codesourcery.com>
3412
3413 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3414 the right place.
3415
3416 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3417
3418 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3419 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3420 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3421 PT_TEXT_END_ADDR guards. Update comments.
3422 (linux_target_op) <read_offsets>: Conditionally define to
3423 linux_read_offsets if the target is UCLIBC and if it defines
3424 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3425
3426 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3427 Andrew Jenner <andrew@codesourcery.com>
3428
3429 * Makefile.in (SFILES): Add linux-nios2-low.c.
3430 (clean): Add action to delete nios2-linux.c.
3431 (nios2-linux.c): New rule.
3432 * configure.srv: Add nios2*-*-linux*.
3433 * linux-nios2-low.c: New.
3434
3435 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3436
3437 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3438
3439 2013-04-25 Hui Zhu <hui@codesourcery.com>
3440
3441 PR gdb/15186
3442 * ax.c (ax_printf): Add fflush.
3443
3444 2013-04-22 Tom Tromey <tromey@redhat.com>
3445
3446 * Makefile.in (SFILES): Add filestuff.c.
3447 (OBS): Add filestuff.o.
3448 (filestuff.o): New target.
3449 * config.in, configure: Rebuild.
3450 * configure.ac: Check for fdwalk, pipe2.
3451
3452 2013-04-17 Pedro Alves <palves@redhat.com>
3453
3454 * configure.ac (USE_THREAD_DB): Delete variable.
3455 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3456 Don't AC_SUBST USE_THREAD_DB.
3457 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3458 * config.in, configure: Regenerate.
3459
3460 2013-04-16 Pedro Alves <palves@redhat.com>
3461
3462 * linux-low.h (struct lwp_info) <thread_known>: Move under
3463 the USE_THREAD_DB #ifdef.
3464
3465 2013-04-16 Pedro Alves <palves@redhat.com>
3466
3467 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3468 (linux-low.o): Delete rule.
3469 * linux-low.h: Always include "gdb_thread_db.h" instead of
3470 conditionally including thread_db.h.
3471 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3472 HAVE_THREAD_DB_H.
3473
3474 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3475
3476 * Makefile.in (install-only): Fix make install regression.
3477
3478 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3479
3480 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3481 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3482 installation.
3483 * gdbserver.1: Remove.
3484
3485 2013-03-22 Pedro Alves <palves@redhat.com>
3486
3487 * linux-low.c (handle_extended_wait): Don't call
3488 linux_enable_event_reporting.
3489
3490 2013-03-15 Tony Theodore <tonyt@logyst.com>
3491
3492 PR build/9098:
3493 * Makefile.in (SHELL): Use @SHELL@.
3494
3495 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3496
3497 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3498 compiler warning.
3499
3500 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3501
3502 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3503 Remove extraneous NULL element.
3504
3505 2013-03-13 Yao Qi <yao@codesourcery.com>
3506
3507 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3508 'V' block in trace frame.
3509
3510 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3511
3512 * target.h (struct target_ops): Add btrace ops.
3513 (target_supports_btrace): New macro.
3514 (target_enable_btrace): New macro.
3515 (target_disable_btrace): New macro.
3516 (target_read_btrace): New macro.
3517 * gdbthread.h (struct thread_info): Add btrace field.
3518 * server.c: Include btrace-common.h.
3519 (handle_btrace_general_set): New function.
3520 (handle_btrace_enable): New function.
3521 (handle_btrace_disable): New function.
3522 (handle_general_set): Call handle_btrace_general_set.
3523 (handle_qxfer_btrace): New function.
3524 (struct qxfer qxfer_packets[]): Add btrace entry.
3525 * inferiors.c (remove_thread): Disable btrace.
3526 * linux-low: Include linux-btrace.h.
3527 (linux_low_enable_btrace): New function.
3528 (linux_low_read_btrace): New function.
3529 (linux_target_ops): Add btrace ops.
3530 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3531 Add srv_linux_btrace=yes.
3532 (x86_64-*-linux*): Add linux-btrace.o.
3533 Add srv_linux_btrace=yes.
3534 * configure.ac: Define HAVE_LINUX_BTRACE.
3535 * config.in: Regenerated.
3536 * configure: Regenerated.
3537
3538 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3539
3540 * server.c (handle_qxfer): Preserve error message if -3 is
3541 returned.
3542 (qxfer): Document the -3 return value.
3543
3544 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3545
3546 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3547 (linux_btrace_h): New variable.
3548 (linux-btrace.o): New rule.
3549
3550 2013-03-08 Stan Shebs <stan@codesourcery.com>
3551 Hafiz Abid Qadeer <abidh@codesourcery.com>
3552
3553 * tracepoint.c (trace_buffer_size): New global.
3554 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3555 (init_trace_buffer): Change to one-argument function. Allocate
3556 trace buffer memory.
3557 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3558 handle QTBuffer:size packet.
3559 (cmd_bigqtbuffer_size): New function.
3560 (initialize_tracepoint): Call init_trace_buffer with
3561 DEFAULT_TRACE_BUFFER_SIZE.
3562 * server.c (handle_query): Add QTBuffer:size in the
3563 supported packets.
3564
3565 2013-03-07 Yao Qi <yao@codesourcery.com>
3566
3567 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3568 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3569 of -1.
3570 (cmd_qtsp): Adjust condition. Do post increment.
3571 Set cur_action and cur_step_action back to 0.
3572
3573 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3574
3575 PR server/15236
3576 * linux-low.c (linux_write_memory): Return early success if LEN is
3577 zero.
3578
3579 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3580
3581 * configure.srv: Add x86_64-*-cygwin* as target.
3582
3583 2013-02-28 Tom Tromey <tromey@redhat.com>
3584
3585 * configure.ac: Invoke AC_SYS_LARGEFILE.
3586 * configure, config.in: Rebuild.
3587
3588 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3589
3590 * win32-low.c: Throughout, fix format strings and casts of
3591 printf-like functions to avoid type related warnings on all
3592 platforms.
3593 (get_child_debug_event): Print dwDebugEventCode as hex since
3594 that's how it's usually documented.
3595
3596 2013-02-28 Yao Qi <yao@codesourcery.com>
3597
3598 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3599 pulongest.
3600
3601 2013-02-27 Jiong Wang <jiwang@tilera.com>
3602
3603 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3604 (reg-tilegx32.c): New rule.
3605 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3606 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3607 different register info initializer according to elf class.
3608 (init_registers_tilgx32): New function. The tilegx32 register info
3609 initializer.
3610 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3611 (tile_store_gregset): Likewise.
3612
3613 2013-02-27 Yao Qi <yao@codesourcery.com>
3614
3615 * server.c (process_point_options): Print debug message when
3616 debug_threads is true.
3617
3618 2013-02-26 Yao Qi <yao@codesourcery.com>
3619
3620 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3621
3622 2013-02-19 Pedro Alves <palves@redhat.com>
3623 Kai Tietz <ktietz@redhat.com>
3624
3625 PR gdb/15161
3626
3627 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3628 instead of strtoul to extract address from packet.
3629 (process_serial_event) <'z'>: Likewise.
3630
3631 2013-02-18 Yao Qi <yao@codesourcery.com>
3632
3633 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3634
3635 2013-02-14 Pedro Alves <palves@redhat.com>
3636
3637 Plug memory leak.
3638
3639 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3640 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3641
3642 2013-02-14 Pedro Alves <palves@redhat.com>
3643
3644 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3645
3646 2013-02-14 Pedro Alves <palves@redhat.com>
3647
3648 * tracepoint.c (save_string): Delete.
3649 (add_tracepoint_action): Use savestring instead of save_string.
3650
3651 2013-02-12 Pedro Alves <palves@redhat.com>
3652
3653 * linux-xtensa-low.c: Ditto.
3654 * xtensa-xtregs.c: Ditto.
3655
3656 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3657
3658 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3659 thread_db.
3660
3661 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3662
3663 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3664 aarch64_num_wp_regs and aarch64_num_bp_regs to
3665 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3666
3667 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3668
3669 * linux-aarch64-low.c (ps_get_thread_area): Replace
3670 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3671
3672 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3673 Marcus Shawcroft <marcus.shawcroft@arm.com>
3674 Nigel Stephens <nigel.stephens@arm.com>
3675 Yufeng Zhang <yufeng.zhang@arm.com>
3676
3677 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3678 (aarch64.c, aarch64-without-fpu.c): New targets.
3679 * configure.srv (aarch64*-*-linux*): New.
3680 * linux-aarch64-low.c: New file.
3681
3682 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3683
3684 * linux-low.c (handle_extended_wait, linux_create_inferior)
3685 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3686 (dequeue_one_deferred_signal, linux_resume_one_thread)
3687 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3688 (linux_tracefork_grandchild, linux_test_for_tracefork)
3689 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3690 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3691 where the argument is 0.
3692
3693 2013-01-25 Yao Qi <yao@codesourcery.com>
3694
3695 * event-loop.c: Include "queue.h".
3696 (gdb_event_p): New typedef.
3697 (struct gdb_event) <next_event>: Remove.
3698 (event_queue): Change to QUEUE(gdb_event_p).
3699 (async_queue_event): Remove.
3700 (gdb_event_xfree): New.
3701 (initialize_event_loop): New.
3702 (process_event): Use API from QUEUE.
3703 (wait_for_event): Likewise.
3704 * server.c (main): Call initialize_event_loop.
3705 * server.h (initialize_event_loop): Declare.
3706
3707 2013-01-18 Yao Qi <yao@codesourcery.com>
3708
3709 * ax.h (struct eval_agent_expr_context): New.
3710 (gdb_eval_agent_expr): Update declaration.
3711 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3712 TFRAME. Add new argument CTX.
3713 * server.h (struct eval_agent_expr_context): Declare.
3714 (agent_mem_read, agent_tsv_read): Update declaration.
3715 (agent_mem_read_string): Likewise.
3716 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3717 (add_traceframe_block): Add new argument TPOINT.
3718 Increase TPOINT->traceframe_usage.
3719 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3720 eval_tracepoint_agent_expr.
3721 (condition_true_at_tracepoint): Likewise.
3722 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3723 (agent_mem_read_string, agent_tsv_read): Likewise.
3724
3725 2013-01-16 Yao Qi <yao@codesourcery.com>
3726
3727 * linux-low.c (linux_resume_one_lwp): Don't check
3728 'lwp->bp_reinsert != 0'.
3729
3730 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3731 Pedro Alves <palves@redhat.com>
3732
3733 * lynx-low.c (ptrace_request_to_str): Define a temporary
3734 macro and use it to simplify this function's implementation.
3735
3736 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3737
3738 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3739 sets errno.
3740
3741 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3742
3743 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3744
3745 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3746
3747 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3748
3749 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3750
3751 * lynx-low.c (lynx_resume): Use the resume_info parameter
3752 to determine the ptid for the lynx_ptrace call, unless
3753 it is equal to minus_one_ptid, in which case we use the
3754 ptid of the current_inferior.
3755 (lynx_wait_1): After having received a thread create/exit
3756 event, resume the inferior's execution using the signaling
3757 thread's ptid, rather than the old ptid.
3758
3759 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3760
3761 * lynx-low.c (lynx_resume): Delete variable ret.
3762
3763 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3764
3765 * gdbreplay.c (gdbreplay_version): Update copyright year.
3766 * server.c (gdbserver_version): Likewise.
3767
3768 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3769
3770 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3771 new thread.
3772
3773 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3774
3775 * lynx-low.c (ptrace_request_to_str): Add handling for
3776 PTRACE_GETTRACESIG.
3777
3778 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3779
3780 * lynx-low.c (lynx_attach): Delete variable new_process.
3781
3782 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3783
3784 * lynx-low.c (lynx_create_inferior): Delete variable
3785 new_process.
3786
3787 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3788
3789 * lynx-low.c (ptrace_request_to_str): Do not handle
3790 PTRACE_GETTHREADLIST if this macro does not exist.
3791
3792 2012-12-15 Yao Qi <yao@codesourcery.com>
3793
3794 * Makefile.in (OBS): Add notif.o.
3795 * notif.c, notif.h: New.
3796 * server.c: Include "notif.h".
3797 (struct vstop_notif) <next>: Remove.
3798 <base>: New field.
3799 (queue_stop_reply): Update.
3800 (push_event, send_next_stop_reply): Remove.
3801 (discard_queued_stop_replies): Update.
3802 (notif_stop): New variable.
3803 (handle_v_stopped): Remove.
3804 (handle_v_requests): Don't call handle_v_stopped. Call
3805 handle_ack_notif instead.
3806 (queue_stop_reply_callback): Call notif_event_enque instead
3807 of queue_stop_reply.
3808 (handle_status): Don't call send_next_stop_reply, call
3809 notif_write_event instead.
3810 (kill_inferior_callback): Likewise.
3811 (detach_or_kill_inferior_callback): Likewise.
3812 (main): Call initialize_notif.
3813 (process_serial_event): Call QUEUE_is_empty.
3814 (handle_target_event): Call notif_push instead of push event.
3815 * server.h (push_event): Remove declaration.
3816
3817 2012-12-10 Tom Tromey <tromey@redhat.com>
3818
3819 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3820 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3821 macros.
3822 (.c.o): Rewrite.
3823 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3824 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3825 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3826 (amd64-linux-ipa.o, ax.o): Rewrite.
3827 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3828 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3829 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3830 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3831 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3832 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3833 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3834 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3835 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3836 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3837 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3838 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3839 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3840 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3841 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3842 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3843 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3844 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3845 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3846 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3847 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3848 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3849 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3850 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3851 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3852 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3853 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3854 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3855 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3856 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3857 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3858 (reg-tilegx.o): Remove.
3859 (all_object_files): New macro.
3860 Include .deps files.
3861 * aclocal.m4, configure: Rebuild.
3862 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3863 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3864 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3865
3866 2012-12-05 Tom Tromey <tromey@redhat.com>
3867
3868 PR gdb/14917:
3869 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3870
3871 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3872
3873 * configure.ac: Check for linux/perf_event.h.
3874 * config.in: Regenerated.
3875 * configure: Regenerated.
3876
3877 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3878
3879 * hostio.c (handle_readlink): Decrease buffer size
3880 parameter passed to readlink by one byte.
3881
3882 2012-11-26 Yao Qi <yao@codesourcery.com>
3883
3884 * configure.ac (build_warnings): Append '-Wempty-body'.
3885 * configure: Regenerated.
3886 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3887 body.
3888
3889 2012-11-15 Pierre Muller <muller@sourceware.org>
3890
3891 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3892 * config.in: Regenerate.
3893 * configure: Regenerate.
3894 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3895 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3896 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3897 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3898 header.
3899 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3900 instead of <sys/wait.h> header.
3901 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3902
3903 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3904
3905 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3906 (various make rules): Remove -DGDBSERVER
3907
3908 2012-11-09 Yao Qi <yao@codesourcery.com>
3909
3910 * spu-low.c (current_ptid): Move it to ..
3911 * gdbthread.h: ... here. New.
3912 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3913 * server.c (myresume, process_serial_event): Likewise.
3914 * thread-db.c (thread_db_find_new_threads): Likewise.
3915 * tracepoint.c (run_inferior_command): Likewise.
3916
3917 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3918
3919 * server.c (handle_search_memory_1): Include access length in
3920 warning message.
3921
3922 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3923
3924 * linux-crisv32-low.c: Fix compile errors.
3925
3926 2012-09-04 Yao Qi <yao@codesourcery.com>
3927
3928 * tracepoint.c (cmd_qtsv): Adjust debug message.
3929 Don't check CUR_TPOINT.
3930
3931 2012-08-28 Yao Qi <yao@codesourcery.com>
3932
3933 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3934 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3935 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3936 Remove declarations of xmalloc, xreallloc, xstrdup and
3937 freeargv.
3938 * Makefile.in (libiberty_h): New.
3939 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3940 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3941
3942 2012-08-23 Yao Qi <yao@codesourcery.com>
3943
3944 * server.h: Remove declaration of 'xsnprintf'.
3945
3946 2012-08-22 Keith Seitz <keiths@redhat.com>
3947
3948 * server.h: Include build-gnulib-gbserver/config.h.
3949 * gdbreplay.c: Likewise.
3950
3951 2012-08-08 Doug Evans <dje@google.com>
3952
3953 * Makefile.in (SFILES): Add gdb_vecs.c.
3954 (OBS): Add gdb_vecs.o.
3955 (gdb_vecs_h, host_defs_h): New variables.
3956 (thread-db.o): Add $(gdb_vecs_h) dependency.
3957 (gdb_vecs.o): New rule.
3958 * thread-db.c: #include "gdb_vecs.h".
3959 (thread_db_load_search): Use a vector to iterate over path elements.
3960 Handle text appearing after "$pdir".
3961
3962 * configure.ac: Add check for strstr.
3963 * config.in: Regenerate.
3964 * configure: Regenerate.
3965
3966 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3967
3968 * hostio.c (handle_pread): If pread fails, fall back to attempting
3969 lseek/read.
3970 (handle_pwrite): Likewise for pwrite.
3971
3972 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3973
3974 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3975 between unsupported TYPE and unimplementable ADDR/LEN combination.
3976 (arm_insert_point): Act on new return value.
3977
3978 2012-07-31 Pedro Alves <palves@redhat.com>
3979
3980 * server.c (process_point_options): Only skip tokens if we find
3981 one that is unrecognized. Don't treat 'X' specially while
3982 skipping unrecognized tokens.
3983
3984 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3985
3986 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3987 to 4-byte-align HW breakpoint addresses for Thumb.
3988
3989 2012-07-27 Yao Qi <yao@codesourcery.com>
3990
3991 PR remote/14161.
3992
3993 * server.h: Declare gdb_agent_about_to_close.
3994 * target.c (kill_inferior): Include "agent.h".
3995 New. Send command 'kill'.
3996 * target.h (kill_inferior): Removed macro.
3997 * tracepoint.c (gdb_agent_about_to_close): New.
3998 (gdb_agent_helper_thread): Handle command 'close'.
3999 Wait endlessly until the inferior stops.
4000 Install gdb_agent_remove_socket to atexit hook.
4001 (agent_socket_name): New static variable.
4002 (gdb_agent_socket_init): Replace local variable 'name' with
4003 'agent_socket_name'.
4004 (gdb_agent_remove_socket): New.
4005
4006 2012-07-27 Yao Qi <yao@codesourcery.com>
4007
4008 * server.c (process_point_options): Stop at 'X' when parsing.
4009
4010 2012-07-19 Michael Eager <eager@eagercon.com>
4011
4012 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4013 to hw_execute.
4014 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4015 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4016 hardware breakpoint.
4017
4018 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4019
4020 * gdbserver/linux-low.c (initialize_low): Call
4021 linux_ptrace_init_warnings.
4022
4023 2012-07-02 Doug Evans <dje@google.com>
4024
4025 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4026 pointer to int.
4027
4028 2012-07-02 Stan Shebs <stan@codesourcery.com>
4029
4030 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4031 (ax.o): Add it to build rule.
4032 (ax-ipa.o): Ditto.
4033 (OBS): Add format.o.
4034 (IPA_OBS): Add format.o.
4035 * server.c (handle_query): Claim support for breakpoint commands.
4036 (process_point_options): Add command case.
4037 (process_serial_event): Leave running if there are printfs in
4038 effect.
4039 * mem-break.h (any_persistent_commands): Declare.
4040 (add_breakpoint_commands): Declare.
4041 (gdb_no_commands_at_breakpoint): Declare.
4042 (run_breakpoint_commands): Declare.
4043 * mem-break.c (struct point_command_list): New struct.
4044 (struct breakpoint): New field command_list.
4045 (any_persistent_commands): New function.
4046 (add_commands_to_breakpoint): New function.
4047 (add_breakpoint_commands): New function.
4048 (gdb_no_commands_at_breakpoint): New function.
4049 (run_breakpoint_commands): New function.
4050 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4051 locally.
4052 * ax.c: Include format.h.
4053 (ax_printf): New function.
4054 (gdb_eval_agent_expr): Add printf opcode.
4055
4056 2012-06-13 Yao Qi <yao@codesourcery.com>
4057
4058 * server.c (start_inferior): Remove duplicated writes to fields
4059 'last_resume_kind' and 'last_status' of 'current_inferior'.
4060
4061 2012-06-12 Yao Qi <yao@codesourcery.com>
4062 Pedro Alves <palves@redhat.com>
4063
4064 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4065 comment.
4066 * server.c (handle_v_cont): Extend comment.
4067
4068 2012-06-11 Yao Qi <yao@codesourcery.com>
4069
4070 * linux-low.c (linux_attach): Add 'static'.
4071
4072 2012-06-06 Yao Qi <yao@codesourcery.com>
4073
4074 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4075
4076 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4077
4078 Fix gcc -flto compilation warning.
4079 * server.c (main): Make variable multi_mode and attach volatile.
4080
4081 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4082
4083 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4084 if the platform doesn't know about it.
4085
4086 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4087
4088 * Makefile.in (SFILES): Add linux-tile-low.c.
4089 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4090 * configure.srv: Handle tilegx-*-linux*.
4091 * linux-tile-low.c: New file.
4092
4093 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4094
4095 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4096
4097 2012-05-24 Pedro Alves <palves@redhat.com>
4098
4099 PR gdb/7205
4100
4101 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4102
4103 2012-05-24 Pedro Alves <palves@redhat.com>
4104
4105 PR gdb/7205
4106
4107 Replace target_signal with gdb_signal throughout.
4108
4109 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4110
4111 * linux-low.c (linux_store_registers): Avoid the copying sequence
4112 when no data has been retrieved by ptrace.
4113
4114 2012-05-22 Will Deacon <will.deacon@arm.com>
4115
4116 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4117 Include asm/ptrace.h.
4118 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4119 already defined.
4120
4121 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4122
4123 * linux-low.c (linux_store_registers): Don't re-retrieve data
4124 with ptrace that has already been obtained from /proc. Always
4125 copy any data retrieved with ptrace to the buffer supplied.
4126
4127 2012-05-11 Yao Qi <yao@codesourcery.com>
4128 Pedro Alves <palves@redhat.com>
4129
4130 * linux-low.c (enum stopping_threads_kind): New.
4131 (stopping_threads): Change type to `enum stopping_threads_kind'.
4132 (handle_extended_wait): If stopping and suspending threads, leave
4133 the new_lwp suspended too.
4134 (linux_wait_for_event): Adjust.
4135 (stop_all_lwps): Set `stopping_threads' to
4136 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4137 whether we're suspending threads or just stopping them. Assert no
4138 recursion happens.
4139
4140 2012-04-29 Yao Qi <yao@codesourcery.com>
4141
4142 * server.h: Move some code to ...
4143 * gdbthread.h: ... here. New.
4144 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4145 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4146 (nto-low.o, win32-low.o): Likewise.
4147 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4148 * regcache.c, remote-utils.c, server.c: Likewise.
4149 * target.c, tracepoint.c, win32-low.c: Likewise.
4150
4151 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4152
4153 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4154 (PTRACE_ARG4_TYPE): Likewise.
4155 (PTRACE_XFER_TYPE): Likewise.
4156 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4157 ptrace to PTRACE_ARG3_TYPE.
4158 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4159 (PTRACE_ARG4_TYPE): Likewise.
4160 (PTRACE_XFER_TYPE): Likewise.
4161 (linux_detach_one_lwp): Cast fourth argument of
4162 ptrace to long then PTRACE_ARG4_TYPE.
4163 (regsets_fetch_inferior_registers): Cast third argument of
4164 ptrace to long then PTRACE_ARG3_TYPE.
4165 (regsets_store_inferior_registers): Likewise.
4166
4167 2012-04-20 Pedro Alves <palves@redhat.com>
4168
4169 * configure: Regenerate.
4170
4171 2012-04-19 Pedro Alves <palves@redhat.com>
4172
4173 * Makefile.in (GNULIB_BUILDDIR): New.
4174 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4175 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4176 (all, install-only, uninstall, clean-info, all-lib, clean): No
4177 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4178 (maintainer-clean realclean distclean): Use subdir_do.
4179 (subdir_do): New.
4180 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4181 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4182 * acinclude.m4: Include acx_configure_dir.m4.
4183 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4184 calls. Call AC_PROG_RANLIB. Configure gnulib using
4185 ACX_CONFIGURE_DIR.
4186 (GNULIB): New.
4187 (GNULIB_STDINT_H): Adjust.
4188 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4189 * gdbreplay.c: Include build-gnulib/config.h.
4190 * server.h: Likewise.
4191 * aclocal.m4: Regenerate.
4192 * config.in: Regenerate.
4193 * configure: Regenerate.
4194
4195 2012-04-19 Pedro Alves <palves@redhat.com>
4196
4197 * Makefile.in (LIBGNU, INCGNU): Adjust.
4198 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4199 (all, install-only, uninstall, clean-info, all-lib, clean)
4200 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4201 * configure.ac: Adjust AC_OUTPUT output.
4202 * aclocal.m4: Regenerate.
4203 * configure: Regenerate.
4204
4205 2012-04-19 Pedro Alves <palves@redhat.com>
4206
4207 * Makefile.in (generated_files): New.
4208 (server_h): Remove the explicit dependency on config.h, and depend
4209 on $generated_files.
4210
4211 2012-04-19 Pedro Alves <palves@redhat.com>
4212
4213 * Makefile.in (INCGNU): Add -Ignulib.
4214
4215 2012-04-19 Pedro Alves <palves@redhat.com>
4216
4217 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4218 (INCGNU): ... this, and spell out -I here.
4219 (GNULIB_LIB): Rename to ...
4220 (LIBGNU): ... this.
4221 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4222
4223 2012-04-19 Pedro Alves <palves@redhat.com>
4224
4225 * config.in: Regenerate.
4226
4227 2012-04-19 Pedro Alves <palves@redhat.com>
4228
4229 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4230 * server.h (memmem): Remove declaration.
4231 * config.in: Regenerate.
4232 * configure: Regenerate.
4233
4234 2012-04-19 Yao Qi <yao@codesourcery.com>
4235
4236 * Makefile.in (SFILES): Add common/vec.c.
4237 (OBS): Add vec.o.
4238 (vec.o): New rule.
4239
4240 2012-04-19 Yao Qi <yao@codesourcery.com>
4241
4242 * remote-utils.c (prepare_resume_reply): Replace with macro
4243 target_core_of_thread.
4244 * server.c (handle_qxfer_threads_proper): Likewise.
4245 * target.h (traget_core_of_thread): New macro.
4246
4247 2012-04-18 Pedro Alves <palves@redhat.com>
4248
4249 * aclocal.m4: Regenerate.
4250 * configure: Regenerate.
4251
4252 2012-04-16 Yao Qi <yao@codesourcery.com>
4253
4254 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4255 duplicated on address.
4256
4257 2012-04-16 Yao Qi <yao@codesourcery.com>
4258
4259 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4260 (struct tracepoint_action_ops) <send>: New field.
4261 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4262 (agent_expr_send, x_tracepoint_action_send): New.
4263 (l_tracepoint_action_send): New.
4264 (cmd_qtdp): Download and install tracepoint
4265 according to `use_agent'.
4266 (run_inferior_command): Add one more parameter `len'.
4267 Update callers.
4268 (tracepoint_send_agent): New.
4269 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4270
4271 2012-04-16 Yao Qi <yao@codesourcery.com>
4272
4273 * tracepoint.c (download_tracepoints): Moved to ...
4274 (cmd_qtstart): ... here.
4275
4276 2012-04-14 Yao Qi <yao@codesourcery.com>
4277
4278 * tracepoint.c: Include inttypes.h.
4279 (struct collect_memory_action): Use sized types.
4280 (struct tracepoint): Likewise.
4281 (cmd_qtdp, stop_tracing): Update print specifiers.
4282 (cmd_qtp, response_tracepoint): Likewise.
4283 (collect_data_at_tracepoint): Likewise.
4284 (collect_data_at_step): Likewise.
4285
4286 2012-04-14 Yao Qi <yao@codesourcery.com>
4287
4288 Import gnulib module inttypes.
4289 * aclocal.m4, config.in, configure: Regenerated.
4290
4291 2012-04-14 Yao Qi <yao@codesourcery.com>
4292
4293 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4294 Makefile and config.status at last.
4295
4296 2012-04-13 Yao Qi <yao@codesourcery.com>
4297
4298 * tracepoint.c: Include stdint.h unconditionally.
4299
4300 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4301
4302 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4303 on BFD_HAVE_SYS_PROCFS_TYPE.
4304 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4305 * configure: Regenerate.
4306 * config.in: Likewise.
4307
4308 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4309
4310 * Makefile.in (clean): Also remove x32.c x32-linux.c
4311 x32-avx.c x32-avx-linux.c.
4312 (x32.o): New target.
4313 (x32.c): Likewise.
4314 (x32-linux.o): Likewise.
4315 (x32-linux.c): Likewise.
4316 (x32-avx.o): Likewise.
4317 (x32-avx.c): Likewise.
4318 (x32-avx-linux.o): Likewise.
4319 (x32-avx-linux.c): Likewise.
4320
4321 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4322 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4323 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4324 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4325 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4326 i386/x32-avx-linux.xml.
4327
4328 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4329 (init_registers_x32_avx_linux): Likwise.
4330 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4331 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4332
4333 2012-04-13 Pedro Alves <palves@redhat.com>
4334
4335 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4336 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4337 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4338 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4339 the sub-make.
4340
4341 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4342
4343 * linux-x86-low.c (compat_x32_clock_t): New.
4344 (compat_x32_siginfo_t): Likewise.
4345 (compat_x32_siginfo_from_siginfo): Likewise.
4346 (siginfo_from_compat_x32_siginfo): Likewise.
4347 (linux_is_elf64): Likewise.
4348 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4349 and siginfo_from_compat_x32_siginfo for x32.
4350 (x86_arch_setup): Set linux_is_elf64.
4351
4352 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4353
4354 PR gdb/13969
4355 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4356 e_machine field.
4357 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4358 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4359 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4360 compatible with process.
4361
4362 2012-04-12 Yao Qi <yao@codesourcery.com>
4363
4364 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4365 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4366 (install-only, install-info, clean): Handle sub dir gnulib.
4367 (all-lib, am--refresh): New targets.
4368 (memmem.o): Remove target.
4369 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4370 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4371 (AC_REPLACE_FUNCS): Remove memmem.
4372 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4373 (AC_OUTPUT): Generate Makefile in gnulib/.
4374 * aclocal.m4, config.in, configure: Regenerated.
4375
4376 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4377
4378 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4379
4380 2012-04-05 Pedro Alves <palves@redhat.com>
4381
4382 -Werror=strict-aliasing
4383
4384 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4385 pointer.
4386
4387 2012-04-04 Pedro Alves <palves@redhat.com>
4388
4389 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4390 (sparc_store_gregset_from_stack, sparc_store_gregset)
4391 (sparc_breakpoint_at): Fix formatting.
4392
4393 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4394
4395 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4396 are available.
4397 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4398 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4399 * config.in: Regenerate.
4400 * configure: Likewise.
4401
4402 2012-03-29 Pedro Alves <palves@redhat.com>
4403
4404 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4405 Correct ptrace arguments.
4406
4407 2012-03-28 Pedro Alves <palves@redhat.com>
4408
4409 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4410 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4411 (IA64_FR1_REGNUM): New defines.
4412 (ia64_fetch_register): New.
4413 (the_low_target): Install it.
4414 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4415 field.
4416 * linux-low.c (linux_fetch_registers): Try the
4417 the_low_target.fetch_register hook first.
4418
4419 * linux-arm-low.c (the_low_target): Adjust.
4420 * linux-bfin-low.c (the_low_target): Adjust.
4421 * linux-cris-low.c (the_low_target): Adjust.
4422 * linux-crisv32-low.c (the_low_target): Adjust.
4423 * linux-m32r-low.c (the_low_target): Adjust.
4424 * linux-m68k-low.c (the_low_target): Adjust.
4425 * linux-mips-low.c (the_low_target): Adjust.
4426 * linux-ppc-low.c (the_low_target): Adjust.
4427 * linux-s390-low.c (the_low_target): Adjust.
4428 * linux-sh-low.c (the_low_target): Adjust.
4429 * linux-sparc-low.c (the_low_target): Adjust.
4430 * linux-tic6x-low.c (the_low_target): Adjust.
4431 * linux-x86-low.c (the_low_target): Adjust.
4432 * linux-xtensa-low.c (the_low_target): Adjust.
4433
4434 2012-03-26 Pedro Alves <palves@redhat.com>
4435
4436 * server.c (handle_qxfer_libraries): Don't bail early if
4437 the_target->qxfer_libraries_svr4 is not NULL.
4438
4439 2012-03-26 Pedro Alves <palves@redhat.com>
4440
4441 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4442
4443 2012-03-23 Pedro Alves <palves@redhat.com>
4444
4445 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4446 "library-list-svr4" element's start tag when the the DSO list is
4447 empty.
4448
4449 2012-03-23 Pedro Alves <palves@redhat.com>
4450
4451 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4452 a variable whose type size is the same as the inferior's pointer
4453 size.
4454
4455 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4456
4457 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4458 struct siginfo.
4459 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4460 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4461 * linux-low.h: Include <signal.h>.
4462 (struct siginfo): Remove forward declaration.
4463 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4464 struct siginfo.
4465
4466 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4467
4468 * .gitignore: Ignore more files.
4469
4470 2012-03-19 Pedro Alves <palves@redhat.com>
4471 Jan Kratochvil <jan.kratochvil@redhat.com>
4472
4473 * server.c (cont_thread, general_thread): Add describing comments.
4474 (start_inferior): Clear `cont_thread'.
4475 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4476 of a process.
4477
4478 2012-03-15 Yao Qi <yao@codesourcery.com>
4479
4480 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4481 handling to ...
4482 (cmd_qtdp): ... here.
4483
4484 2012-03-15 Yao Qi <yao@codesourcery.com>
4485
4486 * tracepoint.c (struct tracepoint_action_ops): New.
4487 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4488 (m_tracepoint_action_download): New.
4489 (r_tracepoint_action_download): New.
4490 (x_tracepoint_action_download): New.
4491 (l_tracepoint_action_download): New.
4492 (add_tracepoint_action): Install `action->ops' according type.
4493 (download_tracepoint_1): Move code `download' function pointer
4494 of various tracepoint_action_ops.
4495
4496 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4497
4498 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4499 linux_ptrace_attach_warnings.
4500
4501 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4502
4503 * Makefile.in (linux-ptrace.o): New.
4504 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4505 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4506 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4507 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4508 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4509 of these targets.
4510 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4511
4512 2012-03-08 Yao Qi <yao@codesourcery.com>
4513 Pedro Alves <palves@redhat.com>
4514
4515 Fix PR server/13392.
4516 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4517 offset of JMP insn.
4518 * tracepoint.c (remove_tracepoint): New.
4519 (cmd_qtdp): Call remove_tracepoint when failed to install.
4520
4521 2012-03-07 Pedro Alves <palves@redhat.com>
4522
4523 * linux-low.c (get_detach_signal): New.
4524 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4525 Pass on pending signals to PTRACE_DETACH. Check the result of the
4526 ptrace call.
4527 * server.c (program_signals, program_signals_p): New.
4528 (handle_general_set): Handle QProgramSignals.
4529 * server.h (program_signals, program_signals_p): Declare.
4530
4531 2012-03-05 Pedro Alves <palves@redhat.com>
4532 Jan Kratochvil <jan.kratochvil@redhat.com>
4533
4534 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4535 New comment why.
4536
4537 2012-03-03 Yao Qi <yao@codesourcery.com>
4538
4539 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4540 agent_look_up_symbols.
4541
4542 2012-03-03 Yao Qi <yao@codesourcery.com>
4543
4544 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4545 (linux-x86-low.o): Likewise.
4546 * server.h: Remove in_process_agent_loaded.
4547 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4548 common/agent.c.
4549 Update callers.
4550
4551 2012-03-03 Yao Qi <yao@codesourcery.com>
4552
4553 * tracepoint.c (gdb_agent_capability): New global.
4554 (in_process_agent_loaded_ust): Renamed to
4555 `in_process_agent_supports_ust'.
4556 Update callers.
4557 (in_process_agent_supports_ust): Call agent_capability_check.
4558 (clear_installed_tracepoints): Assert that agent supports
4559 agent.
4560
4561 2012-03-03 Yao Qi <yao@codesourcery.com>
4562
4563 * linux-low.c (linux_supports_agent): New.
4564 (linux_target_ops): Initialize field `supports_agent' with
4565 linux_supports_agent.
4566 * target.h (struct target_ops) <supports_agent>: New.
4567 (target_supports_agent): New macro.
4568 * server.c (handle_general_set): Handle packet 'QAgent'.
4569 (handle_query): Send `QAgent+'.
4570 * Makefile.in (server.o): Depends on agent.h.
4571
4572 2012-03-03 Yao Qi <yao@codesourcery.com>
4573
4574 * Makefile.in (OBS): Add agent.o.
4575 Add new rule for agent.o.
4576 Track dependence of tracepoint.c on agent.h.
4577 * tracepoint.c (run_inferior_command_1):
4578 (run_inferior_command): Call agent_run_command.
4579 (gdb_ust_connect_sync_socket): Deleted. Move it to
4580 common/agent.c.
4581 (resume_thread, stop_thread): Likewise.
4582 (gdb_ust_socket_init): Renamed to ...
4583 (gdb_agent_socket_init): ... New.
4584 (gdb_ust_thread): Renamed to ...
4585 (gdb_agent_helper_thread): ... New.
4586 (gdb_ust_init): Move some code to ...
4587 (gdb_agent_init): ... here. New.
4588 [HAVE_UST]: Call gdb_ust_init.
4589 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4590 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4591 * config.in, configure: Regenerated.
4592
4593 2012-03-02 Pedro Alves <palves@redhat.com>
4594
4595 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4596 * linux-low.c (struct simple_pid_list): New.
4597 (stopped_pids): New a struct simple_pid_list pointer.
4598 (add_to_pid_list, pull_pid_from_list): New.
4599 (handle_extended_wait): Don't assume the first signal new children
4600 report is SIGSTOP. Adjust call to pull_pid_from_list.
4601 (linux_wait_for_lwp): Adjust.
4602
4603 2012-03-02 Yao Qi <yao@codesourcery.com>
4604
4605 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4606 debug log.
4607
4608 2012-03-02 Yao Qi <yao@codesourcery.com>
4609
4610 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4611 `stop_pc' and `tpoint'. Update caller.
4612
4613 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4614
4615 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4616 * linux-low.c (use_linux_regsets): New macro.
4617 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4618 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4619 (linux_register_in_regsets): New function.
4620 (usr_fetch_inferior_registers): Skip registers covered by
4621 regsets.
4622 (usr_store_inferior_registers): Likewise.
4623 (usr_fetch_inferior_registers): New macro.
4624 (usr_store_inferior_registers): Likewise.
4625 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4626 (linux_store_registers): Likewise.
4627 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4628 prototype.
4629 (init_registers_mips64_dsp_linux): Likewise.
4630 (init_registers_mips_linux): New macro.
4631 (init_registers_mips_dsp_linux): Likewise.
4632 (mips_dsp_num_regs): Likewise.
4633 (DSP_BASE, DSP_CONTROL): New fallback macros.
4634 (mips_base_regs): New macro.
4635 (mips_regmap): Use it. Fix the size.
4636 (mips_dsp_regmap): New variable.
4637 (mips_dsp_regset_bitmap): Likewise.
4638 (mips_arch_setup): New function.
4639 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4640 than mips_regmap.
4641 (mips_cannot_store_register): Likewise.
4642 (the_low_target): Update .arch_setup, .num_regs and .regmap
4643 initializers. Add .regset_bitmap initializer.
4644 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4645 initializer.
4646 * linux-bfin-low.c (the_low_target): Likewise.
4647 * linux-cris-low.c (the_low_target): Likewise.
4648 * linux-crisv32-low.c (the_low_target): Likewise.
4649 * linux-ia64-low.c (the_low_target): Likewise.
4650 * linux-m32r-low.c (the_low_target): Likewise.
4651 * linux-m68k-low.c (the_low_target): Likewise.
4652 * linux-ppc-low.c (the_low_target): Likewise.
4653 * linux-s390-low.c (the_low_target): Likewise.
4654 * linux-sh-low.c (the_low_target): Likewise.
4655 * linux-sparc-low.c (the_low_target): Likewise.
4656 * linux-tic6x-low.c (the_low_target): Likewise.
4657 * linux-x86-low.c (the_low_target): Likewise.
4658 * linux-xtensa-low.c (the_low_target): Likewise.
4659 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4660 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4661 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4662 srv_xmlfiles.
4663 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4664 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4665
4666 2012-02-29 Yao Qi <yao@codesourcery.com>
4667 Pedro Alves <palves@redhat.com>
4668
4669 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4670 `step_over_finished' is true.
4671
4672 2012-02-27 Pedro Alves <palves@redhat.com>
4673
4674 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4675 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4676
4677 2012-02-27 Pedro Alves <palves@redhat.com>
4678
4679 PR server/9684
4680 * linux-low.c (pid_is_stopped): New.
4681 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4682
4683 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4684
4685 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4686 of conditions.
4687
4688 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4689
4690 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4691
4692 2012-02-24 Luis Machado <lgustavo@codesourcery>
4693
4694 * server.c (handle_query): Advertise support for target-side
4695 breakpoint condition evaluation.
4696 (process_point_options): New function.
4697 (process_serial_event): When inserting a breakpoint, check for
4698 a target-side condition that should be evaluated.
4699
4700 * mem-break.c: Include regcache.h and ax.h.
4701 (point_cond_list_t): New data structure.
4702 (breakpoint) <cond_list>: New field.
4703 (find_gdb_breakpoint_at): Make non-static.
4704 (delete_gdb_breakpoint_at): Clear any target-side
4705 conditions.
4706 (clear_gdb_breakpoint_conditions): New function.
4707 (add_condition_to_breakpoint): Likewise.
4708 (add_breakpoint_condition): Likewise.
4709 (gdb_condition_true_at_breakpoint): Likewise.
4710 (gdb_breakpoint_here): Return result directly instead
4711 of going through a local variable.
4712
4713 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4714 (clear_gdb_breakpoint_conditions): Likewise.
4715 (add_breakpoint_condition): Likewise.
4716 (gdb_condition_true_at_breakpoint): Likewise.
4717
4718 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4719 (need_step_over_p): Take target-side breakpoint condition into
4720 consideration.
4721
4722 2012-02-24 Luis Machado <lgustavo@codesourcery>
4723
4724 * server.h: Include tracepoint.h.
4725 (agent_mem_read, agent_get_trace_state_variable_value,
4726 agent_set_trace_state_variable_value,
4727 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4728 get_set_tsv_func_addr): New prototypes.
4729
4730 * ax.h: New include file.
4731 * ax.c: New source file.
4732
4733 * tracepoint.c: Include ax.h.
4734 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4735 agent_expr, eval_result_type): Move to ax.h.
4736 (parse_agent_expr): Rename to ...
4737 (gdb_parse_agent_expr): ... this, make it non-static and move
4738 to ax.h.
4739 (unparse_agent_expr) Rename to ...
4740 (gdb_unparse_agent_expr): ... this, make it non-static and move
4741 to ax.h.
4742 (eval_agent_expr): Rename to ...
4743 (eval_tracepoint_agent_expr): ... this.
4744 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4745 forward declarations.
4746 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4747 (agent_get_trace_state_variable_value): New function.
4748 (agent_set_trace_state_variable_value): New function.
4749 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4750 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4751 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4752 (condition_true_at_tracepoint): Likewise.
4753 (parse_agent_expr): Rename to ...
4754 (gdb_parse_agent_expr): ... this and move to ax.c.
4755 (unparse_agent_expr): Rename to ...
4756 (gdb_unparse_agent_expr): ... this and move to ax.c.
4757 (gdb_agent_op_name): Move to ax.c.
4758 (eval_agent_expr): Rename to ...
4759 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4760 and move to ax.c.
4761 (eval_tracepoint_agent_expr): New function.
4762 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4763 non-static.
4764 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4765 ax.c.
4766 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4767 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4768 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4769 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4770 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4771 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4772 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4773 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4774 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4775 (compile_bytecodes): Remove forward declaration.
4776 (is_goto_target): Move to ax.c.
4777 (compile_bytecodes): Move to ax.c and call
4778 agent_get_trace_state_variable_value (...) and
4779 agent_set_trace_state_variable_value (...).
4780
4781 * Makefile.in: Update ax.c and IPA dependencies.
4782
4783 2012-02-24 Pedro Alves <palves@redhat.com>
4784
4785 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4786 (cmd_bigqtbuffer_circular): ... this. Only handle
4787 'QTBuffer:circular:'.
4788 (handle_tracepoint_general_set): Adjust.
4789
4790 2012-02-16 Yao Qi <yao@codesourcery.com>
4791
4792 * inferiors.c: Move code to ...
4793 * dll.c: .... here. New.
4794 * server.h: Declare clear_dlls.
4795 * Makefile.in (SFILES): Add dll.c.
4796 (OBS): Add dll.o
4797 (dll.o): New rule.
4798
4799 2012-02-11 Yao Qi <yao@codesourcery.com>
4800
4801 * server.c: (handle_monitor_command): Add a new parameter
4802 `own_buf'.
4803 (handle_query): Update caller.
4804
4805 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4806
4807 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4808 * configure, config.in: Regenerate.
4809 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4810 is not defined.
4811
4812 2012-02-02 Pedro Alves <palves@redhat.com>
4813
4814 Try SIGKILL first, then PTRACE_KILL.
4815 * linux-low.c (linux_kill_one_lwp): New.
4816 (linux_kill_one_lwp): Rename to ...
4817 (kill_one_lwp_callback): ... this. Use the new
4818 linux_kill_one_lwp.
4819
4820 2012-02-02 Pedro Alves <palves@redhat.com>
4821
4822 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4823 inferior.
4824
4825 2012-01-27 Pedro Alves <palves@redhat.com>
4826
4827 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4828 (elf_64_file_p): Make static.
4829 (linux_pid_exe_is_elf_64_file): New.
4830 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4831 Delete declarations.
4832 (linux_pid_exe_is_elf_64_file): Declare.
4833 * linux-x86-low.c (x86_arch_setup): Use
4834 linux_pid_exe_is_elf_64_file.
4835
4836 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4837
4838 * linux-low.c (linux_wait_for_event_1): Rename to ...
4839 (linux_wait_for_event): ... here and merge it with former
4840 linux_wait_for_event - new variable wait_ptid, use it.
4841 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4842
4843 2012-01-23 Pedro Alves <palves@redhat.com>
4844
4845 * server.c (main): Avoid yet another case of infinite loop while
4846 detaching/killing after a longjmp.
4847
4848 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4849
4850 Code cleanup.
4851 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4852
4853 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4854
4855 * hostio.c (handle_readlink): New function.
4856 (handle_vFile): Call it to handle "vFile:readlink" packets.
4857
4858 2012-01-20 Pedro Alves <palves@redhat.com>
4859 Ulrich Weigand <ulrich.weigand@linaro.org>
4860
4861 * server.c (handle_v_requests): Only support vAttach and vRun to
4862 start multiple processes when in extended protocol mode.
4863
4864 2012-01-17 Pedro Alves <palves@redhat.com>
4865
4866 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4867 memalign plus mprotect to allocate the scratch buffer.
4868
4869 2012-01-13 Pedro Alves <palves@redhat.com>
4870
4871 * server.c (attach_inferior): Clear `cont_thread'.
4872
4873 2012-01-13 Pedro Alves <palves@redhat.com>
4874
4875 * server.c (main): Avoid infinite loop while detaching/killing
4876 after a longjmp.
4877
4878 2012-01-09 Doug Evans <dje@google.com>
4879
4880 * server.c (start_inferior): Set last_ptid in --wrapper case.
4881
4882 2012-01-06 Yao Qi <yao@codesourcery.com>
4883
4884 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4885 defined.
4886 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4887
4888 2012-01-04 Yao Qi <yao@codesourcery.com>
4889
4890 * tracepoint.c (cmd_qtdp): Print debug message
4891 for static tracepoint.
4892
4893 2012-01-04 Yao Qi <yao@codesourcery.com>
4894
4895 * tracepoint.c (trace_vdebug): Differentiate debug message
4896 between gdbserver and IPA.
4897
4898 2012-01-03 Yao Qi <yao@codesourcery.com>
4899
4900 * tracepoint.c (tracepoint_was_hit): Don't collect for
4901 static tracepoint.
4902
4903 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4904
4905 * terminal.h: Reformat copyright header.
4906
4907 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4908
4909 * server.c (gdbserver_version): Update copyright year.
4910 * gdbreplay.c (gdbreplay_version): Likewise.
4911
4912 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4913
4914 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4915
4916 Revert:
4917 2011-12-18 Hui Zhu <teawater@gmail.com>
4918 * linux-low.c (linux_create_inferior): Save return value to ret.
4919
4920 2011-12-18 Hui Zhu <teawater@gmail.com>
4921
4922 * linux-low.c (linux_create_inferior): Save return value to ret.
4923
4924 2011-12-16 Doug Evans <dje@google.com>
4925
4926 * linux-low.c (linux_create_inferior): If stdio connection,
4927 redirect stdin from /dev/null, stdout to stderr.
4928 * remote-utils.c (remote_is_stdio): New static global.
4929 (remote_connection_is_stdio): New function.
4930 (remote_prepare): Handle stdio connection.
4931 (remote_open): Ditto.
4932 (remote_close): Don't close stdin for stdio connections.
4933 (read_prim,write_prim): New functions. Replace all calls to
4934 read/write to these.
4935 * server.c (main): Watch for "-" argument. Move call to
4936 remote_prepare before start_inferior.
4937 * server.h (STDIO_CONNECTION_NAME): New macro.
4938 (remote_connection_is_stdio): Declare.
4939
4940 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4941 in debugging output.
4942
4943 2011-12-15 Yao Qi <yao@codesourcery.com>
4944
4945 * tracepoint.c: Include sys/syscall.h.
4946 (gdb_ust_thread): Remove preprocessor conditional.
4947
4948 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4949
4950 * linux-low.c (linux_detach_one_lwp): Call
4951 the_low_target.prepare_to_resume before detaching.
4952
4953 2011-12-14 Yao Qi <yao@codesourcery.com>
4954
4955 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4956 of write.
4957
4958 2011-12-14 Yao Qi <yao@codesourcery.com>
4959
4960 * i386-low.c (i386_low_stopped_data_address): Initialize local
4961 variable `control'.
4962
4963 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4964
4965 PR remote/13492
4966
4967 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4968 DR_CONTROL unless necessary. Extend comments.
4969 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4970 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4971
4972 2011-12-13 Yao Qi <yao@codesourcery.com>
4973
4974 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4975 macros.
4976 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4977
4978 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4979
4980 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4981 Print new debug message for such case.
4982
4983 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4984
4985 Fix overlapping memcpy.
4986 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4987 the read_inferior_memory transfer.
4988 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4989 write_inferior_memory transfer.
4990 (set_fast_tracepoint_jump): New variable buf. Use it for the
4991 read_inferior_memory and write_inferior_memory transfers.
4992 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4993 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4994 Use it for the write_inferior_memory transfer.
4995 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4996 buffers.
4997
4998 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4999
5000 * linux-low.c (fetch_register, store_register): Make code
5001 consistent, fix formatting.
5002
5003 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5004
5005 * linux-low.c (usr_store_inferior_registers): Factor out code
5006 to handle individual registers into...
5007 (store_register): ... this new function.
5008
5009 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5010
5011 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5012 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5013 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5014 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5015 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5016 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5017 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5018 (srv_xmlfiles): Add new XML files.
5019
5020 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5021 and <sys/uio.h>.
5022 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5023 (init_registers_s390_linux32v1): Add prototype.
5024 (init_registers_s390_linux32v2): Likewise.
5025 (init_registers_s390_linux64v1): Likewise.
5026 (init_registers_s390_linux64v2): Likewise.
5027 (init_registers_s390x_linux64v1): Likewise.
5028 (init_registers_s390x_linux64v2): Likewise.
5029 (s390_num_regs): Increment to 52.
5030 (s390_regmap): Add orig_r2 register.
5031 (s390_num_regs_3264): Increment to 68.
5032 (s390_regmap_3264): Add orig_r2 register.
5033 (s390_collect_ptrace_register): Handle orig_r2 register.
5034 (s390_supply_ptrace_register): Likewise.
5035 (s390_fill_last_break): New function.
5036 (s390_store_last_break): Likewise.
5037 (s390_fill_system_call): New function.
5038 (s390_store_system_call): Likewise.
5039 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5040 register sets.
5041 (s390_check_regset): New function.
5042 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5043 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5044 Update target_regsets for available register sets.
5045
5046 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5047 Jan Kratochvil <jan.kratochvil@redhat.com>
5048
5049 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5050 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5051 New.
5052 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5053 * linux-low.h (struct process_info_private): New member r_debug.
5054 * server.c (handle_qxfer_libraries): Call
5055 the_target->qxfer_libraries_svr4.
5056 (handle_qxfer_libraries_svr4): New function.
5057 (qxfer_packets): New entry "libraries-svr4".
5058 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5059 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5060 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5061 PACKET_qXfer_libraries_svr4.
5062
5063 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5064
5065 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5066 PSW address/mask between 8-byte and 16-byte formats.
5067 (s390_supply_ptrace_register): Likewise.
5068 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5069 basic addressing mode bit.
5070
5071 2011-11-24 Stan Shebs <stan@codesourcery.com>
5072
5073 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5074
5075 2011-11-17 Stan Shebs <stan@codesourcery.com>
5076
5077 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5078 (tracing_start_time): New global.
5079 (tracing_stop_time): New global.
5080 (tracing_user_name): New global.
5081 (tracing_notes): New global.
5082 (tracing_stop_note): New global.
5083 (cmd_qtstart): Set traceframe_usage, start_time.
5084 (stop_tracing): Set stop_time.
5085 (cmd_qtstatus): Report additional status.
5086 (cmd_qtp): New function.
5087 (handle_tracepoint_query): Call it.
5088 (cmd_qtnotes): New function.
5089 (handle_tracepoint_general_set): Call it.
5090 (get_timestamp): Rename from tsv_get_timestamp.
5091
5092 2011-11-14 Stan Shebs <stan@codesourcery.com>
5093 Kwok Cheung Yeung <kcy@codesourcery.com>
5094
5095 * linux-x86-low.c (small_jump_insn): New.
5096 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5097 trampoline and error message, build a trampoline and issue a small
5098 jump instruction to it.
5099 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5100 trampoline and error message.
5101 (x86_get_min_fast_tracepoint_insn_len): New.
5102 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5103 * linux-low.h (struct linux_target_ops): Add arguments to
5104 install_fast_tracepoint_jump_pad operation, add new operation.
5105 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5106 arguments.
5107 (linux_get_min_fast_tracepoint_insn_len): New function.
5108 (linux_target_op): Add new operation.
5109 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5110 (gdb_trampoline_buffer_end): Ditto.
5111 (gdb_trampoline_buffer_error): Ditto.
5112 (struct ipa_sym_addresses): Add fields for new IPA variables.
5113 (symbol_list): Add entries for new IPA variables.
5114 (struct tracepoint): Add fields to hold the address range of the
5115 trampoline used by the tracepoint.
5116 (trampoline_buffer_head): New static variable.
5117 (trampoline_buffer_tail): Ditto.
5118 (claim_trampoline_space): New function.
5119 (have_fast_tracepoint_trampoline_buffer): New function.
5120 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5121 structure.
5122 (install_fast_tracepoint): Ditto, also add error buffer argument.
5123 (cmd_qtminftpilen): New function.
5124 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5125 (fast_tracepoint_from_trampoline_address): New function.
5126 (fast_tracepoint_collecting): Handle trampoline as part of jump
5127 pad space.
5128 (set_trampoline_buffer_space): New function.
5129 (initialize_tracepoint): Initialize new IPA variables.
5130 * target.h (struct target_ops): Add arguments to
5131 install_fast_tracepoint_jump_pad operation, add new
5132 get_min_fast_tracepoint_insn_len operation.
5133 (target_get_min_fast_tracepoint_insn_len): New.
5134 (install_fast_tracepoint_jump_pad): Add arguments.
5135 * server.h (IPA_BUFSIZ): Define.
5136 * linux-i386-ipa.c: Include extra header files.
5137 (initialize_fast_tracepoint_trampoline_buffer): New function.
5138 (initialize_low_tracepoint): Call it.
5139 * server.h (set_trampoline_buffer_space): Declare.
5140 (claim_trampoline_space): Ditto.
5141 (have_fast_tracepoint_trampoline_buffer): Ditto.
5142
5143 2011-11-14 Yao Qi <yao@codesourcery.com>
5144
5145 * server.c (handle_query): Handle InstallInTrace for qSupported.
5146 * tracepoint.c (add_tracepoint): Sort list.
5147 (install_tracepoint, download_tracepoint): New.
5148 (cmd_qtdp): Call them to install and download tracepoints.
5149 (sort_tracepoints): Removed.
5150 (cmd_qtstart): Update.
5151
5152 2011-11-14 Yao Qi <yao@codesourcery.com>
5153
5154 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5155 * mem-break.h: Declare.
5156 * tracepoint.c (cmd_qtstart): Move some code to ...
5157 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5158 New.
5159 (download_tracepoints): Move some code to ...
5160 (download_tracepoint_1): ... here. New.
5161
5162 2011-11-08 Yao Qi <yao@codesourcery.com>
5163
5164 * remote-utils.c (relocate_instruction): A comment fix.
5165
5166 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5167
5168 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5169 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5170 dr_status_mirror and dr_control_mirror from debug_reg_state.
5171 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5172 (i386_initial_stuff): Remove use of deleted globals.
5173 (i386_get_thread_context, i386_set_thread_context,
5174 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5175 from debug_reg_state.
5176
5177 2011-11-05 Yao Qi <yao@codesourcery.com>
5178
5179 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5180 address as TPOINT's.
5181
5182 2011-11-02 Stan Shebs <stan@codesourcery.com>
5183
5184 * tracepoint.c (agent_mem_read_string): New function.
5185 (eval_agent_expr): Call it for tracenz.
5186 * server.c (handle_query): Report support for tracenz.
5187
5188 2011-11-02 Yao Qi <yao@codesourcery.com>
5189
5190 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5191
5192 2011-11-02 Yao Qi <yao@codesourcery.com>
5193
5194 * target.h: Fix a typo in comment.
5195
5196 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5197
5198 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5199 clobber the breakpoints' shadows with fast tracepoint jumps.
5200 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5201 * target.c (write_inferior_memory): Also pass MYADDR down to
5202 check_mem_write.
5203
5204 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5205
5206 * configure.ac: Check support for personality routine.
5207 * configure: Regenerate.
5208 * config.in: Likewise.
5209 * linux-low.c: Include <sys/personality.h>.
5210 Define ADDR_NO_RANDOMIZE if necessary.
5211 (linux_create_inferior): Disable address space randomization when
5212 forking inferior, if requested.
5213 (linux_supports_disable_randomization): New function.
5214 (linux_target_ops): Install it.
5215 * server.h (disable_randomization): Declare.
5216 * server.c (disable_randomization): New global variable.
5217 (handle_general_set): Handle QDisableRandomization.
5218 (handle_query): Likewise for qSupported.
5219 (main): Support --disable-randomization and --no-disable-randomization
5220 command line arguments.
5221 * target.h (struct target_ops): Add supports_disable_randomization.
5222 (target_supports_disable_randomization): New macro.
5223
5224 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5225
5226 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5227 ifdef check.
5228 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5229 [!PT_GETDSBT] (target_loadmap): New definition.
5230 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5231 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5232 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5233 and PT_GETDSBT to LINUX_LOADMAP.
5234 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5235 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5236
5237 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5238
5239 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5240 (arm_linux_hwbp_cap): New static variable.
5241 (arm_linux_get_hwbp_cap): Replace by ...
5242 (arm_linux_init_hwbp_cap): ... this new function.
5243 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5244 (arm_linux_get_hw_watchpoint_count): Likewise.
5245 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5246 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5247 (arm_prepare_to_resume): Use perror_with_name instead of error.
5248
5249 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5250
5251 * linux-arm-low.c: Include <signal.h>.
5252 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5253 (struct arm_linux_hwbp_cap): New data type.
5254 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5255 (struct arm_linux_hw_breakpoint): New data type.
5256 (MAX_BPTS, MAX_WPTS): Define.
5257 (struct arch_process_info, struct arch_lwp_info): New data types.
5258 (arm_linux_get_hwbp_cap): New function.
5259 (arm_linux_get_hw_breakpoint_count): Likewise.
5260 (arm_linux_get_hw_watchpoint_count): Likewise.
5261 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5262 (arm_hwbp_control_initialize): Likewise.
5263 (arm_hwbp_control_is_enabled): Likewise.
5264 (arm_hwbp_control_is_initialized): Likewise.
5265 (arm_hwbp_control_disable): Likewise.
5266 (arm_linux_hw_breakpoint_equal): Likewise.
5267 (arm_linux_hw_point_initialize): Likewise.
5268 (struct update_registers_data): New data structure.
5269 (update_registers_callback: New function.
5270 (arm_insert_point): Likewise.
5271 (arm_remove_point): Likewise.
5272 (arm_stopped_by_watchpoint): Likewise.
5273 (arm_stopped_data_address): Likewise.
5274 (arm_new_process): Likewise.
5275 (arm_new_thread): Likewise.
5276 (arm_prepare_to_resume): Likewise.
5277 (the_low_target): Register arm_insert_point, arm_remove_point,
5278 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5279 arm_new_thread, and arm_prepare_to_resume.
5280
5281 2011-09-15 Stan Shebs <stan@codesourcery.com>
5282
5283 * server.h (struct emit_ops): Add compare-goto fields.
5284 * tracepoint.c (gdb_agent_op_sizes): New table.
5285 (emit_eq_goto): New function.
5286 (emit_ne_goto): New function.
5287 (emit_lt_goto): New function.
5288 (emit_le_goto): New function.
5289 (emit_gt_goto): New function.
5290 (emit_ge_goto): New function.
5291 (is_goto_target): New function.
5292 (compile_bytecodes): Recognize special cases of compare-goto
5293 combinations and call specialized emitters for them.
5294 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5295 (amd64_emit_ne_goto): New function.
5296 (amd64_emit_lt_goto): New function.
5297 (amd64_emit_le_goto): New function.
5298 (amd64_emit_gt_goto): New function.
5299 (amd64_emit_ge_goto): New function.
5300 (amd64_emit_ops): Add the new functions.
5301 (i386_emit_eq_goto): New function.
5302 (i386_emit_ne_goto): New function.
5303 (i386_emit_lt_goto): New function.
5304 (i386_emit_le_goto): New function.
5305 (i386_emit_gt_goto): New function.
5306 (i386_emit_ge_goto): New function.
5307 (i386_emit_ops): Add the new functions.
5308
5309 2011-09-08 Stan Shebs <stan@codesourcery.com>
5310
5311 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5312 (i386_emit_epilogue): Restore %ebx.
5313
5314 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5315
5316 * server.c (step_thread): Remove definition.
5317 (process_serial_event): Don't handle Hs.
5318 * server.h (step_thread): Remove declaration.
5319 * target.c (set_desired_inferior): Remove use of step_thread.
5320
5321 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5322
5323 * linux-low.c: Include linux-procfs.h.
5324 (linux_attach_lwp_1): Update comments.
5325 (linux_attach): Scan for existing threads when attaching to a
5326 process that is the tgid.
5327 * Makefile.in: Update dependencies.
5328
5329 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5330
5331 * configure.srv: Add linux-procfs.o dependencies.
5332
5333 2011-08-14 Yao Qi <yao@codesourcery.com>
5334
5335 * target.h (struct target_ops): Fix indent.
5336 * win32-low.c (win32_target_ops): Fix comment.
5337
5338 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5339 Yao Qi <yao@codesourcery.com>
5340
5341 * Makefile.in (clean): Remove tic6x-*.c files.
5342 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5343 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5344 (tic6x-c64xp-linux.c): Likewise.
5345 * configure.srv: Add support for tic6x-*-uclinux.
5346 * linux-tic6x-low.c: New.
5347 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5348
5349 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5350 Yao Qi <yao@codesourcery.com>
5351
5352 * target.h (struct target_ops): Add read_loadmap.
5353 * linux-low.c (struct target_loadseg): New type.
5354 (struct target_loadmap): New type.
5355 (linux_read_loadmap): New function.
5356 (linux_target_ops): Add linux_read_loadmap.
5357 * server.c (handle_query): Support qXfer:fdpic:read packet.
5358 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5359 to NULL.
5360
5361 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5362
5363 * win32-low.c: Include <stdint.h>.
5364
5365 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5366
5367 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5368 to the inferior here.
5369 (i386_remove_aligned_watchpoint): Ditto.
5370 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5371 fit part of the watchpoint in the debug registers.
5372 (i386_update_inferior_debug_regs): New.
5373 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5374 registers, and only update the inferior on success.
5375 (i386_low_remove_watchpoint): Ditto.
5376
5377 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5378
5379 * linux-low.c (compare_ints, unique, list_threads, show_process,
5380 linux_core_of_thread): Delete.
5381 (linux_target_ops): Change linux_core_of_thread to
5382 linux_common_core_of_thread.
5383 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5384 * utils.c (malloc_failure): Change type of argument.
5385 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5386 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5387 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5388 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5389 (IPA_OBJS): Add common-utils-ipa.o.
5390 (ptid_h, linux_osdata_h): New macros.
5391 (server_h): Add common/common-utils.h, common/xml-utils.h,
5392 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5393 common/ptid.h.
5394 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5395 ptid.o, buffer.o): New rules.
5396 (linux-low.o): Add common/linux-osdata.h as a dependency.
5397 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5398 * configure.ac: Add AC_HEADER_DIRENT check.
5399 * config.in: Regenerate.
5400 * configure: Regenerate.
5401 * remote-utils.c (xml_escape_text): Delete.
5402 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5403 buffer_xml_printf): Move to common/buffer.c.
5404 * server.c (main): Remove call to initialize_inferiors.
5405 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5406 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5407 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5408 internal_error, gdb_assert, gdb_assert_fail): Delete.
5409 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5410 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5411 common/buffer.h.
5412 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5413 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5414 initialize_inferiors): Delete.
5415
5416 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5417
5418 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5419 symbol error.
5420
5421 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5422
5423 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5424 assertion.
5425 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5426
5427 2011-05-26 Yao Qi <yao@codesourcery.com>
5428
5429 * Makefile.in (thread-db.o): Track dependence to
5430 common/gdb_thread_db.h.
5431 * thread-db.c: include gdb_thread_db.h from right place.
5432
5433 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5434
5435 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5436 __FILE__ and __LINE__ to internal_error.
5437
5438 2011-05-13 Doug Evans <dje@google.com>
5439
5440 * thread-db.c (try_thread_db_load_from_sdir): New function.
5441 (try_thread_db_load_from_dir): New function.
5442 (thread_db_load_search): Handle $sdir, ignore $pdir.
5443 Remove trying of system directories if search of
5444 libthread-db-search-path fails, that is now done via $sdir.
5445
5446 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5447
5448 * server.c (handle_query): Add EnableDisableTracepoints to the list
5449 of supported features.
5450 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5451 tracepoints.
5452 (cmd_qtenable_disable): New.
5453 (cmd_qtstart): Install tracepoints even if disabled.
5454 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5455 receiving a QTEnable or QTDisable packet.
5456 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5457 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5458 tracepoints.
5459 (gdb_probe): Skip data collection if static tracepoint is disabled.
5460
5461 2011-05-10 Doug Evans <dje@google.com>
5462
5463 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5464
5465 2011-05-04 Doug Evans <dje@google.com>
5466
5467 * linux-low.c (linux_join): Skip process lookup.
5468 * spu-low.c (spu_join): Ditto.
5469 * server.c (join_inferiors_callback): Delete.
5470 (process_serial_event): For 'D' packet (detach) call join_inferior
5471 directly.
5472
5473 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5474
5475 * README: Don't mention xscale*-*-linux*.
5476 * configure.srv (xscale*-*-linux*): Don't handle target.
5477
5478 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5479
5480 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5481 casting pointers.
5482 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5483 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5484 (i386_emit_void_call_2): Likewise.
5485
5486 2011-04-26 Yao Qi <yao@codesourcery.com>
5487
5488 * linux-low.c: Move common macros to linux-ptrace.h.
5489 Include linux-ptrace.h.
5490 * Makefile.in (linux_ptrace_h): New.
5491 (linux-low.o): Depends on linux-ptrace.h.
5492
5493 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5494
5495 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5496 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5497 (remote_prepare): New function with most of the TCP code from ...
5498 (remote_open): ... here. Detect PORT here unconditionally. Move also
5499 setting transport_is_reliable.
5500 * server.c (run_once): New variable.
5501 (gdbserver_usage): Document it.
5502 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5503 the first run if RUN_ONCE.
5504 * server.h (run_once, remote_prepare): New declarations.
5505
5506 2011-04-19 Tom Tromey <tromey@redhat.com>
5507
5508 * win32-low.c (handle_load_dll): Remove duplicate "the".
5509
5510 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5511
5512 Remove support for old Cygwin 1.5 versions.
5513 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5514 function to avoid warning.
5515 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5516 warning.
5517
5518 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5519
5520 * gdbserver/server.h (Macro _): Define it if not available.
5521
5522 2011-03-14 Michael Snyder <msnyder@vmware.com>
5523
5524 * hostio.c (handle_close): Remove unnecessary null test.
5525
5526 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5527
5528 * Makefile.in (maintainer-clean realclean distclean): Remove
5529 "make ... subdir_do" command.
5530
5531 2011-03-10 Michael Snyder <msnyder@vmware.com>
5532
5533 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5534
5535 * server.c (handle_v_run): Free alloced buffer on early return.
5536
5537 2011-03-09 Yao Qi <yao@codesourcery.com>
5538
5539 Revert:
5540 2011-03-04 Yao Qi <yao@codesourcery.com>
5541
5542 * Makefile.in: Remove GNU make feature --directory.
5543
5544 2011-03-05 Yao Qi <yao@codesourcery.com>
5545
5546 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5547 (subdir_do): New make target. Copied from gdb/Makefile.
5548 (maintainer-clean, realclean, distclean, clean): Call corresponding
5549 make targets in common/Makefile.
5550
5551 2011-02-11 Yao Qi <yao@codesourcery.com>
5552
5553 * configure.ac: Call AC_PROG_RANLIB.
5554 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5555 * configure: Regenerate.
5556
5557 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5558
5559 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5560
5561 2011-03-06 Yao Qi <yao@codesourcery.com>
5562
5563 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5564
5565 2011-03-05 Yao Qi <yao@codesourcery.com>
5566
5567 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5568 (subdir_do): New make target. Copied from gdb/Makefile.
5569 (maintainer-clean, realclean, distclean, clean): Call corresponding
5570 make targets in common/Makefile.
5571
5572 2011-03-04 Yao Qi <yao@codesourcery.com>
5573
5574 * Makefile.in: Remove GNU make feature --directory.
5575
5576 2011-03-04 Michael Snyder <msnyder@vmware.com>
5577
5578 * server.c (queue_stop_reply): Call xmalloc not malloc.
5579
5580 2011-03-02 Michael Snyder <msnyder@vmware.com>
5581
5582 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5583
5584 2011-02-28 Michael Snyder <msnyder@vmware.com>
5585
5586 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5587 (cmd_qtframe): Ditto.
5588 (cmd_qtbuffer): Ditto.
5589 (cmd_bigqtbuffer): Ditto.
5590
5591 * utils.c (decimal2str): Initialize 'width' to nine, then
5592 don't mess with it.
5593
5594 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5595
5596 * hostio.c (require_data): Free *data, not data.
5597
5598 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5599
5600 * hostio.c (require_data): Use free, not xfree.
5601
5602 2011-02-27 Michael Snyder <msnyder@vmware.com>
5603
5604 * server.c (handle_query): Discard unused value.
5605
5606 * hostio.c (require_data): Free malloc memory before returning
5607 error.
5608
5609 2011-02-26 Michael Snyder <msnyder@vmware.com>
5610
5611 * linux-low.c (list_threads): Call closedir for dirent.
5612
5613 2011-02-27 Michael Snyder <msnyder@vmware.com>
5614
5615 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5616 a case statement falls through.
5617
5618 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5619
5620 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5621 in comparison.
5622
5623 2011-02-26 Michael Snyder <msnyder@vmware.com>
5624
5625 * utils.c (decimal2str): Eliminate dead code and dead param.
5626 (pulongest): Drop dead param from call to decimal2str.
5627 (plongest): Ditto.
5628
5629 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5630
5631 Revert the following patch (not approved yet):
5632 2011-02-21 Hui Zhu <teawater@gmail.com>
5633 * tracepoint.c (tp_printf): New function.
5634 (eval_agent_expr): Handle gdb_agent_op_printf.
5635
5636 2011-02-21 Hui Zhu <teawater@gmail.com>
5637
5638 * tracepoint.c (tp_printf): New function.
5639 (eval_agent_expr): Handle gdb_agent_op_printf.
5640
5641 2011-02-18 Tom Tromey <tromey@redhat.com>
5642
5643 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5644 (tracepoint.o): Likewise.
5645 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5646 (gdb_agent_op_names): Likewise.
5647
5648 2011-02-18 Tom Tromey <tromey@redhat.com>
5649
5650 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5651 gdb_agent_op_rot>: New constants.
5652 (gdb_agent_op_names): Add pick and roll.
5653 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5654 cases.
5655
5656 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5657
5658 * aclocal.m4: Regenerated with aclocal-1.11.1.
5659
5660 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5661
5662 * server.c (handle_qxfer_traceframe_info): New.
5663 (qxfer_packets): Register "traceframe-info".
5664 (handle_query): Report support for qXfer:traceframe-info:read+.
5665 * tracepoint.c (match_blocktype): New.
5666 (traceframe_find_block_type): Rename to ...
5667 (traceframe_walk_blocks): ... this. Add callback filter argument,
5668 and use it.
5669 (traceframe_find_block_type): New, reimplemented on top of
5670 traceframe_walk_blocks.
5671 (build_traceframe_info_xml): New.
5672 (traceframe_read_info): New.
5673 * server.h (traceframe_read_info): Declare.
5674
5675 2011-02-11 Yao Qi <yao@codesourcery.com>
5676
5677 * configure.ac: Call AC_PROG_RANLIB.
5678 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5679 * configure: Regenerate.
5680
5681 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5682
5683 * server.c (gdb_read_memory): Change return semantics to allow
5684 partial transfers.
5685 (handle_search_memory_1): Adjust.
5686 (process_serial_event) <'m' packet>: Handle partial transfers.
5687 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5688
5689 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5690
5691 * regcache.c (init_register_cache): Initialize
5692 regcache->register_status.
5693 (free_register_cache): Release regcache->register_status.
5694 (regcache_cpy): Copy register_status.
5695 (registers_to_string): Print 'x's for unavailable registers.
5696 (supply_register): Mark the register's status valid or
5697 unavailable, depending on whether a buffer was passed in or not.
5698 (supply_register_zeroed): New.
5699 (supply_regblock): Mark the registers' status valid or
5700 unavailable, depending on whether a buffer was passed in or not.
5701 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5702 (struct regcache): New `register_status' field.
5703 (supply_register_zeroed): Declare.
5704 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5705 supply_register_zeroed, rather than passing a NULL buffer to
5706 supply_register.
5707 * tracepoint.c (fetch_traceframe_registers): Update comment.
5708
5709 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5710
5711 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5712 buffer explicit.
5713
5714 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5715
5716 * server.h (decode_xfer_write): Change prototype.
5717 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5718 and don't extract the annex here.
5719 * server.c (decode_xfer_read): Remove `annex' parameter,
5720 and don't extract the annex here.
5721 (decode_xfer): New.
5722 (struct qxfer): New.
5723 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5724 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5725 (handle_qxfer_statictrace): New functions, abstracted out from
5726 handle_query, and made to use the struct qxfer interface.
5727 (handle_threads_qxfer_proper): Rename to ...
5728 (handle_qxfer_threads_proper): ... this.
5729 (handle_threads_qxfer): Rename to ...
5730 (handle_qxfer_threads): ... this. Adjust.
5731 (qxfer_packets): New array.
5732 (handle_qxfer): New function.
5733 (handle_query): Use handle_qxfer.
5734
5735 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5736
5737 * gdbreplay.c: Shorten lines of >= 80 columns.
5738 * linux-low.c: Ditto.
5739 * linux-ppc-low.c: Ditto.
5740 * linux-s390-low.c: Ditto.
5741 * linux-sparc-low.c: Ditto.
5742 * linux-x86-low.c: Ditto.
5743 * linux-xtensa-low.c: Ditto.
5744 * mem-break.c: Ditto.
5745 * nto-low.c: Ditto.
5746 * regcache.h: Ditto.
5747 * remote-utils.c: Ditto.
5748 * server.c: Ditto.
5749 * server.h: Ditto.
5750 * thread-db.c: Ditto.
5751 * tracepoint.c: Ditto.
5752 * utils.c: Ditto.
5753 * win32-low.h: Ditto.
5754
5755 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5756
5757 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5758 update.
5759
5760 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5761
5762 * server.c (gdbserver_version): Update copyright year in version
5763 output.
5764 * gdbreplay.c (gdbreplay_version): Ditto.
5765
5766 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5767
5768 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5769 * linux-bfin-low.c: New file.
5770 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5771 PT_DATA_ADDR for BFIN targets.
5772 * Makefile.in (SFILES): Add linux-bfin-low.c.
5773 (clean): Remove reg-bfin.c.
5774 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5775 * README: Mention supported Blackfin targets.
5776
5777 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5778
5779 * .gitignore: New file.
5780
5781 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5782
5783 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5784
5785 2010-10-22 Jie Zhang <jie@codesourcery.com>
5786
5787 * Makefile.in: Add FLAGS_TO_PASS variable.
5788 (install): Remove dependency of install-only and recursively
5789 invoke make for install-only.
5790
5791 2010-10-04 Doug Evans <dje@google.com>
5792
5793 * Makefile.in (uninstall): Use $(DESTDIR).
5794
5795 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5796
5797 PR gdb/11842
5798
5799 * linux-x86-low.c (compat_siginfo_from_siginfo)
5800 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5801 si_code is < 0. Check for si_code == SI_TIMER before checking for
5802 si_code < 0.
5803
5804 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5805
5806 * lynx-i386-low.c: New file.
5807 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5808
5809 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5810
5811 * lynx-low.c (ptrace_request_to_str): Remove handling for
5812 request values that have been removed in LynxOS 5.x.
5813
5814 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5815
5816 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5817 <ptrace.h>
5818
5819 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5820
5821 * configure.ac: Add --enable-inprocess-agent option.
5822 * configure: Rebuilt.
5823
5824 2010-09-06 Yao Qi <yao@codesourcery.com>
5825
5826 * linux-low.c (linux_kill): Remove unused variable.
5827 (linux_stabilize_threads): Likewise.
5828 * server.c (start_inferior): Likewise.
5829 (queue_stop_reply_callback): Likewise.
5830 * tracepoint.c (do_action_at_tracepoint): Likewise.
5831
5832 2010-09-06 Yao Qi <yao@codesourcery.com>
5833
5834 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5835 on return.
5836
5837 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5838
5839 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5840
5841 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5842
5843 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5844 "$(IPA_DEPFILES)".
5845
5846 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5847
5848 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5849 gdbserver/lynx-ppc-low.c: New files.
5850 * Makefile.in (lynx_low_h): New variable.
5851 (lynx-low.o, lynx-ppc-low.o): New rules.
5852 * configure.ac: On LynxOS, link with -lnetinet.
5853 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5854 * configure: regenerate.
5855
5856 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5857
5858 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5859 * configure.ac: Add check for vasprintf and vsnprintf.
5860 * configure, config.in: Regenerate.
5861 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5862
5863 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5864
5865 * gdbreplay.c: Move include of alloca.h up, next to include of
5866 malloc.h.
5867 * server.h: Add include of malloc.h.
5868 * mem-break.c: Remove include of malloc.h.
5869 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5870
5871 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5872
5873 * Makefile.in (memmem.o): Build with -Wno-error.
5874
5875 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5876
5877 * utils.c (xsnprintf): Make non-static.
5878 * server.h: Add xsnprintf declaration.
5879 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5880 replace calls to snprintf by calls to xsnprintf throughout.
5881
5882 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5883
5884 * configure.ac: Add configure check for alloca.
5885 * configure, config.in: Regenerate.
5886 * server.h: Include alloca.h if it exists.
5887 * gdbreplay.c: Include alloca.h if it exists.
5888
5889 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5890
5891 * linux-low.c (__SIGRTMIN): Define if not already defined.
5892 (linux_create_inferior): Check for __ANDROID__ rather than
5893 __SIGRTMIN.
5894 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5895 are already deferred.
5896 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5897 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5898 stopped and already has a pending signal to report.
5899 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5900 a pending signal to report or is moving out of a jump pad.
5901 (linux_init_signals): Check for __ANDROID__ rather than
5902 __SIGRTMIN.
5903
5904 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5905
5906 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5907 debug_threads check. Avoid a linear search when not doing debug
5908 output.
5909
5910 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5911
5912 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5913 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5914 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5915 (process_event): Change local fd's type to gdb_fildes_t.
5916 (create_file_handler): Adjust prototype.
5917 (delete_file_handler): Adjust prototype.
5918 (handle_file_event): Adjust prototype. Use pfildes.
5919 (create_file_event): Adjsut prototype.
5920 * remote-utils.c (remote_desc, listen_desc): Change type to
5921 gdb_fildes_t.
5922 * server.h: New gdb_fildes_t typedef.
5923 [USE_WIN32API]: Include winsock2.h.
5924 (delete_file_handler, add_file_handler): Adjust prototypes.
5925 (pfildes): Declare.
5926 * utils.c (pfildes): New.
5927
5928 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5929
5930 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5931 * configure: Regenerate.
5932
5933 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5934
5935 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5936 (linux_done_accessing_memory): ... this.
5937 (linux_target_ops): Adjust.
5938 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5939 * nto-low.c (nto_target_ops): Adjust comment.
5940 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5941 * spu-low.c (spu_target_ops): Adjust comment.
5942 * target.h (target_ops): Rename unprepare_to_access_memory field
5943 to done_accessing_memory.
5944 (unprepare_to_access_memory): Rename to ...
5945 (done_accessing_memory): ... this.
5946
5947 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5948
5949 * linux-low.c (linux_prepare_to_access_memory): New.
5950 (linux_unprepare_to_access_memory): New.
5951 (linux_target_ops): Install them.
5952 * server.c (read_memory): Rename to ...
5953 (gdb_read_memory): ... this. Use
5954 prepare_to_access_memory/prepare_to_access_memory.
5955 (write_memory): Rename to ...
5956 (gdb_write_memory): ... this. Use
5957 prepare_to_access_memory/prepare_to_access_memory.
5958 (handle_search_memory_1): Adjust.
5959 (process_serial_event): Adjust.
5960 * target.h (struct target_ops): New fields
5961 prepare_to_access_memory and unprepare_to_access_memory.
5962 (prepare_to_access_memory, unprepare_to_access_memory): New.
5963 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5964 prepare_to_access_memory/prepare_to_access_memory.
5965 * nto-low.c (nto_target_ops): Adjust.
5966 * spu-low.c (spu_target_ops): Adjust.
5967 * win32-low.c (win32_target_ops): Adjust.
5968
5969 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5970
5971 * Makefile.in (WARN_CFLAGS): Get it from configure.
5972 (WERROR_CFLAGS): New.
5973 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5974 * configure.ac: Introduce --enable-werror, which adds -Werror to
5975 the compiler command line. Enabled by default. Disable with
5976 --disable-werror. Add -Wdeclaration-after-statement
5977 Wpointer-arith and -Wformat-nonliteral to warning flags.
5978 * configure: Regenerate.
5979
5980 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5981
5982 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5983
5984 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5985
5986 * gdbreplay.c (remote_error): New.
5987 (gdbchar): New.
5988 (expect): Use gdbchar. Check for error reading from GDB.
5989 Clarify sync error output.
5990 (play): Check for errors writing to GDB.
5991 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5992 * remote-utils.c (getpkt): Check for errors writing to the remote
5993 descriptor.
5994
5995 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5996
5997 * linux-low.c (linux_wait_1): Move non-debugging code out of
5998 `debug_threads' control.
5999
6000 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6001
6002 * linux-low.c (linux_wait_1): Don't set last_status here.
6003 * server.c (push_event, queue_stop_reply_callback): Assert we're
6004 not pushing a TARGET_WAITKIND_IGNORE event.
6005 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6006 (myresume, handle_target_event): Set the thread's last_resume_kind
6007 and last_status from the target returned status.
6008
6009 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6010
6011 PR threads/10729
6012
6013 * linux-x86-low.c (update_debug_registers_callback): New.
6014 (i386_dr_low_set_addr): Use it.
6015 (i386_dr_low_get_addr): New.
6016 (i386_dr_low_set_control): Use update_debug_registers_callback.
6017 (i386_dr_low_get_control): New.
6018 (i386_dr_low_get_status): Adjust.
6019 * linux-low.c (linux_stop_lwp): New.
6020 * linux-low.h (linux_stop_lwp): Declare.
6021
6022 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6023 argument instead of a i386_debug_reg_state.
6024 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6025 a i386_debug_reg_state.
6026 (i386_insert_aligned_watchpoint): Adjust.
6027 (i386_remove_aligned_watchpoint): Adjust.
6028 (i386_low_stopped_data_address): Read the debug registers from the
6029 inferior instead of from the mirrors.
6030 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6031 (i386_dr_low_get_addr): Declare.
6032 (i386_dr_low_get_control): Declare.
6033 (i386_dr_low_get_status): Change prototype.
6034
6035 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6036 (i386_dr_low_get_addr): New.
6037 (i386_dr_low_get_control): New.
6038 (i386_dr_low_get_status): Adjust prototype. Return
6039 dr_status_mirror.
6040 (i386_initial_stuff): Clear dr_status_mirror and
6041 dr_control_mirror.
6042 (i386_get_thread_context): Adjust.
6043 (i386_set_thread_context): Adjust.
6044 (i386_thread_added): Adjust.
6045
6046 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6047
6048 * linux-low.h (linux_thread_area): Delete declaration.
6049
6050 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6051
6052 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6053 after its termination.
6054
6055 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6056
6057 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6058 (gdb_wants_all_stopped): Delete.
6059 (linux_wait_1): Don't call them.
6060 * server.c (handle_v_cont): Tag all threads as want-stopped.
6061 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6062 stopped as "client-wants-stopped".
6063
6064 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6065
6066 * Makefile.in (signals_h): New.
6067 (server_h): Depend on it.
6068 (server.o): Don't depend on $(signals_def).
6069 (signals.o): Depend on $(signals_def).
6070
6071 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6072
6073 * Makefile.in (signals_def): New.
6074 (server_h): Append include/gdb/signals.h and signals_def.
6075 (server.o): Append signals_def.
6076
6077 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6078
6079 * server.c (handle_target_event): Use target_signal_to_host for
6080 resume_info.sig initialization.
6081 * target.h (struct thread_resume) <sig>: New comment.
6082
6083 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6084
6085 * server.c (handle_query): strcpy() the returned string from paddress()
6086 instead of sprintf().
6087 * utils.c (paddress): Return phex_nz().
6088
6089 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6090
6091 * server.c (handle_v_cont): Call mourn_inferior if process
6092 just exited.
6093 (myresume): Likewise.
6094
6095 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6096
6097 Static tracepoints, and integration with UST.
6098
6099 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6100 * mem-break.c (uninsert_all_breakpoints)
6101 (reinsert_all_breakpoints): New.
6102 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6103 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6104 (gdb_agent_ust_loaded, helper_thread_id)
6105 (gdb_agent_helper_thread_id): New macros.
6106 (struct ipa_sym_addresses): Add addr_ust_loaded,
6107 addr_helper_thread_id, addr_cmd_buf.
6108 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6109 (in_process_agent_loaded_ust): New.
6110 (write_e_ust_not_loaded): New.
6111 (maybe_write_ipa_ust_not_loaded): New.
6112 (struct collect_static_trace_data_action): New.
6113 (enum tracepoint_type) <static_tracepoint>: New.
6114 (struct tracepoint) <handle>: Mention static tracepoints.
6115 (struct static_tracepoint_ctx): New.
6116 (CMD_BUF_SIZE): New.
6117 (add_tracepoint_action): Handle static tracepoint actions.
6118 (unprobe_marker_at): New.
6119 (clear_installed_tracepoints): Handle static tracepoints.
6120 (cmd_qtdp): Handle static tracepoints.
6121 (probe_marker_at): New.
6122 (cmd_qtstart): Handle static tracepoints.
6123 (response_tracepoint): Handle static tracepoints.
6124 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6125 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6126 (get_context_regcache): Handle static tracepoints.
6127 (do_action_at_tracepoint): Handle static tracepoint actions.
6128 (traceframe_find_block_type): Handle static trace data blocks.
6129 (traceframe_read_sdata): New.
6130 (download_tracepoints): Download static tracepoint actions.
6131 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6132 (GDB_PROBE_NAME): New.
6133 (ust_ops): New.
6134 (GET_UST_SYM): New.
6135 (USTF): New.
6136 (dlsym_ust): New.
6137 (ust_marker_to_static_tracepoint): New.
6138 (gdb_probe): New.
6139 (collect_ust_data_at_tracepoint): New.
6140 (gdb_ust_probe): New.
6141 (UNIX_PATH_MAX, SOCK_DIR): New.
6142 (gdb_ust_connect_sync_socket): New.
6143 (resume_thread, stop_thread): New.
6144 (run_inferior_command): New.
6145 (init_named_socket): New.
6146 (gdb_ust_socket_init): New.
6147 (cstr_to_hexstr): New.
6148 (next_st): New.
6149 (first_marker, next_marker): New.
6150 (response_ust_marker): New.
6151 (cmd_qtfstm, cmd_qtsstm): New.
6152 (unprobe_marker_at, probe_marker_at): New.
6153 (cmd_qtstmat, gdb_ust_thread): New.
6154 (gdb_ust_init): New.
6155 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6156 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6157 (ST_REGENTRY): New.
6158 (x86_64_st_collect_regmap): New.
6159 (X86_64_NUM_ST_COLLECT_GREGS): New.
6160 (AMD64_RIP_REGNUM): New.
6161 (supply_static_tracepoint_registers): New.
6162 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6163 (ST_REGENTRY): New.
6164 (i386_st_collect_regmap): New.
6165 (i386_NUM_ST_COLLECT_GREGS): New.
6166 (supply_static_tracepoint_registers): New.
6167 * server.c (handle_query): Handle qXfer:statictrace:read.
6168 <qSupported>: Report support for StaticTracepoints, and
6169 qXfer:statictrace:read features.
6170 * server.h (traceframe_read_sdata)
6171 (supply_static_tracepoint_registers): Declare.
6172 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6173 (unpack_varlen_hex): Include in IPA build.
6174 * Makefile.in (ustlibs, ustinc): New.
6175 (IPA_OBJS): Add remote-utils-ipa.o.
6176 ($(IPA_LIB)): Link -ldl and -lpthread.
6177 (UST_CFLAGS): New.
6178 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6179 * config.in, configure: Regenerate.
6180
6181 2010-06-20 Ian Lance Taylor <iant@google.com>
6182 Pedro Alves <pedro@codesourcery.com>
6183
6184 * linux-x86-low.c (always_true): Delete.
6185 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6186 trying to fool the compiler with always_true.
6187
6188 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6189
6190 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6191 conditions in gdbserver.
6192
6193 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6194
6195 * spu-low.c (spu_read_memory): Wrap around local store limit.
6196 (spu_write_memory): Likewise.
6197
6198 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6199
6200 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6201 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6202 LONGEST uses.
6203 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6204 uses.
6205 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6206 uses with LONGEST uses.
6207
6208 2010-06-14 Stan Shebs <stan@codesourcery.com>
6209 Pedro Alves <pedro@codesourcery.com>
6210
6211 Bytecode compiler.
6212
6213 * linux-x86-low.c: Include limits.h.
6214 (add_insns): New.
6215 (always_true): New.
6216 (EMIT_ASM): New.
6217 (EMIT_ASM32): New.
6218 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6219 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6220 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6221 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6222 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6223 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6224 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6225 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6226 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6227 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6228 (amd64_emit_void_call_2): New.
6229 (amd64_emit_ops): New.
6230 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6231 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6232 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6233 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6234 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6235 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6236 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6237 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6238 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6239 (i386_emit_stack_adjust, i386_emit_int_call_1)
6240 (i386_emit_void_call_2): New.
6241 (i386_emit_ops): New.
6242 (x86_emit_ops): New.
6243 (the_low_target): Install x86_emit_ops.
6244 * server.h (struct emit_ops): New.
6245 (get_raw_reg_func_addr): Declare.
6246 (current_insn_ptr, emit_error): Declare.
6247 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6248 (set_trace_state_variable_value): New defines.
6249 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6250 addr_get_trace_state_variable_value and
6251 addr_set_trace_state_variable_value.
6252 (symbol_list): New fields for get_raw_reg,
6253 get_trace_state_variable_value and set_trace_state_variable_value.
6254 (condfn): New typedef.
6255 (struct tracepoint): New field `compiled_cond'.
6256 (do_action_at_tracepoint): Clear compiled_cond.
6257 (get_trace_state_variable_value, set_trace_state_variable_value):
6258 Export in the IPA.
6259 (condition_true_at_tracepoint): If there's a compiled condition,
6260 run that.
6261 (current_insn_ptr, emit_error): New globals.
6262 (struct bytecode_address): New.
6263 (get_raw_reg_func_addr): New.
6264 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6265 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6266 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6267 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6268 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6269 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6270 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6271 (compile_tracepoint_condition, compile_bytecodes): New.
6272 * target.h (emit_ops): Forward declare.
6273 (struct target_ops): New field emit_ops.
6274 (target_emit_ops): New.
6275 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6276 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6277 * linux-low.c (linux_emit_ops): New.
6278 (linux_target_ops): Install it.
6279 * linux-low.h (struct linux_target_ops): New field emit_ops.
6280
6281 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6282
6283 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6284 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6285
6286 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6287 Stan Shebs <stan@codesourcery.com>
6288
6289 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6290 (all): Depend on $(extra_libraries).
6291 (install-only): Install the IPA.
6292 (IPA_OBJS, IPA_LIB): New.
6293 (clean): Remove the IPA lib.
6294 (IPAGENT_CFLAGS): New.
6295 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6296 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6297 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6298 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6299 * configure.ac: Check for atomic builtins support in the compiler.
6300 (IPA_DEPFILES, extra_libraries): Define.
6301 * configure.srv (ipa_obj): Add description.
6302 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6303 (i[34567]86-*-linux*): Set ipa_obj.
6304 (x86_64-*-linux*): Set ipa_obj.
6305 * linux-low.c (stabilizing_threads): New.
6306 (supports_fast_tracepoints): New.
6307 (linux_detach): Stabilize threads before detaching.
6308 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6309 the lwp is either not stabilizing, or is moving out of a jump pad.
6310 (linux_fast_tracepoint_collecting): New.
6311 (maybe_move_out_of_jump_pad): New.
6312 (enqueue_one_deferred_signal): New.
6313 (dequeue_one_deferred_signal): New.
6314 (linux_wait_for_event_1): If moving out of a jump pad, defer
6315 pending signals to later.
6316 (linux_stabilize_threads): New.
6317 (linux_wait_1): Check if threads need moving out of jump pads, and
6318 do it if so.
6319 (stuck_in_jump_pad_callback): New.
6320 (move_out_of_jump_pad_callback): New.
6321 (lwp_running): New.
6322 (linux_resume_one_lwp): Handle moving out of jump pads.
6323 (linux_set_resume_request): Dequeue deferred signals.
6324 (need_step_over_p): Also step over fast tracepoint jumps.
6325 (start_step_over): Also uninsert fast tracepoint jumps.
6326 (finish_step_over): Also reinsert fast tracepoint jumps.
6327 (linux_install_fast_tracepoint_jump): New.
6328 (linux_target_ops): Install linux_stabilize_threads and
6329 linux_install_fast_tracepoint_jump_pad.
6330 * linux-low.h (linux_target_ops) <get_thread_area,
6331 install_fast_tracepoint_jump_pad>: New fields.
6332 (struct lwp_info) <collecting_fast_tracepoint,
6333 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6334 (linux_get_thread_area): Declare.
6335 * linux-x86-low.c (jump_insn): New.
6336 (x86_get_thread_area): New.
6337 (append_insns): New.
6338 (push_opcode): New.
6339 (amd64_install_fast_tracepoint_jump_pad): New.
6340 (i386_install_fast_tracepoint_jump_pad): New.
6341 (x86_install_fast_tracepoint_jump_pad): New.
6342 (the_low_target): Install x86_get_thread_area and
6343 x86_install_fast_tracepoint_jump_pad.
6344 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6345 (struct fast_tracepoint_jump): New.
6346 (fast_tracepoint_jump_insn): New.
6347 (fast_tracepoint_jump_shadow): New.
6348 (find_fast_tracepoint_jump_at): New.
6349 (fast_tracepoint_jump_here): New.
6350 (delete_fast_tracepoint_jump): New.
6351 (set_fast_tracepoint_jump): New.
6352 (uninsert_fast_tracepoint_jumps_at): New.
6353 (reinsert_fast_tracepoint_jumps_at): New.
6354 (set_breakpoint_at): Use write_inferior_memory.
6355 (uninsert_raw_breakpoint): Use write_inferior_memory.
6356 (check_mem_read): Mask out fast tracepoint jumps.
6357 (check_mem_write): Mask out fast tracepoint jumps.
6358 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6359 (set_fast_tracepoint_jump): Declare.
6360 (delete_fast_tracepoint_jump)
6361 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6362 (reinsert_fast_tracepoint_jumps_at): Declare.
6363 * regcache.c: Don't compile many functions when building the
6364 in-process agent library.
6365 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6366 the register buffer in the heap.
6367 (free_register_cache): If the register buffer isn't owned by the
6368 regcache, don't free it.
6369 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6370 pre-existing register caches.
6371 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6372 type.
6373 (convert_ascii_to_int): : Constify `from' parameter type.
6374 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6375 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6376 the needed buffer in-place.
6377 (relocate_instruction): New.
6378 * server.c (handle_query) <qSymbols>: If the target supports
6379 tracepoints, give it a chance of looking up symbols. Report
6380 support for fast tracepoints.
6381 (handle_status): Stabilize threads.
6382 (process_serial_event): Adjust.
6383 * server.h (struct fast_tracepoint_jump): Forward declare.
6384 (struct process_info) <fast_tracepoint_jumps>: New field.
6385 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6386 (decode_X_packet, decode_M_packet): Adjust.
6387 (relocate_instruction): Declare.
6388 (in_process_agent_loaded): Declare.
6389 (tracepoint_look_up_symbols): Declare.
6390 (struct fast_tpoint_collect_status): Declare.
6391 (fast_tracepoint_collecting): Declare.
6392 (force_unlock_trace_buffer): Declare.
6393 (handle_tracepoint_bkpts): Declare.
6394 (initialize_low_tracepoint)
6395 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6396 * target.h (struct target_ops) <stabilize_threads,
6397 install_fast_tracepoint_jump_pad>: New fields.
6398 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6399 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6400 [HAVE_STDINT_H]: Include stdint.h.
6401 (trace_debug_1): Rename to ...
6402 (trace_vdebug): ... this.
6403 (trace_debug): Rename to ...
6404 (trace_debug_1): ... this. Add `level' parameter.
6405 (trace_debug): New.
6406 (ATTR_USED, ATTR_NOINLINE): New.
6407 (IP_AGENT_EXPORT): New.
6408 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6409 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6410 (about_to_request_buffer_space, trace_buffer_is_full)
6411 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6412 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6413 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6414 (traceframe_write_count, traceframes_created)
6415 (trace_state_variables)
6416 New renaming defines.
6417 (struct ipa_sym_addresses): New.
6418 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6419 (symbol_list): New.
6420 (ipa_sym_addrs): New.
6421 (all_tracepoint_symbols_looked_up): New.
6422 (in_process_agent_loaded): New.
6423 (write_e_ipa_not_loaded): New.
6424 (maybe_write_ipa_not_loaded): New.
6425 (tracepoint_look_up_symbols): New.
6426 (debug_threads) [IN_PROCESS_AGENT]: New.
6427 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6428 (UNKNOWN_SIDE_EFFECTS): New.
6429 (stop_tracing): New.
6430 (flush_trace_buffer): New.
6431 (stop_tracing_bkpt): New.
6432 (flush_trace_buffer_bkpt): New.
6433 (read_inferior_integer): New.
6434 (read_inferior_uinteger): New.
6435 (read_inferior_data_pointer): New.
6436 (write_inferior_data_pointer): New.
6437 (write_inferior_integer): New.
6438 (write_inferior_uinteger): New.
6439 (struct collect_static_trace_data_action): Delete.
6440 (enum tracepoint_type): New.
6441 (struct tracepoint) <type>: New field `type'.
6442 <actions_str, step_actions, step_actions_str>: Only include in
6443 GDBserver.
6444 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6445 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6446 (tracepoints): Use IP_AGENT_EXPORT.
6447 (last_tracepoint): Don't include in the IPA.
6448 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6449 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6450 (alloced_trace_state_variables): New.
6451 (trace_state_variables): Use IP_AGENT_EXPORT.
6452 (traceframe_t): Delete unused variable.
6453 (circular_trace_buffer): Don't include in the IPA.
6454 (trace_buffer_start): Delete.
6455 (struct trace_buffer_control): New.
6456 (trace_buffer_free): Delete.
6457 (struct ipa_trace_buffer_control): New.
6458 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6459 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6460 New.
6461 (trace_buffer_ctrl): New.
6462 (TRACE_BUFFER_CTRL_CURR): New.
6463 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6464 Reimplement as macros.
6465 (trace_buffer_wrap): Delete.
6466 (traceframe_write_count, traceframe_read_count)
6467 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6468 (struct tracepoint_hit_ctx) <type>: New field.
6469 (struct fast_tracepoint_ctx): New.
6470 (memory_barrier): New.
6471 (cmpxchg): New.
6472 (record_tracepoint_error): Update atomically in the IPA.
6473 (clear_inferior_trace_buffer): New.
6474 (about_to_request_buffer_space): New.
6475 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6476 updating the same buffer.
6477 (add_tracepoint): Default the tracepoint's type to trap
6478 tracepoint, and orig_size to -1.
6479 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6480 internal variables.
6481 (create_trace_state_variable): New parameter `gdb'. Handle it.
6482 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6483 (cmd_qtdp): Handle fast tracepoints.
6484 (cmd_qtdv): Adjust.
6485 (max_jump_pad_size): New.
6486 (gdb_jump_pad_head): New.
6487 (get_jump_space_head): New.
6488 (claim_jump_space): New.
6489 (sort_tracepoints): New.
6490 (MAX_JUMP_SIZE): New.
6491 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6492 IPA.
6493 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6494 support. Upload fast traceframes, and delete internal IPA
6495 breakpoints.
6496 (stop_tracing_handler): New.
6497 (flush_trace_buffer_handler): New.
6498 (cmd_qtstop): Upload fast tracepoints.
6499 (response_tracepoint): Handle fast tracepoints.
6500 (tracepoint_finished_step): Upload fast traceframes. Set the
6501 tracepoint hit context's tracepoint type.
6502 (handle_tracepoint_bkpts): New.
6503 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6504 type. Add comment about fast tracepoints.
6505 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6506 non-existing action_str field.
6507 (get_context_regcache): Handle fast tracepoints.
6508 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6509 to the regcache.
6510 (fast_tracepoint_from_jump_pad_address): New.
6511 (fast_tracepoint_from_ipa_tpoint_address): New.
6512 (collecting_t): New.
6513 (force_unlock_trace_buffer): New.
6514 (fast_tracepoint_collecting): New.
6515 (collecting): New.
6516 (gdb_collect): New.
6517 (write_inferior_data_ptr): New.
6518 (target_tp_heap): New.
6519 (target_malloc): New.
6520 (download_agent_expr): New.
6521 (UALIGN): New.
6522 (download_tracepoints): New.
6523 (download_trace_state_variables): New.
6524 (upload_fast_traceframes): New.
6525 (IPA_FIRST_TRACEFRAME): New.
6526 (IPA_NEXT_TRACEFRAME_1): New.
6527 (IPA_NEXT_TRACEFRAME): New.
6528 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6529 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6530 (gdb_jump_pad_buffer_end): New.
6531 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6532 (initialize_tracepoint): Adjust.
6533 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6534 buffer. Initialize the low module.
6535 * utils.c (PREFIX, TOOLNAME): New.
6536 (malloc_failure): Use PREFIX.
6537 (error): In the IPA, an error causes an exit.
6538 (fatal, warning): Use PREFIX.
6539 (internal_error): Use TOOLNAME.
6540 (NUMCELLS): Increase to 10.
6541 * configure, config.in: Regenerate.
6542
6543 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6544
6545 * server.c (handle_query) <qSupported>: Do two passes over the
6546 qSupported string to avoid nesting strtok.
6547
6548 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6549
6550 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6551 (CDEPS): New.
6552 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6553 -Wl,--dynamic-list.
6554 * configure: Regenerate.
6555 * proc-service.list: New.
6556
6557 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6558
6559 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6560 New comment.
6561
6562 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6563
6564 * gdbreplay.c (remote_open): Check error return from socket() call by
6565 its equality to -1 not by it being negative.
6566 * remote-utils.c (remote_open): Likewise.
6567
6568 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6569
6570 * config.h: Regenerate.
6571
6572 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6573
6574 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6575 doesn't provide PTRACE_GET_THREAD_AREA.
6576
6577 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6578
6579 * linux-m68k-low.c: Include <asm/ptrace.h>
6580 (ps_get_thread_area): Implement.
6581
6582 2010-05-03 Doug Evans <dje@google.com>
6583
6584 * event-loop.c (struct callback_event): New struct.
6585 (callback_list): New global.
6586 (append_callback_event, delete_callback_event): New functions.
6587 (process_callback): New function.
6588 (start_event_loop): Call it.
6589 * remote-utils.c (NOT_SCHEDULED): Define.
6590 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6591 moved out of readchar.
6592 (readchar): Rewrite. Call reschedule before returning.
6593 (reset_readchar): New function.
6594 (remote_close): Call it.
6595 (process_remaining, reschedule): New functions.
6596 * server.h (callback_handler_func): New typedef.
6597 (append_callback_event, delete_callback_event): Declare.
6598
6599 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6600
6601 * proc-service.c (ps_pglobal_lookup): Use
6602 thread_db_look_up_one_symbol.
6603 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6604 parameter. Use it instead of all_symbols_looked_up.
6605 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6606 field.
6607 (all_symbols_looked_up): Don't declare.
6608 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6609 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6610 field.
6611 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6612 Set all_symbols_looked_up here.
6613 (thread_db_look_up_one_symbol): New.
6614 (thread_db_get_tls_address): Adjust.
6615 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6616 thread_db object on the heap, and tentatively set it in the
6617 process structure.
6618 (thread_db_init): Don't set all_symbols_looked_up here.
6619 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6620
6621 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6622
6623 * linux-low.c (linux_kill, linux_detach): Adjust.
6624 (status_pending_p_callback): Remove redundant statement. Check
6625 for !TARGET_WAITIKIND_IGNORE, instead of
6626 TARGET_WAITKIND_STOPPED.
6627 (handle_tracepoints): Make sure LWP is locked. Adjust.
6628 (linux_wait_for_event_1): Adjust.
6629 (linux_cancel_breakpoints): New.
6630 (unsuspend_one_lwp): New.
6631 (unsuspend_all_lwps): New.
6632 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6633 (send_sigstop_callback): Change return type to int, add new
6634 `except' parameter and handle it.
6635 (suspend_and_send_sigstop_callback): New.
6636 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6637 pass them down. If SUSPEND, also increment the lwp's suspend
6638 count.
6639 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6640 (need_step_over_p): Don't consider suspended LWPs.
6641 (start_step_over): Adjust.
6642 (proceed_one_lwp): Change return type to int, add new `except'
6643 parameter and handle it.
6644 (unsuspend_and_proceed_one_lwp): New.
6645 (proceed_all_lwps): Use find_inferior instead of
6646 for_each_inferior.
6647 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6648 also decrement the suspend count of LWPs. Pass `except' down,
6649 instead of hacking its suspend count.
6650 (linux_pause_all): Add `freeze' parameter. Adjust.
6651 (linux_unpause_all): New.
6652 (linux_target_ops): Install linux_unpause_all.
6653 * server.c (handle_status): Adjust.
6654 * target.h (struct target_ops): New fields `unpause_all' and
6655 `cancel_breakpoints'. Add new parameter to `pause_all'.
6656 (pause_all): Add new `freeze' parameter.
6657 (unpause_all): New.
6658 (cancel_breakpoints): New.
6659 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6660 cancel breakpoints.
6661 (cmd_qtstart): Pause threads.
6662 (stop_tracing): Pause threads, and cancel breakpoints.
6663 * win32-low.c (win32_target_ops): Adjust.
6664
6665 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6666
6667 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6668 the inferior right away from here...
6669 (linux_wait_1): ... to here, and adjust to check the thread's
6670 last_resume_kind instead of the lwp's step or stop_expected flags.
6671
6672 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6673
6674 * README: Use consistent `GDB' and `GDBserver' spellings.
6675
6676 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6677
6678 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6679 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6680 (linux_detach_one_lwp): Assume the lwp is stopped.
6681 (any_thread_of): Delete.
6682 (linux_detach): Stop all lwps here. Don't blindly delete all
6683 breakpoints.
6684 (delete_lwp_callback): New.
6685 (linux_mourn): Delete all lwps of the process that is gone.
6686 (linux_wait_1): Don't delete the last lwp of the process here.
6687 * mem-break.h (mark_breakpoints_out): Declare.
6688 * mem-break.c (mark_breakpoints_out): New.
6689 (free_all_breakpoints): Use it.
6690 * server.c (handle_target_event): If the process is gone, mark
6691 breakpoints out.
6692 * thread-db.c (struct thread_db) <create_bp>: New field.
6693 (thread_db_enable_reporting): Fix prototype. Store a thread event
6694 breakpoint reference in the thread_db struct.
6695 (thread_db_load_search): Clear the thread_db object.
6696 (try_thread_db_load_1): Ditto.
6697 (switch_to_process): New.
6698 (disable_thread_event_reporting): Use it.
6699 (remove_thread_event_breakpoints): New.
6700 (thread_db_detach, thread_db_mourn): Use it.
6701
6702 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6703
6704 * linux-low.c (linux_enable_event_reporting): New.
6705 (linux_wait_for_event_1, handle_extended_wait): Use it.
6706
6707 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6708
6709 * linux-low.c (linux_kill_one_lwp, linux_kill)
6710 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6711 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6712 SIGSTOP even if the LWP is stopped.
6713 (send_sigstop_callback): New.
6714 (stop_all_lwps): Use send_sigstop_callback instead.
6715 (linux_resume_one_thread): Adjust.
6716 (proceed_one_lwp): Still proceed an LWP that the client has
6717 requested to stop, if we haven't reported it as stopped yet. Make
6718 sure that LWPs the client want stopped, have a pending SIGSTOP.
6719
6720 2010-04-26 Doug Evans <dje@google.com>
6721
6722 * server.c (handle_general_set): Make static.
6723
6724 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6725 Print received char after testing for error/eof instead of before.
6726 (input_interrupt): Tweak comment.
6727
6728 2010-04-23 Doug Evans <dje@google.com>
6729
6730 * server.c (start_inferior): Print inferior argv if --debug.
6731
6732 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6733
6734 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6735 * nto-x86-low.c: Include server.h
6736
6737 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6738
6739 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6740 be consistent with other sources of this directory.
6741 (init_registers_amd64): Correct name of source file of this function
6742 in the comment.
6743
6744 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6745
6746 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6747 64-bit executables.
6748
6749 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6750
6751 * win32-i386-low.c: Add 64-bit support.
6752 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6753 (init_registers_amd64): Declare.
6754 (mappings): Add 64-bit version of array.
6755 (init_windows_x86): New function.
6756 (the_low_target): Change init_arch field to init_windows_x86.
6757
6758 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6759
6760 * win32-low.c: Adapt to support also 64-bit architecture.
6761 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6762 (get_image_name): Use SIZE_T type for local variable `done'.
6763 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6764 (toolhelp_get_dll_name): Idem.
6765 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6766 Use uintptr_t typecast to avoid warning.
6767 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6768 (handle_exception): Use phex_nz to avoid warning.
6769 (win32_wait): Remove unused local variable `process'.
6770
6771 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6772
6773 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6774 `amd64-avx.o'.
6775
6776 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6777
6778 * configure.ac: Use `ws2_32' library for srv_mingw.
6779 * configure: Regenerate.
6780 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6781 * remote-utils.c: Likewise.
6782
6783 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6784
6785 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6786 if __x86_64__ is defined.
6787
6788 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6789
6790 * configure: Regenerate.
6791
6792 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6793
6794 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6795 * target.h (target_ops): New get_tib_address field.
6796 * win32-low.h (win32_thread_info): Add thread_local_base field.
6797 * win32-low.c (child_add_thread): Add tlb argument.
6798 Set thread_local_base field to TLB.
6799 (get_child_debug_event): Adapt to child_add_thread change.
6800 (win32_get_tib_address): New function.
6801 (win32_target_ops): Set get_tib_address field to
6802 win32_get_tib_address.
6803 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6804
6805 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6806
6807 * linux-low.c (linux_mourn): Also remove the process.
6808 * server.c (handle_target_event): Don't remove the process here.
6809 * nto-low.c (nto_mourn): New.
6810 (nto_target_ops): Install it.
6811 * spu-low.c (spu_mourn): New.
6812 (spu_target_ops): Install it.
6813 * win32-low.c (win32_mourn): New.
6814 (win32_target_ops): Install it.
6815
6816 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6817
6818 * server.h (buffer_xml_printf): Remove redundant `;'.
6819
6820 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6821
6822 * regcache.c (set_register_cache): Invalidate regcaches before
6823 changing the register cache layout.
6824 (regcache_invalidate_one): Allow a NULL regcache.
6825 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6826 regcaches before changing the register cache layout or the target
6827 regsets.
6828
6829 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6830
6831 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6832 variable warning on Linux/x86-64.
6833
6834 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6835
6836 GDBserver disconnected tracing support.
6837
6838 * linux-low.c (linux_remove_process): Delete.
6839 (add_lwp): Don't set last_resume_kind here.
6840 (linux_kill): Use `mourn'.
6841 (linux_detach): Use `thread_db_detach', and `mourn'.
6842 (linux_mourn): New.
6843 (linux_attach_lwp_1): Adjust comment.
6844 (linux_attach): last_resume_kind moved the thread_info; adjust.
6845 (status_pending_p_callback): Adjust.
6846 (linux_wait_for_event_1): Adjust.
6847 (count_events_callback, select_singlestep_lwp_callback)
6848 (select_event_lwp_callback, cancel_breakpoints_callback)
6849 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6850 (proceed_one_lwp): Adjust.
6851 (linux_async): Add debug output.
6852 (linux_thread_stopped): New.
6853 (linux_pause_all): New.
6854 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6855 linux_pause_all.
6856 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6857 (thread_db_free): Delete declaration.
6858 (thread_db_detach, thread_db_mourn): Declare.
6859 * thread-db.c (thread_db_init): Use thread_db_mourn.
6860 (thread_db_free): Delete, split in two.
6861 (disable_thread_event_reporting): New.
6862 (thread_db_detach): New.
6863 (thread_db_mourn): New.
6864
6865 * server.h (struct thread_info) <last_resume_kind>: New field.
6866 <attached>: Add comment.
6867 <gdb_detached>: New field.
6868 (handler_func): Change return type to int.
6869 (handle_serial_event, handle_target_event): Ditto.
6870 (gdb_connected): Declare.
6871 (tracing): Delete.
6872 (disconnected_tracing): Declare.
6873 (stop_tracing): Declare.
6874
6875 * server.c (handle_query) <qSupported>: Report support for
6876 disconnected tracing.
6877 (queue_stop_reply_callback): Account for running threads.
6878 (gdb_wants_thread_stopped): New.
6879 (gdb_wants_all_threads_stopped): New.
6880 (gdb_reattached_process): New.
6881 (handle_status): Clear the `gdb_detached' flag of all processes.
6882 In all-stop, stop all threads.
6883 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6884 (process_serial_event): If the remote connection breaks, or if an
6885 exit was forced with "monitor exit", force an event loop exit.
6886 Handle disconnected tracing on detach.
6887 (handle_serial_event): Adjust.
6888 (handle_target_event): If GDB isn't connected, forward events back
6889 to the inferior, unless the last process exited, in which case,
6890 exit gdbserver. Adjust interface.
6891
6892 * remote-utils.c (remote_open): Don't block in accept. Instead
6893 register an event loop source on the listen socket file
6894 descriptor. Refactor bits into ...
6895 (listen_desc): ... this new global.
6896 (gdb_connected): ... this new function.
6897 (enable_async_notification): ... this new function.
6898 (handle_accept_event): ... this new function.
6899 (remote_close): Clear remote_desc.
6900
6901 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6902
6903 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6904 New fields.
6905 (mourn_inferior): Define.
6906 (target_process_qsupported): Avoid the dangling else problem.
6907 (thread_stopped): Define.
6908 (pause_all): Define.
6909 (target_waitstatus_to_string): Declare.
6910 * target.c (target_waitstatus_to_string): New.
6911
6912 * tracepoint.c (tracing): Make extern.
6913 (disconnected_tracing): New.
6914 (stop_tracing): Make extern. Handle tracing stops due to GDB
6915 disconnecting.
6916 (cmd_qtdisconnected): New.
6917 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6918 (handle_tracepoint_general_set): Handle QTDisconnected.
6919
6920 * event-loop.c (event_handler_func): Change return type to int.
6921 (process_event): Bail out if the event handler wants the event
6922 loop to stop.
6923 (handle_file_event): Ditto.
6924 (start_event_loop): Bail out if the event handler wants the event
6925 loop to stop.
6926
6927 * nto-low.c (nto_target_ops): Adjust.
6928 * spu-low.c (spu_wait): Don't remove the process here.
6929 (spu_target_ops): Adjust.
6930 * win32-low.c (win32_wait): Don't remove the process here.
6931 (win32_target_ops): Adjust.
6932
6933 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6934
6935 * regcache.c (realloc_register_cache): Invalidate inferior's
6936 regcache before recreating it.
6937
6938 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6939
6940 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6941
6942 2010-04-09 Stan Shebs <stan@codesourcery.com>
6943 Pedro Alves <pedro@codesourcery.com>
6944
6945 * server.h (LONGEST): New.
6946 (struct thread_info) <while_stepping>: New field.
6947 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6948 Declare.
6949 (initialize_tracepoint, handle_tracepoint_general_set)
6950 (handle_tracepoint_query, tracepoint_finished_step)
6951 (tracepoint_was_hit, release_while_stepping_state_list):
6952 (current_traceframe): Declare.
6953 * server.c (handle_general_set): Handle tracepoint packets.
6954 (read_memory): New.
6955 (write_memory): New.
6956 (handle_search_memory_1): Use read_memory.
6957 (handle_query): Report support for conditional tracepoints, trace
6958 state variables, and tracepoint sources. Handle tracepoint
6959 queries.
6960 (main): Initialize the tracepoints module.
6961 (process_serial_event): Handle traceframe reads/writes.
6962
6963 * linux-low.c (handle_tracepoints): New.
6964 (linux_wait_1): Call it.
6965 (linux_resume_one_lwp): Handle while-stepping.
6966 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6967 (linux_target_ops): Install them.
6968 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6969 New field.
6970 * linux-x86-low.c (x86_supports_tracepoints): New.
6971 (the_low_target). Install it.
6972
6973 * mem-break.h (delete_breakpoint): Declare.
6974 * mem-break.c (delete_breakpoint): Make external.
6975
6976 * target.h (struct target_ops): Add `supports_tracepoints',
6977 `read_pc', and `write_pc' fields.
6978 (target_supports_tracepoints): Define.
6979 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6980 (phex_nz): New.
6981
6982 * regcache.h (struct regcache) <registers_owned>: New field.
6983 (init_register_cache, regcache_cpy): Declare.
6984 (regcache_read_pc, regcache_write_pc): Declare.
6985 (register_cache_size): Declare.
6986 (supply_regblock): Declare.
6987 * regcache.c (init_register_cache): New.
6988 (new_register_cache): Use it.
6989 (regcache_cpy): New.
6990 (register_cache_size): New.
6991 (supply_regblock): New.
6992 (regcache_read_pc, regcache_write_pc): New.
6993
6994 * tracepoint.c: New.
6995
6996 * Makefile.in (OBS): Add tracepoint.o.
6997 (tracepoint.o): New rule.
6998
6999 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7000
7001 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7002 (i386-mmx.o): New.
7003 (i386-mmx.c): Likewise.
7004 (i386-mmx-linux.o): Likewise.
7005 (i386-mmx-linux.c): Likewise.
7006
7007 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7008 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7009 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7010 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7011
7012 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7013 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7014 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7015
7016 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7017
7018 * Makefile.in (clean): Updated.
7019 (i386-avx.o): New.
7020 (i386-avx.c): Likewise.
7021 (i386-avx-linux.o): Likewise.
7022 (i386-avx-linux.c): Likewise.
7023 (amd64-avx.o): Likewise.
7024 (amd64-avx.c): Likewise.
7025 (amd64-avx-linux.o): Likewise.
7026 (amd64-avx-linux.c): Likewise.
7027
7028 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7029 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7030 (srv_amd64_regobj): Add amd64-avx.o.
7031 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7032 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7033 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7034 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7035 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7036 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7037 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7038
7039 * i387-fp.c: Include "i386-xstate.h".
7040 (i387_xsave): New.
7041 (i387_cache_to_xsave): Likewise.
7042 (i387_xsave_to_cache): Likewise.
7043 (x86_xcr0): Likewise.
7044
7045 * i387-fp.h (i387_cache_to_xsave): Likewise.
7046 (i387_xsave_to_cache): Likewise.
7047 (x86_xcr0): Likewise.
7048
7049 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7050 * linux-crisv32-low.c (target_regsets): Likewise.
7051 * linux-m68k-low.c (target_regsets): Likewise.
7052 * linux-mips-low.c (target_regsets): Likewise.
7053 * linux-ppc-low.c (target_regsets): Likewise.
7054 * linux-s390-low.c (target_regsets): Likewise.
7055 * linux-sh-low.c (target_regsets): Likewise.
7056 * linux-sparc-low.c (target_regsets): Likewise.
7057 * linux-xtensa-low.c (target_regsets): Likewise.
7058
7059 * linux-low.c: Include <sys/uio.h>.
7060 (regsets_fetch_inferior_registers): Support nt_type.
7061 (regsets_store_inferior_registers): Likewise.
7062 (linux_process_qsupported): New.
7063 (linux_target_ops): Add linux_process_qsupported.
7064
7065 * linux-low.h (regset_info): Add nt_type.
7066 (linux_target_ops): Add process_qsupported.
7067
7068 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7069 and <sys/uio.h>.
7070 (init_registers_i386_avx_linux): New.
7071 (init_registers_amd64_avx_linux): Likewise.
7072 (xmltarget_i386_linux_no_xml): Likewise.
7073 (xmltarget_amd64_linux_no_xml): Likewise.
7074 (PTRACE_GETREGSET): Likewise.
7075 (PTRACE_SETREGSET): Likewise.
7076 (x86_fill_xstateregset): Likewise.
7077 (x86_store_xstateregset): Likewise.
7078 (use_xml): Likewise.
7079 (x86_linux_update_xmltarget): Likewise.
7080 (x86_linux_process_qsupported): Likewise.
7081 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7082 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7083 init_registers_i386_linux here. Call
7084 x86_linux_update_xmltarget.
7085 (the_low_target): Add x86_linux_process_qsupported.
7086
7087 * server.c (handle_query): Call target_process_qsupported.
7088
7089 * target.h (target_ops): Add process_qsupported.
7090 (target_process_qsupported): New.
7091
7092 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7093
7094 * inferiors.c (add_thread): Set last_status kind to
7095 TARGET_WAITKIND_IGNORE.
7096 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7097 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7098 (linux_wait_1): Move `thread' local definition to block that uses
7099 it. Don't NULL initialize `event_child'.
7100 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7101 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7102 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7103
7104 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7105
7106 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7107 an extended waitstatus, or by a watchpoint.
7108 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7109 thread was stepping or has been stopped by a watchpoint.
7110
7111 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7112
7113 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7114 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7115 of another, then delete the previous, and validate all
7116 breakpoints.
7117 (validate_inserted_breakpoint): New.
7118 (delete_disabled_breakpoints): New.
7119 (validate_breakpoints): New.
7120 (check_mem_read): Validate breakpoints before trusting their
7121 shadow. Delete disabled breakpoints.
7122 (check_mem_write): Validate breakpoints before trusting they
7123 should be inserted. Delete disabled breakpoints.
7124 * mem-break.h (validate_breakpoints):
7125 * server.c (handle_query): Validate breakpoints when we see a
7126 qSymbol query.
7127
7128 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7129
7130 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7131 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7132 if we could tell there's a GDB breakpoint at stop_pc.
7133 (need_step_over_p): Don't do a step over if we find a GDB
7134 breakpoint at the resume PC.
7135
7136 * mem-break.c (struct raw_breakpoint): New.
7137 (enum bkpt_type): New type `gdb_breakpoint'.
7138 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7139 fields. New field `raw'.
7140 (find_raw_breakpoint_at): New.
7141 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7142 breakpoint instead.
7143 (set_breakpoint_at): Adjust.
7144 (delete_raw_breakpoint): New.
7145 (release_breakpoint): New.
7146 (delete_breakpoint): Rename to...
7147 (delete_breakpoint_1): ... this. Add proc parameter. Use
7148 release_breakpoint. Return ENOENT.
7149 (delete_breakpoint): Reimplement.
7150 (find_breakpoint_at): Delete.
7151 (find_gdb_breakpoint_at): New.
7152 (delete_breakpoint_at): Delete.
7153 (set_gdb_breakpoint_at): New.
7154 (delete_gdb_breakpoint_at): New.
7155 (gdb_breakpoint_here): New.
7156 (set_reinsert_breakpoint): Use release_breakpoint.
7157 (uninsert_breakpoint): Rename to ...
7158 (uninsert_raw_breakpoint): ... this.
7159 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7160 (reinsert_raw_breakpoint): Change parameter type to
7161 raw_breakpoint.
7162 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7163 instead.
7164 (check_breakpoints): Adjust. Use release_breakpoint.
7165 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7166 (breakpoint_inserted_here): Ditto.
7167 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7168 Don't trust the breakpoint's shadow if it is not inserted.
7169 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7170 (delete_all_breakpoints): Adjust.
7171 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7172 use delete_breakpoint_1.
7173
7174 * mem-break.h (breakpoints_supported): Delete declaration.
7175 (set_gdb_breakpoint_at): Declare.
7176 (gdb_breakpoint_here): Declare.
7177 (delete_breakpoint_at): Delete.
7178 (delete_gdb_breakpoint_at): Declare.
7179
7180 * server.h (struct raw_breakpoint): Forward declare.
7181 (struct process_info): New field `raw_breakpoints'.
7182
7183 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7184 breakpoints.
7185
7186 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7187
7188 * linux-low.c (status_pending_p_callback): Fix comment.
7189 (linux_wait_for_event_1): Move most of the internal breakpoint
7190 handling from here...
7191 (linux_wait_1): ... to here.
7192 (count_events_callback): New.
7193 (select_singlestep_lwp_callback): New.
7194 (select_event_lwp_callback): New.
7195 (cancel_breakpoints_callback): New.
7196 (select_event_lwp): New.
7197 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7198 priority to all LWPs that have had events that should be reported
7199 to the client. Cancel breakpoints when about to reporting the
7200 event to the client, not while stopping lwps. No longer cancel
7201 finished single-steps here.
7202 (cancel_finished_single_step): Delete.
7203 (cancel_finished_single_steps): Delete.
7204
7205 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7206
7207 * mem-break.c (enum bkpt_type): New.
7208 (struct breakpoint): New field `type'.
7209 (set_breakpoint_at): Change return type to struct breakpoint
7210 pointer. Set type to `other_breakpoint' by default.
7211 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7212 in the breakpoint list.
7213 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7214 (reinsert_breakpoint): Rename to ...
7215 (reinsert_raw_breakpoint): ... this.
7216 (reinsert_breakpoints_at): Adjust.
7217 * mem-break.h (struct breakpoint): Declare.
7218 (set_breakpoint_at): Change return type to struct breakpoint
7219 pointer.
7220
7221 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7222
7223 * server.c (handle_query): Assign, not compare.
7224
7225 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7226
7227 Teach linux gdbserver to step-over-breakpoints.
7228
7229 * linux-low.c (can_hardware_single_step): New.
7230 (supports_breakpoints): New.
7231 (handle_extended_wait): If stopping threads, read the stop pc of
7232 the new cloned LWP.
7233 (get_pc): New.
7234 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7235 low target doesn't support retrieving the PC.
7236 (add_lwp): Set last_resume_kind to resume_continue.
7237 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7238 (linux_attach): Don't clear stop_expected. Set the lwp's
7239 last_resume_kind to resume_stop.
7240 (linux_detach_one_lwp): Don't check for removed breakpoints.
7241 (check_removed_breakpoint): Delete.
7242 (status_pending_p): Rename to ...
7243 (status_pending_p_callback): ... this. Don't check for removed
7244 breakpoints. Don't consider threads that are stopped from GDB's
7245 perspective.
7246 (linux_wait_for_lwp): Always read the stop_pc here.
7247 (cancel_breakpoint): New.
7248 (step_over_bkpt): New global.
7249 (linux_wait_for_event_1): Implement stepping over breakpoints.
7250 (gdb_wants_lwp_stopped): New.
7251 (gdb_wants_all_stopped): New.
7252 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7253 single-step traps here. Store the thread's last reported target
7254 wait status.
7255 (send_sigstop): Don't clear stop_expected. Always set it,
7256 instead.
7257 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7258 (cancel_finished_single_step): New.
7259 (cancel_finished_single_steps): New.
7260 (wait_for_sigstop): Don't cancel finished single-step traps here.
7261 (linux_resume_one_lwp): Don't check for removed breakpoints.
7262 Don't set `step' on non-hardware step archs.
7263 (linux_set_resume_request): Ignore resume_stop requests if already
7264 stopping or stopped. Set the lwp's last_resume_kind.
7265 (resume_status_pending_p): Don't check for removed breakpoints.
7266 (need_step_over_p): New.
7267 (start_step_over): New.
7268 (finish_step_over): New.
7269 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7270 requests. Clear the thread's last reported target waitstatus.
7271 Don't use the `suspended' flag. Don't consider pending breakpoints.
7272 (linux_resume): Start a step-over if necessary.
7273 (proceed_one_lwp): New.
7274 (proceed_all_lwps): New.
7275 (unstop_all_lwps): New.
7276 * linux-low.h (struct lwp_info): Rewrite comment for the
7277 `suspended' flag. Add the `stop_pc' field. Delete the
7278 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7279 Add `'last_resume_kind' and `need_step_over' fields.
7280 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7281 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7282 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7283 (set_raw_breakpoint_at): New.
7284 (set_breakpoint_at): Rewrite to use it.
7285 (reinsert_breakpoint_handler): Delete.
7286 (set_reinsert_breakpoint): New.
7287 (reinsert_breakpoint_by_bp): Delete.
7288 (delete_reinsert_breakpoints): New.
7289 (uninsert_breakpoint): Rewrite.
7290 (uninsert_breakpoints_at): New.
7291 (reinsert_breakpoint): Rewrite.
7292 (reinsert_breakpoints_at): New.
7293 (check_breakpoints): Rewrite.
7294 (breakpoint_here): New.
7295 (breakpoint_inserted_here): New.
7296 (check_mem_read): Adjust.
7297 * mem-break.h (breakpoints_supported, breakpoint_here)
7298 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7299 (reinsert_breakpoint_by_bp): Delete declaration.
7300 (delete_reinsert_breakpoints): Declare.
7301 (reinsert_breakpoint): Delete declaration.
7302 (reinsert_breakpoints_at): Declare.
7303 (uninsert_breakpoint): Delete declaration.
7304 (uninsert_breakpoints_at): Declare.
7305 (check_breakpoints): Adjust prototype.
7306 * server.h: Adjust include order.
7307 (struct thread_info): Declare here. Add a `last_status' field.
7308
7309 2010-03-23 Michael Snyder <msnyder@vmware.com>
7310
7311 * server.c (crc32): New function.
7312 (handle_query): Add handling for 'qCRC:' request.
7313
7314 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7315
7316 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7317 lwp had been stopped by a watchpoint.
7318
7319 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7320
7321 * server.h (internal_error): Declare.
7322 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7323 * utils.c (internal_error): New function.
7324
7325 2010-03-15 Andreas Schwab <schwab@redhat.com>
7326
7327 * configure.srv: Fix typo setting srv_regobj.
7328
7329 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7330
7331 * linux-low.c (fetch_register): Avoid passing a non string literal
7332 format to `error'.
7333 (usr_store_inferior_registers): Ditto.
7334
7335 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7336
7337 * linux-low.c (linux_write_memory): Bail out early if peeking
7338 memory failed.
7339
7340 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7341
7342 * linux-low.h (struct lwp_info): New fields
7343 `stopped_by_watchpoint' and `stopped_data_address'.
7344 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7345 here, and cache them in the lwp object.
7346 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7347 directly.
7348 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7349 field.
7350 (linux_stopped_by_watchpoint): Rewrite.
7351 (linux_stopped_data_address): Rewrite.
7352
7353 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7354
7355 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7356 switching the current inferior, not before.
7357
7358 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7359
7360 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7361 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7362 i386-linux.c and amd64-linux.c.
7363 (reg-i386.o): Removed.
7364 (reg-i386.c): Likewise.
7365 (reg-i386-linux.o): Likewise.
7366 (reg-i386-linux.c): Likewise.
7367 (reg-x86-64.o): Likewise.
7368 (reg-x86-64.c): Likewise.
7369 (reg-x86-64-linux.o): Likewise.
7370 (reg-x86-64-linux.c): Likewise.
7371 (i386.o): New.
7372 (i386.c): Likewise.
7373 (i386-linux.o): Likewise.
7374 (i386-linux.c): Likewise.
7375 (amd64.o): Likewise.
7376 (amd64.c): Likewise.
7377 (amd64-linux.o): Likewise.
7378 (amd64-linux.c): Likewise.
7379
7380 * configure.srv (srv_i386_regobj): New.
7381 (srv_i386_linux_regobj): Likewise.
7382 (srv_amd64_regobj): Likewise.
7383 (srv_amd64_linux_regobj): Likewise.
7384 (srv_i386_32bit_xmlfiles): Likewise.
7385 (srv_i386_64bit_xmlfiles): Likewise.
7386 (srv_i386_xmlfiles): Likewise.
7387 (srv_amd64_xmlfiles): Likewise.
7388 (srv_i386_linux_xmlfiles): Likewise.
7389 (srv_amd64_linux_xmlfiles): Likewise.
7390 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7391 srv_xmlfiles to $srv_i386_xmlfiles.
7392 (i[34567]86-*-mingw32ce*): Likewise.
7393 (i[34567]86-*-mingw*): Likewise.
7394 (i[34567]86-*-nto*): Likewise.
7395 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7396 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7397 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7398 (x86_64-*-linux*): Likewise.
7399
7400 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7401 (init_registers_amd64_linux): New.
7402 (x86_arch_setup): Replace init_registers_x86_64_linux with
7403 init_registers_amd64_linux.
7404
7405 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7406
7407 * configure.ac: Check for libdl. If it is not available link against
7408 static libthread_db.
7409 * configure: Regenerate.
7410
7411 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7412
7413 PR9605
7414
7415 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7416 handing a read watchpoint.
7417 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7418
7419 2010-02-12 Doug Evans <dje@google.com>
7420
7421 * linux-low.c (linux_supports_tracefork_flag): Document.
7422 (linux_look_up_symbols): Add comment.
7423
7424 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7425
7426 * regcache.c (supply_register): Clear regcache if buf is NULL.
7427
7428 2010-02-02 Nicolas Roche <roche@sourceware.org>
7429 Joel Brobecker <brobecker@adacore.com>
7430
7431 * inferiors.c (find_inferior): Add function documentation.
7432 (unloaded_dll): Handle the case where the unloaded dll has not
7433 been previously registered in the dll list.
7434
7435 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7436
7437 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7438 (thumb2_breakpoint): New.
7439 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7440
7441 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7442
7443 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7444 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7445 breakpoints.
7446
7447 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7448
7449 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7450
7451 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7452
7453 * linux-s390-low.c (s390_collect_ptrace_register)
7454 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7455
7456 2010-01-21 Doug Evans <dje@google.com>
7457
7458 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7459 (PTRACE_ARG4_TYPE): New macro.
7460 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7461 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7462 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7463 (usr_store_inferior_registers): Ditto.
7464 (linux_read_memory, linux_write_memory): Ditto.
7465 (linux_test_for_tracefork): Ditto.
7466
7467 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7468 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7469
7470 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7471
7472 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7473 target.
7474
7475 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7476
7477 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7478 prototype to take a regcache. Adjust.
7479
7480 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7481
7482 * regcache.h (struct thread_info): Forward declare.
7483 (struct regcache): New.
7484 (new_register_cache): Adjust prototype.
7485 (get_thread_regcache): Declare.
7486 (free_register_cache): Adjust prototype.
7487 (registers_to_string, registers_from_string): Ditto.
7488 (supply_register, supply_register_by_name, collect_register)
7489 (collect_register_as_string, collect_register_by_name): Ditto.
7490 * regcache.c (struct inferior_regcache_data): Delete.
7491 (get_regcache): Rename to ...
7492 (get_thread_regcache): ... this. Adjust. Switch inferior before
7493 fetching registers.
7494 (regcache_invalidate_one): Adjust.
7495 (regcache_invalidate): Fix prototype.
7496 (new_register_cache): Return the new register cache.
7497 (free_register_cache): Change prototype.
7498 (realloc_register_cache): Adjust.
7499 (registers_to_string): Change prototype to take a regcache. Adjust.
7500 (registers_from_string): Ditto.
7501 (register_data): Ditto.
7502 (supply_register): Ditto.
7503 (supply_register_by_name): Ditto.
7504 (collect_register): Ditto.
7505 (collect_register_as_string): Ditto.
7506 (collect_register_by_name): Ditto.
7507 * server.c (process_serial_event): Adjust.
7508 * linux-low.h (regset_fill_func, regset_store_func): Change
7509 prototype.
7510 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7511 Change prototype.
7512 * linux-low.c (get_stop_pc): Adjust.
7513 (check_removed_breakpoint): Adjust.
7514 (linux_wait_for_event): Adjust.
7515 (linux_resume_one_lwp): Adjust.
7516 (fetch_register): Add regcache parameter. Adjust.
7517 (usr_store_inferior_registers): Ditto.
7518 (regsets_fetch_inferior_registers): Ditto.
7519 (regsets_store_inferior_registers): Ditto.
7520 (linux_fetch_registers, linux_store_registers): Ditto.
7521 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7522 regcache. Adjust.
7523 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7524 Ditto.
7525 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7526 prototype to take a regcache.
7527 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7528 * remote-utils.c (convert_ascii_to_int, outreg)
7529 (prepare_resume_reply): Change prototype to take a regcache.
7530 Adjust.
7531 * target.h (struct target_ops) <fetch_registers, store_registers>:
7532 Change prototype to take a regcache.
7533 (fetch_inferior_registers, store_inferior_registers): Change
7534 prototype to take a regcache. Adjust.
7535 * proc-service.c (ps_lgetregs): Adjust.
7536 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7537 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7538 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7539 take a regcache. Adjust.
7540 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7541 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7542 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7543 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7544 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7545 (cris_cannot_fetch_register):
7546 (cris_breakpoint_at): Change prototype to take a regcache.
7547 Adjust.
7548 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7549 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7550 to take a regcache. Adjust.
7551 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7552 Adjust.
7553 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7554 take a regcache. Adjust.
7555 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7556 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7557 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7558 * linux-mips-low.c (mips_get_pc):
7559 (mips_set_pc): Change prototype to take a regcache. Adjust.
7560 (mips_reinsert_addr): Adjust.
7561 (mips_collect_register): Change prototype to take a regcache.
7562 Adjust.
7563 (mips_supply_register):
7564 (mips_collect_register_32bit, mips_supply_register_32bit)
7565 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7566 (mips_store_fpregset): Ditto.
7567 * linux-ppc-low.c (ppc_supply_ptrace_register)
7568 (ppc_supply_ptrace_register): Ditto.
7569 (parse_spufs_run): Adjust.
7570 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7571 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7572 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7573 take a regcache. Adjust.
7574 * linux-s390-low.c (s390_collect_ptrace_register)
7575 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7576 (s390_set_pc): Change prototype to take a regcache. Adjust.
7577 (s390_arch_setup): Adjust.
7578 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7579 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7580 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7581 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7582 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7583 regcache. Adjust.
7584 (sparc_breakpoint_at): Adjust.
7585 * linux-xtensa-low.c (xtensa_fill_gregset):
7586 (xtensa_store_gregset):
7587 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7588 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7589 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7590 prototype to take a regcache. Adjust.
7591 * win32-arm-low.c (arm_fetch_inferior_register)
7592 (arm_store_inferior_register): Change prototype to take a
7593 regcache. Adjust.
7594 * win32-i386-low.c (i386_fetch_inferior_register)
7595 (i386_store_inferior_register): Change prototype to take a
7596 regcache. Adjust.
7597 * win32-low.c (child_fetch_inferior_registers)
7598 (child_store_inferior_registers): Change prototype to take a
7599 regcache. Adjust.
7600 (win32_wait): Adjust.
7601 (win32_fetch_inferior_registers): Change prototype to take a
7602 regcache. Adjust.
7603 (win32_store_inferior_registers): Adjust.
7604 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7605 store_inferior_register>: Change prototype to take a regcache.
7606
7607 2010-01-20 Doug Evans <dje@google.com>
7608
7609 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7610 #ifdef.
7611 (linux_wait_for_event1, linux_init_signals): Ditto.
7612 (W_STOPCODE): Provide definition if missing.
7613
7614 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7615
7616 * linux-low.c (linux_core_of_thread): New.
7617 (compare_ints, show_process, list_threads): New.
7618 (linux_qxfer_osdata): Report threads and cores.
7619 (linux_target_op): Register linux_core_of_thread.
7620 * remote-utils.c (prepare_resume_reply): Report the core.
7621 (buffer_xml_printf): Support %d specifier.
7622 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7623 New.
7624 (handle_query): Handle qXfer:threads. Announce availability
7625 thereof.
7626 * target.h (struct target_ops): New field core_of_thread.
7627
7628 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7629
7630 * Makefile.in (clean): Remove new generated files.
7631 (reg-s390.o, reg-s390.c): Remove rules.
7632 (reg-s390x.o, reg-s390x.c): Likewise.
7633 (s390-linux32.o, s390-linux32.c): Add rules.
7634 (s390-linux64.o, s390-linux64.c): Likewise.
7635 (s390x-linux64.o, s390x-linux64.c): Likewise.
7636 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7637 * linux-s390-low.c: Include <elf.h>.
7638 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7639 (init_registers_s390): Remove prototype.
7640 (init_registers_s390x): Likewise.
7641 (init_registers_s390_linux32): Add prototype.
7642 (init_registers_s390_linux64): Likewise.
7643 (init_registers_s390x_linux64): Likewise.
7644 (s390_num_regs_3264): New define.
7645 (s390_regmap_3264): New global variable.
7646 (s390_cannot_fetch_register): Remove obsolete check.
7647 (s390_cannot_store_register): Likewise.
7648 (s390_collect_ptrace_register): Handle upper/lower register halves.
7649 (s390_supply_ptrace_register): Likewise.
7650 (s390_fill_gregset): Update to register number changes.
7651 (s390_get_hwcap): New routine.
7652 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7653 Install appropriate regmap and register set.
7654
7655 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7656
7657 * server.c (gdbserver_version): Update copyright year to 2010.
7658 * gdbreplay.c (gdbreplay_version): Likewise.
7659
7660 2009-12-28 Doug Evans <dje@google.com>
7661
7662 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7663 elf/external.h. Include <elf.h> instead but only if necessary.
7664
7665 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7666
7667 * linux-low.c (linux_remove_process): Remove `detaching'
7668 parameter. Don't release/detach from thread_db here.
7669 (linux_kill): Release/detach from thread_db here, ...
7670 (linux_detach): ... and here, before actually detaching.
7671 (linux_wait_1): ... and here, when a process exits.
7672 * thread-db.c (any_thread_of): New.
7673 (thread_db_free): Switch the current inferior to a thread of the
7674 passed in process.
7675
7676 2009-12-21 Doug Evans <dje@google.com>
7677
7678 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7679
7680 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7681 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7682 warning ifndef __NR_tkill. Move setting of errno there too.
7683 Delete unnecessary resetting of errno after syscall.
7684 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7685
7686 * configure.ac: Check for dladdr.
7687 * config.in: Regenerate.
7688 * configure: Regenerate.
7689 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7690 (try_thread_db_load): Update.
7691
7692 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7693
7694 2009-12-18 Doug Evans <dje@google.com>
7695
7696 * event-loop.c: Include unistd.h if it exists.
7697
7698 * linux-low.c (my_waitpid): Move definition away from being in
7699 between linux_tracefork_child/linux_test_for_tracefork.
7700
7701 * gdb_proc_service.h (psaddr_t): Fix type.
7702 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7703 signature to match glibc.
7704
7705 2009-12-16 Doug Evans <dje@google.com>
7706
7707 * linux-low.c (linux_read_memory): Fix argument to read.
7708
7709 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7710
7711 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7712 events, don't leave current_inferior pointing at null.
7713
7714 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7715
7716 * win32-low.c (LOG): Delete.
7717 (OUTMSG): Output to stderr.
7718 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7719 on compile time LOG macro.
7720 (win32_wait): Fix debug output.
7721
7722 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7723
7724 * win32-low.c (win32_add_one_solib): If the dll name is
7725 "ntdll.dll", prepend the system directory to the dll path.
7726
7727 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7728
7729 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7730
7731 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7732 Vladimir Prus <vladimir@codesourcery.com>
7733
7734 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7735 * configure.ac: Check for __mcoldfire__ and set
7736 gdb_cv_m68k_is_coldfire.
7737 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7738 reg-cf.o and reg-m68k.o.
7739 * configure: Regenerated.
7740
7741 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7742
7743 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7744 Pass it to thread_db_free.
7745 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7746 proper `detaching' argument to linux_remove_process.
7747 * linux-low.h (thread_db_free): Add `detaching' parameter.
7748 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7749 to thread_db_free.
7750 (thread_db_free): Add `detaching' parameter. Only
7751 call td_ta_clear_event if detaching from process.
7752
7753 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7754
7755 * thread-db.c (thread_db_free): Fix typo.
7756
7757 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7758
7759 PR gdb/10838
7760 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7761
7762 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7763
7764 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7765 with an i686 compiler.
7766 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7767 needed.
7768 * configure: Rebuilt.
7769
7770 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7771
7772 PR gdb/10783
7773
7774 * server.c (handle_search_memory_1): Correct read_addr initialization
7775 in loop for searching subsequent chunks.
7776
7777 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7778
7779 * configure.ac: New --with-libthread-db option.
7780 * thread-db.c: Allow direct dependence on libthread_db.
7781 (thread_db_free): Adjust.
7782 * config.in: Regenerate.
7783 * configure: Likewise.
7784
7785 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7786
7787 PR gdb/10757
7788 * thread-db.c (attach_thread): New function.
7789 (maybe_attach_thread): Return success/failure.
7790 (find_new_threads_callback): Adjust.
7791 (thread_db_find_new_threads): Loop until no new threads.
7792
7793 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7794
7795 * proc-service.c (ps_lgetregs): Formatting.
7796
7797 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7798
7799 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7800 * configure.ac: Adjust.
7801 * linux-low.h (struct process_info_private): Move members to struct
7802 thread_db.
7803 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7804 * linux-low.c (linux_remove_process): Adjust.
7805 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7806 * server.c (handle_query): Move code ...
7807 (handle_monitor_command): ... here. New function.
7808 * target.h (struct target_ops): New member.
7809 * thread-db.c (struct thread_db): New.
7810 (libthread_db_search_path): New variable.
7811 (thread_db_create_event, thread_db_enable_reporting)
7812 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7813 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7814 (try_thread_db_load_1, dladdr_to_soname): New functions.
7815 (try_thread_db_load, thread_db_load_search): New functions.
7816 (thread_db_init): Search for libthread_db.
7817 (thread_db_free): New function.
7818 (thread_db_handle_monitor_command): Likewise.
7819 * config.in: Regenerate.
7820 * configure: Regenerate.
7821
7822 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7823
7824 * spu-low.c (spu_kill): Wait for inferior to terminate.
7825 Call clear_inferiors.
7826 (spu_detach): Call clear_inferiors.
7827
7828 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7829
7830 * aclocal.m4: Regenerate.
7831 * config.in: Likewise.
7832 * configure: Likewise.
7833
7834 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7835
7836 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7837 (parse_spufs_run): New function.
7838 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7839 (ppc_breakpoint_at): Handle SPU breakpoints.
7840
7841 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7842
7843 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7844 (SPUFS_MAGIC): Define.
7845 (spu_enumerate_spu_ids): New function.
7846 (linux_qxfer_spu): New function.
7847 (linux_target_ops): Install linux_qxfer_spu.
7848
7849 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7850
7851 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7852 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7853 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7854 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7855 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7856 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7857 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7858 (init_registers_powerpc_cell32l): Add prototype.
7859 (init_registers_powerpc_cell64l): Likewise.
7860 (ppc_arch_setup): Detect Cell/B.E. architecture.
7861
7862 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7863
7864 * Makefile.in (datarootdir): New variable.
7865
7866 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7867
7868 * linux-low.c (linux_write_memory): Update debugging output.
7869 * Makefile.in (clean): Add new descriptions.
7870 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7871 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7872 * configure.srv: Add new files for arm*-*-linux*.
7873 * linux-arm-low.c: Add new declarations.
7874 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7875 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7876 (HWCAP_VFPv3D16): New.
7877 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7878 instead of __IWMMXT__.
7879 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7880 (arm_arch_setup): New.
7881 (target_regsets): Remove #ifdef. Add VFP regset.
7882 (the_low_target): Use arm_arch_setup.
7883
7884 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7885
7886 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7887 the main thread again.
7888
7889 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7890
7891 Adding Neutrino gdbserver.
7892 * configure: Regenerated.
7893 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7894 * configure.srv (i[34567]86-*-nto*): New target.
7895 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7896 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7897 (nto_comctrl) [__QNX__]: New function.
7898 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7899
7900 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7901
7902 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7903 srv_tgtobj.
7904
7905 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7906 Pedro Alves <pedro@codesourcery.com>
7907
7908 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7909 don't support CONTEXT_EXTENDED_REGISTERS.
7910 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7911 (the_low_target): Install them.
7912 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7913 failing with ERROR_PIPE_NOT_CONNECTED.
7914
7915 2009-06-30 Doug Evans <dje@google.com>
7916 Pierre Muller <muller@ics.u-strasbg.fr>
7917
7918 Add h/w watchpoint support to x86-linux, win32-i386.
7919 * Makefile.in (SFILES): Add i386-low.c
7920 (i386_low_h): Define.
7921 (i386-low.o): Add dependencies.
7922 (linux-x86-low.o): Add i386-low.h dependency.
7923 (win32-i386-low.o): Ditto.
7924 * i386-low.c: New file.
7925 * i386-low.h: New file.
7926 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7927 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7928 * linux-low.c (linux_add_process): Initialize arch_private.
7929 (linux_remove_process): Free arch_private.
7930 (add_lwp): Initialize arch_private.
7931 (delete_lwp): Free arch_private.
7932 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7933 provided.
7934 * linux-low.h (process_info_private): New member arch_private.
7935 (lwp_info): New member arch_private.
7936 (linux_target_ops): New members new_process, new_thread,
7937 prepare_to_resume.
7938 (ptid_of): New macro.
7939 * linux-x86-low.c: Include stddef.h, i386-low.h.
7940 (arch_process_info): New struct.
7941 (arch_lwp_info): New struct.
7942 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7943 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7944 (i386_dr_low_get_status): New function.
7945 (x86_insert_point, x86_remove_point): New functions.
7946 (x86_stopped_by_watchpoint): New function.
7947 (x86_stopped_data_address): New function.
7948 (x86_linux_new_process, x86_linux_new_thread): New functions.
7949 (x86_linux_prepare_to_resume): New function.
7950 (the_low_target): Add entries for insert_point, remove_point,
7951 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7952 prepare_to_resume.
7953 * server.c (debug_hw_points): New global.
7954 (monitor_show_help): Document set debug-hw-points.
7955 (handle_query): Process "set debug-hw-points".
7956 * server.h (debug_hw_points): Declare.
7957 (paddress): Declare.
7958 * utils.c (NUMCELLS, CELLSIZE): New macros.
7959 (get_sell, xsnprintf, paddress): New functions.
7960 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7961 remove_point, stopped_by_watchpoint, stopped_data_address.
7962 * win32-i386-low.c: Include i386-low.h.
7963 (debug_reg_state): Replaces dr.
7964 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7965 (i386_dr_low_get_status): New function.
7966 (i386_insert_point, i386_remove_point): New functions.
7967 (i386_stopped_by_watchpoint): New function.
7968 (i386_stopped_data_address): New function.
7969 (i386_initial_stuff): Update.
7970 (get_thread_context,set_thread_context,i386_thread_added): Update.
7971 (the_low_target): Add entries for insert_point,
7972 remove_point, stopped_by_watchpoint, stopped_data_address.
7973 * win32-low.c (win32_insert_watchpoint): New function.
7974 (win32_remove_watchpoint): New function.
7975 (win32_stopped_by_watchpoint): New function.
7976 (win32_stopped_data_address): New function.
7977 (win32_target_ops): Add entries for insert_watchpoint,
7978 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7979 * win32-low.h (win32_target_ops): New members insert_point,
7980 remove_point, stopped_by_watchpoint, stopped_data_address.
7981
7982 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7983
7984 * server.c (process_serial_event): Re-return unsupported, not
7985 error, if the type isn't recognized. Re-allow supporting only
7986 insert or remove packets. Also call require_running for
7987 breakpoints. Add missing break statement to default case. Tidy.
7988 * target.h (struct target_ops): Rename insert_watchpoint to
7989 insert_point, and remove_watchpoint to remove_point.
7990
7991 * linux-low.h (struct linux_target_ops): Likewise.
7992 * linux-low.c (linux_insert_watchpoint): Rename to ...
7993 (linux_insert_point): ... this. Adjust.
7994 (linux_remove_watchpoint): Rename to ...
7995 (linux_remove_point): ... this. Adjust.
7996 (linux_target_ops): Adjust.
7997 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7998 (cris_insert_point): ... this.
7999 (cris_remove_watchpoint): Rename to ...
8000 (cris_remove_point): ... this.
8001 (the_low_target): Adjust.
8002
8003 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8004
8005 * server.c (handle_v_kill): Pass signal_pid to
8006 kill_inferior if multi_process is zero.
8007
8008 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8009
8010 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8011 * target.h (target_ops): Comment for *_watchpoint to make it clear
8012 the functions can get types '0' and '1'.
8013
8014 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8015
8016 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8017 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8018 * regcache.c (get_regcache): Likewise.
8019 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8020 * win32-low.c (child_fetch_inferior_registers): Remove check for
8021 regno 0.
8022
8023 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8024 Pedro Alves <pedro@codesourcery.com>
8025
8026 * target.h (struct target_ops) <supports_multi_process>: New
8027 callback.
8028 (target_supports_multi_process): New.
8029 * server.c (handle_query): Even if GDB reports support, only
8030 enable multi-process if the target also supports it. Report
8031 multi-process support only if the target backend supports it.
8032 * linux-low.c (linux_supports_multi_process): New function.
8033 (linux_target_ops): Install it as target_supports_multi_process
8034 callback.
8035
8036 2009-05-24 Doug Evans <dje@google.com>
8037
8038 Global renaming of find_thread_pid to find_thread_ptid.
8039 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8040 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8041 All callers updated.
8042
8043 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8044 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8045 directly.
8046
8047 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8048 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8049 (linux_resume_one_lwp): Ditto.
8050
8051 2009-05-23 Doug Evans <dje@google.com>
8052
8053 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8054 from struct inferior_list_entry * to struct lwp_info *.
8055 All callers updated.
8056
8057 2009-05-13 Doug Evans <dje@google.com>
8058
8059 * linux-x86-low.c: Don't include assert.h.
8060 (x86_siginfo_fixup): Use fatal, not assert.
8061 (x86_arch_setup): Fix comment.
8062
8063 2009-05-12 Doug Evans <dje@google.com>
8064
8065 Biarch support for i386/amd64 gdbserver.
8066 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8067 Add linux-x86-low.c.
8068 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8069 (linux-x86-low.o): Add.
8070 * linux-x86-64-low.c: Delete.
8071 * linux-i386-low.c: Delete.
8072 * linux-x86-low.c: New file.
8073 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8074 linux-x86-low.o.
8075 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8076 linux-x86-low.o.
8077 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8078 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8079 (linux_child_pid_to_exec_file): New function.
8080 (elf_64_header_p, elf_64_file_p): New functions.
8081 (siginfo_fixup): New function.
8082 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8083 give target a chance to convert layout.
8084 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8085 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8086
8087 2009-05-07 Doug Evans <dje@google.com>
8088
8089 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8090 (regsets_store_inferior_registers): Ditto.
8091
8092 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8093
8094 PR server/10048
8095
8096 * linux-low.c (must_set_ptrace_flags): Delete.
8097 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8098 of the global.
8099 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8100 `lwp->must_set_ptrace_flags' instead.
8101 (linux_wait_for_event_1): Set ptrace options here.
8102 (linux_wait_1): ... not here.
8103
8104 2009-04-30 Doug Evans <dje@google.com>
8105
8106 * inferiors.c (started_inferior_callback): New function.
8107 (attached_inferior_callback): New function.
8108 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8109 * server.c (print_started_pid, print_attached_pid): New functions.
8110 (detach_or_kill_for_exit): New function.
8111 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8112 * server.h (have_started_inferiors_p): Declare.
8113 (have_attached_inferiors_p): Declare.
8114
8115 * inferiors.c (remove_process): Fix memory leak, free process.
8116 * linux-low.c (linux_remove_process): New function.
8117 (linux_kill): Call it instead of remove_process.
8118 (linux_detach, linux_wait_1): Ditto.
8119
8120 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8121
8122 * configure.srv: Add x86 Windows CE target.
8123
8124 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8125
8126 * inferiors.c (get_thread_process): Make global.
8127 * server.h (get_thread_process): Add prototype.
8128 * thread-db.c (find_one_thread): Use get_thread_process
8129 instead of current_process.
8130 (thread_db_get_tls_address): Do not crash if called when
8131 thread layer is not yet initialized.
8132
8133 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8134
8135 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8136 * spu-low.c (current_tid): Rename to ...
8137 (current_ptid): ... this.
8138 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8139 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8140 ptid_get_lwp (current_ptid) instead of current_tid.
8141 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8142 instead of current_tid. Use find_process_pid to verify pid
8143 argument is valid. Pass proper argument to remove_process.
8144 (spu_thread_alive): Compare current_ptid instead of current_tid.
8145 (spu_resume): Likewise.
8146
8147 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8148
8149 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8150 variable.
8151
8152 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8153
8154 Implement the multiprocess extensions, and add linux multiprocess
8155 support.
8156
8157 * server.h (ULONGEST): Declare.
8158 (struct ptid, ptid_t): New.
8159 (minus_one_ptid, null_ptid): Declare.
8160 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8161 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8162 (struct inferior_list_entry): Change `id' type from unsigned from
8163 to ptid_t.
8164 (struct sym_cache, struct breakpoint, struct
8165 process_info_private): Forward declare.
8166 (struct process_info): Declare.
8167 (current_process): Declare.
8168 (all_processes): Declare.
8169 (initialize_inferiors): Declare.
8170 (add_thread): Adjust to use ptid_t.
8171 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8172 (add_process, remove_process, find_thread_pid): Declare.
8173 (find_inferior_id): Adjust to use ptid_t.
8174 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8175 (multi_process): Declare.
8176 (push_event): Adjust to use ptid_t.
8177 (read_ptid, write_ptid): Declare.
8178 (prepare_resume_reply): Adjust to use ptid_t.
8179 (clear_symbol_cache): Declare.
8180 * inferiors.c (all_processes): New.
8181 (null_ptid, minus_one_ptid): New.
8182 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8183 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8184 (add_thread): Change unsigned long to ptid. Remove gdb_id
8185 parameter. Adjust.
8186 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8187 (gdb_id_to_thread): Rename to ...
8188 (find_thread_pid): ... this. Change unsigned long to ptid.
8189 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8190 (loaded_dll, pull_pid_from_list): Adjust.
8191 (add_process, remove_process, find_process_pid)
8192 (get_thread_process, current_process, initialize_inferiors): New.
8193 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8194 (struct target_waitstatus) <related_pid>: Ditto.
8195 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8196 return type to int.
8197 (struct target_ops) <join>: Add `pid' argument.
8198 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8199 (struct target_ops) <wait>: Add `ptid' field. Change return type
8200 to ptid.
8201 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8202 (mywait): Add `ptid' argument. Change return type to ptid_t.
8203 (target_pid_to_str): Declare.
8204 * target.c (set_desired_inferior): Adjust to use ptids.
8205 (mywait): Add new `ptid' argument. Adjust.
8206 (target_pid_to_str): New.
8207 * mem-break.h (free_all_breakpoints): Declare.
8208 * mem-break.c (breakpoints): Delelete.
8209 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8210 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8211 to use per-process breakpoint list.
8212 (free_all_breakpoints): New.
8213 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8214 (symbol_cache, all_symbols_looked_up): Delete.
8215 (hexchars): New.
8216 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8217 read_ptid): New.
8218 (prepare_resume_reply): Change ptid argument's type from unsigned
8219 long to ptid_t. Adjust. Implement W;process and X;process.
8220 (free_sym_cache, clear_symbol_cache): New.
8221 (look_up_one_symbol): Adjust to per-process symbol cache. *
8222 * server.c (cont_thread, general_thread, step_thread): Change type
8223 to ptid_t.
8224 (attached): Delete.
8225 (multi_process): New.
8226 (last_ptid): Change type to ptid_t.
8227 (struct vstop_notif) <ptid>: Change type to ptid_t.
8228 (queue_stop_reply, push_event): Change `ptid' argument's type to
8229 ptid_t.
8230 (discard_queued_stop_replies): Add `pid' argument.
8231 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8232 changes. Don't reference the `attached' global.
8233 (attach_inferior): Adjust to mywait interface changes.
8234 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8235 features. Handle and report "multiprocess+". Handle
8236 "qAttached:PID".
8237 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8238 changes.
8239 (handle_v_kill): New.
8240 (handle_v_stopped): Adjust to use target_pid_to_str.
8241 (handle_v_requests): Allow multiple attaches and runs when
8242 multiprocess extensions are in effect. Handle "vKill".
8243 (myresume): Adjust to use ptids.
8244 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8245 (handle_status): Adjust to discard_queued_stop_replies interface
8246 change.
8247 (first_thread_of, kill_inferior_callback)
8248 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8249 (main): Call initialize_inferiors. Adjust to use ptids, killing
8250 and detaching from all inferiors. Handle multiprocess packet
8251 variants.
8252 * linux-low.h: Include gdb_proc_service.h.
8253 (struct process_info_private): New.
8254 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8255 <lwpid_of>: Use ptid_get_lwp.
8256 (get_lwp_thread): Adjust.
8257 (struct lwp_info): Add `dead' member.
8258 (find_lwp_pid): Declare.
8259 * linux-low.c (thread_db_active): Delete.
8260 (new_inferior): Adjust comment.
8261 (inferior_pid): Delete.
8262 (linux_add_process): New.
8263 (handle_extended_wait): Adjust.
8264 (add_lwp): Change unsigned long to ptid.
8265 (linux_create_inferior): Add process to processes table. Adjust
8266 to use ptids. Don't set new_inferior here.
8267 (linux_attach_lwp): Rename to ...
8268 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8269 it. Adjust to use ptids.
8270 (linux_attach_lwp): New.
8271 (linux_attach): Add process to processes table. Don't set
8272 new_inferior here.
8273 (struct counter): New.
8274 (second_thread_of_pid_p, last_thread_of_process_p): New.
8275 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8276 multiple processes.
8277 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8278 processes. Remove process from process table.
8279 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8280 to multiple processes.
8281 (any_thread_of): New.
8282 (linux_detach): Add `pid' argument, and handle it. Remove process
8283 from processes table.
8284 (linux_join): Add `pid' argument. Handle it.
8285 (linux_thread_alive): Change unsighed long argument to ptid_t.
8286 Consider dead lwps as not being alive.
8287 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8288 threads we're not interested in.
8289 (same_lwp, find_lwp_pid): New.
8290 (linux_wait_for_lwp): Change `pid' argument's type from int to
8291 ptid_t. Adjust.
8292 (linux_wait_for_event): Rename to ...
8293 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8294 from int to ptid_t. Adjust.
8295 (linux_wait_for_event): New.
8296 (linux_wait_1): Add `ptid' argument. Change return type to
8297 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8298 that exit from the process table.
8299 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8300 Adjust.
8301 (mark_lwp_dead): New.
8302 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8303 stopping all threads, mark its main lwp as dead.
8304 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8305 ptids.
8306 (fetch_register, usr_store_inferior_registers)
8307 (regsets_fetch_inferior_registers)
8308 (regsets_store_inferior_registers, linux_read_memory)
8309 (linux_write_memory): Inline `inferior_pid'.
8310 (linux_look_up_symbols): Adjust to use per-process
8311 `thread_db_active'.
8312 (linux_request_interrupt): Adjust to use ptids.
8313 (linux_read_auxv): Inline `inferior_pid'.
8314 (initialize_low): Don't reference thread_db_active.
8315 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8316 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8317 (ps_getpid): Return the pid of the current inferior.
8318 * thread-db.c (proc_handle, thread_agent): Delete.
8319 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8320 per-process data.
8321 (find_one_thread): Change argument type to ptid_t. Adjust to
8322 per-process data.
8323 (maybe_attach_thread): Adjust to per-process data and ptids.
8324 (thread_db_find_new_threads): Ditto.
8325 (thread_db_init): Ditto.
8326 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8327 processes table. Adjust to use ptids.
8328 (spu_kill, spu_detach): Adjust interface. Remove process from
8329 processes table.
8330 (spu_join, spu_thread_alive): Adjust interface.
8331 (spu_wait): Adjust interface. Remove process from processes
8332 table. Adjust to use ptids.
8333 * win32-low.c (current_inferior_tid): Delete.
8334 (current_inferior_ptid): New.
8335 (debug_event_ptid): New.
8336 (thread_rec): Take a ptid. Adjust.
8337 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8338 (child_delete_thread): Ditto.
8339 (do_initial_child_stuff): Add `attached' argument. Add process to
8340 processes table.
8341 (child_fetch_inferior_registers, child_store_inferior_registers):
8342 Adjust.
8343 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8344 (win32_attach): Pass 1 to do_initial_child_stuff.
8345 (win32_kill): Adjust interface. Remove process from processes
8346 table.
8347 (win32_detach): Ditto.
8348 (win32_join): Adjust interface.
8349 (win32_thread_alive): Take a ptid.
8350 (win32_resume): Adjust to use ptids.
8351 (get_child_debug_event): Ditto.
8352 (win32_wait): Adjust interface. Remove exiting process from
8353 processes table.
8354
8355 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8356
8357 Non-stop mode support.
8358
8359 * server.h (non_stop): Declare.
8360 (gdb_client_data, handler_func): Declare.
8361 (delete_file_handler, add_file_handler, start_event_loop):
8362 Declare.
8363 (handle_serial_event, handle_target_event, push_event)
8364 (putpkt_notif): Declare.
8365 * target.h (enum resume_kind): New.
8366 (struct thread_resume): Replace `step' field by `kind' field.
8367 (TARGET_WNOHANG): Define.
8368 (struct target_ops) <wait>: Add `options' argument.
8369 <supports_non_stop, async, start_non_stop>: New fields.
8370 (target_supports_non_stop, target_async): New.
8371 (start_non_stop): Declare.
8372 (mywait): Add `options' argument.
8373 * target.c (mywait): Add `options' argument. Print child exit
8374 notifications here.
8375 (start_non_stop): New.
8376 * server.c (non_stop, own_buf, mem_buf): New globals.
8377 (struct vstop_notif): New.
8378 (notif_queue): New global.
8379 (queue_stop_reply, push_event, discard_queued_stop_replies)
8380 (send_next_stop_reply): New.
8381 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8382 interface changes.
8383 (attach_inferior): In non-stop mode, don't wait for the target
8384 here.
8385 (handle_general_set): Handle QNonStop.
8386 (handle_query): When handling qC, return the current general
8387 thread, instead of the first thread of the list.
8388 (handle_query): If the backend supports non-stop mode, include
8389 QNonStop+ in the qSupported query response.
8390 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8391 and non-stop mode.
8392 (handle_v_attach, handle_v_run): Handle non-stop mode.
8393 (handle_v_stopped): New.
8394 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8395 (myresume): Adjust to use resume_kind. Handle non-stop.
8396 (queue_stop_reply_callback): New.
8397 (handle_status): Handle non-stop mode.
8398 (main): Clear non_stop flag on reconnection. Use the event-loop.
8399 Refactor serial protocol handling from here ...
8400 (process_serial_event): ... to this new function. When GDB
8401 selects any thread, select one here. In non-stop mode, wait until
8402 GDB acks all pending events before exiting.
8403 (handle_serial_event, handle_target_event): New.
8404 * remote-utils.c (remote_open): Install remote_desc in the event
8405 loop.
8406 (remote_close): Remove remote_desc from the event loop.
8407 (putpkt_binary): Rename to...
8408 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8409 (putpkt_binary): New as wrapper around putpkt_binary_1.
8410 (putpkt_notif): New.
8411 (prepare_resume_reply): In non-stop mode, don't change the
8412 general_thread.
8413 * event-loop.c: New.
8414 * Makefile.in (OBJ): Add event-loop.o.
8415 (event-loop.o): New rule.
8416
8417 * linux-low.h (pid_of): Moved here.
8418 (lwpid_of): New.
8419 (get_lwp_thread): Use lwpid_of.
8420 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8421 * linux-low.c (pid_of): Delete.
8422 (inferior_pid): Use lwpid_of.
8423 (linux_event_pipe): New.
8424 (target_is_async_p): New.
8425 (delete_lwp): New.
8426 (handle_extended_wait): Use lwpid_of.
8427 (add_lwp): Don't set lwpid field.
8428 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8429 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8430 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8431 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8432 first. Adjust to linux_wait_for_event interface changes. Use
8433 lwpid_of.
8434 (linux_detach): Don't delete the main lwp here.
8435 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8436 (status_pending_p): Don't consider explicitly suspended lwps.
8437 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8438 pointer. Add OPTIONS argument. Change return type to int. Use
8439 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8440 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8441 pointer. Add status pointer argument. Return a pid instead of a
8442 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8443 changes. In non-stop mode, don't switch to a random thread.
8444 (linux_wait): Rename to...
8445 (linux_wait_1): ... this. Add target_options argument, and handle
8446 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8447 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8448 clean exit and signal exit code. Don't stop all threads in
8449 non-stop mode. In all-stop mode, only stop all threads when
8450 reporting a stop to GDB. Handle explicit thread stop requests.
8451 (async_file_flush, async_file_mark): New.
8452 (linux_wait): New.
8453 (send_sigstop): Use lwpid_of.
8454 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8455 interface changes. In non-stop mode, don't switch to a random
8456 thread.
8457 (linux_resume_one_lwp): Use lwpid_of.
8458 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8459 (linux_resume_one_thread): ... this. Handle resume_stop. In
8460 non-stop mode, don't look for pending flag in all threads.
8461 (resume_status_pending_p): Don't consider explicitly suspended
8462 threads.
8463 (my_waitpid): Reimplement. Emulate __WALL.
8464 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8465 Use lwpid_of.
8466 (sigchld_handler, linux_supports_non_stop, linux_async)
8467 (linux_start_non_stop): New.
8468 (linux_target_ops): Register linux_supports_non_stop, linux_async
8469 and linux_start_non_stop.
8470 (initialize_low): Install SIGCHLD handler.
8471 * thread-db.c (thread_db_create_event, find_one_thread)
8472 (thread_db_get_tls_address): Use lwpid_of.
8473 * win32-low.c (win32_detach): Adjust to use resume_kind.
8474 (win32_wait): Add `options' argument.
8475 * spu-low.c (spu_resume): Adjust to use resume_kind.
8476 (spu_wait): Add `options' argument.
8477
8478 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8479
8480 Decouple target code from remote protocol.
8481
8482 * target.h (enum target_waitkind): New.
8483 (struct target_waitstatus): New.
8484 (struct target_ops) <wait>: Return an unsigned long. Take a
8485 target_waitstatus pointer instead of a char pointer.
8486 (mywait): Likewise.
8487 * target.c (mywait): Change prototype to return an unsigned long.
8488 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8489 * server.h (thread_from_wait, old_thread_from_wait): Delete
8490 declarations.
8491 (prepare_resume_reply): Change prototype to take a
8492 target_waitstatus.
8493 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8494 (last_status, last_ptid): New.
8495 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8496 pid instead of a signal.
8497 (attach_inferior): Remove "status" and "signal" parameters.
8498 Adjust.
8499 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8500 not as an address.
8501 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8502 (handle_v_requests, myresume): Remove "status" and "signal"
8503 parameters. Adjust.
8504 (handle_status): New.
8505 (main): Delete local `status'. Adjust.
8506 * remote-utils.c: Include target.h.
8507 (prepare_resume_reply): Change prototype to take a
8508 target_waitstatus. Adjust.
8509
8510 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8511 interface.
8512 * spu-low.c (spu_wait): Adjust.
8513 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8514 Delete.
8515 (win32_wait): Adjust.
8516
8517 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8518
8519 * target.h (struct thread_resume): Delete leave_stopped member.
8520 (struct target_ops): Add a `n' argument to the `resume' callback.
8521 * server.c (start_inferior): Adjust.
8522 (handle_v_cont, myresume): Adjust.
8523 * linux-low.c (check_removed_breakpoint): Adjust to resume
8524 interface change, and to removed leave_stopped field.
8525 (resume_ptr): Delete.
8526 (struct thread_resume_array): New.
8527 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8528 resume interface change.
8529 (linux_continue_one_thread, linux_queue_one_thread)
8530 (resume_status_pending_p): Check if the resume field is NULL
8531 instead of checking the leave_stopped member.
8532 (linux_resume): Adjust to the target resume interface change.
8533 * spu-low.c (spu_resume): Adjust to the target resume interface
8534 change.
8535 * win32-low.c (win32_detach, win32_resume): Ditto.
8536
8537 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8538
8539 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8540 flag.
8541 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8542 pending.
8543 (linux_continue_one_thread): Only preserve the stepping flag if
8544 there's a pending breakpoint.
8545
8546 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8547
8548 * server.c (main): After the inferior having exited, call
8549 remote_close before exiting gdbserver.
8550
8551 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8552
8553 Fix size of FPSCR in Power 7 processors.
8554 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8555 (PPC_FEATURE_HAS_DFP): New #define.
8556 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8557 size of the FPSCR.
8558
8559 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8560
8561 * server.c (handle_query) Whitespace and formatting.
8562
8563 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8564
8565 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8566 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8567 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8568 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8569 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8570 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8571 Makefile.in, configure.ac: Fix whitespace throughout.
8572 * configure: Regenerate.
8573
8574 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8575
8576 * inferiors.c (find_inferior): Make it safe for the callback
8577 function to delete the currently iterated inferior.
8578
8579 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8580
8581 * Makefile.in (linuw_low_h): Move higher.
8582 (thread-db.o): Depend on $(linux_low_h).
8583
8584 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8585
8586 Rename "process" to "lwp" throughout.
8587
8588 * linux-low.c (all_processes): Rename to...
8589 (all_lwps): ... this.
8590 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8591 (add_process): Rename to ...
8592 (add_lwp): ... this. Adjust.
8593 (linux_create_inferior): Adjust.
8594 (linux_attach_lwp): Adjust.
8595 (linux_attach): Adjust.
8596 (linux_kill_one_process): Rename to ...
8597 (linux_kill_one_lwp): ... this. Adjust.
8598 (linux_kill): Adjust.
8599 (linux_detach_one_process): Rename to ...
8600 (linux_detach_one_lwp): ... this. Adjust.
8601 (linux_detach): Adjust.
8602 (check_removed_breakpoint): Adjust.
8603 (status_pending_p): Adjust.
8604 (linux_wait_for_process): Rename to ...
8605 (linux_wait_for_lwp): ... this. Adjust.
8606 (linux_wait_for_event): Adjust.
8607 (send_sigstop): Adjust.
8608 (wait_for_sigstop): Adjust.
8609 (stop_all_processes): Rename to ...
8610 (stop_all_lwps): ... this.
8611 (linux_resume_one_process): Rename to ...
8612 (linux_resume_one_lwp): ... this. Adjust.
8613 (linux_set_resume_request, linux_continue_one_thread)
8614 (linux_queue_one_thread, resume_status_pending_p)
8615 (usr_store_inferior_registers, regsets_store_inferior_registers)
8616 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8617 Adjust.
8618 * linux-low.h (get_process): Rename to ...
8619 (get_lwp): ... this. Adjust.
8620 (get_thread_process): Rename to ...
8621 (get_thread_lwp): ... this. Adjust.
8622 (get_process_thread): Rename to ...
8623 (get_lwp_thread): ... this. Adjust.
8624 (struct process_info): Rename to ...
8625 (struct lwp_info): ... this.
8626 (all_processes): Rename to ...
8627 (all_lwps): ... this.
8628 * proc-service.c (ps_lgetregs): Adjust.
8629 * thread-db.c (thread_db_create_event, find_one_thread)
8630 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8631
8632 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8633
8634 * server.c (handle_query): Handle "qAttached".
8635
8636 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8637
8638 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8639 GPLv3, update license URL.
8640
8641 2009-03-01 Doug Evans <dje@google.com>
8642
8643 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8644 (server_h): Add gdb_signals.h.
8645 (signals.o): Update.
8646 * server.h (target_signal_from_host,target_signal_to_host_p)
8647 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8648
8649 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8650
8651 * remote-utils.c (getpkt): Also generate remote-debug
8652 information if noack_mode is set.
8653
8654 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8655
8656 * server.c (handle_query): Report qXfer:siginfo:read and
8657 qXfer:siginfo:write as supported and handle them.
8658 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8659 * linux-low.c (linux_xfer_siginfo): New.
8660 (linux_target_ops): Set it.
8661
8662 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8663
8664 * server.c (gdbserver_usage): Mention --remote-debug.
8665 (main): Accept '--remote-debug' switch.
8666
8667 2009-01-18 Doug Evans <dje@google.com>
8668
8669 * regcache.c (new_register_cache): No need to check result of xcalloc.
8670 * server.c (handle_search_memory): Back out calls to xmalloc,
8671 result is checked and error is returned to user upon failure.
8672 (handle_query): Ditto. Add more checks for result of malloc.
8673 (handle_v_cont): Check result of malloc, report error back to
8674 user upon failure.
8675 (handle_v_run): Ditto. Call freeargv.
8676 * server.h (freeargv): Declare.
8677 * utils.c (freeargv): New fn.
8678
8679 2009-01-15 Doug Evans <dje@google.com>
8680
8681 * gdbreplay.c (perror_with_name): Make arg const char *.
8682 * server.h (target_signal_to_name): Make return type const char *.
8683 * thread-db.c (thread_db_err_str): Make return type const char *.
8684 * utils.c (perror_with_name): Make arg const char *.
8685
8686 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8687
8688 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8689 when handling a EXIT_PROCESS_DEBUG_EVENT.
8690
8691 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8692
8693 * gdbreplay.c (gdbreplay_version): Update copyright year.
8694 * server.c (gdbserver_version): Likewise.
8695
8696 2009-01-05 Doug Evans <dje@google.com>
8697
8698 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8699 (handle_extended_wait): Improve comment.
8700
8701 2008-12-13 Doug Evans <dje@google.com>
8702
8703 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8704 * server.h (ATTR_MALLOC): New macro.
8705 (xmalloc,xcalloc,xstrdup): Declare.
8706 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8707 * inferiors.c: Ditto.
8708 * linux-low.c: Ditto.
8709 * mem-break.c: Ditto.
8710 * regcache.c: Ditto.
8711 * remote-utils.c: Ditto.
8712 * server.c: Ditto.
8713 * target.c: Ditto.
8714 * win32-low.c: Ditto.
8715
8716 2008-12-12 Doug Evans <dje@google.com>
8717
8718 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8719 in debugging printf.
8720
8721 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8722
8723 2008-12-09 Doug Evans <dje@google.com>
8724
8725 * linux-low.h (struct process_info): Delete member tid, unused.
8726 * thread-db.c (find_one_thread): Update.
8727 (maybe_attach_thread): Update.
8728
8729 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8730
8731 * target.h (struct target_ops): Add qxfer_osdata member.
8732 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8733 and dirent.h.
8734 (linux_qxfer_osdata): New functions.
8735 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8736 callback.
8737 * server.c (handle_query): Handle "qXfer:osdata:read:".
8738 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8739 (buffer_xml_printf): New functions.
8740 * server.h (struct buffer): New.
8741 (buffer_grow_str, buffer_grow_str0): New macros.
8742 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8743 (buffer_xml_printf): Declare.
8744
8745 2008-11-24 Doug Evans <dje@google.com>
8746
8747 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8748
8749 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8750
8751 * server.c (handle_v_run): Always use the supplied argument list.
8752
8753 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8754
8755 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8756 (xtensa_regmap_table): Add entry for scompare1.
8757
8758 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8759
8760 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8761 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8762 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8763 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8764 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8765 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8766 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8767 XML target descriptions.
8768 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8769 when inferior is running on an ISA 2.05 or later processor. Add
8770 special case to return offset for full 64-bit slot of FPSCR when
8771 in 32-bits.
8772
8773 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8774
8775 * Makefile.in (SFILES, clean): Added sparc64 files.
8776 (reg-sparc64.o, reg-sparc64.c): New.
8777 * configure.srv (sparc*-*-linux*): New configuration.
8778 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8779 syscall arguments for SPARC.
8780 (regsets_store_inferior_registers): Likewise.
8781 * linux-sparc-low.c: New file.
8782
8783 2008-10-21 Doug Evans <dje@google.com>
8784
8785 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8786 (READLINE_DIR,READLINE_DEP): Delete.
8787 (INTERNAL_CFLAGS): Update.
8788 (LINTFLAGS): Update.
8789
8790 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8791
8792 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8793 whole argv from the last run, not just argv[0].
8794
8795 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8796
8797 * regcache.c (new_register_cache): Return NULL if the register
8798 cache size isn't known yet.
8799 (free_register_cache): Avoid dereferencing a NULL regcache.
8800
8801 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8802
8803 * configure.srv: Merge MIPS and MIPS64.
8804
8805 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8806
8807 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8808
8809 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8810
8811 * Makefile.in: Add required vsx dependencies.
8812
8813 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8814 Declare init_registers_powerpc_vsx32l.
8815 Declare init_registers_powerpc_vsx64l.
8816 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8817 (ppc_arch_setup): Check for VSX in hwcap.
8818 (ppc_fill_vsxregset): New function.
8819 (ppc_store_vsxregset): New function.
8820 Add new VSX entry in regset_info target_regsets.
8821
8822 * configure.srv: Add new VSX dependencies.
8823
8824 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8825
8826 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8827 (remote_open): Set or clear transport_is_reliable.
8828 (putpkt_binary): Don't expect acks in noack mode.
8829 (getpkt): Don't send ack/nac in noack mode.
8830 * server.c (handle_general_set): Handle QStartNoAckMode.
8831 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8832 qSupported.
8833 (main): Reset noack_mode on every connection.
8834 * server.h (noack_mode): Declare.
8835
8836 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8837
8838 * Makefile.in (GDBREPLAY_OBS): New variable.
8839 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8840
8841 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8842 Daniel Jacobowitz <dan@codesourcery.com>
8843
8844 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8845 (usr_store_inferior_registers): Likewise.
8846 (regsets_store_inferior_registers): Likewise.
8847
8848 2008-07-31 Rolf Jansen <rj@surtec.com>
8849 Pedro Alves <pedro@codesourcery.com>
8850
8851 * configure.ac: Check for memmem declaration.
8852 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8853 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8854 (disable_packet_qfThreadInfo): Unconditionally compile.
8855 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8856 * configure, config.in: Regenerate.
8857
8858 2008-07-28 Doug Kwan <dougkwan@google.com>
8859
8860 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8861 (linux_write_memory): Remove declaration of errno.
8862
8863 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8864
8865 * linux-low.c (handle_extended_wait): Do not use "status"
8866 variable uninitialized.
8867
8868 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8869
8870 * server.c (handle_v_attach): Inhibit reporting dll changes.
8871
8872 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8873
8874 * remote-utils.c (prepare_resume_reply): If requested, don't
8875 output "thread:TID" in the T stop reply.
8876
8877 * server.c (disable_packet_vCont, disable_packet_Tthread)
8878 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8879 (handle_query): If requested, disable support for qC, qfThreadInfo
8880 and qsThreadInfo.
8881 (handle_v_requests): If requested, disable support for vCont.
8882 (gdbserver_show_disableable): New.
8883 (main): Handle --disable-packet and --disable-packet=LIST.
8884
8885 * server.h (disable_packet_vCont, disable_packet_Tthread)
8886 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8887
8888 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8889
8890 * server.c (gdbserver_usage): Mention --version.
8891
8892 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8893
8894 * Makefile.in (gdbreplay.o): New rule.
8895
8896 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8897
8898 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8899 message, not gdbserver.
8900
8901 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8902 Nathan Sidwell <nathan@codesourcery.com>
8903 Joseph Myers <joseph@codesourcery.com>
8904
8905 * acinclude.m4: Include ../../config/acx.m4.
8906 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8907 * configure, config.in: Regenerate.
8908 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8909 * server.c (gdbserver_version): Print PKGVERSION.
8910 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8911 (main): Adjust gdbserver_usage calls.
8912 * gdbreplay.c (version, host_name): Add declarations.
8913 (gdbreplay_version, gdbreplay_usage): New.
8914 (main): Accept --version and --help options.
8915
8916 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8917
8918 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8919 (arm_breakpoint_at): Handle Thumb.
8920 (the_low_target): Add comment.
8921
8922 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8923
8924 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8925
8926 2008-05-09 Doug Evans <dje@google.com>
8927
8928 * server.h (decode_search_memory_packet): Declare.
8929 * remote-utils.c (decode_search_memory_packet): New fn.
8930 * server.c (handle_search_memory_1): New fn.
8931 (handle_search_memory): New fn.
8932 (handle_query): Process qSearch:memory packets.
8933
8934 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8935
8936 * regcache.c (registers_length): Remove.
8937 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8938 full register packet.
8939 * regcache.h (registers_length): Remove prototype.
8940 * server.h (PBUFSIZ): Define to 16384.
8941
8942 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8943
8944 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8945 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8946 powerpc-64l.o, and powerpc-altivec64l.o.
8947 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8948 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8949 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8950 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8951 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8952 to srv_xmlfiles.
8953
8954 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8955 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8956 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8957 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8958 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8959 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8960 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8961 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8962 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8963 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8964 (clean): Update.
8965
8966 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8967 (init_registers_powerpc_32l): ... this new prototype.
8968 (init_registers_powerpc_32): Remove, replace by ...
8969 (init_registers_powerpc_altivec32l): ... this new prototype.
8970 (init_registers_powerpc_e500): Remove, replace by ...
8971 (init_registers_powerpc_e500l): ... this new prototype.
8972 (init_registers_ppc64): Remove, replace by ...
8973 (init_registers_powerpc_64l): ... this new prototype.
8974 (init_registers_powerpc_64): Remove, replace by ...
8975 (init_registers_powerpc_altivec64l): ... this new prototype.
8976 (ppc_num_regs): Set to 73.
8977 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8978 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8979 (ppc_cannot_store_register): Handle orig_r3 and trap.
8980 (ppc_arch_setup): Update init_registers_... calls.
8981 (ppc_fill_gregset): Handle orig_r3 and trap.
8982
8983 * inferiors.c (clear_inferiors): Reset current_inferior.
8984
8985 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8986
8987 * acinclude.m4: Add override.m4.
8988 * configure: Regenerate.
8989
8990 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8991
8992 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8993 initial call to init_register_ppc64.
8994
8995 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8996
8997 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8998 single powerpc*-*-linux* case.
8999 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9000
9001 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9002
9003 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9004 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9005 from reg_xmlfiles.
9006 * linux-ppc-low.c: Include <elf.h>.
9007 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9008 (ppc_hwcap): New global variable.
9009 (ppc_regmap): Remove __SPE__ #ifdef sections.
9010 (ppc_regmap_e500): New global variable.
9011 (ppc_cannot_store_register): Update __SPE__ special case.
9012 (ppc_get_hwcap): New function.
9013 (ppc_arch_setup): Use it to determine whether inferior supports
9014 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9015 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9016 Do not access registers if target does not support AltiVec.
9017 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9018 Do not access registers if target does not support SPE.
9019 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9020
9021 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9022
9023 * linux-low.c (disabled_regsets, num_regsets): New.
9024 (use_regsets_p): Delete.
9025 (linux_wait_for_process): Clear disabled_regsets.
9026 (regsets_fetch_inferior_registers): Check and set it.
9027 (regsets_store_inferior_registers): Likewise.
9028 (linux_fetch_registers, linux_store_registers): Do not use
9029 use_regsets_p.
9030 (initialize_low): Allocate disabled_regsets.
9031
9032 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9033
9034 * Makefile.in (LIBOBJS): New.
9035 (OBS): Use LIBOBJS.
9036 (memmem.o): New rule.
9037 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9038 * configure: Regenerated.
9039
9040 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9041
9042 * server.c (handle_query): Never return "unsupported" for
9043 qXfer:features:read queries.
9044
9045 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9046
9047 * server.c (get_features_xml): Fix inverted condition.
9048 (handle_query): Always support qXfer:feature:read.
9049
9050 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9051
9052 * server.c (wrapper_argv): New.
9053 (start_inferior): Handle wrapper_argv. If set, expect an extra
9054 trap.
9055 (gdbserver_usage): Document --wrapper.
9056 (main): Parse --wrapper.
9057
9058 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9059
9060 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9061 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9062 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9063 (ppc_set_pc): Likewise.
9064 (ppc_arch_setup): New function.
9065 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9066 of collect_register.
9067 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9068
9069 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9070
9071 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9072 instead of linux-ppc64-low.o.
9073 * linux-ppc64-low.c: Remove file.
9074 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9075 (linux-ppc64-low.o): Remove rule.
9076
9077 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9078 (init_registers_powerpc_64): Likewise.
9079 (ppc_regmap): Conditionally define depending on __powerpc64__.
9080 (ppc_cannot_store_register): Do not special-case "fpscr" when
9081 compiled on __powerpc64__.
9082 (ppc_collect_ptrace_register): New function.
9083 (ppc_supply_ptrace_register): New function.
9084 (ppc_breakpoint): Change type to "unsigned int".
9085 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9086 (the_low_target): Conditionally provide initializers for the
9087 arch_setup member depending on __powerpc64__. Install
9088 collect_ptrace_register and supply_ptrace_register members.
9089
9090 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9091
9092 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9093 * server.c (gdbserver_xmltarget): Define.
9094 (get_features_xml): Use it to replace "target.xml" and arch_string.
9095
9096 * configure.srv: Remove srv_xmltarget. Add XML files that were
9097 mentioned there to srv_xmlfiles instead. Remove conditional tests
9098 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9099 srv_xmlfiles and srv_regobj to include all possible choices.
9100 * configure.ac (srv_xmltarget): Remove.
9101 (srv_xmlfiles): Do not add "target.xml".
9102 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9103 checks for supplementary target information.
9104 * configure: Regenerate.
9105 * Makefile.in (XML_TARGET): Remove.
9106 (target.xml): Remove rule.
9107 (clean): Do not clean up target.xml.
9108 (.PRECIOUS): Do not mention target.xml.
9109
9110 * target.h (struct target_ops): Remove arch_string member.
9111 * linux-low.c (linux_arch_string): Remove.
9112 (linux_target_ops): Remove arch_string initializer.
9113 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9114 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9115 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9116 * spu-low.c (spu_arch_string): Remove.
9117 (spu_target_ops): Remove arch_string initializer.
9118 * win32-low.c (win32_arch_string): Remove.
9119 (win32_target_ops): Remove arch_string initializer.
9120 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9121 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9122 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9123
9124 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9125
9126 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9127 by collect_ptrace_register and supply_ptrace_register hooks.
9128 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9129 instead of checking for the_low_target.left_pad_xfer.
9130 (usr_store_inferior_registers): Use collect_ptrace_register callback
9131 instead of checking for the_low_target.left_pad_xfer.
9132
9133 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9134 (s390_supply_ptrace_register): Likewise.
9135 (s390_fill_gregset): Call s390_collect_ptrace_register.
9136 (the_low_target): Update.
9137
9138 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9139 (ppc_supply_ptrace_register): Likewise.
9140 (the_low_target): Update.
9141
9142 * linux-i386-low.c (the_low_target): Update.
9143 * linux-x86-64-low.c (the_low_target): Update.
9144
9145 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9146
9147 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9148 reg-s390.o and reg-s390x.o.
9149
9150 * linux-low.c (new_inferior): New global variable.
9151 (linux_create_inferior, linux_attach): Set it.
9152 (linux_wait_for_process): Call the_low_target.arch_setup after the
9153 target has stopped for the first time.
9154 (initialize_low): Do not call the_low_target.arch_setup.
9155
9156 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9157 (s390_set_pc): Likewise.
9158 (s390_arch_setup): New function.
9159 (the_low_target): Use s390_arch_setup as arch_setup routine.
9160
9161 * regcache.c (realloc_register_cache): New function.
9162 (set_register_cache): Call it for each existing regcache.
9163
9164 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9165
9166 * server.h (init_registers): Remove prototype.
9167
9168 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9169 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9170 instead of init_registers ().
9171 * linux-arm-low.c (init_registers_arm): Add prototype.
9172 (init_registers_arm_with_iwmmxt): Likewise.
9173 (the_low_target): Add initializer for arch_setup field.
9174 * linux-cris-low.c (init_registers_cris): Add prototype.
9175 (the_low_target): Add initializer for arch_setup field.
9176 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9177 (the_low_target): Add initializer for arch_setup field.
9178 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9179 (the_low_target): Add initializer for arch_setup field.
9180 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9181 (the_low_target): Add initializer for arch_setup field.
9182 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9183 (the_low_target): Add initializer for arch_setup field.
9184 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9185 (the_low_target): Add initializer for arch_setup field.
9186 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9187 (init_registers_mips64_linux): Likewise.
9188 (the_low_target): Add initializer for arch_setup field.
9189 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9190 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9191 (the_low_target): Add initializer for arch_setup field.
9192 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9193 (init_registers_powerpc_64): Likewise.
9194 (the_low_target): Add initializer for arch_setup field.
9195 * linux-s390-low.c (init_registers_s390): Add prototype.
9196 (init_registers_s390x): Likewise.
9197 (the_low_target): Add initializer for arch_setup field.
9198 * linux-sh-low.c (init_registers_sh): Add prototype.
9199 (the_low_target): Add initializer for arch_setup field.
9200 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9201 (the_low_target): Add initializer for arch_setup field.
9202 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9203 (the_low_target): Add initializer for arch_setup field.
9204
9205 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9206 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9207 instead of init_registers ().
9208 * win32-arm-low.c (init_registers_arm): Add prototype.
9209 (the_low_target): Add initializer for arch_setup field.
9210 * win32-i386-low.c (init_registers_i386): Add prototype.
9211 (the_low_target): Add initializer for arch_setup field.
9212
9213 * spu-low.c (init_registers_spu): Add prototype.
9214 (initialize_low): Call initialie_registers_spu () instead of
9215 initialize_registers ().
9216
9217 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9218
9219 * server.c (handle_v_requests): When handling the vRun and vAttach
9220 packets, if already debugging a process, don't kill it. Return an
9221 error instead.
9222
9223 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9224
9225 * server.c (handle_query): Correct length check.
9226
9227 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9228
9229 * win32-low.c (do_initial_child_stuff): Add process handle
9230 parameter. Set current_process_handle and current_process_id from the
9231 parameters. Clear globals.
9232 (win32_create_inferior): Don't set current_process_handle and
9233 current_process_id here. Instead pass them on the call to
9234 do_initial_child_stuff.
9235 (win32_attach): Likewise.
9236 (win32_clear_inferiors): New.
9237 (win32_kill): Don't close the current process handle or the
9238 current thread handle here. Instead call win32_clear_inferiors.
9239 (win32_detach): Don't open a new handle to the process. Call
9240 win32_clear_inferiors.
9241 (win32_join): Don't rely on current_process_handle; open a new
9242 handle using the process id.
9243 (win32_wait): Call win32_clear_inferiors when the inferior process
9244 has exited.
9245
9246 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9247
9248 * server.c (monitor_show_help): Add "exit".
9249
9250 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9251
9252 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9253 (clean): Add reg-xtensa.c.
9254 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9255 * configure.srv (xtensa*-*-linux*) New target.
9256 * linux-xtensa-low.c: New.
9257 * xtensa-xtregs.c: New.
9258
9259 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9260
9261 * hostio.c: Don't include errno.h.
9262 (errno_to_fileio_errno): Move to hostio-errno.
9263 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9264 error number outputting to the target->hostio_last_error callback.
9265 (hostio_packet_error): Use FILEIO_EINVAL directly.
9266 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9267 calls to hostio_error.
9268 * hostio-errno.c: New.
9269 * server.h (hostio_last_error_from_errno): Declare.
9270 * target.h (target_ops): Add hostio_last_error member.
9271 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9272 as hostio_last_error handler.
9273 * spu-low.c (spu_target_ops): Likewise.
9274 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9275 (wince_hostio_last_error): New functions.
9276 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9277 as hostio_last_error handler.
9278 (win32_target_ops) [!_WIN32_WCE]: Register
9279 hostio_last_error_from_errno as hostio_last_error handler.
9280 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9281 (hostio-errno.o): New rule.
9282 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9283 * configure.srv (srv_hostio_err_objs): New variable. Default to
9284 hostio-errno.o.
9285 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9286 * configure: Regenerate.
9287
9288 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9289
9290 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9291 (linux_kill, linux_detach): Clean up the process list.
9292 * remote-utils.c (remote_open): Improve port number parsing.
9293 (putpkt_binary, input_interrupt): Only send interrupts if the target
9294 is running.
9295 * server.c (extended_protocol): Make static.
9296 (attached): Define earlier.
9297 (exit_requested, response_needed, program_argv): New variables.
9298 (target_running): New.
9299 (start_inferior): Clear attached here.
9300 (attach_inferior): Set attached here.
9301 (require_running): Define.
9302 (handle_query): Use require_running and target_running. Implement
9303 "monitor exit".
9304 (handle_v_attach, handle_v_run): New.
9305 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9306 (gdbserver_usage): Update.
9307 (main): Redo argument parsing. Handle --debug and --multi. Handle
9308 --attach along with other options or after the port. Save
9309 program_argv. Support no initial program. Resynchronize
9310 communication with GDB after an error. Handle "monitor exit".
9311 Use require_running and target_running. Always allow the extended
9312 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9313 restart in extended mode.
9314 * README: Refer to the GDB manual. Update --attach usage.
9315
9316 2007-12-20 Andreas Schwab <schwab@suse.de>
9317
9318 * linux-low.c (STACK_SIZE): Define.
9319 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9320 (linux_test_for_tracefork): Likewise.
9321
9322 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9323
9324 * linux-low.c (linux_wait_for_event): Update messages. Do not
9325 reinsert auto-delete breakpoints.
9326 * mem-break.c (struct breakpoint): Change return type of handler to
9327 int.
9328 (set_breakpoint_at): Update handler type.
9329 (reinsert_breakpoint_handler): Return 1 instead of calling
9330 delete_breakpoint.
9331 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9332 setting a new one.
9333 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9334 * mem-break.h (set_breakpoint_at): Update handler type.
9335 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9336 * win32-low.c (auto_delete_breakpoint): New.
9337 (get_child_debug_event): Use it.
9338
9339 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9340
9341 * configure.ac: Check for pread and pwrite.
9342 * hostio.c (handle_pread): Fall back to lseek and read.
9343 (handle_pwrite): Fall back to lseek and write.
9344 * config.in, configure: Regenerated.
9345
9346 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9347
9348 * server.c (myresume): Add own_buf argument.
9349 (main): Update calls.
9350
9351 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9352
9353 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9354 * remote-utils.c (remote_open): Do not call disable_async_io.
9355 (block_async_io): Delete.
9356 (unblock_async_io): Make static.
9357 (initialize_async_io): New.
9358 * server.c (handle_v_cont): Handle async I/O here.
9359 (myresume): Likewise. Move other common resume tasks here...
9360 (main): ... from here. Call initialize_async_io. Disable async
9361 I/O before the main loop.
9362 * server.h (initialize_async_io): Declare.
9363 (block_async_io, unblock_async_io): Delete prototypes.
9364 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9365
9366 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9367
9368 * remote-utils.c (readchar): Allow binary data in received messages.
9369
9370 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9371
9372 * win32-low.c (attaching): New global.
9373 (win32_create_inferior): Clear the `attaching' global.
9374 (win32_attach): Set the `attaching' global.
9375 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9376 attaching. Only set a breakpoint at the entry point if not
9377 attaching.
9378
9379 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9380
9381 * server.c (main): Don't report dll events on the initial
9382 connection on attaches.
9383
9384 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9385
9386 * server.c (main): Relax numerical bases supported for the pid of
9387 the --attach command line argument.
9388
9389 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9390
9391 * win32-low.c (win32_attach): Call OpenProcess before
9392 DebugActiveProcess, not after. Add last error output to error
9393 call.
9394
9395 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9396
9397 * win32-low.c (win32_get_thread_context)
9398 (win32_set_thread_context): New functions.
9399 (thread_rec): Use win32_get_thread_context.
9400 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9401 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9402 field.
9403
9404 2007-12-03 Leo Zayas
9405 Pedro Alves <pedro_alves@portugalmail.pt>
9406
9407 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9408 global variables.
9409 (child_add_thread): Minor cleanup.
9410 (child_continue): Resume artificially suspended threads before
9411 calling ContinueDebugEvent.
9412 (suspend_one_thread): New.
9413 (fake_breakpoint_event): New.
9414 (get_child_debug_event): Change return type to int. Check here if
9415 gdb sent an interrupt request. If a soft interrupt was requested,
9416 fake a breakpoint event. Return 0 if there is no event to handle,
9417 and 1 otherwise.
9418 (win32_wait): Don't check here if gdb sent an interrupt request.
9419 Ensure there is a valid event to handle.
9420 (win32_request_interrupt): Add soft interruption method as last
9421 resort.
9422
9423 2007-12-03 Leo Zayas
9424 Pedro Alves <pedro_alves@portugalmail.pt>
9425
9426 * win32-low.h (win32_thread_info): Add descriptions to the
9427 structure members. Replace `suspend_count' counter by a
9428 `suspended' flag.
9429 * win32-low.c (thread_rec): Update condition of when to get the
9430 context from the inferior. Rely on ContextFlags being set if it
9431 has already been retrieved. Only suspend the inferior thread if
9432 we haven't already. Warn if that fails.
9433 (continue_one_thread): s/suspend_count/suspended/. Only call
9434 ResumeThread once. Warn if that fails.
9435
9436 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9437
9438 * win32-low.c (win32_wait): Don't read from the inferior when it
9439 has already exited.
9440
9441 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9442
9443 * Makefile.in (win32_low_h): New variable.
9444 (win32-low.o): Add dependency on $(win32_low_h).
9445 (win32-arm-low.o, win32-i386-low.o): New rules.
9446
9447 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9448
9449 * hostio.c: Correct copyright year.
9450
9451 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9452
9453 * Makefile.in (OBS): Add hostio.o.
9454 (hostio.o): New rule.
9455 * server.h (handle_vFile): Declare.
9456 * hostio.c: New file.
9457 * server.c (handle_v_requests): Take packet_len and new_packet_len
9458 for binary packets. Call handle_vFile.
9459 (main): Update call to handle_v_requests.
9460
9461 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9462
9463 * linux-low.c: Include <sched.h>.
9464
9465 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9466
9467 * linux-low.c (linux_tracefork_grandchild): New.
9468 (linux_tracefork_child): Use clone.
9469 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9470
9471 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9472
9473 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9474
9475 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9476
9477 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9478
9479 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9480
9481 * inferiors.c (change_inferior_id): Delete.
9482 (add_pid_to_list, pull_pid_from_list): New.
9483 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9484 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9485 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9486 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9487 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9488 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9489 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9490 (using_threads): Always set to 1.
9491 (handle_extended_wait): New.
9492 (add_process): Do not set TID.
9493 (linux_create_inferior): Set must_set_ptrace_flags.
9494 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9495 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9496 (linux_thread_alive): Rename TID argument to LWPID.
9497 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9498 (linux_wait_for_event): Do not use TID or check using_threads. Update
9499 call to dead_thread_notify. Call handle_extended_wait.
9500 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9501 (send_sigstop): Delete sigstop_sent.
9502 (wait_for_sigstop): Avoid TID.
9503 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9504 (linux_test_for_tracefork): New.
9505 (linux_lookup_signals): Use thread_db_active and
9506 linux_supports_tracefork_flag.
9507 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9508 * linux-low.h (get_process_thread): Avoid TID.
9509 (struct process_ifo): Move thread_known and tid to the end. Remove
9510 sigstop_sent.
9511 (linux_attach_lwp, thread_db_init): Update prototypes.
9512 * server.h (change_inferior_id): Delete prototype.
9513 (add_pid_to_list, pull_pid_from_list): New prototypes.
9514 * thread-db.c (thread_db_use_events): New.
9515 (find_first_thread): Rename to...
9516 (find_one_thread): ...this. Update callers and messages. Do not
9517 call fatal. Check thread_db_use_events. Do not call
9518 change_inferior_id or new_thread_notify.
9519 (maybe_attach_thread): Update. Do not call new_thread_notify.
9520 (thread_db_init): Set thread_db_use_events. Check use_events.
9521 * utils.c (fatal, warning): Correct message prefix.
9522
9523 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9524
9525 * Makefile.in (clean): Remove new files.
9526 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9527 (powerpc-64.o, powerpc-64.c): New rules.
9528 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9529 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9530 with SPE.
9531 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9532 SPE targets.
9533 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9534 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9535 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9536 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9537 (target_regsets): Add AltiVec and SPE register sets.
9538 * configure.ac: Check for AltiVec and SPE.
9539 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9540 (ppc_fill_vrregset, ppc_store_vrregset): New.
9541 (target_regsets): Add AltiVec register set.
9542 * configure: Regenerated.
9543
9544 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9545
9546 * linux-low.c (O_LARGEFILE): Define.
9547 (linux_read_memory): Use /proc/PID/mem.
9548 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9549 * configure, config.in: Regenerated.
9550
9551 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9552
9553 * linux-low.c (linux_wait_for_event): Do not pass signals while
9554 single-stepping.
9555
9556 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9557
9558 * win32-low.c (create_process): New.
9559 (win32_create_inferior): Use create_process instead of
9560 CreateProcess. If create_process failed retry appending an ".exe"
9561 suffix. Store the GetLastError result immediatelly after
9562 create_process calls and use it on the call to error.
9563
9564 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9565
9566 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9567
9568 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9569
9570 * configure.ac: Switch license to GPLv3.
9571
9572 2007-08-01 Michael Snyder <msnyder@access-company.com>
9573
9574 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9575
9576 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9577
9578 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9579 typedef.
9580 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9581 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9582 CloseToolhelp32Snapshot.
9583 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9584 CloseToolhelp32Snapshot.
9585
9586 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9587
9588 * server.c (main): Check for inferior exit before main loop.
9589
9590 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9591
9592 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9593 instead of on tmp_desc.
9594
9595 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9596 Daniel Jacobowitz <dan@codesourcery.com>
9597
9598 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9599 (add_thread): Minor cleanups.
9600 (clear_inferiors): Move lower in the file. Clear the DLL
9601 list.
9602 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9603 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9604 (xml_escape_text): New.
9605 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9606 for qSupported.
9607 (handle_v_cont): Report errors.
9608 (gdbserver_version): Update.
9609 (main): Correct size of own_buf. Do not report initial DLL events.
9610 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9611 (unloaded_dll, xml_escape_text): New.
9612 * win32-low.c (enum target_waitkind): Update comments.
9613 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9614 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9615 (win32_EnumProcessModules, win32_GetModuleInformation)
9616 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9617 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9618 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9619 (win32_Module32First, win32_Module32Next, load_toolhelp)
9620 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9621 (get_child_debug_event): Handle DLL events.
9622 (win32_wait): Likewise.
9623
9624 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9625
9626 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9627 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9628
9629 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9630
9631 * win32-low.c (handle_output_debug_string): Ignore event if not
9632 waiting.
9633
9634 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9635
9636 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9637
9638 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9641
9642 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9643
9644 * inferiors.c (change_inferior_id): Add comment.
9645 * linux-low.c (check_removed_breakpoint): Add an early
9646 prototype. Improve debug output.
9647 (linux_attach): Doc update.
9648 (linux_detach_one_process, linux_detach): Clean up before releasing
9649 each process.
9650 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9651 * linux-low.h (struct process_info): Doc improvement.
9652 * mem-break.c (delete_all_breakpoints): New.
9653 * mem-break.h (delete_all_breakpoints): New prototype.
9654 * thread-db.c (find_first_thread): New.
9655 (thread_db_create_event): Call it instead of
9656 thread_db_find_new_threads. Clean up unused variables.
9657 (maybe_attach_thread): Remove first thread handling.
9658 (thread_db_find_new_threads): Use find_first_thread.
9659 (thread_db_get_tls_address): Likewise.
9660
9661 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9662
9663 * thread-db.c (thread_db_find_new_threads): Add prototype.
9664 (thread_db_create_event): Check for the main thread before adding
9665 a new thread.
9666 (maybe_attach_thread): Only enable event reporting if TID == 0.
9667 (thread_db_get_tls_address): Check for new threads.
9668
9669 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9670
9671 * linux-low.c (linux_create_inferior): Try execv before execvp.
9672 * spu-low.c (spu_create_inferior): Likewise.
9673
9674 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9675
9676 * linux-low.c (linux_create_inferior): Change execv to execvp.
9677 * spu-low.c (spu_create_inferior): Likewies.
9678
9679 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9680
9681 * Makefile.in (clean): Clean new files instead of deleted ones.
9682 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9683 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9684 rules.
9685 * configure.srv: Specify XML files and new regformats for MIPS and
9686 MIPS64 GNU/Linux.
9687 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9688 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9689 an entry for the restart register.
9690 (mips_cannot_fetch_register, mips_cannot_store_register)
9691 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9692 register names to match the XML descriptions.
9693 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9694 restart register instead of $0.
9695
9696 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9697 Markus Deuling <deuling@de.ibm.com>
9698
9699 * remote-utils.c (decode_xfer_write): New function.
9700 * server.h (decode_xfer_write): Add prototype.
9701 * server.c (handle_query): Add PACKET_LEN argument. Support
9702 qXfer:spu:read and qXfer:spu:write packets.
9703 (main): Pass packet_len to handle_query.
9704 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9705 * target.h (target_ops): Add qxfer_spu.
9706
9707 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9708
9709 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9710 accessing non-seekable spufs files.
9711
9712 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9713
9714 * server.c (handle_query): Add reply for qC packet.
9715
9716 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9717 Leo Zayas <lerele@champenstudios@com>
9718
9719 * server.h (check_remote_input_interrupt_request): New function.
9720 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9721 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9722 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9723 (check_remote_input_interrupt_request): New function.
9724 * server.h (check_remote_input_interrupt_request): Declare.
9725 * win32-low.c (winapi_DebugBreakProcess,
9726 winapi_GenerateConsoleCtrlEvent): New typedefs.
9727 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9728 to 250 ms.
9729 (win32_wait): Check for remote interrupt request
9730 with check_remote_input_interrupt_request.
9731 (win32_request_interrupt): New function.
9732 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9733
9734 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9735
9736 * win32-low.c (debug_registers_changed,
9737 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9738 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9739 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9740 (thread_rec): Get context using the low target.
9741 (child_add_thread): Call thread_added on the low target,
9742 which does the same thing.
9743 (regptr): Delete.
9744 (do_initial_child_stuff): Remove debug registers references.
9745 Set context using the low target. Resume threads after
9746 setting the contexts.
9747 (child_continue): Remove dead variable. Remove debug
9748 registers references.
9749 (child_fetch_inferior_registers): Go through the low target.
9750 (do_child_store_inferior_registers): Remove.
9751 (child_store_inferior_registers): Go through the low target.
9752 (win32_resume): Remove debug registers references.
9753 Set context using the low target.
9754 (handle_exception): Change return type to void. Don't record
9755 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9756 first chance exception.
9757 (get_child_debug_event): Change return type to void. Remove
9758 goto loop. Always return after waiting for debug event.
9759 (win32_wait): Convert to switch statement. Handle spurious
9760 events.
9761
9762 * win32-i386-low.c (debug_registers_changed,
9763 debug_registers_used): New.
9764 (initial_stuff): Rename to ...
9765 (i386_initial_stuff): ... this. Clear debug registers
9766 state variables.
9767 (store_debug_registers): Delete.
9768 (i386_get_thread_context): New.
9769 (load_debug_registers): Delete.
9770 (i386_set_thread_context): New.
9771 (i386_thread_added): New.
9772 (single_step): Rename to ...
9773 (i386_single_step): ... this.
9774 (do_fetch_inferior_registers): Rename to ...
9775 (i386_fetch_inferior_register): ... this.
9776 (i386_store_inferior_register): New.
9777 (the_low_target): Adapt to new interface.
9778
9779 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9780 (arm_get_thread_context): New.
9781 (arm_set_thread_context): New.
9782 (regptr): New.
9783 (do_fetch_inferior_registers): Rename to ...
9784 (arm_fetch_inferior_register): ... this.
9785 (arm_store_inferior_register): New.
9786 (arm_wince_breakpoint): Reimplement as unsigned long.
9787 (arm_wince_breakpoint_len): Define.
9788 (the_low_target): Adapt to new interface.
9789
9790 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9791 load_debug_registers. Add get_thread_context, set_thread_context,
9792 thread_added and store_inferior_register. Rename
9793 fetch_inferior_registers to fetch_inferior_register.
9794 (regptr): Remove declaration.
9795
9796 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9797
9798 * linux-low.c (linux_detach): Change return type to int. Return 0.
9799 * spu-low.c (spu_detach): Likewise.
9800
9801 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9802
9803 * target.h (target_ops): Change return type of detach to int.
9804 Add join.
9805 (join_inferior): New.
9806 * server.c (main): Don't skip detach support on mingw32.
9807 If the inferior doesn't support detaching return error.
9808 Call join_inferior instead of using waitpid.
9809 * linux-low.c (linux_join): New.
9810 (linux_target_op): Add linux_join.
9811 * spu-low.c (spu_join): New.
9812 (spu_target_ops): Add spu_join.
9813 * win32-low.c (win32_detach): Adapt to new interface.
9814 Reopen current_process_handle before detaching. Issue a child
9815 resume before detaching.
9816 (win32_join): New.
9817 (win32_target_op): Add win32_join.
9818
9819 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9820
9821 * win32-low.c (win32-attach): Fix return value.
9822 * target.h (target_ops): Describe ATTACH return values.
9823
9824 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9825
9826 * win32-low.c (GETPROCADDRESS): Define.
9827 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9828 (winapi_DebugSetProcessKillOnExit): Likewise.
9829 (win32_create_inferior): Force usage of ansi CreateProcessA.
9830 (win32_attach): Use GETPROCADDRESS.
9831 (win32_detach): Likewise.
9832
9833 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9834
9835 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9836
9837 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9838
9839 * win32-low.c: Commit leftover changes from 2007-03-29.
9840
9841 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9842
9843 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9844 fields short instead of int. Add explicit padding.
9845 (i387_cache_to_fsave): Remove unnecessary casts.
9846 (i387_fsave_to_cache): Doc fix.
9847 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9848
9849 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9850
9851 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9852 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9853
9854 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9855
9856 * configure.srv (arm*-*-mingw32ce*): Move near the other
9857 arm targets.
9858
9859 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9860
9861 * configure.ac: Add errno checking.
9862 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9863 sys/file.h and malloc.h.
9864 (AC_CHECK_DECLS): Add perror.
9865 (srv_mingwce): Handle.
9866 * configure.srv (i[34567]86-*-cygwin*): Add
9867 win32-i386-low.o to srv_tgtobj.
9868 (i[34567]86-*-mingw*): Likewise.
9869 (arm*-*-mingw32ce*): Add case.
9870 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9871 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9872 [__MINGW32CE__] (strerror): New function.
9873 [__MINGW32CE__] (errno): Define to GetLastError.
9874 [__MINGW32CE__] (COUNTOF): New macro.
9875 (remote_open): Remove extra close call.
9876 * mem-break.c (delete_breakpoint_at): New function.
9877 * mem-break.h (delete_breakpoint_at): Declare.
9878 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9879 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9880 [USE_WIN32API] (read, write): Add char* casts.
9881 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9882 * server.h: Include wincecompat.h on Windows CE.
9883 [HAVE_ERRNO_H]: Check.
9884 (perror): Declare if not declared.
9885 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9886 (perror_with_name): Remove errno declaration.
9887 * wincecompat.h: New.
9888 * wincecompat.c: New.
9889 * win32-low.h: New.
9890 * win32-arm-low.c: New.
9891 * win32-i386-low.c: New.
9892 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9893 (OUTMSG2): Make it safe.
9894 (_T): New macro.
9895 (COUNTOF): New macro.
9896 (NUM_REGS): Get it from the low target.
9897 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9898 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9899 (thread_rec): Let low target handle debug registers.
9900 (child_add_thread): Likewise.
9901 (child_init_thread_list): Likewise.
9902 (continue_one_thread): Likewise.
9903 (regptr): New.
9904 (do_child_fetch_inferior_registers): Move to ...
9905 * win32-i386-low.c: ... here, and rename to ...
9906 (do_fetch_inferior_registers): ... this.
9907 * win32-low.c (child_fetch_inferior_registers):
9908 Go through the low target.
9909 (do_child_store_inferior_registers): Use regptr.
9910 (strwinerror): New function.
9911 (win32_create_inferior): Handle Windows CE.
9912 Use strwinerror instead of strerror on Windows error
9913 codes. Add program to the error output.
9914 Don't close the main thread handle on Windows CE.
9915 (win32_attach): Use coredll.dll on Windows CE.
9916 (win32_kill): Close current process and current
9917 thread handles.
9918 (win32_detach): Use coredll.dll on Windows CE.
9919 (win32_resume): Let low target handle debug registers, and
9920 step request.
9921 (handle_exception): Add/Remove initial breakpoint. Avoid
9922 non-existant WSTOPSIG on Windows CE.
9923 (win32_read_inferior_memory): Cast to remove warning.
9924 (win32_arch_string): Go through the low target.
9925 (initialize_low): Call set_breakpoint_data with the low
9926 target's breakpoint.
9927 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9928 FOP_REGNUM, mappings): Move to ...
9929 * win32-i386-low.c: ... here.
9930 * win32-low.c (win32_thread_info): Move to ...
9931 * win32-low.h: ... here.
9932 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9933 win32-arm-low.c and wincecompat.c.
9934 (all:): Add $EXEEXT.
9935 (install-only:): Likewise.
9936 (gdbserver:): Likewise.
9937 (gdbreplay:): Likewise.
9938 * config.in: Regenerate.
9939 * configure: Regenerate.
9940
9941 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9942
9943 * win32-low.c: Rename typedef thread_info to
9944 win32_thread_info throughout.
9945
9946 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9947
9948 * win32-i386-low.c: Rename to ...
9949 * win32-low.c: ... this.
9950 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9951 * Makefile.in: Likewise.
9952
9953 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9954
9955 * remote-utils.c (monitor_output): Constify msg parameter.
9956 * server.h (monitor_output): Likewise.
9957 * win32-i386-low.c (handle_output_debug_string): New.
9958 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9959 handle_output_debug_string.
9960 (get_child_debug_event): Likewise.
9961
9962 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9963
9964 * server.c (main): Correct strtoul check.
9965
9966 2007-03-27 Jon Ringle <jon@ringle.org>
9967
9968 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9969
9970 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9971
9972 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9973
9974 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9975
9976 * terminal.h: Check HAVE_SGTTY_H.
9977
9978 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9979
9980 * remote-utils.c (remote_open): Print out the assigned port number.
9981
9982 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9983
9984 * remote-utils.c (monitor_output): New function.
9985 * server.c (debug_threads): Define here.
9986 (monitor_show_help): New function.
9987 (handle_query): Handle qRcmd.
9988 (main): Do not handle 'd' packet.
9989 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9990 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9991 of debug_threads.
9992
9993 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9994
9995 * Makefile.in (EXEEXT): New.
9996 (clean): Use $(EXEEXT).
9997
9998 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9999
10000 * target.h (target_ops): Rename send_signal to request_interrupt,
10001 and remove enum target_signal parameter.
10002 * linux-low.c (linux_request_interrupt): Rename from
10003 linux_send_signal, and always send SIGINT.
10004 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10005 and always send SIGINT.
10006 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10007 of send_signal.
10008 (input_interrupt): Likewise.
10009
10010 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10011
10012 * server.c (get_features_xml): Check if target implemented
10013 arch_string.
10014 * win32-i386-low.c (win32_arch_string): New.
10015 (win32_target_ops): Add win32_arch_string as arch_string member.
10016
10017 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10018
10019 * spu-low.c (spu_arch_string): New.
10020 (spu_target_ops): Add spu_arch_string.
10021
10022 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10023
10024 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10025 * configure.ac: Do not check for terminal.h.
10026 * configure, config.in: Regenerated.
10027
10028 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10029
10030 * Makefile.in (OBS): Add $(XML_BUILTIN).
10031 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10032 (clean): Update.
10033 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10034 (arm-with-iwmmxt.c): New.
10035 * config.in, configure: Regenerate.
10036 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10037 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10038 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10039 (arm*-*-linux*): Add iWMMXt and regset support.
10040 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10041 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10042 (arm_store_wmmxregset, target_regsets): New.
10043 * server.c (get_features_xml): Take annex argument. Check builtin
10044 XML documents.
10045 (handle_query): Handle multiple annexes.
10046
10047 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10048
10049 * remote-utils.c [USE_WIN32API] (read, write): Define.
10050 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10051 write.
10052
10053 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10054
10055 * linux-i386-low.c (the_low_target): Set arch_string.
10056 * linux-x86-64-low.c (the_low_target): Likewise.
10057 * linux-low.c (linux_arch_string): New.
10058 (linux_target_ops): Add it.
10059 * linux-low.h (struct linux_target_ops): Add arch_string.
10060 * server.c (write_qxfer_response): Use const void * for DATA.
10061 (get_features_xml): New.
10062 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10063 * target.h (struct target_ops): Add arch_string method.
10064
10065 2007-01-03 Denis Pilat <denis.pilat@st.com>
10066 Daniel Jacobowitz <dan@codesourcery.com>
10067
10068 * linux-low.c (linux_kill): Handle being called with no threads.
10069 * win32-i386-low.c (win32_kill): Likewise.
10070 (get_child_debug_event): Clear current_process_handle.
10071
10072 2006-12-30 Denis PILAT <denis.pilat@st.com>
10073 Daniel Jacobowitz <dan@codesourcery.com>
10074
10075 * remote-utils.c (remote_open): Check the type of specified
10076 serial port devices before opening them.
10077 * server.c (main): Kill the inferior if an error occurs during
10078 the first remote_open.
10079
10080 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10081
10082 * README: Update supported targets.
10083
10084 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10085
10086 * Makefile.in (clean): Remove reg-mips64.c.
10087 (reg-mips64.c, reg-mips64.o): New rules.
10088 * configure.srv: Handle mips64. Include regset support for mips.
10089 * linux-mips-low.c (union mips_register): New.
10090 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10091 (mips_breakpoint, mips_breakpoint_at): Use int.
10092 (mips_collect_register, mips_supply_register)
10093 (mips_collect_register_32bit, mips_supply_register_32bit)
10094 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10095 (mips_store_fpregset, target_regsets): New.
10096 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10097
10098 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10099
10100 * configure.srv: Add target "spu*-*-*".
10101 * Makefile.in (clean): Remove reg-spu.c.
10102 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10103 * spu-low.c: New file.
10104
10105 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10106
10107 * configure.ac: Correct td_thr_tls_get_addr test.
10108 * configure: Regenerated.
10109
10110 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10111
10112 * linux-low.c (linux_wait_for_event): Reformat. Use the
10113 pass_signals array.
10114 * remote-utils.c (decode_address_to_semicolon): New.
10115 * server.c (pass_signals, handle_general_set): New.
10116 (handle_query): Mention QPassSignals for qSupported.
10117 (main): Call handle_general_set.
10118 * server.h (pass_signals, decode_address_to_semicolon): New.
10119
10120 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * server.c (handle_query): Correct error handling for read_auxv.
10123
10124 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10125
10126 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10127 and srv_linux_thread_db to yes.
10128 * linux-s390-low.c (s390_fill_gregset): New function.
10129 (target_regsets): Define data structure.
10130
10131 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10132
10133 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10134 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10135 * config.in, configure: Regenerated.
10136 * inferiors.c (gdb_id_to_thread): New function.
10137 (gdb_id_to_thread_id): Use it.
10138 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10139 * linux-low.h (struct process_info): Add th member.
10140 (thread_db_get_tls_address): New prototype.
10141 * remote-utils.c (decode_address): Make non-static.
10142 * server.c (handle_query): Handle qGetTLSAddr.
10143 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10144 * target.h (struct target_ops): Add get_tls_address.
10145 * thread-db.c (maybe_attach_thread): Save the thread handle.
10146 (thread_db_get_tls_address): New.
10147
10148 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10149
10150 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10151 (linux_resume_one_process): Take a siginfo_t *. Update all
10152 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10153 (struct pending_signals): Add a siginfo_t.
10154 (linux_wait_for_process): Always set last_status.
10155 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10156 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10157 * linux-low.h (struct process_info): Add last_status.
10158
10159 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10160
10161 * remote-utils.c (try_rle): New function.
10162 (putpkt_binary): Use it.
10163
10164 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10165
10166 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10167 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10168 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10169 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10170 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10171 point registers.
10172
10173 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10174
10175 * server.c (terminal_fd): New variable.
10176 (old_foreground_pgrp): Likewise.
10177 (restore_old_foreground_pgrp): New function.
10178 (start_inferior): Record the terminal file descriptor in terminal_fd
10179 and its original foreground group in old_foreground_pgrp. Register
10180 restore_old_foreground_pgrp with atexit().
10181
10182 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10183
10184 * server.c (handle_query): Correct qPart to qXfer.
10185
10186 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10187
10188 * configure.ac: Check for more headers which are missing on
10189 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10190 * configure.srv: Add Cygwin and mingw32.
10191 * remote-utils.c: Don't include headers unconditionally which
10192 are missing on mingw32. Include <winsock.h> for mingw32.
10193 (remote_open): Adjust for mingw32 support. Flush
10194 standard error after writing to it.
10195 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10196 (unblock_async_io, enable_async_io, disable_async_io)
10197 (readchar, getpkt): Update for Winsock support.
10198 (prepare_resume_reply): Expect a protocol signal number.
10199 * server.c: Disable <sys/wait.h> on mingw32.
10200 (start_inferior): Adjust for mingw32 support. Flush
10201 standard error after writing to it.
10202 (attach_inferior): Likewise. Use protocol signal
10203 numbers.
10204 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10205 and names.
10206 * win32-i386-low.c: New file.
10207 * Makefile.in (XM_CLIBS): Set.
10208 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10209 (win32-i386-low.o): New dependency rule.
10210 * linux-low.c (linux_wait): Use target signal numbers.
10211 * target.h (struct target_ops): Doc fix.
10212 * server.h (target_signal_to_name): New prototype.
10213 * gdbreplay.c: Don't include headers unconditionally which
10214 are missing on mingw32. Include <winsock.h> for mingw32.
10215 (remote_close, remote_open): Adjust for Winsock support.
10216 * configure, config.in: Regenerated.
10217
10218 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10219
10220 * server.c (decode_xfer_read, write_qxfer_response): New.
10221 (handle_query): Take a packet length argument. Handle
10222 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10223 the qSupported response.
10224 (main): Update call to handle_query.
10225
10226 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10227
10228 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10229 (putpkt_binary): Renamed from putpkt and adjusted for binary
10230 data.
10231 (putpkt): New wrapper for putpkt_binary.
10232 (readchar): Don't mask off the high bit.
10233 (decode_X_packet): New function.
10234 * server.c (main): Call putpkt_binary if a handler sets the packet
10235 length. Save the length of the incoming packet. Handle 'X'.
10236 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10237
10238 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10239
10240 * server.c (handle_query): Handle qSupported.
10241
10242 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10243
10244 * remote-utils.c (all_symbols_looked_up): New variable.
10245 (look_up_one_symbol): Check it.
10246 * server.h (look_up_one_symbol): New declaration.
10247 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10248
10249 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10250
10251 * Makefile.in (linux-arm-low.o): Update dependencies.
10252 * linux-arm-low.c: Include "gdb_proc_service.h".
10253 (PTRACE_GET_THREAD_AREA): Define.
10254 (ps_get_thread_area): New function.
10255
10256 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10257
10258 * configure.srv (m68k*-*-uclinux*): New target.
10259 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10260 (linux_resume_one_process): Remove extraneous cast.
10261 (linux_read_offsets): New.
10262 (linux_target_op): Add linux_read_offsets on mmuless systems.
10263 * server.c (handle_query): Add qOffsets logic.
10264 * target.h (struct target_ops): Add read_offsets.
10265
10266 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10267
10268 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10269 (PTRACE_GET_THREAD_AREA): Define.
10270 (ps_get_thread_area): New function.
10271 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10272 (linux-x86-64-low.o): Update.
10273
10274 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10275
10276 * configure.ac: Remove checks for prfpregset_t.
10277 * gdb_proc_service.h: New file.
10278 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10279 new "gdb_proc_service.h".
10280 * proc-service.c: Likewise.
10281 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10282 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10283 * Makefile.in (gdb_proc_service_h): Updated.
10284 * configure, config.in: Regenerated.
10285
10286 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10287
10288 * remote-utils.c (prepare_resume_reply): Move declaration
10289 of gdb_id_from_wait to the top of the block.
10290
10291 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10292
10293 * linux-low.c (regsets_store_inferior_registers): Read the regset
10294 from the target before filling it.
10295
10296 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * server.c (attach_inferior): Return SIGTRAP for a successful
10299 attach.
10300
10301 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * Makefile.in (OBS): Add version.o.
10304 (STAGESTUFF): Delete.
10305 (version.o): Add dependencies.
10306 (version.c): Replace rule.
10307 (clean): Remove version.c.
10308 * server.c (gdbserver_version): New.
10309 (gdbserver_usage): Use printf.
10310 (main): Handle --version and --help.
10311 * server.h (version, host_name): Add declarations.
10312
10313 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10314
10315 * linux-arm-low.c:
10316 * linux-arm-low.c:
10317 * inferiors.c:
10318 * i387-fp.h:
10319 * i387-fp.c:
10320 * gdbreplay.c:
10321 * regcache.c:
10322 * proc-service.c:
10323 * mem-break.h:
10324 * mem-break.c:
10325 * linux-x86-64-low.c:
10326 * linux-sh-low.c:
10327 * linux-s390-low.c:
10328 * linux-ppc64-low.c:
10329 * linux-ppc-low.c:
10330 * linux-mips-low.c:
10331 * linux-m68k-low.c:
10332 * linux-m32r-low.c:
10333 * linux-low.h:
10334 * linux-low.c:
10335 * linux-ia64-low.c:
10336 * linux-i386-low.c:
10337 * linux-crisv32-low.c:
10338 * thread-db.c:
10339 * terminal.h:
10340 * target.h:
10341 * target.c:
10342 * server.h:
10343 * server.c:
10344 * remote-utils.c:
10345 * regcache.h:
10346 * utils.c:
10347 * Makefile.in:
10348 * configure.ac:
10349 * gdbserver.1: Add (C) after Copyright. Update the FSF
10350 address.
10351
10352 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10353
10354 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10355 (arm_breakpoint_at): Recognize both breakpoints.
10356 (the_low_target): Use the correct breakpoint instruction.
10357
10358 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10359
10360 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10361 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10362 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10363 (the_low_target): Update.
10364
10365 2005-10-25 Andreas Schwab <schwab@suse.de>
10366
10367 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10368
10369 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10370 (ia64_num_regs): Reduce to 462.
10371
10372 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10373
10374 * acinclude.m4: Correct quoting.
10375 * aclocal.m4: Regenerated.
10376
10377 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10378 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10379 (thread_db_init): Call thread_db_err_str.
10380 * configure.ac: Check for TD_VERSION.
10381 * config.in, configure: Regenerated.
10382
10383 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10384
10385 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10386
10387 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10390 is not available. Define HAVE_PTRACE_GETREGS if it is.
10391 * config.in, configure: Regenerated.
10392 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10393 * linux-i386-low.c, linux-m68k-low.c: Update to use
10394 HAVE_PTRACE_GETREGS.
10395 * linux-low.c (regsets_fetch_inferior_registers)
10396 (regsets_store_inferior_registers): Only return 0 if we processed
10397 GENERAL_REGS.
10398 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10399 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10400
10401 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * inferiors.c (struct thread_info): Add gdb_id.
10404 (add_thread): Add gdb_id argument.
10405 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10406 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10407 calls to add_thread.
10408 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10409 * server.c (handle_query): Use thread_to_gdb_id.
10410 (handle_v_cont, main): Use gdb_id_to_thread_id.
10411 * server.h (add_thread): Update prototype.
10412 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10413 prototypes.
10414
10415 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10416
10417 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10418 left-padded registers.
10419 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10420 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10421
10422 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10423
10424 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10425 * configure: Regenerate.
10426 * config.in: Regenerate.
10427 * server.h (NEED_DECLARATION_STRERROR):
10428 Replace with !HAVE_DECL_STRERROR.
10429
10430 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * linux-low.c (linux_wait, linux_send_signal): Don't test
10433 an unsigned long variable for > 0 if it could be MAX_ULONG.
10434 * server.c (myresume): Likewise.
10435 * target.c (set_desired_inferior): Likewise.
10436
10437 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10438
10439 * configure.ac: Simplify and improve check for socklen_t.
10440 * configure, config.in: Regenerate.
10441
10442 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10443
10444 * acconfig.h: Remove.
10445 * configure.ac: Add a test for socklen_t. Use three-argument
10446 AC_DEFINE throughout.
10447 * config.in: Regenerated using autoheader 2.59.
10448 * configure: Regenerated.
10449
10450 * gdbreplay.c (socklen_t): Provide a default.
10451 (remote_open): Use socklen_t.
10452 * remote-utils.c (socklen_t): Provide a default.
10453 (remote_open): Use socklen_t.
10454 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10455 unsigned char.
10456
10457 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10458 char for buffers.
10459 * linux-low.c (linux_read_memory, linux_write_memory)
10460 (linux_read_auxv): Likewise.
10461 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10462 (check_mem_write): Likewise.
10463 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10464 Likewise.
10465 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10466 (registers_from_string, register_data): Likewise.
10467 * server.c (handle_query, main): Likewise.
10468 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10469 (decode_M_packet): Likewise.
10470 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10471 * target.h (struct target_ops): Update read_memory, write_memory,
10472 and read_auxv.
10473 (read_inferior_memory, write_inferior_memory): Update.
10474 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10475 to unsigned char *.
10476 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10477 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10478 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10479 linux-s390-low.c, linux-sh-low.c: Update for changes in
10480 read_inferior_memory and the_low_target->breakpoint.
10481
10482 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10483
10484 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10485 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10486 * configure.srv: Add powerpc64-*-linux*.
10487 * linux-ppc64-low.c: New file.
10488
10489 2005-05-23 Orjan Friberg <orjanf@axis.com>
10490
10491 * linux-cris-low.c: New file with support for CRIS.
10492 * linux-crisv32-low.c: Ditto for CRISv32.
10493 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10494 (clean): Add reg-cris.c and reg-crisv32.c.
10495 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10496 reg-crisv32.o, and reg-crisv32.c to make rules.
10497 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10498 recognized targets.
10499
10500 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10501
10502 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10503 of sizeof (PTRACE_XFER_TYPE).
10504 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10505
10506 2005-05-12 Orjan Friberg <orjanf@axis.com>
10507
10508 * target.h (struct target_ops): Add insert_watchpoint,
10509 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10510 pointers for hardware watchpoint support.
10511 * linux-low.h (struct linux_target_ops): Ditto.
10512 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10513 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10514 to linux_target_ops.
10515 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10516 reply packet.
10517 * server.c (main): Recognize 'Z' and 'z' packets.
10518
10519 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10520
10521 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10522 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10523 (the_low_target): Add new members.
10524
10525 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10526
10527 * proc-service.c (ps_lgetregs): Search all_processes instead of
10528 all_threads.
10529
10530 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10531
10532 * server.c (start_inferior): Change return type to int.
10533 (attach_inferior): Change sigptr to int *.
10534 (handle_v_cont, handle_v_requests): Change signal to int *.
10535 (main): Change signal to int.
10536
10537 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10538
10539 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10540 * configure.srv: Add m32r*-*-linux*.
10541 * linux-m32r-low.c: New file.
10542
10543 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10544
10545 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10546
10547 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10548
10549 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10550 Take unsigned long arguments for PIDs.
10551 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10552 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10553 (wait_for_sigstop, linux_resume_one_process)
10554 (regsets_fetch_inferior_registers, linux_send_signal)
10555 (linux_read_auxv): Likewise. Update the types of variables holding
10556 PIDs. Update format string specifiers.
10557 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10558 * remote-utils.c (prepare_resume_reply): Likewise.
10559 * server.c (cont_thread, general_thread, step_thread)
10560 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10561 unsigned long.
10562 (handle_query): Update format specifiers.
10563 (handle_v_cont, main): Use strtoul for thread IDs.
10564 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10565 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10566 (general_thread, step_thread, thread_from_wait)
10567 (old_thread_from_wait): Update.
10568 * target.h (struct thread_resume): Use unsigned long for THREAD.
10569 (struct target_ops): Use unsigned long for arguments to attach and
10570 thread_alive.
10571
10572 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10573
10574 * acinclude.m4: Include bfd/bfd.m4 directly.
10575 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10576 <agriffis@toolchain.org>.
10577 * aclocal.m4, configure: Regenerated.
10578
10579 2005-01-07 Andrew Cagney <cagney@gnu.org>
10580
10581 * configure.ac: Rename configure.in, require autoconf 2.59.
10582 * configure: Re-generate.
10583
10584 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10585
10586 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10587 LIBS when finished.
10588 * aclocal.m4: Regenerated.
10589 * configure: Regenerated.
10590
10591 2004-11-21 Andreas Schwab <schwab@suse.de>
10592
10593 * linux-m68k-low.c (m68k_num_gregs): Define.
10594 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10595 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10596 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10597 (m68k_breakpoint_at): New. Add to the_low_target.
10598
10599 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10600 srv_linux_thread_db to yes.
10601
10602 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10603
10604 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10605 (ARCH_SET_FS): Likewise.
10606 (ARCH_GET_FS): Likewise.
10607 (ARCH_GET_GS): Likewise.
10608
10609 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10610
10611 * linux-i386-low.c (ps_get_thread_area): New.
10612 * linux-x86-64-low.c (ps_get_thread_area): New.
10613 * linux-low.c: Include <sys/syscall.h>.
10614 (linux_kill_one_process): Don't kill the first thread here.
10615 (linux_kill): Kill the first thread here.
10616 (kill_lwp): New function.
10617 (send_sigstop, linux_send_signal): Use it.
10618 * proc-service.c: Clean up #ifdefs.
10619 (fpregset_info): Delete.
10620 (ps_lgetregs): Update and enable implementation.
10621 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10622 implementations.
10623 * remote-utils.c (struct sym_cache, symbol_cache): New.
10624 (input_interrupt): Print a clearer message.
10625 (async_io_enabled): New variable.
10626 (enable_async_io, disable_async_io): Use it. Update comments.
10627 (look_up_one_symbol): Use the symbol cache.
10628 * thread-db.c (thread_db_look_up_symbols): New function.
10629 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10630
10631 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10632
10633 * configure.in: Test for -rdynamic.
10634 * configure: Regenerated.
10635 * Makefile (INTERNAL_LDFLAGS): New.
10636 (gdbserver, gdbreplay): Use it.
10637
10638 2004-09-02 Andrew Cagney <cagney@gnu.org>
10639
10640 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10641
10642 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10643
10644 * linux-low.c (linux_wait): Clear all_processes list also.
10645
10646 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10647
10648 * linux-low.c: Include <errno.h>. Remove extern declaration of
10649 errno.
10650
10651 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10652
10653 * gdbreplay.c, server.h, utils.c: Update copyright years.
10654
10655 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10656
10657 * server.c (main): Print child status or termination signal from
10658 variable 'signal', not 'sig'.
10659
10660 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10661
10662 * linux-low.c (linux_read_memory): Change return type to
10663 int. Check for and return error from ptrace().
10664 * target.c (read_inferior_memory): Change return type to int. Pass
10665 back return status from the_target->read_memory().
10666 * target.h (struct target_ops): Adapt *read_memory() prototype.
10667 Update comment.
10668 (read_inferior_memory): Adapt prototype.
10669 * server.c (main): Return an error packet if
10670 read_inferior_memory() returns an error.
10671
10672 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10673
10674 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10675 Unify with other clean targets.
10676
10677 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10678
10679 * server.c (handle_v_cont): Call set_desired_inferior.
10680
10681 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10682
10683 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10684
10685 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10686
10687 * linux-low.c (linux_wait): Unblock async I/O.
10688 (linux_resume): Block and enable async I/O.
10689 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10690 * server.h (block_async_io, unblock_async_io): Add prototypes.
10691
10692 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10693
10694 * remote-utils.c (remote_open): Print a status notice after
10695 opening a TCP port.
10696 * server.c (attach_inferior): Print a status notice after
10697 attaching.
10698
10699 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10700
10701 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10702
10703 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10704
10705 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10706 error packet.
10707 * server.c, target.h: Update copyright years.
10708
10709 2004-02-25 Roland McGrath <roland@redhat.com>
10710
10711 * target.h (struct target_ops): New member `read_auxv'.
10712 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10713 * linux-low.c (linux_read_auxv): New function.
10714 (linux_target_ops): Initialize `read_auxv' member to that.
10715
10716 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10717
10718 Committed by Jim Blandy <jimb@redhat.com>.
10719
10720 * linux-s390-low.c (s390_num_regs): Update.
10721 (s390_regmap): Remove control registers. Use __s390x__ predefine
10722 instead of GPR_SIZE to distiguish s390 and s390x targets.
10723
10724 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10725
10726 * linux-low.c: Update copyright year.
10727 (check_removed_breakpoint): Clear pending_is_breakpoint.
10728 (linux_set_resume_request, linux_queue_one_thread)
10729 (resume_status_pending_p): New functions.
10730 (linux_continue_one_thread): Use process->resume.
10731 (linux_resume): Only resume threads if there are no pending events.
10732 * linux-low.h (struct process_info): Add resume request
10733 pointer.
10734
10735 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10736
10737 * regcache.c (new_register_cache): Clear the allocated register
10738 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10739
10740 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10741
10742 * linux-low.c (linux_resume): Take a struct thread_resume *
10743 argument.
10744 (linux_wait): Update call.
10745 (resume_ptr): New static variable.
10746 (linux_continue_one_thread): Renamed from
10747 linux_continue_one_process. Use resume_ptr.
10748 (linux_resume): Use linux_continue_one_thread.
10749 * server.c (handle_v_cont, handle_v_requests): New functions.
10750 (myresume): New function.
10751 (main): Handle 'v' case.
10752 * target.h (struct thread_resume): New type.
10753 (struct target_ops): Change argument of "resume" to struct
10754 thread_resume *.
10755 (myresume): Delete macro.
10756
10757 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10758
10759 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10760 (uninstall): Support DESTDIR.
10761
10762 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10763
10764 * configure.srv: Add xscale*linux copy of arm*linux entry.
10765
10766 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10767
10768 * linux-arm-low.c (arm_reinsert_addr): New function.
10769 (the_low_target): Add arm_reinsert_addr.
10770
10771 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10772
10773 * mem-break.c: Remove whitespace at end of file.
10774
10775 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10776
10777 * configure.in: Check whether we need to prototype strerror.
10778 * server.h: Optionally prototype strerror.
10779 * gdbreplay.c (perror_with_name): Use strerror.
10780 * linux-low.c (linux_attach_lwp): Use strerror.
10781 * utils.c (perror_with_name): Use strerror.
10782 * config.in, configure: Regenerated.
10783
10784 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10785
10786 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10787 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10788
10789 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10790
10791 * Makefile.in (SFILES): Update.
10792 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10793 low-sun3.c: Remove files.
10794
10795 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10796
10797 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10798 (linux_detach_one_process, linux_detach): New functions.
10799 (linux_target_ops): Add linux_detach.
10800 * server.c (main): Handle 'D' packet.
10801 * target.h (struct target_ops): Add "detach" member.
10802 (detach_inferior): Define.
10803
10804 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10805
10806 From Kelley Cook <kelleycook@wideopenwest.com>:
10807 * configure.srv: Accept i[34567]86 variants.
10808
10809 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10810
10811 * linux-low.c (linux_wait_for_event): Correct comment typos.
10812 (linux_resume_one_process): Call check_removed_breakpoint.
10813 (linux_send_signal): New function.
10814 (linux_target_ops): Add linux_send_signal.
10815 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10816 of kill.
10817 * target.h (struct target_ops): Add send_signal.
10818
10819 2003-05-29 Jim Blandy <jimb@redhat.com>
10820
10821 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10822 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10823 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10824 away part of the register's value.
10825
10826 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10827
10828 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10829 (linux_wait_for_event, linux_init_signals): Likewise.
10830
10831 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10832
10833 * configure.in: Check for stdlib.h.
10834 * configure: Regenerated.
10835 * config.in: Regenerated.
10836
10837 2003-01-04 Andreas Schwab <schwab@suse.de>
10838
10839 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10840
10841 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10842
10843 * Makefile.in: Remove obsolete code.
10844
10845 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10846
10847 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10848 defined(PT_FPR0_HI).
10849
10850 2002-11-17 Stuart Hughes <seh@zee2.com>
10851
10852 * linux-arm-low.c (arm_num_regs): Increase.
10853 (arm_regmap): Include status register.
10854
10855 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10856
10857 * linux-low.c (register_addr): Remove incorrect -1 check.
10858
10859 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10860
10861 * linux-low.c (linux_create_inferior): Call setpgid. Return
10862 the new PID.
10863 (unstopped_p, linux_signal_pid): Remove.
10864 (linux_target_ops): Remove linux_signal_pid.
10865 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10866 global instead of target method.
10867 * target.h (struct target_ops): Remove signal_pid. Update comment
10868 for create_inferior.
10869 * server.c (signal_pid): New variable.
10870 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10871 gdbserver. Set the child to be the foreground process group.
10872 (attach_inferior): Set signal_pid.
10873
10874 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10875
10876 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10877
10878 2002-08-20 Jim Blandy <jimb@redhat.com>
10879
10880 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10881 default for this.
10882
10883 2002-08-01 Andrew Cagney <cagney@redhat.com>
10884
10885 * Makefile.in: Make chill references obsolete.
10886
10887 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10888
10889 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10890 * configure: Regenerate.
10891 * config.in: Regenerate.
10892
10893 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10894
10895 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10896 (perror_with_name, remote_close, remote_open, expect, play): Static.
10897
10898 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10899
10900 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10901 byte offsets instead of an array of indexes.
10902 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10903
10904 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10905
10906 * regcache.c: Add comment.
10907
10908 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10909
10910 * thread-db.c: New file.
10911 * proc-service.c: New file.
10912 * acinclude.m4: New file.
10913 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10914 proc-service.o, and thread-db.o.
10915 (linux-low.o): Add USE_THREAD_DB.
10916 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10917 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10918 * aclocal.m4: Regenerated.
10919 * config.in: Regenerated.
10920 * configure: Regenerated.
10921 * configure.in: Check for proc_service.h, sys/procfs.h,
10922 thread_db.h, and linux/elf.h headrs.
10923 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10924 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10925 Check for -lthread_db and thread support.
10926 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10927 PowerPC, and SuperH.
10928 * i387-fp.c: Constify arguments.
10929 * i387-fp.h: Likewise.
10930 * inferiors.c: (struct thread_info): Renamed from
10931 `struct inferior_info'. Remove PID member. Use generic inferior
10932 list header. All uses updated.
10933 (inferiors, signal_pid): Removed.
10934 (all_threads): New variable.
10935 (get_thread): Define.
10936 (add_inferior_to_list): New function.
10937 (for_each_inferior): New function.
10938 (change_inferior_id): New function.
10939 (add_inferior): Removed.
10940 (remove_inferior): New function.
10941 (add_thread): New function.
10942 (free_one_thread): New function.
10943 (remove_thread): New function.
10944 (clear_inferiors): Use for_each_inferior and free_one_thread.
10945 (find_inferior): New function.
10946 (find_inferior_id): New function.
10947 (inferior_target_data): Update argument type.
10948 (set_inferior_target_data): Likewise.
10949 (inferior_regcache_data): Likewise.
10950 (set_inferior_regcache_data): Likewise.
10951 * linux-low.c (linux_bp_reinsert): Remove.
10952 (all_processes, stopping_threads, using_thrads)
10953 (struct pending_signals, debug_threads, pid_of): New.
10954 (inferior_pid): Replace with macro.
10955 (struct inferior_linux_data): Remove.
10956 (get_stop_pc, add_process): New functions.
10957 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10958 Use add_process and add_thread.
10959 (linux_attach_lwp): New function, based on old linux_attach. Use
10960 add_process and add_thread. Set stop_expected for new threads.
10961 (linux_attach): New function.
10962 (linux_kill_one_process): New function.
10963 (linux_kill): Kill all LWPs.
10964 (linux_thread_alive): Use find_inferior_id.
10965 (check_removed_breakpoints, status_pending_p): New functions.
10966 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10967 Update. Use WNOHANG. Wait for cloned processes also. Update process
10968 struct for the found process.
10969 (linux_wait_for_event): New function.
10970 (linux_wait): Use it. Support LWPs.
10971 (send_sigstop, wait_for_sigstop, stop_all_processes)
10972 (linux_resume_one_process, linux_continue_one_process): New functions.
10973 (linux_resume): Support LWPs.
10974 (REGISTER_RAW_SIZE): Remove.
10975 (fetch_register): Use register_size instead. Call supply_register.
10976 (usr_store_inferior_registers): Likewise. Call collect_register.
10977 Fix recursive case.
10978 (regsets_fetch_inferior_registers): Improve error message.
10979 (regsets_store_inferior_registers): Add debugging.
10980 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10981 (unstopped_p, linux_signal_pid): New functions.
10982 (linux_target_ops): Add linux_signal_pid.
10983 (linux_init_signals): New function.
10984 (initialize_low): Call it. Initialize using_threads.
10985 * regcache.c (inferior_regcache_data): Add valid
10986 flag.
10987 (get_regcache): Fetch registers lazily. Add fetch argument
10988 and update all callers.
10989 (regcache_invalidate_one, regcache_invalidate): New
10990 functions.
10991 (new_register_cache): Renamed from create_register_cache.
10992 Return the new regcache.
10993 (free_register_cache): Change argument to a void *.
10994 (registers_to_string, registers_from_string): Call get_regcache
10995 with fetch flag set.
10996 (register_data): Make static. Pass fetch flag to get_regcache.
10997 (supply_register): Call get_regcache with fetch flag clear.
10998 (collect_register): Call get_regcache with fetch flag set.
10999 (collect_register_as_string): New function.
11000 * regcache.h: Update.
11001 * remote-utils.c (putpkt): Flush after debug output and use
11002 stderr.
11003 Handle input interrupts while waiting for an ACK.
11004 (input_interrupt): Use signal_pid method.
11005 (getpkt): Flush after debug output and use stderr.
11006 (outreg): Use collect_register_as_string.
11007 (new_thread_notify, dead_thread_notify): New functions.
11008 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11009 and general_thread.
11010 (look_up_one_symbol): Flush after debug output.
11011 * server.c (step_thread, server_waiting): New variables.
11012 (start_inferior): Don't use signal_pid. Update call to mywait.
11013 (attach_inferior): Update call to mywait.
11014 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11015 (main): Don't fetch/store registers explicitly. Use
11016 set_desired_inferior. Support proposed ``Hs'' packet. Update
11017 calls to mywait.
11018 * server.h: Update.
11019 (struct inferior_list, struct_inferior_list_entry): New.
11020 * target.c (set_desired_inferior): New.
11021 (write_inferior_memory): Constify.
11022 (mywait): New function.
11023 * target.h: Update.
11024 (struct target_ops): New signal_pid method.
11025 (mywait): Removed macro, added prototype.
11026
11027 * linux-low.h (regset_func): Removed.
11028 (regset_fill_func, regset_store_func): New.
11029 (enum regset_type): New.
11030 (struct regset_info): Add type field. Use new operation types.
11031 (struct linux_target_ops): stop_pc renamed to get_pc.
11032 Add decr_pc_after_break and breakpoint_at.
11033 (get_process, get_thread_proess, get_process_thread)
11034 (strut process_info, all_processes, linux_attach_lwp)
11035 (thread_db_init): New.
11036
11037 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11038 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11039 (the_low_target): Add new members.
11040 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11041 (i386_store_fpxregset): Constify.
11042 (target_regsets): Add new kind identifier.
11043 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11044 (i386_set_pc): Add debugging.
11045 (i386_breakpoint_at): New function.
11046 (the_low_target): Add new members.
11047 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11048 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11049 (mips_breakpoint_at): New.
11050 (the_low_target): Add new members.
11051 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11052 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11053 (the_low_target): Add new members.
11054 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11055 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11056 (the_low_target): Add new members.
11057 * linux-x86-64-low.c (target_regsets): Add new kind
11058 identifier.
11059
11060 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11061
11062 From Martin Pool <mbp@samba.org>:
11063 * server.c (gdbserver_usage): New function.
11064 (main): Call it.
11065
11066 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11067
11068 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11069 stop_at -> stop_pc.
11070
11071 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11072
11073 * Makefile.in: Remove obsolete code.
11074
11075 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11076
11077 * linux-low.c (regsets_fetch_inferior_registers),
11078 (regsets_store_inferior_registers): Removed cast to int from
11079 ptrace() calls.
11080 * regcache.h: Added declaration of struct inferior_info.
11081
11082 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11083
11084 * inferiors.c (struct inferior_info): Add regcache_data.
11085 (add_inferior): Call create_register_cache.
11086 (clear_inferiors): Call free_register_cache.
11087 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11088 * regcache.c (struct inferior_regcache_data): New.
11089 (registers): Remove.
11090 (get_regcache): New function.
11091 (create_register_cache, free_register_cache): New functions.
11092 (set_register_cache): Don't initialize the register cache here.
11093 (registers_to_string, registers_from_string, register_data): Call
11094 get_regcache.
11095 * regcache.h: Add prototypes.
11096 * server.h: Likewise.
11097
11098 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11099
11100 * mem-break.c: New file.
11101 * mem-break.h: New file.
11102 * Makefile.in: Add mem-break.o rule; update server.h
11103 dependencies.
11104 * inferiors.c (struct inferior_info): Add target_data
11105 member.
11106 (clear_inferiors): Free target_data member if set.
11107 (inferior_target_data, set_inferior_target_data): New functions.
11108 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11109 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11110 * linux-low.c (linux_bp_reinsert): New variable.
11111 (struct inferior_linux_data): New.
11112 (linux_create_inferior): Use set_inferior_target_data.
11113 (linux_attach): Likewise. Call add_inferior.
11114 (linux_wait_for_one_inferior): New function.
11115 (linux_wait): Call it.
11116 (linux_write_memory): Add const.
11117 (initialize_low): Call set_breakpoint_data.
11118 * linux-low.h (struct linux_target_ops): Add breakpoint
11119 handling members.
11120 * server.c (attach_inferior): Remove extra add_inferior
11121 call.
11122 * server.h: Include mem-break.h. Update inferior.c
11123 prototypes.
11124 * target.c (read_inferior_memory)
11125 (write_inferior_memory): New functions.
11126 * target.h (read_inferior_memory)
11127 (write_inferior_memory): Change macros to prototypes.
11128 (struct target_ops): Update comments. Add const to write_memory
11129 definition.
11130
11131 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11132
11133 * linux-low.c (usr_store_inferior_registers): Support
11134 registers which are allowed to fail to store.
11135 * linux-low.h (linux_target_ops): Likewise.
11136 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11137 (ppc_cannot_store_register): FPSCR may not be storable.
11138
11139 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11140
11141 * server.h: Include <string.h> if HAVE_STRING_H.
11142 * ChangeLog: Correct paths in last ChangeLog entry.
11143
11144 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11145
11146 * linux-low.h: Remove obsolete prototypes.
11147 (struct linux_target_ops): New.
11148 (extern the_low_target): New.
11149 * linux-low.c (num_regs, regmap): Remove declarations.
11150 (register_addr): Use the_low_target explicitly.
11151 (fetch_register): Likewise.
11152 (usr_fetch_inferior_registers): Likewise.
11153 (usr_store_inferior_registers): Likewise.
11154 * linux-arm-low.c (num_regs): Remove.
11155 (arm_num_regs): Define.
11156 (arm_regmap): Renamed from regmap, made static.
11157 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11158 made static.
11159 (arm_cannot_store_register): Renamed from cannot_store_register,
11160 made static.
11161 (the_low_target): New.
11162 * linux-i386-low.c (num_regs): Remove.
11163 (i386_num_regs): Define.
11164 (i386_regmap): Renamed from regmap, made static.
11165 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11166 made static.
11167 (i386_cannot_store_register): Renamed from cannot_store_register,
11168 made static.
11169 (the_low_target): New.
11170 * linux-ia64-low.c (num_regs): Remove.
11171 (ia64_num_regs): Define.
11172 (ia64_regmap): Renamed from regmap, made static.
11173 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11174 made static.
11175 (ia64_cannot_store_register): Renamed from cannot_store_register,
11176 made static.
11177 (the_low_target): New.
11178 * linux-m68k-low.c (num_regs): Remove.
11179 (m68k_num_regs): Define.
11180 (m68k_regmap): Renamed from regmap, made static.
11181 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11182 made static.
11183 (m68k_cannot_store_register): Renamed from cannot_store_register,
11184 made static.
11185 (the_low_target): New.
11186 * linux-mips-low.c (num_regs): Remove.
11187 (mips_num_regs): Define.
11188 (mips_regmap): Renamed from regmap, made static.
11189 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11190 made static.
11191 (mips_cannot_store_register): Renamed from cannot_store_register,
11192 made static.
11193 (the_low_target): New.
11194 * linux-ppc-low.c (num_regs): Remove.
11195 (ppc_num_regs): Define.
11196 (ppc_regmap): Renamed from regmap, made static.
11197 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11198 made static.
11199 (ppc_cannot_store_register): Renamed from cannot_store_register,
11200 made static.
11201 (the_low_target): New.
11202 * linux-s390-low.c (num_regs): Remove.
11203 (s390_num_regs): Define.
11204 (s390_regmap): Renamed from regmap, made static.
11205 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11206 made static.
11207 (s390_cannot_store_register): Renamed from cannot_store_register,
11208 made static.
11209 (the_low_target): New.
11210 * linux-sh-low.c (num_regs): Remove.
11211 (sh_num_regs): Define.
11212 (sh_regmap): Renamed from regmap, made static.
11213 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11214 made static.
11215 (sh_cannot_store_register): Renamed from cannot_store_register,
11216 made static.
11217 (the_low_target): New.
11218 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11219 (the_low_target): New.
11220
11221 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11222
11223 * Makefile.in: Add stamp-h target.
11224 * configure.in: Create stamp-h.
11225 * configure: Regenerated.
11226
11227 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11228
11229 * inferiors.c: New file.
11230 * target.c: New file.
11231 * target.h: New file.
11232 * Makefile.in: Add target.o and inferiors.o. Update
11233 dependencies.
11234 * linux-low.c (inferior_pid): New static variable,
11235 moved from server.c.
11236 (linux_create_inferior): Renamed from create_inferior.
11237 Call add_inferior. Return 0 on success instead of a PID.
11238 (linux_attach): Renamed from myattach.
11239 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11240 (linux_thread_alive): Renamed from mythread_alive.
11241 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11242 child dies.
11243 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11244 (regsets_store_inferior_registers): Correct error message.
11245 Add missing ``return 0''.
11246 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11247 (linux_store_registers): Renamed from store_inferior_registers.
11248 (linux_read_memory): Renamed from read_inferior_memory.
11249 (linux_write_memory): Renamed from write_inferior_memory.
11250 (linux_target_ops): New structure.
11251 (initialize_low): Call set_target_ops ().
11252 * remote-utils.c (unhexify): New function.
11253 (hexify): New function.
11254 (input_interrupt): Send signals to ``signal_pid''.
11255 * server.c (inferior_pid): Remove.
11256 (start_inferior): Update create_inferior call.
11257 (attach_inferior): Call add_inferior.
11258 (handle_query): New function.
11259 (main): Call handle_query for `q' packets.
11260 * server.h: Include "target.h". Remove obsolete prototypes.
11261 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11262
11263 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11264
11265 * Makefile.in: Add WARN_CFLAGS. Update configury
11266 dependencies.
11267 * configure.in: Check for <string.h>
11268 * configure: Regenerate.
11269 * config.in: Regenerate.
11270 * gdbreplay.c: Include needed system headers.
11271 (remote_open): Remove strchr prototype.
11272 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11273 * regcache.c (supply_register): Change buf argument to const void *.
11274 (supply_register_by_name): Likewise.
11275 (collect_register): Change buf argument to void *.
11276 (collect_register_by_name): Likewise.
11277 * regcache.h: Add missing prototypes.
11278 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11279 * server.c (handle_query): New function.
11280 (attached): New static variable, moved out of main.
11281 (main): Quiet longjmp clobber warnings.
11282 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11283 * utils.c (error): Remove NORETURN.
11284 (fatal): Likewise.
This page took 0.294766 seconds and 4 git commands to generate.