Extended-remote follow vfork
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-05-12 Don Breazeal <donb@codesourcery.com>
2
3 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4 PTRACE_EVENT_VFORK_DONE.
5 (linux_low_ptrace_options, extended_event_reported): Add vfork
6 events.
7 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8 and "vforkdone" for RSP 'T' Stop Reply Packet.
9 * server.h (report_vfork_events): Declare
10 global variable.
11
12 2015-05-12 Don Breazeal <donb@codesourcery.com>
13
14 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
15 (the_low_target) <new_fork>: Initialize new member.
16 * linux-arm-low.c (arm_new_fork): New function.
17 (the_low_target) <new_fork>: Initialize new member.
18 * linux-low.c (handle_extended_wait): Call new target function
19 new_fork.
20 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
21 * linux-mips-low.c (mips_add_watchpoint): New function
22 extracted from mips_insert_point.
23 (the_low_target) <new_fork>: Initialize new member.
24 (mips_linux_new_fork): New function.
25 (mips_insert_point): Call mips_add_watchpoint.
26 * linux-x86-low.c (x86_linux_new_fork): New function.
27 (the_low_target) <new_fork>: Initialize new member.
28
29 2015-05-12 Don Breazeal <donb@codesourcery.com>
30
31 * linux-low.c (handle_extended_wait): Implement return value,
32 rename argument 'event_child' to 'event_lwp', handle
33 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
34 (linux_low_ptrace_options): New function.
35 (linux_low_filter_event): Call linux_low_ptrace_options,
36 use different argument fo linux_enable_event_reporting,
37 use return value from handle_extended_wait.
38 (extended_event_reported): New function.
39 (linux_wait_1): Call extended_event_reported and set
40 status to report fork events.
41 (linux_write_memory): Add pid to debug message.
42 (reset_lwp_ptrace_options_callback): New function.
43 (linux_handle_new_gdb_connection): New function.
44 (linux_target_ops): Initialize new structure member.
45 * linux-low.h (struct lwp_info) <waitstatus>: New member.
46 * lynx-low.c: Initialize new structure member.
47 * remote-utils.c (prepare_resume_reply): Implement stop reason
48 "fork" for "T" stop message.
49 * server.c (handle_query): Call handle_new_gdb_connection.
50 * server.h (report_fork_events): Declare global flag.
51 * target.h (struct target_ops) <handle_new_gdb_connection>:
52 New member.
53 (target_handle_new_gdb_connection): New macro.
54 * win32-low.c: Initialize new structure member.
55
56 2015-05-12 Don Breazeal <donb@codesourcery.com>
57
58 * mem-break.c (APPEND_TO_LIST): Define macro.
59 (clone_agent_expr): New function.
60 (clone_one_breakpoint): New function.
61 (clone_all_breakpoints): New function.
62 * mem-break.h: Declare new functions.
63
64 2015-05-12 Don Breazeal <donb@codesourcery.com>
65
66 * linux-low.c (linux_supports_fork_events): New function.
67 (linux_supports_vfork_events): New function.
68 (linux_target_ops): Initialize new structure members.
69 (initialize_low): Call linux_check_ptrace_features.
70 * lynx-low.c (lynx_target_ops): Initialize new structure
71 members.
72 * server.c (report_fork_events, report_vfork_events):
73 New global flags.
74 (handle_query): Add new features to qSupported packet and
75 response.
76 (captured_main): Initialize new global variables.
77 * target.h (struct target_ops) <supports_fork_events>:
78 New member.
79 <supports_vfork_events>: New member.
80 (target_supports_fork_events): New macro.
81 (target_supports_vfork_events): New macro.
82 * win32-low.c (win32_target_ops): Initialize new structure
83 members.
84
85 2015-05-12 Gary Benson <gbenson@redhat.com>
86
87 * server.c (handle_qxfer_exec_file): Use current process
88 if annex is empty.
89
90 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
91
92 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
93 Remove HAVE_PTRACE_GETREGS conditionals.
94 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
95 instead of PTRACE_GETREGS and PTRACE_SETREGS.
96
97 2015-05-08 Yao Qi <yao.qi@linaro.org>
98
99 * linux-low.c (linux_supports_conditional_breakpoints): New
100 function.
101 (linux_target_ops): Install new target method.
102 * lynx-low.c (lynx_target_ops): Install NULL hook for
103 supports_conditional_breakpoints.
104 * nto-low.c (nto_target_ops): Likewise.
105 * spu-low.c (spu_target_ops): Likewise.
106 * win32-low.c (win32_target_ops): Likewise.
107 * server.c (handle_query): Check
108 target_supports_conditional_breakpoints.
109 * target.h (struct target_ops) <supports_conditional_breakpoints>:
110 New field.
111 (target_supports_conditional_breakpoints): New macro.
112
113 2015-05-06 Pedro Alves <palves@redhat.com>
114
115 PR server/18081
116 * server.c (start_inferior): If the process exits, mourn it.
117
118 2015-04-21 Gary Benson <gbenson@redhat.com>
119
120 * hostio.c (fileio_open_flags_to_host): Factored out to
121 fileio_to_host_openflags in common/fileio.c. Single use
122 updated.
123
124 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
125
126 * linux-xtensa-low.c (xtensa_fill_gregset)
127 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
128 XCHAL_HAVE_LOOP.
129
130 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
131
132 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
133 (regs_info): Replace usrregs pointer with NULL.
134
135 2015-04-17 Gary Benson <gbenson@redhat.com>
136
137 * target.h (struct target_ops) <pid_to_exec_file>: New field.
138 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
139 * server.c (handle_qxfer_exec_file): New function.
140 (qxfer_packets): Add exec-file entry.
141 (handle_query): Report qXfer:exec-file:read as supported packet.
142
143 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
144
145 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
146
147 2015-04-09 Gary Benson <gbenson@redhat.com>
148
149 * hostio-errno.c (errno_to_fileio_error): Remove function.
150 Update caller to use remote_fileio_to_fio_error.
151
152 2015-04-09 Yao Qi <yao.qi@linaro.org>
153
154 * linux-low.c (linux_insert_point): Call
155 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
156 (linux_remove_point): Call remove_memory_breakpoint if type is
157 raw_bkpt_type_sw.
158 * linux-x86-low.c (x86_insert_point): Don't call
159 insert_memory_breakpoint.
160 (x86_remove_point): Don't call remove_memory_breakpoint.
161
162 2015-04-01 Pedro Alves <palves@redhat.com>
163 Cleber Rosa <crosa@redhat.com>
164
165 * server.c (gdbserver_usage): Reorganize and extend the usage
166 message.
167
168 2015-03-24 Pedro Alves <palves@redhat.com>
169
170 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
171 output. Also dump TRAP_TRACE.
172 (linux_low_filter_event): In debug output, distinguish a
173 resume_stop SIGSTOP from a delayed SIGSTOP.
174
175 2015-03-24 Gary Benson <gbenson@redhat.com>
176
177 * linux-x86-low.c (x86_linux_new_thread): Moved to
178 nat/x86-linux.c.
179 (x86_linux_prepare_to_resume): Likewise.
180
181 2015-03-24 Gary Benson <gbenson@redhat.com>
182
183 * Makefile.in (x86-linux-dregs.o): New rule.
184 * configure.srv: Add x86-linux-dregs.o to relevant targets.
185 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
186 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
187 (x86_linux_dr_get): Likewise.
188 (x86_linux_dr_set): Likewise.
189 (update_debug_registers_callback): Likewise.
190 (x86_linux_dr_set_addr): Likewise.
191 (x86_linux_dr_get_addr): Likewise.
192 (x86_linux_dr_set_control): Likewise.
193 (x86_linux_dr_get_control): Likewise.
194 (x86_linux_dr_get_status): Likewise.
195 (x86_linux_update_debug_registers): Likewise.
196
197 2015-03-24 Gary Benson <gbenson@redhat.com>
198
199 * linux-x86-low.c (x86_linux_update_debug_registers):
200 New function, factored out from...
201 (x86_linux_prepare_to_resume): ...this.
202
203 2015-03-24 Gary Benson <gbenson@redhat.com>
204
205 * linux-x86-low.c (x86_linux_dr_get): Update comments.
206 (x86_linux_dr_set): Likewise.
207 (update_debug_registers_callback): Likewise.
208 (x86_linux_dr_set_addr): Likewise.
209 (x86_linux_dr_get_addr): Likewise.
210 (x86_linux_dr_set_control): Likewise.
211 (x86_linux_dr_get_control): Likewise.
212 (x86_linux_dr_get_status): Likewise.
213 (x86_linux_prepare_to_resume): Likewise.
214
215 2015-03-24 Gary Benson <gbenson@redhat.com>
216
217 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
218 Use perror_with_name. Pass string through gettext.
219 (x86_linux_dr_set): Likewise.
220
221 2015-03-24 Gary Benson <gbenson@redhat.com>
222
223 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
224 (x86_linux_dr_set_addr): ...this.
225 (x86_dr_low_get_addr): Rename to...
226 (x86_linux_dr_get_addr): ...this.
227 (x86_dr_low_set_control): Rename to...
228 (x86_linux_dr_set_control): ...this.
229 (x86_dr_low_get_control): Rename to...
230 (x86_linux_dr_get_control): ...this.
231 (x86_dr_low_get_status): Rename to...
232 (x86_linux_dr_get_status): ...this.
233 (x86_dr_low): Update with new function names.
234
235 2015-03-24 Gary Benson <gbenson@redhat.com>
236
237 * Makefile.in (x86-linux.o): New rule.
238 * configure.srv: Add x86-linux.o to relevant targets.
239 * linux-low.c (lwp_set_arch_private_info): New function.
240 (lwp_arch_private_info): Likewise.
241 * linux-x86-low.c: Include nat/x86-linux.h.
242 (arch_lwp_info): Removed structure.
243 (update_debug_registers_callback):
244 Use lwp_set_debug_registers_changed.
245 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
246 and lwp_set_debug_registers_changed.
247 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
248
249 2015-03-24 Gary Benson <gbenson@redhat.com>
250
251 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
252 * linux-arm-low.c (arm_new_thread): Likewise.
253 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
254 * linux-mips-low.c (mips_linux_new_thread): Likewise.
255 * linux-x86-low.c (x86_linux_new_thread): Likewise.
256 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
257
258 2015-03-24 Gary Benson <gbenson@redhat.com>
259
260 * linux-low.c (ptid_of_lwp): New function.
261 (lwp_is_stopped): Likewise.
262 (lwp_stop_reason): Likewise.
263 * linux-x86-low.c (update_debug_registers_callback):
264 Use lwp_is_stopped.
265 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
266 lwp_stop_reason.
267
268 2015-03-24 Gary Benson <gbenson@redhat.com>
269
270 * linux-low.h (linux_stop_lwp): Remove declaration.
271
272 2015-03-24 Gary Benson <gbenson@redhat.com>
273
274 * linux-low.h: Include nat/linux-nat.h.
275 * linux-low.c (iterate_over_lwps_args): New structure.
276 (iterate_over_lwps_filter): New function.
277 (iterate_over_lwps): Likewise.
278 * linux-x86-low.c (update_debug_registers_callback):
279 Update signature to what iterate_over_lwps expects.
280 Remove PID check that iterate_over_lwps now performs.
281 (x86_dr_low_set_addr): Use iterate_over_lwps.
282 (x86_dr_low_set_control): Likewise.
283
284 2015-03-24 Gary Benson <gbenson@redhat.com>
285
286 * linux-x86-low.c (x86_debug_reg_state): New function.
287 (x86_linux_prepare_to_resume): Use the above.
288
289 2015-03-24 Gary Benson <gbenson@redhat.com>
290
291 * linux-low.c (current_lwp_ptid): New function.
292 * linux-x86-low.c: Include nat/linux-nat.h.
293 (x86_dr_low_get_addr): Use current_lwp_ptid.
294 (x86_dr_low_get_control): Likewise.
295 (x86_dr_low_get_status): Likewise.
296
297 2015-03-20 Pedro Alves <palves@redhat.com>
298
299 * tracepoint.c (cmd_qtstatus): Make "str" const.
300
301 2015-03-20 Pedro Alves <palves@redhat.com>
302
303 * server.c (handle_general_set): Make "req_str" const.
304
305 2015-03-19 Pedro Alves <palves@redhat.com>
306
307 * linux-low.c (linux_resume_one_lwp): Rename to ...
308 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
309 instead call perror_with_name.
310 (check_ptrace_stopped_lwp_gone): New function.
311 (linux_resume_one_lwp): Reimplement as wrapper around
312 linux_resume_one_lwp_throw that swallows errors if the LWP is
313 gone.
314
315 2015-03-19 Pedro Alves <palves@redhat.com>
316
317 * linux-low.c (count_events_callback, select_event_lwp_callback):
318 No longer check whether the thread has resume_stop as last resume
319 kind.
320
321 2015-03-19 Pedro Alves <palves@redhat.com>
322
323 * linux-low.c (count_events_callback, select_event_lwp_callback):
324 Use the lwp's status_pending_p field, not the thread's.
325
326 2015-03-19 Pedro Alves <palves@redhat.com>
327
328 * linux-low.c (select_event_lwp_callback): Update comments to
329 no longer mention SIGTRAP.
330
331 2015-03-18 Gary Benson <gbenson@redhat.com>
332
333 * server.c (handle_query): Do not report vFile:fstat as supported.
334
335 2015-03-11 Gary Benson <gbenson@redhat.com>
336
337 * hostio.c (sys/types.h): New include.
338 (sys/stat.h): Likewise.
339 (common-remote-fileio.h): Likewise.
340 (handle_fstat): New function.
341 (handle_vFile): Handle vFile:fstat packets.
342
343 2015-03-11 Gary Benson <gbenson@redhat.com>
344
345 * configure.ac (AC_CHECK_MEMBERS): Add checks for
346 struct stat.st_blocks and struct stat.st_blksize.
347 * configure: Regenerate.
348 * config.in: Likewise.
349 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
350 (OBS): Add common-remote-fileio.o.
351 (common-remote-fileio.o): New rule.
352
353 2015-03-09 Pedro Alves <palves@redhat.com>
354
355 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
356 'struct sockaddr' pointer in 'accept' call.
357
358 2015-03-09 Pedro Alves <palves@redhat.com>
359
360 Revert:
361 2015-03-07 Pedro Alves <palves@redhat.com>
362 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
363 or <winsock2.h> here. Instead include "gdb_socket.h".
364 (remote_open): Use union gdb_sockaddr_u.
365 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
366 or <winsock2.h> here. Instead include "gdb_socket.h".
367 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
368 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
369 or <sys/un.h>.
370 (init_named_socket, gdb_agent_helper_thread): Use union
371 gdb_sockaddr_u.
372
373 2015-03-07 Pedro Alves <palves@redhat.com>
374
375 * configure.ac (build_warnings): Move
376 -Wdeclaration-after-statement to the C-specific set.
377 * configure: Regenerate.
378
379 2015-03-07 Pedro Alves <palves@redhat.com>
380
381 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
382 or <winsock2.h> here. Instead include "gdb_socket.h".
383 (remote_open): Use union gdb_sockaddr_u.
384 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
385 or <winsock2.h> here. Instead include "gdb_socket.h".
386 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
387 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
388 or <sys/un.h>.
389 (init_named_socket, gdb_agent_helper_thread): Use union
390 gdb_sockaddr_u.
391
392 2015-03-07 Pedro Alves <palves@redhat.com>
393
394 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
395 instead.
396
397 2015-03-06 Yao Qi <yao.qi@linaro.org>
398
399 * linux-aarch64-low.c (aarch64_insert_point): Use
400 show_debug_regs as a boolean.
401 (aarch64_remove_point): Likewise.
402
403 2015-03-05 Pedro Alves <palves@redhat.com>
404
405 * lynx-low.c (lynx_target_ops): Install NULL hooks for
406 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
407 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
408 * nto-low.c (nto_target_ops): Likewise.
409 * spu-low.c (spu_target_ops): Likewise.
410 * win32-low.c (win32_target_ops): Likewise.
411
412 2015-03-04 Pedro Alves <palves@redhat.com>
413
414 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
415 Decide whether a breakpoint triggered based on the SIGTRAP's
416 siginfo.si_code.
417 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
418 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
419 (linux_low_filter_event): Check for breakpoints before checking
420 watchpoints.
421 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
422 siginfo.si_code.
423 (linux_stopped_by_sw_breakpoint)
424 (linux_supports_stopped_by_sw_breakpoint)
425 (linux_stopped_by_hw_breakpoint)
426 (linux_supports_stopped_by_hw_breakpoint): New functions.
427 (linux_target_ops): Install new target methods.
428
429 2015-03-04 Pedro Alves <palves@redhat.com>
430
431 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
432 * server.c (swbreak_feature, hwbreak_feature): New globals.
433 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
434 (captured_main): Clear swbreak_feature and hwbreak_feature.
435 * server.h (swbreak_feature, hwbreak_feature): Declare.
436 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
437 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
438 supports_stopped_by_hw_breakpoint>: New fields.
439 (target_supports_stopped_by_sw_breakpoint)
440 (target_stopped_by_sw_breakpoint)
441 (target_supports_stopped_by_hw_breakpoint)
442 (target_stopped_by_hw_breakpoint): Declare.
443
444 2015-03-04 Pedro Alves <palves@redhat.com>
445
446 enum lwp_stop_reason -> enum target_stop_reason
447 * linux-low.c (check_stopped_by_breakpoint): Adjust.
448 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
449 (linux_wait_1, stuck_in_jump_pad_callback)
450 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
451 (linux_stopped_by_watchpoint):
452 * linux-low.h (enum lwp_stop_reason): Delete.
453 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
454 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
455
456 2015-03-04 Yao Qi <yao.qi@linaro.org>
457
458 * Makefile.in (SFILES): Add linux-aarch64-low.c.
459
460 2015-03-03 Gary Benson <gbenson@redhat.com>
461
462 * hostio.c (handle_vFile): Fix prefix lengths.
463
464 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
465
466 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
467 ptr_bits.
468
469 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
470
471 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
472 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
473 (clean): Add "rm -f" for above C files.
474 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
475 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
476 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
477 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
478 * linux-s390-low.c (HWCAP_S390_VX): New macro.
479 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
480 (init_registers_s390x_vx_linux64)
481 (init_registers_s390x_tevx_linux64)
482 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
483 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
484 declarations.
485 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
486 (s390_store_vxrs_high): New functions.
487 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
488 NT_S390_VXRS_HIGH.
489 (s390_arch_setup): Add logic for selecting one of the new target
490 descriptions. Activate the new vector regsets if applicable.
491 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
492 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
493 and init_registers_s390x_tevx_linux64.
494
495 2015-03-01 Pedro Alves <palves@redhat.com>
496
497 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
498 parameter.
499
500 2015-02-27 Pedro Alves <palves@redhat.com>
501
502 * linux-x86-low.c (u_debugreg_offset): New function.
503 (x86_linux_dr_get, x86_linux_dr_set): Use it.
504
505 2015-02-27 Pedro Alves <palves@redhat.com>
506
507 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
508 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
509 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
510 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
511 (ps_lsetfpregs, ps_getpid)
512 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
513 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
514 (ps_lsetxregs, ps_plog): Declare.
515
516 2015-02-27 Pedro Alves <palves@redhat.com>
517
518 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
519 IP_AGENT_EXPORT_FUNC.
520 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
521 IP_AGENT_EXPORT_FUNC.
522 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
523 (IP_AGENT_EXPORT): Delete.
524 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
525 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
526 (gdb_trampoline_buffer_error, collecting, gdb_collect)
527 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
528 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
529 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
530 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
531 (traceframe_read_count, traceframe_write_count)
532 (traceframes_created, trace_state_variables, get_raw_reg)
533 (get_trace_state_variable_value, set_trace_state_variable_value)
534 (ust_loaded, helper_thread_id, cmd_buf): Use
535 IPA_SYM_EXPORTED_NAME.
536 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
537 (tracepoints) Use IP_AGENT_EXPORT_VAR.
538 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
539 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
540 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
541 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
542 EXTERN_C_PUSH/EXTERN_C_POP.
543 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
544 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
545 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
546 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
547 (traceframe_write_count, traceframe_read_count)
548 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
549 (about_to_request_buffer_space, get_trace_state_variable_value)
550 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
551 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
552 EXTERN_C_PUSH/EXTERN_C_POP.
553 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
554 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
555 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
556 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
557 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
558 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
559 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
560 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
561 Define.
562 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
563 (IP_AGENT_EXPORT_VAR_DECL): Define.
564 (tracing): Declare.
565 (gdb_agent_get_raw_reg): Declare.
566
567 2015-02-27 Tom Tromey <tromey@redhat.com>
568 Pedro Alves <palves@redhat.com>
569
570 Rename symbols whose names are reserved C++ keywords throughout.
571
572 2015-02-27 Pedro Alves <palves@redhat.com>
573
574 * Makefile.in (COMPILER): New, get it from autoconf.
575 (CXX): Get from autoconf instead.
576 (COMPILE.pre): Use COMPILER.
577 (CC-LD): Rename to ...
578 (CC_LD): ... this. Use COMPILER.
579 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
580 (CXX_FOR_TARGET): Default to g++ instead of gcc.
581 * acinclude.m4: Include build-with-cxx.m4.
582 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
583 Disable -Werror by default if building in C++ mode.
584 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
585 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
586 the C++ compiler. Save/restore CXXFLAGS too.
587 * configure: Regenerate.
588
589 2015-02-27 Pedro Alves <palves@redhat.com>
590
591 * acinclude.m4: Include libiberty.m4.
592 * configure.ac: Call libiberty_INIT.
593 * config.in, configure: Regenerate.
594
595 2015-02-26 Pedro Alves <palves@redhat.com>
596
597 * linux-low.c (linux_wait_1): When incrementing the PC past a
598 program breakpoint always use the_low_target.breakpoint_len as
599 increment, rather than the maximum between that and
600 the_low_target.decr_pc_after_break.
601
602 2015-02-23 Pedro Alves <palves@redhat.com>
603
604 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
605 thread was doing a step-over; always adjust the PC if
606 we stepped over a permanent breakpoint.
607 (linux_wait_1): If we stepped over breakpoint that was on top of a
608 permanent breakpoint, manually advance the PC past it.
609
610 2015-02-23 Pedro Alves <palves@redhat.com>
611
612 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
613 modes.
614 (x86_fill_gregset, x86_store_gregset): Use it when handling
615 $orig_eax.
616
617 2015-02-20 Pedro Alves <palves@redhat.com>
618
619 * thread-db.c: Include "nat/linux-procfs.h".
620 (thread_db_init): Skip listing new threads if the kernel supports
621 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
622
623 2015-02-20 Pedro Alves <palves@redhat.com>
624
625 * linux-low.c (status_pending_p_callback): Use ptid_match.
626
627 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
628
629 PR breakpoints/16812
630 * linux-low.c (wstatus_maybe_breakpoint): Remove.
631 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
632 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
633
634 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
635
636 PR breakpoints/15956
637 * tracepoint.c (cmd_qtinit): Add check for current_thread.
638
639 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
640
641 * linux-low.c (linux_low_btrace_conf): Print size.
642 * server.c (handle_btrace_conf_general_set): New.
643 (hanle_general_set): Call handle_btrace_conf_general_set.
644 (handle_query): Report Qbtrace-conf:bts:size as supported.
645
646 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
647
648 * linux-low.c (linux_low_enable_btrace): Update parameters.
649 (linux_low_btrace_conf): New.
650 (linux_target_ops)<to_btrace_conf>: Initialize.
651 * server.c (current_btrace_conf): New.
652 (handle_btrace_enable): Rename to ...
653 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
654 to target_enable_btrace. Update comment. Update users.
655 (handle_qxfer_btrace_conf): New.
656 (qxfer_packets): Add btrace-conf entry.
657 (handle_query): Report qXfer:btrace-conf:read as supported packet.
658 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
659 (target_ops)<read_btrace_conf>: New.
660 (target_enable_btrace): Update parameters.
661 (target_read_btrace_conf): New.
662
663 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
664
665 * server.c (handle_btrace_general_set): Remove call to
666 target_supports_btrace.
667 (supported_btrace_packets): New.
668 (handle_query): Call supported_btrace_packets.
669 * target.h: include btrace-common.h.
670 (btrace_target_info): Removed.
671 (supports_btrace, target_supports_btrace): Update parameters.
672
673 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
674
675 * Makefile.in (SFILES): Add common/btrace-common.c.
676 (OBS): Add common/btrace-common.o.
677 (btrace-common.o): Add build rules.
678 * linux-low: Include btrace-common.h.
679 (linux_low_read_btrace): Use struct btrace_data. Call
680 btrace_data_init and btrace_data_fini.
681
682 2015-02-06 Pedro Alves <palves@redhat.com>
683
684 * thread-db.c (find_new_threads_callback): Add debug output.
685
686 2015-02-04 Pedro Alves <palves@redhat.com>
687
688 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
689 (resume_stopped_resumed_lwps): New function.
690 (linux_wait_for_event_filtered): Use it.
691
692 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
693
694 * Makefile.in (SFILES): Add linux-personality.c.
695 (linux-personality.o): New rule.
696 * configure.srv (srv_linux_obj): Add linux-personality.o to the
697 list of objects to be built.
698 * linux-low.c: Include nat/linux-personality.h.
699 (linux_create_inferior): Remove code to disable address space
700 randomization (moved to ../nat/linux-personality.c). Create
701 cleanup to disable address space randomization.
702
703 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
704
705 * Makefile.in (posix-strerror.o): New rule.
706 (mingw-strerror.o): Likewise.
707 * configure: Regenerated.
708 * configure.ac: Source file ../common/common.host. Initialize new
709 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
710
711 2015-01-14 Yao Qi <yao@codesourcery.com>
712
713 * Makefile.in (SFILES): Add nat/ppc-linux.c.
714 (ppc-linux.o): New rule.
715 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
716 * configure.ac: AC_CHECK_FUNCS(getauxval).
717 * config.in: Re-generated.
718 * configure: Re-generated.
719 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
720 ppc64_64bit_inferior_p
721
722 2015-01-14 Yao Qi <yao@codesourcery.com>
723
724 * linux-ppc-low.c: Include "nat/ppc-linux.h".
725 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
726 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
727 (PT_ORIG_R3, PT_TRAP): Likewise.
728 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
729 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
730 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
731
732 2015-01-10 Joel Brobecker <brobecker@adacore.com>
733
734 * i387-fp.c (i387_cache_to_xsave): In look over
735 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
736 zmmh_low_space field by use of zmmh_high_space.
737
738 2015-01-09 Pedro Alves <palves@redhat.com>
739
740 * linux-low.c (step_over_bkpt): Move higher up in the file.
741 (handle_extended_wait): Don't store the stop_pc here.
742 (get_stop_pc): Adjust comments and rename to ...
743 (check_stopped_by_breakpoint): ... this. Record whether the LWP
744 stopped for a software breakpoint or hardware breakpoint.
745 (thread_still_has_status_pending_p): New function.
746 (status_pending_p_callback): Use
747 thread_still_has_status_pending_p. If the event is no longer
748 interesting, resume the LWP.
749 (handle_tracepoints): Add assert.
750 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
751 (wstatus_maybe_breakpoint): New function.
752 (cancel_breakpoint): Delete function.
753 (check_stopped_by_watchpoint): New function, factored out from
754 linux_low_filter_event.
755 (lp_status_maybe_breakpoint): Delete function.
756 (linux_low_filter_event): Remove filter_ptid argument.
757 Leave thread group exits pending here. Store the LWP's stop PC.
758 Always leave events pending.
759 (linux_wait_for_event_filtered): Pull all events out of the
760 kernel, and leave them all pending.
761 (count_events_callback, select_event_lwp_callback): Consider all
762 events.
763 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
764 (select_event_lwp): Only give preference to the stepping LWP in
765 all-stop mode. Adjust comments.
766 (ignore_event): New function.
767 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
768 references to cancel_breakpoints. Adjust to renames. Also give
769 equal priority to all LWPs that have had events in non-stop mode.
770 If reporting a software breakpoint event, unadjust the LWP's PC.
771 (linux_wait): If linux_wait_1 returned an ignored event, retry.
772 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
773 Adjust.
774 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
775 (resume_status_pending_p): Use thread_still_has_status_pending_p.
776 (linux_stopped_by_watchpoint): Adjust.
777 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
778 * linux-low.h (enum lwp_stop_reason): New.
779 (struct lwp_info) <stop_pc>: Adjust comment.
780 <stopped_by_watchpoint>: Delete field.
781 <stop_reason>: New field.
782 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
783 * mem-break.c (software_breakpoint_inserted_here)
784 (hardware_breakpoint_inserted_here): New function.
785 * mem-break.h (software_breakpoint_inserted_here)
786 (hardware_breakpoint_inserted_here): Declare.
787 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
788 (cancel_breakpoints): Delete.
789 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
790 (upload_fast_traceframes): Remove references to
791 cancel_breakpoints.
792
793 2015-01-09 Pedro Alves <palves@redhat.com>
794
795 * thread-db.c (find_new_threads_callback): Ignore thread if the
796 kernel thread ID is -1.
797
798 2015-01-09 Pedro Alves <palves@redhat.com>
799
800 * linux-low.c (linux_attach_fail_reason_string): Move to
801 nat/linux-ptrace.c, and rename.
802 (linux_attach_lwp): Update comment.
803 (attach_proc_task_lwp_callback): New function.
804 (linux_attach): Adjust to rename and use
805 linux_proc_attach_tgid_threads.
806 (linux_attach_fail_reason_string): Delete declaration.
807
808 2015-01-01 Joel Brobecker <brobecker@adacore.com>
809
810 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
811 * server.c (gdbserver_version): Likewise.
812
813 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
814
815 * remote-utils.c: Include ctype.h.
816 (input_interrupt): Explicitly handle the case when the char
817 received is the NUL byte. Improve the printing of non-ASCII
818 characters.
819
820 2014-12-16 Joel Brobecker <brobecker@adacore.com>
821
822 * linux-low.c (linux_low_filter_event): Update call to
823 linux_enable_event_reporting following the addition of
824 a new parameter to that function.
825
826 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
827
828 PR server/17457
829 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
830 (AARCH64_FPCR_REGNO): Likewise.
831 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
832 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
833 (aarch64_store_fpregset): Likewise.
834
835 2014-12-15 Joel Brobecker <brobecker@adacore.com>
836
837 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
838 Remove FIXME comment about assumption about N.
839
840 2014-12-13 Joel Brobecker <brobecker@adacore.com>
841
842 * configure.ac: If large-file support is disabled in GDBserver,
843 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
844 * configure: Regenerate.
845
846 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
847
848 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
849 warning upon ENODATA from ptrace.
850 * linux-s390-low.c (s390_store_tdb): New.
851 (s390_regsets): Add regset for NT_S390_TDB.
852
853 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
854
855 * linux-low.c (regsets_store_inferior_registers): Skip regsets
856 without a fill_function.
857 * linux-s390-low.c (s390_fill_last_break): Remove.
858 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
859 (s390_arch_setup): Use regset's size instead of fill_function for
860 loop end condition.
861
862 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
863
864 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
865 the regset's store function when ptrace returned an error.
866 * regcache.c (get_thread_regcache): Invalidate register cache
867 before fetching inferior's registers.
868
869 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
870
871 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
872 while-loop as for-loop.
873 (regsets_store_inferior_registers): Likewise.
874
875 2014-11-28 Yao Qi <yao@codesourcery.com>
876
877 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
878 * config.in, configure: Re-generate.
879 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
880 is defined.
881
882 2014-11-21 Yao Qi <yao@codesourcery.com>
883
884 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
885 (AC_CHECK_HEADERS): Remove malloc.h.
886 * configure: Re-generated.
887 * config.in: Re-generated.
888 * server.h: Don't include alloca.h and malloc.h.
889 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
890 Don't include malloc.h.
891
892 2014-11-17 Joel Brobecker <brobecker@adacore.com>
893
894 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
895 corresponding ERRNO check in same block.
896
897 2014-11-12 Pedro Alves <palves@redhat.com>
898
899 * server.c (cont_thread): Update comment.
900 (start_inferior, attach_inferior): No longer clear cont_thread.
901 (handle_v_cont): No longer set cont_thread.
902 (captured_main): Clear cont_thread each time a GDB connects.
903
904 2014-11-12 Pedro Alves <palves@redhat.com>
905
906 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
907 thread, and don't resume all threads if the Hc thread has exited.
908
909 2014-11-12 Pedro Alves <palves@redhat.com>
910
911 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
912 the process group instead of to a specific LWP.
913
914 2014-10-15 Pedro Alves <palves@redhat.com>
915
916 PR server/17487
917 * win32-arm-low.c (arm_set_thread_context): Remove current_event
918 parameter.
919 (arm_set_thread_context): Delete.
920 (the_low_target): Adjust.
921 * win32-i386-low.c (debug_registers_changed)
922 (debug_registers_used): Delete.
923 (update_debug_registers_callback): New function.
924 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
925 needing to update their debug registers.
926 (win32_get_current_dr): New function.
927 (x86_dr_low_get_addr, x86_dr_low_get_control)
928 (x86_dr_low_get_status): Fetch the debug register from the thread
929 record's context.
930 (i386_initial_stuff): Adjust.
931 (i386_get_thread_context): Remove current_event parameter. Don't
932 clear debug_registers_changed nor copy DR values to
933 debug_reg_state.
934 (i386_set_thread_context): Delete.
935 (i386_prepare_to_resume): New function.
936 (i386_thread_added): Mark the thread as needing to update irs
937 debug registers.
938 (the_low_target): Remove i386_set_thread_context and install
939 i386_prepare_to_resume.
940 * win32-low.c (win32_get_thread_context): Adjust.
941 (win32_set_thread_context): Use SetThreadContext
942 directly.
943 (win32_prepare_to_resume): New function.
944 (win32_require_context): New function, factored out from ...
945 (thread_rec): ... this.
946 (continue_one_thread): Call win32_prepare_to_resume on each thread
947 we're about to continue.
948 (win32_resume): Call win32_prepare_to_resume on the event thread.
949 * win32-low.h (struct win32_thread_info)
950 <debug_registers_changed>: New field.
951 (struct win32_target_ops): Change prototype of set_thread_context,
952 delete set_thread_context and add prepare_to_resume.
953 (win32_require_context): New declaration.
954
955 2014-10-08 Gary Benson <gbenson@redhat.com>
956
957 * server.h: Do not include common-exceptions.h.
958
959 2014-10-08 Gary Benson <gbenson@redhat.com>
960
961 * server.h: Do not include cleanups.h.
962
963 2014-09-30 James Hogan <james.hogan@imgtec.com>
964
965 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
966 mips64-dsp-linux.c.
967
968 2014-09-23 Yao Qi <yao@codesourcery.com>
969
970 * linux-low.c (lp_status_maybe_breakpoint): New function.
971 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
972 (count_events_callback): Likewise.
973 (select_event_lwp_callback): Likewise.
974 (cancel_breakpoints_callback): Likewise.
975
976 2014-09-19 Don Breazeal <donb@codesourcery.com>
977
978 * linux-low.c (handle_extended_wait): Call
979 linux_ptrace_get_extended_event.
980 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
981 linux_is_extended_waitstatus.
982
983 2014-09-16 Joel Brobecker <brobecker@adacore.com>
984
985 * Makefile.in (CPPFLAGS): Define.
986 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
987 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
988
989 2014-09-16 Gary Benson <gbenson@redhat.com>
990
991 * inferiors.h (current_inferior): Renamed as...
992 (current_thread): New variable. All uses updated.
993 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
994 (maybe_move_out_of_jump_pad): Likewise.
995 (cancel_breakpoint): Likewise.
996 (linux_low_filter_event): Likewise.
997 (wait_for_sigstop): Likewise.
998 (linux_resume_one_lwp): Likewise.
999 (need_step_over_p): Likewise.
1000 (start_step_over): Likewise.
1001 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1002 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1003 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1004 and save_inferior as saved_thread.
1005 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1006 saved_thread.
1007 (regcache_invalidate_thread): Likewise.
1008 * remote-utils.c (prepare_resume_reply): Likewise.
1009 * thread-db.c (thread_db_get_tls_address): Likewise.
1010 (disable_thread_event_reporting): Likewise.
1011 (remove_thread_event_breakpoints): Likewise.
1012 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1013 as saved_thread.
1014 * target.h (set_desired_inferior): Renamed as...
1015 (set_desired_thread): New declaration. All uses updated.
1016 * server.c (myresume): Updated comment to reference thread instead
1017 of inferior.
1018 (handle_serial_event): Likewise.
1019 (handle_target_event): Likewise.
1020
1021 2014-09-12 Tom Tromey <tromey@redhat.com>
1022 Gary Benson <gbenson@redhat.com>
1023
1024 * regcache.h: Include common-regcache.h.
1025 (regcache_read_pc): Don't declare.
1026 * regcache.c (get_thread_regcache_for_ptid): New function.
1027
1028 2014-09-11 Tom Tromey <tromey@redhat.com>
1029 Gary Benson <gbenson@redhat.com>
1030
1031 * symbol.c: New file.
1032 * Makefile.in (SFILES): Add symbol.c.
1033 (OBS): Add symbol.o.
1034
1035 2014-09-11 Gary Benson <gbenson@redhat.com>
1036
1037 * target.c (target_stop_ptid, target_continue_ptid): New
1038 functions.
1039
1040 2014-09-11 Tom Tromey <tromey@redhat.com>
1041 Gary Benson <gbenson@redhat.com>
1042
1043 * target.h: Include target/target.h.
1044 * target.c (target_read_memory, target_read_uint32)
1045 (target_write_memory): New functions.
1046
1047 2014-09-11 Gary Benson <gbenson@redhat.com>
1048
1049 * server.h (debug_hw_points): Don't declare.
1050 * server.c (debug_hw_points): Don't define. Replace all uses
1051 with show_debug_regs.
1052 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1053 all uses with show_debug_regs.
1054
1055 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1056
1057 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1058 endianness into account.
1059 (ppc_supply_ptrace_register): Likewise.
1060
1061 2014-09-03 James Hogan <james.hogan@imgtec.com>
1062
1063 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1064 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1065
1066 2014-09-03 Gary Benson <gbenson@redhat.com>
1067
1068 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1069 ALL_DEBUG_ADDRESS_REGISTERS.
1070
1071 2014-09-02 Gary Benson <gbenson@redhat.com>
1072
1073 * i386-low.h: Renamed as...
1074 * x86-low.h: New file. All type, function and variable name
1075 prefixes changed from "i386_" to "x86_". All references updated.
1076 * i386-low.c: Renamed as...
1077 * x86-low.c: New file. All type, function and variable name
1078 prefixes changed from "i386_" to "x86_". All references updated.
1079
1080 2014-09-02 Gary Benson <gbenson@redhat.com>
1081
1082 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1083 (x86_linux_new_thread): Likewise.
1084
1085 2014-08-29 Gary Benson <gbenson@redhat.com>
1086
1087 * server.h (setjmp.h): Do not include.
1088 (toplevel): Do not declare.
1089 (common-exceptions.h): Include.
1090 (cleanups.h): Likewise.
1091 * server.c (toplevel): Do not define.
1092 (exit_code): New static global.
1093 (detach_or_kill_for_exit_cleanup): New function.
1094 (main): New function. Original main renamed to...
1095 (captured_main): New function.
1096 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1097
1098 2014-08-29 Gary Benson <gbenson@redhat.com>
1099
1100 * Makefile.in (SFILES): Add common/common-exceptions.c.
1101 (OBS): Add common-exceptions.o.
1102 (common-exceptions.o): New rule.
1103 * utils.c (prepare_to_throw_exception): New function.
1104
1105 2014-08-29 Gary Benson <gbenson@redhat.com>
1106
1107 * config.in: Regenerate.
1108 * configure: Likewise.
1109
1110 2014-08-29 Gary Benson <gbenson@redhat.com>
1111
1112 * Makefile.in (SFILES): Add common/cleanups.c.
1113 (OBS): cleanups.o.
1114 (cleanups.o): New rule.
1115
1116 2014-08-29 Gary Benson <gbenson@redhat.com>
1117
1118 * utils.c (internal_vwarning): New function.
1119
1120 2014-08-28 Gary Benson <gbenson@redhat.com>
1121
1122 * utils.h (fatal): Remove declaration.
1123 * utils.c (fatal): Remove function.
1124
1125 2014-08-28 Gary Benson <gbenson@redhat.com>
1126
1127 * tracepoint.c (gdb_agent_init): Replace fatal with
1128 perror_with_name.
1129 (initialize_tracepoint): Likewise.
1130
1131 2014-08-28 Gary Benson <gbenson@redhat.com>
1132
1133 * remote-utils.c (remote_prepare): Replace fatal with error.
1134
1135 2014-08-28 Gary Benson <gbenson@redhat.com>
1136
1137 * linux-low.c (linux_async): Replace fatal with warning.
1138 Tidy up and return.
1139 (linux_start_non_stop): Return -1 if linux_async failed.
1140
1141 2014-08-28 Gary Benson <gbenson@redhat.com>
1142
1143 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1144 gdb_assert.
1145 (i386_dr_low_get_addr): Remove vague comment.
1146 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1147 gdb_assert.
1148
1149 2014-08-28 Gary Benson <gbenson@redhat.com>
1150
1151 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1152 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1153 internal_error.
1154 (linux_resume_one_lwp): Likewise.
1155 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1156 gdb_assert.
1157 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1158 with internal_error.
1159 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1160 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1161 (find_register_by_name): Replace fatal with internal_error.
1162 (find_regno): Likewise.
1163 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1164 * thread-db.c (thread_db_create_event): Likewise.
1165 (thread_db_load_search): Likewise.
1166 (try_thread_db_load_1): Likewise.
1167 * tracepoint.c (get_jump_space_head): Replace fatal with
1168 internal_error.
1169 (claim_trampoline_space): Likewise.
1170 (have_fast_tracepoint_trampoline_buffer): Likewise.
1171 (cmd_qtstart): Likewise.
1172 (stop_tracing): Likewise.
1173 (fast_tracepoint_collecting): Likewise.
1174 (target_malloc): Likewise.
1175 (download_tracepoint): Likewise.
1176 (download_trace_state_variables): Replace check with gdb_assert.
1177 (upload_fast_traceframes): Replace fatal with internal_error.
1178
1179 2014-08-19 Tom Tromey <tromey@redhat.com>
1180 Gary Benson <gbenson@redhat.com>
1181
1182 * Makefile.in (SFILES): Add common/common-debug.c.
1183 (OBS): Add common-debug.o.
1184 (common-debug.o): New rule.
1185 * debug.h (debug_printf): Don't declare.
1186 * debug.c (debug_printf): Renamed and rewritten as...
1187 (debug_vprintf): New function.
1188
1189 2014-08-19 Gary Benson <gbenson@redhat.com>
1190
1191 * utils.h: Do not include print-utils.h.
1192
1193 2014-08-19 Tom Tromey <tromey@redhat.com>
1194 Gary Benson <gbenson@redhat.com>
1195
1196 * server.h: Add static assertion.
1197 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1198
1199 2014-08-19 Tom Tromey <tromey@redhat.com>
1200 Gary Benson <gbenson@redhat.com>
1201
1202 * Makefile.in (SFILES): Add common/errors.c.
1203 (OBS): Add errors.o.
1204 (IPA_OBS): Add errors-ipa.o.
1205 (errors.o): New rule.
1206 (errors-ipa.o): Likewise.
1207 * utils.h (perror_with_name, error, warning): Don't declare.
1208 * utils.c (warning): Renamed and rewritten as...
1209 (vwarning): New function.
1210 (error): Renamed and rewritten as...
1211 (verror): New function.
1212 (internal_error): Renamed and rewritten as...
1213 (internal_verror): New function.
1214
1215 2014-08-07 Gary Benson <gbenson@redhat.com>
1216
1217 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1218 * configure: Regenerate.
1219 * config.in: Likewise.
1220 * server.h: Do not include errno.h.
1221 * event-loop.c: Likewise.
1222 * hostio-errno.c: Likewise.
1223 * linux-low.c: Likewise.
1224 * remote-utils.c: Likewise.
1225 * spu-low.c: Likewise.
1226 * utils.c: Likewise.
1227 * gdbreplay.c: Unconditionally include errno.h.
1228
1229 2014-08-07 Gary Benson <gbenson@redhat.com>
1230
1231 * server.h: Do not include string.h.
1232 * event-loop.c: Likewise.
1233 * linux-low.c: Likewise.
1234 * regcache.c: Likewise.
1235 * remote-utils.c: Likewise.
1236 * spu-low.c: Likewise.
1237 * utils.c: Likewise.
1238
1239 2014-08-07 Gary Benson <gbenson@redhat.com>
1240
1241 * server.h: Do not include gdb_assert.h.
1242
1243 2014-08-07 Gary Benson <gbenson@redhat.com>
1244
1245 * server.h: Do not include common-utils.h.
1246
1247 2014-08-07 Gary Benson <gbenson@redhat.com>
1248
1249 * server.h: Do not include ptid.h.
1250 * notif.h: Likewise.
1251
1252 2014-08-07 Gary Benson <gbenson@redhat.com>
1253
1254 * server.h: Do not include gdb_locale.h.
1255
1256 2014-08-07 Gary Benson <gbenson@redhat.com>
1257
1258 * server.h: Do not include gdb/signals.h.
1259 * win32-low.c: Likewise.
1260
1261 2014-08-07 Gary Benson <gbenson@redhat.com>
1262
1263 * server.h: Do not include pathmax.h.
1264
1265 2014-08-07 Gary Benson <gbenson@redhat.com>
1266
1267 * server.h: Do not include libiberty.h.
1268 * linux-bfin-low.c: Likewise.
1269
1270 2014-08-07 Gary Benson <gbenson@redhat.com>
1271
1272 * server.h: Do not include ansidecl.h.
1273
1274 2014-08-07 Gary Benson <gbenson@redhat.com>
1275
1276 * linux-x86-low.c: Do not include stddef.h.
1277 * lynx-ppc-low.c: Likewise.
1278 * tracepoint.c: Likewise.
1279
1280 2014-08-07 Gary Benson <gbenson@redhat.com>
1281
1282 * server.h: Do not include stdarg.h.
1283 * nto-low.c: Likewise.
1284
1285 2014-08-07 Gary Benson <gbenson@redhat.com>
1286
1287 * server.h: Do not include stdlib.h.
1288 * inferiors.c: Likewise.
1289 * linux-low.c: Likewise.
1290 * regcache.c: Likewise.
1291 * spu-low.c: Likewise.
1292 * tracepoint.c: Likewise.
1293 * utils.c: Likewise.
1294
1295 2014-08-07 Gary Benson <gbenson@redhat.com>
1296
1297 * server.h: Do not include stdio.h.
1298 * linux-low.c: Likewise.
1299 * remote-utils.c: Likewise.
1300 * spu-low.c: Likewise.
1301 * utils.c: Likewise.
1302 * wincecompat.c: Likewise.
1303
1304 2014-08-06 Gary Benson <gbenson@redhat.com>
1305
1306 * regcache.c (init_register_cache): Move conditionals inside if.
1307
1308 2014-08-06 Gary Benson <gbenson@redhat.com>
1309
1310 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1311
1312 2014-07-31 Gary Benson <gbenson@redhat.com>
1313
1314 * ax.h: Do not include server.h.
1315 * gdbthread.h: Likewise.
1316 * lynx-low.h: Likewise.
1317 * notif.h: Likewise.
1318
1319 2014-07-30 Gary Benson <gbenson@redhat.com>
1320
1321 * server.h: Include common-defs.h.
1322 Do not include config.h or build-gnulib-gdbserver/config.h.
1323
1324 2014-07-30 Gary Benson <gbenson@redhat.com>
1325
1326 * hostio-errno.c: Move server.h to top of includes list.
1327 * inferiors.c: Likewise.
1328 * linux-x86-low.c: Likewise.
1329 * notif.c: Include server.h.
1330
1331 2014-07-24 Tom Tromey <tromey@redhat.com>
1332 Gary Benson <gbenson@redhat.com>
1333
1334 * server.h (CORE_ADDR): Now unsigned.
1335
1336 2014-07-16 Pedro Alves <palves@redhat.com>
1337
1338 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1339
1340 2014-07-15 Pedro Alves <palves@redhat.com>
1341
1342 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1343 copy.
1344
1345 2014-07-11 Pedro Alves <palves@redhat.com>
1346
1347 * linux-low.c (kill_wait_lwp): New function, based on
1348 kill_one_lwp_callback, but use my_waitpid directly.
1349 (kill_one_lwp_callback, linux_kill): Use it.
1350
1351 2014-06-23 Pedro Alves <palves@redhat.com>
1352
1353 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1354 before setting DR0..DR3.
1355
1356 2014-06-20 Gary Benson <gbenson@redhat.com>
1357
1358 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1359 * configure: Regenerated.
1360 * config.in: Likewise.
1361
1362 2014-06-20 Gary Benson <gbenson@redhat.com>
1363
1364 * Makefile.in (SFILES): Update locations for files moved
1365 from common to nat.
1366 (object file files): Reordered.
1367
1368 2014-06-20 Gary Benson <gbenson@redhat.com>
1369
1370 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1371 (i386_dr_low_set_addr): Likewise.
1372 (i386_dr_low_get_addr): Likewise.
1373 (i386_dr_low_can_set_control): Likewise.
1374 (i386_dr_low_set_control): Likewise.
1375 (i386_dr_low_get_control): Likewise.
1376 (i386_dr_low_get_status): Likewise.
1377 (i386_get_debug_register_length): Likewise.
1378 * linux-x86-low.c (i386_dr_low_set_addr):
1379 Changed signature. Made static.
1380 (i386_dr_low_get_addr): Likewise.
1381 (i386_dr_low_set_control): Likewise.
1382 (i386_dr_low_get_control): Likewise.
1383 (i386_dr_low_get_status): Likewise.
1384 (i386_dr_low): New global variable.
1385 * win32-i386-low.c (i386_dr_low_set_addr):
1386 Changed signature. Made static.
1387 (i386_dr_low_get_addr): Likewise.
1388 (i386_dr_low_set_control): Likewise.
1389 (i386_dr_low_get_control): Likewise.
1390 (i386_dr_low_get_status): Likewise.
1391 (i386_dr_low): New global variable.
1392
1393 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1394
1395 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1396 * Makefile.in (AR, AR_FLAGS): Define.
1397 * configure: Regenerate.
1398
1399 2014-06-19 Gary Benson <gbenson@redhat.com>
1400
1401 * Makefile.in (i386-dregs.o): New rule.
1402 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1403 * i386-low.c (target.h): Remove include.
1404 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1405 (DR_CONTROL_SHIFT): Likewise.
1406 (DR_CONTROL_SIZE): Likewise.
1407 (DR_RW_EXECUTE): Likewise.
1408 (DR_RW_WRITE): Likewise.
1409 (DR_RW_READ): Likewise.
1410 (DR_RW_IORW): Likewise.
1411 (DR_LEN_1): Likewise.
1412 (DR_LEN_2): Likewise.
1413 (DR_LEN_4): Likewise.
1414 (DR_LEN_8): Likewise.
1415 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1416 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1417 (DR_ENABLE_SIZE): Likewise.
1418 (DR_LOCAL_SLOWDOWN): Likewise.
1419 (DR_GLOBAL_SLOWDOWN): Likewise.
1420 (DR_CONTROL_RESERVED): Likewise.
1421 (I386_DR_CONTROL_MASK): Likewise.
1422 (I386_DR_VACANT): Likewise.
1423 (I386_DR_LOCAL_ENABLE): Likewise.
1424 (I386_DR_GLOBAL_ENABLE): Likewise.
1425 (I386_DR_DISABLE): Likewise.
1426 (I386_DR_SET_RW_LEN): Likewise.
1427 (I386_DR_GET_RW_LEN): Likewise.
1428 (I386_DR_WATCH_HIT): Likewise.
1429 (i386_wp_op_t): Likewise.
1430 (i386_show_dr): Likewise.
1431 (i386_length_and_rw_bits): Likewise.
1432 (i386_insert_aligned_watchpoint): Likewise.
1433 (i386_remove_aligned_watchpoint): Likewise.
1434 (i386_handle_nonaligned_watchpoint): Likewise.
1435 i386_update_inferior_debug_regs(): Likewise.
1436 (i386_dr_insert_watchpoint): Likewise.
1437 (i386_dr_remove_watchpoint): Likewise.
1438 (i386_dr_region_ok_for_watchpoint): Likewise.
1439 (i386_dr_stopped_data_address): Likewise.
1440 (i386_dr_stopped_by_watchpoint): Likewise.
1441
1442 2014-06-19 Gary Benson <gbenson@redhat.com>
1443
1444 * i386-low.c (i386_dr_show): Renamed to
1445 i386_show_dr and made static. All uses updated.
1446 (i386_dr_length_and_rw_bits): Renamed to
1447 i386_length_and_rw_bits and made static.
1448 All uses updated.
1449 (i386_dr_insert_aligned_watchpoint): Renamed to
1450 i386_insert_aligned_watchpoint and made static.
1451 All uses updated.
1452 (i386_dr_remove_aligned_watchpoint): Renamed to
1453 i386_remove_aligned_watchpoint and made static.
1454 All uses updated.
1455 (i386_dr_update_inferior_debug_regs): Renamed to
1456 i386_update_inferior_debug_regs and made static.
1457 All uses updated.
1458
1459 2014-06-18 Gary Benson <gbenson@redhat.com>
1460
1461 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1462 (i386_dr_low_can_set_control): Likewise.
1463 (i386_get_debug_register_length): Likewise.
1464 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1465 (i386_dr_low_can_set_control): Likewise.
1466 (i386_get_debug_register_length): Likewise.
1467
1468 2014-06-17 Gary Benson <gbenson@redhat.com>
1469
1470 * i386-low.h (i386-dregs.h): New include.
1471 (DR_FIRSTADDR): Now in i386-dregs.h.
1472 (DR_LASTADDR): Likewise.
1473 (DR_NADDR): Likewise.
1474 (DR_STATUS): Likewise.
1475 (DR_CONTROL): Likewise.
1476 (i386_debug_reg_state): Likewise.
1477 (i386_dr_insert_watchpoint): Likewise.
1478 (i386_dr_remove_watchpoint): Likewise.
1479 (i386_dr_region_ok_for_watchpoint): Likewise.
1480 (i386_dr_stopped_data_address): Likewise.
1481 (i386_dr_stopped_by_watchpoint): Likewise.
1482 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1483
1484 2014-06-18 Gary Benson <gbenson@redhat.com>
1485
1486 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1487 i386_dr_insert_watchpoint.
1488 (i386_low_remove_watchpoint): Renamed to
1489 i386_dr_remove_watchpoint.
1490 (i386_low_region_ok_for_watchpoint): Renamed to
1491 i386_dr_region_ok_for_watchpoint.
1492 (i386_low_stopped_data_address): Renamed to
1493 i386_dr_stopped_data_address.
1494 (i386_low_stopped_by_watchpoint): Renamed to
1495 i386_dr_stopped_by_watchpoint.
1496 * i386-low.c (i386_show_dr): Renamed to
1497 i386_dr_show and made nonstatic. All uses updated.
1498 (i386_length_and_rw_bits): Renamed to
1499 i386_dr_length_and_rw_bits and made nonstatic.
1500 All uses updated.
1501 (i386_insert_aligned_watchpoint): Renamed to
1502 i386_dr_insert_aligned_watchpoint and made nonstatic.
1503 All uses updated.
1504 (i386_remove_aligned_watchpoint): Renamed to
1505 i386_dr_remove_aligned_watchpoint and made nonstatic.
1506 All uses updated.
1507 (i386_update_inferior_debug_regs): Renamed to
1508 i386_dr_update_inferior_debug_regs and made nonstatic.
1509 All uses updated.
1510 (i386_low_insert_watchpoint): Renamed to
1511 i386_dr_insert_watchpoint. All uses updated.
1512 (i386_low_remove_watchpoint): Renamed to
1513 i386_dr_remove_watchpoint. All uses updated.
1514 (i386_low_region_ok_for_watchpoint): Renamed to
1515 i386_dr_region_ok_for_watchpoint. All uses updated.
1516 (i386_low_stopped_data_address): Renamed to
1517 i386_dr_stopped_data_address. All uses updated.
1518 (i386_low_stopped_by_watchpoint): Renamed to
1519 i386_dr_stopped_by_watchpoint. All uses updated.
1520
1521 2014-06-18 Gary Benson <gbenson@redhat.com>
1522
1523 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1524 (i386_dr_low_can_set_control): Likewise.
1525 (i386_insert_aligned_watchpoint): New check.
1526
1527 2014-06-18 Gary Benson <gbenson@redhat.com>
1528
1529 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1530 Renamed to state.
1531
1532 2014-06-18 Gary Benson <gbenson@redhat.com>
1533
1534 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1535 instead of fatal and error.
1536 (i386_handle_nonaligned_watchpoint): Likewise.
1537
1538 2014-06-18 Gary Benson <gbenson@redhat.com>
1539
1540 * i386-low.c (i386_get_debug_register_length): New macro.
1541 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1542 (i386_show_dr): Use debug_printf instead of fprintf. Use
1543 phex to format values.
1544
1545 2014-06-18 Gary Benson <gbenson@redhat.com>
1546
1547 * i386-low.h: Comment changes.
1548 * i386-low.c: Likewise.
1549
1550 2014-06-18 Gary Benson <gbenson@redhat.com>
1551
1552 * i386-low.c: Whitespace changes.
1553
1554 2014-06-12 Tom Tromey <tromey@redhat.com>
1555
1556 * utils.c (freeargv): Remove.
1557
1558 2014-06-12 Tom Tromey <tromey@redhat.com>
1559
1560 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1561 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1562 (parse_debug_format_options): Likewise.
1563 (gdbserver_usage): Likewise.
1564 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1565 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1566 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1567 against libiberty.
1568 ($(LIBGNU)): Depend on libiberty.
1569 (all-lib): Recurse into all subdirs.
1570 (install-only): Invoke "install" target in subdirs.
1571 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1572 targets.
1573 * configure: Rebuild.
1574 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1575 for vasprintf, vsnprintf, or gettimeofday.
1576 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1577 srv_tgtobj.
1578
1579 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1580
1581 * development.sh: Delete.
1582 * Makefile.in (config.status): Adjust dependency on development.sh.
1583 * configure.ac: Adjust development.sh source call.
1584 * configure: Regenerate.
1585
1586 2014-06-02 Pedro Alves <palves@redhat.com>
1587
1588 * ax.c (gdb_free_agent_expr): New function.
1589 * ax.h (gdb_free_agent_expr): New declaration.
1590 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1591 list.
1592 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1593 static.
1594 (clear_breakpoint_conditions_and_commands): New function.
1595 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1596 (clear_breakpoint_conditions_and_commands): New declaration.
1597
1598 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1599
1600 * linux-aarch64-low.c (asm/ptrace.h): Include.
1601
1602 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1603
1604 Fix TLS access for -static -pthread.
1605 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1606 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1607 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1608
1609 2014-05-20 Pedro Alves <palves@redhat.com>
1610
1611 * linux-aarch64-low.c (aarch64_insert_point)
1612 (aarch64_remove_point): No longer check whether the type is
1613 supported here. Adjust to new interface.
1614 (the_low_target): Install aarch64_supports_z_point_type as
1615 supports_z_point_type method.
1616 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1617 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1618 instead of a Z packet char. Adjust.
1619 (arm_supports_z_point_type): New function.
1620 (arm_insert_point, arm_remove_point): Adjust to new interface.
1621 (the_low_target): Install arm_supports_z_point_type.
1622 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1623 (cris_insert_point, cris_remove_point): Adjust to new interface.
1624 Don't check whether the type is supported here.
1625 (the_low_target): Install cris_supports_z_point_type.
1626 * linux-low.c (linux_supports_z_point_type): New function.
1627 (linux_insert_point, linux_remove_point): Adjust to new interface.
1628 * linux-low.h (struct linux_target_ops) <insert_point,
1629 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1630 raw_breakpoint pointer parameter.
1631 <supports_z_point_type>: New method.
1632 * linux-mips-low.c (mips_supports_z_point_type): New function.
1633 (mips_insert_point, mips_remove_point): Adjust to new interface.
1634 Use mips_supports_z_point_type.
1635 (the_low_target): Install mips_supports_z_point_type.
1636 * linux-ppc-low.c (the_low_target): Install NULL as
1637 supports_z_point_type method.
1638 * linux-s390-low.c (the_low_target): Install NULL as
1639 supports_z_point_type method.
1640 * linux-sparc-low.c (the_low_target): Install NULL as
1641 supports_z_point_type method.
1642 * linux-x86-low.c (x86_supports_z_point_type): New function.
1643 (x86_insert_point): Adjust to new insert_point interface. Use
1644 insert_memory_breakpoint. Adjust to new
1645 i386_low_insert_watchpoint interface.
1646 (x86_remove_point): Adjust to remove_point interface. Use
1647 remove_memory_breakpoint. Adjust to new
1648 i386_low_remove_watchpoint interface.
1649 (the_low_target): Install x86_supports_z_point_type.
1650 * lynx-low.c (lynx_target_ops): Install NULL as
1651 supports_z_point_type callback.
1652 * nto-low.c (nto_supports_z_point_type): New.
1653 (nto_insert_point, nto_remove_point): Adjust to new interface.
1654 (nto_target_ops): Install nto_supports_z_point_type.
1655 * mem-break.c: Adjust intro comment.
1656 (struct raw_breakpoint) <raw_type, size>: New fields.
1657 <inserted>: Update comment.
1658 <shlib_disabled>: Delete field.
1659 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1660 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1661 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1662 (raw_bkpt_type_to_target_hw_bp_type): New function.
1663 (find_enabled_raw_code_breakpoint_at): New function.
1664 (find_raw_breakpoint_at): New type and size parameters. Use them.
1665 (insert_memory_breakpoint): New function, based off
1666 set_raw_breakpoint_at.
1667 (remove_memory_breakpoint): New function.
1668 (set_raw_breakpoint_at): Reimplement.
1669 (set_breakpoint): New, based on set_breakpoint_at.
1670 (set_breakpoint_at): Reimplement.
1671 (delete_raw_breakpoint): Go through the_target->remove_point
1672 instead of assuming memory breakpoints.
1673 (find_gdb_breakpoint_at): Delete.
1674 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1675 (find_gdb_breakpoint): New function.
1676 (set_gdb_breakpoint_at): Delete.
1677 (z_type_supported): New function.
1678 (set_gdb_breakpoint_1): New function, loosely based off
1679 set_gdb_breakpoint_at.
1680 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1681 (delete_gdb_breakpoint_at): Delete.
1682 (delete_gdb_breakpoint_1): New function, loosely based off
1683 delete_gdb_breakpoint_at.
1684 (delete_gdb_breakpoint): New function.
1685 (clear_gdb_breakpoint_conditions): Rename to ...
1686 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1687 breakpoint.
1688 (add_condition_to_breakpoint): Make static.
1689 (add_breakpoint_condition): Take a struct breakpoint pointer
1690 instead of an address. Adjust.
1691 (gdb_condition_true_at_breakpoint): Rename to ...
1692 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1693 z_type parameter.
1694 (gdb_condition_true_at_breakpoint): Reimplement.
1695 (add_breakpoint_commands): Take a struct breakpoint pointer
1696 instead of an address. Adjust.
1697 (gdb_no_commands_at_breakpoint): Rename to ...
1698 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1699 parameter. Return true if no breakpoint was found. Change debug
1700 output.
1701 (gdb_no_commands_at_breakpoint): Reimplement.
1702 (run_breakpoint_commands): Rename to ...
1703 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1704 and change return type to boolean.
1705 (run_breakpoint_commands): New function.
1706 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1707 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1708 breakpoint. Go through the_target->remove_point instead of
1709 assuming memory breakpoint.
1710 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1711 software and hardware breakpoints.
1712 (reinsert_raw_breakpoint): Go through the_target->insert_point
1713 instead of assuming memory breakpoint.
1714 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1715 software and hardware breakpoints.
1716 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1717 Check both software and hardware breakpoints.
1718 (validate_inserted_breakpoint): Assert the breakpoint is a
1719 software breakpoint. Set the inserted flag to -1 instead of
1720 setting shlib_disabled.
1721 (delete_disabled_breakpoints): Adjust.
1722 (validate_breakpoints): Only validate software breakpoints.
1723 Adjust to inserted flag change.
1724 (check_mem_read, check_mem_write): Skip breakpoint types other
1725 than software breakpoints. Adjust to inserted flag change.
1726 * mem-break.h (enum raw_bkpt_type): New enum.
1727 (raw_breakpoint, struct process_info): Forward declare.
1728 (Z_packet_to_target_hw_bp_type): Delete declaration.
1729 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1730 (set_gdb_breakpoint, delete_gdb_breakpoint)
1731 (clear_breakpoint_conditions): New declarations.
1732 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1733 (breakpoint_inserted_here): Update comment.
1734 (add_breakpoint_condition, add_breakpoint_commands): Replace
1735 address parameter with a breakpoint pointer parameter.
1736 (gdb_breakpoint_here): Update comment.
1737 (delete_gdb_breakpoint_at): Delete.
1738 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1739 * server.c (process_point_options): Take a struct breakpoint
1740 pointer instead of an address. Adjust.
1741 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1742 delete_gdb_breakpoint.
1743 * spu-low.c (spu_target_ops): Install NULL as
1744 supports_z_point_type method.
1745 * target.h: Include mem-break.h.
1746 (struct target_ops) <prepare_to_access_memory>: Update comment.
1747 <supports_z_point_type>: New field.
1748 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1749 instead of a char. Also take a raw breakpoint pointer.
1750 * win32-arm-low.c (the_low_target): Install NULL as
1751 supports_z_point_type.
1752 * win32-i386-low.c (i386_supports_z_point_type): New function.
1753 (i386_insert_point, i386_remove_point): Adjust to new interface.
1754 (the_low_target): Install i386_supports_z_point_type.
1755 * win32-low.c (win32_supports_z_point_type): New function.
1756 (win32_insert_point, win32_remove_point): Adjust to new interface.
1757 (win32_target_ops): Install win32_supports_z_point_type.
1758 * win32-low.h (struct win32_target_ops):
1759 <supports_z_point_type>: New method.
1760 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1761 instead of a char. Also take a raw breakpoint pointer.
1762
1763 2014-05-20 Pedro Alves <palves@redhat.com>
1764
1765 * mem-break.h: Include break-common.h.
1766 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1767 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1768 (Z_packet_to_target_hw_bp_type): New declaration.
1769 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1770 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1771 (Z_PACKET_ACCESS_WP): Delete macros.
1772 (Z_packet_to_hw_type): Delete function.
1773 * i386-low.h: Don't include break-common.h here.
1774 (Z_packet_to_hw_type): Delete declaration.
1775 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1776 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1777 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1778 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1779 * linux-aarch64-low.c: Don't include break-common.h here.
1780 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1781 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1782 (Z_packet_to_target_hw_bp_type): Delete function.
1783 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1784 function.
1785 (mips_insert_point, mips_remove_point): Use
1786 Z_packet_to_target_hw_bp_type.
1787
1788 2014-05-20 Pedro Alves <palves@redhat.com>
1789
1790 * linux-aarch64-low.c: Include break-common.h.
1791 (enum target_point_type): Delete.
1792 (Z_packet_to_point_type): Rename to ...
1793 (Z_packet_to_target_hw_bp_type): ... this, and return a
1794 target_hw_bp_type instead.
1795 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1796 instead of an enum target_point_type.
1797 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1798 breakpoint type.
1799 (aarch64_dr_state_insert_one_point)
1800 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1801 (aarch64_handle_aligned_watchpoint)
1802 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1803 Take an enum target_hw_bp_type instead of an enum
1804 target_point_type.
1805 (aarch64_supports_z_point_type): New function.
1806 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1807 use Z_packet_to_target_hw_bp_type.
1808
1809 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1810
1811 * configure.ac: Only use -Werror by default when DEVELOPMENT
1812 is true.
1813 * configure: Regenerate.
1814
1815 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1816
1817 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1818 * linux-x86-low.c (X86_64_USER_REGS): New.
1819 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1820
1821 2014-04-28 Yao Qi <yao@codesourcery.com>
1822
1823 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1824 name.
1825
1826 2014-04-25 Pedro Alves <palves@redhat.com>
1827
1828 PR server/16255
1829 * linux-low.c (linux_attach_fail_reason_string): New function.
1830 (linux_attach_lwp): Delete.
1831 (linux_attach_lwp_1): Rename to ...
1832 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1833 argument. Remove "initial" parameter. Return int instead of
1834 void. Don't error or warn here.
1835 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1836 failure to attach to the tgid. Call warning when failing to
1837 attach to an lwp.
1838 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1839 argument. Remove "initial" parameter. Return int instead of
1840 void. Don't error or warn here.
1841 (linux_attach_fail_reason_string): New declaration.
1842 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1843 interface change. Use linux_attach_fail_reason_string.
1844
1845 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1846 Walfred Tedeschi <walfred.tedeschi@intel.com>
1847
1848 * Makefile.in: Added rules to handle new files
1849 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1850 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1851 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1852 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1853 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1854 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1855 x32-avx512-linux.o.
1856 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1857 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1858 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1859 i386/x32-avx512.xml.
1860 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1861 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1862 i386/x32-avx512-linux.xml.
1863 * i387-fp.c (num_avx512_k_registers): New constant for number
1864 of K registers.
1865 (num_avx512_zmmh_low_registers): New constant for number of
1866 lower ZMM registers (0-15).
1867 (num_avx512_zmmh_high_registers): New constant for number of
1868 higher ZMM registers (16-31).
1869 (num_avx512_ymmh_registers): New contant for number of higher
1870 YMM registers (ymm16-31 added by avx521 on x86_64).
1871 (num_avx512_xmm_registers): New constant for number of higher
1872 XMM registers (xmm16-31 added by AVX512 on x86_64).
1873 (struct i387_xsave): Add space for AVX512 registers.
1874 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1875 Add code to handle AVX512 registers.
1876 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1877 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1878 prototypei from generated file.
1879 (tdesc_amd64_avx512_linux): Likewise.
1880 (init_registers_x32_avx512_linux): Likewise.
1881 (tdesc_x32_avx512_linux): Likewise.
1882 (init_registers_i386_avx512_linux): Likewise.
1883 (tdesc_i386_avx512_linux): Likewise.
1884 (x86_64_regmap): Add AVX512 registers.
1885 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1886 mask.
1887 (initialize_low_arch): Add code to initialize AVX512 registers.
1888
1889 2014-04-23 Pedro Alves <palves@redhat.com>
1890
1891 * mem-break.c (find_gdb_breakpoint_at): Make static.
1892 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1893
1894 2014-04-23 Pedro Alves <palves@redhat.com>
1895
1896 * i386-low.c: Don't include break-common.h here.
1897 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1898 prototype to take target_hw_bp_type as argument instead of a Z
1899 packet char.
1900 * i386-low.h: Include break-common.h here.
1901 (Z_packet_to_hw_type): Declare.
1902 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1903 prototypes.
1904 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1905 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1906 (x86_remove_point): Convert the packet number to a
1907 target_hw_bp_type before calling i386_low_remove_watchpoint.
1908 * win32-i386-low.c (i386_insert_point): Convert the packet number
1909 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1910 (i386_remove_point): Convert the packet number to a
1911 target_hw_bp_type before calling i386_low_remove_watchpoint.
1912
1913 2014-04-23 Pedro Alves <palves@redhat.com>
1914
1915 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1916
1917 2014-04-10 Pedro Alves <palves@redhat.com>
1918
1919 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1920 Check if the condition or command is NULL before checking if the
1921 breakpoint is known. On success, return true.
1922 * mem-break.h (add_breakpoint_condition): Document return.
1923 (add_breakpoint_commands): Add describing comment.
1924 * server.c (skip_to_semicolon): New function.
1925 (process_point_options): Use it.
1926
1927 2014-04-09 Pedro Alves <palves@redhat.com>
1928
1929 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1930 to lwpid_of.
1931
1932 2014-02-27 Pedro Alves <palves@redhat.com>
1933
1934 PR 12702
1935 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1936 macros.
1937 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1938 output.
1939 (last_thread_of_process_p): Take a PID argument instead of a
1940 thread pointer.
1941 (linux_wait_for_lwp): Delete.
1942 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1943 functions.
1944 (linux_low_filter_event): New function, party factored out from
1945 linux_wait_for_event.
1946 (linux_wait_for_event): Rename to ...
1947 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1948 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1949 sigsuspend. Check for zombie leaders.
1950 (linux_wait_for_event): Reimplement as wrapper around
1951 linux_wait_for_event_filtered.
1952 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1953 a normal or signal exit is seen, it's the whole process exiting.
1954 (wait_for_sigstop): No longer a for_each_inferior callback.
1955 Rewrite on top of linux_wait_for_event_filtered.
1956 (stop_all_lwps): Call wait_for_sigstop directly.
1957 * server.c (resume, handle_target_event): Handle
1958 TARGET_WAITKIND_NO_RESUMED.
1959
1960 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1961
1962 * win32-low.c (psapi_get_dll_name,
1963 * win32_CreateToolhelp32Snapshot): Delete.
1964 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1965 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1966 Delete.
1967 (handle_load_dll): Add function description.
1968 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1969
1970 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1971
1972 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1973 Add comment.
1974 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1975 base address when calling win32_add_one_solib.
1976 (handle_load_dll): Delete local variable load_addr.
1977 Remove 0x1000 offset applied to DLL base address when calling
1978 win32_add_one_solib.
1979 (handle_unload_dll): Add comment.
1980
1981 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1982
1983 * win32-low.c (win32_add_all_dlls): Renames
1984 win32_ensure_ntdll_loaded. Rewrite function documentation.
1985 Adjust implementation to always load all DLLs.
1986 Add 0x1000 offset to DLL base address when calling
1987 win32_add_one_solib.
1988 (child_initialization_done): New static global.
1989 (do_initial_child_stuff): Set child_initialization_done to
1990 zero during child initialization, and 1 after. Replace call
1991 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1992 Add comment.
1993 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1994 (handle_unload_dll): Add function documentation.
1995 (get_child_debug_event): Ignore load and unload DLL events
1996 during child initialization.
1997
1998 2014-02-20 Doug Evans <dje@google.com>
1999
2000 Remove global all_lwps.
2001 * inferiors.h (ptid_of): Move here from linux-low.h.
2002 (pid_of, lwpid_of): Ditto.
2003 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2004 parameter is a struct thread_info * now.
2005 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2006 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2007 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2008 directly.
2009 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2010 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2011 * linux-arm-low.c (update_registers_callback): Update, "entry"
2012 parameter is a struct thread_info * now.
2013 Fetch lwpid from current_inferior directly.
2014 (arm_insert_point): Pass &all_threads to find_inferior instead of
2015 &all_lwps.
2016 (arm_remove_point): Ditto.
2017 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2018 (arm_prepare_to_resume): Fetch pid from thread.
2019 (arm_read_description): Fetch lwpid from current_inferior directly.
2020 * linux-low.c (all_lwps): Delete.
2021 (delete_lwp): Delete call to remove_inferior.
2022 (handle_extended_wait): Fetch lwpid from thread.
2023 (add_lwp): Don't set lwp->entry.id. Remove call to
2024 add_inferior_to_list.
2025 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2026 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2027 (kill_one_lwp_callback): Ditto.
2028 (linux_kill): Don't dereference NULL pointer.
2029 Fetch ptid,lwpid from thread.
2030 (get_detach_signal): Fetch ptid from thread.
2031 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2032 Simplify call to regcache_invalidate_thread.
2033 (delete_lwp_callback): Update, "entry" parameter is a
2034 struct thread_info * now. Fetch pid from thread.
2035 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2036 (status_pending_p_callback): Update, "entry" parameter is a
2037 struct thread_info * now. Fetch ptid from thread.
2038 (find_lwp_pid): Update, "entry" parameter is a
2039 struct thread_info * now.
2040 (linux_wait_for_lwp): Fetch pid from thread.
2041 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2042 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2043 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2044 (dequeue_one_deferred_signal): Ditto.
2045 (cancel_breakpoint): Fetch ptid from current_inferior.
2046 (linux_wait_for_event): Pass &all_threads to find_inferior,
2047 not &all_lwps. Fetch ptid, lwpid from thread.
2048 (count_events_callback): Update, "entry" parameter is a
2049 struct thread_info * now.
2050 (select_singlestep_lwp_callback): Ditto.
2051 (select_event_lwp_callback): Ditto.
2052 (cancel_breakpoints_callback): Ditto.
2053 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2054 not &all_lwps.
2055 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2056 (unsuspend_one_lwp): Update, "entry" parameter is a
2057 struct thread_info * now.
2058 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2059 not &all_lwps.
2060 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2061 Fetch lwpid from thread, not lwp.
2062 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2063 Pass &all_threads to find_inferior, not &all_lwps.
2064 (send_sigstop): Fetch lwpid from thread, not lwp.
2065 (send_sigstop_callback): Update, "entry" parameter is a
2066 struct thread_info * now.
2067 (suspend_and_send_sigstop_callback): Ditto.
2068 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2069 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2070 struct thread_info * now.
2071 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2072 from thread, lwp.
2073 (lwp_running): Update, "entry" parameter is a
2074 struct thread_info * now.
2075 (stop_all_lwps): Fetch ptid from thread.
2076 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2077 (linux_resume_one_lwp): Fetch lwpid from thread.
2078 (linux_set_resume_request): Update, "entry" parameter is a
2079 struct thread_info * now. Fetch pid, lwpid from thread.
2080 (resume_status_pending_p): Update, "entry" parameter is a
2081 struct thread_info * now.
2082 (need_step_over_p): Ditto. Fetch lwpid from thread.
2083 (start_step_over): Fetch lwpid from thread.
2084 (linux_resume_one_thread): Update, "entry" parameter is a
2085 struct thread_info * now. Fetch lwpid from thread.
2086 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2087 (proceed_one_lwp): Update, "entry" parameter is a
2088 struct thread_info * now. Fetch lwpid from thread.
2089 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2090 struct thread_info * now.
2091 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2092 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2093 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2094 directly.
2095 (regsets_store_inferior_registers): Ditto.
2096 (fetch_register, store_register): Ditto.
2097 (linux_read_memory, linux_write_memory): Ditto.
2098 (linux_request_interrupt): Ditto.
2099 (linux_read_auxv): Ditto.
2100 (linux_xfer_siginfo): Ditto.
2101 (linux_qxfer_spu): Ditto.
2102 (linux_qxfer_libraries_svr4): Ditto.
2103 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2104 moved to inferiors.h.
2105 (get_lwp): Delete.
2106 (get_thread_lwp): Update.
2107 (struct lwp_info): Delete member "entry". Simplify comment for
2108 member "thread".
2109 (all_lwps): Delete.
2110 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2111 current_inferior directly.
2112 (update_watch_registers_callback): Update, "entry" parameter is a
2113 struct thread_info * now. Fetch pid from thread.
2114 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2115 (mips_insert_point): Fetch lwpid from current_inferior.
2116 Pass &all_threads to find_inferior, not &all_lwps.
2117 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2118 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2119 directly.
2120 (mips_stopped_data_address): Ditto.
2121 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2122 directly.
2123 * linux-tile-low.c (tile_arch_setup): Ditto.
2124 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2125 (update_debug_registers_callback): Update, "entry" parameter is a
2126 struct thread_info * now. Fetch pid from thread.
2127 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2128 Pass &all_threads to find_inferior, not &all_lwps.
2129 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2130 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2131 Pass &all_threads to find_inferior, not &all_lwps.
2132 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2133 (i386_dr_low_get_status): Ditto.
2134 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2135 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2136 (x86_linux_read_description): Ditto.
2137 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2138
2139 2014-02-20 Doug Evans <dje@google.com>
2140
2141 * inferiors.c (get_first_inferior): Fix buglet.
2142
2143 2014-02-19 Doug Evans <dje@google.com>
2144
2145 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2146 * inferiors.c (add_thread): Change result type to struct thread_info *.
2147 All callers updated.
2148 (add_lwp): Call add_thread here instead of in callers.
2149 All callers updated.
2150 * linux-low.h (get_lwp_thread): Rewrite.
2151 (struct lwp_info): New member "thread".
2152
2153 2014-02-19 Doug Evans <dje@google.com>
2154
2155 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2156 All callers updated.
2157
2158 2014-02-19 Doug Evans <dje@google.com>
2159
2160 * inferiors.c (add_thread): Fix whitespace.
2161
2162 2014-02-19 Doug Evans <dje@google.com>
2163
2164 * dll.c (clear_dlls): Replace accessing list implemention details
2165 with API function.
2166 * gdbthread.h (get_first_thread): Declare.
2167 * inferiors.c (for_each_inferior_with_data): New function.
2168 (get_first_thread): New function.
2169 (find_thread_ptid): Simplify.
2170 (get_first_inferior): New function.
2171 (clear_list): Delete.
2172 (one_inferior_p): New function.
2173 (clear_inferior_list): New function.
2174 (clear_inferiors): Update.
2175 * inferiors.h (for_each_inferior_with_data): Declare.
2176 (clear_inferior_list): Declare.
2177 (one_inferior_p): Declare.
2178 (get_first_inferior): Declare.
2179 * linux-low.c (linux_wait_for_event): Replace accessing list
2180 implemention details with API function.
2181 * server.c (target_running): Ditto.
2182 (accumulate_file_name_length): New function.
2183 (emit_dll_description): New function.
2184 (handle_qxfer_libraries): Replace accessing list implemention
2185 details with API function.
2186 (handle_qxfer_threads_worker): New function.
2187 (handle_qxfer_threads_proper): Replace accessing list implemention
2188 details with API function.
2189 (handle_query): Ditto.
2190 (visit_actioned_threads_callback_ftype): New typedef.
2191 (visit_actioned_threads_data): New struct.
2192 (visit_actioned_threads): Rewrite to be find_inferior callback.
2193 (resume): Call find_inferior.
2194 (handle_status): Replace accessing list implemention
2195 details with API function.
2196 (process_serial_event): Replace accessing list implemention details
2197 with API function.
2198 * target.c (set_desired_inferior): Replace accessing list implemention
2199 details with API function.
2200 * tracepoint.c (same_process_p): New function.
2201 (gdb_agent_about_to_close): Replace accessing list implemention
2202 details with API function.
2203 * win32-low.c (child_delete_thread): Replace accessing list
2204 implemention details with API function.
2205 (match_dll_by_basename): New function.
2206 (dll_is_loaded_by_basename): New function.
2207 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2208 details call to dll_is_loaded_by_basename.
2209
2210 2014-02-19 Doug Evans <dje@google.com>
2211
2212 * dll.h (struct dll_info): Add comment.
2213 * gdbthread.h (struct thread_info): Add comment.
2214 (current_ptid): Simplify.
2215 * inferiors.c (add_process): Update.
2216 (remove_process): Update.
2217 * inferiors.h (struct process_info): Rename member "head" to "entry".
2218 * linux-low.c (delete_lwp): Update.
2219 (add_lwp): Update.
2220 (last_thread_of_process_p): Update.
2221 (kill_one_lwp_callback, linux_kill): Update.
2222 (status_pending_p_callback): Update.
2223 (wait_for_sigstop): Update. Simplify read of ptid.
2224 (start_step_over): Update.
2225 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2226 (get_lwp_thread): Update.
2227 (struct lwp_info): Rename member "head" to "entry".
2228 * regcache.h (inferior_list_entry): Delete.
2229 * server.c (kill_inferior_callback): Update.
2230 (detach_or_kill_inferior_callback): Update.
2231 (print_started_pid): Update.
2232 (print_attached_pid): Update.
2233 (process_serial_event): Simplify read of ptid.
2234 * thread-db.c (thread_db_create_event): Update.
2235 (thread_db_get_tls_address): Update.
2236 * win32-low.c (current_inferior_ptid): Simplify.
2237
2238 2014-02-19 Tom Tromey <tromey@redhat.com>
2239
2240 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2241 argument.
2242 (target_supports_btrace): Update.
2243
2244 2014-02-14 Yao Qi <yao@codesourcery.com>
2245
2246 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2247 (rsp-low-ipa.o): New target.
2248
2249 2014-02-12 Tom Tromey <tromey@redhat.com>
2250
2251 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2252 convert_ascii_to_int.
2253 * regcache.c (registers_to_string): Likewise.
2254 * remote-utils.c (decode_M_packet): Likewise.
2255 * server.c (process_serial_event): Likewise.
2256
2257 2014-02-12 Tom Tromey <tromey@redhat.com>
2258
2259 * server.c (handle_query, handle_v_run): Use hex2bin, not
2260 unhexify.
2261 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2262
2263 2014-02-12 Tom Tromey <tromey@redhat.com>
2264
2265 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2266 convert_int_to_ascii.
2267 * regcache.c (registers_to_string, collect_register_as_string):
2268 Likewise.
2269 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2270 Likewise.
2271 * server.c (process_serial_event): Likewise.
2272 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2273 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2274
2275 2014-02-12 Tom Tromey <tromey@redhat.com>
2276
2277 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2278 bin2hex, not hexify.
2279 * tracepoint.c (cmd_qtstatus): Likewise.
2280
2281 2014-02-12 Tom Tromey <tromey@redhat.com>
2282
2283 * remote-utils.c (monitor_output): Pass explicit length to
2284 hexify.
2285
2286 2014-02-12 Tom Tromey <tromey@redhat.com>
2287
2288 * tracepoint.c: Include rsp-low.h.
2289 * server.c: Include rsp-low.h.
2290 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2291 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2292 declare.
2293 * remote-utils.c: Include rsp-low.h.
2294 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2295 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2296 (convert_int_to_ascii, convert_ascii_to_int): Move to
2297 common/rsp-low.c.
2298 * regcache.c: Include rsp-low.h.
2299 * ax.c: Include rsp-low.h.
2300 * Makefile.in (SFILES): Add common/rsp-low.c.
2301 (OBS): Add rsp-low.o.
2302 (rsp-low.o): New target.
2303
2304 2014-02-12 Tom Tromey <tromey@redhat.com>
2305
2306 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2307 Include print-utils.h.
2308 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2309 (plongest, thirty_two, phex_nz): Remove.
2310 * Makefile.in (SFILES): Add common/print-utils.c.
2311 (OBS): Add print-utils.o.
2312 (print-utils-ipa.o): New target.
2313 (print-utils.o): New target.
2314 (IPA_OBJS): Add print-utils-ipa.o.
2315
2316 2014-02-06 Tom Tromey <tromey@redhat.com>
2317
2318 * Makefile.in (SFILES): Fix indentation.
2319
2320 2014-02-05 Doug Evans <dje@google.com>
2321
2322 * linux-low.c (linux_wait_for_event): Improve comment.
2323 (linux_wait_1): Keep current_inferior in sync with event_child.
2324
2325 2014-01-22 Doug Evans <dje@google.com>
2326
2327 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2328
2329 2014-01-22 Doug Evans <dje@google.com>
2330
2331 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2332 * configure: Regenerate.
2333 * config.in: Regenerate.
2334 * Makefile.in (SFILES): Add debug.c.
2335 (OBS): Add debug.o.
2336 * debug.c: New file.
2337 * debug.h: New file.
2338 * linux-aarch64-low.c (*): Update all debugging printfs to use
2339 debug_printf instead of fprintf.
2340 * linux-arm-low.c (*): Ditto.
2341 * linux-cris-low.c (*): Ditto.
2342 * linux-crisv32-low.c (*): Ditto.
2343 * linux-m32r-low.c (*): Ditto.
2344 * linux-sparc-low.c (*): Ditto.
2345 * linux-x86.c (*): Ditto.
2346 * linux-low.c (*): Ditto.
2347 (linux_wait_1): Add calls to debug_enter, debug_exit.
2348 (linux_wait): Remove redundant debugging printf.
2349 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2350 (linux_resume, unstop_all_lwps): Ditto.
2351 * mem-break.c (*): Update all debugging printfs to use
2352 debug_printf instead of fprintf.
2353 * remote-utils.c (*): Ditto.
2354 * thread-db.c (*): Ditto.
2355 * server.c #include <ctype.h>, "gdb_vecs.h".
2356 (debug_threads): Moved to debug.c.
2357 (*): Update all debugging printfs to use debug_printf instead of
2358 fprintf.
2359 (start_inferior): Replace call to fflush with call to debug_flush.
2360 (monitor_show_help): Mention set debug-format.
2361 (parse_debug_format_options): New function.
2362 (handle_monitor_command): Handle "monitor set debug-format".
2363 (gdbserver_usage): Mention --debug-format.
2364 (main): Parse --debug-format.
2365 * server.h (debug_threads): Declaration moved to debug.h.
2366 #include "debug.h".
2367 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2368 trace_debug_1 that uses debug_printf.
2369 (tracepoint_look_up_symbols): Update all debugging printfs to use
2370 debug_printf instead of fprintf.
2371
2372 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2373
2374 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2375 sys/ptrace.h.
2376
2377 2014-01-17 Pedro Alves <palves@redhat.com>
2378
2379 PR build/16445
2380 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2381 defined after including gdb_proc_service.h.
2382
2383 2014-01-16 Doug Evans <dje@google.com>
2384
2385 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2386 (match_dll): Use it.
2387
2388 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2389
2390 * target.h (target_ops) <read_btrace>: Change parameters and
2391 return type to allow error reporting.
2392 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2393 trace reading errors on.
2394 * linux-low.c (linux_low_read_btrace): Pass trace reading
2395 errors on.
2396 (linux_low_disable_btrace): New.
2397
2398 2014-01-15 Doug Evans <dje@google.com>
2399
2400 * inferiors.c (thread_id_to_gdb_id): Delete.
2401 * inferiors.h (thread_id_to_gdb_id): Delete.
2402
2403 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2404
2405 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2406 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2407 versions.
2408
2409 2014-01-08 Pedro Alves <palves@redhat.com>
2410
2411 * server.c (handle_status): Don't discard previous queued stop
2412 replies or thread's pending status here.
2413 (main) <disconnection>: Do it here instead.
2414
2415 2014-01-08 Pedro Alves <palves@redhat.com>
2416
2417 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2418 * server.c (visit_actioned_threads, handle_pending_status): New
2419 function.
2420 (handle_v_cont): Factor out parts to ...
2421 (resume): ... this new function. If in all-stop, and a thread
2422 being resumed has a pending status, report it without actually
2423 resuming.
2424 (myresume): Adjust to use the new 'resume' function.
2425 (clear_pending_status_callback, set_pending_status_callback)
2426 (find_status_pending_thread_callback): New functions.
2427 (handle_status): Handle the case of multiple threads having
2428 interesting statuses to report. Report threads' real last signal
2429 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2430 with an interesting thread to report the status for, instead of
2431 always reporting the status of the first thread.
2432
2433 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2434
2435 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2436 * gdbreplay.c (gdbreplay_version): Likewise.
2437
2438 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2439
2440 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2441 iov.iov_len with the real length in use.
2442
2443 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2444
2445 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2446 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2447 for all targets that use win32-low.c.
2448 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2449 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2450
2451 2013-12-13 Pedro Alves <palves@redhat.com>
2452
2453 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2454 if equal to TARGET_WAITKIND_LOADED.
2455 * win32-low.c (cached_status): New static global.
2456 (win32_wait): Add declaration.
2457 (do_initial_child_stuff): Flush all initial pending debug events
2458 up to the initial breakpoint.
2459 (win32_wait): If CACHED_STATUS was set, return that instead
2460 of doing a real wait. Remove the code resuming the execution
2461 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2462 during the initial phase. Also remove the code changing
2463 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2464 TARGET_WAITKIND_STOPPED.
2465
2466 2013-12-11 Yao Qi <yao@codesourcery.com>
2467
2468 * notif.c (handle_notif_ack): Return 0 if no notification
2469 matches.
2470
2471 2013-11-20 Doug Evans <dje@google.com>
2472
2473 * linux-low.c (linux_set_resume_request): Fix comment.
2474
2475 2013-11-20 Doug Evans <dje@google.com>
2476
2477 * linux-low.c (resume_status_pending_p): Tweak comment.
2478
2479 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2480
2481 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2482 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2483 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2484 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2485 (srv_amd64_regobj): Add amd64-mpx.o.
2486 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2487 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2488 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2489 * i387-fp.c (num_pl_bnd_register) Added constant.
2490 (num_pl_bnd_cfg_registers) Added constant.
2491 (struct i387_xsave) Added reserved area and MPX fields.
2492 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2493 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2494 function.
2495 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2496 (init_registers_amd64_mpx_linux): Declare new function.
2497 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2498 (x86_64_regmap): Add MPX registers.
2499 (x86_linux_read_description): Add MPX case.
2500 (initialize_low_arch): Initialize MPX targets.
2501
2502 2013-11-18 Tom Tromey <tromey@redhat.com>
2503
2504 * configure: Rebuild.
2505 * configure.ac: Don't check for stdlib.h.
2506 * gdbreplay.c: Unconditionally include stdlib.h.
2507
2508 2013-11-18 Tom Tromey <tromey@redhat.com>
2509
2510 * config.in: Rebuild.
2511 * configure: Rebuild.
2512 * configure.ac: Don't use AC_HEADER_DIRENT.
2513
2514 2013-11-18 Tom Tromey <tromey@redhat.com>
2515
2516 * server.h: Don't check HAVE_STRING_H.
2517 * gdbreplay.c: Don't check HAVE_STRING_H.
2518 * configure: Rebuild.
2519
2520 2013-11-18 Tom Tromey <tromey@redhat.com>
2521
2522 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2523 LIBGNU.
2524
2525 2013-11-08 Tom Tromey <tromey@redhat.com>
2526
2527 * configure, config.in: Rebuild.
2528 * configure.ac: Remove unused configury.
2529
2530 2013-11-08 Tom Tromey <tromey@redhat.com>
2531
2532 * acinclude.m4: Include common.m4, codeset.m4.
2533 * configure, config.in: Rebuild.
2534 * configure.ac: Use GDB_AC_COMMON.
2535
2536 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2537
2538 * linux-s390-low.c (HWCAP_S390_TE): New define.
2539 (s390_arch_setup): Consider the TE field in the HWCAP for
2540 determining 'have_regset_tdb'.
2541
2542 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2543
2544 PR gdb/16014
2545 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2546 call to sizeof.
2547
2548 2013-10-02 Pedro Alves <palves@redhat.com>
2549
2550 * server.c (process_serial_event): Don't output "GDBserver
2551 exiting" if GDB is connected through stdio.
2552 * target.c (mywait): Likewise, be silent if GDB is connected
2553 through stdio.
2554
2555 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2556
2557 * lynx-low.c (lynx_add_threads_after_attach): New function.
2558 (lynx_attach): Remove call to add_thread. Add call to
2559 lynx_add_threads_after_attach instead.
2560
2561 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2562
2563 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2564 * config.in, configure: Regenerated.
2565
2566 2013-09-18 Yao Qi <yao@codesourcery.com>
2567
2568 PR server/15959
2569 * server.c (start_inferior): Clear 'resume_info'.
2570
2571 2013-09-16 Jiong Wang <jiwang@tilera.com>
2572
2573 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2574 for each register.
2575
2576 2013-09-16 Jiong Wang <jiwang@tilera.com>
2577
2578 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2579 linux-tile-low.o to srv_tgtobj.
2580
2581 2013-09-16 Will Newton <will.newton@linaro.org>
2582
2583 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2584 out regs.
2585
2586 2013-09-06 Pedro Alves <palves@redhat.com>
2587
2588 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2589 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2590 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2591 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2592 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2593 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2594
2595 2013-09-06 Pedro Alves <palves@redhat.com>
2596
2597 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2598 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2599
2600 2013-09-06 Pedro Alves <palves@redhat.com>
2601
2602 * linux-amd64-ipa.c: Include tracepoint.h.
2603 * linux-i386-ipa.c: Include tracepoint.h.
2604
2605 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2606
2607 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2608 (ps_get_thread_area): New function.
2609
2610 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2611
2612 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2613 (initialize_low_arch): Call init_registers_crisv32 rather than
2614 init_register_crisv32.
2615
2616 2013-09-05 Pedro Alves <palves@redhat.com>
2617
2618 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2619 to ...
2620 * hostio.h: ... this new file.
2621 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2622 win32-low.c: Include hostio.h.
2623
2624 2013-09-05 Pedro Alves <palves@redhat.com>
2625
2626 * server.h (gdb_client_data, handler_func, callback_handler_func)
2627 (delete_file_handler, add_file_handler, append_callback_event)
2628 (delete_callback_event, start_event_loop, initialize_event_loop):
2629 Move to event-loop.h and include it.
2630 * event-loop.h: New file.
2631
2632 2013-09-05 Pedro Alves <palves@redhat.com>
2633
2634 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2635 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2636 (loaded_dll, unloaded_dll): Move to ...
2637 * dll.h: ... this new file.
2638 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2639
2640 2013-09-05 Pedro Alves <palves@redhat.com>
2641
2642 * server.h (current_process, get_thread_process, all_processes)
2643 (add_inferior_to_list, for_each_inferior, current_inferior)
2644 (remove_inferior, add_process, remove_process, find_process_pid)
2645 (have_started_inferiors_p, have_attached_inferiors_p)
2646 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2647 (clear_inferiors, find_inferior, find_inferior_id)
2648 (inferior_target_data, set_inferior_target_data)
2649 (inferior_regcache_data, set_inferior_regcache_data): Move to
2650 inferiors.h, and include it.
2651 * inferiors.h: New file.
2652
2653 2013-09-05 Pedro Alves <palves@redhat.com>
2654
2655 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2656 Move ...
2657 * ax.h: ... here.
2658
2659 2013-09-05 Pedro Alves <palves@redhat.com>
2660
2661 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2662 tracepoint.h.
2663 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2664 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2665 (handle_tracepoint_general_set, handle_tracepoint_query)
2666 (tracepoint_finished_step, tracepoint_was_hit)
2667 (release_while_stepping_state_list, current_traceframe)
2668 (in_readonly_region, traceframe_read_mem)
2669 (fetch_traceframe_registers, traceframe_read_sdata)
2670 (traceframe_read_info, struct fast_tpoint_collect_status)
2671 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2672 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2673 (supply_fast_tracepoint_registers)
2674 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2675 (ipa_tdesc, claim_trampoline_space)
2676 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2677 (agent_mem_read, agent_get_trace_state_variable_value)
2678 (agent_set_trace_state_variable_value, agent_tsv_read)
2679 (agent_mem_read_string, get_raw_reg_func_addr)
2680 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2681 * tracepoint.h: ... this new file.
2682
2683 2013-09-05 Pedro Alves <palves@redhat.com>
2684
2685 * server.h (perror_with_name, error, fatal, warning, paddress)
2686 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2687 include it.
2688 * utils.h: New file.
2689
2690 2013-09-05 Pedro Alves <palves@redhat.com>
2691
2692 * server.h (remote_debug, noack_mode, transport_is_reliable)
2693 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2694 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2695 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2696 (write_enn, initialize_async_io, enable_async_io)
2697 (disable_async_io, check_remote_input_interrupt_request)
2698 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2699 (dead_thread_notify, prepare_resume_reply)
2700 (decode_address_to_semicolon, decode_address, decode_m_packet)
2701 (decode_M_packet, decode_X_packet, decode_xfer_write)
2702 (decode_search_memory_packet, unhexify, hexify)
2703 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2704 (look_up_one_symbol, relocate_instruction)
2705 (monitor_output): Move to remote-utils.h, and include it.
2706 * remote-utils.h: New file.
2707
2708 2013-09-05 Pedro Alves <palves@redhat.com>
2709
2710 * server.h (_): Delete.
2711
2712 2013-09-02 Pedro Alves <palves@redhat.com>
2713
2714 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2715 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2716 allocated.
2717 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2718
2719 2013-09-02 Pierre Muller <muller@sourceware.org>
2720
2721 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2722 or WriteProcessMemory complete successfully and handle
2723 ERROR_PARTIAL_COPY error.
2724
2725 2013-09-02 Pedro Alves <palves@redhat.com>
2726
2727 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2728 error instead of EIO.
2729
2730 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2731
2732 PR server/15604
2733 * linux-low.c: Include filestuff.h.
2734 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2735 * lynx-low.c: Include filestuff.h.
2736 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2737 * server.c: Include filestuff.h.
2738 (main): Call notice_open_fds.
2739 * spu-low.c: Include filestuff.h.
2740 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2741
2742 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2743
2744 * Makefile.in: Explain why ../target and ../nat are not
2745 listed as include file search paths.
2746 (linux-waitpid.o): New object file rule.
2747 * configure.srv (srv_native_linux_obj): New variable.
2748 Replace all occurrences of linux native object files with
2749 $srv_native_linux_obj.
2750 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2751 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2752 (linux_enable_event_reporting): Remove declaration.
2753 (my_waitpid): Moved to common/linux-waitpid.c.
2754 (linux_wait_for_event): Pass ptid when calling
2755 linux_enable_event_reporting.
2756 (linux_supports_tracefork_flag): Remove.
2757 (linux_enable_event_reporting): Likewise.
2758 (linux_tracefork_grandchild): Remove.
2759 (STACK_SIZE): Moved to common/linux-ptrace.c.
2760 (linux_tracefork_child): Remove.
2761 (linux_test_for_tracefork): Remove.
2762 (linux_look_up_symbols): Call linux_supports_traceclone.
2763 (initialize_low): Remove call to linux_test_for_tracefork.
2764 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2765 common/linux-ptrace.h.
2766 (PTRACE_TYPE_ARG4): Likewise.
2767 Include linux-ptrace.h.
2768
2769 2013-08-21 Pedro Alves <palves@redhat.com>
2770
2771 * config.in: Renegerate.
2772
2773 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2774
2775 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2776 (SFILES): Remove $(srcdir)/common/target-common.c and
2777 add $(srcdir)/target/waitstatus.c.
2778 (OBS): Remove target-common.o and add waitstatus.o.
2779 (server_h): Remove $(srcdir)/../common/target-common.h and
2780 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2781 and $(srcdir)/../target/waitstatus.h.
2782 (target-common.o): Remove.
2783 (waitstatus.o): New target object file.
2784 * target.h: Do not include target-common.h and
2785 include target/resume.h, target/wait.h and
2786 target/waitstatus.h.
2787
2788 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2789
2790 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2791 to PTRACE_TYPE_ARG3.
2792 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2793 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2794 PTRACE_TYPE_ARG4.
2795 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2796 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2797
2798 2013-07-27 Jie Zhang <jie@codesourcery.com>
2799 Daniel Jacobowitz <dan@codesourcery.com>
2800 Yao Qi <yao@codesourcery.com>
2801
2802 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2803 (mips-linux-watch.o): New rule.
2804 (mips_linux_watch_h): New variable.
2805 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2806 srv_tgtobj.
2807 * linux-mips-low.c: Include mips-linux-watch.h.
2808 (struct arch_process_info, struct arch_lwp_info): New.
2809 (update_watch_registers_callback): New function.
2810 (mips_linux_new_process, mips_linux_new_thread) New functions.
2811 (mips_linux_prepare_to_resume, mips_insert_point): New
2812 functions.
2813 (mips_remove_point, mips_stopped_by_watchpoint): New
2814 functions.
2815 (rsp_bp_type_to_target_hw_bp_type): New function.
2816 (mips_stopped_data_address): New function.
2817 (the_low_target): Add watchpoint support functions.
2818
2819 2013-07-27 Yao Qi <yao@codesourcery.com>
2820
2821 * i386-low.c: Include break-common.h.
2822 (enum target_hw_bp_type): Remove.
2823
2824 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2825
2826 * Makefile.in (SFILES): /common/target-common.c.
2827 (OBS): Add target-common.o.
2828 (server_h): Add $(srcdir)/../common/target-common.h.
2829 (target-common.o): New target.
2830 * server.c (queue_stop_reply_callback): Free
2831 status string after use.
2832 * target.c (target_waitstatus_to_string): Remove.
2833 * target.h: Include target-common.h.
2834 (resume_kind): Likewise.
2835 (target_waitkind): Likewise.
2836 (target_waitstatus): Likewise.
2837 (TARGET_WNOHANG): Likewise.
2838
2839 2013-07-04 Yao Qi <yao@codesourcery.com>
2840
2841 * Makefile.in (host_alias): Use @host_noncanonical@.
2842 (target_alias): Use @target_noncanonical@.
2843 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2844 ACX_NONCANONICAL_HOST.
2845 * configure: Regenerated.
2846
2847 Revert:
2848 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2849
2850 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2851 * configure: Rebuild.
2852 * Makefile.in (version_host, version_target): Get from configure.
2853 (version.c): Use $(version_host) and $(version_target).
2854
2855 2013-07-03 Pedro Alves <palves@redhat.com>
2856
2857 * Makefile.in (config.status): Depend on development.sh.
2858 * acinclude.m4: Include libmcheck.m4.
2859 * configure: Regenerate.
2860
2861 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2862
2863 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2864 attribute inside the parentheses.
2865 (winapi_DebugSetProcessKillOnExit): Ditto.
2866 (winapi_DebugBreakProcess): Ditto.
2867 (winapi_GenerateConsoleCtrlEvent): Ditto.
2868
2869 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2870
2871 * notif.h (notif_event): Add a dummy member to avoid compiler
2872 errors.
2873
2874 2013-07-01 Pedro Alves <palves@redhat.com>
2875
2876 * hostio.c (HOSTIO_PATH_MAX): Define.
2877 (require_filename, handle_open, handle_unlink, handle_readlink):
2878 Use it.
2879
2880 2013-07-01 Pedro Alves <palves@redhat.com>
2881
2882 * server.h: Include "pathmax.h".
2883 * linux-low.c: Don't include sys/param.h.
2884 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2885 MAXPATHLEN.
2886 * win32-low.c: Don't include sys/param.h.
2887 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2888
2889 2013-07-01 Pedro Alves <palves@redhat.com>
2890
2891 * event-loop.c: Don't check HAVE_UNISTD_H before including
2892 <unistd.h>.
2893 * gdbreplay.c: Likewise.
2894 * remote-utils.c: Likewise.
2895 * server.c: Likewise.
2896 * configure.ac: Don't check for unistd.h.
2897 * configure: Regenerate.
2898
2899 2013-06-28 Tom Tromey <tromey@redhat.com>
2900
2901 * Makefile.in (version.c): Use version.in, not
2902 common/version.in.
2903
2904 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2905
2906 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2907 * configure: Rebuild.
2908 * Makefile.in (version_host, version_target): Get from configure.
2909 (version.c): Use $(version_host) and $(version_target).
2910
2911 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2912
2913 Fix trace-status to output user name without trailing colon.
2914 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2915
2916 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2917
2918 Fix trace-status to output proper start-time and stop-time.
2919 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2920 output start time and stop time in hex as gdb expects.
2921
2922 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2923
2924 * tracepoint.c (build_traceframe_info_xml): Output trace state
2925 variables present in the trace buffer.
2926
2927 2013-06-24 Tom Tromey <tromey@redhat.com>
2928
2929 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2930 create-version.sh.
2931 (version.o): Remove.
2932 * gdbreplay.c: Include version.h.
2933 (version, host_name): Don't declare.
2934 * server.h: Include version.h.
2935 (version, host_name): Don't declare.
2936
2937 2013-06-12 Pedro Alves <palves@redhat.com>
2938
2939 * linux-x86-low.c (linux_is_elf64): Delete global.
2940 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2941 with local linux_pid_exe_is_elf_64_file use.
2942
2943 2013-06-11 Pedro Alves <palves@redhat.com>
2944
2945 * linux-low.c (regset_disabled, disable_regset): New functions.
2946 (regsets_fetch_inferior_registers)
2947 (regsets_store_inferior_registers): Use them.
2948 (initialize_regsets_info); Don't allocate the disabled_regsets
2949 array here.
2950 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2951 comment.
2952
2953 2013-06-11 Pedro Alves <palves@redhat.com>
2954
2955 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2956 xmalloc.
2957
2958 2013-06-11 Pedro Alves <palves@redhat.com>
2959
2960 * linux-x86-low.c (initialize_low_arch): Call
2961 init_registers_x32_avx_linux.
2962
2963 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2964
2965 Fix compatibility with Android Bionic.
2966 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2967 it is not empty.
2968
2969 2013-06-07 Pedro Alves <palves@redhat.com>
2970
2971 PR server/14823
2972 * Makefile.in (OBS): Add tdesc.o.
2973 (IPA_OBJS): Add tdesc-ipa.o.
2974 (tdesc-ipa.o): New rule.
2975 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2976 interface.
2977 * linux-low.c (new_inferior): Delete.
2978 (disabled_regsets, num_regsets): Delete.
2979 (linux_add_process): Adjust to set the new per-process
2980 new_inferior flag.
2981 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2982 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2983 was a stop. When calling arch_setup, switch the current inferior
2984 to the thread that got an event.
2985 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2986 (regsets_fetch_inferior_registers)
2987 (regsets_store_inferior_registers): New regsets_info parameter.
2988 Adjust to use it.
2989 (linux_register_in_regsets): New regs_info parameter. Adjust to
2990 use it.
2991 (register_addr, fetch_register, store_register): New usrregs_info
2992 parameter. Adjust to use it.
2993 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2994 parameter regs_info. Adjust to use it.
2995 (linux_fetch_registers): Get the current inferior's regs_info, and
2996 adjust to use it.
2997 (linux_store_registers): Ditto.
2998 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2999 (initialize_low): Don't initialize the target_regsets here. Call
3000 initialize_low_arch.
3001 * linux-low.h (target_regsets): Delete declaration.
3002 (struct regsets_info): New.
3003 (struct usrregs_info): New.
3004 (struct regs_info): New.
3005 (struct process_info_private) <new_inferior>: New field.
3006 (struct linux_target_ops): Delete the num_regs, regmap, and
3007 regset_bitmap fields. New field regs_info.
3008 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3009 * i387-fp.c (num_xmm_registers): Delete.
3010 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3011 calls to new interface.
3012 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3013 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3014 Infer the number of xmm registers from the regcache's target
3015 description.
3016 * i387-fp.h (num_xmm_registers): Delete.
3017 * inferiors.c (add_thread): Don't install the thread's regcache
3018 here.
3019 * proc-service.c (gregset_info): Fetch the current inferior's
3020 regs_info. Adjust to use it.
3021 * regcache.c: Include tdesc.h.
3022 (register_bytes, reg_defs, num_registers)
3023 (gdbserver_expedite_regs): Delete.
3024 (get_thread_regcache): If the thread doesn't have a regcache yet,
3025 create one, instead of aborting gdbserver.
3026 (regcache_invalidate_one): Rename to ...
3027 (regcache_invalidate_thread): ... this.
3028 (regcache_invalidate_one): New.
3029 (regcache_invalidate): Only invalidate registers of the current
3030 process.
3031 (init_register_cache): Add target_desc parameter, and use it.
3032 (new_register_cache): Ditto. Assert the target description has a
3033 non zero registers_size.
3034 (regcache_cpy): Add assertions. Adjust.
3035 (realloc_register_cache, set_register_cache): Delete.
3036 (registers_to_string, registers_from_string): Adjust.
3037 (find_register_by_name, find_regno, find_register_by_number)
3038 (register_cache_size): Add target_desc parameter, and use it.
3039 (free_register_cache_thread, free_register_cache_thread_one)
3040 (regcache_release, register_cache_size): New.
3041 (register_size): Add target_desc parameter, and use it.
3042 (register_data, supply_register, supply_register_zeroed)
3043 (supply_regblock, supply_register_by_name, collect_register)
3044 (collect_register_as_string, collect_register_by_name): Adjust.
3045 * regcache.h (struct target_desc): Forward declare.
3046 (struct regcache) <tdesc>: New field.
3047 (init_register_cache, new_register_cache): Add target_desc
3048 parameter.
3049 (regcache_invalidate_thread): Declare.
3050 (regcache_invalidate_one): Delete declaration.
3051 (regcache_release): Declare.
3052 (find_register_by_number, register_cache_size, register_size)
3053 (find_regno): Add target_desc parameter.
3054 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3055 declarations.
3056 * remote-utils.c: Include tdesc.h.
3057 (outreg, prepare_resume_reply): Adjust.
3058 * server.c: Include tdesc.h.
3059 (gdbserver_xmltarget): Delete declaration.
3060 (get_features_xml, process_serial_event): Adjust.
3061 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3062 declare.
3063 (struct process_info) <tdesc>: New field.
3064 (ipa_tdesc): Declare.
3065 * tdesc.c: New file.
3066 * tdesc.h: New file.
3067 * tracepoint.c: Include tdesc.h.
3068 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3069 (get_context_regcache): Adjust to pass ipa_tdesc down.
3070 (do_action_at_tracepoint): Adjust to get the register cache size
3071 from the context regcache's description.
3072 (traceframe_walk_blocks): Adjust to get the register cache size
3073 from the current trace frame's description.
3074 (traceframe_get_pc): Adjust to get current trace frame's
3075 description and pass it down.
3076 (gdb_collect): Adjust to get the register cache size from the
3077 IPA's description.
3078 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3079 (gdbserver_xmltarget): Delete.
3080 (initialize_low_tracepoint): Set the ipa's target description.
3081 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3082 (initialize_low_tracepoint): Set the ipa's target description.
3083 * linux-x86-low.c: Include tdesc.h.
3084 [__x86_64__] (is_64bit_tdesc): New.
3085 (ps_get_thread_area, x86_get_thread_area): Use it.
3086 (i386_cannot_store_register): Rename to ...
3087 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3088 (i386_cannot_fetch_register): Rename to ...
3089 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3090 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3091 to new interface.
3092 (target_regsets): Rename to ...
3093 (x86_regsets): ... this.
3094 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3095 interface.
3096 (x86_siginfo_fixup): Use is_64bit_tdesc.
3097 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3098 (tdesc_x32_avx_linux, tdesc_x32_linux)
3099 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3100 Declare.
3101 (x86_linux_update_xmltarget): Delete.
3102 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3103 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3104 (AMD64_LINUX_USER64_CS): New.
3105 (x86_linux_read_description): New, based on
3106 x86_linux_update_xmltarget.
3107 (same_process_callback): New.
3108 (x86_arch_setup_process_callback): New.
3109 (x86_linux_update_xmltarget): New.
3110 (x86_regsets_info): New.
3111 (amd64_linux_regs_info): New.
3112 (i386_linux_usrregs_info): New.
3113 (i386_linux_regs_info): New.
3114 (x86_linux_regs_info): New.
3115 (x86_arch_setup): Reimplement.
3116 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3117 (x86_emit_ops): Ditto.
3118 (the_low_target): Adjust. Install x86_linux_regs_info,
3119 x86_cannot_fetch_register, and x86_cannot_store_register.
3120 (initialize_low_arch): New.
3121 * linux-ia64-low.c (tdesc_ia64): Declare.
3122 (ia64_fetch_register): Adjust.
3123 (ia64_usrregs_info, regs_info): New globals.
3124 (ia64_regs_info): New function.
3125 (the_low_target): Adjust.
3126 (initialize_low_arch): New function.
3127 * linux-sparc-low.c (tdesc_sparc64): Declare.
3128 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3129 Adjust.
3130 (sparc_arch_setup): New function.
3131 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3132 (the_low_target): Adjust.
3133 (initialize_low_arch): New function.
3134 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3135 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3136 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3137 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3138 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3139 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3140 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3141 (tdesc_powerpc_isa205_vsx64l): Declare.
3142 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3143 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3144 (ppc_set_pc, ppc_get_hwcap): Adjust.
3145 (ppc_usrregs_info): Forward declare.
3146 (!__powerpc64__) ppc_regmap_adjusted: New global.
3147 (ppc_arch_setup): Adjust to the current process'es target
3148 description.
3149 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3150 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3151 (ppc_store_evrregset): Adjust.
3152 (target_regsets): Rename to ...
3153 (ppc_regsets): ... this, and make static.
3154 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3155 (ppc_regs_info): New function.
3156 (the_low_target): Adjust.
3157 (initialize_low_arch): New function.
3158 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3159 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3160 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3161 (tdesc_s390x_linux64v2): Declare.
3162 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3163 (s390_fill_gregset, s390_store_last_break): Adjust.
3164 (target_regsets): Rename to ...
3165 (s390_regsets): ... this, and make static.
3166 (s390_get_pc, s390_set_pc): Adjust.
3167 (s390_get_hwcap): New target_desc parameter, and use it.
3168 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3169 (s390_arch_setup): Adjust to set the current process'es target
3170 description. Don't adjust the regmap.
3171 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3172 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3173 (regs_info_3264): New globals.
3174 (s390_regs_info): New function.
3175 (the_low_target): Adjust.
3176 (initialize_low_arch): New function.
3177 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3178 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3179 [__mips64] (init_registers_mips_linux)
3180 (init_registers_mips_dsp_linux): Delete defines.
3181 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3182 (have_dsp): New global.
3183 (mips_read_description): New, based on mips_arch_setup.
3184 (mips_arch_setup): Reimplement.
3185 (get_usrregs_info): New function.
3186 (mips_cannot_fetch_register, mips_cannot_store_register)
3187 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3188 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3189 (target_regsets): Rename to ...
3190 (mips_regsets): ... this, and make static.
3191 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3192 (dsp_regs_info, regs_info): New globals.
3193 (mips_regs_info): New function.
3194 (the_low_target): Adjust.
3195 (initialize_low_arch): New function.
3196 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3197 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3198 Declare.
3199 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3200 (arm_read_description): New, with bits factored from
3201 arm_arch_setup.
3202 (arm_arch_setup): Reimplement.
3203 (target_regsets): Rename to ...
3204 (arm_regsets): ... this, and make static.
3205 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3206 (arm_regs_info): New function.
3207 (the_low_target): Adjust.
3208 (initialize_low_arch): New function.
3209 * linux-m68k-low.c (tdesc_m68k): Declare.
3210 (target_regsets): Rename to ...
3211 (m68k_regsets): ... this, and make static.
3212 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3213 (m68k_regs_info): New function.
3214 (m68k_arch_setup): New function.
3215 (the_low_target): Adjust.
3216 (initialize_low_arch): New function.
3217 * linux-sh-low.c (tdesc_sharch): Declare.
3218 (target_regsets): Rename to ...
3219 (sh_regsets): ... this, and make static.
3220 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3221 (sh_regs_info, sh_arch_setup): New functions.
3222 (the_low_target): Adjust.
3223 (initialize_low_arch): New function.
3224 * linux-bfin-low.c (tdesc_bfin): Declare.
3225 (bfin_arch_setup): New function.
3226 (bfin_usrregs_info, regs_info): New globals.
3227 (bfin_regs_info): New function.
3228 (the_low_target): Adjust.
3229 (initialize_low_arch): New function.
3230 * linux-cris-low.c (tdesc_cris): Declare.
3231 (cris_arch_setup): New function.
3232 (cris_usrregs_info, regs_info): New globals.
3233 (cris_regs_info): New function.
3234 (the_low_target): Adjust.
3235 (initialize_low_arch): New function.
3236 * linux-cris-low.c (tdesc_crisv32): Declare.
3237 (cris_arch_setup): New function.
3238 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3239 (cris_regs_info): New function.
3240 (the_low_target): Adjust.
3241 (initialize_low_arch): New function.
3242 * linux-m32r-low.c (tdesc_m32r): Declare.
3243 (m32r_arch_setup): New function.
3244 (m32r_usrregs_info, regs_info): New globals.
3245 (m32r_regs_info): Adjust.
3246 (initialize_low_arch): New function.
3247 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3248 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3249 (tic6x_usrregs_info): Forward declare.
3250 (tic6x_read_description): New function, based on ...
3251 (tic6x_arch_setup): ... this. Reimplement.
3252 (target_regsets): Rename to ...
3253 (tic6x_regsets): ... this, and make static.
3254 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3255 (tic6x_regs_info): New function.
3256 (the_low_target): Adjust.
3257 (initialize_low_arch): New function.
3258 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3259 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3260 (target_regsets): Rename to ...
3261 (xtensa_regsets): ... this, and make static.
3262 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3263 globals.
3264 (xtensa_arch_setup, xtensa_regs_info): New functions.
3265 (the_low_target): Adjust.
3266 (initialize_low_arch): New function.
3267 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3268 (nios2_arch_setup): Set the current process'es tdesc.
3269 (target_regsets): Rename to ...
3270 (nios2_regsets): ... this.
3271 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3272 (nios2_regs_info): New function.
3273 (the_low_target): Adjust.
3274 (initialize_low_arch): New function.
3275 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3276 (aarch64_arch_setup): Set the current process'es tdesc.
3277 (target_regsets): Rename to ...
3278 (aarch64_regsets): ... this.
3279 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3280 (aarch64_regs_info): New function.
3281 (the_low_target): Adjust.
3282 (initialize_low_arch): New function.
3283 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3284 globals.
3285 (target_regsets): Rename to ...
3286 (tile_regsets): ... this.
3287 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3288 (tile_regs_info): New function.
3289 (tile_arch_setup): Set the current process'es tdesc.
3290 (the_low_target): Adjust.
3291 (initialize_low_arch): New function.
3292 * spu-low.c (tdesc_spu): Declare.
3293 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3294 * win32-arm-low.c (tdesc_arm): Declare.
3295 (arm_arch_setup): New function.
3296 (the_low_target): Install arm_arch_setup instead of
3297 init_registers_arm.
3298 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3299 (init_windows_x86): Rename to ...
3300 (i386_arch_setup): ... this. Set `win32_tdesc'.
3301 (the_low_target): Adjust.
3302 * win32-low.c (win32_tdesc): New global.
3303 (child_add_thread): Don't create the thread cache here.
3304 (do_initial_child_stuff): Set the new process'es tdesc.
3305 * win32-low.h (struct target_desc): Forward declare.
3306 (win32_tdesc): Declare.
3307 * lynx-i386-low.c (tdesc_i386): Declare global.
3308 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3309 * lynx-low.c (lynx_tdesc): New global.
3310 (lynx_add_process): Set the new process'es tdesc.
3311 * lynx-low.h (struct target_desc): Forward declare.
3312 (lynx_tdesc): Declare global.
3313 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3314 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3315 * nto-low.c (nto_tdesc): New global.
3316 (do_attach): Set the new process'es tdesc.
3317 * nto-low.h (struct target_desc): Forward declare.
3318 (nto_tdesc): Declare.
3319 * nto-x86-low.c (tdesc_i386): Declare.
3320 (nto_x86_arch_setup): Set `nto_tdesc'.
3321
3322 2013-06-04 Gary Benson <gbenson@redhat.com>
3323
3324 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3325 to qSupported response when appropriate.
3326 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3327 with nonzero-length annex.
3328 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3329 arguments supplied in annex.
3330
3331 2013-05-31 Doug Evans <dje@google.com>
3332
3333 PR server/15594
3334 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3335 64 bits in 64-cross-32 environment.
3336
3337 2013-05-28 Pedro Alves <palves@redhat.com>
3338
3339 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3340 (aarch64-without-fpu.c): Delete rule.
3341 * configure.srv (aarch64*-*-linux*): Remove references to
3342 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3343 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3344 declaration.
3345
3346 2013-05-24 Pedro Alves <palves@redhat.com>
3347
3348 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3349 instead of strchr/decode_address. Error if the range isn't split
3350 with a ','. Don't assume there's be a ':' in the action.
3351
3352 2013-05-23 Yao Qi <yao@codesourcery.com>
3353 Pedro Alves <palves@redhat.com>
3354
3355 * linux-low.c (lwp_in_step_range): New function.
3356 (linux_wait_1): If the thread was range stepping and stopped
3357 outside the stepping range, report the stop to GDB. Otherwise,
3358 continue stepping. Add range stepping debug output.
3359 (linux_set_resume_request): Copy the step range from the resume
3360 request to the lwp.
3361 (linux_supports_range_stepping): New.
3362 (linux_target_ops) <supports_range_stepping>: Set to
3363 linux_supports_range_stepping.
3364 * linux-low.h (struct linux_target_ops)
3365 <supports_range_stepping>: New field.
3366 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3367 * linux-x86-low.c (x86_supports_range_stepping): New.
3368 (the_low_target) <supports_range_stepping>: Set to
3369 x86_supports_range_stepping.
3370 * server.c (handle_v_cont): Handle 'r' action.
3371 (handle_v_requests): Append ";r" if the target supports range
3372 stepping.
3373 * target.h (struct thread_resume) <step_range_start,
3374 step_range_end>: New fields.
3375 (struct target_ops) <supports_range_stepping>:
3376 New field.
3377 (target_supports_range_stepping): New macro.
3378
3379 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3380
3381 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3382 confusion in comment.
3383
3384 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3385
3386 * lynx-low.c (struct process_info_private): New type.
3387 (lynx_add_process): New function.
3388 (lynx_create_inferior, lynx_attach): Replace calls to
3389 add_process by calls to lynx_add_process.
3390 (lynx_resume): If PTID is null, then try using
3391 current_process()->private->last_wait_event_ptid.
3392 Add comments.
3393 (lynx_clear_inferiors): Delete. The contents of that function
3394 has been inlined in lynx_mourn;
3395 (lynx_wait_1): Save the ptid in the process's private data.
3396 (lynx_mourn): Free the process' private data. Replace call
3397 to lynx_clear_inferiors by call to clear_inferiors.
3398
3399 2013-05-17 Yao Qi <yao@codesourcery.com>
3400
3401 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3402 the right place.
3403
3404 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3405
3406 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3407 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3408 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3409 PT_TEXT_END_ADDR guards. Update comments.
3410 (linux_target_op) <read_offsets>: Conditionally define to
3411 linux_read_offsets if the target is UCLIBC and if it defines
3412 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3413
3414 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3415 Andrew Jenner <andrew@codesourcery.com>
3416
3417 * Makefile.in (SFILES): Add linux-nios2-low.c.
3418 (clean): Add action to delete nios2-linux.c.
3419 (nios2-linux.c): New rule.
3420 * configure.srv: Add nios2*-*-linux*.
3421 * linux-nios2-low.c: New.
3422
3423 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3424
3425 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3426
3427 2013-04-25 Hui Zhu <hui@codesourcery.com>
3428
3429 PR gdb/15186
3430 * ax.c (ax_printf): Add fflush.
3431
3432 2013-04-22 Tom Tromey <tromey@redhat.com>
3433
3434 * Makefile.in (SFILES): Add filestuff.c.
3435 (OBS): Add filestuff.o.
3436 (filestuff.o): New target.
3437 * config.in, configure: Rebuild.
3438 * configure.ac: Check for fdwalk, pipe2.
3439
3440 2013-04-17 Pedro Alves <palves@redhat.com>
3441
3442 * configure.ac (USE_THREAD_DB): Delete variable.
3443 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3444 Don't AC_SUBST USE_THREAD_DB.
3445 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3446 * config.in, configure: Regenerate.
3447
3448 2013-04-16 Pedro Alves <palves@redhat.com>
3449
3450 * linux-low.h (struct lwp_info) <thread_known>: Move under
3451 the USE_THREAD_DB #ifdef.
3452
3453 2013-04-16 Pedro Alves <palves@redhat.com>
3454
3455 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3456 (linux-low.o): Delete rule.
3457 * linux-low.h: Always include "gdb_thread_db.h" instead of
3458 conditionally including thread_db.h.
3459 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3460 HAVE_THREAD_DB_H.
3461
3462 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3463
3464 * Makefile.in (install-only): Fix make install regression.
3465
3466 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3467
3468 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3469 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3470 installation.
3471 * gdbserver.1: Remove.
3472
3473 2013-03-22 Pedro Alves <palves@redhat.com>
3474
3475 * linux-low.c (handle_extended_wait): Don't call
3476 linux_enable_event_reporting.
3477
3478 2013-03-15 Tony Theodore <tonyt@logyst.com>
3479
3480 PR build/9098:
3481 * Makefile.in (SHELL): Use @SHELL@.
3482
3483 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3484
3485 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3486 compiler warning.
3487
3488 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3489
3490 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3491 Remove extraneous NULL element.
3492
3493 2013-03-13 Yao Qi <yao@codesourcery.com>
3494
3495 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3496 'V' block in trace frame.
3497
3498 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3499
3500 * target.h (struct target_ops): Add btrace ops.
3501 (target_supports_btrace): New macro.
3502 (target_enable_btrace): New macro.
3503 (target_disable_btrace): New macro.
3504 (target_read_btrace): New macro.
3505 * gdbthread.h (struct thread_info): Add btrace field.
3506 * server.c: Include btrace-common.h.
3507 (handle_btrace_general_set): New function.
3508 (handle_btrace_enable): New function.
3509 (handle_btrace_disable): New function.
3510 (handle_general_set): Call handle_btrace_general_set.
3511 (handle_qxfer_btrace): New function.
3512 (struct qxfer qxfer_packets[]): Add btrace entry.
3513 * inferiors.c (remove_thread): Disable btrace.
3514 * linux-low: Include linux-btrace.h.
3515 (linux_low_enable_btrace): New function.
3516 (linux_low_read_btrace): New function.
3517 (linux_target_ops): Add btrace ops.
3518 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3519 Add srv_linux_btrace=yes.
3520 (x86_64-*-linux*): Add linux-btrace.o.
3521 Add srv_linux_btrace=yes.
3522 * configure.ac: Define HAVE_LINUX_BTRACE.
3523 * config.in: Regenerated.
3524 * configure: Regenerated.
3525
3526 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3527
3528 * server.c (handle_qxfer): Preserve error message if -3 is
3529 returned.
3530 (qxfer): Document the -3 return value.
3531
3532 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3533
3534 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3535 (linux_btrace_h): New variable.
3536 (linux-btrace.o): New rule.
3537
3538 2013-03-08 Stan Shebs <stan@codesourcery.com>
3539 Hafiz Abid Qadeer <abidh@codesourcery.com>
3540
3541 * tracepoint.c (trace_buffer_size): New global.
3542 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3543 (init_trace_buffer): Change to one-argument function. Allocate
3544 trace buffer memory.
3545 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3546 handle QTBuffer:size packet.
3547 (cmd_bigqtbuffer_size): New function.
3548 (initialize_tracepoint): Call init_trace_buffer with
3549 DEFAULT_TRACE_BUFFER_SIZE.
3550 * server.c (handle_query): Add QTBuffer:size in the
3551 supported packets.
3552
3553 2013-03-07 Yao Qi <yao@codesourcery.com>
3554
3555 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3556 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3557 of -1.
3558 (cmd_qtsp): Adjust condition. Do post increment.
3559 Set cur_action and cur_step_action back to 0.
3560
3561 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3562
3563 PR server/15236
3564 * linux-low.c (linux_write_memory): Return early success if LEN is
3565 zero.
3566
3567 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3568
3569 * configure.srv: Add x86_64-*-cygwin* as target.
3570
3571 2013-02-28 Tom Tromey <tromey@redhat.com>
3572
3573 * configure.ac: Invoke AC_SYS_LARGEFILE.
3574 * configure, config.in: Rebuild.
3575
3576 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3577
3578 * win32-low.c: Throughout, fix format strings and casts of
3579 printf-like functions to avoid type related warnings on all
3580 platforms.
3581 (get_child_debug_event): Print dwDebugEventCode as hex since
3582 that's how it's usually documented.
3583
3584 2013-02-28 Yao Qi <yao@codesourcery.com>
3585
3586 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3587 pulongest.
3588
3589 2013-02-27 Jiong Wang <jiwang@tilera.com>
3590
3591 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3592 (reg-tilegx32.c): New rule.
3593 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3594 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3595 different register info initializer according to elf class.
3596 (init_registers_tilgx32): New function. The tilegx32 register info
3597 initializer.
3598 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3599 (tile_store_gregset): Likewise.
3600
3601 2013-02-27 Yao Qi <yao@codesourcery.com>
3602
3603 * server.c (process_point_options): Print debug message when
3604 debug_threads is true.
3605
3606 2013-02-26 Yao Qi <yao@codesourcery.com>
3607
3608 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3609
3610 2013-02-19 Pedro Alves <palves@redhat.com>
3611 Kai Tietz <ktietz@redhat.com>
3612
3613 PR gdb/15161
3614
3615 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3616 instead of strtoul to extract address from packet.
3617 (process_serial_event) <'z'>: Likewise.
3618
3619 2013-02-18 Yao Qi <yao@codesourcery.com>
3620
3621 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3622
3623 2013-02-14 Pedro Alves <palves@redhat.com>
3624
3625 Plug memory leak.
3626
3627 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3628 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3629
3630 2013-02-14 Pedro Alves <palves@redhat.com>
3631
3632 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3633
3634 2013-02-14 Pedro Alves <palves@redhat.com>
3635
3636 * tracepoint.c (save_string): Delete.
3637 (add_tracepoint_action): Use savestring instead of save_string.
3638
3639 2013-02-12 Pedro Alves <palves@redhat.com>
3640
3641 * linux-xtensa-low.c: Ditto.
3642 * xtensa-xtregs.c: Ditto.
3643
3644 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3645
3646 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3647 thread_db.
3648
3649 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3650
3651 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3652 aarch64_num_wp_regs and aarch64_num_bp_regs to
3653 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3654
3655 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3656
3657 * linux-aarch64-low.c (ps_get_thread_area): Replace
3658 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3659
3660 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3661 Marcus Shawcroft <marcus.shawcroft@arm.com>
3662 Nigel Stephens <nigel.stephens@arm.com>
3663 Yufeng Zhang <yufeng.zhang@arm.com>
3664
3665 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3666 (aarch64.c, aarch64-without-fpu.c): New targets.
3667 * configure.srv (aarch64*-*-linux*): New.
3668 * linux-aarch64-low.c: New file.
3669
3670 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3671
3672 * linux-low.c (handle_extended_wait, linux_create_inferior)
3673 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3674 (dequeue_one_deferred_signal, linux_resume_one_thread)
3675 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3676 (linux_tracefork_grandchild, linux_test_for_tracefork)
3677 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3678 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3679 where the argument is 0.
3680
3681 2013-01-25 Yao Qi <yao@codesourcery.com>
3682
3683 * event-loop.c: Include "queue.h".
3684 (gdb_event_p): New typedef.
3685 (struct gdb_event) <next_event>: Remove.
3686 (event_queue): Change to QUEUE(gdb_event_p).
3687 (async_queue_event): Remove.
3688 (gdb_event_xfree): New.
3689 (initialize_event_loop): New.
3690 (process_event): Use API from QUEUE.
3691 (wait_for_event): Likewise.
3692 * server.c (main): Call initialize_event_loop.
3693 * server.h (initialize_event_loop): Declare.
3694
3695 2013-01-18 Yao Qi <yao@codesourcery.com>
3696
3697 * ax.h (struct eval_agent_expr_context): New.
3698 (gdb_eval_agent_expr): Update declaration.
3699 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3700 TFRAME. Add new argument CTX.
3701 * server.h (struct eval_agent_expr_context): Declare.
3702 (agent_mem_read, agent_tsv_read): Update declaration.
3703 (agent_mem_read_string): Likewise.
3704 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3705 (add_traceframe_block): Add new argument TPOINT.
3706 Increase TPOINT->traceframe_usage.
3707 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3708 eval_tracepoint_agent_expr.
3709 (condition_true_at_tracepoint): Likewise.
3710 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3711 (agent_mem_read_string, agent_tsv_read): Likewise.
3712
3713 2013-01-16 Yao Qi <yao@codesourcery.com>
3714
3715 * linux-low.c (linux_resume_one_lwp): Don't check
3716 'lwp->bp_reinsert != 0'.
3717
3718 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3719 Pedro Alves <palves@redhat.com>
3720
3721 * lynx-low.c (ptrace_request_to_str): Define a temporary
3722 macro and use it to simplify this function's implementation.
3723
3724 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3725
3726 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3727 sets errno.
3728
3729 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3730
3731 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3732
3733 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3734
3735 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3736
3737 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3738
3739 * lynx-low.c (lynx_resume): Use the resume_info parameter
3740 to determine the ptid for the lynx_ptrace call, unless
3741 it is equal to minus_one_ptid, in which case we use the
3742 ptid of the current_inferior.
3743 (lynx_wait_1): After having received a thread create/exit
3744 event, resume the inferior's execution using the signaling
3745 thread's ptid, rather than the old ptid.
3746
3747 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3748
3749 * lynx-low.c (lynx_resume): Delete variable ret.
3750
3751 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3752
3753 * gdbreplay.c (gdbreplay_version): Update copyright year.
3754 * server.c (gdbserver_version): Likewise.
3755
3756 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3757
3758 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3759 new thread.
3760
3761 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3762
3763 * lynx-low.c (ptrace_request_to_str): Add handling for
3764 PTRACE_GETTRACESIG.
3765
3766 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3767
3768 * lynx-low.c (lynx_attach): Delete variable new_process.
3769
3770 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3771
3772 * lynx-low.c (lynx_create_inferior): Delete variable
3773 new_process.
3774
3775 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3776
3777 * lynx-low.c (ptrace_request_to_str): Do not handle
3778 PTRACE_GETTHREADLIST if this macro does not exist.
3779
3780 2012-12-15 Yao Qi <yao@codesourcery.com>
3781
3782 * Makefile.in (OBS): Add notif.o.
3783 * notif.c, notif.h: New.
3784 * server.c: Include "notif.h".
3785 (struct vstop_notif) <next>: Remove.
3786 <base>: New field.
3787 (queue_stop_reply): Update.
3788 (push_event, send_next_stop_reply): Remove.
3789 (discard_queued_stop_replies): Update.
3790 (notif_stop): New variable.
3791 (handle_v_stopped): Remove.
3792 (handle_v_requests): Don't call handle_v_stopped. Call
3793 handle_ack_notif instead.
3794 (queue_stop_reply_callback): Call notif_event_enque instead
3795 of queue_stop_reply.
3796 (handle_status): Don't call send_next_stop_reply, call
3797 notif_write_event instead.
3798 (kill_inferior_callback): Likewise.
3799 (detach_or_kill_inferior_callback): Likewise.
3800 (main): Call initialize_notif.
3801 (process_serial_event): Call QUEUE_is_empty.
3802 (handle_target_event): Call notif_push instead of push event.
3803 * server.h (push_event): Remove declaration.
3804
3805 2012-12-10 Tom Tromey <tromey@redhat.com>
3806
3807 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3808 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3809 macros.
3810 (.c.o): Rewrite.
3811 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3812 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3813 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3814 (amd64-linux-ipa.o, ax.o): Rewrite.
3815 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3816 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3817 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3818 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3819 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3820 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3821 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3822 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3823 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3824 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3825 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3826 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3827 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3828 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3829 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3830 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3831 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3832 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3833 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3834 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3835 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3836 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3837 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3838 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3839 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3840 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3841 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3842 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3843 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3844 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3845 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3846 (reg-tilegx.o): Remove.
3847 (all_object_files): New macro.
3848 Include .deps files.
3849 * aclocal.m4, configure: Rebuild.
3850 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3851 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3852 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3853
3854 2012-12-05 Tom Tromey <tromey@redhat.com>
3855
3856 PR gdb/14917:
3857 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3858
3859 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3860
3861 * configure.ac: Check for linux/perf_event.h.
3862 * config.in: Regenerated.
3863 * configure: Regenerated.
3864
3865 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3866
3867 * hostio.c (handle_readlink): Decrease buffer size
3868 parameter passed to readlink by one byte.
3869
3870 2012-11-26 Yao Qi <yao@codesourcery.com>
3871
3872 * configure.ac (build_warnings): Append '-Wempty-body'.
3873 * configure: Regenerated.
3874 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3875 body.
3876
3877 2012-11-15 Pierre Muller <muller@sourceware.org>
3878
3879 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3880 * config.in: Regenerate.
3881 * configure: Regenerate.
3882 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3883 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3884 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3885 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3886 header.
3887 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3888 instead of <sys/wait.h> header.
3889 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3890
3891 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3892
3893 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3894 (various make rules): Remove -DGDBSERVER
3895
3896 2012-11-09 Yao Qi <yao@codesourcery.com>
3897
3898 * spu-low.c (current_ptid): Move it to ..
3899 * gdbthread.h: ... here. New.
3900 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3901 * server.c (myresume, process_serial_event): Likewise.
3902 * thread-db.c (thread_db_find_new_threads): Likewise.
3903 * tracepoint.c (run_inferior_command): Likewise.
3904
3905 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3906
3907 * server.c (handle_search_memory_1): Include access length in
3908 warning message.
3909
3910 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3911
3912 * linux-crisv32-low.c: Fix compile errors.
3913
3914 2012-09-04 Yao Qi <yao@codesourcery.com>
3915
3916 * tracepoint.c (cmd_qtsv): Adjust debug message.
3917 Don't check CUR_TPOINT.
3918
3919 2012-08-28 Yao Qi <yao@codesourcery.com>
3920
3921 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3922 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3923 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3924 Remove declarations of xmalloc, xreallloc, xstrdup and
3925 freeargv.
3926 * Makefile.in (libiberty_h): New.
3927 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3928 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3929
3930 2012-08-23 Yao Qi <yao@codesourcery.com>
3931
3932 * server.h: Remove declaration of 'xsnprintf'.
3933
3934 2012-08-22 Keith Seitz <keiths@redhat.com>
3935
3936 * server.h: Include build-gnulib-gbserver/config.h.
3937 * gdbreplay.c: Likewise.
3938
3939 2012-08-08 Doug Evans <dje@google.com>
3940
3941 * Makefile.in (SFILES): Add gdb_vecs.c.
3942 (OBS): Add gdb_vecs.o.
3943 (gdb_vecs_h, host_defs_h): New variables.
3944 (thread-db.o): Add $(gdb_vecs_h) dependency.
3945 (gdb_vecs.o): New rule.
3946 * thread-db.c: #include "gdb_vecs.h".
3947 (thread_db_load_search): Use a vector to iterate over path elements.
3948 Handle text appearing after "$pdir".
3949
3950 * configure.ac: Add check for strstr.
3951 * config.in: Regenerate.
3952 * configure: Regenerate.
3953
3954 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3955
3956 * hostio.c (handle_pread): If pread fails, fall back to attempting
3957 lseek/read.
3958 (handle_pwrite): Likewise for pwrite.
3959
3960 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3961
3962 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3963 between unsupported TYPE and unimplementable ADDR/LEN combination.
3964 (arm_insert_point): Act on new return value.
3965
3966 2012-07-31 Pedro Alves <palves@redhat.com>
3967
3968 * server.c (process_point_options): Only skip tokens if we find
3969 one that is unrecognized. Don't treat 'X' specially while
3970 skipping unrecognized tokens.
3971
3972 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3973
3974 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3975 to 4-byte-align HW breakpoint addresses for Thumb.
3976
3977 2012-07-27 Yao Qi <yao@codesourcery.com>
3978
3979 PR remote/14161.
3980
3981 * server.h: Declare gdb_agent_about_to_close.
3982 * target.c (kill_inferior): Include "agent.h".
3983 New. Send command 'kill'.
3984 * target.h (kill_inferior): Removed macro.
3985 * tracepoint.c (gdb_agent_about_to_close): New.
3986 (gdb_agent_helper_thread): Handle command 'close'.
3987 Wait endlessly until the inferior stops.
3988 Install gdb_agent_remove_socket to atexit hook.
3989 (agent_socket_name): New static variable.
3990 (gdb_agent_socket_init): Replace local variable 'name' with
3991 'agent_socket_name'.
3992 (gdb_agent_remove_socket): New.
3993
3994 2012-07-27 Yao Qi <yao@codesourcery.com>
3995
3996 * server.c (process_point_options): Stop at 'X' when parsing.
3997
3998 2012-07-19 Michael Eager <eager@eagercon.com>
3999
4000 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4001 to hw_execute.
4002 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4003 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4004 hardware breakpoint.
4005
4006 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4007
4008 * gdbserver/linux-low.c (initialize_low): Call
4009 linux_ptrace_init_warnings.
4010
4011 2012-07-02 Doug Evans <dje@google.com>
4012
4013 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4014 pointer to int.
4015
4016 2012-07-02 Stan Shebs <stan@codesourcery.com>
4017
4018 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4019 (ax.o): Add it to build rule.
4020 (ax-ipa.o): Ditto.
4021 (OBS): Add format.o.
4022 (IPA_OBS): Add format.o.
4023 * server.c (handle_query): Claim support for breakpoint commands.
4024 (process_point_options): Add command case.
4025 (process_serial_event): Leave running if there are printfs in
4026 effect.
4027 * mem-break.h (any_persistent_commands): Declare.
4028 (add_breakpoint_commands): Declare.
4029 (gdb_no_commands_at_breakpoint): Declare.
4030 (run_breakpoint_commands): Declare.
4031 * mem-break.c (struct point_command_list): New struct.
4032 (struct breakpoint): New field command_list.
4033 (any_persistent_commands): New function.
4034 (add_commands_to_breakpoint): New function.
4035 (add_breakpoint_commands): New function.
4036 (gdb_no_commands_at_breakpoint): New function.
4037 (run_breakpoint_commands): New function.
4038 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4039 locally.
4040 * ax.c: Include format.h.
4041 (ax_printf): New function.
4042 (gdb_eval_agent_expr): Add printf opcode.
4043
4044 2012-06-13 Yao Qi <yao@codesourcery.com>
4045
4046 * server.c (start_inferior): Remove duplicated writes to fields
4047 'last_resume_kind' and 'last_status' of 'current_inferior'.
4048
4049 2012-06-12 Yao Qi <yao@codesourcery.com>
4050 Pedro Alves <palves@redhat.com>
4051
4052 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4053 comment.
4054 * server.c (handle_v_cont): Extend comment.
4055
4056 2012-06-11 Yao Qi <yao@codesourcery.com>
4057
4058 * linux-low.c (linux_attach): Add 'static'.
4059
4060 2012-06-06 Yao Qi <yao@codesourcery.com>
4061
4062 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4063
4064 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4065
4066 Fix gcc -flto compilation warning.
4067 * server.c (main): Make variable multi_mode and attach volatile.
4068
4069 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4070
4071 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4072 if the platform doesn't know about it.
4073
4074 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4075
4076 * Makefile.in (SFILES): Add linux-tile-low.c.
4077 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4078 * configure.srv: Handle tilegx-*-linux*.
4079 * linux-tile-low.c: New file.
4080
4081 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4082
4083 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4084
4085 2012-05-24 Pedro Alves <palves@redhat.com>
4086
4087 PR gdb/7205
4088
4089 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4090
4091 2012-05-24 Pedro Alves <palves@redhat.com>
4092
4093 PR gdb/7205
4094
4095 Replace target_signal with gdb_signal throughout.
4096
4097 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4098
4099 * linux-low.c (linux_store_registers): Avoid the copying sequence
4100 when no data has been retrieved by ptrace.
4101
4102 2012-05-22 Will Deacon <will.deacon@arm.com>
4103
4104 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4105 Include asm/ptrace.h.
4106 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4107 already defined.
4108
4109 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4110
4111 * linux-low.c (linux_store_registers): Don't re-retrieve data
4112 with ptrace that has already been obtained from /proc. Always
4113 copy any data retrieved with ptrace to the buffer supplied.
4114
4115 2012-05-11 Yao Qi <yao@codesourcery.com>
4116 Pedro Alves <palves@redhat.com>
4117
4118 * linux-low.c (enum stopping_threads_kind): New.
4119 (stopping_threads): Change type to `enum stopping_threads_kind'.
4120 (handle_extended_wait): If stopping and suspending threads, leave
4121 the new_lwp suspended too.
4122 (linux_wait_for_event): Adjust.
4123 (stop_all_lwps): Set `stopping_threads' to
4124 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4125 whether we're suspending threads or just stopping them. Assert no
4126 recursion happens.
4127
4128 2012-04-29 Yao Qi <yao@codesourcery.com>
4129
4130 * server.h: Move some code to ...
4131 * gdbthread.h: ... here. New.
4132 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4133 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4134 (nto-low.o, win32-low.o): Likewise.
4135 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4136 * regcache.c, remote-utils.c, server.c: Likewise.
4137 * target.c, tracepoint.c, win32-low.c: Likewise.
4138
4139 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4140
4141 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4142 (PTRACE_ARG4_TYPE): Likewise.
4143 (PTRACE_XFER_TYPE): Likewise.
4144 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4145 ptrace to PTRACE_ARG3_TYPE.
4146 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4147 (PTRACE_ARG4_TYPE): Likewise.
4148 (PTRACE_XFER_TYPE): Likewise.
4149 (linux_detach_one_lwp): Cast fourth argument of
4150 ptrace to long then PTRACE_ARG4_TYPE.
4151 (regsets_fetch_inferior_registers): Cast third argument of
4152 ptrace to long then PTRACE_ARG3_TYPE.
4153 (regsets_store_inferior_registers): Likewise.
4154
4155 2012-04-20 Pedro Alves <palves@redhat.com>
4156
4157 * configure: Regenerate.
4158
4159 2012-04-19 Pedro Alves <palves@redhat.com>
4160
4161 * Makefile.in (GNULIB_BUILDDIR): New.
4162 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4163 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4164 (all, install-only, uninstall, clean-info, all-lib, clean): No
4165 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4166 (maintainer-clean realclean distclean): Use subdir_do.
4167 (subdir_do): New.
4168 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4169 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4170 * acinclude.m4: Include acx_configure_dir.m4.
4171 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4172 calls. Call AC_PROG_RANLIB. Configure gnulib using
4173 ACX_CONFIGURE_DIR.
4174 (GNULIB): New.
4175 (GNULIB_STDINT_H): Adjust.
4176 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4177 * gdbreplay.c: Include build-gnulib/config.h.
4178 * server.h: Likewise.
4179 * aclocal.m4: Regenerate.
4180 * config.in: Regenerate.
4181 * configure: Regenerate.
4182
4183 2012-04-19 Pedro Alves <palves@redhat.com>
4184
4185 * Makefile.in (LIBGNU, INCGNU): Adjust.
4186 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4187 (all, install-only, uninstall, clean-info, all-lib, clean)
4188 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4189 * configure.ac: Adjust AC_OUTPUT output.
4190 * aclocal.m4: Regenerate.
4191 * configure: Regenerate.
4192
4193 2012-04-19 Pedro Alves <palves@redhat.com>
4194
4195 * Makefile.in (generated_files): New.
4196 (server_h): Remove the explicit dependency on config.h, and depend
4197 on $generated_files.
4198
4199 2012-04-19 Pedro Alves <palves@redhat.com>
4200
4201 * Makefile.in (INCGNU): Add -Ignulib.
4202
4203 2012-04-19 Pedro Alves <palves@redhat.com>
4204
4205 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4206 (INCGNU): ... this, and spell out -I here.
4207 (GNULIB_LIB): Rename to ...
4208 (LIBGNU): ... this.
4209 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4210
4211 2012-04-19 Pedro Alves <palves@redhat.com>
4212
4213 * config.in: Regenerate.
4214
4215 2012-04-19 Pedro Alves <palves@redhat.com>
4216
4217 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4218 * server.h (memmem): Remove declaration.
4219 * config.in: Regenerate.
4220 * configure: Regenerate.
4221
4222 2012-04-19 Yao Qi <yao@codesourcery.com>
4223
4224 * Makefile.in (SFILES): Add common/vec.c.
4225 (OBS): Add vec.o.
4226 (vec.o): New rule.
4227
4228 2012-04-19 Yao Qi <yao@codesourcery.com>
4229
4230 * remote-utils.c (prepare_resume_reply): Replace with macro
4231 target_core_of_thread.
4232 * server.c (handle_qxfer_threads_proper): Likewise.
4233 * target.h (traget_core_of_thread): New macro.
4234
4235 2012-04-18 Pedro Alves <palves@redhat.com>
4236
4237 * aclocal.m4: Regenerate.
4238 * configure: Regenerate.
4239
4240 2012-04-16 Yao Qi <yao@codesourcery.com>
4241
4242 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4243 duplicated on address.
4244
4245 2012-04-16 Yao Qi <yao@codesourcery.com>
4246
4247 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4248 (struct tracepoint_action_ops) <send>: New field.
4249 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4250 (agent_expr_send, x_tracepoint_action_send): New.
4251 (l_tracepoint_action_send): New.
4252 (cmd_qtdp): Download and install tracepoint
4253 according to `use_agent'.
4254 (run_inferior_command): Add one more parameter `len'.
4255 Update callers.
4256 (tracepoint_send_agent): New.
4257 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4258
4259 2012-04-16 Yao Qi <yao@codesourcery.com>
4260
4261 * tracepoint.c (download_tracepoints): Moved to ...
4262 (cmd_qtstart): ... here.
4263
4264 2012-04-14 Yao Qi <yao@codesourcery.com>
4265
4266 * tracepoint.c: Include inttypes.h.
4267 (struct collect_memory_action): Use sized types.
4268 (struct tracepoint): Likewise.
4269 (cmd_qtdp, stop_tracing): Update print specifiers.
4270 (cmd_qtp, response_tracepoint): Likewise.
4271 (collect_data_at_tracepoint): Likewise.
4272 (collect_data_at_step): Likewise.
4273
4274 2012-04-14 Yao Qi <yao@codesourcery.com>
4275
4276 Import gnulib module inttypes.
4277 * aclocal.m4, config.in, configure: Regenerated.
4278
4279 2012-04-14 Yao Qi <yao@codesourcery.com>
4280
4281 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4282 Makefile and config.status at last.
4283
4284 2012-04-13 Yao Qi <yao@codesourcery.com>
4285
4286 * tracepoint.c: Include stdint.h unconditionally.
4287
4288 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4289
4290 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4291 on BFD_HAVE_SYS_PROCFS_TYPE.
4292 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4293 * configure: Regenerate.
4294 * config.in: Likewise.
4295
4296 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4297
4298 * Makefile.in (clean): Also remove x32.c x32-linux.c
4299 x32-avx.c x32-avx-linux.c.
4300 (x32.o): New target.
4301 (x32.c): Likewise.
4302 (x32-linux.o): Likewise.
4303 (x32-linux.c): Likewise.
4304 (x32-avx.o): Likewise.
4305 (x32-avx.c): Likewise.
4306 (x32-avx-linux.o): Likewise.
4307 (x32-avx-linux.c): Likewise.
4308
4309 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4310 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4311 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4312 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4313 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4314 i386/x32-avx-linux.xml.
4315
4316 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4317 (init_registers_x32_avx_linux): Likwise.
4318 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4319 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4320
4321 2012-04-13 Pedro Alves <palves@redhat.com>
4322
4323 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4324 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4325 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4326 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4327 the sub-make.
4328
4329 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4330
4331 * linux-x86-low.c (compat_x32_clock_t): New.
4332 (compat_x32_siginfo_t): Likewise.
4333 (compat_x32_siginfo_from_siginfo): Likewise.
4334 (siginfo_from_compat_x32_siginfo): Likewise.
4335 (linux_is_elf64): Likewise.
4336 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4337 and siginfo_from_compat_x32_siginfo for x32.
4338 (x86_arch_setup): Set linux_is_elf64.
4339
4340 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4341
4342 PR gdb/13969
4343 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4344 e_machine field.
4345 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4346 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4347 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4348 compatible with process.
4349
4350 2012-04-12 Yao Qi <yao@codesourcery.com>
4351
4352 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4353 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4354 (install-only, install-info, clean): Handle sub dir gnulib.
4355 (all-lib, am--refresh): New targets.
4356 (memmem.o): Remove target.
4357 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4358 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4359 (AC_REPLACE_FUNCS): Remove memmem.
4360 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4361 (AC_OUTPUT): Generate Makefile in gnulib/.
4362 * aclocal.m4, config.in, configure: Regenerated.
4363
4364 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4365
4366 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4367
4368 2012-04-05 Pedro Alves <palves@redhat.com>
4369
4370 -Werror=strict-aliasing
4371
4372 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4373 pointer.
4374
4375 2012-04-04 Pedro Alves <palves@redhat.com>
4376
4377 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4378 (sparc_store_gregset_from_stack, sparc_store_gregset)
4379 (sparc_breakpoint_at): Fix formatting.
4380
4381 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4382
4383 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4384 are available.
4385 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4386 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4387 * config.in: Regenerate.
4388 * configure: Likewise.
4389
4390 2012-03-29 Pedro Alves <palves@redhat.com>
4391
4392 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4393 Correct ptrace arguments.
4394
4395 2012-03-28 Pedro Alves <palves@redhat.com>
4396
4397 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4398 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4399 (IA64_FR1_REGNUM): New defines.
4400 (ia64_fetch_register): New.
4401 (the_low_target): Install it.
4402 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4403 field.
4404 * linux-low.c (linux_fetch_registers): Try the
4405 the_low_target.fetch_register hook first.
4406
4407 * linux-arm-low.c (the_low_target): Adjust.
4408 * linux-bfin-low.c (the_low_target): Adjust.
4409 * linux-cris-low.c (the_low_target): Adjust.
4410 * linux-crisv32-low.c (the_low_target): Adjust.
4411 * linux-m32r-low.c (the_low_target): Adjust.
4412 * linux-m68k-low.c (the_low_target): Adjust.
4413 * linux-mips-low.c (the_low_target): Adjust.
4414 * linux-ppc-low.c (the_low_target): Adjust.
4415 * linux-s390-low.c (the_low_target): Adjust.
4416 * linux-sh-low.c (the_low_target): Adjust.
4417 * linux-sparc-low.c (the_low_target): Adjust.
4418 * linux-tic6x-low.c (the_low_target): Adjust.
4419 * linux-x86-low.c (the_low_target): Adjust.
4420 * linux-xtensa-low.c (the_low_target): Adjust.
4421
4422 2012-03-26 Pedro Alves <palves@redhat.com>
4423
4424 * server.c (handle_qxfer_libraries): Don't bail early if
4425 the_target->qxfer_libraries_svr4 is not NULL.
4426
4427 2012-03-26 Pedro Alves <palves@redhat.com>
4428
4429 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4430
4431 2012-03-23 Pedro Alves <palves@redhat.com>
4432
4433 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4434 "library-list-svr4" element's start tag when the the DSO list is
4435 empty.
4436
4437 2012-03-23 Pedro Alves <palves@redhat.com>
4438
4439 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4440 a variable whose type size is the same as the inferior's pointer
4441 size.
4442
4443 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4444
4445 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4446 struct siginfo.
4447 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4448 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4449 * linux-low.h: Include <signal.h>.
4450 (struct siginfo): Remove forward declaration.
4451 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4452 struct siginfo.
4453
4454 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4455
4456 * .gitignore: Ignore more files.
4457
4458 2012-03-19 Pedro Alves <palves@redhat.com>
4459 Jan Kratochvil <jan.kratochvil@redhat.com>
4460
4461 * server.c (cont_thread, general_thread): Add describing comments.
4462 (start_inferior): Clear `cont_thread'.
4463 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4464 of a process.
4465
4466 2012-03-15 Yao Qi <yao@codesourcery.com>
4467
4468 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4469 handling to ...
4470 (cmd_qtdp): ... here.
4471
4472 2012-03-15 Yao Qi <yao@codesourcery.com>
4473
4474 * tracepoint.c (struct tracepoint_action_ops): New.
4475 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4476 (m_tracepoint_action_download): New.
4477 (r_tracepoint_action_download): New.
4478 (x_tracepoint_action_download): New.
4479 (l_tracepoint_action_download): New.
4480 (add_tracepoint_action): Install `action->ops' according type.
4481 (download_tracepoint_1): Move code `download' function pointer
4482 of various tracepoint_action_ops.
4483
4484 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4485
4486 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4487 linux_ptrace_attach_warnings.
4488
4489 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4490
4491 * Makefile.in (linux-ptrace.o): New.
4492 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4493 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4494 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4495 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4496 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4497 of these targets.
4498 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4499
4500 2012-03-08 Yao Qi <yao@codesourcery.com>
4501 Pedro Alves <palves@redhat.com>
4502
4503 Fix PR server/13392.
4504 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4505 offset of JMP insn.
4506 * tracepoint.c (remove_tracepoint): New.
4507 (cmd_qtdp): Call remove_tracepoint when failed to install.
4508
4509 2012-03-07 Pedro Alves <palves@redhat.com>
4510
4511 * linux-low.c (get_detach_signal): New.
4512 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4513 Pass on pending signals to PTRACE_DETACH. Check the result of the
4514 ptrace call.
4515 * server.c (program_signals, program_signals_p): New.
4516 (handle_general_set): Handle QProgramSignals.
4517 * server.h (program_signals, program_signals_p): Declare.
4518
4519 2012-03-05 Pedro Alves <palves@redhat.com>
4520 Jan Kratochvil <jan.kratochvil@redhat.com>
4521
4522 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4523 New comment why.
4524
4525 2012-03-03 Yao Qi <yao@codesourcery.com>
4526
4527 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4528 agent_look_up_symbols.
4529
4530 2012-03-03 Yao Qi <yao@codesourcery.com>
4531
4532 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4533 (linux-x86-low.o): Likewise.
4534 * server.h: Remove in_process_agent_loaded.
4535 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4536 common/agent.c.
4537 Update callers.
4538
4539 2012-03-03 Yao Qi <yao@codesourcery.com>
4540
4541 * tracepoint.c (gdb_agent_capability): New global.
4542 (in_process_agent_loaded_ust): Renamed to
4543 `in_process_agent_supports_ust'.
4544 Update callers.
4545 (in_process_agent_supports_ust): Call agent_capability_check.
4546 (clear_installed_tracepoints): Assert that agent supports
4547 agent.
4548
4549 2012-03-03 Yao Qi <yao@codesourcery.com>
4550
4551 * linux-low.c (linux_supports_agent): New.
4552 (linux_target_ops): Initialize field `supports_agent' with
4553 linux_supports_agent.
4554 * target.h (struct target_ops) <supports_agent>: New.
4555 (target_supports_agent): New macro.
4556 * server.c (handle_general_set): Handle packet 'QAgent'.
4557 (handle_query): Send `QAgent+'.
4558 * Makefile.in (server.o): Depends on agent.h.
4559
4560 2012-03-03 Yao Qi <yao@codesourcery.com>
4561
4562 * Makefile.in (OBS): Add agent.o.
4563 Add new rule for agent.o.
4564 Track dependence of tracepoint.c on agent.h.
4565 * tracepoint.c (run_inferior_command_1):
4566 (run_inferior_command): Call agent_run_command.
4567 (gdb_ust_connect_sync_socket): Deleted. Move it to
4568 common/agent.c.
4569 (resume_thread, stop_thread): Likewise.
4570 (gdb_ust_socket_init): Renamed to ...
4571 (gdb_agent_socket_init): ... New.
4572 (gdb_ust_thread): Renamed to ...
4573 (gdb_agent_helper_thread): ... New.
4574 (gdb_ust_init): Move some code to ...
4575 (gdb_agent_init): ... here. New.
4576 [HAVE_UST]: Call gdb_ust_init.
4577 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4578 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4579 * config.in, configure: Regenerated.
4580
4581 2012-03-02 Pedro Alves <palves@redhat.com>
4582
4583 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4584 * linux-low.c (struct simple_pid_list): New.
4585 (stopped_pids): New a struct simple_pid_list pointer.
4586 (add_to_pid_list, pull_pid_from_list): New.
4587 (handle_extended_wait): Don't assume the first signal new children
4588 report is SIGSTOP. Adjust call to pull_pid_from_list.
4589 (linux_wait_for_lwp): Adjust.
4590
4591 2012-03-02 Yao Qi <yao@codesourcery.com>
4592
4593 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4594 debug log.
4595
4596 2012-03-02 Yao Qi <yao@codesourcery.com>
4597
4598 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4599 `stop_pc' and `tpoint'. Update caller.
4600
4601 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4602
4603 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4604 * linux-low.c (use_linux_regsets): New macro.
4605 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4606 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4607 (linux_register_in_regsets): New function.
4608 (usr_fetch_inferior_registers): Skip registers covered by
4609 regsets.
4610 (usr_store_inferior_registers): Likewise.
4611 (usr_fetch_inferior_registers): New macro.
4612 (usr_store_inferior_registers): Likewise.
4613 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4614 (linux_store_registers): Likewise.
4615 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4616 prototype.
4617 (init_registers_mips64_dsp_linux): Likewise.
4618 (init_registers_mips_linux): New macro.
4619 (init_registers_mips_dsp_linux): Likewise.
4620 (mips_dsp_num_regs): Likewise.
4621 (DSP_BASE, DSP_CONTROL): New fallback macros.
4622 (mips_base_regs): New macro.
4623 (mips_regmap): Use it. Fix the size.
4624 (mips_dsp_regmap): New variable.
4625 (mips_dsp_regset_bitmap): Likewise.
4626 (mips_arch_setup): New function.
4627 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4628 than mips_regmap.
4629 (mips_cannot_store_register): Likewise.
4630 (the_low_target): Update .arch_setup, .num_regs and .regmap
4631 initializers. Add .regset_bitmap initializer.
4632 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4633 initializer.
4634 * linux-bfin-low.c (the_low_target): Likewise.
4635 * linux-cris-low.c (the_low_target): Likewise.
4636 * linux-crisv32-low.c (the_low_target): Likewise.
4637 * linux-ia64-low.c (the_low_target): Likewise.
4638 * linux-m32r-low.c (the_low_target): Likewise.
4639 * linux-m68k-low.c (the_low_target): Likewise.
4640 * linux-ppc-low.c (the_low_target): Likewise.
4641 * linux-s390-low.c (the_low_target): Likewise.
4642 * linux-sh-low.c (the_low_target): Likewise.
4643 * linux-sparc-low.c (the_low_target): Likewise.
4644 * linux-tic6x-low.c (the_low_target): Likewise.
4645 * linux-x86-low.c (the_low_target): Likewise.
4646 * linux-xtensa-low.c (the_low_target): Likewise.
4647 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4648 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4649 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4650 srv_xmlfiles.
4651 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4652 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4653
4654 2012-02-29 Yao Qi <yao@codesourcery.com>
4655 Pedro Alves <palves@redhat.com>
4656
4657 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4658 `step_over_finished' is true.
4659
4660 2012-02-27 Pedro Alves <palves@redhat.com>
4661
4662 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4663 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4664
4665 2012-02-27 Pedro Alves <palves@redhat.com>
4666
4667 PR server/9684
4668 * linux-low.c (pid_is_stopped): New.
4669 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4670
4671 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4672
4673 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4674 of conditions.
4675
4676 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4677
4678 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4679
4680 2012-02-24 Luis Machado <lgustavo@codesourcery>
4681
4682 * server.c (handle_query): Advertise support for target-side
4683 breakpoint condition evaluation.
4684 (process_point_options): New function.
4685 (process_serial_event): When inserting a breakpoint, check for
4686 a target-side condition that should be evaluated.
4687
4688 * mem-break.c: Include regcache.h and ax.h.
4689 (point_cond_list_t): New data structure.
4690 (breakpoint) <cond_list>: New field.
4691 (find_gdb_breakpoint_at): Make non-static.
4692 (delete_gdb_breakpoint_at): Clear any target-side
4693 conditions.
4694 (clear_gdb_breakpoint_conditions): New function.
4695 (add_condition_to_breakpoint): Likewise.
4696 (add_breakpoint_condition): Likewise.
4697 (gdb_condition_true_at_breakpoint): Likewise.
4698 (gdb_breakpoint_here): Return result directly instead
4699 of going through a local variable.
4700
4701 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4702 (clear_gdb_breakpoint_conditions): Likewise.
4703 (add_breakpoint_condition): Likewise.
4704 (gdb_condition_true_at_breakpoint): Likewise.
4705
4706 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4707 (need_step_over_p): Take target-side breakpoint condition into
4708 consideration.
4709
4710 2012-02-24 Luis Machado <lgustavo@codesourcery>
4711
4712 * server.h: Include tracepoint.h.
4713 (agent_mem_read, agent_get_trace_state_variable_value,
4714 agent_set_trace_state_variable_value,
4715 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4716 get_set_tsv_func_addr): New prototypes.
4717
4718 * ax.h: New include file.
4719 * ax.c: New source file.
4720
4721 * tracepoint.c: Include ax.h.
4722 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4723 agent_expr, eval_result_type): Move to ax.h.
4724 (parse_agent_expr): Rename to ...
4725 (gdb_parse_agent_expr): ... this, make it non-static and move
4726 to ax.h.
4727 (unparse_agent_expr) Rename to ...
4728 (gdb_unparse_agent_expr): ... this, make it non-static and move
4729 to ax.h.
4730 (eval_agent_expr): Rename to ...
4731 (eval_tracepoint_agent_expr): ... this.
4732 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4733 forward declarations.
4734 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4735 (agent_get_trace_state_variable_value): New function.
4736 (agent_set_trace_state_variable_value): New function.
4737 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4738 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4739 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4740 (condition_true_at_tracepoint): Likewise.
4741 (parse_agent_expr): Rename to ...
4742 (gdb_parse_agent_expr): ... this and move to ax.c.
4743 (unparse_agent_expr): Rename to ...
4744 (gdb_unparse_agent_expr): ... this and move to ax.c.
4745 (gdb_agent_op_name): Move to ax.c.
4746 (eval_agent_expr): Rename to ...
4747 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4748 and move to ax.c.
4749 (eval_tracepoint_agent_expr): New function.
4750 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4751 non-static.
4752 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4753 ax.c.
4754 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4755 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4756 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4757 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4758 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4759 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4760 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4761 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4762 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4763 (compile_bytecodes): Remove forward declaration.
4764 (is_goto_target): Move to ax.c.
4765 (compile_bytecodes): Move to ax.c and call
4766 agent_get_trace_state_variable_value (...) and
4767 agent_set_trace_state_variable_value (...).
4768
4769 * Makefile.in: Update ax.c and IPA dependencies.
4770
4771 2012-02-24 Pedro Alves <palves@redhat.com>
4772
4773 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4774 (cmd_bigqtbuffer_circular): ... this. Only handle
4775 'QTBuffer:circular:'.
4776 (handle_tracepoint_general_set): Adjust.
4777
4778 2012-02-16 Yao Qi <yao@codesourcery.com>
4779
4780 * inferiors.c: Move code to ...
4781 * dll.c: .... here. New.
4782 * server.h: Declare clear_dlls.
4783 * Makefile.in (SFILES): Add dll.c.
4784 (OBS): Add dll.o
4785 (dll.o): New rule.
4786
4787 2012-02-11 Yao Qi <yao@codesourcery.com>
4788
4789 * server.c: (handle_monitor_command): Add a new parameter
4790 `own_buf'.
4791 (handle_query): Update caller.
4792
4793 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4794
4795 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4796 * configure, config.in: Regenerate.
4797 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4798 is not defined.
4799
4800 2012-02-02 Pedro Alves <palves@redhat.com>
4801
4802 Try SIGKILL first, then PTRACE_KILL.
4803 * linux-low.c (linux_kill_one_lwp): New.
4804 (linux_kill_one_lwp): Rename to ...
4805 (kill_one_lwp_callback): ... this. Use the new
4806 linux_kill_one_lwp.
4807
4808 2012-02-02 Pedro Alves <palves@redhat.com>
4809
4810 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4811 inferior.
4812
4813 2012-01-27 Pedro Alves <palves@redhat.com>
4814
4815 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4816 (elf_64_file_p): Make static.
4817 (linux_pid_exe_is_elf_64_file): New.
4818 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4819 Delete declarations.
4820 (linux_pid_exe_is_elf_64_file): Declare.
4821 * linux-x86-low.c (x86_arch_setup): Use
4822 linux_pid_exe_is_elf_64_file.
4823
4824 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4825
4826 * linux-low.c (linux_wait_for_event_1): Rename to ...
4827 (linux_wait_for_event): ... here and merge it with former
4828 linux_wait_for_event - new variable wait_ptid, use it.
4829 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4830
4831 2012-01-23 Pedro Alves <palves@redhat.com>
4832
4833 * server.c (main): Avoid yet another case of infinite loop while
4834 detaching/killing after a longjmp.
4835
4836 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4837
4838 Code cleanup.
4839 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4840
4841 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4842
4843 * hostio.c (handle_readlink): New function.
4844 (handle_vFile): Call it to handle "vFile:readlink" packets.
4845
4846 2012-01-20 Pedro Alves <palves@redhat.com>
4847 Ulrich Weigand <ulrich.weigand@linaro.org>
4848
4849 * server.c (handle_v_requests): Only support vAttach and vRun to
4850 start multiple processes when in extended protocol mode.
4851
4852 2012-01-17 Pedro Alves <palves@redhat.com>
4853
4854 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4855 memalign plus mprotect to allocate the scratch buffer.
4856
4857 2012-01-13 Pedro Alves <palves@redhat.com>
4858
4859 * server.c (attach_inferior): Clear `cont_thread'.
4860
4861 2012-01-13 Pedro Alves <palves@redhat.com>
4862
4863 * server.c (main): Avoid infinite loop while detaching/killing
4864 after a longjmp.
4865
4866 2012-01-09 Doug Evans <dje@google.com>
4867
4868 * server.c (start_inferior): Set last_ptid in --wrapper case.
4869
4870 2012-01-06 Yao Qi <yao@codesourcery.com>
4871
4872 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4873 defined.
4874 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4875
4876 2012-01-04 Yao Qi <yao@codesourcery.com>
4877
4878 * tracepoint.c (cmd_qtdp): Print debug message
4879 for static tracepoint.
4880
4881 2012-01-04 Yao Qi <yao@codesourcery.com>
4882
4883 * tracepoint.c (trace_vdebug): Differentiate debug message
4884 between gdbserver and IPA.
4885
4886 2012-01-03 Yao Qi <yao@codesourcery.com>
4887
4888 * tracepoint.c (tracepoint_was_hit): Don't collect for
4889 static tracepoint.
4890
4891 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4892
4893 * terminal.h: Reformat copyright header.
4894
4895 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4896
4897 * server.c (gdbserver_version): Update copyright year.
4898 * gdbreplay.c (gdbreplay_version): Likewise.
4899
4900 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4901
4902 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4903
4904 Revert:
4905 2011-12-18 Hui Zhu <teawater@gmail.com>
4906 * linux-low.c (linux_create_inferior): Save return value to ret.
4907
4908 2011-12-18 Hui Zhu <teawater@gmail.com>
4909
4910 * linux-low.c (linux_create_inferior): Save return value to ret.
4911
4912 2011-12-16 Doug Evans <dje@google.com>
4913
4914 * linux-low.c (linux_create_inferior): If stdio connection,
4915 redirect stdin from /dev/null, stdout to stderr.
4916 * remote-utils.c (remote_is_stdio): New static global.
4917 (remote_connection_is_stdio): New function.
4918 (remote_prepare): Handle stdio connection.
4919 (remote_open): Ditto.
4920 (remote_close): Don't close stdin for stdio connections.
4921 (read_prim,write_prim): New functions. Replace all calls to
4922 read/write to these.
4923 * server.c (main): Watch for "-" argument. Move call to
4924 remote_prepare before start_inferior.
4925 * server.h (STDIO_CONNECTION_NAME): New macro.
4926 (remote_connection_is_stdio): Declare.
4927
4928 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4929 in debugging output.
4930
4931 2011-12-15 Yao Qi <yao@codesourcery.com>
4932
4933 * tracepoint.c: Include sys/syscall.h.
4934 (gdb_ust_thread): Remove preprocessor conditional.
4935
4936 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4937
4938 * linux-low.c (linux_detach_one_lwp): Call
4939 the_low_target.prepare_to_resume before detaching.
4940
4941 2011-12-14 Yao Qi <yao@codesourcery.com>
4942
4943 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4944 of write.
4945
4946 2011-12-14 Yao Qi <yao@codesourcery.com>
4947
4948 * i386-low.c (i386_low_stopped_data_address): Initialize local
4949 variable `control'.
4950
4951 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4952
4953 PR remote/13492
4954
4955 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4956 DR_CONTROL unless necessary. Extend comments.
4957 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4958 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4959
4960 2011-12-13 Yao Qi <yao@codesourcery.com>
4961
4962 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4963 macros.
4964 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4965
4966 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4967
4968 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4969 Print new debug message for such case.
4970
4971 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4972
4973 Fix overlapping memcpy.
4974 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4975 the read_inferior_memory transfer.
4976 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4977 write_inferior_memory transfer.
4978 (set_fast_tracepoint_jump): New variable buf. Use it for the
4979 read_inferior_memory and write_inferior_memory transfers.
4980 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4981 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4982 Use it for the write_inferior_memory transfer.
4983 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4984 buffers.
4985
4986 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4987
4988 * linux-low.c (fetch_register, store_register): Make code
4989 consistent, fix formatting.
4990
4991 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4992
4993 * linux-low.c (usr_store_inferior_registers): Factor out code
4994 to handle individual registers into...
4995 (store_register): ... this new function.
4996
4997 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4998
4999 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5000 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5001 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5002 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5003 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5004 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5005 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5006 (srv_xmlfiles): Add new XML files.
5007
5008 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5009 and <sys/uio.h>.
5010 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5011 (init_registers_s390_linux32v1): Add prototype.
5012 (init_registers_s390_linux32v2): Likewise.
5013 (init_registers_s390_linux64v1): Likewise.
5014 (init_registers_s390_linux64v2): Likewise.
5015 (init_registers_s390x_linux64v1): Likewise.
5016 (init_registers_s390x_linux64v2): Likewise.
5017 (s390_num_regs): Increment to 52.
5018 (s390_regmap): Add orig_r2 register.
5019 (s390_num_regs_3264): Increment to 68.
5020 (s390_regmap_3264): Add orig_r2 register.
5021 (s390_collect_ptrace_register): Handle orig_r2 register.
5022 (s390_supply_ptrace_register): Likewise.
5023 (s390_fill_last_break): New function.
5024 (s390_store_last_break): Likewise.
5025 (s390_fill_system_call): New function.
5026 (s390_store_system_call): Likewise.
5027 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5028 register sets.
5029 (s390_check_regset): New function.
5030 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5031 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5032 Update target_regsets for available register sets.
5033
5034 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5035 Jan Kratochvil <jan.kratochvil@redhat.com>
5036
5037 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5038 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5039 New.
5040 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5041 * linux-low.h (struct process_info_private): New member r_debug.
5042 * server.c (handle_qxfer_libraries): Call
5043 the_target->qxfer_libraries_svr4.
5044 (handle_qxfer_libraries_svr4): New function.
5045 (qxfer_packets): New entry "libraries-svr4".
5046 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5047 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5048 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5049 PACKET_qXfer_libraries_svr4.
5050
5051 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5052
5053 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5054 PSW address/mask between 8-byte and 16-byte formats.
5055 (s390_supply_ptrace_register): Likewise.
5056 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5057 basic addressing mode bit.
5058
5059 2011-11-24 Stan Shebs <stan@codesourcery.com>
5060
5061 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5062
5063 2011-11-17 Stan Shebs <stan@codesourcery.com>
5064
5065 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5066 (tracing_start_time): New global.
5067 (tracing_stop_time): New global.
5068 (tracing_user_name): New global.
5069 (tracing_notes): New global.
5070 (tracing_stop_note): New global.
5071 (cmd_qtstart): Set traceframe_usage, start_time.
5072 (stop_tracing): Set stop_time.
5073 (cmd_qtstatus): Report additional status.
5074 (cmd_qtp): New function.
5075 (handle_tracepoint_query): Call it.
5076 (cmd_qtnotes): New function.
5077 (handle_tracepoint_general_set): Call it.
5078 (get_timestamp): Rename from tsv_get_timestamp.
5079
5080 2011-11-14 Stan Shebs <stan@codesourcery.com>
5081 Kwok Cheung Yeung <kcy@codesourcery.com>
5082
5083 * linux-x86-low.c (small_jump_insn): New.
5084 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5085 trampoline and error message, build a trampoline and issue a small
5086 jump instruction to it.
5087 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5088 trampoline and error message.
5089 (x86_get_min_fast_tracepoint_insn_len): New.
5090 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5091 * linux-low.h (struct linux_target_ops): Add arguments to
5092 install_fast_tracepoint_jump_pad operation, add new operation.
5093 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5094 arguments.
5095 (linux_get_min_fast_tracepoint_insn_len): New function.
5096 (linux_target_op): Add new operation.
5097 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5098 (gdb_trampoline_buffer_end): Ditto.
5099 (gdb_trampoline_buffer_error): Ditto.
5100 (struct ipa_sym_addresses): Add fields for new IPA variables.
5101 (symbol_list): Add entries for new IPA variables.
5102 (struct tracepoint): Add fields to hold the address range of the
5103 trampoline used by the tracepoint.
5104 (trampoline_buffer_head): New static variable.
5105 (trampoline_buffer_tail): Ditto.
5106 (claim_trampoline_space): New function.
5107 (have_fast_tracepoint_trampoline_buffer): New function.
5108 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5109 structure.
5110 (install_fast_tracepoint): Ditto, also add error buffer argument.
5111 (cmd_qtminftpilen): New function.
5112 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5113 (fast_tracepoint_from_trampoline_address): New function.
5114 (fast_tracepoint_collecting): Handle trampoline as part of jump
5115 pad space.
5116 (set_trampoline_buffer_space): New function.
5117 (initialize_tracepoint): Initialize new IPA variables.
5118 * target.h (struct target_ops): Add arguments to
5119 install_fast_tracepoint_jump_pad operation, add new
5120 get_min_fast_tracepoint_insn_len operation.
5121 (target_get_min_fast_tracepoint_insn_len): New.
5122 (install_fast_tracepoint_jump_pad): Add arguments.
5123 * server.h (IPA_BUFSIZ): Define.
5124 * linux-i386-ipa.c: Include extra header files.
5125 (initialize_fast_tracepoint_trampoline_buffer): New function.
5126 (initialize_low_tracepoint): Call it.
5127 * server.h (set_trampoline_buffer_space): Declare.
5128 (claim_trampoline_space): Ditto.
5129 (have_fast_tracepoint_trampoline_buffer): Ditto.
5130
5131 2011-11-14 Yao Qi <yao@codesourcery.com>
5132
5133 * server.c (handle_query): Handle InstallInTrace for qSupported.
5134 * tracepoint.c (add_tracepoint): Sort list.
5135 (install_tracepoint, download_tracepoint): New.
5136 (cmd_qtdp): Call them to install and download tracepoints.
5137 (sort_tracepoints): Removed.
5138 (cmd_qtstart): Update.
5139
5140 2011-11-14 Yao Qi <yao@codesourcery.com>
5141
5142 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5143 * mem-break.h: Declare.
5144 * tracepoint.c (cmd_qtstart): Move some code to ...
5145 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5146 New.
5147 (download_tracepoints): Move some code to ...
5148 (download_tracepoint_1): ... here. New.
5149
5150 2011-11-08 Yao Qi <yao@codesourcery.com>
5151
5152 * remote-utils.c (relocate_instruction): A comment fix.
5153
5154 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5155
5156 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5157 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5158 dr_status_mirror and dr_control_mirror from debug_reg_state.
5159 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5160 (i386_initial_stuff): Remove use of deleted globals.
5161 (i386_get_thread_context, i386_set_thread_context,
5162 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5163 from debug_reg_state.
5164
5165 2011-11-05 Yao Qi <yao@codesourcery.com>
5166
5167 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5168 address as TPOINT's.
5169
5170 2011-11-02 Stan Shebs <stan@codesourcery.com>
5171
5172 * tracepoint.c (agent_mem_read_string): New function.
5173 (eval_agent_expr): Call it for tracenz.
5174 * server.c (handle_query): Report support for tracenz.
5175
5176 2011-11-02 Yao Qi <yao@codesourcery.com>
5177
5178 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5179
5180 2011-11-02 Yao Qi <yao@codesourcery.com>
5181
5182 * target.h: Fix a typo in comment.
5183
5184 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5185
5186 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5187 clobber the breakpoints' shadows with fast tracepoint jumps.
5188 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5189 * target.c (write_inferior_memory): Also pass MYADDR down to
5190 check_mem_write.
5191
5192 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5193
5194 * configure.ac: Check support for personality routine.
5195 * configure: Regenerate.
5196 * config.in: Likewise.
5197 * linux-low.c: Include <sys/personality.h>.
5198 Define ADDR_NO_RANDOMIZE if necessary.
5199 (linux_create_inferior): Disable address space randomization when
5200 forking inferior, if requested.
5201 (linux_supports_disable_randomization): New function.
5202 (linux_target_ops): Install it.
5203 * server.h (disable_randomization): Declare.
5204 * server.c (disable_randomization): New global variable.
5205 (handle_general_set): Handle QDisableRandomization.
5206 (handle_query): Likewise for qSupported.
5207 (main): Support --disable-randomization and --no-disable-randomization
5208 command line arguments.
5209 * target.h (struct target_ops): Add supports_disable_randomization.
5210 (target_supports_disable_randomization): New macro.
5211
5212 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5213
5214 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5215 ifdef check.
5216 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5217 [!PT_GETDSBT] (target_loadmap): New definition.
5218 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5219 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5220 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5221 and PT_GETDSBT to LINUX_LOADMAP.
5222 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5223 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5224
5225 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5226
5227 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5228 (arm_linux_hwbp_cap): New static variable.
5229 (arm_linux_get_hwbp_cap): Replace by ...
5230 (arm_linux_init_hwbp_cap): ... this new function.
5231 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5232 (arm_linux_get_hw_watchpoint_count): Likewise.
5233 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5234 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5235 (arm_prepare_to_resume): Use perror_with_name instead of error.
5236
5237 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5238
5239 * linux-arm-low.c: Include <signal.h>.
5240 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5241 (struct arm_linux_hwbp_cap): New data type.
5242 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5243 (struct arm_linux_hw_breakpoint): New data type.
5244 (MAX_BPTS, MAX_WPTS): Define.
5245 (struct arch_process_info, struct arch_lwp_info): New data types.
5246 (arm_linux_get_hwbp_cap): New function.
5247 (arm_linux_get_hw_breakpoint_count): Likewise.
5248 (arm_linux_get_hw_watchpoint_count): Likewise.
5249 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5250 (arm_hwbp_control_initialize): Likewise.
5251 (arm_hwbp_control_is_enabled): Likewise.
5252 (arm_hwbp_control_is_initialized): Likewise.
5253 (arm_hwbp_control_disable): Likewise.
5254 (arm_linux_hw_breakpoint_equal): Likewise.
5255 (arm_linux_hw_point_initialize): Likewise.
5256 (struct update_registers_data): New data structure.
5257 (update_registers_callback: New function.
5258 (arm_insert_point): Likewise.
5259 (arm_remove_point): Likewise.
5260 (arm_stopped_by_watchpoint): Likewise.
5261 (arm_stopped_data_address): Likewise.
5262 (arm_new_process): Likewise.
5263 (arm_new_thread): Likewise.
5264 (arm_prepare_to_resume): Likewise.
5265 (the_low_target): Register arm_insert_point, arm_remove_point,
5266 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5267 arm_new_thread, and arm_prepare_to_resume.
5268
5269 2011-09-15 Stan Shebs <stan@codesourcery.com>
5270
5271 * server.h (struct emit_ops): Add compare-goto fields.
5272 * tracepoint.c (gdb_agent_op_sizes): New table.
5273 (emit_eq_goto): New function.
5274 (emit_ne_goto): New function.
5275 (emit_lt_goto): New function.
5276 (emit_le_goto): New function.
5277 (emit_gt_goto): New function.
5278 (emit_ge_goto): New function.
5279 (is_goto_target): New function.
5280 (compile_bytecodes): Recognize special cases of compare-goto
5281 combinations and call specialized emitters for them.
5282 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5283 (amd64_emit_ne_goto): New function.
5284 (amd64_emit_lt_goto): New function.
5285 (amd64_emit_le_goto): New function.
5286 (amd64_emit_gt_goto): New function.
5287 (amd64_emit_ge_goto): New function.
5288 (amd64_emit_ops): Add the new functions.
5289 (i386_emit_eq_goto): New function.
5290 (i386_emit_ne_goto): New function.
5291 (i386_emit_lt_goto): New function.
5292 (i386_emit_le_goto): New function.
5293 (i386_emit_gt_goto): New function.
5294 (i386_emit_ge_goto): New function.
5295 (i386_emit_ops): Add the new functions.
5296
5297 2011-09-08 Stan Shebs <stan@codesourcery.com>
5298
5299 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5300 (i386_emit_epilogue): Restore %ebx.
5301
5302 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5303
5304 * server.c (step_thread): Remove definition.
5305 (process_serial_event): Don't handle Hs.
5306 * server.h (step_thread): Remove declaration.
5307 * target.c (set_desired_inferior): Remove use of step_thread.
5308
5309 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5310
5311 * linux-low.c: Include linux-procfs.h.
5312 (linux_attach_lwp_1): Update comments.
5313 (linux_attach): Scan for existing threads when attaching to a
5314 process that is the tgid.
5315 * Makefile.in: Update dependencies.
5316
5317 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5318
5319 * configure.srv: Add linux-procfs.o dependencies.
5320
5321 2011-08-14 Yao Qi <yao@codesourcery.com>
5322
5323 * target.h (struct target_ops): Fix indent.
5324 * win32-low.c (win32_target_ops): Fix comment.
5325
5326 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5327 Yao Qi <yao@codesourcery.com>
5328
5329 * Makefile.in (clean): Remove tic6x-*.c files.
5330 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5331 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5332 (tic6x-c64xp-linux.c): Likewise.
5333 * configure.srv: Add support for tic6x-*-uclinux.
5334 * linux-tic6x-low.c: New.
5335 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5336
5337 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5338 Yao Qi <yao@codesourcery.com>
5339
5340 * target.h (struct target_ops): Add read_loadmap.
5341 * linux-low.c (struct target_loadseg): New type.
5342 (struct target_loadmap): New type.
5343 (linux_read_loadmap): New function.
5344 (linux_target_ops): Add linux_read_loadmap.
5345 * server.c (handle_query): Support qXfer:fdpic:read packet.
5346 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5347 to NULL.
5348
5349 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5350
5351 * win32-low.c: Include <stdint.h>.
5352
5353 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5354
5355 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5356 to the inferior here.
5357 (i386_remove_aligned_watchpoint): Ditto.
5358 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5359 fit part of the watchpoint in the debug registers.
5360 (i386_update_inferior_debug_regs): New.
5361 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5362 registers, and only update the inferior on success.
5363 (i386_low_remove_watchpoint): Ditto.
5364
5365 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5366
5367 * linux-low.c (compare_ints, unique, list_threads, show_process,
5368 linux_core_of_thread): Delete.
5369 (linux_target_ops): Change linux_core_of_thread to
5370 linux_common_core_of_thread.
5371 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5372 * utils.c (malloc_failure): Change type of argument.
5373 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5374 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5375 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5376 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5377 (IPA_OBJS): Add common-utils-ipa.o.
5378 (ptid_h, linux_osdata_h): New macros.
5379 (server_h): Add common/common-utils.h, common/xml-utils.h,
5380 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5381 common/ptid.h.
5382 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5383 ptid.o, buffer.o): New rules.
5384 (linux-low.o): Add common/linux-osdata.h as a dependency.
5385 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5386 * configure.ac: Add AC_HEADER_DIRENT check.
5387 * config.in: Regenerate.
5388 * configure: Regenerate.
5389 * remote-utils.c (xml_escape_text): Delete.
5390 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5391 buffer_xml_printf): Move to common/buffer.c.
5392 * server.c (main): Remove call to initialize_inferiors.
5393 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5394 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5395 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5396 internal_error, gdb_assert, gdb_assert_fail): Delete.
5397 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5398 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5399 common/buffer.h.
5400 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5401 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5402 initialize_inferiors): Delete.
5403
5404 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5405
5406 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5407 symbol error.
5408
5409 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5410
5411 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5412 assertion.
5413 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5414
5415 2011-05-26 Yao Qi <yao@codesourcery.com>
5416
5417 * Makefile.in (thread-db.o): Track dependence to
5418 common/gdb_thread_db.h.
5419 * thread-db.c: include gdb_thread_db.h from right place.
5420
5421 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5422
5423 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5424 __FILE__ and __LINE__ to internal_error.
5425
5426 2011-05-13 Doug Evans <dje@google.com>
5427
5428 * thread-db.c (try_thread_db_load_from_sdir): New function.
5429 (try_thread_db_load_from_dir): New function.
5430 (thread_db_load_search): Handle $sdir, ignore $pdir.
5431 Remove trying of system directories if search of
5432 libthread-db-search-path fails, that is now done via $sdir.
5433
5434 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5435
5436 * server.c (handle_query): Add EnableDisableTracepoints to the list
5437 of supported features.
5438 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5439 tracepoints.
5440 (cmd_qtenable_disable): New.
5441 (cmd_qtstart): Install tracepoints even if disabled.
5442 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5443 receiving a QTEnable or QTDisable packet.
5444 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5445 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5446 tracepoints.
5447 (gdb_probe): Skip data collection if static tracepoint is disabled.
5448
5449 2011-05-10 Doug Evans <dje@google.com>
5450
5451 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5452
5453 2011-05-04 Doug Evans <dje@google.com>
5454
5455 * linux-low.c (linux_join): Skip process lookup.
5456 * spu-low.c (spu_join): Ditto.
5457 * server.c (join_inferiors_callback): Delete.
5458 (process_serial_event): For 'D' packet (detach) call join_inferior
5459 directly.
5460
5461 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5462
5463 * README: Don't mention xscale*-*-linux*.
5464 * configure.srv (xscale*-*-linux*): Don't handle target.
5465
5466 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5467
5468 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5469 casting pointers.
5470 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5471 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5472 (i386_emit_void_call_2): Likewise.
5473
5474 2011-04-26 Yao Qi <yao@codesourcery.com>
5475
5476 * linux-low.c: Move common macros to linux-ptrace.h.
5477 Include linux-ptrace.h.
5478 * Makefile.in (linux_ptrace_h): New.
5479 (linux-low.o): Depends on linux-ptrace.h.
5480
5481 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5482
5483 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5484 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5485 (remote_prepare): New function with most of the TCP code from ...
5486 (remote_open): ... here. Detect PORT here unconditionally. Move also
5487 setting transport_is_reliable.
5488 * server.c (run_once): New variable.
5489 (gdbserver_usage): Document it.
5490 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5491 the first run if RUN_ONCE.
5492 * server.h (run_once, remote_prepare): New declarations.
5493
5494 2011-04-19 Tom Tromey <tromey@redhat.com>
5495
5496 * win32-low.c (handle_load_dll): Remove duplicate "the".
5497
5498 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5499
5500 Remove support for old Cygwin 1.5 versions.
5501 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5502 function to avoid warning.
5503 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5504 warning.
5505
5506 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5507
5508 * gdbserver/server.h (Macro _): Define it if not available.
5509
5510 2011-03-14 Michael Snyder <msnyder@vmware.com>
5511
5512 * hostio.c (handle_close): Remove unnecessary null test.
5513
5514 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5515
5516 * Makefile.in (maintainer-clean realclean distclean): Remove
5517 "make ... subdir_do" command.
5518
5519 2011-03-10 Michael Snyder <msnyder@vmware.com>
5520
5521 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5522
5523 * server.c (handle_v_run): Free alloced buffer on early return.
5524
5525 2011-03-09 Yao Qi <yao@codesourcery.com>
5526
5527 Revert:
5528 2011-03-04 Yao Qi <yao@codesourcery.com>
5529
5530 * Makefile.in: Remove GNU make feature --directory.
5531
5532 2011-03-05 Yao Qi <yao@codesourcery.com>
5533
5534 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5535 (subdir_do): New make target. Copied from gdb/Makefile.
5536 (maintainer-clean, realclean, distclean, clean): Call corresponding
5537 make targets in common/Makefile.
5538
5539 2011-02-11 Yao Qi <yao@codesourcery.com>
5540
5541 * configure.ac: Call AC_PROG_RANLIB.
5542 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5543 * configure: Regenerate.
5544
5545 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5546
5547 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5548
5549 2011-03-06 Yao Qi <yao@codesourcery.com>
5550
5551 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5552
5553 2011-03-05 Yao Qi <yao@codesourcery.com>
5554
5555 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5556 (subdir_do): New make target. Copied from gdb/Makefile.
5557 (maintainer-clean, realclean, distclean, clean): Call corresponding
5558 make targets in common/Makefile.
5559
5560 2011-03-04 Yao Qi <yao@codesourcery.com>
5561
5562 * Makefile.in: Remove GNU make feature --directory.
5563
5564 2011-03-04 Michael Snyder <msnyder@vmware.com>
5565
5566 * server.c (queue_stop_reply): Call xmalloc not malloc.
5567
5568 2011-03-02 Michael Snyder <msnyder@vmware.com>
5569
5570 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5571
5572 2011-02-28 Michael Snyder <msnyder@vmware.com>
5573
5574 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5575 (cmd_qtframe): Ditto.
5576 (cmd_qtbuffer): Ditto.
5577 (cmd_bigqtbuffer): Ditto.
5578
5579 * utils.c (decimal2str): Initialize 'width' to nine, then
5580 don't mess with it.
5581
5582 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5583
5584 * hostio.c (require_data): Free *data, not data.
5585
5586 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5587
5588 * hostio.c (require_data): Use free, not xfree.
5589
5590 2011-02-27 Michael Snyder <msnyder@vmware.com>
5591
5592 * server.c (handle_query): Discard unused value.
5593
5594 * hostio.c (require_data): Free malloc memory before returning
5595 error.
5596
5597 2011-02-26 Michael Snyder <msnyder@vmware.com>
5598
5599 * linux-low.c (list_threads): Call closedir for dirent.
5600
5601 2011-02-27 Michael Snyder <msnyder@vmware.com>
5602
5603 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5604 a case statement falls through.
5605
5606 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5607
5608 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5609 in comparison.
5610
5611 2011-02-26 Michael Snyder <msnyder@vmware.com>
5612
5613 * utils.c (decimal2str): Eliminate dead code and dead param.
5614 (pulongest): Drop dead param from call to decimal2str.
5615 (plongest): Ditto.
5616
5617 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5618
5619 Revert the following patch (not approved yet):
5620 2011-02-21 Hui Zhu <teawater@gmail.com>
5621 * tracepoint.c (tp_printf): New function.
5622 (eval_agent_expr): Handle gdb_agent_op_printf.
5623
5624 2011-02-21 Hui Zhu <teawater@gmail.com>
5625
5626 * tracepoint.c (tp_printf): New function.
5627 (eval_agent_expr): Handle gdb_agent_op_printf.
5628
5629 2011-02-18 Tom Tromey <tromey@redhat.com>
5630
5631 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5632 (tracepoint.o): Likewise.
5633 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5634 (gdb_agent_op_names): Likewise.
5635
5636 2011-02-18 Tom Tromey <tromey@redhat.com>
5637
5638 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5639 gdb_agent_op_rot>: New constants.
5640 (gdb_agent_op_names): Add pick and roll.
5641 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5642 cases.
5643
5644 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5645
5646 * aclocal.m4: Regenerated with aclocal-1.11.1.
5647
5648 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5649
5650 * server.c (handle_qxfer_traceframe_info): New.
5651 (qxfer_packets): Register "traceframe-info".
5652 (handle_query): Report support for qXfer:traceframe-info:read+.
5653 * tracepoint.c (match_blocktype): New.
5654 (traceframe_find_block_type): Rename to ...
5655 (traceframe_walk_blocks): ... this. Add callback filter argument,
5656 and use it.
5657 (traceframe_find_block_type): New, reimplemented on top of
5658 traceframe_walk_blocks.
5659 (build_traceframe_info_xml): New.
5660 (traceframe_read_info): New.
5661 * server.h (traceframe_read_info): Declare.
5662
5663 2011-02-11 Yao Qi <yao@codesourcery.com>
5664
5665 * configure.ac: Call AC_PROG_RANLIB.
5666 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5667 * configure: Regenerate.
5668
5669 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5670
5671 * server.c (gdb_read_memory): Change return semantics to allow
5672 partial transfers.
5673 (handle_search_memory_1): Adjust.
5674 (process_serial_event) <'m' packet>: Handle partial transfers.
5675 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5676
5677 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5678
5679 * regcache.c (init_register_cache): Initialize
5680 regcache->register_status.
5681 (free_register_cache): Release regcache->register_status.
5682 (regcache_cpy): Copy register_status.
5683 (registers_to_string): Print 'x's for unavailable registers.
5684 (supply_register): Mark the register's status valid or
5685 unavailable, depending on whether a buffer was passed in or not.
5686 (supply_register_zeroed): New.
5687 (supply_regblock): Mark the registers' status valid or
5688 unavailable, depending on whether a buffer was passed in or not.
5689 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5690 (struct regcache): New `register_status' field.
5691 (supply_register_zeroed): Declare.
5692 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5693 supply_register_zeroed, rather than passing a NULL buffer to
5694 supply_register.
5695 * tracepoint.c (fetch_traceframe_registers): Update comment.
5696
5697 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5698
5699 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5700 buffer explicit.
5701
5702 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5703
5704 * server.h (decode_xfer_write): Change prototype.
5705 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5706 and don't extract the annex here.
5707 * server.c (decode_xfer_read): Remove `annex' parameter,
5708 and don't extract the annex here.
5709 (decode_xfer): New.
5710 (struct qxfer): New.
5711 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5712 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5713 (handle_qxfer_statictrace): New functions, abstracted out from
5714 handle_query, and made to use the struct qxfer interface.
5715 (handle_threads_qxfer_proper): Rename to ...
5716 (handle_qxfer_threads_proper): ... this.
5717 (handle_threads_qxfer): Rename to ...
5718 (handle_qxfer_threads): ... this. Adjust.
5719 (qxfer_packets): New array.
5720 (handle_qxfer): New function.
5721 (handle_query): Use handle_qxfer.
5722
5723 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5724
5725 * gdbreplay.c: Shorten lines of >= 80 columns.
5726 * linux-low.c: Ditto.
5727 * linux-ppc-low.c: Ditto.
5728 * linux-s390-low.c: Ditto.
5729 * linux-sparc-low.c: Ditto.
5730 * linux-x86-low.c: Ditto.
5731 * linux-xtensa-low.c: Ditto.
5732 * mem-break.c: Ditto.
5733 * nto-low.c: Ditto.
5734 * regcache.h: Ditto.
5735 * remote-utils.c: Ditto.
5736 * server.c: Ditto.
5737 * server.h: Ditto.
5738 * thread-db.c: Ditto.
5739 * tracepoint.c: Ditto.
5740 * utils.c: Ditto.
5741 * win32-low.h: Ditto.
5742
5743 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5744
5745 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5746 update.
5747
5748 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5749
5750 * server.c (gdbserver_version): Update copyright year in version
5751 output.
5752 * gdbreplay.c (gdbreplay_version): Ditto.
5753
5754 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5755
5756 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5757 * linux-bfin-low.c: New file.
5758 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5759 PT_DATA_ADDR for BFIN targets.
5760 * Makefile.in (SFILES): Add linux-bfin-low.c.
5761 (clean): Remove reg-bfin.c.
5762 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5763 * README: Mention supported Blackfin targets.
5764
5765 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5766
5767 * .gitignore: New file.
5768
5769 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5770
5771 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5772
5773 2010-10-22 Jie Zhang <jie@codesourcery.com>
5774
5775 * Makefile.in: Add FLAGS_TO_PASS variable.
5776 (install): Remove dependency of install-only and recursively
5777 invoke make for install-only.
5778
5779 2010-10-04 Doug Evans <dje@google.com>
5780
5781 * Makefile.in (uninstall): Use $(DESTDIR).
5782
5783 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5784
5785 PR gdb/11842
5786
5787 * linux-x86-low.c (compat_siginfo_from_siginfo)
5788 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5789 si_code is < 0. Check for si_code == SI_TIMER before checking for
5790 si_code < 0.
5791
5792 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5793
5794 * lynx-i386-low.c: New file.
5795 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5796
5797 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5798
5799 * lynx-low.c (ptrace_request_to_str): Remove handling for
5800 request values that have been removed in LynxOS 5.x.
5801
5802 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5803
5804 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5805 <ptrace.h>
5806
5807 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5808
5809 * configure.ac: Add --enable-inprocess-agent option.
5810 * configure: Rebuilt.
5811
5812 2010-09-06 Yao Qi <yao@codesourcery.com>
5813
5814 * linux-low.c (linux_kill): Remove unused variable.
5815 (linux_stabilize_threads): Likewise.
5816 * server.c (start_inferior): Likewise.
5817 (queue_stop_reply_callback): Likewise.
5818 * tracepoint.c (do_action_at_tracepoint): Likewise.
5819
5820 2010-09-06 Yao Qi <yao@codesourcery.com>
5821
5822 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5823 on return.
5824
5825 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5826
5827 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5828
5829 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5830
5831 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5832 "$(IPA_DEPFILES)".
5833
5834 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5835
5836 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5837 gdbserver/lynx-ppc-low.c: New files.
5838 * Makefile.in (lynx_low_h): New variable.
5839 (lynx-low.o, lynx-ppc-low.o): New rules.
5840 * configure.ac: On LynxOS, link with -lnetinet.
5841 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5842 * configure: regenerate.
5843
5844 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5845
5846 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5847 * configure.ac: Add check for vasprintf and vsnprintf.
5848 * configure, config.in: Regenerate.
5849 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5850
5851 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5852
5853 * gdbreplay.c: Move include of alloca.h up, next to include of
5854 malloc.h.
5855 * server.h: Add include of malloc.h.
5856 * mem-break.c: Remove include of malloc.h.
5857 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5858
5859 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5860
5861 * Makefile.in (memmem.o): Build with -Wno-error.
5862
5863 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5864
5865 * utils.c (xsnprintf): Make non-static.
5866 * server.h: Add xsnprintf declaration.
5867 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5868 replace calls to snprintf by calls to xsnprintf throughout.
5869
5870 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5871
5872 * configure.ac: Add configure check for alloca.
5873 * configure, config.in: Regenerate.
5874 * server.h: Include alloca.h if it exists.
5875 * gdbreplay.c: Include alloca.h if it exists.
5876
5877 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5878
5879 * linux-low.c (__SIGRTMIN): Define if not already defined.
5880 (linux_create_inferior): Check for __ANDROID__ rather than
5881 __SIGRTMIN.
5882 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5883 are already deferred.
5884 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5885 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5886 stopped and already has a pending signal to report.
5887 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5888 a pending signal to report or is moving out of a jump pad.
5889 (linux_init_signals): Check for __ANDROID__ rather than
5890 __SIGRTMIN.
5891
5892 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5893
5894 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5895 debug_threads check. Avoid a linear search when not doing debug
5896 output.
5897
5898 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5899
5900 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5901 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5902 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5903 (process_event): Change local fd's type to gdb_fildes_t.
5904 (create_file_handler): Adjust prototype.
5905 (delete_file_handler): Adjust prototype.
5906 (handle_file_event): Adjust prototype. Use pfildes.
5907 (create_file_event): Adjsut prototype.
5908 * remote-utils.c (remote_desc, listen_desc): Change type to
5909 gdb_fildes_t.
5910 * server.h: New gdb_fildes_t typedef.
5911 [USE_WIN32API]: Include winsock2.h.
5912 (delete_file_handler, add_file_handler): Adjust prototypes.
5913 (pfildes): Declare.
5914 * utils.c (pfildes): New.
5915
5916 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5917
5918 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5919 * configure: Regenerate.
5920
5921 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5922
5923 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5924 (linux_done_accessing_memory): ... this.
5925 (linux_target_ops): Adjust.
5926 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5927 * nto-low.c (nto_target_ops): Adjust comment.
5928 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5929 * spu-low.c (spu_target_ops): Adjust comment.
5930 * target.h (target_ops): Rename unprepare_to_access_memory field
5931 to done_accessing_memory.
5932 (unprepare_to_access_memory): Rename to ...
5933 (done_accessing_memory): ... this.
5934
5935 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5936
5937 * linux-low.c (linux_prepare_to_access_memory): New.
5938 (linux_unprepare_to_access_memory): New.
5939 (linux_target_ops): Install them.
5940 * server.c (read_memory): Rename to ...
5941 (gdb_read_memory): ... this. Use
5942 prepare_to_access_memory/prepare_to_access_memory.
5943 (write_memory): Rename to ...
5944 (gdb_write_memory): ... this. Use
5945 prepare_to_access_memory/prepare_to_access_memory.
5946 (handle_search_memory_1): Adjust.
5947 (process_serial_event): Adjust.
5948 * target.h (struct target_ops): New fields
5949 prepare_to_access_memory and unprepare_to_access_memory.
5950 (prepare_to_access_memory, unprepare_to_access_memory): New.
5951 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5952 prepare_to_access_memory/prepare_to_access_memory.
5953 * nto-low.c (nto_target_ops): Adjust.
5954 * spu-low.c (spu_target_ops): Adjust.
5955 * win32-low.c (win32_target_ops): Adjust.
5956
5957 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5958
5959 * Makefile.in (WARN_CFLAGS): Get it from configure.
5960 (WERROR_CFLAGS): New.
5961 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5962 * configure.ac: Introduce --enable-werror, which adds -Werror to
5963 the compiler command line. Enabled by default. Disable with
5964 --disable-werror. Add -Wdeclaration-after-statement
5965 Wpointer-arith and -Wformat-nonliteral to warning flags.
5966 * configure: Regenerate.
5967
5968 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5969
5970 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5971
5972 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5973
5974 * gdbreplay.c (remote_error): New.
5975 (gdbchar): New.
5976 (expect): Use gdbchar. Check for error reading from GDB.
5977 Clarify sync error output.
5978 (play): Check for errors writing to GDB.
5979 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5980 * remote-utils.c (getpkt): Check for errors writing to the remote
5981 descriptor.
5982
5983 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5984
5985 * linux-low.c (linux_wait_1): Move non-debugging code out of
5986 `debug_threads' control.
5987
5988 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5989
5990 * linux-low.c (linux_wait_1): Don't set last_status here.
5991 * server.c (push_event, queue_stop_reply_callback): Assert we're
5992 not pushing a TARGET_WAITKIND_IGNORE event.
5993 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5994 (myresume, handle_target_event): Set the thread's last_resume_kind
5995 and last_status from the target returned status.
5996
5997 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5998
5999 PR threads/10729
6000
6001 * linux-x86-low.c (update_debug_registers_callback): New.
6002 (i386_dr_low_set_addr): Use it.
6003 (i386_dr_low_get_addr): New.
6004 (i386_dr_low_set_control): Use update_debug_registers_callback.
6005 (i386_dr_low_get_control): New.
6006 (i386_dr_low_get_status): Adjust.
6007 * linux-low.c (linux_stop_lwp): New.
6008 * linux-low.h (linux_stop_lwp): Declare.
6009
6010 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6011 argument instead of a i386_debug_reg_state.
6012 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6013 a i386_debug_reg_state.
6014 (i386_insert_aligned_watchpoint): Adjust.
6015 (i386_remove_aligned_watchpoint): Adjust.
6016 (i386_low_stopped_data_address): Read the debug registers from the
6017 inferior instead of from the mirrors.
6018 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6019 (i386_dr_low_get_addr): Declare.
6020 (i386_dr_low_get_control): Declare.
6021 (i386_dr_low_get_status): Change prototype.
6022
6023 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6024 (i386_dr_low_get_addr): New.
6025 (i386_dr_low_get_control): New.
6026 (i386_dr_low_get_status): Adjust prototype. Return
6027 dr_status_mirror.
6028 (i386_initial_stuff): Clear dr_status_mirror and
6029 dr_control_mirror.
6030 (i386_get_thread_context): Adjust.
6031 (i386_set_thread_context): Adjust.
6032 (i386_thread_added): Adjust.
6033
6034 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6035
6036 * linux-low.h (linux_thread_area): Delete declaration.
6037
6038 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6039
6040 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6041 after its termination.
6042
6043 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6044
6045 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6046 (gdb_wants_all_stopped): Delete.
6047 (linux_wait_1): Don't call them.
6048 * server.c (handle_v_cont): Tag all threads as want-stopped.
6049 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6050 stopped as "client-wants-stopped".
6051
6052 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6053
6054 * Makefile.in (signals_h): New.
6055 (server_h): Depend on it.
6056 (server.o): Don't depend on $(signals_def).
6057 (signals.o): Depend on $(signals_def).
6058
6059 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6060
6061 * Makefile.in (signals_def): New.
6062 (server_h): Append include/gdb/signals.h and signals_def.
6063 (server.o): Append signals_def.
6064
6065 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6066
6067 * server.c (handle_target_event): Use target_signal_to_host for
6068 resume_info.sig initialization.
6069 * target.h (struct thread_resume) <sig>: New comment.
6070
6071 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6072
6073 * server.c (handle_query): strcpy() the returned string from paddress()
6074 instead of sprintf().
6075 * utils.c (paddress): Return phex_nz().
6076
6077 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6078
6079 * server.c (handle_v_cont): Call mourn_inferior if process
6080 just exited.
6081 (myresume): Likewise.
6082
6083 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6084
6085 Static tracepoints, and integration with UST.
6086
6087 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6088 * mem-break.c (uninsert_all_breakpoints)
6089 (reinsert_all_breakpoints): New.
6090 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6091 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6092 (gdb_agent_ust_loaded, helper_thread_id)
6093 (gdb_agent_helper_thread_id): New macros.
6094 (struct ipa_sym_addresses): Add addr_ust_loaded,
6095 addr_helper_thread_id, addr_cmd_buf.
6096 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6097 (in_process_agent_loaded_ust): New.
6098 (write_e_ust_not_loaded): New.
6099 (maybe_write_ipa_ust_not_loaded): New.
6100 (struct collect_static_trace_data_action): New.
6101 (enum tracepoint_type) <static_tracepoint>: New.
6102 (struct tracepoint) <handle>: Mention static tracepoints.
6103 (struct static_tracepoint_ctx): New.
6104 (CMD_BUF_SIZE): New.
6105 (add_tracepoint_action): Handle static tracepoint actions.
6106 (unprobe_marker_at): New.
6107 (clear_installed_tracepoints): Handle static tracepoints.
6108 (cmd_qtdp): Handle static tracepoints.
6109 (probe_marker_at): New.
6110 (cmd_qtstart): Handle static tracepoints.
6111 (response_tracepoint): Handle static tracepoints.
6112 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6113 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6114 (get_context_regcache): Handle static tracepoints.
6115 (do_action_at_tracepoint): Handle static tracepoint actions.
6116 (traceframe_find_block_type): Handle static trace data blocks.
6117 (traceframe_read_sdata): New.
6118 (download_tracepoints): Download static tracepoint actions.
6119 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6120 (GDB_PROBE_NAME): New.
6121 (ust_ops): New.
6122 (GET_UST_SYM): New.
6123 (USTF): New.
6124 (dlsym_ust): New.
6125 (ust_marker_to_static_tracepoint): New.
6126 (gdb_probe): New.
6127 (collect_ust_data_at_tracepoint): New.
6128 (gdb_ust_probe): New.
6129 (UNIX_PATH_MAX, SOCK_DIR): New.
6130 (gdb_ust_connect_sync_socket): New.
6131 (resume_thread, stop_thread): New.
6132 (run_inferior_command): New.
6133 (init_named_socket): New.
6134 (gdb_ust_socket_init): New.
6135 (cstr_to_hexstr): New.
6136 (next_st): New.
6137 (first_marker, next_marker): New.
6138 (response_ust_marker): New.
6139 (cmd_qtfstm, cmd_qtsstm): New.
6140 (unprobe_marker_at, probe_marker_at): New.
6141 (cmd_qtstmat, gdb_ust_thread): New.
6142 (gdb_ust_init): New.
6143 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6144 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6145 (ST_REGENTRY): New.
6146 (x86_64_st_collect_regmap): New.
6147 (X86_64_NUM_ST_COLLECT_GREGS): New.
6148 (AMD64_RIP_REGNUM): New.
6149 (supply_static_tracepoint_registers): New.
6150 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6151 (ST_REGENTRY): New.
6152 (i386_st_collect_regmap): New.
6153 (i386_NUM_ST_COLLECT_GREGS): New.
6154 (supply_static_tracepoint_registers): New.
6155 * server.c (handle_query): Handle qXfer:statictrace:read.
6156 <qSupported>: Report support for StaticTracepoints, and
6157 qXfer:statictrace:read features.
6158 * server.h (traceframe_read_sdata)
6159 (supply_static_tracepoint_registers): Declare.
6160 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6161 (unpack_varlen_hex): Include in IPA build.
6162 * Makefile.in (ustlibs, ustinc): New.
6163 (IPA_OBJS): Add remote-utils-ipa.o.
6164 ($(IPA_LIB)): Link -ldl and -lpthread.
6165 (UST_CFLAGS): New.
6166 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6167 * config.in, configure: Regenerate.
6168
6169 2010-06-20 Ian Lance Taylor <iant@google.com>
6170 Pedro Alves <pedro@codesourcery.com>
6171
6172 * linux-x86-low.c (always_true): Delete.
6173 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6174 trying to fool the compiler with always_true.
6175
6176 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6177
6178 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6179 conditions in gdbserver.
6180
6181 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6182
6183 * spu-low.c (spu_read_memory): Wrap around local store limit.
6184 (spu_write_memory): Likewise.
6185
6186 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6187
6188 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6189 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6190 LONGEST uses.
6191 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6192 uses.
6193 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6194 uses with LONGEST uses.
6195
6196 2010-06-14 Stan Shebs <stan@codesourcery.com>
6197 Pedro Alves <pedro@codesourcery.com>
6198
6199 Bytecode compiler.
6200
6201 * linux-x86-low.c: Include limits.h.
6202 (add_insns): New.
6203 (always_true): New.
6204 (EMIT_ASM): New.
6205 (EMIT_ASM32): New.
6206 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6207 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6208 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6209 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6210 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6211 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6212 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6213 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6214 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6215 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6216 (amd64_emit_void_call_2): New.
6217 (amd64_emit_ops): New.
6218 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6219 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6220 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6221 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6222 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6223 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6224 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6225 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6226 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6227 (i386_emit_stack_adjust, i386_emit_int_call_1)
6228 (i386_emit_void_call_2): New.
6229 (i386_emit_ops): New.
6230 (x86_emit_ops): New.
6231 (the_low_target): Install x86_emit_ops.
6232 * server.h (struct emit_ops): New.
6233 (get_raw_reg_func_addr): Declare.
6234 (current_insn_ptr, emit_error): Declare.
6235 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6236 (set_trace_state_variable_value): New defines.
6237 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6238 addr_get_trace_state_variable_value and
6239 addr_set_trace_state_variable_value.
6240 (symbol_list): New fields for get_raw_reg,
6241 get_trace_state_variable_value and set_trace_state_variable_value.
6242 (condfn): New typedef.
6243 (struct tracepoint): New field `compiled_cond'.
6244 (do_action_at_tracepoint): Clear compiled_cond.
6245 (get_trace_state_variable_value, set_trace_state_variable_value):
6246 Export in the IPA.
6247 (condition_true_at_tracepoint): If there's a compiled condition,
6248 run that.
6249 (current_insn_ptr, emit_error): New globals.
6250 (struct bytecode_address): New.
6251 (get_raw_reg_func_addr): New.
6252 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6253 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6254 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6255 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6256 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6257 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6258 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6259 (compile_tracepoint_condition, compile_bytecodes): New.
6260 * target.h (emit_ops): Forward declare.
6261 (struct target_ops): New field emit_ops.
6262 (target_emit_ops): New.
6263 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6264 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6265 * linux-low.c (linux_emit_ops): New.
6266 (linux_target_ops): Install it.
6267 * linux-low.h (struct linux_target_ops): New field emit_ops.
6268
6269 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6270
6271 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6272 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6273
6274 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6275 Stan Shebs <stan@codesourcery.com>
6276
6277 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6278 (all): Depend on $(extra_libraries).
6279 (install-only): Install the IPA.
6280 (IPA_OBJS, IPA_LIB): New.
6281 (clean): Remove the IPA lib.
6282 (IPAGENT_CFLAGS): New.
6283 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6284 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6285 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6286 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6287 * configure.ac: Check for atomic builtins support in the compiler.
6288 (IPA_DEPFILES, extra_libraries): Define.
6289 * configure.srv (ipa_obj): Add description.
6290 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6291 (i[34567]86-*-linux*): Set ipa_obj.
6292 (x86_64-*-linux*): Set ipa_obj.
6293 * linux-low.c (stabilizing_threads): New.
6294 (supports_fast_tracepoints): New.
6295 (linux_detach): Stabilize threads before detaching.
6296 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6297 the lwp is either not stabilizing, or is moving out of a jump pad.
6298 (linux_fast_tracepoint_collecting): New.
6299 (maybe_move_out_of_jump_pad): New.
6300 (enqueue_one_deferred_signal): New.
6301 (dequeue_one_deferred_signal): New.
6302 (linux_wait_for_event_1): If moving out of a jump pad, defer
6303 pending signals to later.
6304 (linux_stabilize_threads): New.
6305 (linux_wait_1): Check if threads need moving out of jump pads, and
6306 do it if so.
6307 (stuck_in_jump_pad_callback): New.
6308 (move_out_of_jump_pad_callback): New.
6309 (lwp_running): New.
6310 (linux_resume_one_lwp): Handle moving out of jump pads.
6311 (linux_set_resume_request): Dequeue deferred signals.
6312 (need_step_over_p): Also step over fast tracepoint jumps.
6313 (start_step_over): Also uninsert fast tracepoint jumps.
6314 (finish_step_over): Also reinsert fast tracepoint jumps.
6315 (linux_install_fast_tracepoint_jump): New.
6316 (linux_target_ops): Install linux_stabilize_threads and
6317 linux_install_fast_tracepoint_jump_pad.
6318 * linux-low.h (linux_target_ops) <get_thread_area,
6319 install_fast_tracepoint_jump_pad>: New fields.
6320 (struct lwp_info) <collecting_fast_tracepoint,
6321 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6322 (linux_get_thread_area): Declare.
6323 * linux-x86-low.c (jump_insn): New.
6324 (x86_get_thread_area): New.
6325 (append_insns): New.
6326 (push_opcode): New.
6327 (amd64_install_fast_tracepoint_jump_pad): New.
6328 (i386_install_fast_tracepoint_jump_pad): New.
6329 (x86_install_fast_tracepoint_jump_pad): New.
6330 (the_low_target): Install x86_get_thread_area and
6331 x86_install_fast_tracepoint_jump_pad.
6332 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6333 (struct fast_tracepoint_jump): New.
6334 (fast_tracepoint_jump_insn): New.
6335 (fast_tracepoint_jump_shadow): New.
6336 (find_fast_tracepoint_jump_at): New.
6337 (fast_tracepoint_jump_here): New.
6338 (delete_fast_tracepoint_jump): New.
6339 (set_fast_tracepoint_jump): New.
6340 (uninsert_fast_tracepoint_jumps_at): New.
6341 (reinsert_fast_tracepoint_jumps_at): New.
6342 (set_breakpoint_at): Use write_inferior_memory.
6343 (uninsert_raw_breakpoint): Use write_inferior_memory.
6344 (check_mem_read): Mask out fast tracepoint jumps.
6345 (check_mem_write): Mask out fast tracepoint jumps.
6346 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6347 (set_fast_tracepoint_jump): Declare.
6348 (delete_fast_tracepoint_jump)
6349 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6350 (reinsert_fast_tracepoint_jumps_at): Declare.
6351 * regcache.c: Don't compile many functions when building the
6352 in-process agent library.
6353 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6354 the register buffer in the heap.
6355 (free_register_cache): If the register buffer isn't owned by the
6356 regcache, don't free it.
6357 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6358 pre-existing register caches.
6359 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6360 type.
6361 (convert_ascii_to_int): : Constify `from' parameter type.
6362 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6363 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6364 the needed buffer in-place.
6365 (relocate_instruction): New.
6366 * server.c (handle_query) <qSymbols>: If the target supports
6367 tracepoints, give it a chance of looking up symbols. Report
6368 support for fast tracepoints.
6369 (handle_status): Stabilize threads.
6370 (process_serial_event): Adjust.
6371 * server.h (struct fast_tracepoint_jump): Forward declare.
6372 (struct process_info) <fast_tracepoint_jumps>: New field.
6373 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6374 (decode_X_packet, decode_M_packet): Adjust.
6375 (relocate_instruction): Declare.
6376 (in_process_agent_loaded): Declare.
6377 (tracepoint_look_up_symbols): Declare.
6378 (struct fast_tpoint_collect_status): Declare.
6379 (fast_tracepoint_collecting): Declare.
6380 (force_unlock_trace_buffer): Declare.
6381 (handle_tracepoint_bkpts): Declare.
6382 (initialize_low_tracepoint)
6383 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6384 * target.h (struct target_ops) <stabilize_threads,
6385 install_fast_tracepoint_jump_pad>: New fields.
6386 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6387 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6388 [HAVE_STDINT_H]: Include stdint.h.
6389 (trace_debug_1): Rename to ...
6390 (trace_vdebug): ... this.
6391 (trace_debug): Rename to ...
6392 (trace_debug_1): ... this. Add `level' parameter.
6393 (trace_debug): New.
6394 (ATTR_USED, ATTR_NOINLINE): New.
6395 (IP_AGENT_EXPORT): New.
6396 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6397 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6398 (about_to_request_buffer_space, trace_buffer_is_full)
6399 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6400 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6401 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6402 (traceframe_write_count, traceframes_created)
6403 (trace_state_variables)
6404 New renaming defines.
6405 (struct ipa_sym_addresses): New.
6406 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6407 (symbol_list): New.
6408 (ipa_sym_addrs): New.
6409 (all_tracepoint_symbols_looked_up): New.
6410 (in_process_agent_loaded): New.
6411 (write_e_ipa_not_loaded): New.
6412 (maybe_write_ipa_not_loaded): New.
6413 (tracepoint_look_up_symbols): New.
6414 (debug_threads) [IN_PROCESS_AGENT]: New.
6415 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6416 (UNKNOWN_SIDE_EFFECTS): New.
6417 (stop_tracing): New.
6418 (flush_trace_buffer): New.
6419 (stop_tracing_bkpt): New.
6420 (flush_trace_buffer_bkpt): New.
6421 (read_inferior_integer): New.
6422 (read_inferior_uinteger): New.
6423 (read_inferior_data_pointer): New.
6424 (write_inferior_data_pointer): New.
6425 (write_inferior_integer): New.
6426 (write_inferior_uinteger): New.
6427 (struct collect_static_trace_data_action): Delete.
6428 (enum tracepoint_type): New.
6429 (struct tracepoint) <type>: New field `type'.
6430 <actions_str, step_actions, step_actions_str>: Only include in
6431 GDBserver.
6432 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6433 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6434 (tracepoints): Use IP_AGENT_EXPORT.
6435 (last_tracepoint): Don't include in the IPA.
6436 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6437 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6438 (alloced_trace_state_variables): New.
6439 (trace_state_variables): Use IP_AGENT_EXPORT.
6440 (traceframe_t): Delete unused variable.
6441 (circular_trace_buffer): Don't include in the IPA.
6442 (trace_buffer_start): Delete.
6443 (struct trace_buffer_control): New.
6444 (trace_buffer_free): Delete.
6445 (struct ipa_trace_buffer_control): New.
6446 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6447 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6448 New.
6449 (trace_buffer_ctrl): New.
6450 (TRACE_BUFFER_CTRL_CURR): New.
6451 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6452 Reimplement as macros.
6453 (trace_buffer_wrap): Delete.
6454 (traceframe_write_count, traceframe_read_count)
6455 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6456 (struct tracepoint_hit_ctx) <type>: New field.
6457 (struct fast_tracepoint_ctx): New.
6458 (memory_barrier): New.
6459 (cmpxchg): New.
6460 (record_tracepoint_error): Update atomically in the IPA.
6461 (clear_inferior_trace_buffer): New.
6462 (about_to_request_buffer_space): New.
6463 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6464 updating the same buffer.
6465 (add_tracepoint): Default the tracepoint's type to trap
6466 tracepoint, and orig_size to -1.
6467 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6468 internal variables.
6469 (create_trace_state_variable): New parameter `gdb'. Handle it.
6470 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6471 (cmd_qtdp): Handle fast tracepoints.
6472 (cmd_qtdv): Adjust.
6473 (max_jump_pad_size): New.
6474 (gdb_jump_pad_head): New.
6475 (get_jump_space_head): New.
6476 (claim_jump_space): New.
6477 (sort_tracepoints): New.
6478 (MAX_JUMP_SIZE): New.
6479 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6480 IPA.
6481 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6482 support. Upload fast traceframes, and delete internal IPA
6483 breakpoints.
6484 (stop_tracing_handler): New.
6485 (flush_trace_buffer_handler): New.
6486 (cmd_qtstop): Upload fast tracepoints.
6487 (response_tracepoint): Handle fast tracepoints.
6488 (tracepoint_finished_step): Upload fast traceframes. Set the
6489 tracepoint hit context's tracepoint type.
6490 (handle_tracepoint_bkpts): New.
6491 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6492 type. Add comment about fast tracepoints.
6493 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6494 non-existing action_str field.
6495 (get_context_regcache): Handle fast tracepoints.
6496 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6497 to the regcache.
6498 (fast_tracepoint_from_jump_pad_address): New.
6499 (fast_tracepoint_from_ipa_tpoint_address): New.
6500 (collecting_t): New.
6501 (force_unlock_trace_buffer): New.
6502 (fast_tracepoint_collecting): New.
6503 (collecting): New.
6504 (gdb_collect): New.
6505 (write_inferior_data_ptr): New.
6506 (target_tp_heap): New.
6507 (target_malloc): New.
6508 (download_agent_expr): New.
6509 (UALIGN): New.
6510 (download_tracepoints): New.
6511 (download_trace_state_variables): New.
6512 (upload_fast_traceframes): New.
6513 (IPA_FIRST_TRACEFRAME): New.
6514 (IPA_NEXT_TRACEFRAME_1): New.
6515 (IPA_NEXT_TRACEFRAME): New.
6516 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6517 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6518 (gdb_jump_pad_buffer_end): New.
6519 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6520 (initialize_tracepoint): Adjust.
6521 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6522 buffer. Initialize the low module.
6523 * utils.c (PREFIX, TOOLNAME): New.
6524 (malloc_failure): Use PREFIX.
6525 (error): In the IPA, an error causes an exit.
6526 (fatal, warning): Use PREFIX.
6527 (internal_error): Use TOOLNAME.
6528 (NUMCELLS): Increase to 10.
6529 * configure, config.in: Regenerate.
6530
6531 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6532
6533 * server.c (handle_query) <qSupported>: Do two passes over the
6534 qSupported string to avoid nesting strtok.
6535
6536 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6537
6538 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6539 (CDEPS): New.
6540 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6541 -Wl,--dynamic-list.
6542 * configure: Regenerate.
6543 * proc-service.list: New.
6544
6545 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6546
6547 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6548 New comment.
6549
6550 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6551
6552 * gdbreplay.c (remote_open): Check error return from socket() call by
6553 its equality to -1 not by it being negative.
6554 * remote-utils.c (remote_open): Likewise.
6555
6556 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6557
6558 * config.h: Regenerate.
6559
6560 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6561
6562 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6563 doesn't provide PTRACE_GET_THREAD_AREA.
6564
6565 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6566
6567 * linux-m68k-low.c: Include <asm/ptrace.h>
6568 (ps_get_thread_area): Implement.
6569
6570 2010-05-03 Doug Evans <dje@google.com>
6571
6572 * event-loop.c (struct callback_event): New struct.
6573 (callback_list): New global.
6574 (append_callback_event, delete_callback_event): New functions.
6575 (process_callback): New function.
6576 (start_event_loop): Call it.
6577 * remote-utils.c (NOT_SCHEDULED): Define.
6578 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6579 moved out of readchar.
6580 (readchar): Rewrite. Call reschedule before returning.
6581 (reset_readchar): New function.
6582 (remote_close): Call it.
6583 (process_remaining, reschedule): New functions.
6584 * server.h (callback_handler_func): New typedef.
6585 (append_callback_event, delete_callback_event): Declare.
6586
6587 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6588
6589 * proc-service.c (ps_pglobal_lookup): Use
6590 thread_db_look_up_one_symbol.
6591 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6592 parameter. Use it instead of all_symbols_looked_up.
6593 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6594 field.
6595 (all_symbols_looked_up): Don't declare.
6596 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6597 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6598 field.
6599 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6600 Set all_symbols_looked_up here.
6601 (thread_db_look_up_one_symbol): New.
6602 (thread_db_get_tls_address): Adjust.
6603 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6604 thread_db object on the heap, and tentatively set it in the
6605 process structure.
6606 (thread_db_init): Don't set all_symbols_looked_up here.
6607 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6608
6609 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6610
6611 * linux-low.c (linux_kill, linux_detach): Adjust.
6612 (status_pending_p_callback): Remove redundant statement. Check
6613 for !TARGET_WAITIKIND_IGNORE, instead of
6614 TARGET_WAITKIND_STOPPED.
6615 (handle_tracepoints): Make sure LWP is locked. Adjust.
6616 (linux_wait_for_event_1): Adjust.
6617 (linux_cancel_breakpoints): New.
6618 (unsuspend_one_lwp): New.
6619 (unsuspend_all_lwps): New.
6620 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6621 (send_sigstop_callback): Change return type to int, add new
6622 `except' parameter and handle it.
6623 (suspend_and_send_sigstop_callback): New.
6624 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6625 pass them down. If SUSPEND, also increment the lwp's suspend
6626 count.
6627 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6628 (need_step_over_p): Don't consider suspended LWPs.
6629 (start_step_over): Adjust.
6630 (proceed_one_lwp): Change return type to int, add new `except'
6631 parameter and handle it.
6632 (unsuspend_and_proceed_one_lwp): New.
6633 (proceed_all_lwps): Use find_inferior instead of
6634 for_each_inferior.
6635 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6636 also decrement the suspend count of LWPs. Pass `except' down,
6637 instead of hacking its suspend count.
6638 (linux_pause_all): Add `freeze' parameter. Adjust.
6639 (linux_unpause_all): New.
6640 (linux_target_ops): Install linux_unpause_all.
6641 * server.c (handle_status): Adjust.
6642 * target.h (struct target_ops): New fields `unpause_all' and
6643 `cancel_breakpoints'. Add new parameter to `pause_all'.
6644 (pause_all): Add new `freeze' parameter.
6645 (unpause_all): New.
6646 (cancel_breakpoints): New.
6647 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6648 cancel breakpoints.
6649 (cmd_qtstart): Pause threads.
6650 (stop_tracing): Pause threads, and cancel breakpoints.
6651 * win32-low.c (win32_target_ops): Adjust.
6652
6653 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6654
6655 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6656 the inferior right away from here...
6657 (linux_wait_1): ... to here, and adjust to check the thread's
6658 last_resume_kind instead of the lwp's step or stop_expected flags.
6659
6660 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6661
6662 * README: Use consistent `GDB' and `GDBserver' spellings.
6663
6664 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6665
6666 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6667 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6668 (linux_detach_one_lwp): Assume the lwp is stopped.
6669 (any_thread_of): Delete.
6670 (linux_detach): Stop all lwps here. Don't blindly delete all
6671 breakpoints.
6672 (delete_lwp_callback): New.
6673 (linux_mourn): Delete all lwps of the process that is gone.
6674 (linux_wait_1): Don't delete the last lwp of the process here.
6675 * mem-break.h (mark_breakpoints_out): Declare.
6676 * mem-break.c (mark_breakpoints_out): New.
6677 (free_all_breakpoints): Use it.
6678 * server.c (handle_target_event): If the process is gone, mark
6679 breakpoints out.
6680 * thread-db.c (struct thread_db) <create_bp>: New field.
6681 (thread_db_enable_reporting): Fix prototype. Store a thread event
6682 breakpoint reference in the thread_db struct.
6683 (thread_db_load_search): Clear the thread_db object.
6684 (try_thread_db_load_1): Ditto.
6685 (switch_to_process): New.
6686 (disable_thread_event_reporting): Use it.
6687 (remove_thread_event_breakpoints): New.
6688 (thread_db_detach, thread_db_mourn): Use it.
6689
6690 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6691
6692 * linux-low.c (linux_enable_event_reporting): New.
6693 (linux_wait_for_event_1, handle_extended_wait): Use it.
6694
6695 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6696
6697 * linux-low.c (linux_kill_one_lwp, linux_kill)
6698 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6699 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6700 SIGSTOP even if the LWP is stopped.
6701 (send_sigstop_callback): New.
6702 (stop_all_lwps): Use send_sigstop_callback instead.
6703 (linux_resume_one_thread): Adjust.
6704 (proceed_one_lwp): Still proceed an LWP that the client has
6705 requested to stop, if we haven't reported it as stopped yet. Make
6706 sure that LWPs the client want stopped, have a pending SIGSTOP.
6707
6708 2010-04-26 Doug Evans <dje@google.com>
6709
6710 * server.c (handle_general_set): Make static.
6711
6712 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6713 Print received char after testing for error/eof instead of before.
6714 (input_interrupt): Tweak comment.
6715
6716 2010-04-23 Doug Evans <dje@google.com>
6717
6718 * server.c (start_inferior): Print inferior argv if --debug.
6719
6720 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6721
6722 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6723 * nto-x86-low.c: Include server.h
6724
6725 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6726
6727 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6728 be consistent with other sources of this directory.
6729 (init_registers_amd64): Correct name of source file of this function
6730 in the comment.
6731
6732 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6733
6734 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6735 64-bit executables.
6736
6737 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6738
6739 * win32-i386-low.c: Add 64-bit support.
6740 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6741 (init_registers_amd64): Declare.
6742 (mappings): Add 64-bit version of array.
6743 (init_windows_x86): New function.
6744 (the_low_target): Change init_arch field to init_windows_x86.
6745
6746 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6747
6748 * win32-low.c: Adapt to support also 64-bit architecture.
6749 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6750 (get_image_name): Use SIZE_T type for local variable `done'.
6751 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6752 (toolhelp_get_dll_name): Idem.
6753 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6754 Use uintptr_t typecast to avoid warning.
6755 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6756 (handle_exception): Use phex_nz to avoid warning.
6757 (win32_wait): Remove unused local variable `process'.
6758
6759 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6760
6761 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6762 `amd64-avx.o'.
6763
6764 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6765
6766 * configure.ac: Use `ws2_32' library for srv_mingw.
6767 * configure: Regenerate.
6768 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6769 * remote-utils.c: Likewise.
6770
6771 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6772
6773 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6774 if __x86_64__ is defined.
6775
6776 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6777
6778 * configure: Regenerate.
6779
6780 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6781
6782 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6783 * target.h (target_ops): New get_tib_address field.
6784 * win32-low.h (win32_thread_info): Add thread_local_base field.
6785 * win32-low.c (child_add_thread): Add tlb argument.
6786 Set thread_local_base field to TLB.
6787 (get_child_debug_event): Adapt to child_add_thread change.
6788 (win32_get_tib_address): New function.
6789 (win32_target_ops): Set get_tib_address field to
6790 win32_get_tib_address.
6791 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6792
6793 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6794
6795 * linux-low.c (linux_mourn): Also remove the process.
6796 * server.c (handle_target_event): Don't remove the process here.
6797 * nto-low.c (nto_mourn): New.
6798 (nto_target_ops): Install it.
6799 * spu-low.c (spu_mourn): New.
6800 (spu_target_ops): Install it.
6801 * win32-low.c (win32_mourn): New.
6802 (win32_target_ops): Install it.
6803
6804 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6805
6806 * server.h (buffer_xml_printf): Remove redundant `;'.
6807
6808 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6809
6810 * regcache.c (set_register_cache): Invalidate regcaches before
6811 changing the register cache layout.
6812 (regcache_invalidate_one): Allow a NULL regcache.
6813 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6814 regcaches before changing the register cache layout or the target
6815 regsets.
6816
6817 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6818
6819 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6820 variable warning on Linux/x86-64.
6821
6822 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6823
6824 GDBserver disconnected tracing support.
6825
6826 * linux-low.c (linux_remove_process): Delete.
6827 (add_lwp): Don't set last_resume_kind here.
6828 (linux_kill): Use `mourn'.
6829 (linux_detach): Use `thread_db_detach', and `mourn'.
6830 (linux_mourn): New.
6831 (linux_attach_lwp_1): Adjust comment.
6832 (linux_attach): last_resume_kind moved the thread_info; adjust.
6833 (status_pending_p_callback): Adjust.
6834 (linux_wait_for_event_1): Adjust.
6835 (count_events_callback, select_singlestep_lwp_callback)
6836 (select_event_lwp_callback, cancel_breakpoints_callback)
6837 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6838 (proceed_one_lwp): Adjust.
6839 (linux_async): Add debug output.
6840 (linux_thread_stopped): New.
6841 (linux_pause_all): New.
6842 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6843 linux_pause_all.
6844 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6845 (thread_db_free): Delete declaration.
6846 (thread_db_detach, thread_db_mourn): Declare.
6847 * thread-db.c (thread_db_init): Use thread_db_mourn.
6848 (thread_db_free): Delete, split in two.
6849 (disable_thread_event_reporting): New.
6850 (thread_db_detach): New.
6851 (thread_db_mourn): New.
6852
6853 * server.h (struct thread_info) <last_resume_kind>: New field.
6854 <attached>: Add comment.
6855 <gdb_detached>: New field.
6856 (handler_func): Change return type to int.
6857 (handle_serial_event, handle_target_event): Ditto.
6858 (gdb_connected): Declare.
6859 (tracing): Delete.
6860 (disconnected_tracing): Declare.
6861 (stop_tracing): Declare.
6862
6863 * server.c (handle_query) <qSupported>: Report support for
6864 disconnected tracing.
6865 (queue_stop_reply_callback): Account for running threads.
6866 (gdb_wants_thread_stopped): New.
6867 (gdb_wants_all_threads_stopped): New.
6868 (gdb_reattached_process): New.
6869 (handle_status): Clear the `gdb_detached' flag of all processes.
6870 In all-stop, stop all threads.
6871 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6872 (process_serial_event): If the remote connection breaks, or if an
6873 exit was forced with "monitor exit", force an event loop exit.
6874 Handle disconnected tracing on detach.
6875 (handle_serial_event): Adjust.
6876 (handle_target_event): If GDB isn't connected, forward events back
6877 to the inferior, unless the last process exited, in which case,
6878 exit gdbserver. Adjust interface.
6879
6880 * remote-utils.c (remote_open): Don't block in accept. Instead
6881 register an event loop source on the listen socket file
6882 descriptor. Refactor bits into ...
6883 (listen_desc): ... this new global.
6884 (gdb_connected): ... this new function.
6885 (enable_async_notification): ... this new function.
6886 (handle_accept_event): ... this new function.
6887 (remote_close): Clear remote_desc.
6888
6889 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6890
6891 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6892 New fields.
6893 (mourn_inferior): Define.
6894 (target_process_qsupported): Avoid the dangling else problem.
6895 (thread_stopped): Define.
6896 (pause_all): Define.
6897 (target_waitstatus_to_string): Declare.
6898 * target.c (target_waitstatus_to_string): New.
6899
6900 * tracepoint.c (tracing): Make extern.
6901 (disconnected_tracing): New.
6902 (stop_tracing): Make extern. Handle tracing stops due to GDB
6903 disconnecting.
6904 (cmd_qtdisconnected): New.
6905 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6906 (handle_tracepoint_general_set): Handle QTDisconnected.
6907
6908 * event-loop.c (event_handler_func): Change return type to int.
6909 (process_event): Bail out if the event handler wants the event
6910 loop to stop.
6911 (handle_file_event): Ditto.
6912 (start_event_loop): Bail out if the event handler wants the event
6913 loop to stop.
6914
6915 * nto-low.c (nto_target_ops): Adjust.
6916 * spu-low.c (spu_wait): Don't remove the process here.
6917 (spu_target_ops): Adjust.
6918 * win32-low.c (win32_wait): Don't remove the process here.
6919 (win32_target_ops): Adjust.
6920
6921 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6922
6923 * regcache.c (realloc_register_cache): Invalidate inferior's
6924 regcache before recreating it.
6925
6926 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6927
6928 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6929
6930 2010-04-09 Stan Shebs <stan@codesourcery.com>
6931 Pedro Alves <pedro@codesourcery.com>
6932
6933 * server.h (LONGEST): New.
6934 (struct thread_info) <while_stepping>: New field.
6935 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6936 Declare.
6937 (initialize_tracepoint, handle_tracepoint_general_set)
6938 (handle_tracepoint_query, tracepoint_finished_step)
6939 (tracepoint_was_hit, release_while_stepping_state_list):
6940 (current_traceframe): Declare.
6941 * server.c (handle_general_set): Handle tracepoint packets.
6942 (read_memory): New.
6943 (write_memory): New.
6944 (handle_search_memory_1): Use read_memory.
6945 (handle_query): Report support for conditional tracepoints, trace
6946 state variables, and tracepoint sources. Handle tracepoint
6947 queries.
6948 (main): Initialize the tracepoints module.
6949 (process_serial_event): Handle traceframe reads/writes.
6950
6951 * linux-low.c (handle_tracepoints): New.
6952 (linux_wait_1): Call it.
6953 (linux_resume_one_lwp): Handle while-stepping.
6954 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6955 (linux_target_ops): Install them.
6956 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6957 New field.
6958 * linux-x86-low.c (x86_supports_tracepoints): New.
6959 (the_low_target). Install it.
6960
6961 * mem-break.h (delete_breakpoint): Declare.
6962 * mem-break.c (delete_breakpoint): Make external.
6963
6964 * target.h (struct target_ops): Add `supports_tracepoints',
6965 `read_pc', and `write_pc' fields.
6966 (target_supports_tracepoints): Define.
6967 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6968 (phex_nz): New.
6969
6970 * regcache.h (struct regcache) <registers_owned>: New field.
6971 (init_register_cache, regcache_cpy): Declare.
6972 (regcache_read_pc, regcache_write_pc): Declare.
6973 (register_cache_size): Declare.
6974 (supply_regblock): Declare.
6975 * regcache.c (init_register_cache): New.
6976 (new_register_cache): Use it.
6977 (regcache_cpy): New.
6978 (register_cache_size): New.
6979 (supply_regblock): New.
6980 (regcache_read_pc, regcache_write_pc): New.
6981
6982 * tracepoint.c: New.
6983
6984 * Makefile.in (OBS): Add tracepoint.o.
6985 (tracepoint.o): New rule.
6986
6987 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6988
6989 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6990 (i386-mmx.o): New.
6991 (i386-mmx.c): Likewise.
6992 (i386-mmx-linux.o): Likewise.
6993 (i386-mmx-linux.c): Likewise.
6994
6995 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6996 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6997 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6998 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6999
7000 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7001 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7002 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7003
7004 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7005
7006 * Makefile.in (clean): Updated.
7007 (i386-avx.o): New.
7008 (i386-avx.c): Likewise.
7009 (i386-avx-linux.o): Likewise.
7010 (i386-avx-linux.c): Likewise.
7011 (amd64-avx.o): Likewise.
7012 (amd64-avx.c): Likewise.
7013 (amd64-avx-linux.o): Likewise.
7014 (amd64-avx-linux.c): Likewise.
7015
7016 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7017 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7018 (srv_amd64_regobj): Add amd64-avx.o.
7019 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7020 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7021 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7022 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7023 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7024 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7025 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7026
7027 * i387-fp.c: Include "i386-xstate.h".
7028 (i387_xsave): New.
7029 (i387_cache_to_xsave): Likewise.
7030 (i387_xsave_to_cache): Likewise.
7031 (x86_xcr0): Likewise.
7032
7033 * i387-fp.h (i387_cache_to_xsave): Likewise.
7034 (i387_xsave_to_cache): Likewise.
7035 (x86_xcr0): Likewise.
7036
7037 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7038 * linux-crisv32-low.c (target_regsets): Likewise.
7039 * linux-m68k-low.c (target_regsets): Likewise.
7040 * linux-mips-low.c (target_regsets): Likewise.
7041 * linux-ppc-low.c (target_regsets): Likewise.
7042 * linux-s390-low.c (target_regsets): Likewise.
7043 * linux-sh-low.c (target_regsets): Likewise.
7044 * linux-sparc-low.c (target_regsets): Likewise.
7045 * linux-xtensa-low.c (target_regsets): Likewise.
7046
7047 * linux-low.c: Include <sys/uio.h>.
7048 (regsets_fetch_inferior_registers): Support nt_type.
7049 (regsets_store_inferior_registers): Likewise.
7050 (linux_process_qsupported): New.
7051 (linux_target_ops): Add linux_process_qsupported.
7052
7053 * linux-low.h (regset_info): Add nt_type.
7054 (linux_target_ops): Add process_qsupported.
7055
7056 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7057 and <sys/uio.h>.
7058 (init_registers_i386_avx_linux): New.
7059 (init_registers_amd64_avx_linux): Likewise.
7060 (xmltarget_i386_linux_no_xml): Likewise.
7061 (xmltarget_amd64_linux_no_xml): Likewise.
7062 (PTRACE_GETREGSET): Likewise.
7063 (PTRACE_SETREGSET): Likewise.
7064 (x86_fill_xstateregset): Likewise.
7065 (x86_store_xstateregset): Likewise.
7066 (use_xml): Likewise.
7067 (x86_linux_update_xmltarget): Likewise.
7068 (x86_linux_process_qsupported): Likewise.
7069 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7070 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7071 init_registers_i386_linux here. Call
7072 x86_linux_update_xmltarget.
7073 (the_low_target): Add x86_linux_process_qsupported.
7074
7075 * server.c (handle_query): Call target_process_qsupported.
7076
7077 * target.h (target_ops): Add process_qsupported.
7078 (target_process_qsupported): New.
7079
7080 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7081
7082 * inferiors.c (add_thread): Set last_status kind to
7083 TARGET_WAITKIND_IGNORE.
7084 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7085 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7086 (linux_wait_1): Move `thread' local definition to block that uses
7087 it. Don't NULL initialize `event_child'.
7088 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7089 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7090 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7091
7092 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7093
7094 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7095 an extended waitstatus, or by a watchpoint.
7096 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7097 thread was stepping or has been stopped by a watchpoint.
7098
7099 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7100
7101 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7102 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7103 of another, then delete the previous, and validate all
7104 breakpoints.
7105 (validate_inserted_breakpoint): New.
7106 (delete_disabled_breakpoints): New.
7107 (validate_breakpoints): New.
7108 (check_mem_read): Validate breakpoints before trusting their
7109 shadow. Delete disabled breakpoints.
7110 (check_mem_write): Validate breakpoints before trusting they
7111 should be inserted. Delete disabled breakpoints.
7112 * mem-break.h (validate_breakpoints):
7113 * server.c (handle_query): Validate breakpoints when we see a
7114 qSymbol query.
7115
7116 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7117
7118 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7119 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7120 if we could tell there's a GDB breakpoint at stop_pc.
7121 (need_step_over_p): Don't do a step over if we find a GDB
7122 breakpoint at the resume PC.
7123
7124 * mem-break.c (struct raw_breakpoint): New.
7125 (enum bkpt_type): New type `gdb_breakpoint'.
7126 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7127 fields. New field `raw'.
7128 (find_raw_breakpoint_at): New.
7129 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7130 breakpoint instead.
7131 (set_breakpoint_at): Adjust.
7132 (delete_raw_breakpoint): New.
7133 (release_breakpoint): New.
7134 (delete_breakpoint): Rename to...
7135 (delete_breakpoint_1): ... this. Add proc parameter. Use
7136 release_breakpoint. Return ENOENT.
7137 (delete_breakpoint): Reimplement.
7138 (find_breakpoint_at): Delete.
7139 (find_gdb_breakpoint_at): New.
7140 (delete_breakpoint_at): Delete.
7141 (set_gdb_breakpoint_at): New.
7142 (delete_gdb_breakpoint_at): New.
7143 (gdb_breakpoint_here): New.
7144 (set_reinsert_breakpoint): Use release_breakpoint.
7145 (uninsert_breakpoint): Rename to ...
7146 (uninsert_raw_breakpoint): ... this.
7147 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7148 (reinsert_raw_breakpoint): Change parameter type to
7149 raw_breakpoint.
7150 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7151 instead.
7152 (check_breakpoints): Adjust. Use release_breakpoint.
7153 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7154 (breakpoint_inserted_here): Ditto.
7155 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7156 Don't trust the breakpoint's shadow if it is not inserted.
7157 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7158 (delete_all_breakpoints): Adjust.
7159 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7160 use delete_breakpoint_1.
7161
7162 * mem-break.h (breakpoints_supported): Delete declaration.
7163 (set_gdb_breakpoint_at): Declare.
7164 (gdb_breakpoint_here): Declare.
7165 (delete_breakpoint_at): Delete.
7166 (delete_gdb_breakpoint_at): Declare.
7167
7168 * server.h (struct raw_breakpoint): Forward declare.
7169 (struct process_info): New field `raw_breakpoints'.
7170
7171 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7172 breakpoints.
7173
7174 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7175
7176 * linux-low.c (status_pending_p_callback): Fix comment.
7177 (linux_wait_for_event_1): Move most of the internal breakpoint
7178 handling from here...
7179 (linux_wait_1): ... to here.
7180 (count_events_callback): New.
7181 (select_singlestep_lwp_callback): New.
7182 (select_event_lwp_callback): New.
7183 (cancel_breakpoints_callback): New.
7184 (select_event_lwp): New.
7185 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7186 priority to all LWPs that have had events that should be reported
7187 to the client. Cancel breakpoints when about to reporting the
7188 event to the client, not while stopping lwps. No longer cancel
7189 finished single-steps here.
7190 (cancel_finished_single_step): Delete.
7191 (cancel_finished_single_steps): Delete.
7192
7193 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7194
7195 * mem-break.c (enum bkpt_type): New.
7196 (struct breakpoint): New field `type'.
7197 (set_breakpoint_at): Change return type to struct breakpoint
7198 pointer. Set type to `other_breakpoint' by default.
7199 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7200 in the breakpoint list.
7201 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7202 (reinsert_breakpoint): Rename to ...
7203 (reinsert_raw_breakpoint): ... this.
7204 (reinsert_breakpoints_at): Adjust.
7205 * mem-break.h (struct breakpoint): Declare.
7206 (set_breakpoint_at): Change return type to struct breakpoint
7207 pointer.
7208
7209 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7210
7211 * server.c (handle_query): Assign, not compare.
7212
7213 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7214
7215 Teach linux gdbserver to step-over-breakpoints.
7216
7217 * linux-low.c (can_hardware_single_step): New.
7218 (supports_breakpoints): New.
7219 (handle_extended_wait): If stopping threads, read the stop pc of
7220 the new cloned LWP.
7221 (get_pc): New.
7222 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7223 low target doesn't support retrieving the PC.
7224 (add_lwp): Set last_resume_kind to resume_continue.
7225 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7226 (linux_attach): Don't clear stop_expected. Set the lwp's
7227 last_resume_kind to resume_stop.
7228 (linux_detach_one_lwp): Don't check for removed breakpoints.
7229 (check_removed_breakpoint): Delete.
7230 (status_pending_p): Rename to ...
7231 (status_pending_p_callback): ... this. Don't check for removed
7232 breakpoints. Don't consider threads that are stopped from GDB's
7233 perspective.
7234 (linux_wait_for_lwp): Always read the stop_pc here.
7235 (cancel_breakpoint): New.
7236 (step_over_bkpt): New global.
7237 (linux_wait_for_event_1): Implement stepping over breakpoints.
7238 (gdb_wants_lwp_stopped): New.
7239 (gdb_wants_all_stopped): New.
7240 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7241 single-step traps here. Store the thread's last reported target
7242 wait status.
7243 (send_sigstop): Don't clear stop_expected. Always set it,
7244 instead.
7245 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7246 (cancel_finished_single_step): New.
7247 (cancel_finished_single_steps): New.
7248 (wait_for_sigstop): Don't cancel finished single-step traps here.
7249 (linux_resume_one_lwp): Don't check for removed breakpoints.
7250 Don't set `step' on non-hardware step archs.
7251 (linux_set_resume_request): Ignore resume_stop requests if already
7252 stopping or stopped. Set the lwp's last_resume_kind.
7253 (resume_status_pending_p): Don't check for removed breakpoints.
7254 (need_step_over_p): New.
7255 (start_step_over): New.
7256 (finish_step_over): New.
7257 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7258 requests. Clear the thread's last reported target waitstatus.
7259 Don't use the `suspended' flag. Don't consider pending breakpoints.
7260 (linux_resume): Start a step-over if necessary.
7261 (proceed_one_lwp): New.
7262 (proceed_all_lwps): New.
7263 (unstop_all_lwps): New.
7264 * linux-low.h (struct lwp_info): Rewrite comment for the
7265 `suspended' flag. Add the `stop_pc' field. Delete the
7266 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7267 Add `'last_resume_kind' and `need_step_over' fields.
7268 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7269 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7270 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7271 (set_raw_breakpoint_at): New.
7272 (set_breakpoint_at): Rewrite to use it.
7273 (reinsert_breakpoint_handler): Delete.
7274 (set_reinsert_breakpoint): New.
7275 (reinsert_breakpoint_by_bp): Delete.
7276 (delete_reinsert_breakpoints): New.
7277 (uninsert_breakpoint): Rewrite.
7278 (uninsert_breakpoints_at): New.
7279 (reinsert_breakpoint): Rewrite.
7280 (reinsert_breakpoints_at): New.
7281 (check_breakpoints): Rewrite.
7282 (breakpoint_here): New.
7283 (breakpoint_inserted_here): New.
7284 (check_mem_read): Adjust.
7285 * mem-break.h (breakpoints_supported, breakpoint_here)
7286 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7287 (reinsert_breakpoint_by_bp): Delete declaration.
7288 (delete_reinsert_breakpoints): Declare.
7289 (reinsert_breakpoint): Delete declaration.
7290 (reinsert_breakpoints_at): Declare.
7291 (uninsert_breakpoint): Delete declaration.
7292 (uninsert_breakpoints_at): Declare.
7293 (check_breakpoints): Adjust prototype.
7294 * server.h: Adjust include order.
7295 (struct thread_info): Declare here. Add a `last_status' field.
7296
7297 2010-03-23 Michael Snyder <msnyder@vmware.com>
7298
7299 * server.c (crc32): New function.
7300 (handle_query): Add handling for 'qCRC:' request.
7301
7302 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7303
7304 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7305 lwp had been stopped by a watchpoint.
7306
7307 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7308
7309 * server.h (internal_error): Declare.
7310 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7311 * utils.c (internal_error): New function.
7312
7313 2010-03-15 Andreas Schwab <schwab@redhat.com>
7314
7315 * configure.srv: Fix typo setting srv_regobj.
7316
7317 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7318
7319 * linux-low.c (fetch_register): Avoid passing a non string literal
7320 format to `error'.
7321 (usr_store_inferior_registers): Ditto.
7322
7323 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7324
7325 * linux-low.c (linux_write_memory): Bail out early if peeking
7326 memory failed.
7327
7328 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7329
7330 * linux-low.h (struct lwp_info): New fields
7331 `stopped_by_watchpoint' and `stopped_data_address'.
7332 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7333 here, and cache them in the lwp object.
7334 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7335 directly.
7336 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7337 field.
7338 (linux_stopped_by_watchpoint): Rewrite.
7339 (linux_stopped_data_address): Rewrite.
7340
7341 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7342
7343 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7344 switching the current inferior, not before.
7345
7346 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7347
7348 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7349 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7350 i386-linux.c and amd64-linux.c.
7351 (reg-i386.o): Removed.
7352 (reg-i386.c): Likewise.
7353 (reg-i386-linux.o): Likewise.
7354 (reg-i386-linux.c): Likewise.
7355 (reg-x86-64.o): Likewise.
7356 (reg-x86-64.c): Likewise.
7357 (reg-x86-64-linux.o): Likewise.
7358 (reg-x86-64-linux.c): Likewise.
7359 (i386.o): New.
7360 (i386.c): Likewise.
7361 (i386-linux.o): Likewise.
7362 (i386-linux.c): Likewise.
7363 (amd64.o): Likewise.
7364 (amd64.c): Likewise.
7365 (amd64-linux.o): Likewise.
7366 (amd64-linux.c): Likewise.
7367
7368 * configure.srv (srv_i386_regobj): New.
7369 (srv_i386_linux_regobj): Likewise.
7370 (srv_amd64_regobj): Likewise.
7371 (srv_amd64_linux_regobj): Likewise.
7372 (srv_i386_32bit_xmlfiles): Likewise.
7373 (srv_i386_64bit_xmlfiles): Likewise.
7374 (srv_i386_xmlfiles): Likewise.
7375 (srv_amd64_xmlfiles): Likewise.
7376 (srv_i386_linux_xmlfiles): Likewise.
7377 (srv_amd64_linux_xmlfiles): Likewise.
7378 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7379 srv_xmlfiles to $srv_i386_xmlfiles.
7380 (i[34567]86-*-mingw32ce*): Likewise.
7381 (i[34567]86-*-mingw*): Likewise.
7382 (i[34567]86-*-nto*): Likewise.
7383 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7384 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7385 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7386 (x86_64-*-linux*): Likewise.
7387
7388 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7389 (init_registers_amd64_linux): New.
7390 (x86_arch_setup): Replace init_registers_x86_64_linux with
7391 init_registers_amd64_linux.
7392
7393 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7394
7395 * configure.ac: Check for libdl. If it is not available link against
7396 static libthread_db.
7397 * configure: Regenerate.
7398
7399 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7400
7401 PR9605
7402
7403 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7404 handing a read watchpoint.
7405 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7406
7407 2010-02-12 Doug Evans <dje@google.com>
7408
7409 * linux-low.c (linux_supports_tracefork_flag): Document.
7410 (linux_look_up_symbols): Add comment.
7411
7412 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7413
7414 * regcache.c (supply_register): Clear regcache if buf is NULL.
7415
7416 2010-02-02 Nicolas Roche <roche@sourceware.org>
7417 Joel Brobecker <brobecker@adacore.com>
7418
7419 * inferiors.c (find_inferior): Add function documentation.
7420 (unloaded_dll): Handle the case where the unloaded dll has not
7421 been previously registered in the dll list.
7422
7423 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7424
7425 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7426 (thumb2_breakpoint): New.
7427 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7428
7429 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7430
7431 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7432 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7433 breakpoints.
7434
7435 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7436
7437 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7438
7439 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7440
7441 * linux-s390-low.c (s390_collect_ptrace_register)
7442 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7443
7444 2010-01-21 Doug Evans <dje@google.com>
7445
7446 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7447 (PTRACE_ARG4_TYPE): New macro.
7448 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7449 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7450 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7451 (usr_store_inferior_registers): Ditto.
7452 (linux_read_memory, linux_write_memory): Ditto.
7453 (linux_test_for_tracefork): Ditto.
7454
7455 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7456 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7457
7458 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7459
7460 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7461 target.
7462
7463 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7464
7465 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7466 prototype to take a regcache. Adjust.
7467
7468 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7469
7470 * regcache.h (struct thread_info): Forward declare.
7471 (struct regcache): New.
7472 (new_register_cache): Adjust prototype.
7473 (get_thread_regcache): Declare.
7474 (free_register_cache): Adjust prototype.
7475 (registers_to_string, registers_from_string): Ditto.
7476 (supply_register, supply_register_by_name, collect_register)
7477 (collect_register_as_string, collect_register_by_name): Ditto.
7478 * regcache.c (struct inferior_regcache_data): Delete.
7479 (get_regcache): Rename to ...
7480 (get_thread_regcache): ... this. Adjust. Switch inferior before
7481 fetching registers.
7482 (regcache_invalidate_one): Adjust.
7483 (regcache_invalidate): Fix prototype.
7484 (new_register_cache): Return the new register cache.
7485 (free_register_cache): Change prototype.
7486 (realloc_register_cache): Adjust.
7487 (registers_to_string): Change prototype to take a regcache. Adjust.
7488 (registers_from_string): Ditto.
7489 (register_data): Ditto.
7490 (supply_register): Ditto.
7491 (supply_register_by_name): Ditto.
7492 (collect_register): Ditto.
7493 (collect_register_as_string): Ditto.
7494 (collect_register_by_name): Ditto.
7495 * server.c (process_serial_event): Adjust.
7496 * linux-low.h (regset_fill_func, regset_store_func): Change
7497 prototype.
7498 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7499 Change prototype.
7500 * linux-low.c (get_stop_pc): Adjust.
7501 (check_removed_breakpoint): Adjust.
7502 (linux_wait_for_event): Adjust.
7503 (linux_resume_one_lwp): Adjust.
7504 (fetch_register): Add regcache parameter. Adjust.
7505 (usr_store_inferior_registers): Ditto.
7506 (regsets_fetch_inferior_registers): Ditto.
7507 (regsets_store_inferior_registers): Ditto.
7508 (linux_fetch_registers, linux_store_registers): Ditto.
7509 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7510 regcache. Adjust.
7511 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7512 Ditto.
7513 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7514 prototype to take a regcache.
7515 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7516 * remote-utils.c (convert_ascii_to_int, outreg)
7517 (prepare_resume_reply): Change prototype to take a regcache.
7518 Adjust.
7519 * target.h (struct target_ops) <fetch_registers, store_registers>:
7520 Change prototype to take a regcache.
7521 (fetch_inferior_registers, store_inferior_registers): Change
7522 prototype to take a regcache. Adjust.
7523 * proc-service.c (ps_lgetregs): Adjust.
7524 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7525 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7526 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7527 take a regcache. Adjust.
7528 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7529 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7530 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7531 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7532 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7533 (cris_cannot_fetch_register):
7534 (cris_breakpoint_at): Change prototype to take a regcache.
7535 Adjust.
7536 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7537 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7538 to take a regcache. Adjust.
7539 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7540 Adjust.
7541 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7542 take a regcache. Adjust.
7543 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7544 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7545 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7546 * linux-mips-low.c (mips_get_pc):
7547 (mips_set_pc): Change prototype to take a regcache. Adjust.
7548 (mips_reinsert_addr): Adjust.
7549 (mips_collect_register): Change prototype to take a regcache.
7550 Adjust.
7551 (mips_supply_register):
7552 (mips_collect_register_32bit, mips_supply_register_32bit)
7553 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7554 (mips_store_fpregset): Ditto.
7555 * linux-ppc-low.c (ppc_supply_ptrace_register)
7556 (ppc_supply_ptrace_register): Ditto.
7557 (parse_spufs_run): Adjust.
7558 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7559 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7560 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7561 take a regcache. Adjust.
7562 * linux-s390-low.c (s390_collect_ptrace_register)
7563 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7564 (s390_set_pc): Change prototype to take a regcache. Adjust.
7565 (s390_arch_setup): Adjust.
7566 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7567 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7568 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7569 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7570 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7571 regcache. Adjust.
7572 (sparc_breakpoint_at): Adjust.
7573 * linux-xtensa-low.c (xtensa_fill_gregset):
7574 (xtensa_store_gregset):
7575 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7576 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7577 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7578 prototype to take a regcache. Adjust.
7579 * win32-arm-low.c (arm_fetch_inferior_register)
7580 (arm_store_inferior_register): Change prototype to take a
7581 regcache. Adjust.
7582 * win32-i386-low.c (i386_fetch_inferior_register)
7583 (i386_store_inferior_register): Change prototype to take a
7584 regcache. Adjust.
7585 * win32-low.c (child_fetch_inferior_registers)
7586 (child_store_inferior_registers): Change prototype to take a
7587 regcache. Adjust.
7588 (win32_wait): Adjust.
7589 (win32_fetch_inferior_registers): Change prototype to take a
7590 regcache. Adjust.
7591 (win32_store_inferior_registers): Adjust.
7592 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7593 store_inferior_register>: Change prototype to take a regcache.
7594
7595 2010-01-20 Doug Evans <dje@google.com>
7596
7597 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7598 #ifdef.
7599 (linux_wait_for_event1, linux_init_signals): Ditto.
7600 (W_STOPCODE): Provide definition if missing.
7601
7602 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7603
7604 * linux-low.c (linux_core_of_thread): New.
7605 (compare_ints, show_process, list_threads): New.
7606 (linux_qxfer_osdata): Report threads and cores.
7607 (linux_target_op): Register linux_core_of_thread.
7608 * remote-utils.c (prepare_resume_reply): Report the core.
7609 (buffer_xml_printf): Support %d specifier.
7610 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7611 New.
7612 (handle_query): Handle qXfer:threads. Announce availability
7613 thereof.
7614 * target.h (struct target_ops): New field core_of_thread.
7615
7616 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7617
7618 * Makefile.in (clean): Remove new generated files.
7619 (reg-s390.o, reg-s390.c): Remove rules.
7620 (reg-s390x.o, reg-s390x.c): Likewise.
7621 (s390-linux32.o, s390-linux32.c): Add rules.
7622 (s390-linux64.o, s390-linux64.c): Likewise.
7623 (s390x-linux64.o, s390x-linux64.c): Likewise.
7624 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7625 * linux-s390-low.c: Include <elf.h>.
7626 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7627 (init_registers_s390): Remove prototype.
7628 (init_registers_s390x): Likewise.
7629 (init_registers_s390_linux32): Add prototype.
7630 (init_registers_s390_linux64): Likewise.
7631 (init_registers_s390x_linux64): Likewise.
7632 (s390_num_regs_3264): New define.
7633 (s390_regmap_3264): New global variable.
7634 (s390_cannot_fetch_register): Remove obsolete check.
7635 (s390_cannot_store_register): Likewise.
7636 (s390_collect_ptrace_register): Handle upper/lower register halves.
7637 (s390_supply_ptrace_register): Likewise.
7638 (s390_fill_gregset): Update to register number changes.
7639 (s390_get_hwcap): New routine.
7640 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7641 Install appropriate regmap and register set.
7642
7643 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7644
7645 * server.c (gdbserver_version): Update copyright year to 2010.
7646 * gdbreplay.c (gdbreplay_version): Likewise.
7647
7648 2009-12-28 Doug Evans <dje@google.com>
7649
7650 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7651 elf/external.h. Include <elf.h> instead but only if necessary.
7652
7653 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7654
7655 * linux-low.c (linux_remove_process): Remove `detaching'
7656 parameter. Don't release/detach from thread_db here.
7657 (linux_kill): Release/detach from thread_db here, ...
7658 (linux_detach): ... and here, before actually detaching.
7659 (linux_wait_1): ... and here, when a process exits.
7660 * thread-db.c (any_thread_of): New.
7661 (thread_db_free): Switch the current inferior to a thread of the
7662 passed in process.
7663
7664 2009-12-21 Doug Evans <dje@google.com>
7665
7666 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7667
7668 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7669 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7670 warning ifndef __NR_tkill. Move setting of errno there too.
7671 Delete unnecessary resetting of errno after syscall.
7672 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7673
7674 * configure.ac: Check for dladdr.
7675 * config.in: Regenerate.
7676 * configure: Regenerate.
7677 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7678 (try_thread_db_load): Update.
7679
7680 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7681
7682 2009-12-18 Doug Evans <dje@google.com>
7683
7684 * event-loop.c: Include unistd.h if it exists.
7685
7686 * linux-low.c (my_waitpid): Move definition away from being in
7687 between linux_tracefork_child/linux_test_for_tracefork.
7688
7689 * gdb_proc_service.h (psaddr_t): Fix type.
7690 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7691 signature to match glibc.
7692
7693 2009-12-16 Doug Evans <dje@google.com>
7694
7695 * linux-low.c (linux_read_memory): Fix argument to read.
7696
7697 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7698
7699 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7700 events, don't leave current_inferior pointing at null.
7701
7702 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7703
7704 * win32-low.c (LOG): Delete.
7705 (OUTMSG): Output to stderr.
7706 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7707 on compile time LOG macro.
7708 (win32_wait): Fix debug output.
7709
7710 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7711
7712 * win32-low.c (win32_add_one_solib): If the dll name is
7713 "ntdll.dll", prepend the system directory to the dll path.
7714
7715 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7716
7717 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7718
7719 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7720 Vladimir Prus <vladimir@codesourcery.com>
7721
7722 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7723 * configure.ac: Check for __mcoldfire__ and set
7724 gdb_cv_m68k_is_coldfire.
7725 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7726 reg-cf.o and reg-m68k.o.
7727 * configure: Regenerated.
7728
7729 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7730
7731 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7732 Pass it to thread_db_free.
7733 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7734 proper `detaching' argument to linux_remove_process.
7735 * linux-low.h (thread_db_free): Add `detaching' parameter.
7736 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7737 to thread_db_free.
7738 (thread_db_free): Add `detaching' parameter. Only
7739 call td_ta_clear_event if detaching from process.
7740
7741 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7742
7743 * thread-db.c (thread_db_free): Fix typo.
7744
7745 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7746
7747 PR gdb/10838
7748 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7749
7750 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7751
7752 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7753 with an i686 compiler.
7754 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7755 needed.
7756 * configure: Rebuilt.
7757
7758 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7759
7760 PR gdb/10783
7761
7762 * server.c (handle_search_memory_1): Correct read_addr initialization
7763 in loop for searching subsequent chunks.
7764
7765 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7766
7767 * configure.ac: New --with-libthread-db option.
7768 * thread-db.c: Allow direct dependence on libthread_db.
7769 (thread_db_free): Adjust.
7770 * config.in: Regenerate.
7771 * configure: Likewise.
7772
7773 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7774
7775 PR gdb/10757
7776 * thread-db.c (attach_thread): New function.
7777 (maybe_attach_thread): Return success/failure.
7778 (find_new_threads_callback): Adjust.
7779 (thread_db_find_new_threads): Loop until no new threads.
7780
7781 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7782
7783 * proc-service.c (ps_lgetregs): Formatting.
7784
7785 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7786
7787 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7788 * configure.ac: Adjust.
7789 * linux-low.h (struct process_info_private): Move members to struct
7790 thread_db.
7791 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7792 * linux-low.c (linux_remove_process): Adjust.
7793 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7794 * server.c (handle_query): Move code ...
7795 (handle_monitor_command): ... here. New function.
7796 * target.h (struct target_ops): New member.
7797 * thread-db.c (struct thread_db): New.
7798 (libthread_db_search_path): New variable.
7799 (thread_db_create_event, thread_db_enable_reporting)
7800 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7801 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7802 (try_thread_db_load_1, dladdr_to_soname): New functions.
7803 (try_thread_db_load, thread_db_load_search): New functions.
7804 (thread_db_init): Search for libthread_db.
7805 (thread_db_free): New function.
7806 (thread_db_handle_monitor_command): Likewise.
7807 * config.in: Regenerate.
7808 * configure: Regenerate.
7809
7810 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7811
7812 * spu-low.c (spu_kill): Wait for inferior to terminate.
7813 Call clear_inferiors.
7814 (spu_detach): Call clear_inferiors.
7815
7816 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7817
7818 * aclocal.m4: Regenerate.
7819 * config.in: Likewise.
7820 * configure: Likewise.
7821
7822 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7823
7824 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7825 (parse_spufs_run): New function.
7826 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7827 (ppc_breakpoint_at): Handle SPU breakpoints.
7828
7829 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7830
7831 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7832 (SPUFS_MAGIC): Define.
7833 (spu_enumerate_spu_ids): New function.
7834 (linux_qxfer_spu): New function.
7835 (linux_target_ops): Install linux_qxfer_spu.
7836
7837 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7838
7839 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7840 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7841 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7842 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7843 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7844 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7845 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7846 (init_registers_powerpc_cell32l): Add prototype.
7847 (init_registers_powerpc_cell64l): Likewise.
7848 (ppc_arch_setup): Detect Cell/B.E. architecture.
7849
7850 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7851
7852 * Makefile.in (datarootdir): New variable.
7853
7854 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7855
7856 * linux-low.c (linux_write_memory): Update debugging output.
7857 * Makefile.in (clean): Add new descriptions.
7858 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7859 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7860 * configure.srv: Add new files for arm*-*-linux*.
7861 * linux-arm-low.c: Add new declarations.
7862 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7863 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7864 (HWCAP_VFPv3D16): New.
7865 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7866 instead of __IWMMXT__.
7867 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7868 (arm_arch_setup): New.
7869 (target_regsets): Remove #ifdef. Add VFP regset.
7870 (the_low_target): Use arm_arch_setup.
7871
7872 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7873
7874 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7875 the main thread again.
7876
7877 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7878
7879 Adding Neutrino gdbserver.
7880 * configure: Regenerated.
7881 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7882 * configure.srv (i[34567]86-*-nto*): New target.
7883 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7884 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7885 (nto_comctrl) [__QNX__]: New function.
7886 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7887
7888 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7889
7890 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7891 srv_tgtobj.
7892
7893 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7894 Pedro Alves <pedro@codesourcery.com>
7895
7896 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7897 don't support CONTEXT_EXTENDED_REGISTERS.
7898 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7899 (the_low_target): Install them.
7900 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7901 failing with ERROR_PIPE_NOT_CONNECTED.
7902
7903 2009-06-30 Doug Evans <dje@google.com>
7904 Pierre Muller <muller@ics.u-strasbg.fr>
7905
7906 Add h/w watchpoint support to x86-linux, win32-i386.
7907 * Makefile.in (SFILES): Add i386-low.c
7908 (i386_low_h): Define.
7909 (i386-low.o): Add dependencies.
7910 (linux-x86-low.o): Add i386-low.h dependency.
7911 (win32-i386-low.o): Ditto.
7912 * i386-low.c: New file.
7913 * i386-low.h: New file.
7914 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7915 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7916 * linux-low.c (linux_add_process): Initialize arch_private.
7917 (linux_remove_process): Free arch_private.
7918 (add_lwp): Initialize arch_private.
7919 (delete_lwp): Free arch_private.
7920 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7921 provided.
7922 * linux-low.h (process_info_private): New member arch_private.
7923 (lwp_info): New member arch_private.
7924 (linux_target_ops): New members new_process, new_thread,
7925 prepare_to_resume.
7926 (ptid_of): New macro.
7927 * linux-x86-low.c: Include stddef.h, i386-low.h.
7928 (arch_process_info): New struct.
7929 (arch_lwp_info): New struct.
7930 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7931 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7932 (i386_dr_low_get_status): New function.
7933 (x86_insert_point, x86_remove_point): New functions.
7934 (x86_stopped_by_watchpoint): New function.
7935 (x86_stopped_data_address): New function.
7936 (x86_linux_new_process, x86_linux_new_thread): New functions.
7937 (x86_linux_prepare_to_resume): New function.
7938 (the_low_target): Add entries for insert_point, remove_point,
7939 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7940 prepare_to_resume.
7941 * server.c (debug_hw_points): New global.
7942 (monitor_show_help): Document set debug-hw-points.
7943 (handle_query): Process "set debug-hw-points".
7944 * server.h (debug_hw_points): Declare.
7945 (paddress): Declare.
7946 * utils.c (NUMCELLS, CELLSIZE): New macros.
7947 (get_sell, xsnprintf, paddress): New functions.
7948 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7949 remove_point, stopped_by_watchpoint, stopped_data_address.
7950 * win32-i386-low.c: Include i386-low.h.
7951 (debug_reg_state): Replaces dr.
7952 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7953 (i386_dr_low_get_status): New function.
7954 (i386_insert_point, i386_remove_point): New functions.
7955 (i386_stopped_by_watchpoint): New function.
7956 (i386_stopped_data_address): New function.
7957 (i386_initial_stuff): Update.
7958 (get_thread_context,set_thread_context,i386_thread_added): Update.
7959 (the_low_target): Add entries for insert_point,
7960 remove_point, stopped_by_watchpoint, stopped_data_address.
7961 * win32-low.c (win32_insert_watchpoint): New function.
7962 (win32_remove_watchpoint): New function.
7963 (win32_stopped_by_watchpoint): New function.
7964 (win32_stopped_data_address): New function.
7965 (win32_target_ops): Add entries for insert_watchpoint,
7966 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7967 * win32-low.h (win32_target_ops): New members insert_point,
7968 remove_point, stopped_by_watchpoint, stopped_data_address.
7969
7970 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7971
7972 * server.c (process_serial_event): Re-return unsupported, not
7973 error, if the type isn't recognized. Re-allow supporting only
7974 insert or remove packets. Also call require_running for
7975 breakpoints. Add missing break statement to default case. Tidy.
7976 * target.h (struct target_ops): Rename insert_watchpoint to
7977 insert_point, and remove_watchpoint to remove_point.
7978
7979 * linux-low.h (struct linux_target_ops): Likewise.
7980 * linux-low.c (linux_insert_watchpoint): Rename to ...
7981 (linux_insert_point): ... this. Adjust.
7982 (linux_remove_watchpoint): Rename to ...
7983 (linux_remove_point): ... this. Adjust.
7984 (linux_target_ops): Adjust.
7985 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7986 (cris_insert_point): ... this.
7987 (cris_remove_watchpoint): Rename to ...
7988 (cris_remove_point): ... this.
7989 (the_low_target): Adjust.
7990
7991 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7992
7993 * server.c (handle_v_kill): Pass signal_pid to
7994 kill_inferior if multi_process is zero.
7995
7996 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7997
7998 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7999 * target.h (target_ops): Comment for *_watchpoint to make it clear
8000 the functions can get types '0' and '1'.
8001
8002 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8003
8004 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8005 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8006 * regcache.c (get_regcache): Likewise.
8007 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8008 * win32-low.c (child_fetch_inferior_registers): Remove check for
8009 regno 0.
8010
8011 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8012 Pedro Alves <pedro@codesourcery.com>
8013
8014 * target.h (struct target_ops) <supports_multi_process>: New
8015 callback.
8016 (target_supports_multi_process): New.
8017 * server.c (handle_query): Even if GDB reports support, only
8018 enable multi-process if the target also supports it. Report
8019 multi-process support only if the target backend supports it.
8020 * linux-low.c (linux_supports_multi_process): New function.
8021 (linux_target_ops): Install it as target_supports_multi_process
8022 callback.
8023
8024 2009-05-24 Doug Evans <dje@google.com>
8025
8026 Global renaming of find_thread_pid to find_thread_ptid.
8027 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8028 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8029 All callers updated.
8030
8031 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8032 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8033 directly.
8034
8035 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8036 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8037 (linux_resume_one_lwp): Ditto.
8038
8039 2009-05-23 Doug Evans <dje@google.com>
8040
8041 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8042 from struct inferior_list_entry * to struct lwp_info *.
8043 All callers updated.
8044
8045 2009-05-13 Doug Evans <dje@google.com>
8046
8047 * linux-x86-low.c: Don't include assert.h.
8048 (x86_siginfo_fixup): Use fatal, not assert.
8049 (x86_arch_setup): Fix comment.
8050
8051 2009-05-12 Doug Evans <dje@google.com>
8052
8053 Biarch support for i386/amd64 gdbserver.
8054 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8055 Add linux-x86-low.c.
8056 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8057 (linux-x86-low.o): Add.
8058 * linux-x86-64-low.c: Delete.
8059 * linux-i386-low.c: Delete.
8060 * linux-x86-low.c: New file.
8061 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8062 linux-x86-low.o.
8063 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8064 linux-x86-low.o.
8065 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8066 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8067 (linux_child_pid_to_exec_file): New function.
8068 (elf_64_header_p, elf_64_file_p): New functions.
8069 (siginfo_fixup): New function.
8070 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8071 give target a chance to convert layout.
8072 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8073 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8074
8075 2009-05-07 Doug Evans <dje@google.com>
8076
8077 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8078 (regsets_store_inferior_registers): Ditto.
8079
8080 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8081
8082 PR server/10048
8083
8084 * linux-low.c (must_set_ptrace_flags): Delete.
8085 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8086 of the global.
8087 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8088 `lwp->must_set_ptrace_flags' instead.
8089 (linux_wait_for_event_1): Set ptrace options here.
8090 (linux_wait_1): ... not here.
8091
8092 2009-04-30 Doug Evans <dje@google.com>
8093
8094 * inferiors.c (started_inferior_callback): New function.
8095 (attached_inferior_callback): New function.
8096 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8097 * server.c (print_started_pid, print_attached_pid): New functions.
8098 (detach_or_kill_for_exit): New function.
8099 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8100 * server.h (have_started_inferiors_p): Declare.
8101 (have_attached_inferiors_p): Declare.
8102
8103 * inferiors.c (remove_process): Fix memory leak, free process.
8104 * linux-low.c (linux_remove_process): New function.
8105 (linux_kill): Call it instead of remove_process.
8106 (linux_detach, linux_wait_1): Ditto.
8107
8108 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8109
8110 * configure.srv: Add x86 Windows CE target.
8111
8112 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8113
8114 * inferiors.c (get_thread_process): Make global.
8115 * server.h (get_thread_process): Add prototype.
8116 * thread-db.c (find_one_thread): Use get_thread_process
8117 instead of current_process.
8118 (thread_db_get_tls_address): Do not crash if called when
8119 thread layer is not yet initialized.
8120
8121 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8122
8123 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8124 * spu-low.c (current_tid): Rename to ...
8125 (current_ptid): ... this.
8126 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8127 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8128 ptid_get_lwp (current_ptid) instead of current_tid.
8129 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8130 instead of current_tid. Use find_process_pid to verify pid
8131 argument is valid. Pass proper argument to remove_process.
8132 (spu_thread_alive): Compare current_ptid instead of current_tid.
8133 (spu_resume): Likewise.
8134
8135 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8136
8137 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8138 variable.
8139
8140 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8141
8142 Implement the multiprocess extensions, and add linux multiprocess
8143 support.
8144
8145 * server.h (ULONGEST): Declare.
8146 (struct ptid, ptid_t): New.
8147 (minus_one_ptid, null_ptid): Declare.
8148 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8149 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8150 (struct inferior_list_entry): Change `id' type from unsigned from
8151 to ptid_t.
8152 (struct sym_cache, struct breakpoint, struct
8153 process_info_private): Forward declare.
8154 (struct process_info): Declare.
8155 (current_process): Declare.
8156 (all_processes): Declare.
8157 (initialize_inferiors): Declare.
8158 (add_thread): Adjust to use ptid_t.
8159 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8160 (add_process, remove_process, find_thread_pid): Declare.
8161 (find_inferior_id): Adjust to use ptid_t.
8162 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8163 (multi_process): Declare.
8164 (push_event): Adjust to use ptid_t.
8165 (read_ptid, write_ptid): Declare.
8166 (prepare_resume_reply): Adjust to use ptid_t.
8167 (clear_symbol_cache): Declare.
8168 * inferiors.c (all_processes): New.
8169 (null_ptid, minus_one_ptid): New.
8170 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8171 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8172 (add_thread): Change unsigned long to ptid. Remove gdb_id
8173 parameter. Adjust.
8174 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8175 (gdb_id_to_thread): Rename to ...
8176 (find_thread_pid): ... this. Change unsigned long to ptid.
8177 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8178 (loaded_dll, pull_pid_from_list): Adjust.
8179 (add_process, remove_process, find_process_pid)
8180 (get_thread_process, current_process, initialize_inferiors): New.
8181 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8182 (struct target_waitstatus) <related_pid>: Ditto.
8183 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8184 return type to int.
8185 (struct target_ops) <join>: Add `pid' argument.
8186 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8187 (struct target_ops) <wait>: Add `ptid' field. Change return type
8188 to ptid.
8189 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8190 (mywait): Add `ptid' argument. Change return type to ptid_t.
8191 (target_pid_to_str): Declare.
8192 * target.c (set_desired_inferior): Adjust to use ptids.
8193 (mywait): Add new `ptid' argument. Adjust.
8194 (target_pid_to_str): New.
8195 * mem-break.h (free_all_breakpoints): Declare.
8196 * mem-break.c (breakpoints): Delelete.
8197 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8198 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8199 to use per-process breakpoint list.
8200 (free_all_breakpoints): New.
8201 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8202 (symbol_cache, all_symbols_looked_up): Delete.
8203 (hexchars): New.
8204 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8205 read_ptid): New.
8206 (prepare_resume_reply): Change ptid argument's type from unsigned
8207 long to ptid_t. Adjust. Implement W;process and X;process.
8208 (free_sym_cache, clear_symbol_cache): New.
8209 (look_up_one_symbol): Adjust to per-process symbol cache. *
8210 * server.c (cont_thread, general_thread, step_thread): Change type
8211 to ptid_t.
8212 (attached): Delete.
8213 (multi_process): New.
8214 (last_ptid): Change type to ptid_t.
8215 (struct vstop_notif) <ptid>: Change type to ptid_t.
8216 (queue_stop_reply, push_event): Change `ptid' argument's type to
8217 ptid_t.
8218 (discard_queued_stop_replies): Add `pid' argument.
8219 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8220 changes. Don't reference the `attached' global.
8221 (attach_inferior): Adjust to mywait interface changes.
8222 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8223 features. Handle and report "multiprocess+". Handle
8224 "qAttached:PID".
8225 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8226 changes.
8227 (handle_v_kill): New.
8228 (handle_v_stopped): Adjust to use target_pid_to_str.
8229 (handle_v_requests): Allow multiple attaches and runs when
8230 multiprocess extensions are in effect. Handle "vKill".
8231 (myresume): Adjust to use ptids.
8232 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8233 (handle_status): Adjust to discard_queued_stop_replies interface
8234 change.
8235 (first_thread_of, kill_inferior_callback)
8236 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8237 (main): Call initialize_inferiors. Adjust to use ptids, killing
8238 and detaching from all inferiors. Handle multiprocess packet
8239 variants.
8240 * linux-low.h: Include gdb_proc_service.h.
8241 (struct process_info_private): New.
8242 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8243 <lwpid_of>: Use ptid_get_lwp.
8244 (get_lwp_thread): Adjust.
8245 (struct lwp_info): Add `dead' member.
8246 (find_lwp_pid): Declare.
8247 * linux-low.c (thread_db_active): Delete.
8248 (new_inferior): Adjust comment.
8249 (inferior_pid): Delete.
8250 (linux_add_process): New.
8251 (handle_extended_wait): Adjust.
8252 (add_lwp): Change unsigned long to ptid.
8253 (linux_create_inferior): Add process to processes table. Adjust
8254 to use ptids. Don't set new_inferior here.
8255 (linux_attach_lwp): Rename to ...
8256 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8257 it. Adjust to use ptids.
8258 (linux_attach_lwp): New.
8259 (linux_attach): Add process to processes table. Don't set
8260 new_inferior here.
8261 (struct counter): New.
8262 (second_thread_of_pid_p, last_thread_of_process_p): New.
8263 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8264 multiple processes.
8265 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8266 processes. Remove process from process table.
8267 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8268 to multiple processes.
8269 (any_thread_of): New.
8270 (linux_detach): Add `pid' argument, and handle it. Remove process
8271 from processes table.
8272 (linux_join): Add `pid' argument. Handle it.
8273 (linux_thread_alive): Change unsighed long argument to ptid_t.
8274 Consider dead lwps as not being alive.
8275 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8276 threads we're not interested in.
8277 (same_lwp, find_lwp_pid): New.
8278 (linux_wait_for_lwp): Change `pid' argument's type from int to
8279 ptid_t. Adjust.
8280 (linux_wait_for_event): Rename to ...
8281 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8282 from int to ptid_t. Adjust.
8283 (linux_wait_for_event): New.
8284 (linux_wait_1): Add `ptid' argument. Change return type to
8285 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8286 that exit from the process table.
8287 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8288 Adjust.
8289 (mark_lwp_dead): New.
8290 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8291 stopping all threads, mark its main lwp as dead.
8292 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8293 ptids.
8294 (fetch_register, usr_store_inferior_registers)
8295 (regsets_fetch_inferior_registers)
8296 (regsets_store_inferior_registers, linux_read_memory)
8297 (linux_write_memory): Inline `inferior_pid'.
8298 (linux_look_up_symbols): Adjust to use per-process
8299 `thread_db_active'.
8300 (linux_request_interrupt): Adjust to use ptids.
8301 (linux_read_auxv): Inline `inferior_pid'.
8302 (initialize_low): Don't reference thread_db_active.
8303 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8304 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8305 (ps_getpid): Return the pid of the current inferior.
8306 * thread-db.c (proc_handle, thread_agent): Delete.
8307 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8308 per-process data.
8309 (find_one_thread): Change argument type to ptid_t. Adjust to
8310 per-process data.
8311 (maybe_attach_thread): Adjust to per-process data and ptids.
8312 (thread_db_find_new_threads): Ditto.
8313 (thread_db_init): Ditto.
8314 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8315 processes table. Adjust to use ptids.
8316 (spu_kill, spu_detach): Adjust interface. Remove process from
8317 processes table.
8318 (spu_join, spu_thread_alive): Adjust interface.
8319 (spu_wait): Adjust interface. Remove process from processes
8320 table. Adjust to use ptids.
8321 * win32-low.c (current_inferior_tid): Delete.
8322 (current_inferior_ptid): New.
8323 (debug_event_ptid): New.
8324 (thread_rec): Take a ptid. Adjust.
8325 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8326 (child_delete_thread): Ditto.
8327 (do_initial_child_stuff): Add `attached' argument. Add process to
8328 processes table.
8329 (child_fetch_inferior_registers, child_store_inferior_registers):
8330 Adjust.
8331 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8332 (win32_attach): Pass 1 to do_initial_child_stuff.
8333 (win32_kill): Adjust interface. Remove process from processes
8334 table.
8335 (win32_detach): Ditto.
8336 (win32_join): Adjust interface.
8337 (win32_thread_alive): Take a ptid.
8338 (win32_resume): Adjust to use ptids.
8339 (get_child_debug_event): Ditto.
8340 (win32_wait): Adjust interface. Remove exiting process from
8341 processes table.
8342
8343 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8344
8345 Non-stop mode support.
8346
8347 * server.h (non_stop): Declare.
8348 (gdb_client_data, handler_func): Declare.
8349 (delete_file_handler, add_file_handler, start_event_loop):
8350 Declare.
8351 (handle_serial_event, handle_target_event, push_event)
8352 (putpkt_notif): Declare.
8353 * target.h (enum resume_kind): New.
8354 (struct thread_resume): Replace `step' field by `kind' field.
8355 (TARGET_WNOHANG): Define.
8356 (struct target_ops) <wait>: Add `options' argument.
8357 <supports_non_stop, async, start_non_stop>: New fields.
8358 (target_supports_non_stop, target_async): New.
8359 (start_non_stop): Declare.
8360 (mywait): Add `options' argument.
8361 * target.c (mywait): Add `options' argument. Print child exit
8362 notifications here.
8363 (start_non_stop): New.
8364 * server.c (non_stop, own_buf, mem_buf): New globals.
8365 (struct vstop_notif): New.
8366 (notif_queue): New global.
8367 (queue_stop_reply, push_event, discard_queued_stop_replies)
8368 (send_next_stop_reply): New.
8369 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8370 interface changes.
8371 (attach_inferior): In non-stop mode, don't wait for the target
8372 here.
8373 (handle_general_set): Handle QNonStop.
8374 (handle_query): When handling qC, return the current general
8375 thread, instead of the first thread of the list.
8376 (handle_query): If the backend supports non-stop mode, include
8377 QNonStop+ in the qSupported query response.
8378 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8379 and non-stop mode.
8380 (handle_v_attach, handle_v_run): Handle non-stop mode.
8381 (handle_v_stopped): New.
8382 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8383 (myresume): Adjust to use resume_kind. Handle non-stop.
8384 (queue_stop_reply_callback): New.
8385 (handle_status): Handle non-stop mode.
8386 (main): Clear non_stop flag on reconnection. Use the event-loop.
8387 Refactor serial protocol handling from here ...
8388 (process_serial_event): ... to this new function. When GDB
8389 selects any thread, select one here. In non-stop mode, wait until
8390 GDB acks all pending events before exiting.
8391 (handle_serial_event, handle_target_event): New.
8392 * remote-utils.c (remote_open): Install remote_desc in the event
8393 loop.
8394 (remote_close): Remove remote_desc from the event loop.
8395 (putpkt_binary): Rename to...
8396 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8397 (putpkt_binary): New as wrapper around putpkt_binary_1.
8398 (putpkt_notif): New.
8399 (prepare_resume_reply): In non-stop mode, don't change the
8400 general_thread.
8401 * event-loop.c: New.
8402 * Makefile.in (OBJ): Add event-loop.o.
8403 (event-loop.o): New rule.
8404
8405 * linux-low.h (pid_of): Moved here.
8406 (lwpid_of): New.
8407 (get_lwp_thread): Use lwpid_of.
8408 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8409 * linux-low.c (pid_of): Delete.
8410 (inferior_pid): Use lwpid_of.
8411 (linux_event_pipe): New.
8412 (target_is_async_p): New.
8413 (delete_lwp): New.
8414 (handle_extended_wait): Use lwpid_of.
8415 (add_lwp): Don't set lwpid field.
8416 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8417 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8418 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8419 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8420 first. Adjust to linux_wait_for_event interface changes. Use
8421 lwpid_of.
8422 (linux_detach): Don't delete the main lwp here.
8423 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8424 (status_pending_p): Don't consider explicitly suspended lwps.
8425 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8426 pointer. Add OPTIONS argument. Change return type to int. Use
8427 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8428 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8429 pointer. Add status pointer argument. Return a pid instead of a
8430 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8431 changes. In non-stop mode, don't switch to a random thread.
8432 (linux_wait): Rename to...
8433 (linux_wait_1): ... this. Add target_options argument, and handle
8434 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8435 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8436 clean exit and signal exit code. Don't stop all threads in
8437 non-stop mode. In all-stop mode, only stop all threads when
8438 reporting a stop to GDB. Handle explicit thread stop requests.
8439 (async_file_flush, async_file_mark): New.
8440 (linux_wait): New.
8441 (send_sigstop): Use lwpid_of.
8442 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8443 interface changes. In non-stop mode, don't switch to a random
8444 thread.
8445 (linux_resume_one_lwp): Use lwpid_of.
8446 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8447 (linux_resume_one_thread): ... this. Handle resume_stop. In
8448 non-stop mode, don't look for pending flag in all threads.
8449 (resume_status_pending_p): Don't consider explicitly suspended
8450 threads.
8451 (my_waitpid): Reimplement. Emulate __WALL.
8452 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8453 Use lwpid_of.
8454 (sigchld_handler, linux_supports_non_stop, linux_async)
8455 (linux_start_non_stop): New.
8456 (linux_target_ops): Register linux_supports_non_stop, linux_async
8457 and linux_start_non_stop.
8458 (initialize_low): Install SIGCHLD handler.
8459 * thread-db.c (thread_db_create_event, find_one_thread)
8460 (thread_db_get_tls_address): Use lwpid_of.
8461 * win32-low.c (win32_detach): Adjust to use resume_kind.
8462 (win32_wait): Add `options' argument.
8463 * spu-low.c (spu_resume): Adjust to use resume_kind.
8464 (spu_wait): Add `options' argument.
8465
8466 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8467
8468 Decouple target code from remote protocol.
8469
8470 * target.h (enum target_waitkind): New.
8471 (struct target_waitstatus): New.
8472 (struct target_ops) <wait>: Return an unsigned long. Take a
8473 target_waitstatus pointer instead of a char pointer.
8474 (mywait): Likewise.
8475 * target.c (mywait): Change prototype to return an unsigned long.
8476 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8477 * server.h (thread_from_wait, old_thread_from_wait): Delete
8478 declarations.
8479 (prepare_resume_reply): Change prototype to take a
8480 target_waitstatus.
8481 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8482 (last_status, last_ptid): New.
8483 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8484 pid instead of a signal.
8485 (attach_inferior): Remove "status" and "signal" parameters.
8486 Adjust.
8487 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8488 not as an address.
8489 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8490 (handle_v_requests, myresume): Remove "status" and "signal"
8491 parameters. Adjust.
8492 (handle_status): New.
8493 (main): Delete local `status'. Adjust.
8494 * remote-utils.c: Include target.h.
8495 (prepare_resume_reply): Change prototype to take a
8496 target_waitstatus. Adjust.
8497
8498 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8499 interface.
8500 * spu-low.c (spu_wait): Adjust.
8501 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8502 Delete.
8503 (win32_wait): Adjust.
8504
8505 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8506
8507 * target.h (struct thread_resume): Delete leave_stopped member.
8508 (struct target_ops): Add a `n' argument to the `resume' callback.
8509 * server.c (start_inferior): Adjust.
8510 (handle_v_cont, myresume): Adjust.
8511 * linux-low.c (check_removed_breakpoint): Adjust to resume
8512 interface change, and to removed leave_stopped field.
8513 (resume_ptr): Delete.
8514 (struct thread_resume_array): New.
8515 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8516 resume interface change.
8517 (linux_continue_one_thread, linux_queue_one_thread)
8518 (resume_status_pending_p): Check if the resume field is NULL
8519 instead of checking the leave_stopped member.
8520 (linux_resume): Adjust to the target resume interface change.
8521 * spu-low.c (spu_resume): Adjust to the target resume interface
8522 change.
8523 * win32-low.c (win32_detach, win32_resume): Ditto.
8524
8525 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8526
8527 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8528 flag.
8529 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8530 pending.
8531 (linux_continue_one_thread): Only preserve the stepping flag if
8532 there's a pending breakpoint.
8533
8534 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8535
8536 * server.c (main): After the inferior having exited, call
8537 remote_close before exiting gdbserver.
8538
8539 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8540
8541 Fix size of FPSCR in Power 7 processors.
8542 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8543 (PPC_FEATURE_HAS_DFP): New #define.
8544 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8545 size of the FPSCR.
8546
8547 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8548
8549 * server.c (handle_query) Whitespace and formatting.
8550
8551 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8552
8553 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8554 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8555 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8556 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8557 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8558 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8559 Makefile.in, configure.ac: Fix whitespace throughout.
8560 * configure: Regenerate.
8561
8562 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8563
8564 * inferiors.c (find_inferior): Make it safe for the callback
8565 function to delete the currently iterated inferior.
8566
8567 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8568
8569 * Makefile.in (linuw_low_h): Move higher.
8570 (thread-db.o): Depend on $(linux_low_h).
8571
8572 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8573
8574 Rename "process" to "lwp" throughout.
8575
8576 * linux-low.c (all_processes): Rename to...
8577 (all_lwps): ... this.
8578 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8579 (add_process): Rename to ...
8580 (add_lwp): ... this. Adjust.
8581 (linux_create_inferior): Adjust.
8582 (linux_attach_lwp): Adjust.
8583 (linux_attach): Adjust.
8584 (linux_kill_one_process): Rename to ...
8585 (linux_kill_one_lwp): ... this. Adjust.
8586 (linux_kill): Adjust.
8587 (linux_detach_one_process): Rename to ...
8588 (linux_detach_one_lwp): ... this. Adjust.
8589 (linux_detach): Adjust.
8590 (check_removed_breakpoint): Adjust.
8591 (status_pending_p): Adjust.
8592 (linux_wait_for_process): Rename to ...
8593 (linux_wait_for_lwp): ... this. Adjust.
8594 (linux_wait_for_event): Adjust.
8595 (send_sigstop): Adjust.
8596 (wait_for_sigstop): Adjust.
8597 (stop_all_processes): Rename to ...
8598 (stop_all_lwps): ... this.
8599 (linux_resume_one_process): Rename to ...
8600 (linux_resume_one_lwp): ... this. Adjust.
8601 (linux_set_resume_request, linux_continue_one_thread)
8602 (linux_queue_one_thread, resume_status_pending_p)
8603 (usr_store_inferior_registers, regsets_store_inferior_registers)
8604 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8605 Adjust.
8606 * linux-low.h (get_process): Rename to ...
8607 (get_lwp): ... this. Adjust.
8608 (get_thread_process): Rename to ...
8609 (get_thread_lwp): ... this. Adjust.
8610 (get_process_thread): Rename to ...
8611 (get_lwp_thread): ... this. Adjust.
8612 (struct process_info): Rename to ...
8613 (struct lwp_info): ... this.
8614 (all_processes): Rename to ...
8615 (all_lwps): ... this.
8616 * proc-service.c (ps_lgetregs): Adjust.
8617 * thread-db.c (thread_db_create_event, find_one_thread)
8618 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8619
8620 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8621
8622 * server.c (handle_query): Handle "qAttached".
8623
8624 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8625
8626 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8627 GPLv3, update license URL.
8628
8629 2009-03-01 Doug Evans <dje@google.com>
8630
8631 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8632 (server_h): Add gdb_signals.h.
8633 (signals.o): Update.
8634 * server.h (target_signal_from_host,target_signal_to_host_p)
8635 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8636
8637 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8638
8639 * remote-utils.c (getpkt): Also generate remote-debug
8640 information if noack_mode is set.
8641
8642 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8643
8644 * server.c (handle_query): Report qXfer:siginfo:read and
8645 qXfer:siginfo:write as supported and handle them.
8646 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8647 * linux-low.c (linux_xfer_siginfo): New.
8648 (linux_target_ops): Set it.
8649
8650 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8651
8652 * server.c (gdbserver_usage): Mention --remote-debug.
8653 (main): Accept '--remote-debug' switch.
8654
8655 2009-01-18 Doug Evans <dje@google.com>
8656
8657 * regcache.c (new_register_cache): No need to check result of xcalloc.
8658 * server.c (handle_search_memory): Back out calls to xmalloc,
8659 result is checked and error is returned to user upon failure.
8660 (handle_query): Ditto. Add more checks for result of malloc.
8661 (handle_v_cont): Check result of malloc, report error back to
8662 user upon failure.
8663 (handle_v_run): Ditto. Call freeargv.
8664 * server.h (freeargv): Declare.
8665 * utils.c (freeargv): New fn.
8666
8667 2009-01-15 Doug Evans <dje@google.com>
8668
8669 * gdbreplay.c (perror_with_name): Make arg const char *.
8670 * server.h (target_signal_to_name): Make return type const char *.
8671 * thread-db.c (thread_db_err_str): Make return type const char *.
8672 * utils.c (perror_with_name): Make arg const char *.
8673
8674 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8675
8676 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8677 when handling a EXIT_PROCESS_DEBUG_EVENT.
8678
8679 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8680
8681 * gdbreplay.c (gdbreplay_version): Update copyright year.
8682 * server.c (gdbserver_version): Likewise.
8683
8684 2009-01-05 Doug Evans <dje@google.com>
8685
8686 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8687 (handle_extended_wait): Improve comment.
8688
8689 2008-12-13 Doug Evans <dje@google.com>
8690
8691 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8692 * server.h (ATTR_MALLOC): New macro.
8693 (xmalloc,xcalloc,xstrdup): Declare.
8694 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8695 * inferiors.c: Ditto.
8696 * linux-low.c: Ditto.
8697 * mem-break.c: Ditto.
8698 * regcache.c: Ditto.
8699 * remote-utils.c: Ditto.
8700 * server.c: Ditto.
8701 * target.c: Ditto.
8702 * win32-low.c: Ditto.
8703
8704 2008-12-12 Doug Evans <dje@google.com>
8705
8706 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8707 in debugging printf.
8708
8709 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8710
8711 2008-12-09 Doug Evans <dje@google.com>
8712
8713 * linux-low.h (struct process_info): Delete member tid, unused.
8714 * thread-db.c (find_one_thread): Update.
8715 (maybe_attach_thread): Update.
8716
8717 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8718
8719 * target.h (struct target_ops): Add qxfer_osdata member.
8720 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8721 and dirent.h.
8722 (linux_qxfer_osdata): New functions.
8723 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8724 callback.
8725 * server.c (handle_query): Handle "qXfer:osdata:read:".
8726 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8727 (buffer_xml_printf): New functions.
8728 * server.h (struct buffer): New.
8729 (buffer_grow_str, buffer_grow_str0): New macros.
8730 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8731 (buffer_xml_printf): Declare.
8732
8733 2008-11-24 Doug Evans <dje@google.com>
8734
8735 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8736
8737 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8738
8739 * server.c (handle_v_run): Always use the supplied argument list.
8740
8741 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8742
8743 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8744 (xtensa_regmap_table): Add entry for scompare1.
8745
8746 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8747
8748 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8749 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8750 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8751 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8752 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8753 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8754 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8755 XML target descriptions.
8756 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8757 when inferior is running on an ISA 2.05 or later processor. Add
8758 special case to return offset for full 64-bit slot of FPSCR when
8759 in 32-bits.
8760
8761 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8762
8763 * Makefile.in (SFILES, clean): Added sparc64 files.
8764 (reg-sparc64.o, reg-sparc64.c): New.
8765 * configure.srv (sparc*-*-linux*): New configuration.
8766 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8767 syscall arguments for SPARC.
8768 (regsets_store_inferior_registers): Likewise.
8769 * linux-sparc-low.c: New file.
8770
8771 2008-10-21 Doug Evans <dje@google.com>
8772
8773 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8774 (READLINE_DIR,READLINE_DEP): Delete.
8775 (INTERNAL_CFLAGS): Update.
8776 (LINTFLAGS): Update.
8777
8778 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8779
8780 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8781 whole argv from the last run, not just argv[0].
8782
8783 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8784
8785 * regcache.c (new_register_cache): Return NULL if the register
8786 cache size isn't known yet.
8787 (free_register_cache): Avoid dereferencing a NULL regcache.
8788
8789 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8790
8791 * configure.srv: Merge MIPS and MIPS64.
8792
8793 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8794
8795 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8796
8797 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8798
8799 * Makefile.in: Add required vsx dependencies.
8800
8801 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8802 Declare init_registers_powerpc_vsx32l.
8803 Declare init_registers_powerpc_vsx64l.
8804 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8805 (ppc_arch_setup): Check for VSX in hwcap.
8806 (ppc_fill_vsxregset): New function.
8807 (ppc_store_vsxregset): New function.
8808 Add new VSX entry in regset_info target_regsets.
8809
8810 * configure.srv: Add new VSX dependencies.
8811
8812 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8813
8814 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8815 (remote_open): Set or clear transport_is_reliable.
8816 (putpkt_binary): Don't expect acks in noack mode.
8817 (getpkt): Don't send ack/nac in noack mode.
8818 * server.c (handle_general_set): Handle QStartNoAckMode.
8819 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8820 qSupported.
8821 (main): Reset noack_mode on every connection.
8822 * server.h (noack_mode): Declare.
8823
8824 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8825
8826 * Makefile.in (GDBREPLAY_OBS): New variable.
8827 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8828
8829 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8830 Daniel Jacobowitz <dan@codesourcery.com>
8831
8832 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8833 (usr_store_inferior_registers): Likewise.
8834 (regsets_store_inferior_registers): Likewise.
8835
8836 2008-07-31 Rolf Jansen <rj@surtec.com>
8837 Pedro Alves <pedro@codesourcery.com>
8838
8839 * configure.ac: Check for memmem declaration.
8840 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8841 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8842 (disable_packet_qfThreadInfo): Unconditionally compile.
8843 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8844 * configure, config.in: Regenerate.
8845
8846 2008-07-28 Doug Kwan <dougkwan@google.com>
8847
8848 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8849 (linux_write_memory): Remove declaration of errno.
8850
8851 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8852
8853 * linux-low.c (handle_extended_wait): Do not use "status"
8854 variable uninitialized.
8855
8856 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8857
8858 * server.c (handle_v_attach): Inhibit reporting dll changes.
8859
8860 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8861
8862 * remote-utils.c (prepare_resume_reply): If requested, don't
8863 output "thread:TID" in the T stop reply.
8864
8865 * server.c (disable_packet_vCont, disable_packet_Tthread)
8866 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8867 (handle_query): If requested, disable support for qC, qfThreadInfo
8868 and qsThreadInfo.
8869 (handle_v_requests): If requested, disable support for vCont.
8870 (gdbserver_show_disableable): New.
8871 (main): Handle --disable-packet and --disable-packet=LIST.
8872
8873 * server.h (disable_packet_vCont, disable_packet_Tthread)
8874 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8875
8876 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8877
8878 * server.c (gdbserver_usage): Mention --version.
8879
8880 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8881
8882 * Makefile.in (gdbreplay.o): New rule.
8883
8884 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8885
8886 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8887 message, not gdbserver.
8888
8889 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8890 Nathan Sidwell <nathan@codesourcery.com>
8891 Joseph Myers <joseph@codesourcery.com>
8892
8893 * acinclude.m4: Include ../../config/acx.m4.
8894 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8895 * configure, config.in: Regenerate.
8896 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8897 * server.c (gdbserver_version): Print PKGVERSION.
8898 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8899 (main): Adjust gdbserver_usage calls.
8900 * gdbreplay.c (version, host_name): Add declarations.
8901 (gdbreplay_version, gdbreplay_usage): New.
8902 (main): Accept --version and --help options.
8903
8904 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8905
8906 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8907 (arm_breakpoint_at): Handle Thumb.
8908 (the_low_target): Add comment.
8909
8910 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8911
8912 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8913
8914 2008-05-09 Doug Evans <dje@google.com>
8915
8916 * server.h (decode_search_memory_packet): Declare.
8917 * remote-utils.c (decode_search_memory_packet): New fn.
8918 * server.c (handle_search_memory_1): New fn.
8919 (handle_search_memory): New fn.
8920 (handle_query): Process qSearch:memory packets.
8921
8922 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8923
8924 * regcache.c (registers_length): Remove.
8925 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8926 full register packet.
8927 * regcache.h (registers_length): Remove prototype.
8928 * server.h (PBUFSIZ): Define to 16384.
8929
8930 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8931
8932 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8933 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8934 powerpc-64l.o, and powerpc-altivec64l.o.
8935 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8936 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8937 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8938 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8939 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8940 to srv_xmlfiles.
8941
8942 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8943 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8944 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8945 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8946 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8947 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8948 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8949 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8950 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8951 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8952 (clean): Update.
8953
8954 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8955 (init_registers_powerpc_32l): ... this new prototype.
8956 (init_registers_powerpc_32): Remove, replace by ...
8957 (init_registers_powerpc_altivec32l): ... this new prototype.
8958 (init_registers_powerpc_e500): Remove, replace by ...
8959 (init_registers_powerpc_e500l): ... this new prototype.
8960 (init_registers_ppc64): Remove, replace by ...
8961 (init_registers_powerpc_64l): ... this new prototype.
8962 (init_registers_powerpc_64): Remove, replace by ...
8963 (init_registers_powerpc_altivec64l): ... this new prototype.
8964 (ppc_num_regs): Set to 73.
8965 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8966 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8967 (ppc_cannot_store_register): Handle orig_r3 and trap.
8968 (ppc_arch_setup): Update init_registers_... calls.
8969 (ppc_fill_gregset): Handle orig_r3 and trap.
8970
8971 * inferiors.c (clear_inferiors): Reset current_inferior.
8972
8973 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8974
8975 * acinclude.m4: Add override.m4.
8976 * configure: Regenerate.
8977
8978 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8979
8980 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8981 initial call to init_register_ppc64.
8982
8983 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8984
8985 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8986 single powerpc*-*-linux* case.
8987 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8988
8989 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8990
8991 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8992 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8993 from reg_xmlfiles.
8994 * linux-ppc-low.c: Include <elf.h>.
8995 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8996 (ppc_hwcap): New global variable.
8997 (ppc_regmap): Remove __SPE__ #ifdef sections.
8998 (ppc_regmap_e500): New global variable.
8999 (ppc_cannot_store_register): Update __SPE__ special case.
9000 (ppc_get_hwcap): New function.
9001 (ppc_arch_setup): Use it to determine whether inferior supports
9002 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9003 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9004 Do not access registers if target does not support AltiVec.
9005 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9006 Do not access registers if target does not support SPE.
9007 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9008
9009 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9010
9011 * linux-low.c (disabled_regsets, num_regsets): New.
9012 (use_regsets_p): Delete.
9013 (linux_wait_for_process): Clear disabled_regsets.
9014 (regsets_fetch_inferior_registers): Check and set it.
9015 (regsets_store_inferior_registers): Likewise.
9016 (linux_fetch_registers, linux_store_registers): Do not use
9017 use_regsets_p.
9018 (initialize_low): Allocate disabled_regsets.
9019
9020 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9021
9022 * Makefile.in (LIBOBJS): New.
9023 (OBS): Use LIBOBJS.
9024 (memmem.o): New rule.
9025 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9026 * configure: Regenerated.
9027
9028 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9029
9030 * server.c (handle_query): Never return "unsupported" for
9031 qXfer:features:read queries.
9032
9033 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9034
9035 * server.c (get_features_xml): Fix inverted condition.
9036 (handle_query): Always support qXfer:feature:read.
9037
9038 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9039
9040 * server.c (wrapper_argv): New.
9041 (start_inferior): Handle wrapper_argv. If set, expect an extra
9042 trap.
9043 (gdbserver_usage): Document --wrapper.
9044 (main): Parse --wrapper.
9045
9046 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9047
9048 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9049 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9050 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9051 (ppc_set_pc): Likewise.
9052 (ppc_arch_setup): New function.
9053 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9054 of collect_register.
9055 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9056
9057 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9058
9059 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9060 instead of linux-ppc64-low.o.
9061 * linux-ppc64-low.c: Remove file.
9062 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9063 (linux-ppc64-low.o): Remove rule.
9064
9065 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9066 (init_registers_powerpc_64): Likewise.
9067 (ppc_regmap): Conditionally define depending on __powerpc64__.
9068 (ppc_cannot_store_register): Do not special-case "fpscr" when
9069 compiled on __powerpc64__.
9070 (ppc_collect_ptrace_register): New function.
9071 (ppc_supply_ptrace_register): New function.
9072 (ppc_breakpoint): Change type to "unsigned int".
9073 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9074 (the_low_target): Conditionally provide initializers for the
9075 arch_setup member depending on __powerpc64__. Install
9076 collect_ptrace_register and supply_ptrace_register members.
9077
9078 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9079
9080 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9081 * server.c (gdbserver_xmltarget): Define.
9082 (get_features_xml): Use it to replace "target.xml" and arch_string.
9083
9084 * configure.srv: Remove srv_xmltarget. Add XML files that were
9085 mentioned there to srv_xmlfiles instead. Remove conditional tests
9086 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9087 srv_xmlfiles and srv_regobj to include all possible choices.
9088 * configure.ac (srv_xmltarget): Remove.
9089 (srv_xmlfiles): Do not add "target.xml".
9090 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9091 checks for supplementary target information.
9092 * configure: Regenerate.
9093 * Makefile.in (XML_TARGET): Remove.
9094 (target.xml): Remove rule.
9095 (clean): Do not clean up target.xml.
9096 (.PRECIOUS): Do not mention target.xml.
9097
9098 * target.h (struct target_ops): Remove arch_string member.
9099 * linux-low.c (linux_arch_string): Remove.
9100 (linux_target_ops): Remove arch_string initializer.
9101 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9102 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9103 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9104 * spu-low.c (spu_arch_string): Remove.
9105 (spu_target_ops): Remove arch_string initializer.
9106 * win32-low.c (win32_arch_string): Remove.
9107 (win32_target_ops): Remove arch_string initializer.
9108 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9109 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9110 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9111
9112 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9113
9114 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9115 by collect_ptrace_register and supply_ptrace_register hooks.
9116 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9117 instead of checking for the_low_target.left_pad_xfer.
9118 (usr_store_inferior_registers): Use collect_ptrace_register callback
9119 instead of checking for the_low_target.left_pad_xfer.
9120
9121 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9122 (s390_supply_ptrace_register): Likewise.
9123 (s390_fill_gregset): Call s390_collect_ptrace_register.
9124 (the_low_target): Update.
9125
9126 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9127 (ppc_supply_ptrace_register): Likewise.
9128 (the_low_target): Update.
9129
9130 * linux-i386-low.c (the_low_target): Update.
9131 * linux-x86-64-low.c (the_low_target): Update.
9132
9133 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9134
9135 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9136 reg-s390.o and reg-s390x.o.
9137
9138 * linux-low.c (new_inferior): New global variable.
9139 (linux_create_inferior, linux_attach): Set it.
9140 (linux_wait_for_process): Call the_low_target.arch_setup after the
9141 target has stopped for the first time.
9142 (initialize_low): Do not call the_low_target.arch_setup.
9143
9144 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9145 (s390_set_pc): Likewise.
9146 (s390_arch_setup): New function.
9147 (the_low_target): Use s390_arch_setup as arch_setup routine.
9148
9149 * regcache.c (realloc_register_cache): New function.
9150 (set_register_cache): Call it for each existing regcache.
9151
9152 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9153
9154 * server.h (init_registers): Remove prototype.
9155
9156 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9157 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9158 instead of init_registers ().
9159 * linux-arm-low.c (init_registers_arm): Add prototype.
9160 (init_registers_arm_with_iwmmxt): Likewise.
9161 (the_low_target): Add initializer for arch_setup field.
9162 * linux-cris-low.c (init_registers_cris): Add prototype.
9163 (the_low_target): Add initializer for arch_setup field.
9164 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9165 (the_low_target): Add initializer for arch_setup field.
9166 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9167 (the_low_target): Add initializer for arch_setup field.
9168 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9169 (the_low_target): Add initializer for arch_setup field.
9170 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9171 (the_low_target): Add initializer for arch_setup field.
9172 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9173 (the_low_target): Add initializer for arch_setup field.
9174 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9175 (init_registers_mips64_linux): Likewise.
9176 (the_low_target): Add initializer for arch_setup field.
9177 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9178 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9179 (the_low_target): Add initializer for arch_setup field.
9180 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9181 (init_registers_powerpc_64): Likewise.
9182 (the_low_target): Add initializer for arch_setup field.
9183 * linux-s390-low.c (init_registers_s390): Add prototype.
9184 (init_registers_s390x): Likewise.
9185 (the_low_target): Add initializer for arch_setup field.
9186 * linux-sh-low.c (init_registers_sh): Add prototype.
9187 (the_low_target): Add initializer for arch_setup field.
9188 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9189 (the_low_target): Add initializer for arch_setup field.
9190 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9191 (the_low_target): Add initializer for arch_setup field.
9192
9193 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9194 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9195 instead of init_registers ().
9196 * win32-arm-low.c (init_registers_arm): Add prototype.
9197 (the_low_target): Add initializer for arch_setup field.
9198 * win32-i386-low.c (init_registers_i386): Add prototype.
9199 (the_low_target): Add initializer for arch_setup field.
9200
9201 * spu-low.c (init_registers_spu): Add prototype.
9202 (initialize_low): Call initialie_registers_spu () instead of
9203 initialize_registers ().
9204
9205 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9206
9207 * server.c (handle_v_requests): When handling the vRun and vAttach
9208 packets, if already debugging a process, don't kill it. Return an
9209 error instead.
9210
9211 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9212
9213 * server.c (handle_query): Correct length check.
9214
9215 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9216
9217 * win32-low.c (do_initial_child_stuff): Add process handle
9218 parameter. Set current_process_handle and current_process_id from the
9219 parameters. Clear globals.
9220 (win32_create_inferior): Don't set current_process_handle and
9221 current_process_id here. Instead pass them on the call to
9222 do_initial_child_stuff.
9223 (win32_attach): Likewise.
9224 (win32_clear_inferiors): New.
9225 (win32_kill): Don't close the current process handle or the
9226 current thread handle here. Instead call win32_clear_inferiors.
9227 (win32_detach): Don't open a new handle to the process. Call
9228 win32_clear_inferiors.
9229 (win32_join): Don't rely on current_process_handle; open a new
9230 handle using the process id.
9231 (win32_wait): Call win32_clear_inferiors when the inferior process
9232 has exited.
9233
9234 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9235
9236 * server.c (monitor_show_help): Add "exit".
9237
9238 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9239
9240 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9241 (clean): Add reg-xtensa.c.
9242 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9243 * configure.srv (xtensa*-*-linux*) New target.
9244 * linux-xtensa-low.c: New.
9245 * xtensa-xtregs.c: New.
9246
9247 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9248
9249 * hostio.c: Don't include errno.h.
9250 (errno_to_fileio_errno): Move to hostio-errno.
9251 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9252 error number outputting to the target->hostio_last_error callback.
9253 (hostio_packet_error): Use FILEIO_EINVAL directly.
9254 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9255 calls to hostio_error.
9256 * hostio-errno.c: New.
9257 * server.h (hostio_last_error_from_errno): Declare.
9258 * target.h (target_ops): Add hostio_last_error member.
9259 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9260 as hostio_last_error handler.
9261 * spu-low.c (spu_target_ops): Likewise.
9262 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9263 (wince_hostio_last_error): New functions.
9264 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9265 as hostio_last_error handler.
9266 (win32_target_ops) [!_WIN32_WCE]: Register
9267 hostio_last_error_from_errno as hostio_last_error handler.
9268 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9269 (hostio-errno.o): New rule.
9270 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9271 * configure.srv (srv_hostio_err_objs): New variable. Default to
9272 hostio-errno.o.
9273 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9274 * configure: Regenerate.
9275
9276 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9277
9278 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9279 (linux_kill, linux_detach): Clean up the process list.
9280 * remote-utils.c (remote_open): Improve port number parsing.
9281 (putpkt_binary, input_interrupt): Only send interrupts if the target
9282 is running.
9283 * server.c (extended_protocol): Make static.
9284 (attached): Define earlier.
9285 (exit_requested, response_needed, program_argv): New variables.
9286 (target_running): New.
9287 (start_inferior): Clear attached here.
9288 (attach_inferior): Set attached here.
9289 (require_running): Define.
9290 (handle_query): Use require_running and target_running. Implement
9291 "monitor exit".
9292 (handle_v_attach, handle_v_run): New.
9293 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9294 (gdbserver_usage): Update.
9295 (main): Redo argument parsing. Handle --debug and --multi. Handle
9296 --attach along with other options or after the port. Save
9297 program_argv. Support no initial program. Resynchronize
9298 communication with GDB after an error. Handle "monitor exit".
9299 Use require_running and target_running. Always allow the extended
9300 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9301 restart in extended mode.
9302 * README: Refer to the GDB manual. Update --attach usage.
9303
9304 2007-12-20 Andreas Schwab <schwab@suse.de>
9305
9306 * linux-low.c (STACK_SIZE): Define.
9307 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9308 (linux_test_for_tracefork): Likewise.
9309
9310 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9311
9312 * linux-low.c (linux_wait_for_event): Update messages. Do not
9313 reinsert auto-delete breakpoints.
9314 * mem-break.c (struct breakpoint): Change return type of handler to
9315 int.
9316 (set_breakpoint_at): Update handler type.
9317 (reinsert_breakpoint_handler): Return 1 instead of calling
9318 delete_breakpoint.
9319 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9320 setting a new one.
9321 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9322 * mem-break.h (set_breakpoint_at): Update handler type.
9323 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9324 * win32-low.c (auto_delete_breakpoint): New.
9325 (get_child_debug_event): Use it.
9326
9327 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9328
9329 * configure.ac: Check for pread and pwrite.
9330 * hostio.c (handle_pread): Fall back to lseek and read.
9331 (handle_pwrite): Fall back to lseek and write.
9332 * config.in, configure: Regenerated.
9333
9334 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9335
9336 * server.c (myresume): Add own_buf argument.
9337 (main): Update calls.
9338
9339 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9340
9341 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9342 * remote-utils.c (remote_open): Do not call disable_async_io.
9343 (block_async_io): Delete.
9344 (unblock_async_io): Make static.
9345 (initialize_async_io): New.
9346 * server.c (handle_v_cont): Handle async I/O here.
9347 (myresume): Likewise. Move other common resume tasks here...
9348 (main): ... from here. Call initialize_async_io. Disable async
9349 I/O before the main loop.
9350 * server.h (initialize_async_io): Declare.
9351 (block_async_io, unblock_async_io): Delete prototypes.
9352 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9353
9354 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9355
9356 * remote-utils.c (readchar): Allow binary data in received messages.
9357
9358 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9359
9360 * win32-low.c (attaching): New global.
9361 (win32_create_inferior): Clear the `attaching' global.
9362 (win32_attach): Set the `attaching' global.
9363 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9364 attaching. Only set a breakpoint at the entry point if not
9365 attaching.
9366
9367 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9368
9369 * server.c (main): Don't report dll events on the initial
9370 connection on attaches.
9371
9372 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9373
9374 * server.c (main): Relax numerical bases supported for the pid of
9375 the --attach command line argument.
9376
9377 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9378
9379 * win32-low.c (win32_attach): Call OpenProcess before
9380 DebugActiveProcess, not after. Add last error output to error
9381 call.
9382
9383 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9384
9385 * win32-low.c (win32_get_thread_context)
9386 (win32_set_thread_context): New functions.
9387 (thread_rec): Use win32_get_thread_context.
9388 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9389 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9390 field.
9391
9392 2007-12-03 Leo Zayas
9393 Pedro Alves <pedro_alves@portugalmail.pt>
9394
9395 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9396 global variables.
9397 (child_add_thread): Minor cleanup.
9398 (child_continue): Resume artificially suspended threads before
9399 calling ContinueDebugEvent.
9400 (suspend_one_thread): New.
9401 (fake_breakpoint_event): New.
9402 (get_child_debug_event): Change return type to int. Check here if
9403 gdb sent an interrupt request. If a soft interrupt was requested,
9404 fake a breakpoint event. Return 0 if there is no event to handle,
9405 and 1 otherwise.
9406 (win32_wait): Don't check here if gdb sent an interrupt request.
9407 Ensure there is a valid event to handle.
9408 (win32_request_interrupt): Add soft interruption method as last
9409 resort.
9410
9411 2007-12-03 Leo Zayas
9412 Pedro Alves <pedro_alves@portugalmail.pt>
9413
9414 * win32-low.h (win32_thread_info): Add descriptions to the
9415 structure members. Replace `suspend_count' counter by a
9416 `suspended' flag.
9417 * win32-low.c (thread_rec): Update condition of when to get the
9418 context from the inferior. Rely on ContextFlags being set if it
9419 has already been retrieved. Only suspend the inferior thread if
9420 we haven't already. Warn if that fails.
9421 (continue_one_thread): s/suspend_count/suspended/. Only call
9422 ResumeThread once. Warn if that fails.
9423
9424 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9425
9426 * win32-low.c (win32_wait): Don't read from the inferior when it
9427 has already exited.
9428
9429 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9430
9431 * Makefile.in (win32_low_h): New variable.
9432 (win32-low.o): Add dependency on $(win32_low_h).
9433 (win32-arm-low.o, win32-i386-low.o): New rules.
9434
9435 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9436
9437 * hostio.c: Correct copyright year.
9438
9439 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9440
9441 * Makefile.in (OBS): Add hostio.o.
9442 (hostio.o): New rule.
9443 * server.h (handle_vFile): Declare.
9444 * hostio.c: New file.
9445 * server.c (handle_v_requests): Take packet_len and new_packet_len
9446 for binary packets. Call handle_vFile.
9447 (main): Update call to handle_v_requests.
9448
9449 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9450
9451 * linux-low.c: Include <sched.h>.
9452
9453 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9454
9455 * linux-low.c (linux_tracefork_grandchild): New.
9456 (linux_tracefork_child): Use clone.
9457 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9458
9459 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9460
9461 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9462
9463 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9464
9465 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9466
9467 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9468
9469 * inferiors.c (change_inferior_id): Delete.
9470 (add_pid_to_list, pull_pid_from_list): New.
9471 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9472 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9473 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9474 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9475 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9476 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9477 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9478 (using_threads): Always set to 1.
9479 (handle_extended_wait): New.
9480 (add_process): Do not set TID.
9481 (linux_create_inferior): Set must_set_ptrace_flags.
9482 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9483 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9484 (linux_thread_alive): Rename TID argument to LWPID.
9485 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9486 (linux_wait_for_event): Do not use TID or check using_threads. Update
9487 call to dead_thread_notify. Call handle_extended_wait.
9488 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9489 (send_sigstop): Delete sigstop_sent.
9490 (wait_for_sigstop): Avoid TID.
9491 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9492 (linux_test_for_tracefork): New.
9493 (linux_lookup_signals): Use thread_db_active and
9494 linux_supports_tracefork_flag.
9495 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9496 * linux-low.h (get_process_thread): Avoid TID.
9497 (struct process_ifo): Move thread_known and tid to the end. Remove
9498 sigstop_sent.
9499 (linux_attach_lwp, thread_db_init): Update prototypes.
9500 * server.h (change_inferior_id): Delete prototype.
9501 (add_pid_to_list, pull_pid_from_list): New prototypes.
9502 * thread-db.c (thread_db_use_events): New.
9503 (find_first_thread): Rename to...
9504 (find_one_thread): ...this. Update callers and messages. Do not
9505 call fatal. Check thread_db_use_events. Do not call
9506 change_inferior_id or new_thread_notify.
9507 (maybe_attach_thread): Update. Do not call new_thread_notify.
9508 (thread_db_init): Set thread_db_use_events. Check use_events.
9509 * utils.c (fatal, warning): Correct message prefix.
9510
9511 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9512
9513 * Makefile.in (clean): Remove new files.
9514 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9515 (powerpc-64.o, powerpc-64.c): New rules.
9516 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9517 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9518 with SPE.
9519 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9520 SPE targets.
9521 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9522 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9523 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9524 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9525 (target_regsets): Add AltiVec and SPE register sets.
9526 * configure.ac: Check for AltiVec and SPE.
9527 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9528 (ppc_fill_vrregset, ppc_store_vrregset): New.
9529 (target_regsets): Add AltiVec register set.
9530 * configure: Regenerated.
9531
9532 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9533
9534 * linux-low.c (O_LARGEFILE): Define.
9535 (linux_read_memory): Use /proc/PID/mem.
9536 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9537 * configure, config.in: Regenerated.
9538
9539 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9540
9541 * linux-low.c (linux_wait_for_event): Do not pass signals while
9542 single-stepping.
9543
9544 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9545
9546 * win32-low.c (create_process): New.
9547 (win32_create_inferior): Use create_process instead of
9548 CreateProcess. If create_process failed retry appending an ".exe"
9549 suffix. Store the GetLastError result immediatelly after
9550 create_process calls and use it on the call to error.
9551
9552 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9553
9554 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9555
9556 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9557
9558 * configure.ac: Switch license to GPLv3.
9559
9560 2007-08-01 Michael Snyder <msnyder@access-company.com>
9561
9562 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9563
9564 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9565
9566 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9567 typedef.
9568 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9569 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9570 CloseToolhelp32Snapshot.
9571 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9572 CloseToolhelp32Snapshot.
9573
9574 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9575
9576 * server.c (main): Check for inferior exit before main loop.
9577
9578 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9579
9580 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9581 instead of on tmp_desc.
9582
9583 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9584 Daniel Jacobowitz <dan@codesourcery.com>
9585
9586 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9587 (add_thread): Minor cleanups.
9588 (clear_inferiors): Move lower in the file. Clear the DLL
9589 list.
9590 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9591 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9592 (xml_escape_text): New.
9593 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9594 for qSupported.
9595 (handle_v_cont): Report errors.
9596 (gdbserver_version): Update.
9597 (main): Correct size of own_buf. Do not report initial DLL events.
9598 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9599 (unloaded_dll, xml_escape_text): New.
9600 * win32-low.c (enum target_waitkind): Update comments.
9601 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9602 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9603 (win32_EnumProcessModules, win32_GetModuleInformation)
9604 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9605 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9606 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9607 (win32_Module32First, win32_Module32Next, load_toolhelp)
9608 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9609 (get_child_debug_event): Handle DLL events.
9610 (win32_wait): Likewise.
9611
9612 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9613
9614 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9615 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9616
9617 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9618
9619 * win32-low.c (handle_output_debug_string): Ignore event if not
9620 waiting.
9621
9622 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9623
9624 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9625
9626 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9627
9628 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9629
9630 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9631
9632 * inferiors.c (change_inferior_id): Add comment.
9633 * linux-low.c (check_removed_breakpoint): Add an early
9634 prototype. Improve debug output.
9635 (linux_attach): Doc update.
9636 (linux_detach_one_process, linux_detach): Clean up before releasing
9637 each process.
9638 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9639 * linux-low.h (struct process_info): Doc improvement.
9640 * mem-break.c (delete_all_breakpoints): New.
9641 * mem-break.h (delete_all_breakpoints): New prototype.
9642 * thread-db.c (find_first_thread): New.
9643 (thread_db_create_event): Call it instead of
9644 thread_db_find_new_threads. Clean up unused variables.
9645 (maybe_attach_thread): Remove first thread handling.
9646 (thread_db_find_new_threads): Use find_first_thread.
9647 (thread_db_get_tls_address): Likewise.
9648
9649 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9650
9651 * thread-db.c (thread_db_find_new_threads): Add prototype.
9652 (thread_db_create_event): Check for the main thread before adding
9653 a new thread.
9654 (maybe_attach_thread): Only enable event reporting if TID == 0.
9655 (thread_db_get_tls_address): Check for new threads.
9656
9657 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9658
9659 * linux-low.c (linux_create_inferior): Try execv before execvp.
9660 * spu-low.c (spu_create_inferior): Likewise.
9661
9662 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9663
9664 * linux-low.c (linux_create_inferior): Change execv to execvp.
9665 * spu-low.c (spu_create_inferior): Likewies.
9666
9667 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9668
9669 * Makefile.in (clean): Clean new files instead of deleted ones.
9670 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9671 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9672 rules.
9673 * configure.srv: Specify XML files and new regformats for MIPS and
9674 MIPS64 GNU/Linux.
9675 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9676 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9677 an entry for the restart register.
9678 (mips_cannot_fetch_register, mips_cannot_store_register)
9679 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9680 register names to match the XML descriptions.
9681 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9682 restart register instead of $0.
9683
9684 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9685 Markus Deuling <deuling@de.ibm.com>
9686
9687 * remote-utils.c (decode_xfer_write): New function.
9688 * server.h (decode_xfer_write): Add prototype.
9689 * server.c (handle_query): Add PACKET_LEN argument. Support
9690 qXfer:spu:read and qXfer:spu:write packets.
9691 (main): Pass packet_len to handle_query.
9692 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9693 * target.h (target_ops): Add qxfer_spu.
9694
9695 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9696
9697 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9698 accessing non-seekable spufs files.
9699
9700 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9701
9702 * server.c (handle_query): Add reply for qC packet.
9703
9704 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9705 Leo Zayas <lerele@champenstudios@com>
9706
9707 * server.h (check_remote_input_interrupt_request): New function.
9708 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9709 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9710 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9711 (check_remote_input_interrupt_request): New function.
9712 * server.h (check_remote_input_interrupt_request): Declare.
9713 * win32-low.c (winapi_DebugBreakProcess,
9714 winapi_GenerateConsoleCtrlEvent): New typedefs.
9715 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9716 to 250 ms.
9717 (win32_wait): Check for remote interrupt request
9718 with check_remote_input_interrupt_request.
9719 (win32_request_interrupt): New function.
9720 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9721
9722 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9723
9724 * win32-low.c (debug_registers_changed,
9725 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9726 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9727 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9728 (thread_rec): Get context using the low target.
9729 (child_add_thread): Call thread_added on the low target,
9730 which does the same thing.
9731 (regptr): Delete.
9732 (do_initial_child_stuff): Remove debug registers references.
9733 Set context using the low target. Resume threads after
9734 setting the contexts.
9735 (child_continue): Remove dead variable. Remove debug
9736 registers references.
9737 (child_fetch_inferior_registers): Go through the low target.
9738 (do_child_store_inferior_registers): Remove.
9739 (child_store_inferior_registers): Go through the low target.
9740 (win32_resume): Remove debug registers references.
9741 Set context using the low target.
9742 (handle_exception): Change return type to void. Don't record
9743 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9744 first chance exception.
9745 (get_child_debug_event): Change return type to void. Remove
9746 goto loop. Always return after waiting for debug event.
9747 (win32_wait): Convert to switch statement. Handle spurious
9748 events.
9749
9750 * win32-i386-low.c (debug_registers_changed,
9751 debug_registers_used): New.
9752 (initial_stuff): Rename to ...
9753 (i386_initial_stuff): ... this. Clear debug registers
9754 state variables.
9755 (store_debug_registers): Delete.
9756 (i386_get_thread_context): New.
9757 (load_debug_registers): Delete.
9758 (i386_set_thread_context): New.
9759 (i386_thread_added): New.
9760 (single_step): Rename to ...
9761 (i386_single_step): ... this.
9762 (do_fetch_inferior_registers): Rename to ...
9763 (i386_fetch_inferior_register): ... this.
9764 (i386_store_inferior_register): New.
9765 (the_low_target): Adapt to new interface.
9766
9767 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9768 (arm_get_thread_context): New.
9769 (arm_set_thread_context): New.
9770 (regptr): New.
9771 (do_fetch_inferior_registers): Rename to ...
9772 (arm_fetch_inferior_register): ... this.
9773 (arm_store_inferior_register): New.
9774 (arm_wince_breakpoint): Reimplement as unsigned long.
9775 (arm_wince_breakpoint_len): Define.
9776 (the_low_target): Adapt to new interface.
9777
9778 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9779 load_debug_registers. Add get_thread_context, set_thread_context,
9780 thread_added and store_inferior_register. Rename
9781 fetch_inferior_registers to fetch_inferior_register.
9782 (regptr): Remove declaration.
9783
9784 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9785
9786 * linux-low.c (linux_detach): Change return type to int. Return 0.
9787 * spu-low.c (spu_detach): Likewise.
9788
9789 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9790
9791 * target.h (target_ops): Change return type of detach to int.
9792 Add join.
9793 (join_inferior): New.
9794 * server.c (main): Don't skip detach support on mingw32.
9795 If the inferior doesn't support detaching return error.
9796 Call join_inferior instead of using waitpid.
9797 * linux-low.c (linux_join): New.
9798 (linux_target_op): Add linux_join.
9799 * spu-low.c (spu_join): New.
9800 (spu_target_ops): Add spu_join.
9801 * win32-low.c (win32_detach): Adapt to new interface.
9802 Reopen current_process_handle before detaching. Issue a child
9803 resume before detaching.
9804 (win32_join): New.
9805 (win32_target_op): Add win32_join.
9806
9807 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9808
9809 * win32-low.c (win32-attach): Fix return value.
9810 * target.h (target_ops): Describe ATTACH return values.
9811
9812 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9813
9814 * win32-low.c (GETPROCADDRESS): Define.
9815 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9816 (winapi_DebugSetProcessKillOnExit): Likewise.
9817 (win32_create_inferior): Force usage of ansi CreateProcessA.
9818 (win32_attach): Use GETPROCADDRESS.
9819 (win32_detach): Likewise.
9820
9821 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9822
9823 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9824
9825 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9826
9827 * win32-low.c: Commit leftover changes from 2007-03-29.
9828
9829 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9830
9831 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9832 fields short instead of int. Add explicit padding.
9833 (i387_cache_to_fsave): Remove unnecessary casts.
9834 (i387_fsave_to_cache): Doc fix.
9835 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9836
9837 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9838
9839 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9840 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9841
9842 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9843
9844 * configure.srv (arm*-*-mingw32ce*): Move near the other
9845 arm targets.
9846
9847 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9848
9849 * configure.ac: Add errno checking.
9850 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9851 sys/file.h and malloc.h.
9852 (AC_CHECK_DECLS): Add perror.
9853 (srv_mingwce): Handle.
9854 * configure.srv (i[34567]86-*-cygwin*): Add
9855 win32-i386-low.o to srv_tgtobj.
9856 (i[34567]86-*-mingw*): Likewise.
9857 (arm*-*-mingw32ce*): Add case.
9858 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9859 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9860 [__MINGW32CE__] (strerror): New function.
9861 [__MINGW32CE__] (errno): Define to GetLastError.
9862 [__MINGW32CE__] (COUNTOF): New macro.
9863 (remote_open): Remove extra close call.
9864 * mem-break.c (delete_breakpoint_at): New function.
9865 * mem-break.h (delete_breakpoint_at): Declare.
9866 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9867 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9868 [USE_WIN32API] (read, write): Add char* casts.
9869 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9870 * server.h: Include wincecompat.h on Windows CE.
9871 [HAVE_ERRNO_H]: Check.
9872 (perror): Declare if not declared.
9873 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9874 (perror_with_name): Remove errno declaration.
9875 * wincecompat.h: New.
9876 * wincecompat.c: New.
9877 * win32-low.h: New.
9878 * win32-arm-low.c: New.
9879 * win32-i386-low.c: New.
9880 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9881 (OUTMSG2): Make it safe.
9882 (_T): New macro.
9883 (COUNTOF): New macro.
9884 (NUM_REGS): Get it from the low target.
9885 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9886 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9887 (thread_rec): Let low target handle debug registers.
9888 (child_add_thread): Likewise.
9889 (child_init_thread_list): Likewise.
9890 (continue_one_thread): Likewise.
9891 (regptr): New.
9892 (do_child_fetch_inferior_registers): Move to ...
9893 * win32-i386-low.c: ... here, and rename to ...
9894 (do_fetch_inferior_registers): ... this.
9895 * win32-low.c (child_fetch_inferior_registers):
9896 Go through the low target.
9897 (do_child_store_inferior_registers): Use regptr.
9898 (strwinerror): New function.
9899 (win32_create_inferior): Handle Windows CE.
9900 Use strwinerror instead of strerror on Windows error
9901 codes. Add program to the error output.
9902 Don't close the main thread handle on Windows CE.
9903 (win32_attach): Use coredll.dll on Windows CE.
9904 (win32_kill): Close current process and current
9905 thread handles.
9906 (win32_detach): Use coredll.dll on Windows CE.
9907 (win32_resume): Let low target handle debug registers, and
9908 step request.
9909 (handle_exception): Add/Remove initial breakpoint. Avoid
9910 non-existant WSTOPSIG on Windows CE.
9911 (win32_read_inferior_memory): Cast to remove warning.
9912 (win32_arch_string): Go through the low target.
9913 (initialize_low): Call set_breakpoint_data with the low
9914 target's breakpoint.
9915 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9916 FOP_REGNUM, mappings): Move to ...
9917 * win32-i386-low.c: ... here.
9918 * win32-low.c (win32_thread_info): Move to ...
9919 * win32-low.h: ... here.
9920 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9921 win32-arm-low.c and wincecompat.c.
9922 (all:): Add $EXEEXT.
9923 (install-only:): Likewise.
9924 (gdbserver:): Likewise.
9925 (gdbreplay:): Likewise.
9926 * config.in: Regenerate.
9927 * configure: Regenerate.
9928
9929 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9930
9931 * win32-low.c: Rename typedef thread_info to
9932 win32_thread_info throughout.
9933
9934 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9935
9936 * win32-i386-low.c: Rename to ...
9937 * win32-low.c: ... this.
9938 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9939 * Makefile.in: Likewise.
9940
9941 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9942
9943 * remote-utils.c (monitor_output): Constify msg parameter.
9944 * server.h (monitor_output): Likewise.
9945 * win32-i386-low.c (handle_output_debug_string): New.
9946 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9947 handle_output_debug_string.
9948 (get_child_debug_event): Likewise.
9949
9950 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9951
9952 * server.c (main): Correct strtoul check.
9953
9954 2007-03-27 Jon Ringle <jon@ringle.org>
9955
9956 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9957
9958 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9959
9960 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9961
9962 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9963
9964 * terminal.h: Check HAVE_SGTTY_H.
9965
9966 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9967
9968 * remote-utils.c (remote_open): Print out the assigned port number.
9969
9970 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9971
9972 * remote-utils.c (monitor_output): New function.
9973 * server.c (debug_threads): Define here.
9974 (monitor_show_help): New function.
9975 (handle_query): Handle qRcmd.
9976 (main): Do not handle 'd' packet.
9977 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9978 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9979 of debug_threads.
9980
9981 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9982
9983 * Makefile.in (EXEEXT): New.
9984 (clean): Use $(EXEEXT).
9985
9986 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9987
9988 * target.h (target_ops): Rename send_signal to request_interrupt,
9989 and remove enum target_signal parameter.
9990 * linux-low.c (linux_request_interrupt): Rename from
9991 linux_send_signal, and always send SIGINT.
9992 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9993 and always send SIGINT.
9994 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9995 of send_signal.
9996 (input_interrupt): Likewise.
9997
9998 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9999
10000 * server.c (get_features_xml): Check if target implemented
10001 arch_string.
10002 * win32-i386-low.c (win32_arch_string): New.
10003 (win32_target_ops): Add win32_arch_string as arch_string member.
10004
10005 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10006
10007 * spu-low.c (spu_arch_string): New.
10008 (spu_target_ops): Add spu_arch_string.
10009
10010 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10011
10012 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10013 * configure.ac: Do not check for terminal.h.
10014 * configure, config.in: Regenerated.
10015
10016 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10017
10018 * Makefile.in (OBS): Add $(XML_BUILTIN).
10019 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10020 (clean): Update.
10021 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10022 (arm-with-iwmmxt.c): New.
10023 * config.in, configure: Regenerate.
10024 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10025 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10026 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10027 (arm*-*-linux*): Add iWMMXt and regset support.
10028 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10029 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10030 (arm_store_wmmxregset, target_regsets): New.
10031 * server.c (get_features_xml): Take annex argument. Check builtin
10032 XML documents.
10033 (handle_query): Handle multiple annexes.
10034
10035 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10036
10037 * remote-utils.c [USE_WIN32API] (read, write): Define.
10038 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10039 write.
10040
10041 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10042
10043 * linux-i386-low.c (the_low_target): Set arch_string.
10044 * linux-x86-64-low.c (the_low_target): Likewise.
10045 * linux-low.c (linux_arch_string): New.
10046 (linux_target_ops): Add it.
10047 * linux-low.h (struct linux_target_ops): Add arch_string.
10048 * server.c (write_qxfer_response): Use const void * for DATA.
10049 (get_features_xml): New.
10050 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10051 * target.h (struct target_ops): Add arch_string method.
10052
10053 2007-01-03 Denis Pilat <denis.pilat@st.com>
10054 Daniel Jacobowitz <dan@codesourcery.com>
10055
10056 * linux-low.c (linux_kill): Handle being called with no threads.
10057 * win32-i386-low.c (win32_kill): Likewise.
10058 (get_child_debug_event): Clear current_process_handle.
10059
10060 2006-12-30 Denis PILAT <denis.pilat@st.com>
10061 Daniel Jacobowitz <dan@codesourcery.com>
10062
10063 * remote-utils.c (remote_open): Check the type of specified
10064 serial port devices before opening them.
10065 * server.c (main): Kill the inferior if an error occurs during
10066 the first remote_open.
10067
10068 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10069
10070 * README: Update supported targets.
10071
10072 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * Makefile.in (clean): Remove reg-mips64.c.
10075 (reg-mips64.c, reg-mips64.o): New rules.
10076 * configure.srv: Handle mips64. Include regset support for mips.
10077 * linux-mips-low.c (union mips_register): New.
10078 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10079 (mips_breakpoint, mips_breakpoint_at): Use int.
10080 (mips_collect_register, mips_supply_register)
10081 (mips_collect_register_32bit, mips_supply_register_32bit)
10082 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10083 (mips_store_fpregset, target_regsets): New.
10084 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10085
10086 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10087
10088 * configure.srv: Add target "spu*-*-*".
10089 * Makefile.in (clean): Remove reg-spu.c.
10090 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10091 * spu-low.c: New file.
10092
10093 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10094
10095 * configure.ac: Correct td_thr_tls_get_addr test.
10096 * configure: Regenerated.
10097
10098 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10099
10100 * linux-low.c (linux_wait_for_event): Reformat. Use the
10101 pass_signals array.
10102 * remote-utils.c (decode_address_to_semicolon): New.
10103 * server.c (pass_signals, handle_general_set): New.
10104 (handle_query): Mention QPassSignals for qSupported.
10105 (main): Call handle_general_set.
10106 * server.h (pass_signals, decode_address_to_semicolon): New.
10107
10108 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10109
10110 * server.c (handle_query): Correct error handling for read_auxv.
10111
10112 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10113
10114 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10115 and srv_linux_thread_db to yes.
10116 * linux-s390-low.c (s390_fill_gregset): New function.
10117 (target_regsets): Define data structure.
10118
10119 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10120
10121 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10122 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10123 * config.in, configure: Regenerated.
10124 * inferiors.c (gdb_id_to_thread): New function.
10125 (gdb_id_to_thread_id): Use it.
10126 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10127 * linux-low.h (struct process_info): Add th member.
10128 (thread_db_get_tls_address): New prototype.
10129 * remote-utils.c (decode_address): Make non-static.
10130 * server.c (handle_query): Handle qGetTLSAddr.
10131 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10132 * target.h (struct target_ops): Add get_tls_address.
10133 * thread-db.c (maybe_attach_thread): Save the thread handle.
10134 (thread_db_get_tls_address): New.
10135
10136 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10137
10138 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10139 (linux_resume_one_process): Take a siginfo_t *. Update all
10140 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10141 (struct pending_signals): Add a siginfo_t.
10142 (linux_wait_for_process): Always set last_status.
10143 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10144 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10145 * linux-low.h (struct process_info): Add last_status.
10146
10147 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10148
10149 * remote-utils.c (try_rle): New function.
10150 (putpkt_binary): Use it.
10151
10152 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10153
10154 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10155 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10156 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10157 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10158 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10159 point registers.
10160
10161 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10162
10163 * server.c (terminal_fd): New variable.
10164 (old_foreground_pgrp): Likewise.
10165 (restore_old_foreground_pgrp): New function.
10166 (start_inferior): Record the terminal file descriptor in terminal_fd
10167 and its original foreground group in old_foreground_pgrp. Register
10168 restore_old_foreground_pgrp with atexit().
10169
10170 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10171
10172 * server.c (handle_query): Correct qPart to qXfer.
10173
10174 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10175
10176 * configure.ac: Check for more headers which are missing on
10177 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10178 * configure.srv: Add Cygwin and mingw32.
10179 * remote-utils.c: Don't include headers unconditionally which
10180 are missing on mingw32. Include <winsock.h> for mingw32.
10181 (remote_open): Adjust for mingw32 support. Flush
10182 standard error after writing to it.
10183 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10184 (unblock_async_io, enable_async_io, disable_async_io)
10185 (readchar, getpkt): Update for Winsock support.
10186 (prepare_resume_reply): Expect a protocol signal number.
10187 * server.c: Disable <sys/wait.h> on mingw32.
10188 (start_inferior): Adjust for mingw32 support. Flush
10189 standard error after writing to it.
10190 (attach_inferior): Likewise. Use protocol signal
10191 numbers.
10192 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10193 and names.
10194 * win32-i386-low.c: New file.
10195 * Makefile.in (XM_CLIBS): Set.
10196 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10197 (win32-i386-low.o): New dependency rule.
10198 * linux-low.c (linux_wait): Use target signal numbers.
10199 * target.h (struct target_ops): Doc fix.
10200 * server.h (target_signal_to_name): New prototype.
10201 * gdbreplay.c: Don't include headers unconditionally which
10202 are missing on mingw32. Include <winsock.h> for mingw32.
10203 (remote_close, remote_open): Adjust for Winsock support.
10204 * configure, config.in: Regenerated.
10205
10206 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10207
10208 * server.c (decode_xfer_read, write_qxfer_response): New.
10209 (handle_query): Take a packet length argument. Handle
10210 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10211 the qSupported response.
10212 (main): Update call to handle_query.
10213
10214 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10215
10216 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10217 (putpkt_binary): Renamed from putpkt and adjusted for binary
10218 data.
10219 (putpkt): New wrapper for putpkt_binary.
10220 (readchar): Don't mask off the high bit.
10221 (decode_X_packet): New function.
10222 * server.c (main): Call putpkt_binary if a handler sets the packet
10223 length. Save the length of the incoming packet. Handle 'X'.
10224 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10225
10226 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10227
10228 * server.c (handle_query): Handle qSupported.
10229
10230 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10231
10232 * remote-utils.c (all_symbols_looked_up): New variable.
10233 (look_up_one_symbol): Check it.
10234 * server.h (look_up_one_symbol): New declaration.
10235 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10236
10237 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10238
10239 * Makefile.in (linux-arm-low.o): Update dependencies.
10240 * linux-arm-low.c: Include "gdb_proc_service.h".
10241 (PTRACE_GET_THREAD_AREA): Define.
10242 (ps_get_thread_area): New function.
10243
10244 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10245
10246 * configure.srv (m68k*-*-uclinux*): New target.
10247 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10248 (linux_resume_one_process): Remove extraneous cast.
10249 (linux_read_offsets): New.
10250 (linux_target_op): Add linux_read_offsets on mmuless systems.
10251 * server.c (handle_query): Add qOffsets logic.
10252 * target.h (struct target_ops): Add read_offsets.
10253
10254 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10257 (PTRACE_GET_THREAD_AREA): Define.
10258 (ps_get_thread_area): New function.
10259 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10260 (linux-x86-64-low.o): Update.
10261
10262 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10263
10264 * configure.ac: Remove checks for prfpregset_t.
10265 * gdb_proc_service.h: New file.
10266 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10267 new "gdb_proc_service.h".
10268 * proc-service.c: Likewise.
10269 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10270 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10271 * Makefile.in (gdb_proc_service_h): Updated.
10272 * configure, config.in: Regenerated.
10273
10274 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10275
10276 * remote-utils.c (prepare_resume_reply): Move declaration
10277 of gdb_id_from_wait to the top of the block.
10278
10279 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10280
10281 * linux-low.c (regsets_store_inferior_registers): Read the regset
10282 from the target before filling it.
10283
10284 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10285
10286 * server.c (attach_inferior): Return SIGTRAP for a successful
10287 attach.
10288
10289 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10290
10291 * Makefile.in (OBS): Add version.o.
10292 (STAGESTUFF): Delete.
10293 (version.o): Add dependencies.
10294 (version.c): Replace rule.
10295 (clean): Remove version.c.
10296 * server.c (gdbserver_version): New.
10297 (gdbserver_usage): Use printf.
10298 (main): Handle --version and --help.
10299 * server.h (version, host_name): Add declarations.
10300
10301 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10302
10303 * linux-arm-low.c:
10304 * linux-arm-low.c:
10305 * inferiors.c:
10306 * i387-fp.h:
10307 * i387-fp.c:
10308 * gdbreplay.c:
10309 * regcache.c:
10310 * proc-service.c:
10311 * mem-break.h:
10312 * mem-break.c:
10313 * linux-x86-64-low.c:
10314 * linux-sh-low.c:
10315 * linux-s390-low.c:
10316 * linux-ppc64-low.c:
10317 * linux-ppc-low.c:
10318 * linux-mips-low.c:
10319 * linux-m68k-low.c:
10320 * linux-m32r-low.c:
10321 * linux-low.h:
10322 * linux-low.c:
10323 * linux-ia64-low.c:
10324 * linux-i386-low.c:
10325 * linux-crisv32-low.c:
10326 * thread-db.c:
10327 * terminal.h:
10328 * target.h:
10329 * target.c:
10330 * server.h:
10331 * server.c:
10332 * remote-utils.c:
10333 * regcache.h:
10334 * utils.c:
10335 * Makefile.in:
10336 * configure.ac:
10337 * gdbserver.1: Add (C) after Copyright. Update the FSF
10338 address.
10339
10340 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10341
10342 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10343 (arm_breakpoint_at): Recognize both breakpoints.
10344 (the_low_target): Use the correct breakpoint instruction.
10345
10346 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10347
10348 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10349 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10350 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10351 (the_low_target): Update.
10352
10353 2005-10-25 Andreas Schwab <schwab@suse.de>
10354
10355 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10356
10357 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10358 (ia64_num_regs): Reduce to 462.
10359
10360 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10361
10362 * acinclude.m4: Correct quoting.
10363 * aclocal.m4: Regenerated.
10364
10365 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10366 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10367 (thread_db_init): Call thread_db_err_str.
10368 * configure.ac: Check for TD_VERSION.
10369 * config.in, configure: Regenerated.
10370
10371 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10372
10373 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10374
10375 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10376
10377 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10378 is not available. Define HAVE_PTRACE_GETREGS if it is.
10379 * config.in, configure: Regenerated.
10380 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10381 * linux-i386-low.c, linux-m68k-low.c: Update to use
10382 HAVE_PTRACE_GETREGS.
10383 * linux-low.c (regsets_fetch_inferior_registers)
10384 (regsets_store_inferior_registers): Only return 0 if we processed
10385 GENERAL_REGS.
10386 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10387 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10388
10389 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10390
10391 * inferiors.c (struct thread_info): Add gdb_id.
10392 (add_thread): Add gdb_id argument.
10393 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10394 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10395 calls to add_thread.
10396 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10397 * server.c (handle_query): Use thread_to_gdb_id.
10398 (handle_v_cont, main): Use gdb_id_to_thread_id.
10399 * server.h (add_thread): Update prototype.
10400 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10401 prototypes.
10402
10403 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10404
10405 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10406 left-padded registers.
10407 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10408 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10409
10410 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10411
10412 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10413 * configure: Regenerate.
10414 * config.in: Regenerate.
10415 * server.h (NEED_DECLARATION_STRERROR):
10416 Replace with !HAVE_DECL_STRERROR.
10417
10418 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10419
10420 * linux-low.c (linux_wait, linux_send_signal): Don't test
10421 an unsigned long variable for > 0 if it could be MAX_ULONG.
10422 * server.c (myresume): Likewise.
10423 * target.c (set_desired_inferior): Likewise.
10424
10425 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10426
10427 * configure.ac: Simplify and improve check for socklen_t.
10428 * configure, config.in: Regenerate.
10429
10430 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * acconfig.h: Remove.
10433 * configure.ac: Add a test for socklen_t. Use three-argument
10434 AC_DEFINE throughout.
10435 * config.in: Regenerated using autoheader 2.59.
10436 * configure: Regenerated.
10437
10438 * gdbreplay.c (socklen_t): Provide a default.
10439 (remote_open): Use socklen_t.
10440 * remote-utils.c (socklen_t): Provide a default.
10441 (remote_open): Use socklen_t.
10442 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10443 unsigned char.
10444
10445 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10446 char for buffers.
10447 * linux-low.c (linux_read_memory, linux_write_memory)
10448 (linux_read_auxv): Likewise.
10449 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10450 (check_mem_write): Likewise.
10451 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10452 Likewise.
10453 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10454 (registers_from_string, register_data): Likewise.
10455 * server.c (handle_query, main): Likewise.
10456 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10457 (decode_M_packet): Likewise.
10458 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10459 * target.h (struct target_ops): Update read_memory, write_memory,
10460 and read_auxv.
10461 (read_inferior_memory, write_inferior_memory): Update.
10462 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10463 to unsigned char *.
10464 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10465 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10466 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10467 linux-s390-low.c, linux-sh-low.c: Update for changes in
10468 read_inferior_memory and the_low_target->breakpoint.
10469
10470 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10471
10472 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10473 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10474 * configure.srv: Add powerpc64-*-linux*.
10475 * linux-ppc64-low.c: New file.
10476
10477 2005-05-23 Orjan Friberg <orjanf@axis.com>
10478
10479 * linux-cris-low.c: New file with support for CRIS.
10480 * linux-crisv32-low.c: Ditto for CRISv32.
10481 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10482 (clean): Add reg-cris.c and reg-crisv32.c.
10483 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10484 reg-crisv32.o, and reg-crisv32.c to make rules.
10485 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10486 recognized targets.
10487
10488 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10489
10490 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10491 of sizeof (PTRACE_XFER_TYPE).
10492 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10493
10494 2005-05-12 Orjan Friberg <orjanf@axis.com>
10495
10496 * target.h (struct target_ops): Add insert_watchpoint,
10497 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10498 pointers for hardware watchpoint support.
10499 * linux-low.h (struct linux_target_ops): Ditto.
10500 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10501 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10502 to linux_target_ops.
10503 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10504 reply packet.
10505 * server.c (main): Recognize 'Z' and 'z' packets.
10506
10507 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10508
10509 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10510 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10511 (the_low_target): Add new members.
10512
10513 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10514
10515 * proc-service.c (ps_lgetregs): Search all_processes instead of
10516 all_threads.
10517
10518 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10519
10520 * server.c (start_inferior): Change return type to int.
10521 (attach_inferior): Change sigptr to int *.
10522 (handle_v_cont, handle_v_requests): Change signal to int *.
10523 (main): Change signal to int.
10524
10525 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10526
10527 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10528 * configure.srv: Add m32r*-*-linux*.
10529 * linux-m32r-low.c: New file.
10530
10531 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10532
10533 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10534
10535 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10536
10537 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10538 Take unsigned long arguments for PIDs.
10539 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10540 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10541 (wait_for_sigstop, linux_resume_one_process)
10542 (regsets_fetch_inferior_registers, linux_send_signal)
10543 (linux_read_auxv): Likewise. Update the types of variables holding
10544 PIDs. Update format string specifiers.
10545 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10546 * remote-utils.c (prepare_resume_reply): Likewise.
10547 * server.c (cont_thread, general_thread, step_thread)
10548 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10549 unsigned long.
10550 (handle_query): Update format specifiers.
10551 (handle_v_cont, main): Use strtoul for thread IDs.
10552 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10553 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10554 (general_thread, step_thread, thread_from_wait)
10555 (old_thread_from_wait): Update.
10556 * target.h (struct thread_resume): Use unsigned long for THREAD.
10557 (struct target_ops): Use unsigned long for arguments to attach and
10558 thread_alive.
10559
10560 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10561
10562 * acinclude.m4: Include bfd/bfd.m4 directly.
10563 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10564 <agriffis@toolchain.org>.
10565 * aclocal.m4, configure: Regenerated.
10566
10567 2005-01-07 Andrew Cagney <cagney@gnu.org>
10568
10569 * configure.ac: Rename configure.in, require autoconf 2.59.
10570 * configure: Re-generate.
10571
10572 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10573
10574 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10575 LIBS when finished.
10576 * aclocal.m4: Regenerated.
10577 * configure: Regenerated.
10578
10579 2004-11-21 Andreas Schwab <schwab@suse.de>
10580
10581 * linux-m68k-low.c (m68k_num_gregs): Define.
10582 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10583 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10584 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10585 (m68k_breakpoint_at): New. Add to the_low_target.
10586
10587 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10588 srv_linux_thread_db to yes.
10589
10590 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10591
10592 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10593 (ARCH_SET_FS): Likewise.
10594 (ARCH_GET_FS): Likewise.
10595 (ARCH_GET_GS): Likewise.
10596
10597 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10598
10599 * linux-i386-low.c (ps_get_thread_area): New.
10600 * linux-x86-64-low.c (ps_get_thread_area): New.
10601 * linux-low.c: Include <sys/syscall.h>.
10602 (linux_kill_one_process): Don't kill the first thread here.
10603 (linux_kill): Kill the first thread here.
10604 (kill_lwp): New function.
10605 (send_sigstop, linux_send_signal): Use it.
10606 * proc-service.c: Clean up #ifdefs.
10607 (fpregset_info): Delete.
10608 (ps_lgetregs): Update and enable implementation.
10609 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10610 implementations.
10611 * remote-utils.c (struct sym_cache, symbol_cache): New.
10612 (input_interrupt): Print a clearer message.
10613 (async_io_enabled): New variable.
10614 (enable_async_io, disable_async_io): Use it. Update comments.
10615 (look_up_one_symbol): Use the symbol cache.
10616 * thread-db.c (thread_db_look_up_symbols): New function.
10617 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10618
10619 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10620
10621 * configure.in: Test for -rdynamic.
10622 * configure: Regenerated.
10623 * Makefile (INTERNAL_LDFLAGS): New.
10624 (gdbserver, gdbreplay): Use it.
10625
10626 2004-09-02 Andrew Cagney <cagney@gnu.org>
10627
10628 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10629
10630 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10631
10632 * linux-low.c (linux_wait): Clear all_processes list also.
10633
10634 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10635
10636 * linux-low.c: Include <errno.h>. Remove extern declaration of
10637 errno.
10638
10639 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10640
10641 * gdbreplay.c, server.h, utils.c: Update copyright years.
10642
10643 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10644
10645 * server.c (main): Print child status or termination signal from
10646 variable 'signal', not 'sig'.
10647
10648 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10649
10650 * linux-low.c (linux_read_memory): Change return type to
10651 int. Check for and return error from ptrace().
10652 * target.c (read_inferior_memory): Change return type to int. Pass
10653 back return status from the_target->read_memory().
10654 * target.h (struct target_ops): Adapt *read_memory() prototype.
10655 Update comment.
10656 (read_inferior_memory): Adapt prototype.
10657 * server.c (main): Return an error packet if
10658 read_inferior_memory() returns an error.
10659
10660 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10661
10662 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10663 Unify with other clean targets.
10664
10665 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10666
10667 * server.c (handle_v_cont): Call set_desired_inferior.
10668
10669 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10670
10671 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10672
10673 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10674
10675 * linux-low.c (linux_wait): Unblock async I/O.
10676 (linux_resume): Block and enable async I/O.
10677 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10678 * server.h (block_async_io, unblock_async_io): Add prototypes.
10679
10680 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10681
10682 * remote-utils.c (remote_open): Print a status notice after
10683 opening a TCP port.
10684 * server.c (attach_inferior): Print a status notice after
10685 attaching.
10686
10687 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10688
10689 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10690
10691 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10692
10693 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10694 error packet.
10695 * server.c, target.h: Update copyright years.
10696
10697 2004-02-25 Roland McGrath <roland@redhat.com>
10698
10699 * target.h (struct target_ops): New member `read_auxv'.
10700 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10701 * linux-low.c (linux_read_auxv): New function.
10702 (linux_target_ops): Initialize `read_auxv' member to that.
10703
10704 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10705
10706 Committed by Jim Blandy <jimb@redhat.com>.
10707
10708 * linux-s390-low.c (s390_num_regs): Update.
10709 (s390_regmap): Remove control registers. Use __s390x__ predefine
10710 instead of GPR_SIZE to distiguish s390 and s390x targets.
10711
10712 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10713
10714 * linux-low.c: Update copyright year.
10715 (check_removed_breakpoint): Clear pending_is_breakpoint.
10716 (linux_set_resume_request, linux_queue_one_thread)
10717 (resume_status_pending_p): New functions.
10718 (linux_continue_one_thread): Use process->resume.
10719 (linux_resume): Only resume threads if there are no pending events.
10720 * linux-low.h (struct process_info): Add resume request
10721 pointer.
10722
10723 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10724
10725 * regcache.c (new_register_cache): Clear the allocated register
10726 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10727
10728 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10729
10730 * linux-low.c (linux_resume): Take a struct thread_resume *
10731 argument.
10732 (linux_wait): Update call.
10733 (resume_ptr): New static variable.
10734 (linux_continue_one_thread): Renamed from
10735 linux_continue_one_process. Use resume_ptr.
10736 (linux_resume): Use linux_continue_one_thread.
10737 * server.c (handle_v_cont, handle_v_requests): New functions.
10738 (myresume): New function.
10739 (main): Handle 'v' case.
10740 * target.h (struct thread_resume): New type.
10741 (struct target_ops): Change argument of "resume" to struct
10742 thread_resume *.
10743 (myresume): Delete macro.
10744
10745 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10746
10747 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10748 (uninstall): Support DESTDIR.
10749
10750 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10751
10752 * configure.srv: Add xscale*linux copy of arm*linux entry.
10753
10754 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10755
10756 * linux-arm-low.c (arm_reinsert_addr): New function.
10757 (the_low_target): Add arm_reinsert_addr.
10758
10759 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10760
10761 * mem-break.c: Remove whitespace at end of file.
10762
10763 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10764
10765 * configure.in: Check whether we need to prototype strerror.
10766 * server.h: Optionally prototype strerror.
10767 * gdbreplay.c (perror_with_name): Use strerror.
10768 * linux-low.c (linux_attach_lwp): Use strerror.
10769 * utils.c (perror_with_name): Use strerror.
10770 * config.in, configure: Regenerated.
10771
10772 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10773
10774 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10775 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10776
10777 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10778
10779 * Makefile.in (SFILES): Update.
10780 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10781 low-sun3.c: Remove files.
10782
10783 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10784
10785 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10786 (linux_detach_one_process, linux_detach): New functions.
10787 (linux_target_ops): Add linux_detach.
10788 * server.c (main): Handle 'D' packet.
10789 * target.h (struct target_ops): Add "detach" member.
10790 (detach_inferior): Define.
10791
10792 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10793
10794 From Kelley Cook <kelleycook@wideopenwest.com>:
10795 * configure.srv: Accept i[34567]86 variants.
10796
10797 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10798
10799 * linux-low.c (linux_wait_for_event): Correct comment typos.
10800 (linux_resume_one_process): Call check_removed_breakpoint.
10801 (linux_send_signal): New function.
10802 (linux_target_ops): Add linux_send_signal.
10803 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10804 of kill.
10805 * target.h (struct target_ops): Add send_signal.
10806
10807 2003-05-29 Jim Blandy <jimb@redhat.com>
10808
10809 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10810 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10811 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10812 away part of the register's value.
10813
10814 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10815
10816 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10817 (linux_wait_for_event, linux_init_signals): Likewise.
10818
10819 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10820
10821 * configure.in: Check for stdlib.h.
10822 * configure: Regenerated.
10823 * config.in: Regenerated.
10824
10825 2003-01-04 Andreas Schwab <schwab@suse.de>
10826
10827 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10828
10829 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10830
10831 * Makefile.in: Remove obsolete code.
10832
10833 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10834
10835 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10836 defined(PT_FPR0_HI).
10837
10838 2002-11-17 Stuart Hughes <seh@zee2.com>
10839
10840 * linux-arm-low.c (arm_num_regs): Increase.
10841 (arm_regmap): Include status register.
10842
10843 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10844
10845 * linux-low.c (register_addr): Remove incorrect -1 check.
10846
10847 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10848
10849 * linux-low.c (linux_create_inferior): Call setpgid. Return
10850 the new PID.
10851 (unstopped_p, linux_signal_pid): Remove.
10852 (linux_target_ops): Remove linux_signal_pid.
10853 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10854 global instead of target method.
10855 * target.h (struct target_ops): Remove signal_pid. Update comment
10856 for create_inferior.
10857 * server.c (signal_pid): New variable.
10858 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10859 gdbserver. Set the child to be the foreground process group.
10860 (attach_inferior): Set signal_pid.
10861
10862 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10863
10864 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10865
10866 2002-08-20 Jim Blandy <jimb@redhat.com>
10867
10868 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10869 default for this.
10870
10871 2002-08-01 Andrew Cagney <cagney@redhat.com>
10872
10873 * Makefile.in: Make chill references obsolete.
10874
10875 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10876
10877 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10878 * configure: Regenerate.
10879 * config.in: Regenerate.
10880
10881 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10882
10883 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10884 (perror_with_name, remote_close, remote_open, expect, play): Static.
10885
10886 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10887
10888 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10889 byte offsets instead of an array of indexes.
10890 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10891
10892 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10893
10894 * regcache.c: Add comment.
10895
10896 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10897
10898 * thread-db.c: New file.
10899 * proc-service.c: New file.
10900 * acinclude.m4: New file.
10901 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10902 proc-service.o, and thread-db.o.
10903 (linux-low.o): Add USE_THREAD_DB.
10904 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10905 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10906 * aclocal.m4: Regenerated.
10907 * config.in: Regenerated.
10908 * configure: Regenerated.
10909 * configure.in: Check for proc_service.h, sys/procfs.h,
10910 thread_db.h, and linux/elf.h headrs.
10911 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10912 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10913 Check for -lthread_db and thread support.
10914 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10915 PowerPC, and SuperH.
10916 * i387-fp.c: Constify arguments.
10917 * i387-fp.h: Likewise.
10918 * inferiors.c: (struct thread_info): Renamed from
10919 `struct inferior_info'. Remove PID member. Use generic inferior
10920 list header. All uses updated.
10921 (inferiors, signal_pid): Removed.
10922 (all_threads): New variable.
10923 (get_thread): Define.
10924 (add_inferior_to_list): New function.
10925 (for_each_inferior): New function.
10926 (change_inferior_id): New function.
10927 (add_inferior): Removed.
10928 (remove_inferior): New function.
10929 (add_thread): New function.
10930 (free_one_thread): New function.
10931 (remove_thread): New function.
10932 (clear_inferiors): Use for_each_inferior and free_one_thread.
10933 (find_inferior): New function.
10934 (find_inferior_id): New function.
10935 (inferior_target_data): Update argument type.
10936 (set_inferior_target_data): Likewise.
10937 (inferior_regcache_data): Likewise.
10938 (set_inferior_regcache_data): Likewise.
10939 * linux-low.c (linux_bp_reinsert): Remove.
10940 (all_processes, stopping_threads, using_thrads)
10941 (struct pending_signals, debug_threads, pid_of): New.
10942 (inferior_pid): Replace with macro.
10943 (struct inferior_linux_data): Remove.
10944 (get_stop_pc, add_process): New functions.
10945 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10946 Use add_process and add_thread.
10947 (linux_attach_lwp): New function, based on old linux_attach. Use
10948 add_process and add_thread. Set stop_expected for new threads.
10949 (linux_attach): New function.
10950 (linux_kill_one_process): New function.
10951 (linux_kill): Kill all LWPs.
10952 (linux_thread_alive): Use find_inferior_id.
10953 (check_removed_breakpoints, status_pending_p): New functions.
10954 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10955 Update. Use WNOHANG. Wait for cloned processes also. Update process
10956 struct for the found process.
10957 (linux_wait_for_event): New function.
10958 (linux_wait): Use it. Support LWPs.
10959 (send_sigstop, wait_for_sigstop, stop_all_processes)
10960 (linux_resume_one_process, linux_continue_one_process): New functions.
10961 (linux_resume): Support LWPs.
10962 (REGISTER_RAW_SIZE): Remove.
10963 (fetch_register): Use register_size instead. Call supply_register.
10964 (usr_store_inferior_registers): Likewise. Call collect_register.
10965 Fix recursive case.
10966 (regsets_fetch_inferior_registers): Improve error message.
10967 (regsets_store_inferior_registers): Add debugging.
10968 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10969 (unstopped_p, linux_signal_pid): New functions.
10970 (linux_target_ops): Add linux_signal_pid.
10971 (linux_init_signals): New function.
10972 (initialize_low): Call it. Initialize using_threads.
10973 * regcache.c (inferior_regcache_data): Add valid
10974 flag.
10975 (get_regcache): Fetch registers lazily. Add fetch argument
10976 and update all callers.
10977 (regcache_invalidate_one, regcache_invalidate): New
10978 functions.
10979 (new_register_cache): Renamed from create_register_cache.
10980 Return the new regcache.
10981 (free_register_cache): Change argument to a void *.
10982 (registers_to_string, registers_from_string): Call get_regcache
10983 with fetch flag set.
10984 (register_data): Make static. Pass fetch flag to get_regcache.
10985 (supply_register): Call get_regcache with fetch flag clear.
10986 (collect_register): Call get_regcache with fetch flag set.
10987 (collect_register_as_string): New function.
10988 * regcache.h: Update.
10989 * remote-utils.c (putpkt): Flush after debug output and use
10990 stderr.
10991 Handle input interrupts while waiting for an ACK.
10992 (input_interrupt): Use signal_pid method.
10993 (getpkt): Flush after debug output and use stderr.
10994 (outreg): Use collect_register_as_string.
10995 (new_thread_notify, dead_thread_notify): New functions.
10996 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10997 and general_thread.
10998 (look_up_one_symbol): Flush after debug output.
10999 * server.c (step_thread, server_waiting): New variables.
11000 (start_inferior): Don't use signal_pid. Update call to mywait.
11001 (attach_inferior): Update call to mywait.
11002 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11003 (main): Don't fetch/store registers explicitly. Use
11004 set_desired_inferior. Support proposed ``Hs'' packet. Update
11005 calls to mywait.
11006 * server.h: Update.
11007 (struct inferior_list, struct_inferior_list_entry): New.
11008 * target.c (set_desired_inferior): New.
11009 (write_inferior_memory): Constify.
11010 (mywait): New function.
11011 * target.h: Update.
11012 (struct target_ops): New signal_pid method.
11013 (mywait): Removed macro, added prototype.
11014
11015 * linux-low.h (regset_func): Removed.
11016 (regset_fill_func, regset_store_func): New.
11017 (enum regset_type): New.
11018 (struct regset_info): Add type field. Use new operation types.
11019 (struct linux_target_ops): stop_pc renamed to get_pc.
11020 Add decr_pc_after_break and breakpoint_at.
11021 (get_process, get_thread_proess, get_process_thread)
11022 (strut process_info, all_processes, linux_attach_lwp)
11023 (thread_db_init): New.
11024
11025 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11026 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11027 (the_low_target): Add new members.
11028 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11029 (i386_store_fpxregset): Constify.
11030 (target_regsets): Add new kind identifier.
11031 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11032 (i386_set_pc): Add debugging.
11033 (i386_breakpoint_at): New function.
11034 (the_low_target): Add new members.
11035 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11036 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11037 (mips_breakpoint_at): New.
11038 (the_low_target): Add new members.
11039 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11040 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11041 (the_low_target): Add new members.
11042 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11043 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11044 (the_low_target): Add new members.
11045 * linux-x86-64-low.c (target_regsets): Add new kind
11046 identifier.
11047
11048 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11049
11050 From Martin Pool <mbp@samba.org>:
11051 * server.c (gdbserver_usage): New function.
11052 (main): Call it.
11053
11054 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11055
11056 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11057 stop_at -> stop_pc.
11058
11059 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11060
11061 * Makefile.in: Remove obsolete code.
11062
11063 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11064
11065 * linux-low.c (regsets_fetch_inferior_registers),
11066 (regsets_store_inferior_registers): Removed cast to int from
11067 ptrace() calls.
11068 * regcache.h: Added declaration of struct inferior_info.
11069
11070 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11071
11072 * inferiors.c (struct inferior_info): Add regcache_data.
11073 (add_inferior): Call create_register_cache.
11074 (clear_inferiors): Call free_register_cache.
11075 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11076 * regcache.c (struct inferior_regcache_data): New.
11077 (registers): Remove.
11078 (get_regcache): New function.
11079 (create_register_cache, free_register_cache): New functions.
11080 (set_register_cache): Don't initialize the register cache here.
11081 (registers_to_string, registers_from_string, register_data): Call
11082 get_regcache.
11083 * regcache.h: Add prototypes.
11084 * server.h: Likewise.
11085
11086 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11087
11088 * mem-break.c: New file.
11089 * mem-break.h: New file.
11090 * Makefile.in: Add mem-break.o rule; update server.h
11091 dependencies.
11092 * inferiors.c (struct inferior_info): Add target_data
11093 member.
11094 (clear_inferiors): Free target_data member if set.
11095 (inferior_target_data, set_inferior_target_data): New functions.
11096 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11097 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11098 * linux-low.c (linux_bp_reinsert): New variable.
11099 (struct inferior_linux_data): New.
11100 (linux_create_inferior): Use set_inferior_target_data.
11101 (linux_attach): Likewise. Call add_inferior.
11102 (linux_wait_for_one_inferior): New function.
11103 (linux_wait): Call it.
11104 (linux_write_memory): Add const.
11105 (initialize_low): Call set_breakpoint_data.
11106 * linux-low.h (struct linux_target_ops): Add breakpoint
11107 handling members.
11108 * server.c (attach_inferior): Remove extra add_inferior
11109 call.
11110 * server.h: Include mem-break.h. Update inferior.c
11111 prototypes.
11112 * target.c (read_inferior_memory)
11113 (write_inferior_memory): New functions.
11114 * target.h (read_inferior_memory)
11115 (write_inferior_memory): Change macros to prototypes.
11116 (struct target_ops): Update comments. Add const to write_memory
11117 definition.
11118
11119 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11120
11121 * linux-low.c (usr_store_inferior_registers): Support
11122 registers which are allowed to fail to store.
11123 * linux-low.h (linux_target_ops): Likewise.
11124 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11125 (ppc_cannot_store_register): FPSCR may not be storable.
11126
11127 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11128
11129 * server.h: Include <string.h> if HAVE_STRING_H.
11130 * ChangeLog: Correct paths in last ChangeLog entry.
11131
11132 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11133
11134 * linux-low.h: Remove obsolete prototypes.
11135 (struct linux_target_ops): New.
11136 (extern the_low_target): New.
11137 * linux-low.c (num_regs, regmap): Remove declarations.
11138 (register_addr): Use the_low_target explicitly.
11139 (fetch_register): Likewise.
11140 (usr_fetch_inferior_registers): Likewise.
11141 (usr_store_inferior_registers): Likewise.
11142 * linux-arm-low.c (num_regs): Remove.
11143 (arm_num_regs): Define.
11144 (arm_regmap): Renamed from regmap, made static.
11145 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11146 made static.
11147 (arm_cannot_store_register): Renamed from cannot_store_register,
11148 made static.
11149 (the_low_target): New.
11150 * linux-i386-low.c (num_regs): Remove.
11151 (i386_num_regs): Define.
11152 (i386_regmap): Renamed from regmap, made static.
11153 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11154 made static.
11155 (i386_cannot_store_register): Renamed from cannot_store_register,
11156 made static.
11157 (the_low_target): New.
11158 * linux-ia64-low.c (num_regs): Remove.
11159 (ia64_num_regs): Define.
11160 (ia64_regmap): Renamed from regmap, made static.
11161 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11162 made static.
11163 (ia64_cannot_store_register): Renamed from cannot_store_register,
11164 made static.
11165 (the_low_target): New.
11166 * linux-m68k-low.c (num_regs): Remove.
11167 (m68k_num_regs): Define.
11168 (m68k_regmap): Renamed from regmap, made static.
11169 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11170 made static.
11171 (m68k_cannot_store_register): Renamed from cannot_store_register,
11172 made static.
11173 (the_low_target): New.
11174 * linux-mips-low.c (num_regs): Remove.
11175 (mips_num_regs): Define.
11176 (mips_regmap): Renamed from regmap, made static.
11177 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11178 made static.
11179 (mips_cannot_store_register): Renamed from cannot_store_register,
11180 made static.
11181 (the_low_target): New.
11182 * linux-ppc-low.c (num_regs): Remove.
11183 (ppc_num_regs): Define.
11184 (ppc_regmap): Renamed from regmap, made static.
11185 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11186 made static.
11187 (ppc_cannot_store_register): Renamed from cannot_store_register,
11188 made static.
11189 (the_low_target): New.
11190 * linux-s390-low.c (num_regs): Remove.
11191 (s390_num_regs): Define.
11192 (s390_regmap): Renamed from regmap, made static.
11193 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11194 made static.
11195 (s390_cannot_store_register): Renamed from cannot_store_register,
11196 made static.
11197 (the_low_target): New.
11198 * linux-sh-low.c (num_regs): Remove.
11199 (sh_num_regs): Define.
11200 (sh_regmap): Renamed from regmap, made static.
11201 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11202 made static.
11203 (sh_cannot_store_register): Renamed from cannot_store_register,
11204 made static.
11205 (the_low_target): New.
11206 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11207 (the_low_target): New.
11208
11209 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11210
11211 * Makefile.in: Add stamp-h target.
11212 * configure.in: Create stamp-h.
11213 * configure: Regenerated.
11214
11215 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11216
11217 * inferiors.c: New file.
11218 * target.c: New file.
11219 * target.h: New file.
11220 * Makefile.in: Add target.o and inferiors.o. Update
11221 dependencies.
11222 * linux-low.c (inferior_pid): New static variable,
11223 moved from server.c.
11224 (linux_create_inferior): Renamed from create_inferior.
11225 Call add_inferior. Return 0 on success instead of a PID.
11226 (linux_attach): Renamed from myattach.
11227 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11228 (linux_thread_alive): Renamed from mythread_alive.
11229 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11230 child dies.
11231 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11232 (regsets_store_inferior_registers): Correct error message.
11233 Add missing ``return 0''.
11234 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11235 (linux_store_registers): Renamed from store_inferior_registers.
11236 (linux_read_memory): Renamed from read_inferior_memory.
11237 (linux_write_memory): Renamed from write_inferior_memory.
11238 (linux_target_ops): New structure.
11239 (initialize_low): Call set_target_ops ().
11240 * remote-utils.c (unhexify): New function.
11241 (hexify): New function.
11242 (input_interrupt): Send signals to ``signal_pid''.
11243 * server.c (inferior_pid): Remove.
11244 (start_inferior): Update create_inferior call.
11245 (attach_inferior): Call add_inferior.
11246 (handle_query): New function.
11247 (main): Call handle_query for `q' packets.
11248 * server.h: Include "target.h". Remove obsolete prototypes.
11249 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11250
11251 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11252
11253 * Makefile.in: Add WARN_CFLAGS. Update configury
11254 dependencies.
11255 * configure.in: Check for <string.h>
11256 * configure: Regenerate.
11257 * config.in: Regenerate.
11258 * gdbreplay.c: Include needed system headers.
11259 (remote_open): Remove strchr prototype.
11260 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11261 * regcache.c (supply_register): Change buf argument to const void *.
11262 (supply_register_by_name): Likewise.
11263 (collect_register): Change buf argument to void *.
11264 (collect_register_by_name): Likewise.
11265 * regcache.h: Add missing prototypes.
11266 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11267 * server.c (handle_query): New function.
11268 (attached): New static variable, moved out of main.
11269 (main): Quiet longjmp clobber warnings.
11270 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11271 * utils.c (error): Remove NORETURN.
11272 (fatal): Likewise.
This page took 0.302185 seconds and 4 git commands to generate.