Arch-specific remote follow fork
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-05-12 Don Breazeal <donb@codesourcery.com>
2
3 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4 (the_low_target) <new_fork>: Initialize new member.
5 * linux-arm-low.c (arm_new_fork): New function.
6 (the_low_target) <new_fork>: Initialize new member.
7 * linux-low.c (handle_extended_wait): Call new target function
8 new_fork.
9 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10 * linux-mips-low.c (mips_add_watchpoint): New function
11 extracted from mips_insert_point.
12 (the_low_target) <new_fork>: Initialize new member.
13 (mips_linux_new_fork): New function.
14 (mips_insert_point): Call mips_add_watchpoint.
15 * linux-x86-low.c (x86_linux_new_fork): New function.
16 (the_low_target) <new_fork>: Initialize new member.
17
18 2015-05-12 Don Breazeal <donb@codesourcery.com>
19
20 * linux-low.c (handle_extended_wait): Implement return value,
21 rename argument 'event_child' to 'event_lwp', handle
22 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
23 (linux_low_ptrace_options): New function.
24 (linux_low_filter_event): Call linux_low_ptrace_options,
25 use different argument fo linux_enable_event_reporting,
26 use return value from handle_extended_wait.
27 (extended_event_reported): New function.
28 (linux_wait_1): Call extended_event_reported and set
29 status to report fork events.
30 (linux_write_memory): Add pid to debug message.
31 (reset_lwp_ptrace_options_callback): New function.
32 (linux_handle_new_gdb_connection): New function.
33 (linux_target_ops): Initialize new structure member.
34 * linux-low.h (struct lwp_info) <waitstatus>: New member.
35 * lynx-low.c: Initialize new structure member.
36 * remote-utils.c (prepare_resume_reply): Implement stop reason
37 "fork" for "T" stop message.
38 * server.c (handle_query): Call handle_new_gdb_connection.
39 * server.h (report_fork_events): Declare global flag.
40 * target.h (struct target_ops) <handle_new_gdb_connection>:
41 New member.
42 (target_handle_new_gdb_connection): New macro.
43 * win32-low.c: Initialize new structure member.
44
45 2015-05-12 Don Breazeal <donb@codesourcery.com>
46
47 * mem-break.c (APPEND_TO_LIST): Define macro.
48 (clone_agent_expr): New function.
49 (clone_one_breakpoint): New function.
50 (clone_all_breakpoints): New function.
51 * mem-break.h: Declare new functions.
52
53 2015-05-12 Don Breazeal <donb@codesourcery.com>
54
55 * linux-low.c (linux_supports_fork_events): New function.
56 (linux_supports_vfork_events): New function.
57 (linux_target_ops): Initialize new structure members.
58 (initialize_low): Call linux_check_ptrace_features.
59 * lynx-low.c (lynx_target_ops): Initialize new structure
60 members.
61 * server.c (report_fork_events, report_vfork_events):
62 New global flags.
63 (handle_query): Add new features to qSupported packet and
64 response.
65 (captured_main): Initialize new global variables.
66 * target.h (struct target_ops) <supports_fork_events>:
67 New member.
68 <supports_vfork_events>: New member.
69 (target_supports_fork_events): New macro.
70 (target_supports_vfork_events): New macro.
71 * win32-low.c (win32_target_ops): Initialize new structure
72 members.
73
74 2015-05-12 Gary Benson <gbenson@redhat.com>
75
76 * server.c (handle_qxfer_exec_file): Use current process
77 if annex is empty.
78
79 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
80
81 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
82 Remove HAVE_PTRACE_GETREGS conditionals.
83 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
84 instead of PTRACE_GETREGS and PTRACE_SETREGS.
85
86 2015-05-08 Yao Qi <yao.qi@linaro.org>
87
88 * linux-low.c (linux_supports_conditional_breakpoints): New
89 function.
90 (linux_target_ops): Install new target method.
91 * lynx-low.c (lynx_target_ops): Install NULL hook for
92 supports_conditional_breakpoints.
93 * nto-low.c (nto_target_ops): Likewise.
94 * spu-low.c (spu_target_ops): Likewise.
95 * win32-low.c (win32_target_ops): Likewise.
96 * server.c (handle_query): Check
97 target_supports_conditional_breakpoints.
98 * target.h (struct target_ops) <supports_conditional_breakpoints>:
99 New field.
100 (target_supports_conditional_breakpoints): New macro.
101
102 2015-05-06 Pedro Alves <palves@redhat.com>
103
104 PR server/18081
105 * server.c (start_inferior): If the process exits, mourn it.
106
107 2015-04-21 Gary Benson <gbenson@redhat.com>
108
109 * hostio.c (fileio_open_flags_to_host): Factored out to
110 fileio_to_host_openflags in common/fileio.c. Single use
111 updated.
112
113 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
114
115 * linux-xtensa-low.c (xtensa_fill_gregset)
116 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
117 XCHAL_HAVE_LOOP.
118
119 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
120
121 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
122 (regs_info): Replace usrregs pointer with NULL.
123
124 2015-04-17 Gary Benson <gbenson@redhat.com>
125
126 * target.h (struct target_ops) <pid_to_exec_file>: New field.
127 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
128 * server.c (handle_qxfer_exec_file): New function.
129 (qxfer_packets): Add exec-file entry.
130 (handle_query): Report qXfer:exec-file:read as supported packet.
131
132 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
133
134 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
135
136 2015-04-09 Gary Benson <gbenson@redhat.com>
137
138 * hostio-errno.c (errno_to_fileio_error): Remove function.
139 Update caller to use remote_fileio_to_fio_error.
140
141 2015-04-09 Yao Qi <yao.qi@linaro.org>
142
143 * linux-low.c (linux_insert_point): Call
144 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
145 (linux_remove_point): Call remove_memory_breakpoint if type is
146 raw_bkpt_type_sw.
147 * linux-x86-low.c (x86_insert_point): Don't call
148 insert_memory_breakpoint.
149 (x86_remove_point): Don't call remove_memory_breakpoint.
150
151 2015-04-01 Pedro Alves <palves@redhat.com>
152 Cleber Rosa <crosa@redhat.com>
153
154 * server.c (gdbserver_usage): Reorganize and extend the usage
155 message.
156
157 2015-03-24 Pedro Alves <palves@redhat.com>
158
159 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
160 output. Also dump TRAP_TRACE.
161 (linux_low_filter_event): In debug output, distinguish a
162 resume_stop SIGSTOP from a delayed SIGSTOP.
163
164 2015-03-24 Gary Benson <gbenson@redhat.com>
165
166 * linux-x86-low.c (x86_linux_new_thread): Moved to
167 nat/x86-linux.c.
168 (x86_linux_prepare_to_resume): Likewise.
169
170 2015-03-24 Gary Benson <gbenson@redhat.com>
171
172 * Makefile.in (x86-linux-dregs.o): New rule.
173 * configure.srv: Add x86-linux-dregs.o to relevant targets.
174 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
175 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
176 (x86_linux_dr_get): Likewise.
177 (x86_linux_dr_set): Likewise.
178 (update_debug_registers_callback): Likewise.
179 (x86_linux_dr_set_addr): Likewise.
180 (x86_linux_dr_get_addr): Likewise.
181 (x86_linux_dr_set_control): Likewise.
182 (x86_linux_dr_get_control): Likewise.
183 (x86_linux_dr_get_status): Likewise.
184 (x86_linux_update_debug_registers): Likewise.
185
186 2015-03-24 Gary Benson <gbenson@redhat.com>
187
188 * linux-x86-low.c (x86_linux_update_debug_registers):
189 New function, factored out from...
190 (x86_linux_prepare_to_resume): ...this.
191
192 2015-03-24 Gary Benson <gbenson@redhat.com>
193
194 * linux-x86-low.c (x86_linux_dr_get): Update comments.
195 (x86_linux_dr_set): Likewise.
196 (update_debug_registers_callback): Likewise.
197 (x86_linux_dr_set_addr): Likewise.
198 (x86_linux_dr_get_addr): Likewise.
199 (x86_linux_dr_set_control): Likewise.
200 (x86_linux_dr_get_control): Likewise.
201 (x86_linux_dr_get_status): Likewise.
202 (x86_linux_prepare_to_resume): Likewise.
203
204 2015-03-24 Gary Benson <gbenson@redhat.com>
205
206 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
207 Use perror_with_name. Pass string through gettext.
208 (x86_linux_dr_set): Likewise.
209
210 2015-03-24 Gary Benson <gbenson@redhat.com>
211
212 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
213 (x86_linux_dr_set_addr): ...this.
214 (x86_dr_low_get_addr): Rename to...
215 (x86_linux_dr_get_addr): ...this.
216 (x86_dr_low_set_control): Rename to...
217 (x86_linux_dr_set_control): ...this.
218 (x86_dr_low_get_control): Rename to...
219 (x86_linux_dr_get_control): ...this.
220 (x86_dr_low_get_status): Rename to...
221 (x86_linux_dr_get_status): ...this.
222 (x86_dr_low): Update with new function names.
223
224 2015-03-24 Gary Benson <gbenson@redhat.com>
225
226 * Makefile.in (x86-linux.o): New rule.
227 * configure.srv: Add x86-linux.o to relevant targets.
228 * linux-low.c (lwp_set_arch_private_info): New function.
229 (lwp_arch_private_info): Likewise.
230 * linux-x86-low.c: Include nat/x86-linux.h.
231 (arch_lwp_info): Removed structure.
232 (update_debug_registers_callback):
233 Use lwp_set_debug_registers_changed.
234 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
235 and lwp_set_debug_registers_changed.
236 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
237
238 2015-03-24 Gary Benson <gbenson@redhat.com>
239
240 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
241 * linux-arm-low.c (arm_new_thread): Likewise.
242 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
243 * linux-mips-low.c (mips_linux_new_thread): Likewise.
244 * linux-x86-low.c (x86_linux_new_thread): Likewise.
245 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
246
247 2015-03-24 Gary Benson <gbenson@redhat.com>
248
249 * linux-low.c (ptid_of_lwp): New function.
250 (lwp_is_stopped): Likewise.
251 (lwp_stop_reason): Likewise.
252 * linux-x86-low.c (update_debug_registers_callback):
253 Use lwp_is_stopped.
254 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
255 lwp_stop_reason.
256
257 2015-03-24 Gary Benson <gbenson@redhat.com>
258
259 * linux-low.h (linux_stop_lwp): Remove declaration.
260
261 2015-03-24 Gary Benson <gbenson@redhat.com>
262
263 * linux-low.h: Include nat/linux-nat.h.
264 * linux-low.c (iterate_over_lwps_args): New structure.
265 (iterate_over_lwps_filter): New function.
266 (iterate_over_lwps): Likewise.
267 * linux-x86-low.c (update_debug_registers_callback):
268 Update signature to what iterate_over_lwps expects.
269 Remove PID check that iterate_over_lwps now performs.
270 (x86_dr_low_set_addr): Use iterate_over_lwps.
271 (x86_dr_low_set_control): Likewise.
272
273 2015-03-24 Gary Benson <gbenson@redhat.com>
274
275 * linux-x86-low.c (x86_debug_reg_state): New function.
276 (x86_linux_prepare_to_resume): Use the above.
277
278 2015-03-24 Gary Benson <gbenson@redhat.com>
279
280 * linux-low.c (current_lwp_ptid): New function.
281 * linux-x86-low.c: Include nat/linux-nat.h.
282 (x86_dr_low_get_addr): Use current_lwp_ptid.
283 (x86_dr_low_get_control): Likewise.
284 (x86_dr_low_get_status): Likewise.
285
286 2015-03-20 Pedro Alves <palves@redhat.com>
287
288 * tracepoint.c (cmd_qtstatus): Make "str" const.
289
290 2015-03-20 Pedro Alves <palves@redhat.com>
291
292 * server.c (handle_general_set): Make "req_str" const.
293
294 2015-03-19 Pedro Alves <palves@redhat.com>
295
296 * linux-low.c (linux_resume_one_lwp): Rename to ...
297 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
298 instead call perror_with_name.
299 (check_ptrace_stopped_lwp_gone): New function.
300 (linux_resume_one_lwp): Reimplement as wrapper around
301 linux_resume_one_lwp_throw that swallows errors if the LWP is
302 gone.
303
304 2015-03-19 Pedro Alves <palves@redhat.com>
305
306 * linux-low.c (count_events_callback, select_event_lwp_callback):
307 No longer check whether the thread has resume_stop as last resume
308 kind.
309
310 2015-03-19 Pedro Alves <palves@redhat.com>
311
312 * linux-low.c (count_events_callback, select_event_lwp_callback):
313 Use the lwp's status_pending_p field, not the thread's.
314
315 2015-03-19 Pedro Alves <palves@redhat.com>
316
317 * linux-low.c (select_event_lwp_callback): Update comments to
318 no longer mention SIGTRAP.
319
320 2015-03-18 Gary Benson <gbenson@redhat.com>
321
322 * server.c (handle_query): Do not report vFile:fstat as supported.
323
324 2015-03-11 Gary Benson <gbenson@redhat.com>
325
326 * hostio.c (sys/types.h): New include.
327 (sys/stat.h): Likewise.
328 (common-remote-fileio.h): Likewise.
329 (handle_fstat): New function.
330 (handle_vFile): Handle vFile:fstat packets.
331
332 2015-03-11 Gary Benson <gbenson@redhat.com>
333
334 * configure.ac (AC_CHECK_MEMBERS): Add checks for
335 struct stat.st_blocks and struct stat.st_blksize.
336 * configure: Regenerate.
337 * config.in: Likewise.
338 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
339 (OBS): Add common-remote-fileio.o.
340 (common-remote-fileio.o): New rule.
341
342 2015-03-09 Pedro Alves <palves@redhat.com>
343
344 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
345 'struct sockaddr' pointer in 'accept' call.
346
347 2015-03-09 Pedro Alves <palves@redhat.com>
348
349 Revert:
350 2015-03-07 Pedro Alves <palves@redhat.com>
351 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
352 or <winsock2.h> here. Instead include "gdb_socket.h".
353 (remote_open): Use union gdb_sockaddr_u.
354 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
355 or <winsock2.h> here. Instead include "gdb_socket.h".
356 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
357 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
358 or <sys/un.h>.
359 (init_named_socket, gdb_agent_helper_thread): Use union
360 gdb_sockaddr_u.
361
362 2015-03-07 Pedro Alves <palves@redhat.com>
363
364 * configure.ac (build_warnings): Move
365 -Wdeclaration-after-statement to the C-specific set.
366 * configure: Regenerate.
367
368 2015-03-07 Pedro Alves <palves@redhat.com>
369
370 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
371 or <winsock2.h> here. Instead include "gdb_socket.h".
372 (remote_open): Use union gdb_sockaddr_u.
373 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
374 or <winsock2.h> here. Instead include "gdb_socket.h".
375 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
376 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
377 or <sys/un.h>.
378 (init_named_socket, gdb_agent_helper_thread): Use union
379 gdb_sockaddr_u.
380
381 2015-03-07 Pedro Alves <palves@redhat.com>
382
383 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
384 instead.
385
386 2015-03-06 Yao Qi <yao.qi@linaro.org>
387
388 * linux-aarch64-low.c (aarch64_insert_point): Use
389 show_debug_regs as a boolean.
390 (aarch64_remove_point): Likewise.
391
392 2015-03-05 Pedro Alves <palves@redhat.com>
393
394 * lynx-low.c (lynx_target_ops): Install NULL hooks for
395 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
396 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
397 * nto-low.c (nto_target_ops): Likewise.
398 * spu-low.c (spu_target_ops): Likewise.
399 * win32-low.c (win32_target_ops): Likewise.
400
401 2015-03-04 Pedro Alves <palves@redhat.com>
402
403 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
404 Decide whether a breakpoint triggered based on the SIGTRAP's
405 siginfo.si_code.
406 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
407 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
408 (linux_low_filter_event): Check for breakpoints before checking
409 watchpoints.
410 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
411 siginfo.si_code.
412 (linux_stopped_by_sw_breakpoint)
413 (linux_supports_stopped_by_sw_breakpoint)
414 (linux_stopped_by_hw_breakpoint)
415 (linux_supports_stopped_by_hw_breakpoint): New functions.
416 (linux_target_ops): Install new target methods.
417
418 2015-03-04 Pedro Alves <palves@redhat.com>
419
420 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
421 * server.c (swbreak_feature, hwbreak_feature): New globals.
422 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
423 (captured_main): Clear swbreak_feature and hwbreak_feature.
424 * server.h (swbreak_feature, hwbreak_feature): Declare.
425 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
426 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
427 supports_stopped_by_hw_breakpoint>: New fields.
428 (target_supports_stopped_by_sw_breakpoint)
429 (target_stopped_by_sw_breakpoint)
430 (target_supports_stopped_by_hw_breakpoint)
431 (target_stopped_by_hw_breakpoint): Declare.
432
433 2015-03-04 Pedro Alves <palves@redhat.com>
434
435 enum lwp_stop_reason -> enum target_stop_reason
436 * linux-low.c (check_stopped_by_breakpoint): Adjust.
437 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
438 (linux_wait_1, stuck_in_jump_pad_callback)
439 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
440 (linux_stopped_by_watchpoint):
441 * linux-low.h (enum lwp_stop_reason): Delete.
442 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
443 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
444
445 2015-03-04 Yao Qi <yao.qi@linaro.org>
446
447 * Makefile.in (SFILES): Add linux-aarch64-low.c.
448
449 2015-03-03 Gary Benson <gbenson@redhat.com>
450
451 * hostio.c (handle_vFile): Fix prefix lengths.
452
453 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
454
455 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
456 ptr_bits.
457
458 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
459
460 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
461 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
462 (clean): Add "rm -f" for above C files.
463 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
464 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
465 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
466 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
467 * linux-s390-low.c (HWCAP_S390_VX): New macro.
468 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
469 (init_registers_s390x_vx_linux64)
470 (init_registers_s390x_tevx_linux64)
471 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
472 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
473 declarations.
474 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
475 (s390_store_vxrs_high): New functions.
476 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
477 NT_S390_VXRS_HIGH.
478 (s390_arch_setup): Add logic for selecting one of the new target
479 descriptions. Activate the new vector regsets if applicable.
480 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
481 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
482 and init_registers_s390x_tevx_linux64.
483
484 2015-03-01 Pedro Alves <palves@redhat.com>
485
486 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
487 parameter.
488
489 2015-02-27 Pedro Alves <palves@redhat.com>
490
491 * linux-x86-low.c (u_debugreg_offset): New function.
492 (x86_linux_dr_get, x86_linux_dr_set): Use it.
493
494 2015-02-27 Pedro Alves <palves@redhat.com>
495
496 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
497 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
498 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
499 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
500 (ps_lsetfpregs, ps_getpid)
501 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
502 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
503 (ps_lsetxregs, ps_plog): Declare.
504
505 2015-02-27 Pedro Alves <palves@redhat.com>
506
507 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
508 IP_AGENT_EXPORT_FUNC.
509 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
510 IP_AGENT_EXPORT_FUNC.
511 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
512 (IP_AGENT_EXPORT): Delete.
513 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
514 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
515 (gdb_trampoline_buffer_error, collecting, gdb_collect)
516 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
517 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
518 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
519 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
520 (traceframe_read_count, traceframe_write_count)
521 (traceframes_created, trace_state_variables, get_raw_reg)
522 (get_trace_state_variable_value, set_trace_state_variable_value)
523 (ust_loaded, helper_thread_id, cmd_buf): Use
524 IPA_SYM_EXPORTED_NAME.
525 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
526 (tracepoints) Use IP_AGENT_EXPORT_VAR.
527 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
528 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
529 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
530 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
531 EXTERN_C_PUSH/EXTERN_C_POP.
532 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
533 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
534 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
535 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
536 (traceframe_write_count, traceframe_read_count)
537 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
538 (about_to_request_buffer_space, get_trace_state_variable_value)
539 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
540 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
541 EXTERN_C_PUSH/EXTERN_C_POP.
542 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
543 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
544 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
545 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
546 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
547 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
548 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
549 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
550 Define.
551 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
552 (IP_AGENT_EXPORT_VAR_DECL): Define.
553 (tracing): Declare.
554 (gdb_agent_get_raw_reg): Declare.
555
556 2015-02-27 Tom Tromey <tromey@redhat.com>
557 Pedro Alves <palves@redhat.com>
558
559 Rename symbols whose names are reserved C++ keywords throughout.
560
561 2015-02-27 Pedro Alves <palves@redhat.com>
562
563 * Makefile.in (COMPILER): New, get it from autoconf.
564 (CXX): Get from autoconf instead.
565 (COMPILE.pre): Use COMPILER.
566 (CC-LD): Rename to ...
567 (CC_LD): ... this. Use COMPILER.
568 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
569 (CXX_FOR_TARGET): Default to g++ instead of gcc.
570 * acinclude.m4: Include build-with-cxx.m4.
571 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
572 Disable -Werror by default if building in C++ mode.
573 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
574 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
575 the C++ compiler. Save/restore CXXFLAGS too.
576 * configure: Regenerate.
577
578 2015-02-27 Pedro Alves <palves@redhat.com>
579
580 * acinclude.m4: Include libiberty.m4.
581 * configure.ac: Call libiberty_INIT.
582 * config.in, configure: Regenerate.
583
584 2015-02-26 Pedro Alves <palves@redhat.com>
585
586 * linux-low.c (linux_wait_1): When incrementing the PC past a
587 program breakpoint always use the_low_target.breakpoint_len as
588 increment, rather than the maximum between that and
589 the_low_target.decr_pc_after_break.
590
591 2015-02-23 Pedro Alves <palves@redhat.com>
592
593 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
594 thread was doing a step-over; always adjust the PC if
595 we stepped over a permanent breakpoint.
596 (linux_wait_1): If we stepped over breakpoint that was on top of a
597 permanent breakpoint, manually advance the PC past it.
598
599 2015-02-23 Pedro Alves <palves@redhat.com>
600
601 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
602 modes.
603 (x86_fill_gregset, x86_store_gregset): Use it when handling
604 $orig_eax.
605
606 2015-02-20 Pedro Alves <palves@redhat.com>
607
608 * thread-db.c: Include "nat/linux-procfs.h".
609 (thread_db_init): Skip listing new threads if the kernel supports
610 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
611
612 2015-02-20 Pedro Alves <palves@redhat.com>
613
614 * linux-low.c (status_pending_p_callback): Use ptid_match.
615
616 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
617
618 PR breakpoints/16812
619 * linux-low.c (wstatus_maybe_breakpoint): Remove.
620 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
621 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
622
623 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
624
625 PR breakpoints/15956
626 * tracepoint.c (cmd_qtinit): Add check for current_thread.
627
628 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
629
630 * linux-low.c (linux_low_btrace_conf): Print size.
631 * server.c (handle_btrace_conf_general_set): New.
632 (hanle_general_set): Call handle_btrace_conf_general_set.
633 (handle_query): Report Qbtrace-conf:bts:size as supported.
634
635 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
636
637 * linux-low.c (linux_low_enable_btrace): Update parameters.
638 (linux_low_btrace_conf): New.
639 (linux_target_ops)<to_btrace_conf>: Initialize.
640 * server.c (current_btrace_conf): New.
641 (handle_btrace_enable): Rename to ...
642 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
643 to target_enable_btrace. Update comment. Update users.
644 (handle_qxfer_btrace_conf): New.
645 (qxfer_packets): Add btrace-conf entry.
646 (handle_query): Report qXfer:btrace-conf:read as supported packet.
647 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
648 (target_ops)<read_btrace_conf>: New.
649 (target_enable_btrace): Update parameters.
650 (target_read_btrace_conf): New.
651
652 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
653
654 * server.c (handle_btrace_general_set): Remove call to
655 target_supports_btrace.
656 (supported_btrace_packets): New.
657 (handle_query): Call supported_btrace_packets.
658 * target.h: include btrace-common.h.
659 (btrace_target_info): Removed.
660 (supports_btrace, target_supports_btrace): Update parameters.
661
662 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
663
664 * Makefile.in (SFILES): Add common/btrace-common.c.
665 (OBS): Add common/btrace-common.o.
666 (btrace-common.o): Add build rules.
667 * linux-low: Include btrace-common.h.
668 (linux_low_read_btrace): Use struct btrace_data. Call
669 btrace_data_init and btrace_data_fini.
670
671 2015-02-06 Pedro Alves <palves@redhat.com>
672
673 * thread-db.c (find_new_threads_callback): Add debug output.
674
675 2015-02-04 Pedro Alves <palves@redhat.com>
676
677 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
678 (resume_stopped_resumed_lwps): New function.
679 (linux_wait_for_event_filtered): Use it.
680
681 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
682
683 * Makefile.in (SFILES): Add linux-personality.c.
684 (linux-personality.o): New rule.
685 * configure.srv (srv_linux_obj): Add linux-personality.o to the
686 list of objects to be built.
687 * linux-low.c: Include nat/linux-personality.h.
688 (linux_create_inferior): Remove code to disable address space
689 randomization (moved to ../nat/linux-personality.c). Create
690 cleanup to disable address space randomization.
691
692 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
693
694 * Makefile.in (posix-strerror.o): New rule.
695 (mingw-strerror.o): Likewise.
696 * configure: Regenerated.
697 * configure.ac: Source file ../common/common.host. Initialize new
698 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
699
700 2015-01-14 Yao Qi <yao@codesourcery.com>
701
702 * Makefile.in (SFILES): Add nat/ppc-linux.c.
703 (ppc-linux.o): New rule.
704 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
705 * configure.ac: AC_CHECK_FUNCS(getauxval).
706 * config.in: Re-generated.
707 * configure: Re-generated.
708 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
709 ppc64_64bit_inferior_p
710
711 2015-01-14 Yao Qi <yao@codesourcery.com>
712
713 * linux-ppc-low.c: Include "nat/ppc-linux.h".
714 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
715 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
716 (PT_ORIG_R3, PT_TRAP): Likewise.
717 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
718 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
719 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
720
721 2015-01-10 Joel Brobecker <brobecker@adacore.com>
722
723 * i387-fp.c (i387_cache_to_xsave): In look over
724 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
725 zmmh_low_space field by use of zmmh_high_space.
726
727 2015-01-09 Pedro Alves <palves@redhat.com>
728
729 * linux-low.c (step_over_bkpt): Move higher up in the file.
730 (handle_extended_wait): Don't store the stop_pc here.
731 (get_stop_pc): Adjust comments and rename to ...
732 (check_stopped_by_breakpoint): ... this. Record whether the LWP
733 stopped for a software breakpoint or hardware breakpoint.
734 (thread_still_has_status_pending_p): New function.
735 (status_pending_p_callback): Use
736 thread_still_has_status_pending_p. If the event is no longer
737 interesting, resume the LWP.
738 (handle_tracepoints): Add assert.
739 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
740 (wstatus_maybe_breakpoint): New function.
741 (cancel_breakpoint): Delete function.
742 (check_stopped_by_watchpoint): New function, factored out from
743 linux_low_filter_event.
744 (lp_status_maybe_breakpoint): Delete function.
745 (linux_low_filter_event): Remove filter_ptid argument.
746 Leave thread group exits pending here. Store the LWP's stop PC.
747 Always leave events pending.
748 (linux_wait_for_event_filtered): Pull all events out of the
749 kernel, and leave them all pending.
750 (count_events_callback, select_event_lwp_callback): Consider all
751 events.
752 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
753 (select_event_lwp): Only give preference to the stepping LWP in
754 all-stop mode. Adjust comments.
755 (ignore_event): New function.
756 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
757 references to cancel_breakpoints. Adjust to renames. Also give
758 equal priority to all LWPs that have had events in non-stop mode.
759 If reporting a software breakpoint event, unadjust the LWP's PC.
760 (linux_wait): If linux_wait_1 returned an ignored event, retry.
761 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
762 Adjust.
763 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
764 (resume_status_pending_p): Use thread_still_has_status_pending_p.
765 (linux_stopped_by_watchpoint): Adjust.
766 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
767 * linux-low.h (enum lwp_stop_reason): New.
768 (struct lwp_info) <stop_pc>: Adjust comment.
769 <stopped_by_watchpoint>: Delete field.
770 <stop_reason>: New field.
771 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
772 * mem-break.c (software_breakpoint_inserted_here)
773 (hardware_breakpoint_inserted_here): New function.
774 * mem-break.h (software_breakpoint_inserted_here)
775 (hardware_breakpoint_inserted_here): Declare.
776 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
777 (cancel_breakpoints): Delete.
778 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
779 (upload_fast_traceframes): Remove references to
780 cancel_breakpoints.
781
782 2015-01-09 Pedro Alves <palves@redhat.com>
783
784 * thread-db.c (find_new_threads_callback): Ignore thread if the
785 kernel thread ID is -1.
786
787 2015-01-09 Pedro Alves <palves@redhat.com>
788
789 * linux-low.c (linux_attach_fail_reason_string): Move to
790 nat/linux-ptrace.c, and rename.
791 (linux_attach_lwp): Update comment.
792 (attach_proc_task_lwp_callback): New function.
793 (linux_attach): Adjust to rename and use
794 linux_proc_attach_tgid_threads.
795 (linux_attach_fail_reason_string): Delete declaration.
796
797 2015-01-01 Joel Brobecker <brobecker@adacore.com>
798
799 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
800 * server.c (gdbserver_version): Likewise.
801
802 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
803
804 * remote-utils.c: Include ctype.h.
805 (input_interrupt): Explicitly handle the case when the char
806 received is the NUL byte. Improve the printing of non-ASCII
807 characters.
808
809 2014-12-16 Joel Brobecker <brobecker@adacore.com>
810
811 * linux-low.c (linux_low_filter_event): Update call to
812 linux_enable_event_reporting following the addition of
813 a new parameter to that function.
814
815 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
816
817 PR server/17457
818 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
819 (AARCH64_FPCR_REGNO): Likewise.
820 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
821 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
822 (aarch64_store_fpregset): Likewise.
823
824 2014-12-15 Joel Brobecker <brobecker@adacore.com>
825
826 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
827 Remove FIXME comment about assumption about N.
828
829 2014-12-13 Joel Brobecker <brobecker@adacore.com>
830
831 * configure.ac: If large-file support is disabled in GDBserver,
832 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
833 * configure: Regenerate.
834
835 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
836
837 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
838 warning upon ENODATA from ptrace.
839 * linux-s390-low.c (s390_store_tdb): New.
840 (s390_regsets): Add regset for NT_S390_TDB.
841
842 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
843
844 * linux-low.c (regsets_store_inferior_registers): Skip regsets
845 without a fill_function.
846 * linux-s390-low.c (s390_fill_last_break): Remove.
847 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
848 (s390_arch_setup): Use regset's size instead of fill_function for
849 loop end condition.
850
851 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
852
853 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
854 the regset's store function when ptrace returned an error.
855 * regcache.c (get_thread_regcache): Invalidate register cache
856 before fetching inferior's registers.
857
858 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
859
860 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
861 while-loop as for-loop.
862 (regsets_store_inferior_registers): Likewise.
863
864 2014-11-28 Yao Qi <yao@codesourcery.com>
865
866 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
867 * config.in, configure: Re-generate.
868 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
869 is defined.
870
871 2014-11-21 Yao Qi <yao@codesourcery.com>
872
873 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
874 (AC_CHECK_HEADERS): Remove malloc.h.
875 * configure: Re-generated.
876 * config.in: Re-generated.
877 * server.h: Don't include alloca.h and malloc.h.
878 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
879 Don't include malloc.h.
880
881 2014-11-17 Joel Brobecker <brobecker@adacore.com>
882
883 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
884 corresponding ERRNO check in same block.
885
886 2014-11-12 Pedro Alves <palves@redhat.com>
887
888 * server.c (cont_thread): Update comment.
889 (start_inferior, attach_inferior): No longer clear cont_thread.
890 (handle_v_cont): No longer set cont_thread.
891 (captured_main): Clear cont_thread each time a GDB connects.
892
893 2014-11-12 Pedro Alves <palves@redhat.com>
894
895 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
896 thread, and don't resume all threads if the Hc thread has exited.
897
898 2014-11-12 Pedro Alves <palves@redhat.com>
899
900 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
901 the process group instead of to a specific LWP.
902
903 2014-10-15 Pedro Alves <palves@redhat.com>
904
905 PR server/17487
906 * win32-arm-low.c (arm_set_thread_context): Remove current_event
907 parameter.
908 (arm_set_thread_context): Delete.
909 (the_low_target): Adjust.
910 * win32-i386-low.c (debug_registers_changed)
911 (debug_registers_used): Delete.
912 (update_debug_registers_callback): New function.
913 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
914 needing to update their debug registers.
915 (win32_get_current_dr): New function.
916 (x86_dr_low_get_addr, x86_dr_low_get_control)
917 (x86_dr_low_get_status): Fetch the debug register from the thread
918 record's context.
919 (i386_initial_stuff): Adjust.
920 (i386_get_thread_context): Remove current_event parameter. Don't
921 clear debug_registers_changed nor copy DR values to
922 debug_reg_state.
923 (i386_set_thread_context): Delete.
924 (i386_prepare_to_resume): New function.
925 (i386_thread_added): Mark the thread as needing to update irs
926 debug registers.
927 (the_low_target): Remove i386_set_thread_context and install
928 i386_prepare_to_resume.
929 * win32-low.c (win32_get_thread_context): Adjust.
930 (win32_set_thread_context): Use SetThreadContext
931 directly.
932 (win32_prepare_to_resume): New function.
933 (win32_require_context): New function, factored out from ...
934 (thread_rec): ... this.
935 (continue_one_thread): Call win32_prepare_to_resume on each thread
936 we're about to continue.
937 (win32_resume): Call win32_prepare_to_resume on the event thread.
938 * win32-low.h (struct win32_thread_info)
939 <debug_registers_changed>: New field.
940 (struct win32_target_ops): Change prototype of set_thread_context,
941 delete set_thread_context and add prepare_to_resume.
942 (win32_require_context): New declaration.
943
944 2014-10-08 Gary Benson <gbenson@redhat.com>
945
946 * server.h: Do not include common-exceptions.h.
947
948 2014-10-08 Gary Benson <gbenson@redhat.com>
949
950 * server.h: Do not include cleanups.h.
951
952 2014-09-30 James Hogan <james.hogan@imgtec.com>
953
954 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
955 mips64-dsp-linux.c.
956
957 2014-09-23 Yao Qi <yao@codesourcery.com>
958
959 * linux-low.c (lp_status_maybe_breakpoint): New function.
960 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
961 (count_events_callback): Likewise.
962 (select_event_lwp_callback): Likewise.
963 (cancel_breakpoints_callback): Likewise.
964
965 2014-09-19 Don Breazeal <donb@codesourcery.com>
966
967 * linux-low.c (handle_extended_wait): Call
968 linux_ptrace_get_extended_event.
969 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
970 linux_is_extended_waitstatus.
971
972 2014-09-16 Joel Brobecker <brobecker@adacore.com>
973
974 * Makefile.in (CPPFLAGS): Define.
975 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
976 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
977
978 2014-09-16 Gary Benson <gbenson@redhat.com>
979
980 * inferiors.h (current_inferior): Renamed as...
981 (current_thread): New variable. All uses updated.
982 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
983 (maybe_move_out_of_jump_pad): Likewise.
984 (cancel_breakpoint): Likewise.
985 (linux_low_filter_event): Likewise.
986 (wait_for_sigstop): Likewise.
987 (linux_resume_one_lwp): Likewise.
988 (need_step_over_p): Likewise.
989 (start_step_over): Likewise.
990 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
991 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
992 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
993 and save_inferior as saved_thread.
994 * regcache.c (get_thread_regcache): Renamed saved_inferior as
995 saved_thread.
996 (regcache_invalidate_thread): Likewise.
997 * remote-utils.c (prepare_resume_reply): Likewise.
998 * thread-db.c (thread_db_get_tls_address): Likewise.
999 (disable_thread_event_reporting): Likewise.
1000 (remove_thread_event_breakpoints): Likewise.
1001 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1002 as saved_thread.
1003 * target.h (set_desired_inferior): Renamed as...
1004 (set_desired_thread): New declaration. All uses updated.
1005 * server.c (myresume): Updated comment to reference thread instead
1006 of inferior.
1007 (handle_serial_event): Likewise.
1008 (handle_target_event): Likewise.
1009
1010 2014-09-12 Tom Tromey <tromey@redhat.com>
1011 Gary Benson <gbenson@redhat.com>
1012
1013 * regcache.h: Include common-regcache.h.
1014 (regcache_read_pc): Don't declare.
1015 * regcache.c (get_thread_regcache_for_ptid): New function.
1016
1017 2014-09-11 Tom Tromey <tromey@redhat.com>
1018 Gary Benson <gbenson@redhat.com>
1019
1020 * symbol.c: New file.
1021 * Makefile.in (SFILES): Add symbol.c.
1022 (OBS): Add symbol.o.
1023
1024 2014-09-11 Gary Benson <gbenson@redhat.com>
1025
1026 * target.c (target_stop_ptid, target_continue_ptid): New
1027 functions.
1028
1029 2014-09-11 Tom Tromey <tromey@redhat.com>
1030 Gary Benson <gbenson@redhat.com>
1031
1032 * target.h: Include target/target.h.
1033 * target.c (target_read_memory, target_read_uint32)
1034 (target_write_memory): New functions.
1035
1036 2014-09-11 Gary Benson <gbenson@redhat.com>
1037
1038 * server.h (debug_hw_points): Don't declare.
1039 * server.c (debug_hw_points): Don't define. Replace all uses
1040 with show_debug_regs.
1041 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1042 all uses with show_debug_regs.
1043
1044 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1045
1046 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1047 endianness into account.
1048 (ppc_supply_ptrace_register): Likewise.
1049
1050 2014-09-03 James Hogan <james.hogan@imgtec.com>
1051
1052 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1053 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1054
1055 2014-09-03 Gary Benson <gbenson@redhat.com>
1056
1057 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1058 ALL_DEBUG_ADDRESS_REGISTERS.
1059
1060 2014-09-02 Gary Benson <gbenson@redhat.com>
1061
1062 * i386-low.h: Renamed as...
1063 * x86-low.h: New file. All type, function and variable name
1064 prefixes changed from "i386_" to "x86_". All references updated.
1065 * i386-low.c: Renamed as...
1066 * x86-low.c: New file. All type, function and variable name
1067 prefixes changed from "i386_" to "x86_". All references updated.
1068
1069 2014-09-02 Gary Benson <gbenson@redhat.com>
1070
1071 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1072 (x86_linux_new_thread): Likewise.
1073
1074 2014-08-29 Gary Benson <gbenson@redhat.com>
1075
1076 * server.h (setjmp.h): Do not include.
1077 (toplevel): Do not declare.
1078 (common-exceptions.h): Include.
1079 (cleanups.h): Likewise.
1080 * server.c (toplevel): Do not define.
1081 (exit_code): New static global.
1082 (detach_or_kill_for_exit_cleanup): New function.
1083 (main): New function. Original main renamed to...
1084 (captured_main): New function.
1085 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1086
1087 2014-08-29 Gary Benson <gbenson@redhat.com>
1088
1089 * Makefile.in (SFILES): Add common/common-exceptions.c.
1090 (OBS): Add common-exceptions.o.
1091 (common-exceptions.o): New rule.
1092 * utils.c (prepare_to_throw_exception): New function.
1093
1094 2014-08-29 Gary Benson <gbenson@redhat.com>
1095
1096 * config.in: Regenerate.
1097 * configure: Likewise.
1098
1099 2014-08-29 Gary Benson <gbenson@redhat.com>
1100
1101 * Makefile.in (SFILES): Add common/cleanups.c.
1102 (OBS): cleanups.o.
1103 (cleanups.o): New rule.
1104
1105 2014-08-29 Gary Benson <gbenson@redhat.com>
1106
1107 * utils.c (internal_vwarning): New function.
1108
1109 2014-08-28 Gary Benson <gbenson@redhat.com>
1110
1111 * utils.h (fatal): Remove declaration.
1112 * utils.c (fatal): Remove function.
1113
1114 2014-08-28 Gary Benson <gbenson@redhat.com>
1115
1116 * tracepoint.c (gdb_agent_init): Replace fatal with
1117 perror_with_name.
1118 (initialize_tracepoint): Likewise.
1119
1120 2014-08-28 Gary Benson <gbenson@redhat.com>
1121
1122 * remote-utils.c (remote_prepare): Replace fatal with error.
1123
1124 2014-08-28 Gary Benson <gbenson@redhat.com>
1125
1126 * linux-low.c (linux_async): Replace fatal with warning.
1127 Tidy up and return.
1128 (linux_start_non_stop): Return -1 if linux_async failed.
1129
1130 2014-08-28 Gary Benson <gbenson@redhat.com>
1131
1132 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1133 gdb_assert.
1134 (i386_dr_low_get_addr): Remove vague comment.
1135 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1136 gdb_assert.
1137
1138 2014-08-28 Gary Benson <gbenson@redhat.com>
1139
1140 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1141 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1142 internal_error.
1143 (linux_resume_one_lwp): Likewise.
1144 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1145 gdb_assert.
1146 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1147 with internal_error.
1148 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1149 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1150 (find_register_by_name): Replace fatal with internal_error.
1151 (find_regno): Likewise.
1152 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1153 * thread-db.c (thread_db_create_event): Likewise.
1154 (thread_db_load_search): Likewise.
1155 (try_thread_db_load_1): Likewise.
1156 * tracepoint.c (get_jump_space_head): Replace fatal with
1157 internal_error.
1158 (claim_trampoline_space): Likewise.
1159 (have_fast_tracepoint_trampoline_buffer): Likewise.
1160 (cmd_qtstart): Likewise.
1161 (stop_tracing): Likewise.
1162 (fast_tracepoint_collecting): Likewise.
1163 (target_malloc): Likewise.
1164 (download_tracepoint): Likewise.
1165 (download_trace_state_variables): Replace check with gdb_assert.
1166 (upload_fast_traceframes): Replace fatal with internal_error.
1167
1168 2014-08-19 Tom Tromey <tromey@redhat.com>
1169 Gary Benson <gbenson@redhat.com>
1170
1171 * Makefile.in (SFILES): Add common/common-debug.c.
1172 (OBS): Add common-debug.o.
1173 (common-debug.o): New rule.
1174 * debug.h (debug_printf): Don't declare.
1175 * debug.c (debug_printf): Renamed and rewritten as...
1176 (debug_vprintf): New function.
1177
1178 2014-08-19 Gary Benson <gbenson@redhat.com>
1179
1180 * utils.h: Do not include print-utils.h.
1181
1182 2014-08-19 Tom Tromey <tromey@redhat.com>
1183 Gary Benson <gbenson@redhat.com>
1184
1185 * server.h: Add static assertion.
1186 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1187
1188 2014-08-19 Tom Tromey <tromey@redhat.com>
1189 Gary Benson <gbenson@redhat.com>
1190
1191 * Makefile.in (SFILES): Add common/errors.c.
1192 (OBS): Add errors.o.
1193 (IPA_OBS): Add errors-ipa.o.
1194 (errors.o): New rule.
1195 (errors-ipa.o): Likewise.
1196 * utils.h (perror_with_name, error, warning): Don't declare.
1197 * utils.c (warning): Renamed and rewritten as...
1198 (vwarning): New function.
1199 (error): Renamed and rewritten as...
1200 (verror): New function.
1201 (internal_error): Renamed and rewritten as...
1202 (internal_verror): New function.
1203
1204 2014-08-07 Gary Benson <gbenson@redhat.com>
1205
1206 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1207 * configure: Regenerate.
1208 * config.in: Likewise.
1209 * server.h: Do not include errno.h.
1210 * event-loop.c: Likewise.
1211 * hostio-errno.c: Likewise.
1212 * linux-low.c: Likewise.
1213 * remote-utils.c: Likewise.
1214 * spu-low.c: Likewise.
1215 * utils.c: Likewise.
1216 * gdbreplay.c: Unconditionally include errno.h.
1217
1218 2014-08-07 Gary Benson <gbenson@redhat.com>
1219
1220 * server.h: Do not include string.h.
1221 * event-loop.c: Likewise.
1222 * linux-low.c: Likewise.
1223 * regcache.c: Likewise.
1224 * remote-utils.c: Likewise.
1225 * spu-low.c: Likewise.
1226 * utils.c: Likewise.
1227
1228 2014-08-07 Gary Benson <gbenson@redhat.com>
1229
1230 * server.h: Do not include gdb_assert.h.
1231
1232 2014-08-07 Gary Benson <gbenson@redhat.com>
1233
1234 * server.h: Do not include common-utils.h.
1235
1236 2014-08-07 Gary Benson <gbenson@redhat.com>
1237
1238 * server.h: Do not include ptid.h.
1239 * notif.h: Likewise.
1240
1241 2014-08-07 Gary Benson <gbenson@redhat.com>
1242
1243 * server.h: Do not include gdb_locale.h.
1244
1245 2014-08-07 Gary Benson <gbenson@redhat.com>
1246
1247 * server.h: Do not include gdb/signals.h.
1248 * win32-low.c: Likewise.
1249
1250 2014-08-07 Gary Benson <gbenson@redhat.com>
1251
1252 * server.h: Do not include pathmax.h.
1253
1254 2014-08-07 Gary Benson <gbenson@redhat.com>
1255
1256 * server.h: Do not include libiberty.h.
1257 * linux-bfin-low.c: Likewise.
1258
1259 2014-08-07 Gary Benson <gbenson@redhat.com>
1260
1261 * server.h: Do not include ansidecl.h.
1262
1263 2014-08-07 Gary Benson <gbenson@redhat.com>
1264
1265 * linux-x86-low.c: Do not include stddef.h.
1266 * lynx-ppc-low.c: Likewise.
1267 * tracepoint.c: Likewise.
1268
1269 2014-08-07 Gary Benson <gbenson@redhat.com>
1270
1271 * server.h: Do not include stdarg.h.
1272 * nto-low.c: Likewise.
1273
1274 2014-08-07 Gary Benson <gbenson@redhat.com>
1275
1276 * server.h: Do not include stdlib.h.
1277 * inferiors.c: Likewise.
1278 * linux-low.c: Likewise.
1279 * regcache.c: Likewise.
1280 * spu-low.c: Likewise.
1281 * tracepoint.c: Likewise.
1282 * utils.c: Likewise.
1283
1284 2014-08-07 Gary Benson <gbenson@redhat.com>
1285
1286 * server.h: Do not include stdio.h.
1287 * linux-low.c: Likewise.
1288 * remote-utils.c: Likewise.
1289 * spu-low.c: Likewise.
1290 * utils.c: Likewise.
1291 * wincecompat.c: Likewise.
1292
1293 2014-08-06 Gary Benson <gbenson@redhat.com>
1294
1295 * regcache.c (init_register_cache): Move conditionals inside if.
1296
1297 2014-08-06 Gary Benson <gbenson@redhat.com>
1298
1299 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1300
1301 2014-07-31 Gary Benson <gbenson@redhat.com>
1302
1303 * ax.h: Do not include server.h.
1304 * gdbthread.h: Likewise.
1305 * lynx-low.h: Likewise.
1306 * notif.h: Likewise.
1307
1308 2014-07-30 Gary Benson <gbenson@redhat.com>
1309
1310 * server.h: Include common-defs.h.
1311 Do not include config.h or build-gnulib-gdbserver/config.h.
1312
1313 2014-07-30 Gary Benson <gbenson@redhat.com>
1314
1315 * hostio-errno.c: Move server.h to top of includes list.
1316 * inferiors.c: Likewise.
1317 * linux-x86-low.c: Likewise.
1318 * notif.c: Include server.h.
1319
1320 2014-07-24 Tom Tromey <tromey@redhat.com>
1321 Gary Benson <gbenson@redhat.com>
1322
1323 * server.h (CORE_ADDR): Now unsigned.
1324
1325 2014-07-16 Pedro Alves <palves@redhat.com>
1326
1327 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1328
1329 2014-07-15 Pedro Alves <palves@redhat.com>
1330
1331 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1332 copy.
1333
1334 2014-07-11 Pedro Alves <palves@redhat.com>
1335
1336 * linux-low.c (kill_wait_lwp): New function, based on
1337 kill_one_lwp_callback, but use my_waitpid directly.
1338 (kill_one_lwp_callback, linux_kill): Use it.
1339
1340 2014-06-23 Pedro Alves <palves@redhat.com>
1341
1342 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1343 before setting DR0..DR3.
1344
1345 2014-06-20 Gary Benson <gbenson@redhat.com>
1346
1347 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1348 * configure: Regenerated.
1349 * config.in: Likewise.
1350
1351 2014-06-20 Gary Benson <gbenson@redhat.com>
1352
1353 * Makefile.in (SFILES): Update locations for files moved
1354 from common to nat.
1355 (object file files): Reordered.
1356
1357 2014-06-20 Gary Benson <gbenson@redhat.com>
1358
1359 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1360 (i386_dr_low_set_addr): Likewise.
1361 (i386_dr_low_get_addr): Likewise.
1362 (i386_dr_low_can_set_control): Likewise.
1363 (i386_dr_low_set_control): Likewise.
1364 (i386_dr_low_get_control): Likewise.
1365 (i386_dr_low_get_status): Likewise.
1366 (i386_get_debug_register_length): Likewise.
1367 * linux-x86-low.c (i386_dr_low_set_addr):
1368 Changed signature. Made static.
1369 (i386_dr_low_get_addr): Likewise.
1370 (i386_dr_low_set_control): Likewise.
1371 (i386_dr_low_get_control): Likewise.
1372 (i386_dr_low_get_status): Likewise.
1373 (i386_dr_low): New global variable.
1374 * win32-i386-low.c (i386_dr_low_set_addr):
1375 Changed signature. Made static.
1376 (i386_dr_low_get_addr): Likewise.
1377 (i386_dr_low_set_control): Likewise.
1378 (i386_dr_low_get_control): Likewise.
1379 (i386_dr_low_get_status): Likewise.
1380 (i386_dr_low): New global variable.
1381
1382 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1383
1384 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1385 * Makefile.in (AR, AR_FLAGS): Define.
1386 * configure: Regenerate.
1387
1388 2014-06-19 Gary Benson <gbenson@redhat.com>
1389
1390 * Makefile.in (i386-dregs.o): New rule.
1391 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1392 * i386-low.c (target.h): Remove include.
1393 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1394 (DR_CONTROL_SHIFT): Likewise.
1395 (DR_CONTROL_SIZE): Likewise.
1396 (DR_RW_EXECUTE): Likewise.
1397 (DR_RW_WRITE): Likewise.
1398 (DR_RW_READ): Likewise.
1399 (DR_RW_IORW): Likewise.
1400 (DR_LEN_1): Likewise.
1401 (DR_LEN_2): Likewise.
1402 (DR_LEN_4): Likewise.
1403 (DR_LEN_8): Likewise.
1404 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1405 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1406 (DR_ENABLE_SIZE): Likewise.
1407 (DR_LOCAL_SLOWDOWN): Likewise.
1408 (DR_GLOBAL_SLOWDOWN): Likewise.
1409 (DR_CONTROL_RESERVED): Likewise.
1410 (I386_DR_CONTROL_MASK): Likewise.
1411 (I386_DR_VACANT): Likewise.
1412 (I386_DR_LOCAL_ENABLE): Likewise.
1413 (I386_DR_GLOBAL_ENABLE): Likewise.
1414 (I386_DR_DISABLE): Likewise.
1415 (I386_DR_SET_RW_LEN): Likewise.
1416 (I386_DR_GET_RW_LEN): Likewise.
1417 (I386_DR_WATCH_HIT): Likewise.
1418 (i386_wp_op_t): Likewise.
1419 (i386_show_dr): Likewise.
1420 (i386_length_and_rw_bits): Likewise.
1421 (i386_insert_aligned_watchpoint): Likewise.
1422 (i386_remove_aligned_watchpoint): Likewise.
1423 (i386_handle_nonaligned_watchpoint): Likewise.
1424 i386_update_inferior_debug_regs(): Likewise.
1425 (i386_dr_insert_watchpoint): Likewise.
1426 (i386_dr_remove_watchpoint): Likewise.
1427 (i386_dr_region_ok_for_watchpoint): Likewise.
1428 (i386_dr_stopped_data_address): Likewise.
1429 (i386_dr_stopped_by_watchpoint): Likewise.
1430
1431 2014-06-19 Gary Benson <gbenson@redhat.com>
1432
1433 * i386-low.c (i386_dr_show): Renamed to
1434 i386_show_dr and made static. All uses updated.
1435 (i386_dr_length_and_rw_bits): Renamed to
1436 i386_length_and_rw_bits and made static.
1437 All uses updated.
1438 (i386_dr_insert_aligned_watchpoint): Renamed to
1439 i386_insert_aligned_watchpoint and made static.
1440 All uses updated.
1441 (i386_dr_remove_aligned_watchpoint): Renamed to
1442 i386_remove_aligned_watchpoint and made static.
1443 All uses updated.
1444 (i386_dr_update_inferior_debug_regs): Renamed to
1445 i386_update_inferior_debug_regs and made static.
1446 All uses updated.
1447
1448 2014-06-18 Gary Benson <gbenson@redhat.com>
1449
1450 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1451 (i386_dr_low_can_set_control): Likewise.
1452 (i386_get_debug_register_length): Likewise.
1453 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1454 (i386_dr_low_can_set_control): Likewise.
1455 (i386_get_debug_register_length): Likewise.
1456
1457 2014-06-17 Gary Benson <gbenson@redhat.com>
1458
1459 * i386-low.h (i386-dregs.h): New include.
1460 (DR_FIRSTADDR): Now in i386-dregs.h.
1461 (DR_LASTADDR): Likewise.
1462 (DR_NADDR): Likewise.
1463 (DR_STATUS): Likewise.
1464 (DR_CONTROL): Likewise.
1465 (i386_debug_reg_state): Likewise.
1466 (i386_dr_insert_watchpoint): Likewise.
1467 (i386_dr_remove_watchpoint): Likewise.
1468 (i386_dr_region_ok_for_watchpoint): Likewise.
1469 (i386_dr_stopped_data_address): Likewise.
1470 (i386_dr_stopped_by_watchpoint): Likewise.
1471 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1472
1473 2014-06-18 Gary Benson <gbenson@redhat.com>
1474
1475 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1476 i386_dr_insert_watchpoint.
1477 (i386_low_remove_watchpoint): Renamed to
1478 i386_dr_remove_watchpoint.
1479 (i386_low_region_ok_for_watchpoint): Renamed to
1480 i386_dr_region_ok_for_watchpoint.
1481 (i386_low_stopped_data_address): Renamed to
1482 i386_dr_stopped_data_address.
1483 (i386_low_stopped_by_watchpoint): Renamed to
1484 i386_dr_stopped_by_watchpoint.
1485 * i386-low.c (i386_show_dr): Renamed to
1486 i386_dr_show and made nonstatic. All uses updated.
1487 (i386_length_and_rw_bits): Renamed to
1488 i386_dr_length_and_rw_bits and made nonstatic.
1489 All uses updated.
1490 (i386_insert_aligned_watchpoint): Renamed to
1491 i386_dr_insert_aligned_watchpoint and made nonstatic.
1492 All uses updated.
1493 (i386_remove_aligned_watchpoint): Renamed to
1494 i386_dr_remove_aligned_watchpoint and made nonstatic.
1495 All uses updated.
1496 (i386_update_inferior_debug_regs): Renamed to
1497 i386_dr_update_inferior_debug_regs and made nonstatic.
1498 All uses updated.
1499 (i386_low_insert_watchpoint): Renamed to
1500 i386_dr_insert_watchpoint. All uses updated.
1501 (i386_low_remove_watchpoint): Renamed to
1502 i386_dr_remove_watchpoint. All uses updated.
1503 (i386_low_region_ok_for_watchpoint): Renamed to
1504 i386_dr_region_ok_for_watchpoint. All uses updated.
1505 (i386_low_stopped_data_address): Renamed to
1506 i386_dr_stopped_data_address. All uses updated.
1507 (i386_low_stopped_by_watchpoint): Renamed to
1508 i386_dr_stopped_by_watchpoint. All uses updated.
1509
1510 2014-06-18 Gary Benson <gbenson@redhat.com>
1511
1512 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1513 (i386_dr_low_can_set_control): Likewise.
1514 (i386_insert_aligned_watchpoint): New check.
1515
1516 2014-06-18 Gary Benson <gbenson@redhat.com>
1517
1518 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1519 Renamed to state.
1520
1521 2014-06-18 Gary Benson <gbenson@redhat.com>
1522
1523 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1524 instead of fatal and error.
1525 (i386_handle_nonaligned_watchpoint): Likewise.
1526
1527 2014-06-18 Gary Benson <gbenson@redhat.com>
1528
1529 * i386-low.c (i386_get_debug_register_length): New macro.
1530 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1531 (i386_show_dr): Use debug_printf instead of fprintf. Use
1532 phex to format values.
1533
1534 2014-06-18 Gary Benson <gbenson@redhat.com>
1535
1536 * i386-low.h: Comment changes.
1537 * i386-low.c: Likewise.
1538
1539 2014-06-18 Gary Benson <gbenson@redhat.com>
1540
1541 * i386-low.c: Whitespace changes.
1542
1543 2014-06-12 Tom Tromey <tromey@redhat.com>
1544
1545 * utils.c (freeargv): Remove.
1546
1547 2014-06-12 Tom Tromey <tromey@redhat.com>
1548
1549 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1550 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1551 (parse_debug_format_options): Likewise.
1552 (gdbserver_usage): Likewise.
1553 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1554 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1555 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1556 against libiberty.
1557 ($(LIBGNU)): Depend on libiberty.
1558 (all-lib): Recurse into all subdirs.
1559 (install-only): Invoke "install" target in subdirs.
1560 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1561 targets.
1562 * configure: Rebuild.
1563 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1564 for vasprintf, vsnprintf, or gettimeofday.
1565 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1566 srv_tgtobj.
1567
1568 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1569
1570 * development.sh: Delete.
1571 * Makefile.in (config.status): Adjust dependency on development.sh.
1572 * configure.ac: Adjust development.sh source call.
1573 * configure: Regenerate.
1574
1575 2014-06-02 Pedro Alves <palves@redhat.com>
1576
1577 * ax.c (gdb_free_agent_expr): New function.
1578 * ax.h (gdb_free_agent_expr): New declaration.
1579 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1580 list.
1581 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1582 static.
1583 (clear_breakpoint_conditions_and_commands): New function.
1584 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1585 (clear_breakpoint_conditions_and_commands): New declaration.
1586
1587 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1588
1589 * linux-aarch64-low.c (asm/ptrace.h): Include.
1590
1591 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1592
1593 Fix TLS access for -static -pthread.
1594 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1595 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1596 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1597
1598 2014-05-20 Pedro Alves <palves@redhat.com>
1599
1600 * linux-aarch64-low.c (aarch64_insert_point)
1601 (aarch64_remove_point): No longer check whether the type is
1602 supported here. Adjust to new interface.
1603 (the_low_target): Install aarch64_supports_z_point_type as
1604 supports_z_point_type method.
1605 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1606 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1607 instead of a Z packet char. Adjust.
1608 (arm_supports_z_point_type): New function.
1609 (arm_insert_point, arm_remove_point): Adjust to new interface.
1610 (the_low_target): Install arm_supports_z_point_type.
1611 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1612 (cris_insert_point, cris_remove_point): Adjust to new interface.
1613 Don't check whether the type is supported here.
1614 (the_low_target): Install cris_supports_z_point_type.
1615 * linux-low.c (linux_supports_z_point_type): New function.
1616 (linux_insert_point, linux_remove_point): Adjust to new interface.
1617 * linux-low.h (struct linux_target_ops) <insert_point,
1618 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1619 raw_breakpoint pointer parameter.
1620 <supports_z_point_type>: New method.
1621 * linux-mips-low.c (mips_supports_z_point_type): New function.
1622 (mips_insert_point, mips_remove_point): Adjust to new interface.
1623 Use mips_supports_z_point_type.
1624 (the_low_target): Install mips_supports_z_point_type.
1625 * linux-ppc-low.c (the_low_target): Install NULL as
1626 supports_z_point_type method.
1627 * linux-s390-low.c (the_low_target): Install NULL as
1628 supports_z_point_type method.
1629 * linux-sparc-low.c (the_low_target): Install NULL as
1630 supports_z_point_type method.
1631 * linux-x86-low.c (x86_supports_z_point_type): New function.
1632 (x86_insert_point): Adjust to new insert_point interface. Use
1633 insert_memory_breakpoint. Adjust to new
1634 i386_low_insert_watchpoint interface.
1635 (x86_remove_point): Adjust to remove_point interface. Use
1636 remove_memory_breakpoint. Adjust to new
1637 i386_low_remove_watchpoint interface.
1638 (the_low_target): Install x86_supports_z_point_type.
1639 * lynx-low.c (lynx_target_ops): Install NULL as
1640 supports_z_point_type callback.
1641 * nto-low.c (nto_supports_z_point_type): New.
1642 (nto_insert_point, nto_remove_point): Adjust to new interface.
1643 (nto_target_ops): Install nto_supports_z_point_type.
1644 * mem-break.c: Adjust intro comment.
1645 (struct raw_breakpoint) <raw_type, size>: New fields.
1646 <inserted>: Update comment.
1647 <shlib_disabled>: Delete field.
1648 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1649 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1650 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1651 (raw_bkpt_type_to_target_hw_bp_type): New function.
1652 (find_enabled_raw_code_breakpoint_at): New function.
1653 (find_raw_breakpoint_at): New type and size parameters. Use them.
1654 (insert_memory_breakpoint): New function, based off
1655 set_raw_breakpoint_at.
1656 (remove_memory_breakpoint): New function.
1657 (set_raw_breakpoint_at): Reimplement.
1658 (set_breakpoint): New, based on set_breakpoint_at.
1659 (set_breakpoint_at): Reimplement.
1660 (delete_raw_breakpoint): Go through the_target->remove_point
1661 instead of assuming memory breakpoints.
1662 (find_gdb_breakpoint_at): Delete.
1663 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1664 (find_gdb_breakpoint): New function.
1665 (set_gdb_breakpoint_at): Delete.
1666 (z_type_supported): New function.
1667 (set_gdb_breakpoint_1): New function, loosely based off
1668 set_gdb_breakpoint_at.
1669 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1670 (delete_gdb_breakpoint_at): Delete.
1671 (delete_gdb_breakpoint_1): New function, loosely based off
1672 delete_gdb_breakpoint_at.
1673 (delete_gdb_breakpoint): New function.
1674 (clear_gdb_breakpoint_conditions): Rename to ...
1675 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1676 breakpoint.
1677 (add_condition_to_breakpoint): Make static.
1678 (add_breakpoint_condition): Take a struct breakpoint pointer
1679 instead of an address. Adjust.
1680 (gdb_condition_true_at_breakpoint): Rename to ...
1681 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1682 z_type parameter.
1683 (gdb_condition_true_at_breakpoint): Reimplement.
1684 (add_breakpoint_commands): Take a struct breakpoint pointer
1685 instead of an address. Adjust.
1686 (gdb_no_commands_at_breakpoint): Rename to ...
1687 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1688 parameter. Return true if no breakpoint was found. Change debug
1689 output.
1690 (gdb_no_commands_at_breakpoint): Reimplement.
1691 (run_breakpoint_commands): Rename to ...
1692 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1693 and change return type to boolean.
1694 (run_breakpoint_commands): New function.
1695 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1696 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1697 breakpoint. Go through the_target->remove_point instead of
1698 assuming memory breakpoint.
1699 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1700 software and hardware breakpoints.
1701 (reinsert_raw_breakpoint): Go through the_target->insert_point
1702 instead of assuming memory breakpoint.
1703 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1704 software and hardware breakpoints.
1705 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1706 Check both software and hardware breakpoints.
1707 (validate_inserted_breakpoint): Assert the breakpoint is a
1708 software breakpoint. Set the inserted flag to -1 instead of
1709 setting shlib_disabled.
1710 (delete_disabled_breakpoints): Adjust.
1711 (validate_breakpoints): Only validate software breakpoints.
1712 Adjust to inserted flag change.
1713 (check_mem_read, check_mem_write): Skip breakpoint types other
1714 than software breakpoints. Adjust to inserted flag change.
1715 * mem-break.h (enum raw_bkpt_type): New enum.
1716 (raw_breakpoint, struct process_info): Forward declare.
1717 (Z_packet_to_target_hw_bp_type): Delete declaration.
1718 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1719 (set_gdb_breakpoint, delete_gdb_breakpoint)
1720 (clear_breakpoint_conditions): New declarations.
1721 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1722 (breakpoint_inserted_here): Update comment.
1723 (add_breakpoint_condition, add_breakpoint_commands): Replace
1724 address parameter with a breakpoint pointer parameter.
1725 (gdb_breakpoint_here): Update comment.
1726 (delete_gdb_breakpoint_at): Delete.
1727 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1728 * server.c (process_point_options): Take a struct breakpoint
1729 pointer instead of an address. Adjust.
1730 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1731 delete_gdb_breakpoint.
1732 * spu-low.c (spu_target_ops): Install NULL as
1733 supports_z_point_type method.
1734 * target.h: Include mem-break.h.
1735 (struct target_ops) <prepare_to_access_memory>: Update comment.
1736 <supports_z_point_type>: New field.
1737 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1738 instead of a char. Also take a raw breakpoint pointer.
1739 * win32-arm-low.c (the_low_target): Install NULL as
1740 supports_z_point_type.
1741 * win32-i386-low.c (i386_supports_z_point_type): New function.
1742 (i386_insert_point, i386_remove_point): Adjust to new interface.
1743 (the_low_target): Install i386_supports_z_point_type.
1744 * win32-low.c (win32_supports_z_point_type): New function.
1745 (win32_insert_point, win32_remove_point): Adjust to new interface.
1746 (win32_target_ops): Install win32_supports_z_point_type.
1747 * win32-low.h (struct win32_target_ops):
1748 <supports_z_point_type>: New method.
1749 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1750 instead of a char. Also take a raw breakpoint pointer.
1751
1752 2014-05-20 Pedro Alves <palves@redhat.com>
1753
1754 * mem-break.h: Include break-common.h.
1755 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1756 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1757 (Z_packet_to_target_hw_bp_type): New declaration.
1758 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1759 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1760 (Z_PACKET_ACCESS_WP): Delete macros.
1761 (Z_packet_to_hw_type): Delete function.
1762 * i386-low.h: Don't include break-common.h here.
1763 (Z_packet_to_hw_type): Delete declaration.
1764 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1765 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1766 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1767 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1768 * linux-aarch64-low.c: Don't include break-common.h here.
1769 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1770 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1771 (Z_packet_to_target_hw_bp_type): Delete function.
1772 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1773 function.
1774 (mips_insert_point, mips_remove_point): Use
1775 Z_packet_to_target_hw_bp_type.
1776
1777 2014-05-20 Pedro Alves <palves@redhat.com>
1778
1779 * linux-aarch64-low.c: Include break-common.h.
1780 (enum target_point_type): Delete.
1781 (Z_packet_to_point_type): Rename to ...
1782 (Z_packet_to_target_hw_bp_type): ... this, and return a
1783 target_hw_bp_type instead.
1784 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1785 instead of an enum target_point_type.
1786 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1787 breakpoint type.
1788 (aarch64_dr_state_insert_one_point)
1789 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1790 (aarch64_handle_aligned_watchpoint)
1791 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1792 Take an enum target_hw_bp_type instead of an enum
1793 target_point_type.
1794 (aarch64_supports_z_point_type): New function.
1795 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1796 use Z_packet_to_target_hw_bp_type.
1797
1798 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1799
1800 * configure.ac: Only use -Werror by default when DEVELOPMENT
1801 is true.
1802 * configure: Regenerate.
1803
1804 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1805
1806 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1807 * linux-x86-low.c (X86_64_USER_REGS): New.
1808 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1809
1810 2014-04-28 Yao Qi <yao@codesourcery.com>
1811
1812 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1813 name.
1814
1815 2014-04-25 Pedro Alves <palves@redhat.com>
1816
1817 PR server/16255
1818 * linux-low.c (linux_attach_fail_reason_string): New function.
1819 (linux_attach_lwp): Delete.
1820 (linux_attach_lwp_1): Rename to ...
1821 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1822 argument. Remove "initial" parameter. Return int instead of
1823 void. Don't error or warn here.
1824 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1825 failure to attach to the tgid. Call warning when failing to
1826 attach to an lwp.
1827 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1828 argument. Remove "initial" parameter. Return int instead of
1829 void. Don't error or warn here.
1830 (linux_attach_fail_reason_string): New declaration.
1831 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1832 interface change. Use linux_attach_fail_reason_string.
1833
1834 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1835 Walfred Tedeschi <walfred.tedeschi@intel.com>
1836
1837 * Makefile.in: Added rules to handle new files
1838 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1839 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1840 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1841 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1842 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1843 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1844 x32-avx512-linux.o.
1845 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1846 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1847 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1848 i386/x32-avx512.xml.
1849 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1850 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1851 i386/x32-avx512-linux.xml.
1852 * i387-fp.c (num_avx512_k_registers): New constant for number
1853 of K registers.
1854 (num_avx512_zmmh_low_registers): New constant for number of
1855 lower ZMM registers (0-15).
1856 (num_avx512_zmmh_high_registers): New constant for number of
1857 higher ZMM registers (16-31).
1858 (num_avx512_ymmh_registers): New contant for number of higher
1859 YMM registers (ymm16-31 added by avx521 on x86_64).
1860 (num_avx512_xmm_registers): New constant for number of higher
1861 XMM registers (xmm16-31 added by AVX512 on x86_64).
1862 (struct i387_xsave): Add space for AVX512 registers.
1863 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1864 Add code to handle AVX512 registers.
1865 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1866 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1867 prototypei from generated file.
1868 (tdesc_amd64_avx512_linux): Likewise.
1869 (init_registers_x32_avx512_linux): Likewise.
1870 (tdesc_x32_avx512_linux): Likewise.
1871 (init_registers_i386_avx512_linux): Likewise.
1872 (tdesc_i386_avx512_linux): Likewise.
1873 (x86_64_regmap): Add AVX512 registers.
1874 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1875 mask.
1876 (initialize_low_arch): Add code to initialize AVX512 registers.
1877
1878 2014-04-23 Pedro Alves <palves@redhat.com>
1879
1880 * mem-break.c (find_gdb_breakpoint_at): Make static.
1881 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1882
1883 2014-04-23 Pedro Alves <palves@redhat.com>
1884
1885 * i386-low.c: Don't include break-common.h here.
1886 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1887 prototype to take target_hw_bp_type as argument instead of a Z
1888 packet char.
1889 * i386-low.h: Include break-common.h here.
1890 (Z_packet_to_hw_type): Declare.
1891 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1892 prototypes.
1893 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1894 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1895 (x86_remove_point): Convert the packet number to a
1896 target_hw_bp_type before calling i386_low_remove_watchpoint.
1897 * win32-i386-low.c (i386_insert_point): Convert the packet number
1898 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1899 (i386_remove_point): Convert the packet number to a
1900 target_hw_bp_type before calling i386_low_remove_watchpoint.
1901
1902 2014-04-23 Pedro Alves <palves@redhat.com>
1903
1904 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1905
1906 2014-04-10 Pedro Alves <palves@redhat.com>
1907
1908 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1909 Check if the condition or command is NULL before checking if the
1910 breakpoint is known. On success, return true.
1911 * mem-break.h (add_breakpoint_condition): Document return.
1912 (add_breakpoint_commands): Add describing comment.
1913 * server.c (skip_to_semicolon): New function.
1914 (process_point_options): Use it.
1915
1916 2014-04-09 Pedro Alves <palves@redhat.com>
1917
1918 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1919 to lwpid_of.
1920
1921 2014-02-27 Pedro Alves <palves@redhat.com>
1922
1923 PR 12702
1924 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1925 macros.
1926 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1927 output.
1928 (last_thread_of_process_p): Take a PID argument instead of a
1929 thread pointer.
1930 (linux_wait_for_lwp): Delete.
1931 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1932 functions.
1933 (linux_low_filter_event): New function, party factored out from
1934 linux_wait_for_event.
1935 (linux_wait_for_event): Rename to ...
1936 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1937 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1938 sigsuspend. Check for zombie leaders.
1939 (linux_wait_for_event): Reimplement as wrapper around
1940 linux_wait_for_event_filtered.
1941 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1942 a normal or signal exit is seen, it's the whole process exiting.
1943 (wait_for_sigstop): No longer a for_each_inferior callback.
1944 Rewrite on top of linux_wait_for_event_filtered.
1945 (stop_all_lwps): Call wait_for_sigstop directly.
1946 * server.c (resume, handle_target_event): Handle
1947 TARGET_WAITKIND_NO_RESUMED.
1948
1949 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1950
1951 * win32-low.c (psapi_get_dll_name,
1952 * win32_CreateToolhelp32Snapshot): Delete.
1953 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1954 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1955 Delete.
1956 (handle_load_dll): Add function description.
1957 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1958
1959 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1960
1961 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1962 Add comment.
1963 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1964 base address when calling win32_add_one_solib.
1965 (handle_load_dll): Delete local variable load_addr.
1966 Remove 0x1000 offset applied to DLL base address when calling
1967 win32_add_one_solib.
1968 (handle_unload_dll): Add comment.
1969
1970 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1971
1972 * win32-low.c (win32_add_all_dlls): Renames
1973 win32_ensure_ntdll_loaded. Rewrite function documentation.
1974 Adjust implementation to always load all DLLs.
1975 Add 0x1000 offset to DLL base address when calling
1976 win32_add_one_solib.
1977 (child_initialization_done): New static global.
1978 (do_initial_child_stuff): Set child_initialization_done to
1979 zero during child initialization, and 1 after. Replace call
1980 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1981 Add comment.
1982 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1983 (handle_unload_dll): Add function documentation.
1984 (get_child_debug_event): Ignore load and unload DLL events
1985 during child initialization.
1986
1987 2014-02-20 Doug Evans <dje@google.com>
1988
1989 Remove global all_lwps.
1990 * inferiors.h (ptid_of): Move here from linux-low.h.
1991 (pid_of, lwpid_of): Ditto.
1992 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1993 parameter is a struct thread_info * now.
1994 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1995 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1996 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1997 directly.
1998 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1999 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2000 * linux-arm-low.c (update_registers_callback): Update, "entry"
2001 parameter is a struct thread_info * now.
2002 Fetch lwpid from current_inferior directly.
2003 (arm_insert_point): Pass &all_threads to find_inferior instead of
2004 &all_lwps.
2005 (arm_remove_point): Ditto.
2006 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2007 (arm_prepare_to_resume): Fetch pid from thread.
2008 (arm_read_description): Fetch lwpid from current_inferior directly.
2009 * linux-low.c (all_lwps): Delete.
2010 (delete_lwp): Delete call to remove_inferior.
2011 (handle_extended_wait): Fetch lwpid from thread.
2012 (add_lwp): Don't set lwp->entry.id. Remove call to
2013 add_inferior_to_list.
2014 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2015 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2016 (kill_one_lwp_callback): Ditto.
2017 (linux_kill): Don't dereference NULL pointer.
2018 Fetch ptid,lwpid from thread.
2019 (get_detach_signal): Fetch ptid from thread.
2020 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2021 Simplify call to regcache_invalidate_thread.
2022 (delete_lwp_callback): Update, "entry" parameter is a
2023 struct thread_info * now. Fetch pid from thread.
2024 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2025 (status_pending_p_callback): Update, "entry" parameter is a
2026 struct thread_info * now. Fetch ptid from thread.
2027 (find_lwp_pid): Update, "entry" parameter is a
2028 struct thread_info * now.
2029 (linux_wait_for_lwp): Fetch pid from thread.
2030 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2031 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2032 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2033 (dequeue_one_deferred_signal): Ditto.
2034 (cancel_breakpoint): Fetch ptid from current_inferior.
2035 (linux_wait_for_event): Pass &all_threads to find_inferior,
2036 not &all_lwps. Fetch ptid, lwpid from thread.
2037 (count_events_callback): Update, "entry" parameter is a
2038 struct thread_info * now.
2039 (select_singlestep_lwp_callback): Ditto.
2040 (select_event_lwp_callback): Ditto.
2041 (cancel_breakpoints_callback): Ditto.
2042 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2043 not &all_lwps.
2044 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2045 (unsuspend_one_lwp): Update, "entry" parameter is a
2046 struct thread_info * now.
2047 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2048 not &all_lwps.
2049 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2050 Fetch lwpid from thread, not lwp.
2051 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2052 Pass &all_threads to find_inferior, not &all_lwps.
2053 (send_sigstop): Fetch lwpid from thread, not lwp.
2054 (send_sigstop_callback): Update, "entry" parameter is a
2055 struct thread_info * now.
2056 (suspend_and_send_sigstop_callback): Ditto.
2057 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2058 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2059 struct thread_info * now.
2060 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2061 from thread, lwp.
2062 (lwp_running): Update, "entry" parameter is a
2063 struct thread_info * now.
2064 (stop_all_lwps): Fetch ptid from thread.
2065 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2066 (linux_resume_one_lwp): Fetch lwpid from thread.
2067 (linux_set_resume_request): Update, "entry" parameter is a
2068 struct thread_info * now. Fetch pid, lwpid from thread.
2069 (resume_status_pending_p): Update, "entry" parameter is a
2070 struct thread_info * now.
2071 (need_step_over_p): Ditto. Fetch lwpid from thread.
2072 (start_step_over): Fetch lwpid from thread.
2073 (linux_resume_one_thread): Update, "entry" parameter is a
2074 struct thread_info * now. Fetch lwpid from thread.
2075 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2076 (proceed_one_lwp): Update, "entry" parameter is a
2077 struct thread_info * now. Fetch lwpid from thread.
2078 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2079 struct thread_info * now.
2080 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2081 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2082 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2083 directly.
2084 (regsets_store_inferior_registers): Ditto.
2085 (fetch_register, store_register): Ditto.
2086 (linux_read_memory, linux_write_memory): Ditto.
2087 (linux_request_interrupt): Ditto.
2088 (linux_read_auxv): Ditto.
2089 (linux_xfer_siginfo): Ditto.
2090 (linux_qxfer_spu): Ditto.
2091 (linux_qxfer_libraries_svr4): Ditto.
2092 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2093 moved to inferiors.h.
2094 (get_lwp): Delete.
2095 (get_thread_lwp): Update.
2096 (struct lwp_info): Delete member "entry". Simplify comment for
2097 member "thread".
2098 (all_lwps): Delete.
2099 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2100 current_inferior directly.
2101 (update_watch_registers_callback): Update, "entry" parameter is a
2102 struct thread_info * now. Fetch pid from thread.
2103 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2104 (mips_insert_point): Fetch lwpid from current_inferior.
2105 Pass &all_threads to find_inferior, not &all_lwps.
2106 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2107 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2108 directly.
2109 (mips_stopped_data_address): Ditto.
2110 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2111 directly.
2112 * linux-tile-low.c (tile_arch_setup): Ditto.
2113 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2114 (update_debug_registers_callback): Update, "entry" parameter is a
2115 struct thread_info * now. Fetch pid from thread.
2116 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2117 Pass &all_threads to find_inferior, not &all_lwps.
2118 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2119 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2120 Pass &all_threads to find_inferior, not &all_lwps.
2121 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2122 (i386_dr_low_get_status): Ditto.
2123 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2124 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2125 (x86_linux_read_description): Ditto.
2126 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2127
2128 2014-02-20 Doug Evans <dje@google.com>
2129
2130 * inferiors.c (get_first_inferior): Fix buglet.
2131
2132 2014-02-19 Doug Evans <dje@google.com>
2133
2134 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2135 * inferiors.c (add_thread): Change result type to struct thread_info *.
2136 All callers updated.
2137 (add_lwp): Call add_thread here instead of in callers.
2138 All callers updated.
2139 * linux-low.h (get_lwp_thread): Rewrite.
2140 (struct lwp_info): New member "thread".
2141
2142 2014-02-19 Doug Evans <dje@google.com>
2143
2144 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2145 All callers updated.
2146
2147 2014-02-19 Doug Evans <dje@google.com>
2148
2149 * inferiors.c (add_thread): Fix whitespace.
2150
2151 2014-02-19 Doug Evans <dje@google.com>
2152
2153 * dll.c (clear_dlls): Replace accessing list implemention details
2154 with API function.
2155 * gdbthread.h (get_first_thread): Declare.
2156 * inferiors.c (for_each_inferior_with_data): New function.
2157 (get_first_thread): New function.
2158 (find_thread_ptid): Simplify.
2159 (get_first_inferior): New function.
2160 (clear_list): Delete.
2161 (one_inferior_p): New function.
2162 (clear_inferior_list): New function.
2163 (clear_inferiors): Update.
2164 * inferiors.h (for_each_inferior_with_data): Declare.
2165 (clear_inferior_list): Declare.
2166 (one_inferior_p): Declare.
2167 (get_first_inferior): Declare.
2168 * linux-low.c (linux_wait_for_event): Replace accessing list
2169 implemention details with API function.
2170 * server.c (target_running): Ditto.
2171 (accumulate_file_name_length): New function.
2172 (emit_dll_description): New function.
2173 (handle_qxfer_libraries): Replace accessing list implemention
2174 details with API function.
2175 (handle_qxfer_threads_worker): New function.
2176 (handle_qxfer_threads_proper): Replace accessing list implemention
2177 details with API function.
2178 (handle_query): Ditto.
2179 (visit_actioned_threads_callback_ftype): New typedef.
2180 (visit_actioned_threads_data): New struct.
2181 (visit_actioned_threads): Rewrite to be find_inferior callback.
2182 (resume): Call find_inferior.
2183 (handle_status): Replace accessing list implemention
2184 details with API function.
2185 (process_serial_event): Replace accessing list implemention details
2186 with API function.
2187 * target.c (set_desired_inferior): Replace accessing list implemention
2188 details with API function.
2189 * tracepoint.c (same_process_p): New function.
2190 (gdb_agent_about_to_close): Replace accessing list implemention
2191 details with API function.
2192 * win32-low.c (child_delete_thread): Replace accessing list
2193 implemention details with API function.
2194 (match_dll_by_basename): New function.
2195 (dll_is_loaded_by_basename): New function.
2196 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2197 details call to dll_is_loaded_by_basename.
2198
2199 2014-02-19 Doug Evans <dje@google.com>
2200
2201 * dll.h (struct dll_info): Add comment.
2202 * gdbthread.h (struct thread_info): Add comment.
2203 (current_ptid): Simplify.
2204 * inferiors.c (add_process): Update.
2205 (remove_process): Update.
2206 * inferiors.h (struct process_info): Rename member "head" to "entry".
2207 * linux-low.c (delete_lwp): Update.
2208 (add_lwp): Update.
2209 (last_thread_of_process_p): Update.
2210 (kill_one_lwp_callback, linux_kill): Update.
2211 (status_pending_p_callback): Update.
2212 (wait_for_sigstop): Update. Simplify read of ptid.
2213 (start_step_over): Update.
2214 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2215 (get_lwp_thread): Update.
2216 (struct lwp_info): Rename member "head" to "entry".
2217 * regcache.h (inferior_list_entry): Delete.
2218 * server.c (kill_inferior_callback): Update.
2219 (detach_or_kill_inferior_callback): Update.
2220 (print_started_pid): Update.
2221 (print_attached_pid): Update.
2222 (process_serial_event): Simplify read of ptid.
2223 * thread-db.c (thread_db_create_event): Update.
2224 (thread_db_get_tls_address): Update.
2225 * win32-low.c (current_inferior_ptid): Simplify.
2226
2227 2014-02-19 Tom Tromey <tromey@redhat.com>
2228
2229 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2230 argument.
2231 (target_supports_btrace): Update.
2232
2233 2014-02-14 Yao Qi <yao@codesourcery.com>
2234
2235 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2236 (rsp-low-ipa.o): New target.
2237
2238 2014-02-12 Tom Tromey <tromey@redhat.com>
2239
2240 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2241 convert_ascii_to_int.
2242 * regcache.c (registers_to_string): Likewise.
2243 * remote-utils.c (decode_M_packet): Likewise.
2244 * server.c (process_serial_event): Likewise.
2245
2246 2014-02-12 Tom Tromey <tromey@redhat.com>
2247
2248 * server.c (handle_query, handle_v_run): Use hex2bin, not
2249 unhexify.
2250 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2251
2252 2014-02-12 Tom Tromey <tromey@redhat.com>
2253
2254 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2255 convert_int_to_ascii.
2256 * regcache.c (registers_to_string, collect_register_as_string):
2257 Likewise.
2258 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2259 Likewise.
2260 * server.c (process_serial_event): Likewise.
2261 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2262 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2263
2264 2014-02-12 Tom Tromey <tromey@redhat.com>
2265
2266 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2267 bin2hex, not hexify.
2268 * tracepoint.c (cmd_qtstatus): Likewise.
2269
2270 2014-02-12 Tom Tromey <tromey@redhat.com>
2271
2272 * remote-utils.c (monitor_output): Pass explicit length to
2273 hexify.
2274
2275 2014-02-12 Tom Tromey <tromey@redhat.com>
2276
2277 * tracepoint.c: Include rsp-low.h.
2278 * server.c: Include rsp-low.h.
2279 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2280 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2281 declare.
2282 * remote-utils.c: Include rsp-low.h.
2283 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2284 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2285 (convert_int_to_ascii, convert_ascii_to_int): Move to
2286 common/rsp-low.c.
2287 * regcache.c: Include rsp-low.h.
2288 * ax.c: Include rsp-low.h.
2289 * Makefile.in (SFILES): Add common/rsp-low.c.
2290 (OBS): Add rsp-low.o.
2291 (rsp-low.o): New target.
2292
2293 2014-02-12 Tom Tromey <tromey@redhat.com>
2294
2295 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2296 Include print-utils.h.
2297 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2298 (plongest, thirty_two, phex_nz): Remove.
2299 * Makefile.in (SFILES): Add common/print-utils.c.
2300 (OBS): Add print-utils.o.
2301 (print-utils-ipa.o): New target.
2302 (print-utils.o): New target.
2303 (IPA_OBJS): Add print-utils-ipa.o.
2304
2305 2014-02-06 Tom Tromey <tromey@redhat.com>
2306
2307 * Makefile.in (SFILES): Fix indentation.
2308
2309 2014-02-05 Doug Evans <dje@google.com>
2310
2311 * linux-low.c (linux_wait_for_event): Improve comment.
2312 (linux_wait_1): Keep current_inferior in sync with event_child.
2313
2314 2014-01-22 Doug Evans <dje@google.com>
2315
2316 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2317
2318 2014-01-22 Doug Evans <dje@google.com>
2319
2320 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2321 * configure: Regenerate.
2322 * config.in: Regenerate.
2323 * Makefile.in (SFILES): Add debug.c.
2324 (OBS): Add debug.o.
2325 * debug.c: New file.
2326 * debug.h: New file.
2327 * linux-aarch64-low.c (*): Update all debugging printfs to use
2328 debug_printf instead of fprintf.
2329 * linux-arm-low.c (*): Ditto.
2330 * linux-cris-low.c (*): Ditto.
2331 * linux-crisv32-low.c (*): Ditto.
2332 * linux-m32r-low.c (*): Ditto.
2333 * linux-sparc-low.c (*): Ditto.
2334 * linux-x86.c (*): Ditto.
2335 * linux-low.c (*): Ditto.
2336 (linux_wait_1): Add calls to debug_enter, debug_exit.
2337 (linux_wait): Remove redundant debugging printf.
2338 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2339 (linux_resume, unstop_all_lwps): Ditto.
2340 * mem-break.c (*): Update all debugging printfs to use
2341 debug_printf instead of fprintf.
2342 * remote-utils.c (*): Ditto.
2343 * thread-db.c (*): Ditto.
2344 * server.c #include <ctype.h>, "gdb_vecs.h".
2345 (debug_threads): Moved to debug.c.
2346 (*): Update all debugging printfs to use debug_printf instead of
2347 fprintf.
2348 (start_inferior): Replace call to fflush with call to debug_flush.
2349 (monitor_show_help): Mention set debug-format.
2350 (parse_debug_format_options): New function.
2351 (handle_monitor_command): Handle "monitor set debug-format".
2352 (gdbserver_usage): Mention --debug-format.
2353 (main): Parse --debug-format.
2354 * server.h (debug_threads): Declaration moved to debug.h.
2355 #include "debug.h".
2356 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2357 trace_debug_1 that uses debug_printf.
2358 (tracepoint_look_up_symbols): Update all debugging printfs to use
2359 debug_printf instead of fprintf.
2360
2361 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2362
2363 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2364 sys/ptrace.h.
2365
2366 2014-01-17 Pedro Alves <palves@redhat.com>
2367
2368 PR build/16445
2369 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2370 defined after including gdb_proc_service.h.
2371
2372 2014-01-16 Doug Evans <dje@google.com>
2373
2374 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2375 (match_dll): Use it.
2376
2377 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2378
2379 * target.h (target_ops) <read_btrace>: Change parameters and
2380 return type to allow error reporting.
2381 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2382 trace reading errors on.
2383 * linux-low.c (linux_low_read_btrace): Pass trace reading
2384 errors on.
2385 (linux_low_disable_btrace): New.
2386
2387 2014-01-15 Doug Evans <dje@google.com>
2388
2389 * inferiors.c (thread_id_to_gdb_id): Delete.
2390 * inferiors.h (thread_id_to_gdb_id): Delete.
2391
2392 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2393
2394 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2395 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2396 versions.
2397
2398 2014-01-08 Pedro Alves <palves@redhat.com>
2399
2400 * server.c (handle_status): Don't discard previous queued stop
2401 replies or thread's pending status here.
2402 (main) <disconnection>: Do it here instead.
2403
2404 2014-01-08 Pedro Alves <palves@redhat.com>
2405
2406 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2407 * server.c (visit_actioned_threads, handle_pending_status): New
2408 function.
2409 (handle_v_cont): Factor out parts to ...
2410 (resume): ... this new function. If in all-stop, and a thread
2411 being resumed has a pending status, report it without actually
2412 resuming.
2413 (myresume): Adjust to use the new 'resume' function.
2414 (clear_pending_status_callback, set_pending_status_callback)
2415 (find_status_pending_thread_callback): New functions.
2416 (handle_status): Handle the case of multiple threads having
2417 interesting statuses to report. Report threads' real last signal
2418 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2419 with an interesting thread to report the status for, instead of
2420 always reporting the status of the first thread.
2421
2422 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2423
2424 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2425 * gdbreplay.c (gdbreplay_version): Likewise.
2426
2427 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2428
2429 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2430 iov.iov_len with the real length in use.
2431
2432 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2433
2434 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2435 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2436 for all targets that use win32-low.c.
2437 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2438 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2439
2440 2013-12-13 Pedro Alves <palves@redhat.com>
2441
2442 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2443 if equal to TARGET_WAITKIND_LOADED.
2444 * win32-low.c (cached_status): New static global.
2445 (win32_wait): Add declaration.
2446 (do_initial_child_stuff): Flush all initial pending debug events
2447 up to the initial breakpoint.
2448 (win32_wait): If CACHED_STATUS was set, return that instead
2449 of doing a real wait. Remove the code resuming the execution
2450 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2451 during the initial phase. Also remove the code changing
2452 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2453 TARGET_WAITKIND_STOPPED.
2454
2455 2013-12-11 Yao Qi <yao@codesourcery.com>
2456
2457 * notif.c (handle_notif_ack): Return 0 if no notification
2458 matches.
2459
2460 2013-11-20 Doug Evans <dje@google.com>
2461
2462 * linux-low.c (linux_set_resume_request): Fix comment.
2463
2464 2013-11-20 Doug Evans <dje@google.com>
2465
2466 * linux-low.c (resume_status_pending_p): Tweak comment.
2467
2468 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2469
2470 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2471 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2472 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2473 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2474 (srv_amd64_regobj): Add amd64-mpx.o.
2475 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2476 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2477 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2478 * i387-fp.c (num_pl_bnd_register) Added constant.
2479 (num_pl_bnd_cfg_registers) Added constant.
2480 (struct i387_xsave) Added reserved area and MPX fields.
2481 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2482 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2483 function.
2484 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2485 (init_registers_amd64_mpx_linux): Declare new function.
2486 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2487 (x86_64_regmap): Add MPX registers.
2488 (x86_linux_read_description): Add MPX case.
2489 (initialize_low_arch): Initialize MPX targets.
2490
2491 2013-11-18 Tom Tromey <tromey@redhat.com>
2492
2493 * configure: Rebuild.
2494 * configure.ac: Don't check for stdlib.h.
2495 * gdbreplay.c: Unconditionally include stdlib.h.
2496
2497 2013-11-18 Tom Tromey <tromey@redhat.com>
2498
2499 * config.in: Rebuild.
2500 * configure: Rebuild.
2501 * configure.ac: Don't use AC_HEADER_DIRENT.
2502
2503 2013-11-18 Tom Tromey <tromey@redhat.com>
2504
2505 * server.h: Don't check HAVE_STRING_H.
2506 * gdbreplay.c: Don't check HAVE_STRING_H.
2507 * configure: Rebuild.
2508
2509 2013-11-18 Tom Tromey <tromey@redhat.com>
2510
2511 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2512 LIBGNU.
2513
2514 2013-11-08 Tom Tromey <tromey@redhat.com>
2515
2516 * configure, config.in: Rebuild.
2517 * configure.ac: Remove unused configury.
2518
2519 2013-11-08 Tom Tromey <tromey@redhat.com>
2520
2521 * acinclude.m4: Include common.m4, codeset.m4.
2522 * configure, config.in: Rebuild.
2523 * configure.ac: Use GDB_AC_COMMON.
2524
2525 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2526
2527 * linux-s390-low.c (HWCAP_S390_TE): New define.
2528 (s390_arch_setup): Consider the TE field in the HWCAP for
2529 determining 'have_regset_tdb'.
2530
2531 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2532
2533 PR gdb/16014
2534 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2535 call to sizeof.
2536
2537 2013-10-02 Pedro Alves <palves@redhat.com>
2538
2539 * server.c (process_serial_event): Don't output "GDBserver
2540 exiting" if GDB is connected through stdio.
2541 * target.c (mywait): Likewise, be silent if GDB is connected
2542 through stdio.
2543
2544 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2545
2546 * lynx-low.c (lynx_add_threads_after_attach): New function.
2547 (lynx_attach): Remove call to add_thread. Add call to
2548 lynx_add_threads_after_attach instead.
2549
2550 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2551
2552 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2553 * config.in, configure: Regenerated.
2554
2555 2013-09-18 Yao Qi <yao@codesourcery.com>
2556
2557 PR server/15959
2558 * server.c (start_inferior): Clear 'resume_info'.
2559
2560 2013-09-16 Jiong Wang <jiwang@tilera.com>
2561
2562 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2563 for each register.
2564
2565 2013-09-16 Jiong Wang <jiwang@tilera.com>
2566
2567 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2568 linux-tile-low.o to srv_tgtobj.
2569
2570 2013-09-16 Will Newton <will.newton@linaro.org>
2571
2572 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2573 out regs.
2574
2575 2013-09-06 Pedro Alves <palves@redhat.com>
2576
2577 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2578 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2579 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2580 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2581 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2582 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2583
2584 2013-09-06 Pedro Alves <palves@redhat.com>
2585
2586 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2587 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2588
2589 2013-09-06 Pedro Alves <palves@redhat.com>
2590
2591 * linux-amd64-ipa.c: Include tracepoint.h.
2592 * linux-i386-ipa.c: Include tracepoint.h.
2593
2594 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2595
2596 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2597 (ps_get_thread_area): New function.
2598
2599 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2600
2601 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2602 (initialize_low_arch): Call init_registers_crisv32 rather than
2603 init_register_crisv32.
2604
2605 2013-09-05 Pedro Alves <palves@redhat.com>
2606
2607 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2608 to ...
2609 * hostio.h: ... this new file.
2610 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2611 win32-low.c: Include hostio.h.
2612
2613 2013-09-05 Pedro Alves <palves@redhat.com>
2614
2615 * server.h (gdb_client_data, handler_func, callback_handler_func)
2616 (delete_file_handler, add_file_handler, append_callback_event)
2617 (delete_callback_event, start_event_loop, initialize_event_loop):
2618 Move to event-loop.h and include it.
2619 * event-loop.h: New file.
2620
2621 2013-09-05 Pedro Alves <palves@redhat.com>
2622
2623 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2624 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2625 (loaded_dll, unloaded_dll): Move to ...
2626 * dll.h: ... this new file.
2627 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2628
2629 2013-09-05 Pedro Alves <palves@redhat.com>
2630
2631 * server.h (current_process, get_thread_process, all_processes)
2632 (add_inferior_to_list, for_each_inferior, current_inferior)
2633 (remove_inferior, add_process, remove_process, find_process_pid)
2634 (have_started_inferiors_p, have_attached_inferiors_p)
2635 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2636 (clear_inferiors, find_inferior, find_inferior_id)
2637 (inferior_target_data, set_inferior_target_data)
2638 (inferior_regcache_data, set_inferior_regcache_data): Move to
2639 inferiors.h, and include it.
2640 * inferiors.h: New file.
2641
2642 2013-09-05 Pedro Alves <palves@redhat.com>
2643
2644 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2645 Move ...
2646 * ax.h: ... here.
2647
2648 2013-09-05 Pedro Alves <palves@redhat.com>
2649
2650 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2651 tracepoint.h.
2652 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2653 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2654 (handle_tracepoint_general_set, handle_tracepoint_query)
2655 (tracepoint_finished_step, tracepoint_was_hit)
2656 (release_while_stepping_state_list, current_traceframe)
2657 (in_readonly_region, traceframe_read_mem)
2658 (fetch_traceframe_registers, traceframe_read_sdata)
2659 (traceframe_read_info, struct fast_tpoint_collect_status)
2660 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2661 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2662 (supply_fast_tracepoint_registers)
2663 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2664 (ipa_tdesc, claim_trampoline_space)
2665 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2666 (agent_mem_read, agent_get_trace_state_variable_value)
2667 (agent_set_trace_state_variable_value, agent_tsv_read)
2668 (agent_mem_read_string, get_raw_reg_func_addr)
2669 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2670 * tracepoint.h: ... this new file.
2671
2672 2013-09-05 Pedro Alves <palves@redhat.com>
2673
2674 * server.h (perror_with_name, error, fatal, warning, paddress)
2675 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2676 include it.
2677 * utils.h: New file.
2678
2679 2013-09-05 Pedro Alves <palves@redhat.com>
2680
2681 * server.h (remote_debug, noack_mode, transport_is_reliable)
2682 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2683 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2684 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2685 (write_enn, initialize_async_io, enable_async_io)
2686 (disable_async_io, check_remote_input_interrupt_request)
2687 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2688 (dead_thread_notify, prepare_resume_reply)
2689 (decode_address_to_semicolon, decode_address, decode_m_packet)
2690 (decode_M_packet, decode_X_packet, decode_xfer_write)
2691 (decode_search_memory_packet, unhexify, hexify)
2692 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2693 (look_up_one_symbol, relocate_instruction)
2694 (monitor_output): Move to remote-utils.h, and include it.
2695 * remote-utils.h: New file.
2696
2697 2013-09-05 Pedro Alves <palves@redhat.com>
2698
2699 * server.h (_): Delete.
2700
2701 2013-09-02 Pedro Alves <palves@redhat.com>
2702
2703 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2704 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2705 allocated.
2706 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2707
2708 2013-09-02 Pierre Muller <muller@sourceware.org>
2709
2710 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2711 or WriteProcessMemory complete successfully and handle
2712 ERROR_PARTIAL_COPY error.
2713
2714 2013-09-02 Pedro Alves <palves@redhat.com>
2715
2716 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2717 error instead of EIO.
2718
2719 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2720
2721 PR server/15604
2722 * linux-low.c: Include filestuff.h.
2723 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2724 * lynx-low.c: Include filestuff.h.
2725 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2726 * server.c: Include filestuff.h.
2727 (main): Call notice_open_fds.
2728 * spu-low.c: Include filestuff.h.
2729 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2730
2731 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2732
2733 * Makefile.in: Explain why ../target and ../nat are not
2734 listed as include file search paths.
2735 (linux-waitpid.o): New object file rule.
2736 * configure.srv (srv_native_linux_obj): New variable.
2737 Replace all occurrences of linux native object files with
2738 $srv_native_linux_obj.
2739 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2740 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2741 (linux_enable_event_reporting): Remove declaration.
2742 (my_waitpid): Moved to common/linux-waitpid.c.
2743 (linux_wait_for_event): Pass ptid when calling
2744 linux_enable_event_reporting.
2745 (linux_supports_tracefork_flag): Remove.
2746 (linux_enable_event_reporting): Likewise.
2747 (linux_tracefork_grandchild): Remove.
2748 (STACK_SIZE): Moved to common/linux-ptrace.c.
2749 (linux_tracefork_child): Remove.
2750 (linux_test_for_tracefork): Remove.
2751 (linux_look_up_symbols): Call linux_supports_traceclone.
2752 (initialize_low): Remove call to linux_test_for_tracefork.
2753 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2754 common/linux-ptrace.h.
2755 (PTRACE_TYPE_ARG4): Likewise.
2756 Include linux-ptrace.h.
2757
2758 2013-08-21 Pedro Alves <palves@redhat.com>
2759
2760 * config.in: Renegerate.
2761
2762 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2763
2764 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2765 (SFILES): Remove $(srcdir)/common/target-common.c and
2766 add $(srcdir)/target/waitstatus.c.
2767 (OBS): Remove target-common.o and add waitstatus.o.
2768 (server_h): Remove $(srcdir)/../common/target-common.h and
2769 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2770 and $(srcdir)/../target/waitstatus.h.
2771 (target-common.o): Remove.
2772 (waitstatus.o): New target object file.
2773 * target.h: Do not include target-common.h and
2774 include target/resume.h, target/wait.h and
2775 target/waitstatus.h.
2776
2777 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2778
2779 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2780 to PTRACE_TYPE_ARG3.
2781 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2782 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2783 PTRACE_TYPE_ARG4.
2784 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2785 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2786
2787 2013-07-27 Jie Zhang <jie@codesourcery.com>
2788 Daniel Jacobowitz <dan@codesourcery.com>
2789 Yao Qi <yao@codesourcery.com>
2790
2791 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2792 (mips-linux-watch.o): New rule.
2793 (mips_linux_watch_h): New variable.
2794 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2795 srv_tgtobj.
2796 * linux-mips-low.c: Include mips-linux-watch.h.
2797 (struct arch_process_info, struct arch_lwp_info): New.
2798 (update_watch_registers_callback): New function.
2799 (mips_linux_new_process, mips_linux_new_thread) New functions.
2800 (mips_linux_prepare_to_resume, mips_insert_point): New
2801 functions.
2802 (mips_remove_point, mips_stopped_by_watchpoint): New
2803 functions.
2804 (rsp_bp_type_to_target_hw_bp_type): New function.
2805 (mips_stopped_data_address): New function.
2806 (the_low_target): Add watchpoint support functions.
2807
2808 2013-07-27 Yao Qi <yao@codesourcery.com>
2809
2810 * i386-low.c: Include break-common.h.
2811 (enum target_hw_bp_type): Remove.
2812
2813 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2814
2815 * Makefile.in (SFILES): /common/target-common.c.
2816 (OBS): Add target-common.o.
2817 (server_h): Add $(srcdir)/../common/target-common.h.
2818 (target-common.o): New target.
2819 * server.c (queue_stop_reply_callback): Free
2820 status string after use.
2821 * target.c (target_waitstatus_to_string): Remove.
2822 * target.h: Include target-common.h.
2823 (resume_kind): Likewise.
2824 (target_waitkind): Likewise.
2825 (target_waitstatus): Likewise.
2826 (TARGET_WNOHANG): Likewise.
2827
2828 2013-07-04 Yao Qi <yao@codesourcery.com>
2829
2830 * Makefile.in (host_alias): Use @host_noncanonical@.
2831 (target_alias): Use @target_noncanonical@.
2832 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2833 ACX_NONCANONICAL_HOST.
2834 * configure: Regenerated.
2835
2836 Revert:
2837 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2838
2839 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2840 * configure: Rebuild.
2841 * Makefile.in (version_host, version_target): Get from configure.
2842 (version.c): Use $(version_host) and $(version_target).
2843
2844 2013-07-03 Pedro Alves <palves@redhat.com>
2845
2846 * Makefile.in (config.status): Depend on development.sh.
2847 * acinclude.m4: Include libmcheck.m4.
2848 * configure: Regenerate.
2849
2850 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2851
2852 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2853 attribute inside the parentheses.
2854 (winapi_DebugSetProcessKillOnExit): Ditto.
2855 (winapi_DebugBreakProcess): Ditto.
2856 (winapi_GenerateConsoleCtrlEvent): Ditto.
2857
2858 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2859
2860 * notif.h (notif_event): Add a dummy member to avoid compiler
2861 errors.
2862
2863 2013-07-01 Pedro Alves <palves@redhat.com>
2864
2865 * hostio.c (HOSTIO_PATH_MAX): Define.
2866 (require_filename, handle_open, handle_unlink, handle_readlink):
2867 Use it.
2868
2869 2013-07-01 Pedro Alves <palves@redhat.com>
2870
2871 * server.h: Include "pathmax.h".
2872 * linux-low.c: Don't include sys/param.h.
2873 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2874 MAXPATHLEN.
2875 * win32-low.c: Don't include sys/param.h.
2876 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2877
2878 2013-07-01 Pedro Alves <palves@redhat.com>
2879
2880 * event-loop.c: Don't check HAVE_UNISTD_H before including
2881 <unistd.h>.
2882 * gdbreplay.c: Likewise.
2883 * remote-utils.c: Likewise.
2884 * server.c: Likewise.
2885 * configure.ac: Don't check for unistd.h.
2886 * configure: Regenerate.
2887
2888 2013-06-28 Tom Tromey <tromey@redhat.com>
2889
2890 * Makefile.in (version.c): Use version.in, not
2891 common/version.in.
2892
2893 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2894
2895 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2896 * configure: Rebuild.
2897 * Makefile.in (version_host, version_target): Get from configure.
2898 (version.c): Use $(version_host) and $(version_target).
2899
2900 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2901
2902 Fix trace-status to output user name without trailing colon.
2903 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2904
2905 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2906
2907 Fix trace-status to output proper start-time and stop-time.
2908 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2909 output start time and stop time in hex as gdb expects.
2910
2911 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2912
2913 * tracepoint.c (build_traceframe_info_xml): Output trace state
2914 variables present in the trace buffer.
2915
2916 2013-06-24 Tom Tromey <tromey@redhat.com>
2917
2918 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2919 create-version.sh.
2920 (version.o): Remove.
2921 * gdbreplay.c: Include version.h.
2922 (version, host_name): Don't declare.
2923 * server.h: Include version.h.
2924 (version, host_name): Don't declare.
2925
2926 2013-06-12 Pedro Alves <palves@redhat.com>
2927
2928 * linux-x86-low.c (linux_is_elf64): Delete global.
2929 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2930 with local linux_pid_exe_is_elf_64_file use.
2931
2932 2013-06-11 Pedro Alves <palves@redhat.com>
2933
2934 * linux-low.c (regset_disabled, disable_regset): New functions.
2935 (regsets_fetch_inferior_registers)
2936 (regsets_store_inferior_registers): Use them.
2937 (initialize_regsets_info); Don't allocate the disabled_regsets
2938 array here.
2939 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2940 comment.
2941
2942 2013-06-11 Pedro Alves <palves@redhat.com>
2943
2944 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2945 xmalloc.
2946
2947 2013-06-11 Pedro Alves <palves@redhat.com>
2948
2949 * linux-x86-low.c (initialize_low_arch): Call
2950 init_registers_x32_avx_linux.
2951
2952 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2953
2954 Fix compatibility with Android Bionic.
2955 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2956 it is not empty.
2957
2958 2013-06-07 Pedro Alves <palves@redhat.com>
2959
2960 PR server/14823
2961 * Makefile.in (OBS): Add tdesc.o.
2962 (IPA_OBJS): Add tdesc-ipa.o.
2963 (tdesc-ipa.o): New rule.
2964 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2965 interface.
2966 * linux-low.c (new_inferior): Delete.
2967 (disabled_regsets, num_regsets): Delete.
2968 (linux_add_process): Adjust to set the new per-process
2969 new_inferior flag.
2970 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2971 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2972 was a stop. When calling arch_setup, switch the current inferior
2973 to the thread that got an event.
2974 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2975 (regsets_fetch_inferior_registers)
2976 (regsets_store_inferior_registers): New regsets_info parameter.
2977 Adjust to use it.
2978 (linux_register_in_regsets): New regs_info parameter. Adjust to
2979 use it.
2980 (register_addr, fetch_register, store_register): New usrregs_info
2981 parameter. Adjust to use it.
2982 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2983 parameter regs_info. Adjust to use it.
2984 (linux_fetch_registers): Get the current inferior's regs_info, and
2985 adjust to use it.
2986 (linux_store_registers): Ditto.
2987 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2988 (initialize_low): Don't initialize the target_regsets here. Call
2989 initialize_low_arch.
2990 * linux-low.h (target_regsets): Delete declaration.
2991 (struct regsets_info): New.
2992 (struct usrregs_info): New.
2993 (struct regs_info): New.
2994 (struct process_info_private) <new_inferior>: New field.
2995 (struct linux_target_ops): Delete the num_regs, regmap, and
2996 regset_bitmap fields. New field regs_info.
2997 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2998 * i387-fp.c (num_xmm_registers): Delete.
2999 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3000 calls to new interface.
3001 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3002 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3003 Infer the number of xmm registers from the regcache's target
3004 description.
3005 * i387-fp.h (num_xmm_registers): Delete.
3006 * inferiors.c (add_thread): Don't install the thread's regcache
3007 here.
3008 * proc-service.c (gregset_info): Fetch the current inferior's
3009 regs_info. Adjust to use it.
3010 * regcache.c: Include tdesc.h.
3011 (register_bytes, reg_defs, num_registers)
3012 (gdbserver_expedite_regs): Delete.
3013 (get_thread_regcache): If the thread doesn't have a regcache yet,
3014 create one, instead of aborting gdbserver.
3015 (regcache_invalidate_one): Rename to ...
3016 (regcache_invalidate_thread): ... this.
3017 (regcache_invalidate_one): New.
3018 (regcache_invalidate): Only invalidate registers of the current
3019 process.
3020 (init_register_cache): Add target_desc parameter, and use it.
3021 (new_register_cache): Ditto. Assert the target description has a
3022 non zero registers_size.
3023 (regcache_cpy): Add assertions. Adjust.
3024 (realloc_register_cache, set_register_cache): Delete.
3025 (registers_to_string, registers_from_string): Adjust.
3026 (find_register_by_name, find_regno, find_register_by_number)
3027 (register_cache_size): Add target_desc parameter, and use it.
3028 (free_register_cache_thread, free_register_cache_thread_one)
3029 (regcache_release, register_cache_size): New.
3030 (register_size): Add target_desc parameter, and use it.
3031 (register_data, supply_register, supply_register_zeroed)
3032 (supply_regblock, supply_register_by_name, collect_register)
3033 (collect_register_as_string, collect_register_by_name): Adjust.
3034 * regcache.h (struct target_desc): Forward declare.
3035 (struct regcache) <tdesc>: New field.
3036 (init_register_cache, new_register_cache): Add target_desc
3037 parameter.
3038 (regcache_invalidate_thread): Declare.
3039 (regcache_invalidate_one): Delete declaration.
3040 (regcache_release): Declare.
3041 (find_register_by_number, register_cache_size, register_size)
3042 (find_regno): Add target_desc parameter.
3043 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3044 declarations.
3045 * remote-utils.c: Include tdesc.h.
3046 (outreg, prepare_resume_reply): Adjust.
3047 * server.c: Include tdesc.h.
3048 (gdbserver_xmltarget): Delete declaration.
3049 (get_features_xml, process_serial_event): Adjust.
3050 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3051 declare.
3052 (struct process_info) <tdesc>: New field.
3053 (ipa_tdesc): Declare.
3054 * tdesc.c: New file.
3055 * tdesc.h: New file.
3056 * tracepoint.c: Include tdesc.h.
3057 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3058 (get_context_regcache): Adjust to pass ipa_tdesc down.
3059 (do_action_at_tracepoint): Adjust to get the register cache size
3060 from the context regcache's description.
3061 (traceframe_walk_blocks): Adjust to get the register cache size
3062 from the current trace frame's description.
3063 (traceframe_get_pc): Adjust to get current trace frame's
3064 description and pass it down.
3065 (gdb_collect): Adjust to get the register cache size from the
3066 IPA's description.
3067 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3068 (gdbserver_xmltarget): Delete.
3069 (initialize_low_tracepoint): Set the ipa's target description.
3070 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3071 (initialize_low_tracepoint): Set the ipa's target description.
3072 * linux-x86-low.c: Include tdesc.h.
3073 [__x86_64__] (is_64bit_tdesc): New.
3074 (ps_get_thread_area, x86_get_thread_area): Use it.
3075 (i386_cannot_store_register): Rename to ...
3076 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3077 (i386_cannot_fetch_register): Rename to ...
3078 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3079 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3080 to new interface.
3081 (target_regsets): Rename to ...
3082 (x86_regsets): ... this.
3083 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3084 interface.
3085 (x86_siginfo_fixup): Use is_64bit_tdesc.
3086 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3087 (tdesc_x32_avx_linux, tdesc_x32_linux)
3088 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3089 Declare.
3090 (x86_linux_update_xmltarget): Delete.
3091 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3092 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3093 (AMD64_LINUX_USER64_CS): New.
3094 (x86_linux_read_description): New, based on
3095 x86_linux_update_xmltarget.
3096 (same_process_callback): New.
3097 (x86_arch_setup_process_callback): New.
3098 (x86_linux_update_xmltarget): New.
3099 (x86_regsets_info): New.
3100 (amd64_linux_regs_info): New.
3101 (i386_linux_usrregs_info): New.
3102 (i386_linux_regs_info): New.
3103 (x86_linux_regs_info): New.
3104 (x86_arch_setup): Reimplement.
3105 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3106 (x86_emit_ops): Ditto.
3107 (the_low_target): Adjust. Install x86_linux_regs_info,
3108 x86_cannot_fetch_register, and x86_cannot_store_register.
3109 (initialize_low_arch): New.
3110 * linux-ia64-low.c (tdesc_ia64): Declare.
3111 (ia64_fetch_register): Adjust.
3112 (ia64_usrregs_info, regs_info): New globals.
3113 (ia64_regs_info): New function.
3114 (the_low_target): Adjust.
3115 (initialize_low_arch): New function.
3116 * linux-sparc-low.c (tdesc_sparc64): Declare.
3117 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3118 Adjust.
3119 (sparc_arch_setup): New function.
3120 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3121 (the_low_target): Adjust.
3122 (initialize_low_arch): New function.
3123 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3124 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3125 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3126 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3127 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3128 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3129 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3130 (tdesc_powerpc_isa205_vsx64l): Declare.
3131 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3132 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3133 (ppc_set_pc, ppc_get_hwcap): Adjust.
3134 (ppc_usrregs_info): Forward declare.
3135 (!__powerpc64__) ppc_regmap_adjusted: New global.
3136 (ppc_arch_setup): Adjust to the current process'es target
3137 description.
3138 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3139 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3140 (ppc_store_evrregset): Adjust.
3141 (target_regsets): Rename to ...
3142 (ppc_regsets): ... this, and make static.
3143 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3144 (ppc_regs_info): New function.
3145 (the_low_target): Adjust.
3146 (initialize_low_arch): New function.
3147 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3148 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3149 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3150 (tdesc_s390x_linux64v2): Declare.
3151 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3152 (s390_fill_gregset, s390_store_last_break): Adjust.
3153 (target_regsets): Rename to ...
3154 (s390_regsets): ... this, and make static.
3155 (s390_get_pc, s390_set_pc): Adjust.
3156 (s390_get_hwcap): New target_desc parameter, and use it.
3157 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3158 (s390_arch_setup): Adjust to set the current process'es target
3159 description. Don't adjust the regmap.
3160 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3161 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3162 (regs_info_3264): New globals.
3163 (s390_regs_info): New function.
3164 (the_low_target): Adjust.
3165 (initialize_low_arch): New function.
3166 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3167 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3168 [__mips64] (init_registers_mips_linux)
3169 (init_registers_mips_dsp_linux): Delete defines.
3170 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3171 (have_dsp): New global.
3172 (mips_read_description): New, based on mips_arch_setup.
3173 (mips_arch_setup): Reimplement.
3174 (get_usrregs_info): New function.
3175 (mips_cannot_fetch_register, mips_cannot_store_register)
3176 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3177 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3178 (target_regsets): Rename to ...
3179 (mips_regsets): ... this, and make static.
3180 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3181 (dsp_regs_info, regs_info): New globals.
3182 (mips_regs_info): New function.
3183 (the_low_target): Adjust.
3184 (initialize_low_arch): New function.
3185 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3186 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3187 Declare.
3188 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3189 (arm_read_description): New, with bits factored from
3190 arm_arch_setup.
3191 (arm_arch_setup): Reimplement.
3192 (target_regsets): Rename to ...
3193 (arm_regsets): ... this, and make static.
3194 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3195 (arm_regs_info): New function.
3196 (the_low_target): Adjust.
3197 (initialize_low_arch): New function.
3198 * linux-m68k-low.c (tdesc_m68k): Declare.
3199 (target_regsets): Rename to ...
3200 (m68k_regsets): ... this, and make static.
3201 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3202 (m68k_regs_info): New function.
3203 (m68k_arch_setup): New function.
3204 (the_low_target): Adjust.
3205 (initialize_low_arch): New function.
3206 * linux-sh-low.c (tdesc_sharch): Declare.
3207 (target_regsets): Rename to ...
3208 (sh_regsets): ... this, and make static.
3209 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3210 (sh_regs_info, sh_arch_setup): New functions.
3211 (the_low_target): Adjust.
3212 (initialize_low_arch): New function.
3213 * linux-bfin-low.c (tdesc_bfin): Declare.
3214 (bfin_arch_setup): New function.
3215 (bfin_usrregs_info, regs_info): New globals.
3216 (bfin_regs_info): New function.
3217 (the_low_target): Adjust.
3218 (initialize_low_arch): New function.
3219 * linux-cris-low.c (tdesc_cris): Declare.
3220 (cris_arch_setup): New function.
3221 (cris_usrregs_info, regs_info): New globals.
3222 (cris_regs_info): New function.
3223 (the_low_target): Adjust.
3224 (initialize_low_arch): New function.
3225 * linux-cris-low.c (tdesc_crisv32): Declare.
3226 (cris_arch_setup): New function.
3227 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3228 (cris_regs_info): New function.
3229 (the_low_target): Adjust.
3230 (initialize_low_arch): New function.
3231 * linux-m32r-low.c (tdesc_m32r): Declare.
3232 (m32r_arch_setup): New function.
3233 (m32r_usrregs_info, regs_info): New globals.
3234 (m32r_regs_info): Adjust.
3235 (initialize_low_arch): New function.
3236 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3237 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3238 (tic6x_usrregs_info): Forward declare.
3239 (tic6x_read_description): New function, based on ...
3240 (tic6x_arch_setup): ... this. Reimplement.
3241 (target_regsets): Rename to ...
3242 (tic6x_regsets): ... this, and make static.
3243 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3244 (tic6x_regs_info): New function.
3245 (the_low_target): Adjust.
3246 (initialize_low_arch): New function.
3247 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3248 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3249 (target_regsets): Rename to ...
3250 (xtensa_regsets): ... this, and make static.
3251 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3252 globals.
3253 (xtensa_arch_setup, xtensa_regs_info): New functions.
3254 (the_low_target): Adjust.
3255 (initialize_low_arch): New function.
3256 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3257 (nios2_arch_setup): Set the current process'es tdesc.
3258 (target_regsets): Rename to ...
3259 (nios2_regsets): ... this.
3260 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3261 (nios2_regs_info): New function.
3262 (the_low_target): Adjust.
3263 (initialize_low_arch): New function.
3264 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3265 (aarch64_arch_setup): Set the current process'es tdesc.
3266 (target_regsets): Rename to ...
3267 (aarch64_regsets): ... this.
3268 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3269 (aarch64_regs_info): New function.
3270 (the_low_target): Adjust.
3271 (initialize_low_arch): New function.
3272 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3273 globals.
3274 (target_regsets): Rename to ...
3275 (tile_regsets): ... this.
3276 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3277 (tile_regs_info): New function.
3278 (tile_arch_setup): Set the current process'es tdesc.
3279 (the_low_target): Adjust.
3280 (initialize_low_arch): New function.
3281 * spu-low.c (tdesc_spu): Declare.
3282 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3283 * win32-arm-low.c (tdesc_arm): Declare.
3284 (arm_arch_setup): New function.
3285 (the_low_target): Install arm_arch_setup instead of
3286 init_registers_arm.
3287 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3288 (init_windows_x86): Rename to ...
3289 (i386_arch_setup): ... this. Set `win32_tdesc'.
3290 (the_low_target): Adjust.
3291 * win32-low.c (win32_tdesc): New global.
3292 (child_add_thread): Don't create the thread cache here.
3293 (do_initial_child_stuff): Set the new process'es tdesc.
3294 * win32-low.h (struct target_desc): Forward declare.
3295 (win32_tdesc): Declare.
3296 * lynx-i386-low.c (tdesc_i386): Declare global.
3297 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3298 * lynx-low.c (lynx_tdesc): New global.
3299 (lynx_add_process): Set the new process'es tdesc.
3300 * lynx-low.h (struct target_desc): Forward declare.
3301 (lynx_tdesc): Declare global.
3302 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3303 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3304 * nto-low.c (nto_tdesc): New global.
3305 (do_attach): Set the new process'es tdesc.
3306 * nto-low.h (struct target_desc): Forward declare.
3307 (nto_tdesc): Declare.
3308 * nto-x86-low.c (tdesc_i386): Declare.
3309 (nto_x86_arch_setup): Set `nto_tdesc'.
3310
3311 2013-06-04 Gary Benson <gbenson@redhat.com>
3312
3313 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3314 to qSupported response when appropriate.
3315 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3316 with nonzero-length annex.
3317 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3318 arguments supplied in annex.
3319
3320 2013-05-31 Doug Evans <dje@google.com>
3321
3322 PR server/15594
3323 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3324 64 bits in 64-cross-32 environment.
3325
3326 2013-05-28 Pedro Alves <palves@redhat.com>
3327
3328 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3329 (aarch64-without-fpu.c): Delete rule.
3330 * configure.srv (aarch64*-*-linux*): Remove references to
3331 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3332 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3333 declaration.
3334
3335 2013-05-24 Pedro Alves <palves@redhat.com>
3336
3337 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3338 instead of strchr/decode_address. Error if the range isn't split
3339 with a ','. Don't assume there's be a ':' in the action.
3340
3341 2013-05-23 Yao Qi <yao@codesourcery.com>
3342 Pedro Alves <palves@redhat.com>
3343
3344 * linux-low.c (lwp_in_step_range): New function.
3345 (linux_wait_1): If the thread was range stepping and stopped
3346 outside the stepping range, report the stop to GDB. Otherwise,
3347 continue stepping. Add range stepping debug output.
3348 (linux_set_resume_request): Copy the step range from the resume
3349 request to the lwp.
3350 (linux_supports_range_stepping): New.
3351 (linux_target_ops) <supports_range_stepping>: Set to
3352 linux_supports_range_stepping.
3353 * linux-low.h (struct linux_target_ops)
3354 <supports_range_stepping>: New field.
3355 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3356 * linux-x86-low.c (x86_supports_range_stepping): New.
3357 (the_low_target) <supports_range_stepping>: Set to
3358 x86_supports_range_stepping.
3359 * server.c (handle_v_cont): Handle 'r' action.
3360 (handle_v_requests): Append ";r" if the target supports range
3361 stepping.
3362 * target.h (struct thread_resume) <step_range_start,
3363 step_range_end>: New fields.
3364 (struct target_ops) <supports_range_stepping>:
3365 New field.
3366 (target_supports_range_stepping): New macro.
3367
3368 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3369
3370 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3371 confusion in comment.
3372
3373 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3374
3375 * lynx-low.c (struct process_info_private): New type.
3376 (lynx_add_process): New function.
3377 (lynx_create_inferior, lynx_attach): Replace calls to
3378 add_process by calls to lynx_add_process.
3379 (lynx_resume): If PTID is null, then try using
3380 current_process()->private->last_wait_event_ptid.
3381 Add comments.
3382 (lynx_clear_inferiors): Delete. The contents of that function
3383 has been inlined in lynx_mourn;
3384 (lynx_wait_1): Save the ptid in the process's private data.
3385 (lynx_mourn): Free the process' private data. Replace call
3386 to lynx_clear_inferiors by call to clear_inferiors.
3387
3388 2013-05-17 Yao Qi <yao@codesourcery.com>
3389
3390 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3391 the right place.
3392
3393 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3394
3395 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3396 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3397 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3398 PT_TEXT_END_ADDR guards. Update comments.
3399 (linux_target_op) <read_offsets>: Conditionally define to
3400 linux_read_offsets if the target is UCLIBC and if it defines
3401 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3402
3403 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3404 Andrew Jenner <andrew@codesourcery.com>
3405
3406 * Makefile.in (SFILES): Add linux-nios2-low.c.
3407 (clean): Add action to delete nios2-linux.c.
3408 (nios2-linux.c): New rule.
3409 * configure.srv: Add nios2*-*-linux*.
3410 * linux-nios2-low.c: New.
3411
3412 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3413
3414 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3415
3416 2013-04-25 Hui Zhu <hui@codesourcery.com>
3417
3418 PR gdb/15186
3419 * ax.c (ax_printf): Add fflush.
3420
3421 2013-04-22 Tom Tromey <tromey@redhat.com>
3422
3423 * Makefile.in (SFILES): Add filestuff.c.
3424 (OBS): Add filestuff.o.
3425 (filestuff.o): New target.
3426 * config.in, configure: Rebuild.
3427 * configure.ac: Check for fdwalk, pipe2.
3428
3429 2013-04-17 Pedro Alves <palves@redhat.com>
3430
3431 * configure.ac (USE_THREAD_DB): Delete variable.
3432 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3433 Don't AC_SUBST USE_THREAD_DB.
3434 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3435 * config.in, configure: Regenerate.
3436
3437 2013-04-16 Pedro Alves <palves@redhat.com>
3438
3439 * linux-low.h (struct lwp_info) <thread_known>: Move under
3440 the USE_THREAD_DB #ifdef.
3441
3442 2013-04-16 Pedro Alves <palves@redhat.com>
3443
3444 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3445 (linux-low.o): Delete rule.
3446 * linux-low.h: Always include "gdb_thread_db.h" instead of
3447 conditionally including thread_db.h.
3448 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3449 HAVE_THREAD_DB_H.
3450
3451 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3452
3453 * Makefile.in (install-only): Fix make install regression.
3454
3455 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3456
3457 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3458 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3459 installation.
3460 * gdbserver.1: Remove.
3461
3462 2013-03-22 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (handle_extended_wait): Don't call
3465 linux_enable_event_reporting.
3466
3467 2013-03-15 Tony Theodore <tonyt@logyst.com>
3468
3469 PR build/9098:
3470 * Makefile.in (SHELL): Use @SHELL@.
3471
3472 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3473
3474 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3475 compiler warning.
3476
3477 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3478
3479 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3480 Remove extraneous NULL element.
3481
3482 2013-03-13 Yao Qi <yao@codesourcery.com>
3483
3484 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3485 'V' block in trace frame.
3486
3487 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3488
3489 * target.h (struct target_ops): Add btrace ops.
3490 (target_supports_btrace): New macro.
3491 (target_enable_btrace): New macro.
3492 (target_disable_btrace): New macro.
3493 (target_read_btrace): New macro.
3494 * gdbthread.h (struct thread_info): Add btrace field.
3495 * server.c: Include btrace-common.h.
3496 (handle_btrace_general_set): New function.
3497 (handle_btrace_enable): New function.
3498 (handle_btrace_disable): New function.
3499 (handle_general_set): Call handle_btrace_general_set.
3500 (handle_qxfer_btrace): New function.
3501 (struct qxfer qxfer_packets[]): Add btrace entry.
3502 * inferiors.c (remove_thread): Disable btrace.
3503 * linux-low: Include linux-btrace.h.
3504 (linux_low_enable_btrace): New function.
3505 (linux_low_read_btrace): New function.
3506 (linux_target_ops): Add btrace ops.
3507 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3508 Add srv_linux_btrace=yes.
3509 (x86_64-*-linux*): Add linux-btrace.o.
3510 Add srv_linux_btrace=yes.
3511 * configure.ac: Define HAVE_LINUX_BTRACE.
3512 * config.in: Regenerated.
3513 * configure: Regenerated.
3514
3515 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3516
3517 * server.c (handle_qxfer): Preserve error message if -3 is
3518 returned.
3519 (qxfer): Document the -3 return value.
3520
3521 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3522
3523 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3524 (linux_btrace_h): New variable.
3525 (linux-btrace.o): New rule.
3526
3527 2013-03-08 Stan Shebs <stan@codesourcery.com>
3528 Hafiz Abid Qadeer <abidh@codesourcery.com>
3529
3530 * tracepoint.c (trace_buffer_size): New global.
3531 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3532 (init_trace_buffer): Change to one-argument function. Allocate
3533 trace buffer memory.
3534 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3535 handle QTBuffer:size packet.
3536 (cmd_bigqtbuffer_size): New function.
3537 (initialize_tracepoint): Call init_trace_buffer with
3538 DEFAULT_TRACE_BUFFER_SIZE.
3539 * server.c (handle_query): Add QTBuffer:size in the
3540 supported packets.
3541
3542 2013-03-07 Yao Qi <yao@codesourcery.com>
3543
3544 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3545 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3546 of -1.
3547 (cmd_qtsp): Adjust condition. Do post increment.
3548 Set cur_action and cur_step_action back to 0.
3549
3550 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3551
3552 PR server/15236
3553 * linux-low.c (linux_write_memory): Return early success if LEN is
3554 zero.
3555
3556 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3557
3558 * configure.srv: Add x86_64-*-cygwin* as target.
3559
3560 2013-02-28 Tom Tromey <tromey@redhat.com>
3561
3562 * configure.ac: Invoke AC_SYS_LARGEFILE.
3563 * configure, config.in: Rebuild.
3564
3565 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3566
3567 * win32-low.c: Throughout, fix format strings and casts of
3568 printf-like functions to avoid type related warnings on all
3569 platforms.
3570 (get_child_debug_event): Print dwDebugEventCode as hex since
3571 that's how it's usually documented.
3572
3573 2013-02-28 Yao Qi <yao@codesourcery.com>
3574
3575 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3576 pulongest.
3577
3578 2013-02-27 Jiong Wang <jiwang@tilera.com>
3579
3580 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3581 (reg-tilegx32.c): New rule.
3582 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3583 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3584 different register info initializer according to elf class.
3585 (init_registers_tilgx32): New function. The tilegx32 register info
3586 initializer.
3587 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3588 (tile_store_gregset): Likewise.
3589
3590 2013-02-27 Yao Qi <yao@codesourcery.com>
3591
3592 * server.c (process_point_options): Print debug message when
3593 debug_threads is true.
3594
3595 2013-02-26 Yao Qi <yao@codesourcery.com>
3596
3597 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3598
3599 2013-02-19 Pedro Alves <palves@redhat.com>
3600 Kai Tietz <ktietz@redhat.com>
3601
3602 PR gdb/15161
3603
3604 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3605 instead of strtoul to extract address from packet.
3606 (process_serial_event) <'z'>: Likewise.
3607
3608 2013-02-18 Yao Qi <yao@codesourcery.com>
3609
3610 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3611
3612 2013-02-14 Pedro Alves <palves@redhat.com>
3613
3614 Plug memory leak.
3615
3616 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3617 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3618
3619 2013-02-14 Pedro Alves <palves@redhat.com>
3620
3621 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3622
3623 2013-02-14 Pedro Alves <palves@redhat.com>
3624
3625 * tracepoint.c (save_string): Delete.
3626 (add_tracepoint_action): Use savestring instead of save_string.
3627
3628 2013-02-12 Pedro Alves <palves@redhat.com>
3629
3630 * linux-xtensa-low.c: Ditto.
3631 * xtensa-xtregs.c: Ditto.
3632
3633 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3634
3635 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3636 thread_db.
3637
3638 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3639
3640 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3641 aarch64_num_wp_regs and aarch64_num_bp_regs to
3642 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3643
3644 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3645
3646 * linux-aarch64-low.c (ps_get_thread_area): Replace
3647 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3648
3649 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3650 Marcus Shawcroft <marcus.shawcroft@arm.com>
3651 Nigel Stephens <nigel.stephens@arm.com>
3652 Yufeng Zhang <yufeng.zhang@arm.com>
3653
3654 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3655 (aarch64.c, aarch64-without-fpu.c): New targets.
3656 * configure.srv (aarch64*-*-linux*): New.
3657 * linux-aarch64-low.c: New file.
3658
3659 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3660
3661 * linux-low.c (handle_extended_wait, linux_create_inferior)
3662 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3663 (dequeue_one_deferred_signal, linux_resume_one_thread)
3664 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3665 (linux_tracefork_grandchild, linux_test_for_tracefork)
3666 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3667 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3668 where the argument is 0.
3669
3670 2013-01-25 Yao Qi <yao@codesourcery.com>
3671
3672 * event-loop.c: Include "queue.h".
3673 (gdb_event_p): New typedef.
3674 (struct gdb_event) <next_event>: Remove.
3675 (event_queue): Change to QUEUE(gdb_event_p).
3676 (async_queue_event): Remove.
3677 (gdb_event_xfree): New.
3678 (initialize_event_loop): New.
3679 (process_event): Use API from QUEUE.
3680 (wait_for_event): Likewise.
3681 * server.c (main): Call initialize_event_loop.
3682 * server.h (initialize_event_loop): Declare.
3683
3684 2013-01-18 Yao Qi <yao@codesourcery.com>
3685
3686 * ax.h (struct eval_agent_expr_context): New.
3687 (gdb_eval_agent_expr): Update declaration.
3688 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3689 TFRAME. Add new argument CTX.
3690 * server.h (struct eval_agent_expr_context): Declare.
3691 (agent_mem_read, agent_tsv_read): Update declaration.
3692 (agent_mem_read_string): Likewise.
3693 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3694 (add_traceframe_block): Add new argument TPOINT.
3695 Increase TPOINT->traceframe_usage.
3696 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3697 eval_tracepoint_agent_expr.
3698 (condition_true_at_tracepoint): Likewise.
3699 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3700 (agent_mem_read_string, agent_tsv_read): Likewise.
3701
3702 2013-01-16 Yao Qi <yao@codesourcery.com>
3703
3704 * linux-low.c (linux_resume_one_lwp): Don't check
3705 'lwp->bp_reinsert != 0'.
3706
3707 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3708 Pedro Alves <palves@redhat.com>
3709
3710 * lynx-low.c (ptrace_request_to_str): Define a temporary
3711 macro and use it to simplify this function's implementation.
3712
3713 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3714
3715 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3716 sets errno.
3717
3718 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3719
3720 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3721
3722 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3723
3724 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3725
3726 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3727
3728 * lynx-low.c (lynx_resume): Use the resume_info parameter
3729 to determine the ptid for the lynx_ptrace call, unless
3730 it is equal to minus_one_ptid, in which case we use the
3731 ptid of the current_inferior.
3732 (lynx_wait_1): After having received a thread create/exit
3733 event, resume the inferior's execution using the signaling
3734 thread's ptid, rather than the old ptid.
3735
3736 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3737
3738 * lynx-low.c (lynx_resume): Delete variable ret.
3739
3740 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3741
3742 * gdbreplay.c (gdbreplay_version): Update copyright year.
3743 * server.c (gdbserver_version): Likewise.
3744
3745 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3746
3747 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3748 new thread.
3749
3750 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3751
3752 * lynx-low.c (ptrace_request_to_str): Add handling for
3753 PTRACE_GETTRACESIG.
3754
3755 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3756
3757 * lynx-low.c (lynx_attach): Delete variable new_process.
3758
3759 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3760
3761 * lynx-low.c (lynx_create_inferior): Delete variable
3762 new_process.
3763
3764 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3765
3766 * lynx-low.c (ptrace_request_to_str): Do not handle
3767 PTRACE_GETTHREADLIST if this macro does not exist.
3768
3769 2012-12-15 Yao Qi <yao@codesourcery.com>
3770
3771 * Makefile.in (OBS): Add notif.o.
3772 * notif.c, notif.h: New.
3773 * server.c: Include "notif.h".
3774 (struct vstop_notif) <next>: Remove.
3775 <base>: New field.
3776 (queue_stop_reply): Update.
3777 (push_event, send_next_stop_reply): Remove.
3778 (discard_queued_stop_replies): Update.
3779 (notif_stop): New variable.
3780 (handle_v_stopped): Remove.
3781 (handle_v_requests): Don't call handle_v_stopped. Call
3782 handle_ack_notif instead.
3783 (queue_stop_reply_callback): Call notif_event_enque instead
3784 of queue_stop_reply.
3785 (handle_status): Don't call send_next_stop_reply, call
3786 notif_write_event instead.
3787 (kill_inferior_callback): Likewise.
3788 (detach_or_kill_inferior_callback): Likewise.
3789 (main): Call initialize_notif.
3790 (process_serial_event): Call QUEUE_is_empty.
3791 (handle_target_event): Call notif_push instead of push event.
3792 * server.h (push_event): Remove declaration.
3793
3794 2012-12-10 Tom Tromey <tromey@redhat.com>
3795
3796 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3797 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3798 macros.
3799 (.c.o): Rewrite.
3800 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3801 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3802 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3803 (amd64-linux-ipa.o, ax.o): Rewrite.
3804 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3805 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3806 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3807 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3808 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3809 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3810 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3811 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3812 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3813 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3814 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3815 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3816 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3817 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3818 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3819 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3820 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3821 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3822 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3823 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3824 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3825 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3826 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3827 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3828 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3829 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3830 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3831 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3832 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3833 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3834 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3835 (reg-tilegx.o): Remove.
3836 (all_object_files): New macro.
3837 Include .deps files.
3838 * aclocal.m4, configure: Rebuild.
3839 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3840 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3841 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3842
3843 2012-12-05 Tom Tromey <tromey@redhat.com>
3844
3845 PR gdb/14917:
3846 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3847
3848 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3849
3850 * configure.ac: Check for linux/perf_event.h.
3851 * config.in: Regenerated.
3852 * configure: Regenerated.
3853
3854 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3855
3856 * hostio.c (handle_readlink): Decrease buffer size
3857 parameter passed to readlink by one byte.
3858
3859 2012-11-26 Yao Qi <yao@codesourcery.com>
3860
3861 * configure.ac (build_warnings): Append '-Wempty-body'.
3862 * configure: Regenerated.
3863 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3864 body.
3865
3866 2012-11-15 Pierre Muller <muller@sourceware.org>
3867
3868 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3869 * config.in: Regenerate.
3870 * configure: Regenerate.
3871 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3872 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3873 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3874 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3875 header.
3876 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3877 instead of <sys/wait.h> header.
3878 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3879
3880 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3881
3882 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3883 (various make rules): Remove -DGDBSERVER
3884
3885 2012-11-09 Yao Qi <yao@codesourcery.com>
3886
3887 * spu-low.c (current_ptid): Move it to ..
3888 * gdbthread.h: ... here. New.
3889 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3890 * server.c (myresume, process_serial_event): Likewise.
3891 * thread-db.c (thread_db_find_new_threads): Likewise.
3892 * tracepoint.c (run_inferior_command): Likewise.
3893
3894 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3895
3896 * server.c (handle_search_memory_1): Include access length in
3897 warning message.
3898
3899 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3900
3901 * linux-crisv32-low.c: Fix compile errors.
3902
3903 2012-09-04 Yao Qi <yao@codesourcery.com>
3904
3905 * tracepoint.c (cmd_qtsv): Adjust debug message.
3906 Don't check CUR_TPOINT.
3907
3908 2012-08-28 Yao Qi <yao@codesourcery.com>
3909
3910 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3911 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3912 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3913 Remove declarations of xmalloc, xreallloc, xstrdup and
3914 freeargv.
3915 * Makefile.in (libiberty_h): New.
3916 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3917 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3918
3919 2012-08-23 Yao Qi <yao@codesourcery.com>
3920
3921 * server.h: Remove declaration of 'xsnprintf'.
3922
3923 2012-08-22 Keith Seitz <keiths@redhat.com>
3924
3925 * server.h: Include build-gnulib-gbserver/config.h.
3926 * gdbreplay.c: Likewise.
3927
3928 2012-08-08 Doug Evans <dje@google.com>
3929
3930 * Makefile.in (SFILES): Add gdb_vecs.c.
3931 (OBS): Add gdb_vecs.o.
3932 (gdb_vecs_h, host_defs_h): New variables.
3933 (thread-db.o): Add $(gdb_vecs_h) dependency.
3934 (gdb_vecs.o): New rule.
3935 * thread-db.c: #include "gdb_vecs.h".
3936 (thread_db_load_search): Use a vector to iterate over path elements.
3937 Handle text appearing after "$pdir".
3938
3939 * configure.ac: Add check for strstr.
3940 * config.in: Regenerate.
3941 * configure: Regenerate.
3942
3943 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3944
3945 * hostio.c (handle_pread): If pread fails, fall back to attempting
3946 lseek/read.
3947 (handle_pwrite): Likewise for pwrite.
3948
3949 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3950
3951 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3952 between unsupported TYPE and unimplementable ADDR/LEN combination.
3953 (arm_insert_point): Act on new return value.
3954
3955 2012-07-31 Pedro Alves <palves@redhat.com>
3956
3957 * server.c (process_point_options): Only skip tokens if we find
3958 one that is unrecognized. Don't treat 'X' specially while
3959 skipping unrecognized tokens.
3960
3961 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3962
3963 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3964 to 4-byte-align HW breakpoint addresses for Thumb.
3965
3966 2012-07-27 Yao Qi <yao@codesourcery.com>
3967
3968 PR remote/14161.
3969
3970 * server.h: Declare gdb_agent_about_to_close.
3971 * target.c (kill_inferior): Include "agent.h".
3972 New. Send command 'kill'.
3973 * target.h (kill_inferior): Removed macro.
3974 * tracepoint.c (gdb_agent_about_to_close): New.
3975 (gdb_agent_helper_thread): Handle command 'close'.
3976 Wait endlessly until the inferior stops.
3977 Install gdb_agent_remove_socket to atexit hook.
3978 (agent_socket_name): New static variable.
3979 (gdb_agent_socket_init): Replace local variable 'name' with
3980 'agent_socket_name'.
3981 (gdb_agent_remove_socket): New.
3982
3983 2012-07-27 Yao Qi <yao@codesourcery.com>
3984
3985 * server.c (process_point_options): Stop at 'X' when parsing.
3986
3987 2012-07-19 Michael Eager <eager@eagercon.com>
3988
3989 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3990 to hw_execute.
3991 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3992 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3993 hardware breakpoint.
3994
3995 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3996
3997 * gdbserver/linux-low.c (initialize_low): Call
3998 linux_ptrace_init_warnings.
3999
4000 2012-07-02 Doug Evans <dje@google.com>
4001
4002 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4003 pointer to int.
4004
4005 2012-07-02 Stan Shebs <stan@codesourcery.com>
4006
4007 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4008 (ax.o): Add it to build rule.
4009 (ax-ipa.o): Ditto.
4010 (OBS): Add format.o.
4011 (IPA_OBS): Add format.o.
4012 * server.c (handle_query): Claim support for breakpoint commands.
4013 (process_point_options): Add command case.
4014 (process_serial_event): Leave running if there are printfs in
4015 effect.
4016 * mem-break.h (any_persistent_commands): Declare.
4017 (add_breakpoint_commands): Declare.
4018 (gdb_no_commands_at_breakpoint): Declare.
4019 (run_breakpoint_commands): Declare.
4020 * mem-break.c (struct point_command_list): New struct.
4021 (struct breakpoint): New field command_list.
4022 (any_persistent_commands): New function.
4023 (add_commands_to_breakpoint): New function.
4024 (add_breakpoint_commands): New function.
4025 (gdb_no_commands_at_breakpoint): New function.
4026 (run_breakpoint_commands): New function.
4027 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4028 locally.
4029 * ax.c: Include format.h.
4030 (ax_printf): New function.
4031 (gdb_eval_agent_expr): Add printf opcode.
4032
4033 2012-06-13 Yao Qi <yao@codesourcery.com>
4034
4035 * server.c (start_inferior): Remove duplicated writes to fields
4036 'last_resume_kind' and 'last_status' of 'current_inferior'.
4037
4038 2012-06-12 Yao Qi <yao@codesourcery.com>
4039 Pedro Alves <palves@redhat.com>
4040
4041 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4042 comment.
4043 * server.c (handle_v_cont): Extend comment.
4044
4045 2012-06-11 Yao Qi <yao@codesourcery.com>
4046
4047 * linux-low.c (linux_attach): Add 'static'.
4048
4049 2012-06-06 Yao Qi <yao@codesourcery.com>
4050
4051 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4052
4053 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4054
4055 Fix gcc -flto compilation warning.
4056 * server.c (main): Make variable multi_mode and attach volatile.
4057
4058 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4059
4060 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4061 if the platform doesn't know about it.
4062
4063 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4064
4065 * Makefile.in (SFILES): Add linux-tile-low.c.
4066 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4067 * configure.srv: Handle tilegx-*-linux*.
4068 * linux-tile-low.c: New file.
4069
4070 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4071
4072 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4073
4074 2012-05-24 Pedro Alves <palves@redhat.com>
4075
4076 PR gdb/7205
4077
4078 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4079
4080 2012-05-24 Pedro Alves <palves@redhat.com>
4081
4082 PR gdb/7205
4083
4084 Replace target_signal with gdb_signal throughout.
4085
4086 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4087
4088 * linux-low.c (linux_store_registers): Avoid the copying sequence
4089 when no data has been retrieved by ptrace.
4090
4091 2012-05-22 Will Deacon <will.deacon@arm.com>
4092
4093 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4094 Include asm/ptrace.h.
4095 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4096 already defined.
4097
4098 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4099
4100 * linux-low.c (linux_store_registers): Don't re-retrieve data
4101 with ptrace that has already been obtained from /proc. Always
4102 copy any data retrieved with ptrace to the buffer supplied.
4103
4104 2012-05-11 Yao Qi <yao@codesourcery.com>
4105 Pedro Alves <palves@redhat.com>
4106
4107 * linux-low.c (enum stopping_threads_kind): New.
4108 (stopping_threads): Change type to `enum stopping_threads_kind'.
4109 (handle_extended_wait): If stopping and suspending threads, leave
4110 the new_lwp suspended too.
4111 (linux_wait_for_event): Adjust.
4112 (stop_all_lwps): Set `stopping_threads' to
4113 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4114 whether we're suspending threads or just stopping them. Assert no
4115 recursion happens.
4116
4117 2012-04-29 Yao Qi <yao@codesourcery.com>
4118
4119 * server.h: Move some code to ...
4120 * gdbthread.h: ... here. New.
4121 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4122 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4123 (nto-low.o, win32-low.o): Likewise.
4124 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4125 * regcache.c, remote-utils.c, server.c: Likewise.
4126 * target.c, tracepoint.c, win32-low.c: Likewise.
4127
4128 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4129
4130 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4131 (PTRACE_ARG4_TYPE): Likewise.
4132 (PTRACE_XFER_TYPE): Likewise.
4133 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4134 ptrace to PTRACE_ARG3_TYPE.
4135 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4136 (PTRACE_ARG4_TYPE): Likewise.
4137 (PTRACE_XFER_TYPE): Likewise.
4138 (linux_detach_one_lwp): Cast fourth argument of
4139 ptrace to long then PTRACE_ARG4_TYPE.
4140 (regsets_fetch_inferior_registers): Cast third argument of
4141 ptrace to long then PTRACE_ARG3_TYPE.
4142 (regsets_store_inferior_registers): Likewise.
4143
4144 2012-04-20 Pedro Alves <palves@redhat.com>
4145
4146 * configure: Regenerate.
4147
4148 2012-04-19 Pedro Alves <palves@redhat.com>
4149
4150 * Makefile.in (GNULIB_BUILDDIR): New.
4151 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4152 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4153 (all, install-only, uninstall, clean-info, all-lib, clean): No
4154 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4155 (maintainer-clean realclean distclean): Use subdir_do.
4156 (subdir_do): New.
4157 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4158 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4159 * acinclude.m4: Include acx_configure_dir.m4.
4160 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4161 calls. Call AC_PROG_RANLIB. Configure gnulib using
4162 ACX_CONFIGURE_DIR.
4163 (GNULIB): New.
4164 (GNULIB_STDINT_H): Adjust.
4165 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4166 * gdbreplay.c: Include build-gnulib/config.h.
4167 * server.h: Likewise.
4168 * aclocal.m4: Regenerate.
4169 * config.in: Regenerate.
4170 * configure: Regenerate.
4171
4172 2012-04-19 Pedro Alves <palves@redhat.com>
4173
4174 * Makefile.in (LIBGNU, INCGNU): Adjust.
4175 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4176 (all, install-only, uninstall, clean-info, all-lib, clean)
4177 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4178 * configure.ac: Adjust AC_OUTPUT output.
4179 * aclocal.m4: Regenerate.
4180 * configure: Regenerate.
4181
4182 2012-04-19 Pedro Alves <palves@redhat.com>
4183
4184 * Makefile.in (generated_files): New.
4185 (server_h): Remove the explicit dependency on config.h, and depend
4186 on $generated_files.
4187
4188 2012-04-19 Pedro Alves <palves@redhat.com>
4189
4190 * Makefile.in (INCGNU): Add -Ignulib.
4191
4192 2012-04-19 Pedro Alves <palves@redhat.com>
4193
4194 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4195 (INCGNU): ... this, and spell out -I here.
4196 (GNULIB_LIB): Rename to ...
4197 (LIBGNU): ... this.
4198 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4199
4200 2012-04-19 Pedro Alves <palves@redhat.com>
4201
4202 * config.in: Regenerate.
4203
4204 2012-04-19 Pedro Alves <palves@redhat.com>
4205
4206 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4207 * server.h (memmem): Remove declaration.
4208 * config.in: Regenerate.
4209 * configure: Regenerate.
4210
4211 2012-04-19 Yao Qi <yao@codesourcery.com>
4212
4213 * Makefile.in (SFILES): Add common/vec.c.
4214 (OBS): Add vec.o.
4215 (vec.o): New rule.
4216
4217 2012-04-19 Yao Qi <yao@codesourcery.com>
4218
4219 * remote-utils.c (prepare_resume_reply): Replace with macro
4220 target_core_of_thread.
4221 * server.c (handle_qxfer_threads_proper): Likewise.
4222 * target.h (traget_core_of_thread): New macro.
4223
4224 2012-04-18 Pedro Alves <palves@redhat.com>
4225
4226 * aclocal.m4: Regenerate.
4227 * configure: Regenerate.
4228
4229 2012-04-16 Yao Qi <yao@codesourcery.com>
4230
4231 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4232 duplicated on address.
4233
4234 2012-04-16 Yao Qi <yao@codesourcery.com>
4235
4236 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4237 (struct tracepoint_action_ops) <send>: New field.
4238 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4239 (agent_expr_send, x_tracepoint_action_send): New.
4240 (l_tracepoint_action_send): New.
4241 (cmd_qtdp): Download and install tracepoint
4242 according to `use_agent'.
4243 (run_inferior_command): Add one more parameter `len'.
4244 Update callers.
4245 (tracepoint_send_agent): New.
4246 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4247
4248 2012-04-16 Yao Qi <yao@codesourcery.com>
4249
4250 * tracepoint.c (download_tracepoints): Moved to ...
4251 (cmd_qtstart): ... here.
4252
4253 2012-04-14 Yao Qi <yao@codesourcery.com>
4254
4255 * tracepoint.c: Include inttypes.h.
4256 (struct collect_memory_action): Use sized types.
4257 (struct tracepoint): Likewise.
4258 (cmd_qtdp, stop_tracing): Update print specifiers.
4259 (cmd_qtp, response_tracepoint): Likewise.
4260 (collect_data_at_tracepoint): Likewise.
4261 (collect_data_at_step): Likewise.
4262
4263 2012-04-14 Yao Qi <yao@codesourcery.com>
4264
4265 Import gnulib module inttypes.
4266 * aclocal.m4, config.in, configure: Regenerated.
4267
4268 2012-04-14 Yao Qi <yao@codesourcery.com>
4269
4270 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4271 Makefile and config.status at last.
4272
4273 2012-04-13 Yao Qi <yao@codesourcery.com>
4274
4275 * tracepoint.c: Include stdint.h unconditionally.
4276
4277 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4278
4279 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4280 on BFD_HAVE_SYS_PROCFS_TYPE.
4281 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4282 * configure: Regenerate.
4283 * config.in: Likewise.
4284
4285 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4286
4287 * Makefile.in (clean): Also remove x32.c x32-linux.c
4288 x32-avx.c x32-avx-linux.c.
4289 (x32.o): New target.
4290 (x32.c): Likewise.
4291 (x32-linux.o): Likewise.
4292 (x32-linux.c): Likewise.
4293 (x32-avx.o): Likewise.
4294 (x32-avx.c): Likewise.
4295 (x32-avx-linux.o): Likewise.
4296 (x32-avx-linux.c): Likewise.
4297
4298 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4299 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4300 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4301 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4302 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4303 i386/x32-avx-linux.xml.
4304
4305 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4306 (init_registers_x32_avx_linux): Likwise.
4307 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4308 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4309
4310 2012-04-13 Pedro Alves <palves@redhat.com>
4311
4312 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4313 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4314 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4315 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4316 the sub-make.
4317
4318 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4319
4320 * linux-x86-low.c (compat_x32_clock_t): New.
4321 (compat_x32_siginfo_t): Likewise.
4322 (compat_x32_siginfo_from_siginfo): Likewise.
4323 (siginfo_from_compat_x32_siginfo): Likewise.
4324 (linux_is_elf64): Likewise.
4325 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4326 and siginfo_from_compat_x32_siginfo for x32.
4327 (x86_arch_setup): Set linux_is_elf64.
4328
4329 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4330
4331 PR gdb/13969
4332 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4333 e_machine field.
4334 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4335 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4336 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4337 compatible with process.
4338
4339 2012-04-12 Yao Qi <yao@codesourcery.com>
4340
4341 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4342 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4343 (install-only, install-info, clean): Handle sub dir gnulib.
4344 (all-lib, am--refresh): New targets.
4345 (memmem.o): Remove target.
4346 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4347 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4348 (AC_REPLACE_FUNCS): Remove memmem.
4349 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4350 (AC_OUTPUT): Generate Makefile in gnulib/.
4351 * aclocal.m4, config.in, configure: Regenerated.
4352
4353 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4354
4355 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4356
4357 2012-04-05 Pedro Alves <palves@redhat.com>
4358
4359 -Werror=strict-aliasing
4360
4361 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4362 pointer.
4363
4364 2012-04-04 Pedro Alves <palves@redhat.com>
4365
4366 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4367 (sparc_store_gregset_from_stack, sparc_store_gregset)
4368 (sparc_breakpoint_at): Fix formatting.
4369
4370 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4371
4372 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4373 are available.
4374 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4375 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4376 * config.in: Regenerate.
4377 * configure: Likewise.
4378
4379 2012-03-29 Pedro Alves <palves@redhat.com>
4380
4381 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4382 Correct ptrace arguments.
4383
4384 2012-03-28 Pedro Alves <palves@redhat.com>
4385
4386 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4387 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4388 (IA64_FR1_REGNUM): New defines.
4389 (ia64_fetch_register): New.
4390 (the_low_target): Install it.
4391 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4392 field.
4393 * linux-low.c (linux_fetch_registers): Try the
4394 the_low_target.fetch_register hook first.
4395
4396 * linux-arm-low.c (the_low_target): Adjust.
4397 * linux-bfin-low.c (the_low_target): Adjust.
4398 * linux-cris-low.c (the_low_target): Adjust.
4399 * linux-crisv32-low.c (the_low_target): Adjust.
4400 * linux-m32r-low.c (the_low_target): Adjust.
4401 * linux-m68k-low.c (the_low_target): Adjust.
4402 * linux-mips-low.c (the_low_target): Adjust.
4403 * linux-ppc-low.c (the_low_target): Adjust.
4404 * linux-s390-low.c (the_low_target): Adjust.
4405 * linux-sh-low.c (the_low_target): Adjust.
4406 * linux-sparc-low.c (the_low_target): Adjust.
4407 * linux-tic6x-low.c (the_low_target): Adjust.
4408 * linux-x86-low.c (the_low_target): Adjust.
4409 * linux-xtensa-low.c (the_low_target): Adjust.
4410
4411 2012-03-26 Pedro Alves <palves@redhat.com>
4412
4413 * server.c (handle_qxfer_libraries): Don't bail early if
4414 the_target->qxfer_libraries_svr4 is not NULL.
4415
4416 2012-03-26 Pedro Alves <palves@redhat.com>
4417
4418 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4419
4420 2012-03-23 Pedro Alves <palves@redhat.com>
4421
4422 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4423 "library-list-svr4" element's start tag when the the DSO list is
4424 empty.
4425
4426 2012-03-23 Pedro Alves <palves@redhat.com>
4427
4428 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4429 a variable whose type size is the same as the inferior's pointer
4430 size.
4431
4432 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4433
4434 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4435 struct siginfo.
4436 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4437 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4438 * linux-low.h: Include <signal.h>.
4439 (struct siginfo): Remove forward declaration.
4440 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4441 struct siginfo.
4442
4443 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4444
4445 * .gitignore: Ignore more files.
4446
4447 2012-03-19 Pedro Alves <palves@redhat.com>
4448 Jan Kratochvil <jan.kratochvil@redhat.com>
4449
4450 * server.c (cont_thread, general_thread): Add describing comments.
4451 (start_inferior): Clear `cont_thread'.
4452 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4453 of a process.
4454
4455 2012-03-15 Yao Qi <yao@codesourcery.com>
4456
4457 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4458 handling to ...
4459 (cmd_qtdp): ... here.
4460
4461 2012-03-15 Yao Qi <yao@codesourcery.com>
4462
4463 * tracepoint.c (struct tracepoint_action_ops): New.
4464 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4465 (m_tracepoint_action_download): New.
4466 (r_tracepoint_action_download): New.
4467 (x_tracepoint_action_download): New.
4468 (l_tracepoint_action_download): New.
4469 (add_tracepoint_action): Install `action->ops' according type.
4470 (download_tracepoint_1): Move code `download' function pointer
4471 of various tracepoint_action_ops.
4472
4473 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4474
4475 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4476 linux_ptrace_attach_warnings.
4477
4478 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4479
4480 * Makefile.in (linux-ptrace.o): New.
4481 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4482 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4483 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4484 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4485 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4486 of these targets.
4487 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4488
4489 2012-03-08 Yao Qi <yao@codesourcery.com>
4490 Pedro Alves <palves@redhat.com>
4491
4492 Fix PR server/13392.
4493 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4494 offset of JMP insn.
4495 * tracepoint.c (remove_tracepoint): New.
4496 (cmd_qtdp): Call remove_tracepoint when failed to install.
4497
4498 2012-03-07 Pedro Alves <palves@redhat.com>
4499
4500 * linux-low.c (get_detach_signal): New.
4501 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4502 Pass on pending signals to PTRACE_DETACH. Check the result of the
4503 ptrace call.
4504 * server.c (program_signals, program_signals_p): New.
4505 (handle_general_set): Handle QProgramSignals.
4506 * server.h (program_signals, program_signals_p): Declare.
4507
4508 2012-03-05 Pedro Alves <palves@redhat.com>
4509 Jan Kratochvil <jan.kratochvil@redhat.com>
4510
4511 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4512 New comment why.
4513
4514 2012-03-03 Yao Qi <yao@codesourcery.com>
4515
4516 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4517 agent_look_up_symbols.
4518
4519 2012-03-03 Yao Qi <yao@codesourcery.com>
4520
4521 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4522 (linux-x86-low.o): Likewise.
4523 * server.h: Remove in_process_agent_loaded.
4524 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4525 common/agent.c.
4526 Update callers.
4527
4528 2012-03-03 Yao Qi <yao@codesourcery.com>
4529
4530 * tracepoint.c (gdb_agent_capability): New global.
4531 (in_process_agent_loaded_ust): Renamed to
4532 `in_process_agent_supports_ust'.
4533 Update callers.
4534 (in_process_agent_supports_ust): Call agent_capability_check.
4535 (clear_installed_tracepoints): Assert that agent supports
4536 agent.
4537
4538 2012-03-03 Yao Qi <yao@codesourcery.com>
4539
4540 * linux-low.c (linux_supports_agent): New.
4541 (linux_target_ops): Initialize field `supports_agent' with
4542 linux_supports_agent.
4543 * target.h (struct target_ops) <supports_agent>: New.
4544 (target_supports_agent): New macro.
4545 * server.c (handle_general_set): Handle packet 'QAgent'.
4546 (handle_query): Send `QAgent+'.
4547 * Makefile.in (server.o): Depends on agent.h.
4548
4549 2012-03-03 Yao Qi <yao@codesourcery.com>
4550
4551 * Makefile.in (OBS): Add agent.o.
4552 Add new rule for agent.o.
4553 Track dependence of tracepoint.c on agent.h.
4554 * tracepoint.c (run_inferior_command_1):
4555 (run_inferior_command): Call agent_run_command.
4556 (gdb_ust_connect_sync_socket): Deleted. Move it to
4557 common/agent.c.
4558 (resume_thread, stop_thread): Likewise.
4559 (gdb_ust_socket_init): Renamed to ...
4560 (gdb_agent_socket_init): ... New.
4561 (gdb_ust_thread): Renamed to ...
4562 (gdb_agent_helper_thread): ... New.
4563 (gdb_ust_init): Move some code to ...
4564 (gdb_agent_init): ... here. New.
4565 [HAVE_UST]: Call gdb_ust_init.
4566 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4567 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4568 * config.in, configure: Regenerated.
4569
4570 2012-03-02 Pedro Alves <palves@redhat.com>
4571
4572 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4573 * linux-low.c (struct simple_pid_list): New.
4574 (stopped_pids): New a struct simple_pid_list pointer.
4575 (add_to_pid_list, pull_pid_from_list): New.
4576 (handle_extended_wait): Don't assume the first signal new children
4577 report is SIGSTOP. Adjust call to pull_pid_from_list.
4578 (linux_wait_for_lwp): Adjust.
4579
4580 2012-03-02 Yao Qi <yao@codesourcery.com>
4581
4582 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4583 debug log.
4584
4585 2012-03-02 Yao Qi <yao@codesourcery.com>
4586
4587 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4588 `stop_pc' and `tpoint'. Update caller.
4589
4590 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4591
4592 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4593 * linux-low.c (use_linux_regsets): New macro.
4594 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4595 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4596 (linux_register_in_regsets): New function.
4597 (usr_fetch_inferior_registers): Skip registers covered by
4598 regsets.
4599 (usr_store_inferior_registers): Likewise.
4600 (usr_fetch_inferior_registers): New macro.
4601 (usr_store_inferior_registers): Likewise.
4602 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4603 (linux_store_registers): Likewise.
4604 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4605 prototype.
4606 (init_registers_mips64_dsp_linux): Likewise.
4607 (init_registers_mips_linux): New macro.
4608 (init_registers_mips_dsp_linux): Likewise.
4609 (mips_dsp_num_regs): Likewise.
4610 (DSP_BASE, DSP_CONTROL): New fallback macros.
4611 (mips_base_regs): New macro.
4612 (mips_regmap): Use it. Fix the size.
4613 (mips_dsp_regmap): New variable.
4614 (mips_dsp_regset_bitmap): Likewise.
4615 (mips_arch_setup): New function.
4616 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4617 than mips_regmap.
4618 (mips_cannot_store_register): Likewise.
4619 (the_low_target): Update .arch_setup, .num_regs and .regmap
4620 initializers. Add .regset_bitmap initializer.
4621 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4622 initializer.
4623 * linux-bfin-low.c (the_low_target): Likewise.
4624 * linux-cris-low.c (the_low_target): Likewise.
4625 * linux-crisv32-low.c (the_low_target): Likewise.
4626 * linux-ia64-low.c (the_low_target): Likewise.
4627 * linux-m32r-low.c (the_low_target): Likewise.
4628 * linux-m68k-low.c (the_low_target): Likewise.
4629 * linux-ppc-low.c (the_low_target): Likewise.
4630 * linux-s390-low.c (the_low_target): Likewise.
4631 * linux-sh-low.c (the_low_target): Likewise.
4632 * linux-sparc-low.c (the_low_target): Likewise.
4633 * linux-tic6x-low.c (the_low_target): Likewise.
4634 * linux-x86-low.c (the_low_target): Likewise.
4635 * linux-xtensa-low.c (the_low_target): Likewise.
4636 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4637 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4638 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4639 srv_xmlfiles.
4640 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4641 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4642
4643 2012-02-29 Yao Qi <yao@codesourcery.com>
4644 Pedro Alves <palves@redhat.com>
4645
4646 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4647 `step_over_finished' is true.
4648
4649 2012-02-27 Pedro Alves <palves@redhat.com>
4650
4651 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4652 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4653
4654 2012-02-27 Pedro Alves <palves@redhat.com>
4655
4656 PR server/9684
4657 * linux-low.c (pid_is_stopped): New.
4658 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4659
4660 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4661
4662 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4663 of conditions.
4664
4665 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4666
4667 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4668
4669 2012-02-24 Luis Machado <lgustavo@codesourcery>
4670
4671 * server.c (handle_query): Advertise support for target-side
4672 breakpoint condition evaluation.
4673 (process_point_options): New function.
4674 (process_serial_event): When inserting a breakpoint, check for
4675 a target-side condition that should be evaluated.
4676
4677 * mem-break.c: Include regcache.h and ax.h.
4678 (point_cond_list_t): New data structure.
4679 (breakpoint) <cond_list>: New field.
4680 (find_gdb_breakpoint_at): Make non-static.
4681 (delete_gdb_breakpoint_at): Clear any target-side
4682 conditions.
4683 (clear_gdb_breakpoint_conditions): New function.
4684 (add_condition_to_breakpoint): Likewise.
4685 (add_breakpoint_condition): Likewise.
4686 (gdb_condition_true_at_breakpoint): Likewise.
4687 (gdb_breakpoint_here): Return result directly instead
4688 of going through a local variable.
4689
4690 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4691 (clear_gdb_breakpoint_conditions): Likewise.
4692 (add_breakpoint_condition): Likewise.
4693 (gdb_condition_true_at_breakpoint): Likewise.
4694
4695 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4696 (need_step_over_p): Take target-side breakpoint condition into
4697 consideration.
4698
4699 2012-02-24 Luis Machado <lgustavo@codesourcery>
4700
4701 * server.h: Include tracepoint.h.
4702 (agent_mem_read, agent_get_trace_state_variable_value,
4703 agent_set_trace_state_variable_value,
4704 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4705 get_set_tsv_func_addr): New prototypes.
4706
4707 * ax.h: New include file.
4708 * ax.c: New source file.
4709
4710 * tracepoint.c: Include ax.h.
4711 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4712 agent_expr, eval_result_type): Move to ax.h.
4713 (parse_agent_expr): Rename to ...
4714 (gdb_parse_agent_expr): ... this, make it non-static and move
4715 to ax.h.
4716 (unparse_agent_expr) Rename to ...
4717 (gdb_unparse_agent_expr): ... this, make it non-static and move
4718 to ax.h.
4719 (eval_agent_expr): Rename to ...
4720 (eval_tracepoint_agent_expr): ... this.
4721 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4722 forward declarations.
4723 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4724 (agent_get_trace_state_variable_value): New function.
4725 (agent_set_trace_state_variable_value): New function.
4726 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4727 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4728 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4729 (condition_true_at_tracepoint): Likewise.
4730 (parse_agent_expr): Rename to ...
4731 (gdb_parse_agent_expr): ... this and move to ax.c.
4732 (unparse_agent_expr): Rename to ...
4733 (gdb_unparse_agent_expr): ... this and move to ax.c.
4734 (gdb_agent_op_name): Move to ax.c.
4735 (eval_agent_expr): Rename to ...
4736 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4737 and move to ax.c.
4738 (eval_tracepoint_agent_expr): New function.
4739 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4740 non-static.
4741 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4742 ax.c.
4743 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4744 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4745 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4746 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4747 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4748 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4749 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4750 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4751 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4752 (compile_bytecodes): Remove forward declaration.
4753 (is_goto_target): Move to ax.c.
4754 (compile_bytecodes): Move to ax.c and call
4755 agent_get_trace_state_variable_value (...) and
4756 agent_set_trace_state_variable_value (...).
4757
4758 * Makefile.in: Update ax.c and IPA dependencies.
4759
4760 2012-02-24 Pedro Alves <palves@redhat.com>
4761
4762 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4763 (cmd_bigqtbuffer_circular): ... this. Only handle
4764 'QTBuffer:circular:'.
4765 (handle_tracepoint_general_set): Adjust.
4766
4767 2012-02-16 Yao Qi <yao@codesourcery.com>
4768
4769 * inferiors.c: Move code to ...
4770 * dll.c: .... here. New.
4771 * server.h: Declare clear_dlls.
4772 * Makefile.in (SFILES): Add dll.c.
4773 (OBS): Add dll.o
4774 (dll.o): New rule.
4775
4776 2012-02-11 Yao Qi <yao@codesourcery.com>
4777
4778 * server.c: (handle_monitor_command): Add a new parameter
4779 `own_buf'.
4780 (handle_query): Update caller.
4781
4782 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4783
4784 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4785 * configure, config.in: Regenerate.
4786 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4787 is not defined.
4788
4789 2012-02-02 Pedro Alves <palves@redhat.com>
4790
4791 Try SIGKILL first, then PTRACE_KILL.
4792 * linux-low.c (linux_kill_one_lwp): New.
4793 (linux_kill_one_lwp): Rename to ...
4794 (kill_one_lwp_callback): ... this. Use the new
4795 linux_kill_one_lwp.
4796
4797 2012-02-02 Pedro Alves <palves@redhat.com>
4798
4799 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4800 inferior.
4801
4802 2012-01-27 Pedro Alves <palves@redhat.com>
4803
4804 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4805 (elf_64_file_p): Make static.
4806 (linux_pid_exe_is_elf_64_file): New.
4807 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4808 Delete declarations.
4809 (linux_pid_exe_is_elf_64_file): Declare.
4810 * linux-x86-low.c (x86_arch_setup): Use
4811 linux_pid_exe_is_elf_64_file.
4812
4813 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4814
4815 * linux-low.c (linux_wait_for_event_1): Rename to ...
4816 (linux_wait_for_event): ... here and merge it with former
4817 linux_wait_for_event - new variable wait_ptid, use it.
4818 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4819
4820 2012-01-23 Pedro Alves <palves@redhat.com>
4821
4822 * server.c (main): Avoid yet another case of infinite loop while
4823 detaching/killing after a longjmp.
4824
4825 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4826
4827 Code cleanup.
4828 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4829
4830 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4831
4832 * hostio.c (handle_readlink): New function.
4833 (handle_vFile): Call it to handle "vFile:readlink" packets.
4834
4835 2012-01-20 Pedro Alves <palves@redhat.com>
4836 Ulrich Weigand <ulrich.weigand@linaro.org>
4837
4838 * server.c (handle_v_requests): Only support vAttach and vRun to
4839 start multiple processes when in extended protocol mode.
4840
4841 2012-01-17 Pedro Alves <palves@redhat.com>
4842
4843 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4844 memalign plus mprotect to allocate the scratch buffer.
4845
4846 2012-01-13 Pedro Alves <palves@redhat.com>
4847
4848 * server.c (attach_inferior): Clear `cont_thread'.
4849
4850 2012-01-13 Pedro Alves <palves@redhat.com>
4851
4852 * server.c (main): Avoid infinite loop while detaching/killing
4853 after a longjmp.
4854
4855 2012-01-09 Doug Evans <dje@google.com>
4856
4857 * server.c (start_inferior): Set last_ptid in --wrapper case.
4858
4859 2012-01-06 Yao Qi <yao@codesourcery.com>
4860
4861 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4862 defined.
4863 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4864
4865 2012-01-04 Yao Qi <yao@codesourcery.com>
4866
4867 * tracepoint.c (cmd_qtdp): Print debug message
4868 for static tracepoint.
4869
4870 2012-01-04 Yao Qi <yao@codesourcery.com>
4871
4872 * tracepoint.c (trace_vdebug): Differentiate debug message
4873 between gdbserver and IPA.
4874
4875 2012-01-03 Yao Qi <yao@codesourcery.com>
4876
4877 * tracepoint.c (tracepoint_was_hit): Don't collect for
4878 static tracepoint.
4879
4880 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4881
4882 * terminal.h: Reformat copyright header.
4883
4884 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4885
4886 * server.c (gdbserver_version): Update copyright year.
4887 * gdbreplay.c (gdbreplay_version): Likewise.
4888
4889 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4890
4891 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4892
4893 Revert:
4894 2011-12-18 Hui Zhu <teawater@gmail.com>
4895 * linux-low.c (linux_create_inferior): Save return value to ret.
4896
4897 2011-12-18 Hui Zhu <teawater@gmail.com>
4898
4899 * linux-low.c (linux_create_inferior): Save return value to ret.
4900
4901 2011-12-16 Doug Evans <dje@google.com>
4902
4903 * linux-low.c (linux_create_inferior): If stdio connection,
4904 redirect stdin from /dev/null, stdout to stderr.
4905 * remote-utils.c (remote_is_stdio): New static global.
4906 (remote_connection_is_stdio): New function.
4907 (remote_prepare): Handle stdio connection.
4908 (remote_open): Ditto.
4909 (remote_close): Don't close stdin for stdio connections.
4910 (read_prim,write_prim): New functions. Replace all calls to
4911 read/write to these.
4912 * server.c (main): Watch for "-" argument. Move call to
4913 remote_prepare before start_inferior.
4914 * server.h (STDIO_CONNECTION_NAME): New macro.
4915 (remote_connection_is_stdio): Declare.
4916
4917 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4918 in debugging output.
4919
4920 2011-12-15 Yao Qi <yao@codesourcery.com>
4921
4922 * tracepoint.c: Include sys/syscall.h.
4923 (gdb_ust_thread): Remove preprocessor conditional.
4924
4925 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4926
4927 * linux-low.c (linux_detach_one_lwp): Call
4928 the_low_target.prepare_to_resume before detaching.
4929
4930 2011-12-14 Yao Qi <yao@codesourcery.com>
4931
4932 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4933 of write.
4934
4935 2011-12-14 Yao Qi <yao@codesourcery.com>
4936
4937 * i386-low.c (i386_low_stopped_data_address): Initialize local
4938 variable `control'.
4939
4940 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4941
4942 PR remote/13492
4943
4944 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4945 DR_CONTROL unless necessary. Extend comments.
4946 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4947 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4948
4949 2011-12-13 Yao Qi <yao@codesourcery.com>
4950
4951 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4952 macros.
4953 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4954
4955 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4956
4957 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4958 Print new debug message for such case.
4959
4960 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4961
4962 Fix overlapping memcpy.
4963 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4964 the read_inferior_memory transfer.
4965 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4966 write_inferior_memory transfer.
4967 (set_fast_tracepoint_jump): New variable buf. Use it for the
4968 read_inferior_memory and write_inferior_memory transfers.
4969 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4970 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4971 Use it for the write_inferior_memory transfer.
4972 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4973 buffers.
4974
4975 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4976
4977 * linux-low.c (fetch_register, store_register): Make code
4978 consistent, fix formatting.
4979
4980 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4981
4982 * linux-low.c (usr_store_inferior_registers): Factor out code
4983 to handle individual registers into...
4984 (store_register): ... this new function.
4985
4986 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4987
4988 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4989 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4990 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4991 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4992 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4993 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4994 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4995 (srv_xmlfiles): Add new XML files.
4996
4997 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4998 and <sys/uio.h>.
4999 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5000 (init_registers_s390_linux32v1): Add prototype.
5001 (init_registers_s390_linux32v2): Likewise.
5002 (init_registers_s390_linux64v1): Likewise.
5003 (init_registers_s390_linux64v2): Likewise.
5004 (init_registers_s390x_linux64v1): Likewise.
5005 (init_registers_s390x_linux64v2): Likewise.
5006 (s390_num_regs): Increment to 52.
5007 (s390_regmap): Add orig_r2 register.
5008 (s390_num_regs_3264): Increment to 68.
5009 (s390_regmap_3264): Add orig_r2 register.
5010 (s390_collect_ptrace_register): Handle orig_r2 register.
5011 (s390_supply_ptrace_register): Likewise.
5012 (s390_fill_last_break): New function.
5013 (s390_store_last_break): Likewise.
5014 (s390_fill_system_call): New function.
5015 (s390_store_system_call): Likewise.
5016 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5017 register sets.
5018 (s390_check_regset): New function.
5019 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5020 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5021 Update target_regsets for available register sets.
5022
5023 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5024 Jan Kratochvil <jan.kratochvil@redhat.com>
5025
5026 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5027 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5028 New.
5029 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5030 * linux-low.h (struct process_info_private): New member r_debug.
5031 * server.c (handle_qxfer_libraries): Call
5032 the_target->qxfer_libraries_svr4.
5033 (handle_qxfer_libraries_svr4): New function.
5034 (qxfer_packets): New entry "libraries-svr4".
5035 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5036 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5037 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5038 PACKET_qXfer_libraries_svr4.
5039
5040 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5041
5042 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5043 PSW address/mask between 8-byte and 16-byte formats.
5044 (s390_supply_ptrace_register): Likewise.
5045 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5046 basic addressing mode bit.
5047
5048 2011-11-24 Stan Shebs <stan@codesourcery.com>
5049
5050 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5051
5052 2011-11-17 Stan Shebs <stan@codesourcery.com>
5053
5054 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5055 (tracing_start_time): New global.
5056 (tracing_stop_time): New global.
5057 (tracing_user_name): New global.
5058 (tracing_notes): New global.
5059 (tracing_stop_note): New global.
5060 (cmd_qtstart): Set traceframe_usage, start_time.
5061 (stop_tracing): Set stop_time.
5062 (cmd_qtstatus): Report additional status.
5063 (cmd_qtp): New function.
5064 (handle_tracepoint_query): Call it.
5065 (cmd_qtnotes): New function.
5066 (handle_tracepoint_general_set): Call it.
5067 (get_timestamp): Rename from tsv_get_timestamp.
5068
5069 2011-11-14 Stan Shebs <stan@codesourcery.com>
5070 Kwok Cheung Yeung <kcy@codesourcery.com>
5071
5072 * linux-x86-low.c (small_jump_insn): New.
5073 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5074 trampoline and error message, build a trampoline and issue a small
5075 jump instruction to it.
5076 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5077 trampoline and error message.
5078 (x86_get_min_fast_tracepoint_insn_len): New.
5079 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5080 * linux-low.h (struct linux_target_ops): Add arguments to
5081 install_fast_tracepoint_jump_pad operation, add new operation.
5082 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5083 arguments.
5084 (linux_get_min_fast_tracepoint_insn_len): New function.
5085 (linux_target_op): Add new operation.
5086 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5087 (gdb_trampoline_buffer_end): Ditto.
5088 (gdb_trampoline_buffer_error): Ditto.
5089 (struct ipa_sym_addresses): Add fields for new IPA variables.
5090 (symbol_list): Add entries for new IPA variables.
5091 (struct tracepoint): Add fields to hold the address range of the
5092 trampoline used by the tracepoint.
5093 (trampoline_buffer_head): New static variable.
5094 (trampoline_buffer_tail): Ditto.
5095 (claim_trampoline_space): New function.
5096 (have_fast_tracepoint_trampoline_buffer): New function.
5097 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5098 structure.
5099 (install_fast_tracepoint): Ditto, also add error buffer argument.
5100 (cmd_qtminftpilen): New function.
5101 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5102 (fast_tracepoint_from_trampoline_address): New function.
5103 (fast_tracepoint_collecting): Handle trampoline as part of jump
5104 pad space.
5105 (set_trampoline_buffer_space): New function.
5106 (initialize_tracepoint): Initialize new IPA variables.
5107 * target.h (struct target_ops): Add arguments to
5108 install_fast_tracepoint_jump_pad operation, add new
5109 get_min_fast_tracepoint_insn_len operation.
5110 (target_get_min_fast_tracepoint_insn_len): New.
5111 (install_fast_tracepoint_jump_pad): Add arguments.
5112 * server.h (IPA_BUFSIZ): Define.
5113 * linux-i386-ipa.c: Include extra header files.
5114 (initialize_fast_tracepoint_trampoline_buffer): New function.
5115 (initialize_low_tracepoint): Call it.
5116 * server.h (set_trampoline_buffer_space): Declare.
5117 (claim_trampoline_space): Ditto.
5118 (have_fast_tracepoint_trampoline_buffer): Ditto.
5119
5120 2011-11-14 Yao Qi <yao@codesourcery.com>
5121
5122 * server.c (handle_query): Handle InstallInTrace for qSupported.
5123 * tracepoint.c (add_tracepoint): Sort list.
5124 (install_tracepoint, download_tracepoint): New.
5125 (cmd_qtdp): Call them to install and download tracepoints.
5126 (sort_tracepoints): Removed.
5127 (cmd_qtstart): Update.
5128
5129 2011-11-14 Yao Qi <yao@codesourcery.com>
5130
5131 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5132 * mem-break.h: Declare.
5133 * tracepoint.c (cmd_qtstart): Move some code to ...
5134 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5135 New.
5136 (download_tracepoints): Move some code to ...
5137 (download_tracepoint_1): ... here. New.
5138
5139 2011-11-08 Yao Qi <yao@codesourcery.com>
5140
5141 * remote-utils.c (relocate_instruction): A comment fix.
5142
5143 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5144
5145 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5146 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5147 dr_status_mirror and dr_control_mirror from debug_reg_state.
5148 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5149 (i386_initial_stuff): Remove use of deleted globals.
5150 (i386_get_thread_context, i386_set_thread_context,
5151 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5152 from debug_reg_state.
5153
5154 2011-11-05 Yao Qi <yao@codesourcery.com>
5155
5156 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5157 address as TPOINT's.
5158
5159 2011-11-02 Stan Shebs <stan@codesourcery.com>
5160
5161 * tracepoint.c (agent_mem_read_string): New function.
5162 (eval_agent_expr): Call it for tracenz.
5163 * server.c (handle_query): Report support for tracenz.
5164
5165 2011-11-02 Yao Qi <yao@codesourcery.com>
5166
5167 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5168
5169 2011-11-02 Yao Qi <yao@codesourcery.com>
5170
5171 * target.h: Fix a typo in comment.
5172
5173 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5174
5175 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5176 clobber the breakpoints' shadows with fast tracepoint jumps.
5177 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5178 * target.c (write_inferior_memory): Also pass MYADDR down to
5179 check_mem_write.
5180
5181 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5182
5183 * configure.ac: Check support for personality routine.
5184 * configure: Regenerate.
5185 * config.in: Likewise.
5186 * linux-low.c: Include <sys/personality.h>.
5187 Define ADDR_NO_RANDOMIZE if necessary.
5188 (linux_create_inferior): Disable address space randomization when
5189 forking inferior, if requested.
5190 (linux_supports_disable_randomization): New function.
5191 (linux_target_ops): Install it.
5192 * server.h (disable_randomization): Declare.
5193 * server.c (disable_randomization): New global variable.
5194 (handle_general_set): Handle QDisableRandomization.
5195 (handle_query): Likewise for qSupported.
5196 (main): Support --disable-randomization and --no-disable-randomization
5197 command line arguments.
5198 * target.h (struct target_ops): Add supports_disable_randomization.
5199 (target_supports_disable_randomization): New macro.
5200
5201 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5202
5203 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5204 ifdef check.
5205 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5206 [!PT_GETDSBT] (target_loadmap): New definition.
5207 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5208 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5209 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5210 and PT_GETDSBT to LINUX_LOADMAP.
5211 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5212 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5213
5214 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5215
5216 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5217 (arm_linux_hwbp_cap): New static variable.
5218 (arm_linux_get_hwbp_cap): Replace by ...
5219 (arm_linux_init_hwbp_cap): ... this new function.
5220 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5221 (arm_linux_get_hw_watchpoint_count): Likewise.
5222 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5223 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5224 (arm_prepare_to_resume): Use perror_with_name instead of error.
5225
5226 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5227
5228 * linux-arm-low.c: Include <signal.h>.
5229 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5230 (struct arm_linux_hwbp_cap): New data type.
5231 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5232 (struct arm_linux_hw_breakpoint): New data type.
5233 (MAX_BPTS, MAX_WPTS): Define.
5234 (struct arch_process_info, struct arch_lwp_info): New data types.
5235 (arm_linux_get_hwbp_cap): New function.
5236 (arm_linux_get_hw_breakpoint_count): Likewise.
5237 (arm_linux_get_hw_watchpoint_count): Likewise.
5238 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5239 (arm_hwbp_control_initialize): Likewise.
5240 (arm_hwbp_control_is_enabled): Likewise.
5241 (arm_hwbp_control_is_initialized): Likewise.
5242 (arm_hwbp_control_disable): Likewise.
5243 (arm_linux_hw_breakpoint_equal): Likewise.
5244 (arm_linux_hw_point_initialize): Likewise.
5245 (struct update_registers_data): New data structure.
5246 (update_registers_callback: New function.
5247 (arm_insert_point): Likewise.
5248 (arm_remove_point): Likewise.
5249 (arm_stopped_by_watchpoint): Likewise.
5250 (arm_stopped_data_address): Likewise.
5251 (arm_new_process): Likewise.
5252 (arm_new_thread): Likewise.
5253 (arm_prepare_to_resume): Likewise.
5254 (the_low_target): Register arm_insert_point, arm_remove_point,
5255 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5256 arm_new_thread, and arm_prepare_to_resume.
5257
5258 2011-09-15 Stan Shebs <stan@codesourcery.com>
5259
5260 * server.h (struct emit_ops): Add compare-goto fields.
5261 * tracepoint.c (gdb_agent_op_sizes): New table.
5262 (emit_eq_goto): New function.
5263 (emit_ne_goto): New function.
5264 (emit_lt_goto): New function.
5265 (emit_le_goto): New function.
5266 (emit_gt_goto): New function.
5267 (emit_ge_goto): New function.
5268 (is_goto_target): New function.
5269 (compile_bytecodes): Recognize special cases of compare-goto
5270 combinations and call specialized emitters for them.
5271 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5272 (amd64_emit_ne_goto): New function.
5273 (amd64_emit_lt_goto): New function.
5274 (amd64_emit_le_goto): New function.
5275 (amd64_emit_gt_goto): New function.
5276 (amd64_emit_ge_goto): New function.
5277 (amd64_emit_ops): Add the new functions.
5278 (i386_emit_eq_goto): New function.
5279 (i386_emit_ne_goto): New function.
5280 (i386_emit_lt_goto): New function.
5281 (i386_emit_le_goto): New function.
5282 (i386_emit_gt_goto): New function.
5283 (i386_emit_ge_goto): New function.
5284 (i386_emit_ops): Add the new functions.
5285
5286 2011-09-08 Stan Shebs <stan@codesourcery.com>
5287
5288 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5289 (i386_emit_epilogue): Restore %ebx.
5290
5291 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5292
5293 * server.c (step_thread): Remove definition.
5294 (process_serial_event): Don't handle Hs.
5295 * server.h (step_thread): Remove declaration.
5296 * target.c (set_desired_inferior): Remove use of step_thread.
5297
5298 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5299
5300 * linux-low.c: Include linux-procfs.h.
5301 (linux_attach_lwp_1): Update comments.
5302 (linux_attach): Scan for existing threads when attaching to a
5303 process that is the tgid.
5304 * Makefile.in: Update dependencies.
5305
5306 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5307
5308 * configure.srv: Add linux-procfs.o dependencies.
5309
5310 2011-08-14 Yao Qi <yao@codesourcery.com>
5311
5312 * target.h (struct target_ops): Fix indent.
5313 * win32-low.c (win32_target_ops): Fix comment.
5314
5315 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5316 Yao Qi <yao@codesourcery.com>
5317
5318 * Makefile.in (clean): Remove tic6x-*.c files.
5319 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5320 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5321 (tic6x-c64xp-linux.c): Likewise.
5322 * configure.srv: Add support for tic6x-*-uclinux.
5323 * linux-tic6x-low.c: New.
5324 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5325
5326 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5327 Yao Qi <yao@codesourcery.com>
5328
5329 * target.h (struct target_ops): Add read_loadmap.
5330 * linux-low.c (struct target_loadseg): New type.
5331 (struct target_loadmap): New type.
5332 (linux_read_loadmap): New function.
5333 (linux_target_ops): Add linux_read_loadmap.
5334 * server.c (handle_query): Support qXfer:fdpic:read packet.
5335 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5336 to NULL.
5337
5338 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5339
5340 * win32-low.c: Include <stdint.h>.
5341
5342 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5343
5344 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5345 to the inferior here.
5346 (i386_remove_aligned_watchpoint): Ditto.
5347 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5348 fit part of the watchpoint in the debug registers.
5349 (i386_update_inferior_debug_regs): New.
5350 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5351 registers, and only update the inferior on success.
5352 (i386_low_remove_watchpoint): Ditto.
5353
5354 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5355
5356 * linux-low.c (compare_ints, unique, list_threads, show_process,
5357 linux_core_of_thread): Delete.
5358 (linux_target_ops): Change linux_core_of_thread to
5359 linux_common_core_of_thread.
5360 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5361 * utils.c (malloc_failure): Change type of argument.
5362 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5363 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5364 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5365 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5366 (IPA_OBJS): Add common-utils-ipa.o.
5367 (ptid_h, linux_osdata_h): New macros.
5368 (server_h): Add common/common-utils.h, common/xml-utils.h,
5369 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5370 common/ptid.h.
5371 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5372 ptid.o, buffer.o): New rules.
5373 (linux-low.o): Add common/linux-osdata.h as a dependency.
5374 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5375 * configure.ac: Add AC_HEADER_DIRENT check.
5376 * config.in: Regenerate.
5377 * configure: Regenerate.
5378 * remote-utils.c (xml_escape_text): Delete.
5379 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5380 buffer_xml_printf): Move to common/buffer.c.
5381 * server.c (main): Remove call to initialize_inferiors.
5382 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5383 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5384 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5385 internal_error, gdb_assert, gdb_assert_fail): Delete.
5386 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5387 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5388 common/buffer.h.
5389 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5390 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5391 initialize_inferiors): Delete.
5392
5393 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5394
5395 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5396 symbol error.
5397
5398 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5399
5400 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5401 assertion.
5402 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5403
5404 2011-05-26 Yao Qi <yao@codesourcery.com>
5405
5406 * Makefile.in (thread-db.o): Track dependence to
5407 common/gdb_thread_db.h.
5408 * thread-db.c: include gdb_thread_db.h from right place.
5409
5410 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5411
5412 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5413 __FILE__ and __LINE__ to internal_error.
5414
5415 2011-05-13 Doug Evans <dje@google.com>
5416
5417 * thread-db.c (try_thread_db_load_from_sdir): New function.
5418 (try_thread_db_load_from_dir): New function.
5419 (thread_db_load_search): Handle $sdir, ignore $pdir.
5420 Remove trying of system directories if search of
5421 libthread-db-search-path fails, that is now done via $sdir.
5422
5423 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5424
5425 * server.c (handle_query): Add EnableDisableTracepoints to the list
5426 of supported features.
5427 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5428 tracepoints.
5429 (cmd_qtenable_disable): New.
5430 (cmd_qtstart): Install tracepoints even if disabled.
5431 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5432 receiving a QTEnable or QTDisable packet.
5433 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5434 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5435 tracepoints.
5436 (gdb_probe): Skip data collection if static tracepoint is disabled.
5437
5438 2011-05-10 Doug Evans <dje@google.com>
5439
5440 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5441
5442 2011-05-04 Doug Evans <dje@google.com>
5443
5444 * linux-low.c (linux_join): Skip process lookup.
5445 * spu-low.c (spu_join): Ditto.
5446 * server.c (join_inferiors_callback): Delete.
5447 (process_serial_event): For 'D' packet (detach) call join_inferior
5448 directly.
5449
5450 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5451
5452 * README: Don't mention xscale*-*-linux*.
5453 * configure.srv (xscale*-*-linux*): Don't handle target.
5454
5455 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5456
5457 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5458 casting pointers.
5459 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5460 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5461 (i386_emit_void_call_2): Likewise.
5462
5463 2011-04-26 Yao Qi <yao@codesourcery.com>
5464
5465 * linux-low.c: Move common macros to linux-ptrace.h.
5466 Include linux-ptrace.h.
5467 * Makefile.in (linux_ptrace_h): New.
5468 (linux-low.o): Depends on linux-ptrace.h.
5469
5470 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5471
5472 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5473 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5474 (remote_prepare): New function with most of the TCP code from ...
5475 (remote_open): ... here. Detect PORT here unconditionally. Move also
5476 setting transport_is_reliable.
5477 * server.c (run_once): New variable.
5478 (gdbserver_usage): Document it.
5479 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5480 the first run if RUN_ONCE.
5481 * server.h (run_once, remote_prepare): New declarations.
5482
5483 2011-04-19 Tom Tromey <tromey@redhat.com>
5484
5485 * win32-low.c (handle_load_dll): Remove duplicate "the".
5486
5487 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5488
5489 Remove support for old Cygwin 1.5 versions.
5490 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5491 function to avoid warning.
5492 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5493 warning.
5494
5495 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5496
5497 * gdbserver/server.h (Macro _): Define it if not available.
5498
5499 2011-03-14 Michael Snyder <msnyder@vmware.com>
5500
5501 * hostio.c (handle_close): Remove unnecessary null test.
5502
5503 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5504
5505 * Makefile.in (maintainer-clean realclean distclean): Remove
5506 "make ... subdir_do" command.
5507
5508 2011-03-10 Michael Snyder <msnyder@vmware.com>
5509
5510 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5511
5512 * server.c (handle_v_run): Free alloced buffer on early return.
5513
5514 2011-03-09 Yao Qi <yao@codesourcery.com>
5515
5516 Revert:
5517 2011-03-04 Yao Qi <yao@codesourcery.com>
5518
5519 * Makefile.in: Remove GNU make feature --directory.
5520
5521 2011-03-05 Yao Qi <yao@codesourcery.com>
5522
5523 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5524 (subdir_do): New make target. Copied from gdb/Makefile.
5525 (maintainer-clean, realclean, distclean, clean): Call corresponding
5526 make targets in common/Makefile.
5527
5528 2011-02-11 Yao Qi <yao@codesourcery.com>
5529
5530 * configure.ac: Call AC_PROG_RANLIB.
5531 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5532 * configure: Regenerate.
5533
5534 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5535
5536 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5537
5538 2011-03-06 Yao Qi <yao@codesourcery.com>
5539
5540 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5541
5542 2011-03-05 Yao Qi <yao@codesourcery.com>
5543
5544 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5545 (subdir_do): New make target. Copied from gdb/Makefile.
5546 (maintainer-clean, realclean, distclean, clean): Call corresponding
5547 make targets in common/Makefile.
5548
5549 2011-03-04 Yao Qi <yao@codesourcery.com>
5550
5551 * Makefile.in: Remove GNU make feature --directory.
5552
5553 2011-03-04 Michael Snyder <msnyder@vmware.com>
5554
5555 * server.c (queue_stop_reply): Call xmalloc not malloc.
5556
5557 2011-03-02 Michael Snyder <msnyder@vmware.com>
5558
5559 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5560
5561 2011-02-28 Michael Snyder <msnyder@vmware.com>
5562
5563 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5564 (cmd_qtframe): Ditto.
5565 (cmd_qtbuffer): Ditto.
5566 (cmd_bigqtbuffer): Ditto.
5567
5568 * utils.c (decimal2str): Initialize 'width' to nine, then
5569 don't mess with it.
5570
5571 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5572
5573 * hostio.c (require_data): Free *data, not data.
5574
5575 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5576
5577 * hostio.c (require_data): Use free, not xfree.
5578
5579 2011-02-27 Michael Snyder <msnyder@vmware.com>
5580
5581 * server.c (handle_query): Discard unused value.
5582
5583 * hostio.c (require_data): Free malloc memory before returning
5584 error.
5585
5586 2011-02-26 Michael Snyder <msnyder@vmware.com>
5587
5588 * linux-low.c (list_threads): Call closedir for dirent.
5589
5590 2011-02-27 Michael Snyder <msnyder@vmware.com>
5591
5592 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5593 a case statement falls through.
5594
5595 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5596
5597 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5598 in comparison.
5599
5600 2011-02-26 Michael Snyder <msnyder@vmware.com>
5601
5602 * utils.c (decimal2str): Eliminate dead code and dead param.
5603 (pulongest): Drop dead param from call to decimal2str.
5604 (plongest): Ditto.
5605
5606 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5607
5608 Revert the following patch (not approved yet):
5609 2011-02-21 Hui Zhu <teawater@gmail.com>
5610 * tracepoint.c (tp_printf): New function.
5611 (eval_agent_expr): Handle gdb_agent_op_printf.
5612
5613 2011-02-21 Hui Zhu <teawater@gmail.com>
5614
5615 * tracepoint.c (tp_printf): New function.
5616 (eval_agent_expr): Handle gdb_agent_op_printf.
5617
5618 2011-02-18 Tom Tromey <tromey@redhat.com>
5619
5620 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5621 (tracepoint.o): Likewise.
5622 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5623 (gdb_agent_op_names): Likewise.
5624
5625 2011-02-18 Tom Tromey <tromey@redhat.com>
5626
5627 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5628 gdb_agent_op_rot>: New constants.
5629 (gdb_agent_op_names): Add pick and roll.
5630 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5631 cases.
5632
5633 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5634
5635 * aclocal.m4: Regenerated with aclocal-1.11.1.
5636
5637 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5638
5639 * server.c (handle_qxfer_traceframe_info): New.
5640 (qxfer_packets): Register "traceframe-info".
5641 (handle_query): Report support for qXfer:traceframe-info:read+.
5642 * tracepoint.c (match_blocktype): New.
5643 (traceframe_find_block_type): Rename to ...
5644 (traceframe_walk_blocks): ... this. Add callback filter argument,
5645 and use it.
5646 (traceframe_find_block_type): New, reimplemented on top of
5647 traceframe_walk_blocks.
5648 (build_traceframe_info_xml): New.
5649 (traceframe_read_info): New.
5650 * server.h (traceframe_read_info): Declare.
5651
5652 2011-02-11 Yao Qi <yao@codesourcery.com>
5653
5654 * configure.ac: Call AC_PROG_RANLIB.
5655 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5656 * configure: Regenerate.
5657
5658 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5659
5660 * server.c (gdb_read_memory): Change return semantics to allow
5661 partial transfers.
5662 (handle_search_memory_1): Adjust.
5663 (process_serial_event) <'m' packet>: Handle partial transfers.
5664 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5665
5666 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5667
5668 * regcache.c (init_register_cache): Initialize
5669 regcache->register_status.
5670 (free_register_cache): Release regcache->register_status.
5671 (regcache_cpy): Copy register_status.
5672 (registers_to_string): Print 'x's for unavailable registers.
5673 (supply_register): Mark the register's status valid or
5674 unavailable, depending on whether a buffer was passed in or not.
5675 (supply_register_zeroed): New.
5676 (supply_regblock): Mark the registers' status valid or
5677 unavailable, depending on whether a buffer was passed in or not.
5678 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5679 (struct regcache): New `register_status' field.
5680 (supply_register_zeroed): Declare.
5681 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5682 supply_register_zeroed, rather than passing a NULL buffer to
5683 supply_register.
5684 * tracepoint.c (fetch_traceframe_registers): Update comment.
5685
5686 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5687
5688 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5689 buffer explicit.
5690
5691 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5692
5693 * server.h (decode_xfer_write): Change prototype.
5694 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5695 and don't extract the annex here.
5696 * server.c (decode_xfer_read): Remove `annex' parameter,
5697 and don't extract the annex here.
5698 (decode_xfer): New.
5699 (struct qxfer): New.
5700 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5701 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5702 (handle_qxfer_statictrace): New functions, abstracted out from
5703 handle_query, and made to use the struct qxfer interface.
5704 (handle_threads_qxfer_proper): Rename to ...
5705 (handle_qxfer_threads_proper): ... this.
5706 (handle_threads_qxfer): Rename to ...
5707 (handle_qxfer_threads): ... this. Adjust.
5708 (qxfer_packets): New array.
5709 (handle_qxfer): New function.
5710 (handle_query): Use handle_qxfer.
5711
5712 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5713
5714 * gdbreplay.c: Shorten lines of >= 80 columns.
5715 * linux-low.c: Ditto.
5716 * linux-ppc-low.c: Ditto.
5717 * linux-s390-low.c: Ditto.
5718 * linux-sparc-low.c: Ditto.
5719 * linux-x86-low.c: Ditto.
5720 * linux-xtensa-low.c: Ditto.
5721 * mem-break.c: Ditto.
5722 * nto-low.c: Ditto.
5723 * regcache.h: Ditto.
5724 * remote-utils.c: Ditto.
5725 * server.c: Ditto.
5726 * server.h: Ditto.
5727 * thread-db.c: Ditto.
5728 * tracepoint.c: Ditto.
5729 * utils.c: Ditto.
5730 * win32-low.h: Ditto.
5731
5732 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5733
5734 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5735 update.
5736
5737 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5738
5739 * server.c (gdbserver_version): Update copyright year in version
5740 output.
5741 * gdbreplay.c (gdbreplay_version): Ditto.
5742
5743 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5744
5745 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5746 * linux-bfin-low.c: New file.
5747 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5748 PT_DATA_ADDR for BFIN targets.
5749 * Makefile.in (SFILES): Add linux-bfin-low.c.
5750 (clean): Remove reg-bfin.c.
5751 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5752 * README: Mention supported Blackfin targets.
5753
5754 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5755
5756 * .gitignore: New file.
5757
5758 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5759
5760 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5761
5762 2010-10-22 Jie Zhang <jie@codesourcery.com>
5763
5764 * Makefile.in: Add FLAGS_TO_PASS variable.
5765 (install): Remove dependency of install-only and recursively
5766 invoke make for install-only.
5767
5768 2010-10-04 Doug Evans <dje@google.com>
5769
5770 * Makefile.in (uninstall): Use $(DESTDIR).
5771
5772 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5773
5774 PR gdb/11842
5775
5776 * linux-x86-low.c (compat_siginfo_from_siginfo)
5777 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5778 si_code is < 0. Check for si_code == SI_TIMER before checking for
5779 si_code < 0.
5780
5781 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5782
5783 * lynx-i386-low.c: New file.
5784 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5785
5786 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5787
5788 * lynx-low.c (ptrace_request_to_str): Remove handling for
5789 request values that have been removed in LynxOS 5.x.
5790
5791 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5792
5793 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5794 <ptrace.h>
5795
5796 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5797
5798 * configure.ac: Add --enable-inprocess-agent option.
5799 * configure: Rebuilt.
5800
5801 2010-09-06 Yao Qi <yao@codesourcery.com>
5802
5803 * linux-low.c (linux_kill): Remove unused variable.
5804 (linux_stabilize_threads): Likewise.
5805 * server.c (start_inferior): Likewise.
5806 (queue_stop_reply_callback): Likewise.
5807 * tracepoint.c (do_action_at_tracepoint): Likewise.
5808
5809 2010-09-06 Yao Qi <yao@codesourcery.com>
5810
5811 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5812 on return.
5813
5814 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5815
5816 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5817
5818 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5819
5820 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5821 "$(IPA_DEPFILES)".
5822
5823 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5824
5825 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5826 gdbserver/lynx-ppc-low.c: New files.
5827 * Makefile.in (lynx_low_h): New variable.
5828 (lynx-low.o, lynx-ppc-low.o): New rules.
5829 * configure.ac: On LynxOS, link with -lnetinet.
5830 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5831 * configure: regenerate.
5832
5833 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5834
5835 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5836 * configure.ac: Add check for vasprintf and vsnprintf.
5837 * configure, config.in: Regenerate.
5838 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5839
5840 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5841
5842 * gdbreplay.c: Move include of alloca.h up, next to include of
5843 malloc.h.
5844 * server.h: Add include of malloc.h.
5845 * mem-break.c: Remove include of malloc.h.
5846 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5847
5848 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5849
5850 * Makefile.in (memmem.o): Build with -Wno-error.
5851
5852 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5853
5854 * utils.c (xsnprintf): Make non-static.
5855 * server.h: Add xsnprintf declaration.
5856 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5857 replace calls to snprintf by calls to xsnprintf throughout.
5858
5859 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5860
5861 * configure.ac: Add configure check for alloca.
5862 * configure, config.in: Regenerate.
5863 * server.h: Include alloca.h if it exists.
5864 * gdbreplay.c: Include alloca.h if it exists.
5865
5866 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5867
5868 * linux-low.c (__SIGRTMIN): Define if not already defined.
5869 (linux_create_inferior): Check for __ANDROID__ rather than
5870 __SIGRTMIN.
5871 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5872 are already deferred.
5873 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5874 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5875 stopped and already has a pending signal to report.
5876 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5877 a pending signal to report or is moving out of a jump pad.
5878 (linux_init_signals): Check for __ANDROID__ rather than
5879 __SIGRTMIN.
5880
5881 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5882
5883 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5884 debug_threads check. Avoid a linear search when not doing debug
5885 output.
5886
5887 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5888
5889 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5890 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5891 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5892 (process_event): Change local fd's type to gdb_fildes_t.
5893 (create_file_handler): Adjust prototype.
5894 (delete_file_handler): Adjust prototype.
5895 (handle_file_event): Adjust prototype. Use pfildes.
5896 (create_file_event): Adjsut prototype.
5897 * remote-utils.c (remote_desc, listen_desc): Change type to
5898 gdb_fildes_t.
5899 * server.h: New gdb_fildes_t typedef.
5900 [USE_WIN32API]: Include winsock2.h.
5901 (delete_file_handler, add_file_handler): Adjust prototypes.
5902 (pfildes): Declare.
5903 * utils.c (pfildes): New.
5904
5905 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5906
5907 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5908 * configure: Regenerate.
5909
5910 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5911
5912 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5913 (linux_done_accessing_memory): ... this.
5914 (linux_target_ops): Adjust.
5915 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5916 * nto-low.c (nto_target_ops): Adjust comment.
5917 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5918 * spu-low.c (spu_target_ops): Adjust comment.
5919 * target.h (target_ops): Rename unprepare_to_access_memory field
5920 to done_accessing_memory.
5921 (unprepare_to_access_memory): Rename to ...
5922 (done_accessing_memory): ... this.
5923
5924 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5925
5926 * linux-low.c (linux_prepare_to_access_memory): New.
5927 (linux_unprepare_to_access_memory): New.
5928 (linux_target_ops): Install them.
5929 * server.c (read_memory): Rename to ...
5930 (gdb_read_memory): ... this. Use
5931 prepare_to_access_memory/prepare_to_access_memory.
5932 (write_memory): Rename to ...
5933 (gdb_write_memory): ... this. Use
5934 prepare_to_access_memory/prepare_to_access_memory.
5935 (handle_search_memory_1): Adjust.
5936 (process_serial_event): Adjust.
5937 * target.h (struct target_ops): New fields
5938 prepare_to_access_memory and unprepare_to_access_memory.
5939 (prepare_to_access_memory, unprepare_to_access_memory): New.
5940 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5941 prepare_to_access_memory/prepare_to_access_memory.
5942 * nto-low.c (nto_target_ops): Adjust.
5943 * spu-low.c (spu_target_ops): Adjust.
5944 * win32-low.c (win32_target_ops): Adjust.
5945
5946 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5947
5948 * Makefile.in (WARN_CFLAGS): Get it from configure.
5949 (WERROR_CFLAGS): New.
5950 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5951 * configure.ac: Introduce --enable-werror, which adds -Werror to
5952 the compiler command line. Enabled by default. Disable with
5953 --disable-werror. Add -Wdeclaration-after-statement
5954 Wpointer-arith and -Wformat-nonliteral to warning flags.
5955 * configure: Regenerate.
5956
5957 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5958
5959 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5960
5961 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5962
5963 * gdbreplay.c (remote_error): New.
5964 (gdbchar): New.
5965 (expect): Use gdbchar. Check for error reading from GDB.
5966 Clarify sync error output.
5967 (play): Check for errors writing to GDB.
5968 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5969 * remote-utils.c (getpkt): Check for errors writing to the remote
5970 descriptor.
5971
5972 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5973
5974 * linux-low.c (linux_wait_1): Move non-debugging code out of
5975 `debug_threads' control.
5976
5977 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5978
5979 * linux-low.c (linux_wait_1): Don't set last_status here.
5980 * server.c (push_event, queue_stop_reply_callback): Assert we're
5981 not pushing a TARGET_WAITKIND_IGNORE event.
5982 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5983 (myresume, handle_target_event): Set the thread's last_resume_kind
5984 and last_status from the target returned status.
5985
5986 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5987
5988 PR threads/10729
5989
5990 * linux-x86-low.c (update_debug_registers_callback): New.
5991 (i386_dr_low_set_addr): Use it.
5992 (i386_dr_low_get_addr): New.
5993 (i386_dr_low_set_control): Use update_debug_registers_callback.
5994 (i386_dr_low_get_control): New.
5995 (i386_dr_low_get_status): Adjust.
5996 * linux-low.c (linux_stop_lwp): New.
5997 * linux-low.h (linux_stop_lwp): Declare.
5998
5999 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6000 argument instead of a i386_debug_reg_state.
6001 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6002 a i386_debug_reg_state.
6003 (i386_insert_aligned_watchpoint): Adjust.
6004 (i386_remove_aligned_watchpoint): Adjust.
6005 (i386_low_stopped_data_address): Read the debug registers from the
6006 inferior instead of from the mirrors.
6007 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6008 (i386_dr_low_get_addr): Declare.
6009 (i386_dr_low_get_control): Declare.
6010 (i386_dr_low_get_status): Change prototype.
6011
6012 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6013 (i386_dr_low_get_addr): New.
6014 (i386_dr_low_get_control): New.
6015 (i386_dr_low_get_status): Adjust prototype. Return
6016 dr_status_mirror.
6017 (i386_initial_stuff): Clear dr_status_mirror and
6018 dr_control_mirror.
6019 (i386_get_thread_context): Adjust.
6020 (i386_set_thread_context): Adjust.
6021 (i386_thread_added): Adjust.
6022
6023 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6024
6025 * linux-low.h (linux_thread_area): Delete declaration.
6026
6027 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6028
6029 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6030 after its termination.
6031
6032 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6033
6034 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6035 (gdb_wants_all_stopped): Delete.
6036 (linux_wait_1): Don't call them.
6037 * server.c (handle_v_cont): Tag all threads as want-stopped.
6038 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6039 stopped as "client-wants-stopped".
6040
6041 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6042
6043 * Makefile.in (signals_h): New.
6044 (server_h): Depend on it.
6045 (server.o): Don't depend on $(signals_def).
6046 (signals.o): Depend on $(signals_def).
6047
6048 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6049
6050 * Makefile.in (signals_def): New.
6051 (server_h): Append include/gdb/signals.h and signals_def.
6052 (server.o): Append signals_def.
6053
6054 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6055
6056 * server.c (handle_target_event): Use target_signal_to_host for
6057 resume_info.sig initialization.
6058 * target.h (struct thread_resume) <sig>: New comment.
6059
6060 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6061
6062 * server.c (handle_query): strcpy() the returned string from paddress()
6063 instead of sprintf().
6064 * utils.c (paddress): Return phex_nz().
6065
6066 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6067
6068 * server.c (handle_v_cont): Call mourn_inferior if process
6069 just exited.
6070 (myresume): Likewise.
6071
6072 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6073
6074 Static tracepoints, and integration with UST.
6075
6076 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6077 * mem-break.c (uninsert_all_breakpoints)
6078 (reinsert_all_breakpoints): New.
6079 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6080 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6081 (gdb_agent_ust_loaded, helper_thread_id)
6082 (gdb_agent_helper_thread_id): New macros.
6083 (struct ipa_sym_addresses): Add addr_ust_loaded,
6084 addr_helper_thread_id, addr_cmd_buf.
6085 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6086 (in_process_agent_loaded_ust): New.
6087 (write_e_ust_not_loaded): New.
6088 (maybe_write_ipa_ust_not_loaded): New.
6089 (struct collect_static_trace_data_action): New.
6090 (enum tracepoint_type) <static_tracepoint>: New.
6091 (struct tracepoint) <handle>: Mention static tracepoints.
6092 (struct static_tracepoint_ctx): New.
6093 (CMD_BUF_SIZE): New.
6094 (add_tracepoint_action): Handle static tracepoint actions.
6095 (unprobe_marker_at): New.
6096 (clear_installed_tracepoints): Handle static tracepoints.
6097 (cmd_qtdp): Handle static tracepoints.
6098 (probe_marker_at): New.
6099 (cmd_qtstart): Handle static tracepoints.
6100 (response_tracepoint): Handle static tracepoints.
6101 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6102 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6103 (get_context_regcache): Handle static tracepoints.
6104 (do_action_at_tracepoint): Handle static tracepoint actions.
6105 (traceframe_find_block_type): Handle static trace data blocks.
6106 (traceframe_read_sdata): New.
6107 (download_tracepoints): Download static tracepoint actions.
6108 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6109 (GDB_PROBE_NAME): New.
6110 (ust_ops): New.
6111 (GET_UST_SYM): New.
6112 (USTF): New.
6113 (dlsym_ust): New.
6114 (ust_marker_to_static_tracepoint): New.
6115 (gdb_probe): New.
6116 (collect_ust_data_at_tracepoint): New.
6117 (gdb_ust_probe): New.
6118 (UNIX_PATH_MAX, SOCK_DIR): New.
6119 (gdb_ust_connect_sync_socket): New.
6120 (resume_thread, stop_thread): New.
6121 (run_inferior_command): New.
6122 (init_named_socket): New.
6123 (gdb_ust_socket_init): New.
6124 (cstr_to_hexstr): New.
6125 (next_st): New.
6126 (first_marker, next_marker): New.
6127 (response_ust_marker): New.
6128 (cmd_qtfstm, cmd_qtsstm): New.
6129 (unprobe_marker_at, probe_marker_at): New.
6130 (cmd_qtstmat, gdb_ust_thread): New.
6131 (gdb_ust_init): New.
6132 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6133 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6134 (ST_REGENTRY): New.
6135 (x86_64_st_collect_regmap): New.
6136 (X86_64_NUM_ST_COLLECT_GREGS): New.
6137 (AMD64_RIP_REGNUM): New.
6138 (supply_static_tracepoint_registers): New.
6139 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6140 (ST_REGENTRY): New.
6141 (i386_st_collect_regmap): New.
6142 (i386_NUM_ST_COLLECT_GREGS): New.
6143 (supply_static_tracepoint_registers): New.
6144 * server.c (handle_query): Handle qXfer:statictrace:read.
6145 <qSupported>: Report support for StaticTracepoints, and
6146 qXfer:statictrace:read features.
6147 * server.h (traceframe_read_sdata)
6148 (supply_static_tracepoint_registers): Declare.
6149 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6150 (unpack_varlen_hex): Include in IPA build.
6151 * Makefile.in (ustlibs, ustinc): New.
6152 (IPA_OBJS): Add remote-utils-ipa.o.
6153 ($(IPA_LIB)): Link -ldl and -lpthread.
6154 (UST_CFLAGS): New.
6155 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6156 * config.in, configure: Regenerate.
6157
6158 2010-06-20 Ian Lance Taylor <iant@google.com>
6159 Pedro Alves <pedro@codesourcery.com>
6160
6161 * linux-x86-low.c (always_true): Delete.
6162 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6163 trying to fool the compiler with always_true.
6164
6165 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6166
6167 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6168 conditions in gdbserver.
6169
6170 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6171
6172 * spu-low.c (spu_read_memory): Wrap around local store limit.
6173 (spu_write_memory): Likewise.
6174
6175 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6176
6177 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6178 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6179 LONGEST uses.
6180 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6181 uses.
6182 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6183 uses with LONGEST uses.
6184
6185 2010-06-14 Stan Shebs <stan@codesourcery.com>
6186 Pedro Alves <pedro@codesourcery.com>
6187
6188 Bytecode compiler.
6189
6190 * linux-x86-low.c: Include limits.h.
6191 (add_insns): New.
6192 (always_true): New.
6193 (EMIT_ASM): New.
6194 (EMIT_ASM32): New.
6195 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6196 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6197 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6198 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6199 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6200 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6201 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6202 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6203 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6204 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6205 (amd64_emit_void_call_2): New.
6206 (amd64_emit_ops): New.
6207 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6208 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6209 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6210 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6211 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6212 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6213 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6214 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6215 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6216 (i386_emit_stack_adjust, i386_emit_int_call_1)
6217 (i386_emit_void_call_2): New.
6218 (i386_emit_ops): New.
6219 (x86_emit_ops): New.
6220 (the_low_target): Install x86_emit_ops.
6221 * server.h (struct emit_ops): New.
6222 (get_raw_reg_func_addr): Declare.
6223 (current_insn_ptr, emit_error): Declare.
6224 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6225 (set_trace_state_variable_value): New defines.
6226 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6227 addr_get_trace_state_variable_value and
6228 addr_set_trace_state_variable_value.
6229 (symbol_list): New fields for get_raw_reg,
6230 get_trace_state_variable_value and set_trace_state_variable_value.
6231 (condfn): New typedef.
6232 (struct tracepoint): New field `compiled_cond'.
6233 (do_action_at_tracepoint): Clear compiled_cond.
6234 (get_trace_state_variable_value, set_trace_state_variable_value):
6235 Export in the IPA.
6236 (condition_true_at_tracepoint): If there's a compiled condition,
6237 run that.
6238 (current_insn_ptr, emit_error): New globals.
6239 (struct bytecode_address): New.
6240 (get_raw_reg_func_addr): New.
6241 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6242 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6243 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6244 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6245 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6246 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6247 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6248 (compile_tracepoint_condition, compile_bytecodes): New.
6249 * target.h (emit_ops): Forward declare.
6250 (struct target_ops): New field emit_ops.
6251 (target_emit_ops): New.
6252 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6253 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6254 * linux-low.c (linux_emit_ops): New.
6255 (linux_target_ops): Install it.
6256 * linux-low.h (struct linux_target_ops): New field emit_ops.
6257
6258 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6259
6260 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6261 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6262
6263 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6264 Stan Shebs <stan@codesourcery.com>
6265
6266 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6267 (all): Depend on $(extra_libraries).
6268 (install-only): Install the IPA.
6269 (IPA_OBJS, IPA_LIB): New.
6270 (clean): Remove the IPA lib.
6271 (IPAGENT_CFLAGS): New.
6272 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6273 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6274 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6275 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6276 * configure.ac: Check for atomic builtins support in the compiler.
6277 (IPA_DEPFILES, extra_libraries): Define.
6278 * configure.srv (ipa_obj): Add description.
6279 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6280 (i[34567]86-*-linux*): Set ipa_obj.
6281 (x86_64-*-linux*): Set ipa_obj.
6282 * linux-low.c (stabilizing_threads): New.
6283 (supports_fast_tracepoints): New.
6284 (linux_detach): Stabilize threads before detaching.
6285 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6286 the lwp is either not stabilizing, or is moving out of a jump pad.
6287 (linux_fast_tracepoint_collecting): New.
6288 (maybe_move_out_of_jump_pad): New.
6289 (enqueue_one_deferred_signal): New.
6290 (dequeue_one_deferred_signal): New.
6291 (linux_wait_for_event_1): If moving out of a jump pad, defer
6292 pending signals to later.
6293 (linux_stabilize_threads): New.
6294 (linux_wait_1): Check if threads need moving out of jump pads, and
6295 do it if so.
6296 (stuck_in_jump_pad_callback): New.
6297 (move_out_of_jump_pad_callback): New.
6298 (lwp_running): New.
6299 (linux_resume_one_lwp): Handle moving out of jump pads.
6300 (linux_set_resume_request): Dequeue deferred signals.
6301 (need_step_over_p): Also step over fast tracepoint jumps.
6302 (start_step_over): Also uninsert fast tracepoint jumps.
6303 (finish_step_over): Also reinsert fast tracepoint jumps.
6304 (linux_install_fast_tracepoint_jump): New.
6305 (linux_target_ops): Install linux_stabilize_threads and
6306 linux_install_fast_tracepoint_jump_pad.
6307 * linux-low.h (linux_target_ops) <get_thread_area,
6308 install_fast_tracepoint_jump_pad>: New fields.
6309 (struct lwp_info) <collecting_fast_tracepoint,
6310 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6311 (linux_get_thread_area): Declare.
6312 * linux-x86-low.c (jump_insn): New.
6313 (x86_get_thread_area): New.
6314 (append_insns): New.
6315 (push_opcode): New.
6316 (amd64_install_fast_tracepoint_jump_pad): New.
6317 (i386_install_fast_tracepoint_jump_pad): New.
6318 (x86_install_fast_tracepoint_jump_pad): New.
6319 (the_low_target): Install x86_get_thread_area and
6320 x86_install_fast_tracepoint_jump_pad.
6321 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6322 (struct fast_tracepoint_jump): New.
6323 (fast_tracepoint_jump_insn): New.
6324 (fast_tracepoint_jump_shadow): New.
6325 (find_fast_tracepoint_jump_at): New.
6326 (fast_tracepoint_jump_here): New.
6327 (delete_fast_tracepoint_jump): New.
6328 (set_fast_tracepoint_jump): New.
6329 (uninsert_fast_tracepoint_jumps_at): New.
6330 (reinsert_fast_tracepoint_jumps_at): New.
6331 (set_breakpoint_at): Use write_inferior_memory.
6332 (uninsert_raw_breakpoint): Use write_inferior_memory.
6333 (check_mem_read): Mask out fast tracepoint jumps.
6334 (check_mem_write): Mask out fast tracepoint jumps.
6335 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6336 (set_fast_tracepoint_jump): Declare.
6337 (delete_fast_tracepoint_jump)
6338 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6339 (reinsert_fast_tracepoint_jumps_at): Declare.
6340 * regcache.c: Don't compile many functions when building the
6341 in-process agent library.
6342 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6343 the register buffer in the heap.
6344 (free_register_cache): If the register buffer isn't owned by the
6345 regcache, don't free it.
6346 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6347 pre-existing register caches.
6348 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6349 type.
6350 (convert_ascii_to_int): : Constify `from' parameter type.
6351 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6352 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6353 the needed buffer in-place.
6354 (relocate_instruction): New.
6355 * server.c (handle_query) <qSymbols>: If the target supports
6356 tracepoints, give it a chance of looking up symbols. Report
6357 support for fast tracepoints.
6358 (handle_status): Stabilize threads.
6359 (process_serial_event): Adjust.
6360 * server.h (struct fast_tracepoint_jump): Forward declare.
6361 (struct process_info) <fast_tracepoint_jumps>: New field.
6362 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6363 (decode_X_packet, decode_M_packet): Adjust.
6364 (relocate_instruction): Declare.
6365 (in_process_agent_loaded): Declare.
6366 (tracepoint_look_up_symbols): Declare.
6367 (struct fast_tpoint_collect_status): Declare.
6368 (fast_tracepoint_collecting): Declare.
6369 (force_unlock_trace_buffer): Declare.
6370 (handle_tracepoint_bkpts): Declare.
6371 (initialize_low_tracepoint)
6372 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6373 * target.h (struct target_ops) <stabilize_threads,
6374 install_fast_tracepoint_jump_pad>: New fields.
6375 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6376 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6377 [HAVE_STDINT_H]: Include stdint.h.
6378 (trace_debug_1): Rename to ...
6379 (trace_vdebug): ... this.
6380 (trace_debug): Rename to ...
6381 (trace_debug_1): ... this. Add `level' parameter.
6382 (trace_debug): New.
6383 (ATTR_USED, ATTR_NOINLINE): New.
6384 (IP_AGENT_EXPORT): New.
6385 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6386 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6387 (about_to_request_buffer_space, trace_buffer_is_full)
6388 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6389 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6390 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6391 (traceframe_write_count, traceframes_created)
6392 (trace_state_variables)
6393 New renaming defines.
6394 (struct ipa_sym_addresses): New.
6395 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6396 (symbol_list): New.
6397 (ipa_sym_addrs): New.
6398 (all_tracepoint_symbols_looked_up): New.
6399 (in_process_agent_loaded): New.
6400 (write_e_ipa_not_loaded): New.
6401 (maybe_write_ipa_not_loaded): New.
6402 (tracepoint_look_up_symbols): New.
6403 (debug_threads) [IN_PROCESS_AGENT]: New.
6404 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6405 (UNKNOWN_SIDE_EFFECTS): New.
6406 (stop_tracing): New.
6407 (flush_trace_buffer): New.
6408 (stop_tracing_bkpt): New.
6409 (flush_trace_buffer_bkpt): New.
6410 (read_inferior_integer): New.
6411 (read_inferior_uinteger): New.
6412 (read_inferior_data_pointer): New.
6413 (write_inferior_data_pointer): New.
6414 (write_inferior_integer): New.
6415 (write_inferior_uinteger): New.
6416 (struct collect_static_trace_data_action): Delete.
6417 (enum tracepoint_type): New.
6418 (struct tracepoint) <type>: New field `type'.
6419 <actions_str, step_actions, step_actions_str>: Only include in
6420 GDBserver.
6421 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6422 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6423 (tracepoints): Use IP_AGENT_EXPORT.
6424 (last_tracepoint): Don't include in the IPA.
6425 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6426 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6427 (alloced_trace_state_variables): New.
6428 (trace_state_variables): Use IP_AGENT_EXPORT.
6429 (traceframe_t): Delete unused variable.
6430 (circular_trace_buffer): Don't include in the IPA.
6431 (trace_buffer_start): Delete.
6432 (struct trace_buffer_control): New.
6433 (trace_buffer_free): Delete.
6434 (struct ipa_trace_buffer_control): New.
6435 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6436 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6437 New.
6438 (trace_buffer_ctrl): New.
6439 (TRACE_BUFFER_CTRL_CURR): New.
6440 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6441 Reimplement as macros.
6442 (trace_buffer_wrap): Delete.
6443 (traceframe_write_count, traceframe_read_count)
6444 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6445 (struct tracepoint_hit_ctx) <type>: New field.
6446 (struct fast_tracepoint_ctx): New.
6447 (memory_barrier): New.
6448 (cmpxchg): New.
6449 (record_tracepoint_error): Update atomically in the IPA.
6450 (clear_inferior_trace_buffer): New.
6451 (about_to_request_buffer_space): New.
6452 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6453 updating the same buffer.
6454 (add_tracepoint): Default the tracepoint's type to trap
6455 tracepoint, and orig_size to -1.
6456 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6457 internal variables.
6458 (create_trace_state_variable): New parameter `gdb'. Handle it.
6459 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6460 (cmd_qtdp): Handle fast tracepoints.
6461 (cmd_qtdv): Adjust.
6462 (max_jump_pad_size): New.
6463 (gdb_jump_pad_head): New.
6464 (get_jump_space_head): New.
6465 (claim_jump_space): New.
6466 (sort_tracepoints): New.
6467 (MAX_JUMP_SIZE): New.
6468 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6469 IPA.
6470 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6471 support. Upload fast traceframes, and delete internal IPA
6472 breakpoints.
6473 (stop_tracing_handler): New.
6474 (flush_trace_buffer_handler): New.
6475 (cmd_qtstop): Upload fast tracepoints.
6476 (response_tracepoint): Handle fast tracepoints.
6477 (tracepoint_finished_step): Upload fast traceframes. Set the
6478 tracepoint hit context's tracepoint type.
6479 (handle_tracepoint_bkpts): New.
6480 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6481 type. Add comment about fast tracepoints.
6482 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6483 non-existing action_str field.
6484 (get_context_regcache): Handle fast tracepoints.
6485 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6486 to the regcache.
6487 (fast_tracepoint_from_jump_pad_address): New.
6488 (fast_tracepoint_from_ipa_tpoint_address): New.
6489 (collecting_t): New.
6490 (force_unlock_trace_buffer): New.
6491 (fast_tracepoint_collecting): New.
6492 (collecting): New.
6493 (gdb_collect): New.
6494 (write_inferior_data_ptr): New.
6495 (target_tp_heap): New.
6496 (target_malloc): New.
6497 (download_agent_expr): New.
6498 (UALIGN): New.
6499 (download_tracepoints): New.
6500 (download_trace_state_variables): New.
6501 (upload_fast_traceframes): New.
6502 (IPA_FIRST_TRACEFRAME): New.
6503 (IPA_NEXT_TRACEFRAME_1): New.
6504 (IPA_NEXT_TRACEFRAME): New.
6505 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6506 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6507 (gdb_jump_pad_buffer_end): New.
6508 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6509 (initialize_tracepoint): Adjust.
6510 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6511 buffer. Initialize the low module.
6512 * utils.c (PREFIX, TOOLNAME): New.
6513 (malloc_failure): Use PREFIX.
6514 (error): In the IPA, an error causes an exit.
6515 (fatal, warning): Use PREFIX.
6516 (internal_error): Use TOOLNAME.
6517 (NUMCELLS): Increase to 10.
6518 * configure, config.in: Regenerate.
6519
6520 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6521
6522 * server.c (handle_query) <qSupported>: Do two passes over the
6523 qSupported string to avoid nesting strtok.
6524
6525 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6526
6527 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6528 (CDEPS): New.
6529 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6530 -Wl,--dynamic-list.
6531 * configure: Regenerate.
6532 * proc-service.list: New.
6533
6534 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6535
6536 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6537 New comment.
6538
6539 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6540
6541 * gdbreplay.c (remote_open): Check error return from socket() call by
6542 its equality to -1 not by it being negative.
6543 * remote-utils.c (remote_open): Likewise.
6544
6545 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6546
6547 * config.h: Regenerate.
6548
6549 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6550
6551 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6552 doesn't provide PTRACE_GET_THREAD_AREA.
6553
6554 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6555
6556 * linux-m68k-low.c: Include <asm/ptrace.h>
6557 (ps_get_thread_area): Implement.
6558
6559 2010-05-03 Doug Evans <dje@google.com>
6560
6561 * event-loop.c (struct callback_event): New struct.
6562 (callback_list): New global.
6563 (append_callback_event, delete_callback_event): New functions.
6564 (process_callback): New function.
6565 (start_event_loop): Call it.
6566 * remote-utils.c (NOT_SCHEDULED): Define.
6567 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6568 moved out of readchar.
6569 (readchar): Rewrite. Call reschedule before returning.
6570 (reset_readchar): New function.
6571 (remote_close): Call it.
6572 (process_remaining, reschedule): New functions.
6573 * server.h (callback_handler_func): New typedef.
6574 (append_callback_event, delete_callback_event): Declare.
6575
6576 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6577
6578 * proc-service.c (ps_pglobal_lookup): Use
6579 thread_db_look_up_one_symbol.
6580 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6581 parameter. Use it instead of all_symbols_looked_up.
6582 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6583 field.
6584 (all_symbols_looked_up): Don't declare.
6585 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6586 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6587 field.
6588 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6589 Set all_symbols_looked_up here.
6590 (thread_db_look_up_one_symbol): New.
6591 (thread_db_get_tls_address): Adjust.
6592 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6593 thread_db object on the heap, and tentatively set it in the
6594 process structure.
6595 (thread_db_init): Don't set all_symbols_looked_up here.
6596 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6597
6598 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6599
6600 * linux-low.c (linux_kill, linux_detach): Adjust.
6601 (status_pending_p_callback): Remove redundant statement. Check
6602 for !TARGET_WAITIKIND_IGNORE, instead of
6603 TARGET_WAITKIND_STOPPED.
6604 (handle_tracepoints): Make sure LWP is locked. Adjust.
6605 (linux_wait_for_event_1): Adjust.
6606 (linux_cancel_breakpoints): New.
6607 (unsuspend_one_lwp): New.
6608 (unsuspend_all_lwps): New.
6609 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6610 (send_sigstop_callback): Change return type to int, add new
6611 `except' parameter and handle it.
6612 (suspend_and_send_sigstop_callback): New.
6613 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6614 pass them down. If SUSPEND, also increment the lwp's suspend
6615 count.
6616 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6617 (need_step_over_p): Don't consider suspended LWPs.
6618 (start_step_over): Adjust.
6619 (proceed_one_lwp): Change return type to int, add new `except'
6620 parameter and handle it.
6621 (unsuspend_and_proceed_one_lwp): New.
6622 (proceed_all_lwps): Use find_inferior instead of
6623 for_each_inferior.
6624 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6625 also decrement the suspend count of LWPs. Pass `except' down,
6626 instead of hacking its suspend count.
6627 (linux_pause_all): Add `freeze' parameter. Adjust.
6628 (linux_unpause_all): New.
6629 (linux_target_ops): Install linux_unpause_all.
6630 * server.c (handle_status): Adjust.
6631 * target.h (struct target_ops): New fields `unpause_all' and
6632 `cancel_breakpoints'. Add new parameter to `pause_all'.
6633 (pause_all): Add new `freeze' parameter.
6634 (unpause_all): New.
6635 (cancel_breakpoints): New.
6636 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6637 cancel breakpoints.
6638 (cmd_qtstart): Pause threads.
6639 (stop_tracing): Pause threads, and cancel breakpoints.
6640 * win32-low.c (win32_target_ops): Adjust.
6641
6642 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6643
6644 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6645 the inferior right away from here...
6646 (linux_wait_1): ... to here, and adjust to check the thread's
6647 last_resume_kind instead of the lwp's step or stop_expected flags.
6648
6649 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6650
6651 * README: Use consistent `GDB' and `GDBserver' spellings.
6652
6653 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6654
6655 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6656 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6657 (linux_detach_one_lwp): Assume the lwp is stopped.
6658 (any_thread_of): Delete.
6659 (linux_detach): Stop all lwps here. Don't blindly delete all
6660 breakpoints.
6661 (delete_lwp_callback): New.
6662 (linux_mourn): Delete all lwps of the process that is gone.
6663 (linux_wait_1): Don't delete the last lwp of the process here.
6664 * mem-break.h (mark_breakpoints_out): Declare.
6665 * mem-break.c (mark_breakpoints_out): New.
6666 (free_all_breakpoints): Use it.
6667 * server.c (handle_target_event): If the process is gone, mark
6668 breakpoints out.
6669 * thread-db.c (struct thread_db) <create_bp>: New field.
6670 (thread_db_enable_reporting): Fix prototype. Store a thread event
6671 breakpoint reference in the thread_db struct.
6672 (thread_db_load_search): Clear the thread_db object.
6673 (try_thread_db_load_1): Ditto.
6674 (switch_to_process): New.
6675 (disable_thread_event_reporting): Use it.
6676 (remove_thread_event_breakpoints): New.
6677 (thread_db_detach, thread_db_mourn): Use it.
6678
6679 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6680
6681 * linux-low.c (linux_enable_event_reporting): New.
6682 (linux_wait_for_event_1, handle_extended_wait): Use it.
6683
6684 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6685
6686 * linux-low.c (linux_kill_one_lwp, linux_kill)
6687 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6688 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6689 SIGSTOP even if the LWP is stopped.
6690 (send_sigstop_callback): New.
6691 (stop_all_lwps): Use send_sigstop_callback instead.
6692 (linux_resume_one_thread): Adjust.
6693 (proceed_one_lwp): Still proceed an LWP that the client has
6694 requested to stop, if we haven't reported it as stopped yet. Make
6695 sure that LWPs the client want stopped, have a pending SIGSTOP.
6696
6697 2010-04-26 Doug Evans <dje@google.com>
6698
6699 * server.c (handle_general_set): Make static.
6700
6701 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6702 Print received char after testing for error/eof instead of before.
6703 (input_interrupt): Tweak comment.
6704
6705 2010-04-23 Doug Evans <dje@google.com>
6706
6707 * server.c (start_inferior): Print inferior argv if --debug.
6708
6709 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6710
6711 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6712 * nto-x86-low.c: Include server.h
6713
6714 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6715
6716 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6717 be consistent with other sources of this directory.
6718 (init_registers_amd64): Correct name of source file of this function
6719 in the comment.
6720
6721 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6722
6723 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6724 64-bit executables.
6725
6726 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6727
6728 * win32-i386-low.c: Add 64-bit support.
6729 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6730 (init_registers_amd64): Declare.
6731 (mappings): Add 64-bit version of array.
6732 (init_windows_x86): New function.
6733 (the_low_target): Change init_arch field to init_windows_x86.
6734
6735 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6736
6737 * win32-low.c: Adapt to support also 64-bit architecture.
6738 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6739 (get_image_name): Use SIZE_T type for local variable `done'.
6740 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6741 (toolhelp_get_dll_name): Idem.
6742 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6743 Use uintptr_t typecast to avoid warning.
6744 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6745 (handle_exception): Use phex_nz to avoid warning.
6746 (win32_wait): Remove unused local variable `process'.
6747
6748 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6749
6750 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6751 `amd64-avx.o'.
6752
6753 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6754
6755 * configure.ac: Use `ws2_32' library for srv_mingw.
6756 * configure: Regenerate.
6757 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6758 * remote-utils.c: Likewise.
6759
6760 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6761
6762 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6763 if __x86_64__ is defined.
6764
6765 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6766
6767 * configure: Regenerate.
6768
6769 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6770
6771 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6772 * target.h (target_ops): New get_tib_address field.
6773 * win32-low.h (win32_thread_info): Add thread_local_base field.
6774 * win32-low.c (child_add_thread): Add tlb argument.
6775 Set thread_local_base field to TLB.
6776 (get_child_debug_event): Adapt to child_add_thread change.
6777 (win32_get_tib_address): New function.
6778 (win32_target_ops): Set get_tib_address field to
6779 win32_get_tib_address.
6780 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6781
6782 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6783
6784 * linux-low.c (linux_mourn): Also remove the process.
6785 * server.c (handle_target_event): Don't remove the process here.
6786 * nto-low.c (nto_mourn): New.
6787 (nto_target_ops): Install it.
6788 * spu-low.c (spu_mourn): New.
6789 (spu_target_ops): Install it.
6790 * win32-low.c (win32_mourn): New.
6791 (win32_target_ops): Install it.
6792
6793 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6794
6795 * server.h (buffer_xml_printf): Remove redundant `;'.
6796
6797 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6798
6799 * regcache.c (set_register_cache): Invalidate regcaches before
6800 changing the register cache layout.
6801 (regcache_invalidate_one): Allow a NULL regcache.
6802 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6803 regcaches before changing the register cache layout or the target
6804 regsets.
6805
6806 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6807
6808 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6809 variable warning on Linux/x86-64.
6810
6811 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6812
6813 GDBserver disconnected tracing support.
6814
6815 * linux-low.c (linux_remove_process): Delete.
6816 (add_lwp): Don't set last_resume_kind here.
6817 (linux_kill): Use `mourn'.
6818 (linux_detach): Use `thread_db_detach', and `mourn'.
6819 (linux_mourn): New.
6820 (linux_attach_lwp_1): Adjust comment.
6821 (linux_attach): last_resume_kind moved the thread_info; adjust.
6822 (status_pending_p_callback): Adjust.
6823 (linux_wait_for_event_1): Adjust.
6824 (count_events_callback, select_singlestep_lwp_callback)
6825 (select_event_lwp_callback, cancel_breakpoints_callback)
6826 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6827 (proceed_one_lwp): Adjust.
6828 (linux_async): Add debug output.
6829 (linux_thread_stopped): New.
6830 (linux_pause_all): New.
6831 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6832 linux_pause_all.
6833 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6834 (thread_db_free): Delete declaration.
6835 (thread_db_detach, thread_db_mourn): Declare.
6836 * thread-db.c (thread_db_init): Use thread_db_mourn.
6837 (thread_db_free): Delete, split in two.
6838 (disable_thread_event_reporting): New.
6839 (thread_db_detach): New.
6840 (thread_db_mourn): New.
6841
6842 * server.h (struct thread_info) <last_resume_kind>: New field.
6843 <attached>: Add comment.
6844 <gdb_detached>: New field.
6845 (handler_func): Change return type to int.
6846 (handle_serial_event, handle_target_event): Ditto.
6847 (gdb_connected): Declare.
6848 (tracing): Delete.
6849 (disconnected_tracing): Declare.
6850 (stop_tracing): Declare.
6851
6852 * server.c (handle_query) <qSupported>: Report support for
6853 disconnected tracing.
6854 (queue_stop_reply_callback): Account for running threads.
6855 (gdb_wants_thread_stopped): New.
6856 (gdb_wants_all_threads_stopped): New.
6857 (gdb_reattached_process): New.
6858 (handle_status): Clear the `gdb_detached' flag of all processes.
6859 In all-stop, stop all threads.
6860 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6861 (process_serial_event): If the remote connection breaks, or if an
6862 exit was forced with "monitor exit", force an event loop exit.
6863 Handle disconnected tracing on detach.
6864 (handle_serial_event): Adjust.
6865 (handle_target_event): If GDB isn't connected, forward events back
6866 to the inferior, unless the last process exited, in which case,
6867 exit gdbserver. Adjust interface.
6868
6869 * remote-utils.c (remote_open): Don't block in accept. Instead
6870 register an event loop source on the listen socket file
6871 descriptor. Refactor bits into ...
6872 (listen_desc): ... this new global.
6873 (gdb_connected): ... this new function.
6874 (enable_async_notification): ... this new function.
6875 (handle_accept_event): ... this new function.
6876 (remote_close): Clear remote_desc.
6877
6878 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6879
6880 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6881 New fields.
6882 (mourn_inferior): Define.
6883 (target_process_qsupported): Avoid the dangling else problem.
6884 (thread_stopped): Define.
6885 (pause_all): Define.
6886 (target_waitstatus_to_string): Declare.
6887 * target.c (target_waitstatus_to_string): New.
6888
6889 * tracepoint.c (tracing): Make extern.
6890 (disconnected_tracing): New.
6891 (stop_tracing): Make extern. Handle tracing stops due to GDB
6892 disconnecting.
6893 (cmd_qtdisconnected): New.
6894 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6895 (handle_tracepoint_general_set): Handle QTDisconnected.
6896
6897 * event-loop.c (event_handler_func): Change return type to int.
6898 (process_event): Bail out if the event handler wants the event
6899 loop to stop.
6900 (handle_file_event): Ditto.
6901 (start_event_loop): Bail out if the event handler wants the event
6902 loop to stop.
6903
6904 * nto-low.c (nto_target_ops): Adjust.
6905 * spu-low.c (spu_wait): Don't remove the process here.
6906 (spu_target_ops): Adjust.
6907 * win32-low.c (win32_wait): Don't remove the process here.
6908 (win32_target_ops): Adjust.
6909
6910 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6911
6912 * regcache.c (realloc_register_cache): Invalidate inferior's
6913 regcache before recreating it.
6914
6915 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6916
6917 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6918
6919 2010-04-09 Stan Shebs <stan@codesourcery.com>
6920 Pedro Alves <pedro@codesourcery.com>
6921
6922 * server.h (LONGEST): New.
6923 (struct thread_info) <while_stepping>: New field.
6924 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6925 Declare.
6926 (initialize_tracepoint, handle_tracepoint_general_set)
6927 (handle_tracepoint_query, tracepoint_finished_step)
6928 (tracepoint_was_hit, release_while_stepping_state_list):
6929 (current_traceframe): Declare.
6930 * server.c (handle_general_set): Handle tracepoint packets.
6931 (read_memory): New.
6932 (write_memory): New.
6933 (handle_search_memory_1): Use read_memory.
6934 (handle_query): Report support for conditional tracepoints, trace
6935 state variables, and tracepoint sources. Handle tracepoint
6936 queries.
6937 (main): Initialize the tracepoints module.
6938 (process_serial_event): Handle traceframe reads/writes.
6939
6940 * linux-low.c (handle_tracepoints): New.
6941 (linux_wait_1): Call it.
6942 (linux_resume_one_lwp): Handle while-stepping.
6943 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6944 (linux_target_ops): Install them.
6945 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6946 New field.
6947 * linux-x86-low.c (x86_supports_tracepoints): New.
6948 (the_low_target). Install it.
6949
6950 * mem-break.h (delete_breakpoint): Declare.
6951 * mem-break.c (delete_breakpoint): Make external.
6952
6953 * target.h (struct target_ops): Add `supports_tracepoints',
6954 `read_pc', and `write_pc' fields.
6955 (target_supports_tracepoints): Define.
6956 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6957 (phex_nz): New.
6958
6959 * regcache.h (struct regcache) <registers_owned>: New field.
6960 (init_register_cache, regcache_cpy): Declare.
6961 (regcache_read_pc, regcache_write_pc): Declare.
6962 (register_cache_size): Declare.
6963 (supply_regblock): Declare.
6964 * regcache.c (init_register_cache): New.
6965 (new_register_cache): Use it.
6966 (regcache_cpy): New.
6967 (register_cache_size): New.
6968 (supply_regblock): New.
6969 (regcache_read_pc, regcache_write_pc): New.
6970
6971 * tracepoint.c: New.
6972
6973 * Makefile.in (OBS): Add tracepoint.o.
6974 (tracepoint.o): New rule.
6975
6976 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6977
6978 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6979 (i386-mmx.o): New.
6980 (i386-mmx.c): Likewise.
6981 (i386-mmx-linux.o): Likewise.
6982 (i386-mmx-linux.c): Likewise.
6983
6984 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6985 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6986 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6987 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6988
6989 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6990 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6991 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6992
6993 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6994
6995 * Makefile.in (clean): Updated.
6996 (i386-avx.o): New.
6997 (i386-avx.c): Likewise.
6998 (i386-avx-linux.o): Likewise.
6999 (i386-avx-linux.c): Likewise.
7000 (amd64-avx.o): Likewise.
7001 (amd64-avx.c): Likewise.
7002 (amd64-avx-linux.o): Likewise.
7003 (amd64-avx-linux.c): Likewise.
7004
7005 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7006 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7007 (srv_amd64_regobj): Add amd64-avx.o.
7008 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7009 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7010 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7011 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7012 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7013 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7014 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7015
7016 * i387-fp.c: Include "i386-xstate.h".
7017 (i387_xsave): New.
7018 (i387_cache_to_xsave): Likewise.
7019 (i387_xsave_to_cache): Likewise.
7020 (x86_xcr0): Likewise.
7021
7022 * i387-fp.h (i387_cache_to_xsave): Likewise.
7023 (i387_xsave_to_cache): Likewise.
7024 (x86_xcr0): Likewise.
7025
7026 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7027 * linux-crisv32-low.c (target_regsets): Likewise.
7028 * linux-m68k-low.c (target_regsets): Likewise.
7029 * linux-mips-low.c (target_regsets): Likewise.
7030 * linux-ppc-low.c (target_regsets): Likewise.
7031 * linux-s390-low.c (target_regsets): Likewise.
7032 * linux-sh-low.c (target_regsets): Likewise.
7033 * linux-sparc-low.c (target_regsets): Likewise.
7034 * linux-xtensa-low.c (target_regsets): Likewise.
7035
7036 * linux-low.c: Include <sys/uio.h>.
7037 (regsets_fetch_inferior_registers): Support nt_type.
7038 (regsets_store_inferior_registers): Likewise.
7039 (linux_process_qsupported): New.
7040 (linux_target_ops): Add linux_process_qsupported.
7041
7042 * linux-low.h (regset_info): Add nt_type.
7043 (linux_target_ops): Add process_qsupported.
7044
7045 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7046 and <sys/uio.h>.
7047 (init_registers_i386_avx_linux): New.
7048 (init_registers_amd64_avx_linux): Likewise.
7049 (xmltarget_i386_linux_no_xml): Likewise.
7050 (xmltarget_amd64_linux_no_xml): Likewise.
7051 (PTRACE_GETREGSET): Likewise.
7052 (PTRACE_SETREGSET): Likewise.
7053 (x86_fill_xstateregset): Likewise.
7054 (x86_store_xstateregset): Likewise.
7055 (use_xml): Likewise.
7056 (x86_linux_update_xmltarget): Likewise.
7057 (x86_linux_process_qsupported): Likewise.
7058 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7059 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7060 init_registers_i386_linux here. Call
7061 x86_linux_update_xmltarget.
7062 (the_low_target): Add x86_linux_process_qsupported.
7063
7064 * server.c (handle_query): Call target_process_qsupported.
7065
7066 * target.h (target_ops): Add process_qsupported.
7067 (target_process_qsupported): New.
7068
7069 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7070
7071 * inferiors.c (add_thread): Set last_status kind to
7072 TARGET_WAITKIND_IGNORE.
7073 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7074 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7075 (linux_wait_1): Move `thread' local definition to block that uses
7076 it. Don't NULL initialize `event_child'.
7077 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7078 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7079 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7080
7081 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7082
7083 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7084 an extended waitstatus, or by a watchpoint.
7085 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7086 thread was stepping or has been stopped by a watchpoint.
7087
7088 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7089
7090 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7091 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7092 of another, then delete the previous, and validate all
7093 breakpoints.
7094 (validate_inserted_breakpoint): New.
7095 (delete_disabled_breakpoints): New.
7096 (validate_breakpoints): New.
7097 (check_mem_read): Validate breakpoints before trusting their
7098 shadow. Delete disabled breakpoints.
7099 (check_mem_write): Validate breakpoints before trusting they
7100 should be inserted. Delete disabled breakpoints.
7101 * mem-break.h (validate_breakpoints):
7102 * server.c (handle_query): Validate breakpoints when we see a
7103 qSymbol query.
7104
7105 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7106
7107 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7108 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7109 if we could tell there's a GDB breakpoint at stop_pc.
7110 (need_step_over_p): Don't do a step over if we find a GDB
7111 breakpoint at the resume PC.
7112
7113 * mem-break.c (struct raw_breakpoint): New.
7114 (enum bkpt_type): New type `gdb_breakpoint'.
7115 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7116 fields. New field `raw'.
7117 (find_raw_breakpoint_at): New.
7118 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7119 breakpoint instead.
7120 (set_breakpoint_at): Adjust.
7121 (delete_raw_breakpoint): New.
7122 (release_breakpoint): New.
7123 (delete_breakpoint): Rename to...
7124 (delete_breakpoint_1): ... this. Add proc parameter. Use
7125 release_breakpoint. Return ENOENT.
7126 (delete_breakpoint): Reimplement.
7127 (find_breakpoint_at): Delete.
7128 (find_gdb_breakpoint_at): New.
7129 (delete_breakpoint_at): Delete.
7130 (set_gdb_breakpoint_at): New.
7131 (delete_gdb_breakpoint_at): New.
7132 (gdb_breakpoint_here): New.
7133 (set_reinsert_breakpoint): Use release_breakpoint.
7134 (uninsert_breakpoint): Rename to ...
7135 (uninsert_raw_breakpoint): ... this.
7136 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7137 (reinsert_raw_breakpoint): Change parameter type to
7138 raw_breakpoint.
7139 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7140 instead.
7141 (check_breakpoints): Adjust. Use release_breakpoint.
7142 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7143 (breakpoint_inserted_here): Ditto.
7144 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7145 Don't trust the breakpoint's shadow if it is not inserted.
7146 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7147 (delete_all_breakpoints): Adjust.
7148 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7149 use delete_breakpoint_1.
7150
7151 * mem-break.h (breakpoints_supported): Delete declaration.
7152 (set_gdb_breakpoint_at): Declare.
7153 (gdb_breakpoint_here): Declare.
7154 (delete_breakpoint_at): Delete.
7155 (delete_gdb_breakpoint_at): Declare.
7156
7157 * server.h (struct raw_breakpoint): Forward declare.
7158 (struct process_info): New field `raw_breakpoints'.
7159
7160 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7161 breakpoints.
7162
7163 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7164
7165 * linux-low.c (status_pending_p_callback): Fix comment.
7166 (linux_wait_for_event_1): Move most of the internal breakpoint
7167 handling from here...
7168 (linux_wait_1): ... to here.
7169 (count_events_callback): New.
7170 (select_singlestep_lwp_callback): New.
7171 (select_event_lwp_callback): New.
7172 (cancel_breakpoints_callback): New.
7173 (select_event_lwp): New.
7174 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7175 priority to all LWPs that have had events that should be reported
7176 to the client. Cancel breakpoints when about to reporting the
7177 event to the client, not while stopping lwps. No longer cancel
7178 finished single-steps here.
7179 (cancel_finished_single_step): Delete.
7180 (cancel_finished_single_steps): Delete.
7181
7182 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7183
7184 * mem-break.c (enum bkpt_type): New.
7185 (struct breakpoint): New field `type'.
7186 (set_breakpoint_at): Change return type to struct breakpoint
7187 pointer. Set type to `other_breakpoint' by default.
7188 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7189 in the breakpoint list.
7190 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7191 (reinsert_breakpoint): Rename to ...
7192 (reinsert_raw_breakpoint): ... this.
7193 (reinsert_breakpoints_at): Adjust.
7194 * mem-break.h (struct breakpoint): Declare.
7195 (set_breakpoint_at): Change return type to struct breakpoint
7196 pointer.
7197
7198 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7199
7200 * server.c (handle_query): Assign, not compare.
7201
7202 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7203
7204 Teach linux gdbserver to step-over-breakpoints.
7205
7206 * linux-low.c (can_hardware_single_step): New.
7207 (supports_breakpoints): New.
7208 (handle_extended_wait): If stopping threads, read the stop pc of
7209 the new cloned LWP.
7210 (get_pc): New.
7211 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7212 low target doesn't support retrieving the PC.
7213 (add_lwp): Set last_resume_kind to resume_continue.
7214 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7215 (linux_attach): Don't clear stop_expected. Set the lwp's
7216 last_resume_kind to resume_stop.
7217 (linux_detach_one_lwp): Don't check for removed breakpoints.
7218 (check_removed_breakpoint): Delete.
7219 (status_pending_p): Rename to ...
7220 (status_pending_p_callback): ... this. Don't check for removed
7221 breakpoints. Don't consider threads that are stopped from GDB's
7222 perspective.
7223 (linux_wait_for_lwp): Always read the stop_pc here.
7224 (cancel_breakpoint): New.
7225 (step_over_bkpt): New global.
7226 (linux_wait_for_event_1): Implement stepping over breakpoints.
7227 (gdb_wants_lwp_stopped): New.
7228 (gdb_wants_all_stopped): New.
7229 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7230 single-step traps here. Store the thread's last reported target
7231 wait status.
7232 (send_sigstop): Don't clear stop_expected. Always set it,
7233 instead.
7234 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7235 (cancel_finished_single_step): New.
7236 (cancel_finished_single_steps): New.
7237 (wait_for_sigstop): Don't cancel finished single-step traps here.
7238 (linux_resume_one_lwp): Don't check for removed breakpoints.
7239 Don't set `step' on non-hardware step archs.
7240 (linux_set_resume_request): Ignore resume_stop requests if already
7241 stopping or stopped. Set the lwp's last_resume_kind.
7242 (resume_status_pending_p): Don't check for removed breakpoints.
7243 (need_step_over_p): New.
7244 (start_step_over): New.
7245 (finish_step_over): New.
7246 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7247 requests. Clear the thread's last reported target waitstatus.
7248 Don't use the `suspended' flag. Don't consider pending breakpoints.
7249 (linux_resume): Start a step-over if necessary.
7250 (proceed_one_lwp): New.
7251 (proceed_all_lwps): New.
7252 (unstop_all_lwps): New.
7253 * linux-low.h (struct lwp_info): Rewrite comment for the
7254 `suspended' flag. Add the `stop_pc' field. Delete the
7255 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7256 Add `'last_resume_kind' and `need_step_over' fields.
7257 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7258 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7259 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7260 (set_raw_breakpoint_at): New.
7261 (set_breakpoint_at): Rewrite to use it.
7262 (reinsert_breakpoint_handler): Delete.
7263 (set_reinsert_breakpoint): New.
7264 (reinsert_breakpoint_by_bp): Delete.
7265 (delete_reinsert_breakpoints): New.
7266 (uninsert_breakpoint): Rewrite.
7267 (uninsert_breakpoints_at): New.
7268 (reinsert_breakpoint): Rewrite.
7269 (reinsert_breakpoints_at): New.
7270 (check_breakpoints): Rewrite.
7271 (breakpoint_here): New.
7272 (breakpoint_inserted_here): New.
7273 (check_mem_read): Adjust.
7274 * mem-break.h (breakpoints_supported, breakpoint_here)
7275 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7276 (reinsert_breakpoint_by_bp): Delete declaration.
7277 (delete_reinsert_breakpoints): Declare.
7278 (reinsert_breakpoint): Delete declaration.
7279 (reinsert_breakpoints_at): Declare.
7280 (uninsert_breakpoint): Delete declaration.
7281 (uninsert_breakpoints_at): Declare.
7282 (check_breakpoints): Adjust prototype.
7283 * server.h: Adjust include order.
7284 (struct thread_info): Declare here. Add a `last_status' field.
7285
7286 2010-03-23 Michael Snyder <msnyder@vmware.com>
7287
7288 * server.c (crc32): New function.
7289 (handle_query): Add handling for 'qCRC:' request.
7290
7291 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7292
7293 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7294 lwp had been stopped by a watchpoint.
7295
7296 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7297
7298 * server.h (internal_error): Declare.
7299 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7300 * utils.c (internal_error): New function.
7301
7302 2010-03-15 Andreas Schwab <schwab@redhat.com>
7303
7304 * configure.srv: Fix typo setting srv_regobj.
7305
7306 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7307
7308 * linux-low.c (fetch_register): Avoid passing a non string literal
7309 format to `error'.
7310 (usr_store_inferior_registers): Ditto.
7311
7312 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7313
7314 * linux-low.c (linux_write_memory): Bail out early if peeking
7315 memory failed.
7316
7317 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7318
7319 * linux-low.h (struct lwp_info): New fields
7320 `stopped_by_watchpoint' and `stopped_data_address'.
7321 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7322 here, and cache them in the lwp object.
7323 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7324 directly.
7325 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7326 field.
7327 (linux_stopped_by_watchpoint): Rewrite.
7328 (linux_stopped_data_address): Rewrite.
7329
7330 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7331
7332 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7333 switching the current inferior, not before.
7334
7335 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7336
7337 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7338 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7339 i386-linux.c and amd64-linux.c.
7340 (reg-i386.o): Removed.
7341 (reg-i386.c): Likewise.
7342 (reg-i386-linux.o): Likewise.
7343 (reg-i386-linux.c): Likewise.
7344 (reg-x86-64.o): Likewise.
7345 (reg-x86-64.c): Likewise.
7346 (reg-x86-64-linux.o): Likewise.
7347 (reg-x86-64-linux.c): Likewise.
7348 (i386.o): New.
7349 (i386.c): Likewise.
7350 (i386-linux.o): Likewise.
7351 (i386-linux.c): Likewise.
7352 (amd64.o): Likewise.
7353 (amd64.c): Likewise.
7354 (amd64-linux.o): Likewise.
7355 (amd64-linux.c): Likewise.
7356
7357 * configure.srv (srv_i386_regobj): New.
7358 (srv_i386_linux_regobj): Likewise.
7359 (srv_amd64_regobj): Likewise.
7360 (srv_amd64_linux_regobj): Likewise.
7361 (srv_i386_32bit_xmlfiles): Likewise.
7362 (srv_i386_64bit_xmlfiles): Likewise.
7363 (srv_i386_xmlfiles): Likewise.
7364 (srv_amd64_xmlfiles): Likewise.
7365 (srv_i386_linux_xmlfiles): Likewise.
7366 (srv_amd64_linux_xmlfiles): Likewise.
7367 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7368 srv_xmlfiles to $srv_i386_xmlfiles.
7369 (i[34567]86-*-mingw32ce*): Likewise.
7370 (i[34567]86-*-mingw*): Likewise.
7371 (i[34567]86-*-nto*): Likewise.
7372 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7373 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7374 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7375 (x86_64-*-linux*): Likewise.
7376
7377 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7378 (init_registers_amd64_linux): New.
7379 (x86_arch_setup): Replace init_registers_x86_64_linux with
7380 init_registers_amd64_linux.
7381
7382 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7383
7384 * configure.ac: Check for libdl. If it is not available link against
7385 static libthread_db.
7386 * configure: Regenerate.
7387
7388 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7389
7390 PR9605
7391
7392 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7393 handing a read watchpoint.
7394 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7395
7396 2010-02-12 Doug Evans <dje@google.com>
7397
7398 * linux-low.c (linux_supports_tracefork_flag): Document.
7399 (linux_look_up_symbols): Add comment.
7400
7401 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7402
7403 * regcache.c (supply_register): Clear regcache if buf is NULL.
7404
7405 2010-02-02 Nicolas Roche <roche@sourceware.org>
7406 Joel Brobecker <brobecker@adacore.com>
7407
7408 * inferiors.c (find_inferior): Add function documentation.
7409 (unloaded_dll): Handle the case where the unloaded dll has not
7410 been previously registered in the dll list.
7411
7412 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7413
7414 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7415 (thumb2_breakpoint): New.
7416 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7417
7418 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7419
7420 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7421 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7422 breakpoints.
7423
7424 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7425
7426 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7427
7428 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7429
7430 * linux-s390-low.c (s390_collect_ptrace_register)
7431 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7432
7433 2010-01-21 Doug Evans <dje@google.com>
7434
7435 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7436 (PTRACE_ARG4_TYPE): New macro.
7437 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7438 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7439 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7440 (usr_store_inferior_registers): Ditto.
7441 (linux_read_memory, linux_write_memory): Ditto.
7442 (linux_test_for_tracefork): Ditto.
7443
7444 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7445 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7446
7447 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7448
7449 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7450 target.
7451
7452 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7453
7454 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7455 prototype to take a regcache. Adjust.
7456
7457 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7458
7459 * regcache.h (struct thread_info): Forward declare.
7460 (struct regcache): New.
7461 (new_register_cache): Adjust prototype.
7462 (get_thread_regcache): Declare.
7463 (free_register_cache): Adjust prototype.
7464 (registers_to_string, registers_from_string): Ditto.
7465 (supply_register, supply_register_by_name, collect_register)
7466 (collect_register_as_string, collect_register_by_name): Ditto.
7467 * regcache.c (struct inferior_regcache_data): Delete.
7468 (get_regcache): Rename to ...
7469 (get_thread_regcache): ... this. Adjust. Switch inferior before
7470 fetching registers.
7471 (regcache_invalidate_one): Adjust.
7472 (regcache_invalidate): Fix prototype.
7473 (new_register_cache): Return the new register cache.
7474 (free_register_cache): Change prototype.
7475 (realloc_register_cache): Adjust.
7476 (registers_to_string): Change prototype to take a regcache. Adjust.
7477 (registers_from_string): Ditto.
7478 (register_data): Ditto.
7479 (supply_register): Ditto.
7480 (supply_register_by_name): Ditto.
7481 (collect_register): Ditto.
7482 (collect_register_as_string): Ditto.
7483 (collect_register_by_name): Ditto.
7484 * server.c (process_serial_event): Adjust.
7485 * linux-low.h (regset_fill_func, regset_store_func): Change
7486 prototype.
7487 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7488 Change prototype.
7489 * linux-low.c (get_stop_pc): Adjust.
7490 (check_removed_breakpoint): Adjust.
7491 (linux_wait_for_event): Adjust.
7492 (linux_resume_one_lwp): Adjust.
7493 (fetch_register): Add regcache parameter. Adjust.
7494 (usr_store_inferior_registers): Ditto.
7495 (regsets_fetch_inferior_registers): Ditto.
7496 (regsets_store_inferior_registers): Ditto.
7497 (linux_fetch_registers, linux_store_registers): Ditto.
7498 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7499 regcache. Adjust.
7500 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7501 Ditto.
7502 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7503 prototype to take a regcache.
7504 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7505 * remote-utils.c (convert_ascii_to_int, outreg)
7506 (prepare_resume_reply): Change prototype to take a regcache.
7507 Adjust.
7508 * target.h (struct target_ops) <fetch_registers, store_registers>:
7509 Change prototype to take a regcache.
7510 (fetch_inferior_registers, store_inferior_registers): Change
7511 prototype to take a regcache. Adjust.
7512 * proc-service.c (ps_lgetregs): Adjust.
7513 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7514 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7515 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7516 take a regcache. Adjust.
7517 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7518 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7519 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7520 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7521 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7522 (cris_cannot_fetch_register):
7523 (cris_breakpoint_at): Change prototype to take a regcache.
7524 Adjust.
7525 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7526 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7527 to take a regcache. Adjust.
7528 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7529 Adjust.
7530 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7531 take a regcache. Adjust.
7532 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7533 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7534 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7535 * linux-mips-low.c (mips_get_pc):
7536 (mips_set_pc): Change prototype to take a regcache. Adjust.
7537 (mips_reinsert_addr): Adjust.
7538 (mips_collect_register): Change prototype to take a regcache.
7539 Adjust.
7540 (mips_supply_register):
7541 (mips_collect_register_32bit, mips_supply_register_32bit)
7542 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7543 (mips_store_fpregset): Ditto.
7544 * linux-ppc-low.c (ppc_supply_ptrace_register)
7545 (ppc_supply_ptrace_register): Ditto.
7546 (parse_spufs_run): Adjust.
7547 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7548 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7549 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7550 take a regcache. Adjust.
7551 * linux-s390-low.c (s390_collect_ptrace_register)
7552 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7553 (s390_set_pc): Change prototype to take a regcache. Adjust.
7554 (s390_arch_setup): Adjust.
7555 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7556 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7557 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7558 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7559 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7560 regcache. Adjust.
7561 (sparc_breakpoint_at): Adjust.
7562 * linux-xtensa-low.c (xtensa_fill_gregset):
7563 (xtensa_store_gregset):
7564 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7565 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7566 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7567 prototype to take a regcache. Adjust.
7568 * win32-arm-low.c (arm_fetch_inferior_register)
7569 (arm_store_inferior_register): Change prototype to take a
7570 regcache. Adjust.
7571 * win32-i386-low.c (i386_fetch_inferior_register)
7572 (i386_store_inferior_register): Change prototype to take a
7573 regcache. Adjust.
7574 * win32-low.c (child_fetch_inferior_registers)
7575 (child_store_inferior_registers): Change prototype to take a
7576 regcache. Adjust.
7577 (win32_wait): Adjust.
7578 (win32_fetch_inferior_registers): Change prototype to take a
7579 regcache. Adjust.
7580 (win32_store_inferior_registers): Adjust.
7581 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7582 store_inferior_register>: Change prototype to take a regcache.
7583
7584 2010-01-20 Doug Evans <dje@google.com>
7585
7586 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7587 #ifdef.
7588 (linux_wait_for_event1, linux_init_signals): Ditto.
7589 (W_STOPCODE): Provide definition if missing.
7590
7591 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7592
7593 * linux-low.c (linux_core_of_thread): New.
7594 (compare_ints, show_process, list_threads): New.
7595 (linux_qxfer_osdata): Report threads and cores.
7596 (linux_target_op): Register linux_core_of_thread.
7597 * remote-utils.c (prepare_resume_reply): Report the core.
7598 (buffer_xml_printf): Support %d specifier.
7599 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7600 New.
7601 (handle_query): Handle qXfer:threads. Announce availability
7602 thereof.
7603 * target.h (struct target_ops): New field core_of_thread.
7604
7605 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7606
7607 * Makefile.in (clean): Remove new generated files.
7608 (reg-s390.o, reg-s390.c): Remove rules.
7609 (reg-s390x.o, reg-s390x.c): Likewise.
7610 (s390-linux32.o, s390-linux32.c): Add rules.
7611 (s390-linux64.o, s390-linux64.c): Likewise.
7612 (s390x-linux64.o, s390x-linux64.c): Likewise.
7613 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7614 * linux-s390-low.c: Include <elf.h>.
7615 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7616 (init_registers_s390): Remove prototype.
7617 (init_registers_s390x): Likewise.
7618 (init_registers_s390_linux32): Add prototype.
7619 (init_registers_s390_linux64): Likewise.
7620 (init_registers_s390x_linux64): Likewise.
7621 (s390_num_regs_3264): New define.
7622 (s390_regmap_3264): New global variable.
7623 (s390_cannot_fetch_register): Remove obsolete check.
7624 (s390_cannot_store_register): Likewise.
7625 (s390_collect_ptrace_register): Handle upper/lower register halves.
7626 (s390_supply_ptrace_register): Likewise.
7627 (s390_fill_gregset): Update to register number changes.
7628 (s390_get_hwcap): New routine.
7629 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7630 Install appropriate regmap and register set.
7631
7632 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7633
7634 * server.c (gdbserver_version): Update copyright year to 2010.
7635 * gdbreplay.c (gdbreplay_version): Likewise.
7636
7637 2009-12-28 Doug Evans <dje@google.com>
7638
7639 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7640 elf/external.h. Include <elf.h> instead but only if necessary.
7641
7642 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7643
7644 * linux-low.c (linux_remove_process): Remove `detaching'
7645 parameter. Don't release/detach from thread_db here.
7646 (linux_kill): Release/detach from thread_db here, ...
7647 (linux_detach): ... and here, before actually detaching.
7648 (linux_wait_1): ... and here, when a process exits.
7649 * thread-db.c (any_thread_of): New.
7650 (thread_db_free): Switch the current inferior to a thread of the
7651 passed in process.
7652
7653 2009-12-21 Doug Evans <dje@google.com>
7654
7655 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7656
7657 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7658 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7659 warning ifndef __NR_tkill. Move setting of errno there too.
7660 Delete unnecessary resetting of errno after syscall.
7661 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7662
7663 * configure.ac: Check for dladdr.
7664 * config.in: Regenerate.
7665 * configure: Regenerate.
7666 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7667 (try_thread_db_load): Update.
7668
7669 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7670
7671 2009-12-18 Doug Evans <dje@google.com>
7672
7673 * event-loop.c: Include unistd.h if it exists.
7674
7675 * linux-low.c (my_waitpid): Move definition away from being in
7676 between linux_tracefork_child/linux_test_for_tracefork.
7677
7678 * gdb_proc_service.h (psaddr_t): Fix type.
7679 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7680 signature to match glibc.
7681
7682 2009-12-16 Doug Evans <dje@google.com>
7683
7684 * linux-low.c (linux_read_memory): Fix argument to read.
7685
7686 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7687
7688 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7689 events, don't leave current_inferior pointing at null.
7690
7691 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7692
7693 * win32-low.c (LOG): Delete.
7694 (OUTMSG): Output to stderr.
7695 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7696 on compile time LOG macro.
7697 (win32_wait): Fix debug output.
7698
7699 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7700
7701 * win32-low.c (win32_add_one_solib): If the dll name is
7702 "ntdll.dll", prepend the system directory to the dll path.
7703
7704 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7705
7706 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7707
7708 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7709 Vladimir Prus <vladimir@codesourcery.com>
7710
7711 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7712 * configure.ac: Check for __mcoldfire__ and set
7713 gdb_cv_m68k_is_coldfire.
7714 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7715 reg-cf.o and reg-m68k.o.
7716 * configure: Regenerated.
7717
7718 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7719
7720 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7721 Pass it to thread_db_free.
7722 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7723 proper `detaching' argument to linux_remove_process.
7724 * linux-low.h (thread_db_free): Add `detaching' parameter.
7725 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7726 to thread_db_free.
7727 (thread_db_free): Add `detaching' parameter. Only
7728 call td_ta_clear_event if detaching from process.
7729
7730 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7731
7732 * thread-db.c (thread_db_free): Fix typo.
7733
7734 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7735
7736 PR gdb/10838
7737 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7738
7739 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7740
7741 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7742 with an i686 compiler.
7743 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7744 needed.
7745 * configure: Rebuilt.
7746
7747 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7748
7749 PR gdb/10783
7750
7751 * server.c (handle_search_memory_1): Correct read_addr initialization
7752 in loop for searching subsequent chunks.
7753
7754 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7755
7756 * configure.ac: New --with-libthread-db option.
7757 * thread-db.c: Allow direct dependence on libthread_db.
7758 (thread_db_free): Adjust.
7759 * config.in: Regenerate.
7760 * configure: Likewise.
7761
7762 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7763
7764 PR gdb/10757
7765 * thread-db.c (attach_thread): New function.
7766 (maybe_attach_thread): Return success/failure.
7767 (find_new_threads_callback): Adjust.
7768 (thread_db_find_new_threads): Loop until no new threads.
7769
7770 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7771
7772 * proc-service.c (ps_lgetregs): Formatting.
7773
7774 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7775
7776 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7777 * configure.ac: Adjust.
7778 * linux-low.h (struct process_info_private): Move members to struct
7779 thread_db.
7780 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7781 * linux-low.c (linux_remove_process): Adjust.
7782 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7783 * server.c (handle_query): Move code ...
7784 (handle_monitor_command): ... here. New function.
7785 * target.h (struct target_ops): New member.
7786 * thread-db.c (struct thread_db): New.
7787 (libthread_db_search_path): New variable.
7788 (thread_db_create_event, thread_db_enable_reporting)
7789 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7790 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7791 (try_thread_db_load_1, dladdr_to_soname): New functions.
7792 (try_thread_db_load, thread_db_load_search): New functions.
7793 (thread_db_init): Search for libthread_db.
7794 (thread_db_free): New function.
7795 (thread_db_handle_monitor_command): Likewise.
7796 * config.in: Regenerate.
7797 * configure: Regenerate.
7798
7799 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7800
7801 * spu-low.c (spu_kill): Wait for inferior to terminate.
7802 Call clear_inferiors.
7803 (spu_detach): Call clear_inferiors.
7804
7805 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7806
7807 * aclocal.m4: Regenerate.
7808 * config.in: Likewise.
7809 * configure: Likewise.
7810
7811 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7812
7813 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7814 (parse_spufs_run): New function.
7815 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7816 (ppc_breakpoint_at): Handle SPU breakpoints.
7817
7818 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7819
7820 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7821 (SPUFS_MAGIC): Define.
7822 (spu_enumerate_spu_ids): New function.
7823 (linux_qxfer_spu): New function.
7824 (linux_target_ops): Install linux_qxfer_spu.
7825
7826 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7827
7828 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7829 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7830 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7831 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7832 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7833 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7834 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7835 (init_registers_powerpc_cell32l): Add prototype.
7836 (init_registers_powerpc_cell64l): Likewise.
7837 (ppc_arch_setup): Detect Cell/B.E. architecture.
7838
7839 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7840
7841 * Makefile.in (datarootdir): New variable.
7842
7843 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7844
7845 * linux-low.c (linux_write_memory): Update debugging output.
7846 * Makefile.in (clean): Add new descriptions.
7847 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7848 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7849 * configure.srv: Add new files for arm*-*-linux*.
7850 * linux-arm-low.c: Add new declarations.
7851 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7852 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7853 (HWCAP_VFPv3D16): New.
7854 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7855 instead of __IWMMXT__.
7856 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7857 (arm_arch_setup): New.
7858 (target_regsets): Remove #ifdef. Add VFP regset.
7859 (the_low_target): Use arm_arch_setup.
7860
7861 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7862
7863 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7864 the main thread again.
7865
7866 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7867
7868 Adding Neutrino gdbserver.
7869 * configure: Regenerated.
7870 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7871 * configure.srv (i[34567]86-*-nto*): New target.
7872 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7873 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7874 (nto_comctrl) [__QNX__]: New function.
7875 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7876
7877 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7878
7879 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7880 srv_tgtobj.
7881
7882 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7883 Pedro Alves <pedro@codesourcery.com>
7884
7885 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7886 don't support CONTEXT_EXTENDED_REGISTERS.
7887 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7888 (the_low_target): Install them.
7889 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7890 failing with ERROR_PIPE_NOT_CONNECTED.
7891
7892 2009-06-30 Doug Evans <dje@google.com>
7893 Pierre Muller <muller@ics.u-strasbg.fr>
7894
7895 Add h/w watchpoint support to x86-linux, win32-i386.
7896 * Makefile.in (SFILES): Add i386-low.c
7897 (i386_low_h): Define.
7898 (i386-low.o): Add dependencies.
7899 (linux-x86-low.o): Add i386-low.h dependency.
7900 (win32-i386-low.o): Ditto.
7901 * i386-low.c: New file.
7902 * i386-low.h: New file.
7903 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7904 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7905 * linux-low.c (linux_add_process): Initialize arch_private.
7906 (linux_remove_process): Free arch_private.
7907 (add_lwp): Initialize arch_private.
7908 (delete_lwp): Free arch_private.
7909 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7910 provided.
7911 * linux-low.h (process_info_private): New member arch_private.
7912 (lwp_info): New member arch_private.
7913 (linux_target_ops): New members new_process, new_thread,
7914 prepare_to_resume.
7915 (ptid_of): New macro.
7916 * linux-x86-low.c: Include stddef.h, i386-low.h.
7917 (arch_process_info): New struct.
7918 (arch_lwp_info): New struct.
7919 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7920 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7921 (i386_dr_low_get_status): New function.
7922 (x86_insert_point, x86_remove_point): New functions.
7923 (x86_stopped_by_watchpoint): New function.
7924 (x86_stopped_data_address): New function.
7925 (x86_linux_new_process, x86_linux_new_thread): New functions.
7926 (x86_linux_prepare_to_resume): New function.
7927 (the_low_target): Add entries for insert_point, remove_point,
7928 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7929 prepare_to_resume.
7930 * server.c (debug_hw_points): New global.
7931 (monitor_show_help): Document set debug-hw-points.
7932 (handle_query): Process "set debug-hw-points".
7933 * server.h (debug_hw_points): Declare.
7934 (paddress): Declare.
7935 * utils.c (NUMCELLS, CELLSIZE): New macros.
7936 (get_sell, xsnprintf, paddress): New functions.
7937 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7938 remove_point, stopped_by_watchpoint, stopped_data_address.
7939 * win32-i386-low.c: Include i386-low.h.
7940 (debug_reg_state): Replaces dr.
7941 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7942 (i386_dr_low_get_status): New function.
7943 (i386_insert_point, i386_remove_point): New functions.
7944 (i386_stopped_by_watchpoint): New function.
7945 (i386_stopped_data_address): New function.
7946 (i386_initial_stuff): Update.
7947 (get_thread_context,set_thread_context,i386_thread_added): Update.
7948 (the_low_target): Add entries for insert_point,
7949 remove_point, stopped_by_watchpoint, stopped_data_address.
7950 * win32-low.c (win32_insert_watchpoint): New function.
7951 (win32_remove_watchpoint): New function.
7952 (win32_stopped_by_watchpoint): New function.
7953 (win32_stopped_data_address): New function.
7954 (win32_target_ops): Add entries for insert_watchpoint,
7955 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7956 * win32-low.h (win32_target_ops): New members insert_point,
7957 remove_point, stopped_by_watchpoint, stopped_data_address.
7958
7959 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7960
7961 * server.c (process_serial_event): Re-return unsupported, not
7962 error, if the type isn't recognized. Re-allow supporting only
7963 insert or remove packets. Also call require_running for
7964 breakpoints. Add missing break statement to default case. Tidy.
7965 * target.h (struct target_ops): Rename insert_watchpoint to
7966 insert_point, and remove_watchpoint to remove_point.
7967
7968 * linux-low.h (struct linux_target_ops): Likewise.
7969 * linux-low.c (linux_insert_watchpoint): Rename to ...
7970 (linux_insert_point): ... this. Adjust.
7971 (linux_remove_watchpoint): Rename to ...
7972 (linux_remove_point): ... this. Adjust.
7973 (linux_target_ops): Adjust.
7974 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7975 (cris_insert_point): ... this.
7976 (cris_remove_watchpoint): Rename to ...
7977 (cris_remove_point): ... this.
7978 (the_low_target): Adjust.
7979
7980 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7981
7982 * server.c (handle_v_kill): Pass signal_pid to
7983 kill_inferior if multi_process is zero.
7984
7985 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7986
7987 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7988 * target.h (target_ops): Comment for *_watchpoint to make it clear
7989 the functions can get types '0' and '1'.
7990
7991 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7992
7993 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7994 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7995 * regcache.c (get_regcache): Likewise.
7996 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7997 * win32-low.c (child_fetch_inferior_registers): Remove check for
7998 regno 0.
7999
8000 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8001 Pedro Alves <pedro@codesourcery.com>
8002
8003 * target.h (struct target_ops) <supports_multi_process>: New
8004 callback.
8005 (target_supports_multi_process): New.
8006 * server.c (handle_query): Even if GDB reports support, only
8007 enable multi-process if the target also supports it. Report
8008 multi-process support only if the target backend supports it.
8009 * linux-low.c (linux_supports_multi_process): New function.
8010 (linux_target_ops): Install it as target_supports_multi_process
8011 callback.
8012
8013 2009-05-24 Doug Evans <dje@google.com>
8014
8015 Global renaming of find_thread_pid to find_thread_ptid.
8016 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8017 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8018 All callers updated.
8019
8020 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8021 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8022 directly.
8023
8024 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8025 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8026 (linux_resume_one_lwp): Ditto.
8027
8028 2009-05-23 Doug Evans <dje@google.com>
8029
8030 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8031 from struct inferior_list_entry * to struct lwp_info *.
8032 All callers updated.
8033
8034 2009-05-13 Doug Evans <dje@google.com>
8035
8036 * linux-x86-low.c: Don't include assert.h.
8037 (x86_siginfo_fixup): Use fatal, not assert.
8038 (x86_arch_setup): Fix comment.
8039
8040 2009-05-12 Doug Evans <dje@google.com>
8041
8042 Biarch support for i386/amd64 gdbserver.
8043 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8044 Add linux-x86-low.c.
8045 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8046 (linux-x86-low.o): Add.
8047 * linux-x86-64-low.c: Delete.
8048 * linux-i386-low.c: Delete.
8049 * linux-x86-low.c: New file.
8050 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8051 linux-x86-low.o.
8052 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8053 linux-x86-low.o.
8054 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8055 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8056 (linux_child_pid_to_exec_file): New function.
8057 (elf_64_header_p, elf_64_file_p): New functions.
8058 (siginfo_fixup): New function.
8059 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8060 give target a chance to convert layout.
8061 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8062 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8063
8064 2009-05-07 Doug Evans <dje@google.com>
8065
8066 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8067 (regsets_store_inferior_registers): Ditto.
8068
8069 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8070
8071 PR server/10048
8072
8073 * linux-low.c (must_set_ptrace_flags): Delete.
8074 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8075 of the global.
8076 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8077 `lwp->must_set_ptrace_flags' instead.
8078 (linux_wait_for_event_1): Set ptrace options here.
8079 (linux_wait_1): ... not here.
8080
8081 2009-04-30 Doug Evans <dje@google.com>
8082
8083 * inferiors.c (started_inferior_callback): New function.
8084 (attached_inferior_callback): New function.
8085 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8086 * server.c (print_started_pid, print_attached_pid): New functions.
8087 (detach_or_kill_for_exit): New function.
8088 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8089 * server.h (have_started_inferiors_p): Declare.
8090 (have_attached_inferiors_p): Declare.
8091
8092 * inferiors.c (remove_process): Fix memory leak, free process.
8093 * linux-low.c (linux_remove_process): New function.
8094 (linux_kill): Call it instead of remove_process.
8095 (linux_detach, linux_wait_1): Ditto.
8096
8097 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8098
8099 * configure.srv: Add x86 Windows CE target.
8100
8101 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8102
8103 * inferiors.c (get_thread_process): Make global.
8104 * server.h (get_thread_process): Add prototype.
8105 * thread-db.c (find_one_thread): Use get_thread_process
8106 instead of current_process.
8107 (thread_db_get_tls_address): Do not crash if called when
8108 thread layer is not yet initialized.
8109
8110 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8111
8112 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8113 * spu-low.c (current_tid): Rename to ...
8114 (current_ptid): ... this.
8115 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8116 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8117 ptid_get_lwp (current_ptid) instead of current_tid.
8118 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8119 instead of current_tid. Use find_process_pid to verify pid
8120 argument is valid. Pass proper argument to remove_process.
8121 (spu_thread_alive): Compare current_ptid instead of current_tid.
8122 (spu_resume): Likewise.
8123
8124 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8125
8126 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8127 variable.
8128
8129 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8130
8131 Implement the multiprocess extensions, and add linux multiprocess
8132 support.
8133
8134 * server.h (ULONGEST): Declare.
8135 (struct ptid, ptid_t): New.
8136 (minus_one_ptid, null_ptid): Declare.
8137 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8138 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8139 (struct inferior_list_entry): Change `id' type from unsigned from
8140 to ptid_t.
8141 (struct sym_cache, struct breakpoint, struct
8142 process_info_private): Forward declare.
8143 (struct process_info): Declare.
8144 (current_process): Declare.
8145 (all_processes): Declare.
8146 (initialize_inferiors): Declare.
8147 (add_thread): Adjust to use ptid_t.
8148 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8149 (add_process, remove_process, find_thread_pid): Declare.
8150 (find_inferior_id): Adjust to use ptid_t.
8151 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8152 (multi_process): Declare.
8153 (push_event): Adjust to use ptid_t.
8154 (read_ptid, write_ptid): Declare.
8155 (prepare_resume_reply): Adjust to use ptid_t.
8156 (clear_symbol_cache): Declare.
8157 * inferiors.c (all_processes): New.
8158 (null_ptid, minus_one_ptid): New.
8159 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8160 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8161 (add_thread): Change unsigned long to ptid. Remove gdb_id
8162 parameter. Adjust.
8163 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8164 (gdb_id_to_thread): Rename to ...
8165 (find_thread_pid): ... this. Change unsigned long to ptid.
8166 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8167 (loaded_dll, pull_pid_from_list): Adjust.
8168 (add_process, remove_process, find_process_pid)
8169 (get_thread_process, current_process, initialize_inferiors): New.
8170 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8171 (struct target_waitstatus) <related_pid>: Ditto.
8172 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8173 return type to int.
8174 (struct target_ops) <join>: Add `pid' argument.
8175 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8176 (struct target_ops) <wait>: Add `ptid' field. Change return type
8177 to ptid.
8178 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8179 (mywait): Add `ptid' argument. Change return type to ptid_t.
8180 (target_pid_to_str): Declare.
8181 * target.c (set_desired_inferior): Adjust to use ptids.
8182 (mywait): Add new `ptid' argument. Adjust.
8183 (target_pid_to_str): New.
8184 * mem-break.h (free_all_breakpoints): Declare.
8185 * mem-break.c (breakpoints): Delelete.
8186 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8187 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8188 to use per-process breakpoint list.
8189 (free_all_breakpoints): New.
8190 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8191 (symbol_cache, all_symbols_looked_up): Delete.
8192 (hexchars): New.
8193 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8194 read_ptid): New.
8195 (prepare_resume_reply): Change ptid argument's type from unsigned
8196 long to ptid_t. Adjust. Implement W;process and X;process.
8197 (free_sym_cache, clear_symbol_cache): New.
8198 (look_up_one_symbol): Adjust to per-process symbol cache. *
8199 * server.c (cont_thread, general_thread, step_thread): Change type
8200 to ptid_t.
8201 (attached): Delete.
8202 (multi_process): New.
8203 (last_ptid): Change type to ptid_t.
8204 (struct vstop_notif) <ptid>: Change type to ptid_t.
8205 (queue_stop_reply, push_event): Change `ptid' argument's type to
8206 ptid_t.
8207 (discard_queued_stop_replies): Add `pid' argument.
8208 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8209 changes. Don't reference the `attached' global.
8210 (attach_inferior): Adjust to mywait interface changes.
8211 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8212 features. Handle and report "multiprocess+". Handle
8213 "qAttached:PID".
8214 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8215 changes.
8216 (handle_v_kill): New.
8217 (handle_v_stopped): Adjust to use target_pid_to_str.
8218 (handle_v_requests): Allow multiple attaches and runs when
8219 multiprocess extensions are in effect. Handle "vKill".
8220 (myresume): Adjust to use ptids.
8221 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8222 (handle_status): Adjust to discard_queued_stop_replies interface
8223 change.
8224 (first_thread_of, kill_inferior_callback)
8225 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8226 (main): Call initialize_inferiors. Adjust to use ptids, killing
8227 and detaching from all inferiors. Handle multiprocess packet
8228 variants.
8229 * linux-low.h: Include gdb_proc_service.h.
8230 (struct process_info_private): New.
8231 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8232 <lwpid_of>: Use ptid_get_lwp.
8233 (get_lwp_thread): Adjust.
8234 (struct lwp_info): Add `dead' member.
8235 (find_lwp_pid): Declare.
8236 * linux-low.c (thread_db_active): Delete.
8237 (new_inferior): Adjust comment.
8238 (inferior_pid): Delete.
8239 (linux_add_process): New.
8240 (handle_extended_wait): Adjust.
8241 (add_lwp): Change unsigned long to ptid.
8242 (linux_create_inferior): Add process to processes table. Adjust
8243 to use ptids. Don't set new_inferior here.
8244 (linux_attach_lwp): Rename to ...
8245 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8246 it. Adjust to use ptids.
8247 (linux_attach_lwp): New.
8248 (linux_attach): Add process to processes table. Don't set
8249 new_inferior here.
8250 (struct counter): New.
8251 (second_thread_of_pid_p, last_thread_of_process_p): New.
8252 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8253 multiple processes.
8254 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8255 processes. Remove process from process table.
8256 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8257 to multiple processes.
8258 (any_thread_of): New.
8259 (linux_detach): Add `pid' argument, and handle it. Remove process
8260 from processes table.
8261 (linux_join): Add `pid' argument. Handle it.
8262 (linux_thread_alive): Change unsighed long argument to ptid_t.
8263 Consider dead lwps as not being alive.
8264 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8265 threads we're not interested in.
8266 (same_lwp, find_lwp_pid): New.
8267 (linux_wait_for_lwp): Change `pid' argument's type from int to
8268 ptid_t. Adjust.
8269 (linux_wait_for_event): Rename to ...
8270 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8271 from int to ptid_t. Adjust.
8272 (linux_wait_for_event): New.
8273 (linux_wait_1): Add `ptid' argument. Change return type to
8274 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8275 that exit from the process table.
8276 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8277 Adjust.
8278 (mark_lwp_dead): New.
8279 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8280 stopping all threads, mark its main lwp as dead.
8281 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8282 ptids.
8283 (fetch_register, usr_store_inferior_registers)
8284 (regsets_fetch_inferior_registers)
8285 (regsets_store_inferior_registers, linux_read_memory)
8286 (linux_write_memory): Inline `inferior_pid'.
8287 (linux_look_up_symbols): Adjust to use per-process
8288 `thread_db_active'.
8289 (linux_request_interrupt): Adjust to use ptids.
8290 (linux_read_auxv): Inline `inferior_pid'.
8291 (initialize_low): Don't reference thread_db_active.
8292 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8293 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8294 (ps_getpid): Return the pid of the current inferior.
8295 * thread-db.c (proc_handle, thread_agent): Delete.
8296 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8297 per-process data.
8298 (find_one_thread): Change argument type to ptid_t. Adjust to
8299 per-process data.
8300 (maybe_attach_thread): Adjust to per-process data and ptids.
8301 (thread_db_find_new_threads): Ditto.
8302 (thread_db_init): Ditto.
8303 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8304 processes table. Adjust to use ptids.
8305 (spu_kill, spu_detach): Adjust interface. Remove process from
8306 processes table.
8307 (spu_join, spu_thread_alive): Adjust interface.
8308 (spu_wait): Adjust interface. Remove process from processes
8309 table. Adjust to use ptids.
8310 * win32-low.c (current_inferior_tid): Delete.
8311 (current_inferior_ptid): New.
8312 (debug_event_ptid): New.
8313 (thread_rec): Take a ptid. Adjust.
8314 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8315 (child_delete_thread): Ditto.
8316 (do_initial_child_stuff): Add `attached' argument. Add process to
8317 processes table.
8318 (child_fetch_inferior_registers, child_store_inferior_registers):
8319 Adjust.
8320 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8321 (win32_attach): Pass 1 to do_initial_child_stuff.
8322 (win32_kill): Adjust interface. Remove process from processes
8323 table.
8324 (win32_detach): Ditto.
8325 (win32_join): Adjust interface.
8326 (win32_thread_alive): Take a ptid.
8327 (win32_resume): Adjust to use ptids.
8328 (get_child_debug_event): Ditto.
8329 (win32_wait): Adjust interface. Remove exiting process from
8330 processes table.
8331
8332 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8333
8334 Non-stop mode support.
8335
8336 * server.h (non_stop): Declare.
8337 (gdb_client_data, handler_func): Declare.
8338 (delete_file_handler, add_file_handler, start_event_loop):
8339 Declare.
8340 (handle_serial_event, handle_target_event, push_event)
8341 (putpkt_notif): Declare.
8342 * target.h (enum resume_kind): New.
8343 (struct thread_resume): Replace `step' field by `kind' field.
8344 (TARGET_WNOHANG): Define.
8345 (struct target_ops) <wait>: Add `options' argument.
8346 <supports_non_stop, async, start_non_stop>: New fields.
8347 (target_supports_non_stop, target_async): New.
8348 (start_non_stop): Declare.
8349 (mywait): Add `options' argument.
8350 * target.c (mywait): Add `options' argument. Print child exit
8351 notifications here.
8352 (start_non_stop): New.
8353 * server.c (non_stop, own_buf, mem_buf): New globals.
8354 (struct vstop_notif): New.
8355 (notif_queue): New global.
8356 (queue_stop_reply, push_event, discard_queued_stop_replies)
8357 (send_next_stop_reply): New.
8358 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8359 interface changes.
8360 (attach_inferior): In non-stop mode, don't wait for the target
8361 here.
8362 (handle_general_set): Handle QNonStop.
8363 (handle_query): When handling qC, return the current general
8364 thread, instead of the first thread of the list.
8365 (handle_query): If the backend supports non-stop mode, include
8366 QNonStop+ in the qSupported query response.
8367 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8368 and non-stop mode.
8369 (handle_v_attach, handle_v_run): Handle non-stop mode.
8370 (handle_v_stopped): New.
8371 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8372 (myresume): Adjust to use resume_kind. Handle non-stop.
8373 (queue_stop_reply_callback): New.
8374 (handle_status): Handle non-stop mode.
8375 (main): Clear non_stop flag on reconnection. Use the event-loop.
8376 Refactor serial protocol handling from here ...
8377 (process_serial_event): ... to this new function. When GDB
8378 selects any thread, select one here. In non-stop mode, wait until
8379 GDB acks all pending events before exiting.
8380 (handle_serial_event, handle_target_event): New.
8381 * remote-utils.c (remote_open): Install remote_desc in the event
8382 loop.
8383 (remote_close): Remove remote_desc from the event loop.
8384 (putpkt_binary): Rename to...
8385 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8386 (putpkt_binary): New as wrapper around putpkt_binary_1.
8387 (putpkt_notif): New.
8388 (prepare_resume_reply): In non-stop mode, don't change the
8389 general_thread.
8390 * event-loop.c: New.
8391 * Makefile.in (OBJ): Add event-loop.o.
8392 (event-loop.o): New rule.
8393
8394 * linux-low.h (pid_of): Moved here.
8395 (lwpid_of): New.
8396 (get_lwp_thread): Use lwpid_of.
8397 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8398 * linux-low.c (pid_of): Delete.
8399 (inferior_pid): Use lwpid_of.
8400 (linux_event_pipe): New.
8401 (target_is_async_p): New.
8402 (delete_lwp): New.
8403 (handle_extended_wait): Use lwpid_of.
8404 (add_lwp): Don't set lwpid field.
8405 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8406 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8407 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8408 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8409 first. Adjust to linux_wait_for_event interface changes. Use
8410 lwpid_of.
8411 (linux_detach): Don't delete the main lwp here.
8412 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8413 (status_pending_p): Don't consider explicitly suspended lwps.
8414 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8415 pointer. Add OPTIONS argument. Change return type to int. Use
8416 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8417 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8418 pointer. Add status pointer argument. Return a pid instead of a
8419 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8420 changes. In non-stop mode, don't switch to a random thread.
8421 (linux_wait): Rename to...
8422 (linux_wait_1): ... this. Add target_options argument, and handle
8423 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8424 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8425 clean exit and signal exit code. Don't stop all threads in
8426 non-stop mode. In all-stop mode, only stop all threads when
8427 reporting a stop to GDB. Handle explicit thread stop requests.
8428 (async_file_flush, async_file_mark): New.
8429 (linux_wait): New.
8430 (send_sigstop): Use lwpid_of.
8431 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8432 interface changes. In non-stop mode, don't switch to a random
8433 thread.
8434 (linux_resume_one_lwp): Use lwpid_of.
8435 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8436 (linux_resume_one_thread): ... this. Handle resume_stop. In
8437 non-stop mode, don't look for pending flag in all threads.
8438 (resume_status_pending_p): Don't consider explicitly suspended
8439 threads.
8440 (my_waitpid): Reimplement. Emulate __WALL.
8441 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8442 Use lwpid_of.
8443 (sigchld_handler, linux_supports_non_stop, linux_async)
8444 (linux_start_non_stop): New.
8445 (linux_target_ops): Register linux_supports_non_stop, linux_async
8446 and linux_start_non_stop.
8447 (initialize_low): Install SIGCHLD handler.
8448 * thread-db.c (thread_db_create_event, find_one_thread)
8449 (thread_db_get_tls_address): Use lwpid_of.
8450 * win32-low.c (win32_detach): Adjust to use resume_kind.
8451 (win32_wait): Add `options' argument.
8452 * spu-low.c (spu_resume): Adjust to use resume_kind.
8453 (spu_wait): Add `options' argument.
8454
8455 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8456
8457 Decouple target code from remote protocol.
8458
8459 * target.h (enum target_waitkind): New.
8460 (struct target_waitstatus): New.
8461 (struct target_ops) <wait>: Return an unsigned long. Take a
8462 target_waitstatus pointer instead of a char pointer.
8463 (mywait): Likewise.
8464 * target.c (mywait): Change prototype to return an unsigned long.
8465 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8466 * server.h (thread_from_wait, old_thread_from_wait): Delete
8467 declarations.
8468 (prepare_resume_reply): Change prototype to take a
8469 target_waitstatus.
8470 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8471 (last_status, last_ptid): New.
8472 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8473 pid instead of a signal.
8474 (attach_inferior): Remove "status" and "signal" parameters.
8475 Adjust.
8476 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8477 not as an address.
8478 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8479 (handle_v_requests, myresume): Remove "status" and "signal"
8480 parameters. Adjust.
8481 (handle_status): New.
8482 (main): Delete local `status'. Adjust.
8483 * remote-utils.c: Include target.h.
8484 (prepare_resume_reply): Change prototype to take a
8485 target_waitstatus. Adjust.
8486
8487 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8488 interface.
8489 * spu-low.c (spu_wait): Adjust.
8490 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8491 Delete.
8492 (win32_wait): Adjust.
8493
8494 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8495
8496 * target.h (struct thread_resume): Delete leave_stopped member.
8497 (struct target_ops): Add a `n' argument to the `resume' callback.
8498 * server.c (start_inferior): Adjust.
8499 (handle_v_cont, myresume): Adjust.
8500 * linux-low.c (check_removed_breakpoint): Adjust to resume
8501 interface change, and to removed leave_stopped field.
8502 (resume_ptr): Delete.
8503 (struct thread_resume_array): New.
8504 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8505 resume interface change.
8506 (linux_continue_one_thread, linux_queue_one_thread)
8507 (resume_status_pending_p): Check if the resume field is NULL
8508 instead of checking the leave_stopped member.
8509 (linux_resume): Adjust to the target resume interface change.
8510 * spu-low.c (spu_resume): Adjust to the target resume interface
8511 change.
8512 * win32-low.c (win32_detach, win32_resume): Ditto.
8513
8514 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8515
8516 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8517 flag.
8518 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8519 pending.
8520 (linux_continue_one_thread): Only preserve the stepping flag if
8521 there's a pending breakpoint.
8522
8523 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8524
8525 * server.c (main): After the inferior having exited, call
8526 remote_close before exiting gdbserver.
8527
8528 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8529
8530 Fix size of FPSCR in Power 7 processors.
8531 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8532 (PPC_FEATURE_HAS_DFP): New #define.
8533 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8534 size of the FPSCR.
8535
8536 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8537
8538 * server.c (handle_query) Whitespace and formatting.
8539
8540 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8541
8542 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8543 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8544 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8545 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8546 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8547 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8548 Makefile.in, configure.ac: Fix whitespace throughout.
8549 * configure: Regenerate.
8550
8551 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8552
8553 * inferiors.c (find_inferior): Make it safe for the callback
8554 function to delete the currently iterated inferior.
8555
8556 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8557
8558 * Makefile.in (linuw_low_h): Move higher.
8559 (thread-db.o): Depend on $(linux_low_h).
8560
8561 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8562
8563 Rename "process" to "lwp" throughout.
8564
8565 * linux-low.c (all_processes): Rename to...
8566 (all_lwps): ... this.
8567 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8568 (add_process): Rename to ...
8569 (add_lwp): ... this. Adjust.
8570 (linux_create_inferior): Adjust.
8571 (linux_attach_lwp): Adjust.
8572 (linux_attach): Adjust.
8573 (linux_kill_one_process): Rename to ...
8574 (linux_kill_one_lwp): ... this. Adjust.
8575 (linux_kill): Adjust.
8576 (linux_detach_one_process): Rename to ...
8577 (linux_detach_one_lwp): ... this. Adjust.
8578 (linux_detach): Adjust.
8579 (check_removed_breakpoint): Adjust.
8580 (status_pending_p): Adjust.
8581 (linux_wait_for_process): Rename to ...
8582 (linux_wait_for_lwp): ... this. Adjust.
8583 (linux_wait_for_event): Adjust.
8584 (send_sigstop): Adjust.
8585 (wait_for_sigstop): Adjust.
8586 (stop_all_processes): Rename to ...
8587 (stop_all_lwps): ... this.
8588 (linux_resume_one_process): Rename to ...
8589 (linux_resume_one_lwp): ... this. Adjust.
8590 (linux_set_resume_request, linux_continue_one_thread)
8591 (linux_queue_one_thread, resume_status_pending_p)
8592 (usr_store_inferior_registers, regsets_store_inferior_registers)
8593 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8594 Adjust.
8595 * linux-low.h (get_process): Rename to ...
8596 (get_lwp): ... this. Adjust.
8597 (get_thread_process): Rename to ...
8598 (get_thread_lwp): ... this. Adjust.
8599 (get_process_thread): Rename to ...
8600 (get_lwp_thread): ... this. Adjust.
8601 (struct process_info): Rename to ...
8602 (struct lwp_info): ... this.
8603 (all_processes): Rename to ...
8604 (all_lwps): ... this.
8605 * proc-service.c (ps_lgetregs): Adjust.
8606 * thread-db.c (thread_db_create_event, find_one_thread)
8607 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8608
8609 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8610
8611 * server.c (handle_query): Handle "qAttached".
8612
8613 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8614
8615 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8616 GPLv3, update license URL.
8617
8618 2009-03-01 Doug Evans <dje@google.com>
8619
8620 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8621 (server_h): Add gdb_signals.h.
8622 (signals.o): Update.
8623 * server.h (target_signal_from_host,target_signal_to_host_p)
8624 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8625
8626 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8627
8628 * remote-utils.c (getpkt): Also generate remote-debug
8629 information if noack_mode is set.
8630
8631 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8632
8633 * server.c (handle_query): Report qXfer:siginfo:read and
8634 qXfer:siginfo:write as supported and handle them.
8635 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8636 * linux-low.c (linux_xfer_siginfo): New.
8637 (linux_target_ops): Set it.
8638
8639 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8640
8641 * server.c (gdbserver_usage): Mention --remote-debug.
8642 (main): Accept '--remote-debug' switch.
8643
8644 2009-01-18 Doug Evans <dje@google.com>
8645
8646 * regcache.c (new_register_cache): No need to check result of xcalloc.
8647 * server.c (handle_search_memory): Back out calls to xmalloc,
8648 result is checked and error is returned to user upon failure.
8649 (handle_query): Ditto. Add more checks for result of malloc.
8650 (handle_v_cont): Check result of malloc, report error back to
8651 user upon failure.
8652 (handle_v_run): Ditto. Call freeargv.
8653 * server.h (freeargv): Declare.
8654 * utils.c (freeargv): New fn.
8655
8656 2009-01-15 Doug Evans <dje@google.com>
8657
8658 * gdbreplay.c (perror_with_name): Make arg const char *.
8659 * server.h (target_signal_to_name): Make return type const char *.
8660 * thread-db.c (thread_db_err_str): Make return type const char *.
8661 * utils.c (perror_with_name): Make arg const char *.
8662
8663 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8664
8665 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8666 when handling a EXIT_PROCESS_DEBUG_EVENT.
8667
8668 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8669
8670 * gdbreplay.c (gdbreplay_version): Update copyright year.
8671 * server.c (gdbserver_version): Likewise.
8672
8673 2009-01-05 Doug Evans <dje@google.com>
8674
8675 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8676 (handle_extended_wait): Improve comment.
8677
8678 2008-12-13 Doug Evans <dje@google.com>
8679
8680 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8681 * server.h (ATTR_MALLOC): New macro.
8682 (xmalloc,xcalloc,xstrdup): Declare.
8683 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8684 * inferiors.c: Ditto.
8685 * linux-low.c: Ditto.
8686 * mem-break.c: Ditto.
8687 * regcache.c: Ditto.
8688 * remote-utils.c: Ditto.
8689 * server.c: Ditto.
8690 * target.c: Ditto.
8691 * win32-low.c: Ditto.
8692
8693 2008-12-12 Doug Evans <dje@google.com>
8694
8695 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8696 in debugging printf.
8697
8698 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8699
8700 2008-12-09 Doug Evans <dje@google.com>
8701
8702 * linux-low.h (struct process_info): Delete member tid, unused.
8703 * thread-db.c (find_one_thread): Update.
8704 (maybe_attach_thread): Update.
8705
8706 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8707
8708 * target.h (struct target_ops): Add qxfer_osdata member.
8709 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8710 and dirent.h.
8711 (linux_qxfer_osdata): New functions.
8712 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8713 callback.
8714 * server.c (handle_query): Handle "qXfer:osdata:read:".
8715 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8716 (buffer_xml_printf): New functions.
8717 * server.h (struct buffer): New.
8718 (buffer_grow_str, buffer_grow_str0): New macros.
8719 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8720 (buffer_xml_printf): Declare.
8721
8722 2008-11-24 Doug Evans <dje@google.com>
8723
8724 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8725
8726 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8727
8728 * server.c (handle_v_run): Always use the supplied argument list.
8729
8730 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8731
8732 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8733 (xtensa_regmap_table): Add entry for scompare1.
8734
8735 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8736
8737 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8738 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8739 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8740 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8741 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8742 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8743 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8744 XML target descriptions.
8745 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8746 when inferior is running on an ISA 2.05 or later processor. Add
8747 special case to return offset for full 64-bit slot of FPSCR when
8748 in 32-bits.
8749
8750 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8751
8752 * Makefile.in (SFILES, clean): Added sparc64 files.
8753 (reg-sparc64.o, reg-sparc64.c): New.
8754 * configure.srv (sparc*-*-linux*): New configuration.
8755 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8756 syscall arguments for SPARC.
8757 (regsets_store_inferior_registers): Likewise.
8758 * linux-sparc-low.c: New file.
8759
8760 2008-10-21 Doug Evans <dje@google.com>
8761
8762 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8763 (READLINE_DIR,READLINE_DEP): Delete.
8764 (INTERNAL_CFLAGS): Update.
8765 (LINTFLAGS): Update.
8766
8767 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8768
8769 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8770 whole argv from the last run, not just argv[0].
8771
8772 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8773
8774 * regcache.c (new_register_cache): Return NULL if the register
8775 cache size isn't known yet.
8776 (free_register_cache): Avoid dereferencing a NULL regcache.
8777
8778 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8779
8780 * configure.srv: Merge MIPS and MIPS64.
8781
8782 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8783
8784 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8785
8786 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8787
8788 * Makefile.in: Add required vsx dependencies.
8789
8790 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8791 Declare init_registers_powerpc_vsx32l.
8792 Declare init_registers_powerpc_vsx64l.
8793 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8794 (ppc_arch_setup): Check for VSX in hwcap.
8795 (ppc_fill_vsxregset): New function.
8796 (ppc_store_vsxregset): New function.
8797 Add new VSX entry in regset_info target_regsets.
8798
8799 * configure.srv: Add new VSX dependencies.
8800
8801 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8802
8803 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8804 (remote_open): Set or clear transport_is_reliable.
8805 (putpkt_binary): Don't expect acks in noack mode.
8806 (getpkt): Don't send ack/nac in noack mode.
8807 * server.c (handle_general_set): Handle QStartNoAckMode.
8808 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8809 qSupported.
8810 (main): Reset noack_mode on every connection.
8811 * server.h (noack_mode): Declare.
8812
8813 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8814
8815 * Makefile.in (GDBREPLAY_OBS): New variable.
8816 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8817
8818 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8819 Daniel Jacobowitz <dan@codesourcery.com>
8820
8821 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8822 (usr_store_inferior_registers): Likewise.
8823 (regsets_store_inferior_registers): Likewise.
8824
8825 2008-07-31 Rolf Jansen <rj@surtec.com>
8826 Pedro Alves <pedro@codesourcery.com>
8827
8828 * configure.ac: Check for memmem declaration.
8829 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8830 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8831 (disable_packet_qfThreadInfo): Unconditionally compile.
8832 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8833 * configure, config.in: Regenerate.
8834
8835 2008-07-28 Doug Kwan <dougkwan@google.com>
8836
8837 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8838 (linux_write_memory): Remove declaration of errno.
8839
8840 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8841
8842 * linux-low.c (handle_extended_wait): Do not use "status"
8843 variable uninitialized.
8844
8845 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8846
8847 * server.c (handle_v_attach): Inhibit reporting dll changes.
8848
8849 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8850
8851 * remote-utils.c (prepare_resume_reply): If requested, don't
8852 output "thread:TID" in the T stop reply.
8853
8854 * server.c (disable_packet_vCont, disable_packet_Tthread)
8855 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8856 (handle_query): If requested, disable support for qC, qfThreadInfo
8857 and qsThreadInfo.
8858 (handle_v_requests): If requested, disable support for vCont.
8859 (gdbserver_show_disableable): New.
8860 (main): Handle --disable-packet and --disable-packet=LIST.
8861
8862 * server.h (disable_packet_vCont, disable_packet_Tthread)
8863 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8864
8865 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8866
8867 * server.c (gdbserver_usage): Mention --version.
8868
8869 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8870
8871 * Makefile.in (gdbreplay.o): New rule.
8872
8873 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8874
8875 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8876 message, not gdbserver.
8877
8878 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8879 Nathan Sidwell <nathan@codesourcery.com>
8880 Joseph Myers <joseph@codesourcery.com>
8881
8882 * acinclude.m4: Include ../../config/acx.m4.
8883 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8884 * configure, config.in: Regenerate.
8885 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8886 * server.c (gdbserver_version): Print PKGVERSION.
8887 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8888 (main): Adjust gdbserver_usage calls.
8889 * gdbreplay.c (version, host_name): Add declarations.
8890 (gdbreplay_version, gdbreplay_usage): New.
8891 (main): Accept --version and --help options.
8892
8893 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8894
8895 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8896 (arm_breakpoint_at): Handle Thumb.
8897 (the_low_target): Add comment.
8898
8899 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8900
8901 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8902
8903 2008-05-09 Doug Evans <dje@google.com>
8904
8905 * server.h (decode_search_memory_packet): Declare.
8906 * remote-utils.c (decode_search_memory_packet): New fn.
8907 * server.c (handle_search_memory_1): New fn.
8908 (handle_search_memory): New fn.
8909 (handle_query): Process qSearch:memory packets.
8910
8911 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8912
8913 * regcache.c (registers_length): Remove.
8914 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8915 full register packet.
8916 * regcache.h (registers_length): Remove prototype.
8917 * server.h (PBUFSIZ): Define to 16384.
8918
8919 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8920
8921 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8922 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8923 powerpc-64l.o, and powerpc-altivec64l.o.
8924 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8925 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8926 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8927 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8928 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8929 to srv_xmlfiles.
8930
8931 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8932 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8933 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8934 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8935 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8936 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8937 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8938 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8939 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8940 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8941 (clean): Update.
8942
8943 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8944 (init_registers_powerpc_32l): ... this new prototype.
8945 (init_registers_powerpc_32): Remove, replace by ...
8946 (init_registers_powerpc_altivec32l): ... this new prototype.
8947 (init_registers_powerpc_e500): Remove, replace by ...
8948 (init_registers_powerpc_e500l): ... this new prototype.
8949 (init_registers_ppc64): Remove, replace by ...
8950 (init_registers_powerpc_64l): ... this new prototype.
8951 (init_registers_powerpc_64): Remove, replace by ...
8952 (init_registers_powerpc_altivec64l): ... this new prototype.
8953 (ppc_num_regs): Set to 73.
8954 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8955 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8956 (ppc_cannot_store_register): Handle orig_r3 and trap.
8957 (ppc_arch_setup): Update init_registers_... calls.
8958 (ppc_fill_gregset): Handle orig_r3 and trap.
8959
8960 * inferiors.c (clear_inferiors): Reset current_inferior.
8961
8962 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8963
8964 * acinclude.m4: Add override.m4.
8965 * configure: Regenerate.
8966
8967 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8968
8969 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8970 initial call to init_register_ppc64.
8971
8972 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8973
8974 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8975 single powerpc*-*-linux* case.
8976 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8977
8978 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8979
8980 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8981 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8982 from reg_xmlfiles.
8983 * linux-ppc-low.c: Include <elf.h>.
8984 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8985 (ppc_hwcap): New global variable.
8986 (ppc_regmap): Remove __SPE__ #ifdef sections.
8987 (ppc_regmap_e500): New global variable.
8988 (ppc_cannot_store_register): Update __SPE__ special case.
8989 (ppc_get_hwcap): New function.
8990 (ppc_arch_setup): Use it to determine whether inferior supports
8991 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8992 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8993 Do not access registers if target does not support AltiVec.
8994 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8995 Do not access registers if target does not support SPE.
8996 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8997
8998 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8999
9000 * linux-low.c (disabled_regsets, num_regsets): New.
9001 (use_regsets_p): Delete.
9002 (linux_wait_for_process): Clear disabled_regsets.
9003 (regsets_fetch_inferior_registers): Check and set it.
9004 (regsets_store_inferior_registers): Likewise.
9005 (linux_fetch_registers, linux_store_registers): Do not use
9006 use_regsets_p.
9007 (initialize_low): Allocate disabled_regsets.
9008
9009 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9010
9011 * Makefile.in (LIBOBJS): New.
9012 (OBS): Use LIBOBJS.
9013 (memmem.o): New rule.
9014 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9015 * configure: Regenerated.
9016
9017 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9018
9019 * server.c (handle_query): Never return "unsupported" for
9020 qXfer:features:read queries.
9021
9022 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9023
9024 * server.c (get_features_xml): Fix inverted condition.
9025 (handle_query): Always support qXfer:feature:read.
9026
9027 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9028
9029 * server.c (wrapper_argv): New.
9030 (start_inferior): Handle wrapper_argv. If set, expect an extra
9031 trap.
9032 (gdbserver_usage): Document --wrapper.
9033 (main): Parse --wrapper.
9034
9035 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9036
9037 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9038 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9039 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9040 (ppc_set_pc): Likewise.
9041 (ppc_arch_setup): New function.
9042 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9043 of collect_register.
9044 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9045
9046 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9047
9048 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9049 instead of linux-ppc64-low.o.
9050 * linux-ppc64-low.c: Remove file.
9051 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9052 (linux-ppc64-low.o): Remove rule.
9053
9054 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9055 (init_registers_powerpc_64): Likewise.
9056 (ppc_regmap): Conditionally define depending on __powerpc64__.
9057 (ppc_cannot_store_register): Do not special-case "fpscr" when
9058 compiled on __powerpc64__.
9059 (ppc_collect_ptrace_register): New function.
9060 (ppc_supply_ptrace_register): New function.
9061 (ppc_breakpoint): Change type to "unsigned int".
9062 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9063 (the_low_target): Conditionally provide initializers for the
9064 arch_setup member depending on __powerpc64__. Install
9065 collect_ptrace_register and supply_ptrace_register members.
9066
9067 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9068
9069 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9070 * server.c (gdbserver_xmltarget): Define.
9071 (get_features_xml): Use it to replace "target.xml" and arch_string.
9072
9073 * configure.srv: Remove srv_xmltarget. Add XML files that were
9074 mentioned there to srv_xmlfiles instead. Remove conditional tests
9075 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9076 srv_xmlfiles and srv_regobj to include all possible choices.
9077 * configure.ac (srv_xmltarget): Remove.
9078 (srv_xmlfiles): Do not add "target.xml".
9079 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9080 checks for supplementary target information.
9081 * configure: Regenerate.
9082 * Makefile.in (XML_TARGET): Remove.
9083 (target.xml): Remove rule.
9084 (clean): Do not clean up target.xml.
9085 (.PRECIOUS): Do not mention target.xml.
9086
9087 * target.h (struct target_ops): Remove arch_string member.
9088 * linux-low.c (linux_arch_string): Remove.
9089 (linux_target_ops): Remove arch_string initializer.
9090 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9091 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9092 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9093 * spu-low.c (spu_arch_string): Remove.
9094 (spu_target_ops): Remove arch_string initializer.
9095 * win32-low.c (win32_arch_string): Remove.
9096 (win32_target_ops): Remove arch_string initializer.
9097 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9098 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9099 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9100
9101 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9102
9103 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9104 by collect_ptrace_register and supply_ptrace_register hooks.
9105 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9106 instead of checking for the_low_target.left_pad_xfer.
9107 (usr_store_inferior_registers): Use collect_ptrace_register callback
9108 instead of checking for the_low_target.left_pad_xfer.
9109
9110 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9111 (s390_supply_ptrace_register): Likewise.
9112 (s390_fill_gregset): Call s390_collect_ptrace_register.
9113 (the_low_target): Update.
9114
9115 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9116 (ppc_supply_ptrace_register): Likewise.
9117 (the_low_target): Update.
9118
9119 * linux-i386-low.c (the_low_target): Update.
9120 * linux-x86-64-low.c (the_low_target): Update.
9121
9122 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9123
9124 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9125 reg-s390.o and reg-s390x.o.
9126
9127 * linux-low.c (new_inferior): New global variable.
9128 (linux_create_inferior, linux_attach): Set it.
9129 (linux_wait_for_process): Call the_low_target.arch_setup after the
9130 target has stopped for the first time.
9131 (initialize_low): Do not call the_low_target.arch_setup.
9132
9133 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9134 (s390_set_pc): Likewise.
9135 (s390_arch_setup): New function.
9136 (the_low_target): Use s390_arch_setup as arch_setup routine.
9137
9138 * regcache.c (realloc_register_cache): New function.
9139 (set_register_cache): Call it for each existing regcache.
9140
9141 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9142
9143 * server.h (init_registers): Remove prototype.
9144
9145 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9146 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9147 instead of init_registers ().
9148 * linux-arm-low.c (init_registers_arm): Add prototype.
9149 (init_registers_arm_with_iwmmxt): Likewise.
9150 (the_low_target): Add initializer for arch_setup field.
9151 * linux-cris-low.c (init_registers_cris): Add prototype.
9152 (the_low_target): Add initializer for arch_setup field.
9153 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9154 (the_low_target): Add initializer for arch_setup field.
9155 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9156 (the_low_target): Add initializer for arch_setup field.
9157 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9158 (the_low_target): Add initializer for arch_setup field.
9159 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9160 (the_low_target): Add initializer for arch_setup field.
9161 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9162 (the_low_target): Add initializer for arch_setup field.
9163 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9164 (init_registers_mips64_linux): Likewise.
9165 (the_low_target): Add initializer for arch_setup field.
9166 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9167 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9168 (the_low_target): Add initializer for arch_setup field.
9169 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9170 (init_registers_powerpc_64): Likewise.
9171 (the_low_target): Add initializer for arch_setup field.
9172 * linux-s390-low.c (init_registers_s390): Add prototype.
9173 (init_registers_s390x): Likewise.
9174 (the_low_target): Add initializer for arch_setup field.
9175 * linux-sh-low.c (init_registers_sh): Add prototype.
9176 (the_low_target): Add initializer for arch_setup field.
9177 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9178 (the_low_target): Add initializer for arch_setup field.
9179 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9180 (the_low_target): Add initializer for arch_setup field.
9181
9182 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9183 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9184 instead of init_registers ().
9185 * win32-arm-low.c (init_registers_arm): Add prototype.
9186 (the_low_target): Add initializer for arch_setup field.
9187 * win32-i386-low.c (init_registers_i386): Add prototype.
9188 (the_low_target): Add initializer for arch_setup field.
9189
9190 * spu-low.c (init_registers_spu): Add prototype.
9191 (initialize_low): Call initialie_registers_spu () instead of
9192 initialize_registers ().
9193
9194 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9195
9196 * server.c (handle_v_requests): When handling the vRun and vAttach
9197 packets, if already debugging a process, don't kill it. Return an
9198 error instead.
9199
9200 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9201
9202 * server.c (handle_query): Correct length check.
9203
9204 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9205
9206 * win32-low.c (do_initial_child_stuff): Add process handle
9207 parameter. Set current_process_handle and current_process_id from the
9208 parameters. Clear globals.
9209 (win32_create_inferior): Don't set current_process_handle and
9210 current_process_id here. Instead pass them on the call to
9211 do_initial_child_stuff.
9212 (win32_attach): Likewise.
9213 (win32_clear_inferiors): New.
9214 (win32_kill): Don't close the current process handle or the
9215 current thread handle here. Instead call win32_clear_inferiors.
9216 (win32_detach): Don't open a new handle to the process. Call
9217 win32_clear_inferiors.
9218 (win32_join): Don't rely on current_process_handle; open a new
9219 handle using the process id.
9220 (win32_wait): Call win32_clear_inferiors when the inferior process
9221 has exited.
9222
9223 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9224
9225 * server.c (monitor_show_help): Add "exit".
9226
9227 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9228
9229 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9230 (clean): Add reg-xtensa.c.
9231 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9232 * configure.srv (xtensa*-*-linux*) New target.
9233 * linux-xtensa-low.c: New.
9234 * xtensa-xtregs.c: New.
9235
9236 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9237
9238 * hostio.c: Don't include errno.h.
9239 (errno_to_fileio_errno): Move to hostio-errno.
9240 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9241 error number outputting to the target->hostio_last_error callback.
9242 (hostio_packet_error): Use FILEIO_EINVAL directly.
9243 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9244 calls to hostio_error.
9245 * hostio-errno.c: New.
9246 * server.h (hostio_last_error_from_errno): Declare.
9247 * target.h (target_ops): Add hostio_last_error member.
9248 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9249 as hostio_last_error handler.
9250 * spu-low.c (spu_target_ops): Likewise.
9251 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9252 (wince_hostio_last_error): New functions.
9253 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9254 as hostio_last_error handler.
9255 (win32_target_ops) [!_WIN32_WCE]: Register
9256 hostio_last_error_from_errno as hostio_last_error handler.
9257 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9258 (hostio-errno.o): New rule.
9259 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9260 * configure.srv (srv_hostio_err_objs): New variable. Default to
9261 hostio-errno.o.
9262 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9263 * configure: Regenerate.
9264
9265 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9266
9267 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9268 (linux_kill, linux_detach): Clean up the process list.
9269 * remote-utils.c (remote_open): Improve port number parsing.
9270 (putpkt_binary, input_interrupt): Only send interrupts if the target
9271 is running.
9272 * server.c (extended_protocol): Make static.
9273 (attached): Define earlier.
9274 (exit_requested, response_needed, program_argv): New variables.
9275 (target_running): New.
9276 (start_inferior): Clear attached here.
9277 (attach_inferior): Set attached here.
9278 (require_running): Define.
9279 (handle_query): Use require_running and target_running. Implement
9280 "monitor exit".
9281 (handle_v_attach, handle_v_run): New.
9282 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9283 (gdbserver_usage): Update.
9284 (main): Redo argument parsing. Handle --debug and --multi. Handle
9285 --attach along with other options or after the port. Save
9286 program_argv. Support no initial program. Resynchronize
9287 communication with GDB after an error. Handle "monitor exit".
9288 Use require_running and target_running. Always allow the extended
9289 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9290 restart in extended mode.
9291 * README: Refer to the GDB manual. Update --attach usage.
9292
9293 2007-12-20 Andreas Schwab <schwab@suse.de>
9294
9295 * linux-low.c (STACK_SIZE): Define.
9296 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9297 (linux_test_for_tracefork): Likewise.
9298
9299 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9300
9301 * linux-low.c (linux_wait_for_event): Update messages. Do not
9302 reinsert auto-delete breakpoints.
9303 * mem-break.c (struct breakpoint): Change return type of handler to
9304 int.
9305 (set_breakpoint_at): Update handler type.
9306 (reinsert_breakpoint_handler): Return 1 instead of calling
9307 delete_breakpoint.
9308 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9309 setting a new one.
9310 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9311 * mem-break.h (set_breakpoint_at): Update handler type.
9312 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9313 * win32-low.c (auto_delete_breakpoint): New.
9314 (get_child_debug_event): Use it.
9315
9316 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9317
9318 * configure.ac: Check for pread and pwrite.
9319 * hostio.c (handle_pread): Fall back to lseek and read.
9320 (handle_pwrite): Fall back to lseek and write.
9321 * config.in, configure: Regenerated.
9322
9323 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9324
9325 * server.c (myresume): Add own_buf argument.
9326 (main): Update calls.
9327
9328 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9329
9330 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9331 * remote-utils.c (remote_open): Do not call disable_async_io.
9332 (block_async_io): Delete.
9333 (unblock_async_io): Make static.
9334 (initialize_async_io): New.
9335 * server.c (handle_v_cont): Handle async I/O here.
9336 (myresume): Likewise. Move other common resume tasks here...
9337 (main): ... from here. Call initialize_async_io. Disable async
9338 I/O before the main loop.
9339 * server.h (initialize_async_io): Declare.
9340 (block_async_io, unblock_async_io): Delete prototypes.
9341 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9342
9343 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9344
9345 * remote-utils.c (readchar): Allow binary data in received messages.
9346
9347 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9348
9349 * win32-low.c (attaching): New global.
9350 (win32_create_inferior): Clear the `attaching' global.
9351 (win32_attach): Set the `attaching' global.
9352 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9353 attaching. Only set a breakpoint at the entry point if not
9354 attaching.
9355
9356 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9357
9358 * server.c (main): Don't report dll events on the initial
9359 connection on attaches.
9360
9361 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9362
9363 * server.c (main): Relax numerical bases supported for the pid of
9364 the --attach command line argument.
9365
9366 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9367
9368 * win32-low.c (win32_attach): Call OpenProcess before
9369 DebugActiveProcess, not after. Add last error output to error
9370 call.
9371
9372 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9373
9374 * win32-low.c (win32_get_thread_context)
9375 (win32_set_thread_context): New functions.
9376 (thread_rec): Use win32_get_thread_context.
9377 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9378 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9379 field.
9380
9381 2007-12-03 Leo Zayas
9382 Pedro Alves <pedro_alves@portugalmail.pt>
9383
9384 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9385 global variables.
9386 (child_add_thread): Minor cleanup.
9387 (child_continue): Resume artificially suspended threads before
9388 calling ContinueDebugEvent.
9389 (suspend_one_thread): New.
9390 (fake_breakpoint_event): New.
9391 (get_child_debug_event): Change return type to int. Check here if
9392 gdb sent an interrupt request. If a soft interrupt was requested,
9393 fake a breakpoint event. Return 0 if there is no event to handle,
9394 and 1 otherwise.
9395 (win32_wait): Don't check here if gdb sent an interrupt request.
9396 Ensure there is a valid event to handle.
9397 (win32_request_interrupt): Add soft interruption method as last
9398 resort.
9399
9400 2007-12-03 Leo Zayas
9401 Pedro Alves <pedro_alves@portugalmail.pt>
9402
9403 * win32-low.h (win32_thread_info): Add descriptions to the
9404 structure members. Replace `suspend_count' counter by a
9405 `suspended' flag.
9406 * win32-low.c (thread_rec): Update condition of when to get the
9407 context from the inferior. Rely on ContextFlags being set if it
9408 has already been retrieved. Only suspend the inferior thread if
9409 we haven't already. Warn if that fails.
9410 (continue_one_thread): s/suspend_count/suspended/. Only call
9411 ResumeThread once. Warn if that fails.
9412
9413 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9414
9415 * win32-low.c (win32_wait): Don't read from the inferior when it
9416 has already exited.
9417
9418 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9419
9420 * Makefile.in (win32_low_h): New variable.
9421 (win32-low.o): Add dependency on $(win32_low_h).
9422 (win32-arm-low.o, win32-i386-low.o): New rules.
9423
9424 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9425
9426 * hostio.c: Correct copyright year.
9427
9428 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9429
9430 * Makefile.in (OBS): Add hostio.o.
9431 (hostio.o): New rule.
9432 * server.h (handle_vFile): Declare.
9433 * hostio.c: New file.
9434 * server.c (handle_v_requests): Take packet_len and new_packet_len
9435 for binary packets. Call handle_vFile.
9436 (main): Update call to handle_v_requests.
9437
9438 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9439
9440 * linux-low.c: Include <sched.h>.
9441
9442 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9443
9444 * linux-low.c (linux_tracefork_grandchild): New.
9445 (linux_tracefork_child): Use clone.
9446 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9447
9448 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9449
9450 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9451
9452 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9453
9454 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9455
9456 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9457
9458 * inferiors.c (change_inferior_id): Delete.
9459 (add_pid_to_list, pull_pid_from_list): New.
9460 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9461 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9462 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9463 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9464 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9465 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9466 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9467 (using_threads): Always set to 1.
9468 (handle_extended_wait): New.
9469 (add_process): Do not set TID.
9470 (linux_create_inferior): Set must_set_ptrace_flags.
9471 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9472 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9473 (linux_thread_alive): Rename TID argument to LWPID.
9474 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9475 (linux_wait_for_event): Do not use TID or check using_threads. Update
9476 call to dead_thread_notify. Call handle_extended_wait.
9477 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9478 (send_sigstop): Delete sigstop_sent.
9479 (wait_for_sigstop): Avoid TID.
9480 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9481 (linux_test_for_tracefork): New.
9482 (linux_lookup_signals): Use thread_db_active and
9483 linux_supports_tracefork_flag.
9484 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9485 * linux-low.h (get_process_thread): Avoid TID.
9486 (struct process_ifo): Move thread_known and tid to the end. Remove
9487 sigstop_sent.
9488 (linux_attach_lwp, thread_db_init): Update prototypes.
9489 * server.h (change_inferior_id): Delete prototype.
9490 (add_pid_to_list, pull_pid_from_list): New prototypes.
9491 * thread-db.c (thread_db_use_events): New.
9492 (find_first_thread): Rename to...
9493 (find_one_thread): ...this. Update callers and messages. Do not
9494 call fatal. Check thread_db_use_events. Do not call
9495 change_inferior_id or new_thread_notify.
9496 (maybe_attach_thread): Update. Do not call new_thread_notify.
9497 (thread_db_init): Set thread_db_use_events. Check use_events.
9498 * utils.c (fatal, warning): Correct message prefix.
9499
9500 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9501
9502 * Makefile.in (clean): Remove new files.
9503 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9504 (powerpc-64.o, powerpc-64.c): New rules.
9505 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9506 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9507 with SPE.
9508 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9509 SPE targets.
9510 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9511 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9512 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9513 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9514 (target_regsets): Add AltiVec and SPE register sets.
9515 * configure.ac: Check for AltiVec and SPE.
9516 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9517 (ppc_fill_vrregset, ppc_store_vrregset): New.
9518 (target_regsets): Add AltiVec register set.
9519 * configure: Regenerated.
9520
9521 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9522
9523 * linux-low.c (O_LARGEFILE): Define.
9524 (linux_read_memory): Use /proc/PID/mem.
9525 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9526 * configure, config.in: Regenerated.
9527
9528 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9529
9530 * linux-low.c (linux_wait_for_event): Do not pass signals while
9531 single-stepping.
9532
9533 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9534
9535 * win32-low.c (create_process): New.
9536 (win32_create_inferior): Use create_process instead of
9537 CreateProcess. If create_process failed retry appending an ".exe"
9538 suffix. Store the GetLastError result immediatelly after
9539 create_process calls and use it on the call to error.
9540
9541 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9542
9543 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9544
9545 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9546
9547 * configure.ac: Switch license to GPLv3.
9548
9549 2007-08-01 Michael Snyder <msnyder@access-company.com>
9550
9551 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9552
9553 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9554
9555 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9556 typedef.
9557 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9558 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9559 CloseToolhelp32Snapshot.
9560 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9561 CloseToolhelp32Snapshot.
9562
9563 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9564
9565 * server.c (main): Check for inferior exit before main loop.
9566
9567 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9568
9569 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9570 instead of on tmp_desc.
9571
9572 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9573 Daniel Jacobowitz <dan@codesourcery.com>
9574
9575 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9576 (add_thread): Minor cleanups.
9577 (clear_inferiors): Move lower in the file. Clear the DLL
9578 list.
9579 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9580 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9581 (xml_escape_text): New.
9582 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9583 for qSupported.
9584 (handle_v_cont): Report errors.
9585 (gdbserver_version): Update.
9586 (main): Correct size of own_buf. Do not report initial DLL events.
9587 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9588 (unloaded_dll, xml_escape_text): New.
9589 * win32-low.c (enum target_waitkind): Update comments.
9590 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9591 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9592 (win32_EnumProcessModules, win32_GetModuleInformation)
9593 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9594 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9595 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9596 (win32_Module32First, win32_Module32Next, load_toolhelp)
9597 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9598 (get_child_debug_event): Handle DLL events.
9599 (win32_wait): Likewise.
9600
9601 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9602
9603 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9604 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9605
9606 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9607
9608 * win32-low.c (handle_output_debug_string): Ignore event if not
9609 waiting.
9610
9611 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9612
9613 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9614
9615 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9616
9617 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9618
9619 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9620
9621 * inferiors.c (change_inferior_id): Add comment.
9622 * linux-low.c (check_removed_breakpoint): Add an early
9623 prototype. Improve debug output.
9624 (linux_attach): Doc update.
9625 (linux_detach_one_process, linux_detach): Clean up before releasing
9626 each process.
9627 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9628 * linux-low.h (struct process_info): Doc improvement.
9629 * mem-break.c (delete_all_breakpoints): New.
9630 * mem-break.h (delete_all_breakpoints): New prototype.
9631 * thread-db.c (find_first_thread): New.
9632 (thread_db_create_event): Call it instead of
9633 thread_db_find_new_threads. Clean up unused variables.
9634 (maybe_attach_thread): Remove first thread handling.
9635 (thread_db_find_new_threads): Use find_first_thread.
9636 (thread_db_get_tls_address): Likewise.
9637
9638 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * thread-db.c (thread_db_find_new_threads): Add prototype.
9641 (thread_db_create_event): Check for the main thread before adding
9642 a new thread.
9643 (maybe_attach_thread): Only enable event reporting if TID == 0.
9644 (thread_db_get_tls_address): Check for new threads.
9645
9646 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9647
9648 * linux-low.c (linux_create_inferior): Try execv before execvp.
9649 * spu-low.c (spu_create_inferior): Likewise.
9650
9651 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9652
9653 * linux-low.c (linux_create_inferior): Change execv to execvp.
9654 * spu-low.c (spu_create_inferior): Likewies.
9655
9656 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9657
9658 * Makefile.in (clean): Clean new files instead of deleted ones.
9659 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9660 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9661 rules.
9662 * configure.srv: Specify XML files and new regformats for MIPS and
9663 MIPS64 GNU/Linux.
9664 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9665 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9666 an entry for the restart register.
9667 (mips_cannot_fetch_register, mips_cannot_store_register)
9668 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9669 register names to match the XML descriptions.
9670 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9671 restart register instead of $0.
9672
9673 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9674 Markus Deuling <deuling@de.ibm.com>
9675
9676 * remote-utils.c (decode_xfer_write): New function.
9677 * server.h (decode_xfer_write): Add prototype.
9678 * server.c (handle_query): Add PACKET_LEN argument. Support
9679 qXfer:spu:read and qXfer:spu:write packets.
9680 (main): Pass packet_len to handle_query.
9681 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9682 * target.h (target_ops): Add qxfer_spu.
9683
9684 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9685
9686 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9687 accessing non-seekable spufs files.
9688
9689 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9690
9691 * server.c (handle_query): Add reply for qC packet.
9692
9693 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9694 Leo Zayas <lerele@champenstudios@com>
9695
9696 * server.h (check_remote_input_interrupt_request): New function.
9697 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9698 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9699 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9700 (check_remote_input_interrupt_request): New function.
9701 * server.h (check_remote_input_interrupt_request): Declare.
9702 * win32-low.c (winapi_DebugBreakProcess,
9703 winapi_GenerateConsoleCtrlEvent): New typedefs.
9704 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9705 to 250 ms.
9706 (win32_wait): Check for remote interrupt request
9707 with check_remote_input_interrupt_request.
9708 (win32_request_interrupt): New function.
9709 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9710
9711 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9712
9713 * win32-low.c (debug_registers_changed,
9714 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9715 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9716 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9717 (thread_rec): Get context using the low target.
9718 (child_add_thread): Call thread_added on the low target,
9719 which does the same thing.
9720 (regptr): Delete.
9721 (do_initial_child_stuff): Remove debug registers references.
9722 Set context using the low target. Resume threads after
9723 setting the contexts.
9724 (child_continue): Remove dead variable. Remove debug
9725 registers references.
9726 (child_fetch_inferior_registers): Go through the low target.
9727 (do_child_store_inferior_registers): Remove.
9728 (child_store_inferior_registers): Go through the low target.
9729 (win32_resume): Remove debug registers references.
9730 Set context using the low target.
9731 (handle_exception): Change return type to void. Don't record
9732 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9733 first chance exception.
9734 (get_child_debug_event): Change return type to void. Remove
9735 goto loop. Always return after waiting for debug event.
9736 (win32_wait): Convert to switch statement. Handle spurious
9737 events.
9738
9739 * win32-i386-low.c (debug_registers_changed,
9740 debug_registers_used): New.
9741 (initial_stuff): Rename to ...
9742 (i386_initial_stuff): ... this. Clear debug registers
9743 state variables.
9744 (store_debug_registers): Delete.
9745 (i386_get_thread_context): New.
9746 (load_debug_registers): Delete.
9747 (i386_set_thread_context): New.
9748 (i386_thread_added): New.
9749 (single_step): Rename to ...
9750 (i386_single_step): ... this.
9751 (do_fetch_inferior_registers): Rename to ...
9752 (i386_fetch_inferior_register): ... this.
9753 (i386_store_inferior_register): New.
9754 (the_low_target): Adapt to new interface.
9755
9756 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9757 (arm_get_thread_context): New.
9758 (arm_set_thread_context): New.
9759 (regptr): New.
9760 (do_fetch_inferior_registers): Rename to ...
9761 (arm_fetch_inferior_register): ... this.
9762 (arm_store_inferior_register): New.
9763 (arm_wince_breakpoint): Reimplement as unsigned long.
9764 (arm_wince_breakpoint_len): Define.
9765 (the_low_target): Adapt to new interface.
9766
9767 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9768 load_debug_registers. Add get_thread_context, set_thread_context,
9769 thread_added and store_inferior_register. Rename
9770 fetch_inferior_registers to fetch_inferior_register.
9771 (regptr): Remove declaration.
9772
9773 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9774
9775 * linux-low.c (linux_detach): Change return type to int. Return 0.
9776 * spu-low.c (spu_detach): Likewise.
9777
9778 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9779
9780 * target.h (target_ops): Change return type of detach to int.
9781 Add join.
9782 (join_inferior): New.
9783 * server.c (main): Don't skip detach support on mingw32.
9784 If the inferior doesn't support detaching return error.
9785 Call join_inferior instead of using waitpid.
9786 * linux-low.c (linux_join): New.
9787 (linux_target_op): Add linux_join.
9788 * spu-low.c (spu_join): New.
9789 (spu_target_ops): Add spu_join.
9790 * win32-low.c (win32_detach): Adapt to new interface.
9791 Reopen current_process_handle before detaching. Issue a child
9792 resume before detaching.
9793 (win32_join): New.
9794 (win32_target_op): Add win32_join.
9795
9796 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9797
9798 * win32-low.c (win32-attach): Fix return value.
9799 * target.h (target_ops): Describe ATTACH return values.
9800
9801 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9802
9803 * win32-low.c (GETPROCADDRESS): Define.
9804 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9805 (winapi_DebugSetProcessKillOnExit): Likewise.
9806 (win32_create_inferior): Force usage of ansi CreateProcessA.
9807 (win32_attach): Use GETPROCADDRESS.
9808 (win32_detach): Likewise.
9809
9810 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9811
9812 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9813
9814 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9815
9816 * win32-low.c: Commit leftover changes from 2007-03-29.
9817
9818 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9819
9820 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9821 fields short instead of int. Add explicit padding.
9822 (i387_cache_to_fsave): Remove unnecessary casts.
9823 (i387_fsave_to_cache): Doc fix.
9824 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9825
9826 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9827
9828 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9829 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9830
9831 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9832
9833 * configure.srv (arm*-*-mingw32ce*): Move near the other
9834 arm targets.
9835
9836 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9837
9838 * configure.ac: Add errno checking.
9839 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9840 sys/file.h and malloc.h.
9841 (AC_CHECK_DECLS): Add perror.
9842 (srv_mingwce): Handle.
9843 * configure.srv (i[34567]86-*-cygwin*): Add
9844 win32-i386-low.o to srv_tgtobj.
9845 (i[34567]86-*-mingw*): Likewise.
9846 (arm*-*-mingw32ce*): Add case.
9847 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9848 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9849 [__MINGW32CE__] (strerror): New function.
9850 [__MINGW32CE__] (errno): Define to GetLastError.
9851 [__MINGW32CE__] (COUNTOF): New macro.
9852 (remote_open): Remove extra close call.
9853 * mem-break.c (delete_breakpoint_at): New function.
9854 * mem-break.h (delete_breakpoint_at): Declare.
9855 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9856 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9857 [USE_WIN32API] (read, write): Add char* casts.
9858 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9859 * server.h: Include wincecompat.h on Windows CE.
9860 [HAVE_ERRNO_H]: Check.
9861 (perror): Declare if not declared.
9862 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9863 (perror_with_name): Remove errno declaration.
9864 * wincecompat.h: New.
9865 * wincecompat.c: New.
9866 * win32-low.h: New.
9867 * win32-arm-low.c: New.
9868 * win32-i386-low.c: New.
9869 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9870 (OUTMSG2): Make it safe.
9871 (_T): New macro.
9872 (COUNTOF): New macro.
9873 (NUM_REGS): Get it from the low target.
9874 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9875 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9876 (thread_rec): Let low target handle debug registers.
9877 (child_add_thread): Likewise.
9878 (child_init_thread_list): Likewise.
9879 (continue_one_thread): Likewise.
9880 (regptr): New.
9881 (do_child_fetch_inferior_registers): Move to ...
9882 * win32-i386-low.c: ... here, and rename to ...
9883 (do_fetch_inferior_registers): ... this.
9884 * win32-low.c (child_fetch_inferior_registers):
9885 Go through the low target.
9886 (do_child_store_inferior_registers): Use regptr.
9887 (strwinerror): New function.
9888 (win32_create_inferior): Handle Windows CE.
9889 Use strwinerror instead of strerror on Windows error
9890 codes. Add program to the error output.
9891 Don't close the main thread handle on Windows CE.
9892 (win32_attach): Use coredll.dll on Windows CE.
9893 (win32_kill): Close current process and current
9894 thread handles.
9895 (win32_detach): Use coredll.dll on Windows CE.
9896 (win32_resume): Let low target handle debug registers, and
9897 step request.
9898 (handle_exception): Add/Remove initial breakpoint. Avoid
9899 non-existant WSTOPSIG on Windows CE.
9900 (win32_read_inferior_memory): Cast to remove warning.
9901 (win32_arch_string): Go through the low target.
9902 (initialize_low): Call set_breakpoint_data with the low
9903 target's breakpoint.
9904 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9905 FOP_REGNUM, mappings): Move to ...
9906 * win32-i386-low.c: ... here.
9907 * win32-low.c (win32_thread_info): Move to ...
9908 * win32-low.h: ... here.
9909 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9910 win32-arm-low.c and wincecompat.c.
9911 (all:): Add $EXEEXT.
9912 (install-only:): Likewise.
9913 (gdbserver:): Likewise.
9914 (gdbreplay:): Likewise.
9915 * config.in: Regenerate.
9916 * configure: Regenerate.
9917
9918 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9919
9920 * win32-low.c: Rename typedef thread_info to
9921 win32_thread_info throughout.
9922
9923 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9924
9925 * win32-i386-low.c: Rename to ...
9926 * win32-low.c: ... this.
9927 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9928 * Makefile.in: Likewise.
9929
9930 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9931
9932 * remote-utils.c (monitor_output): Constify msg parameter.
9933 * server.h (monitor_output): Likewise.
9934 * win32-i386-low.c (handle_output_debug_string): New.
9935 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9936 handle_output_debug_string.
9937 (get_child_debug_event): Likewise.
9938
9939 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9940
9941 * server.c (main): Correct strtoul check.
9942
9943 2007-03-27 Jon Ringle <jon@ringle.org>
9944
9945 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9946
9947 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9948
9949 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9950
9951 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9952
9953 * terminal.h: Check HAVE_SGTTY_H.
9954
9955 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9956
9957 * remote-utils.c (remote_open): Print out the assigned port number.
9958
9959 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9960
9961 * remote-utils.c (monitor_output): New function.
9962 * server.c (debug_threads): Define here.
9963 (monitor_show_help): New function.
9964 (handle_query): Handle qRcmd.
9965 (main): Do not handle 'd' packet.
9966 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9967 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9968 of debug_threads.
9969
9970 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9971
9972 * Makefile.in (EXEEXT): New.
9973 (clean): Use $(EXEEXT).
9974
9975 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9976
9977 * target.h (target_ops): Rename send_signal to request_interrupt,
9978 and remove enum target_signal parameter.
9979 * linux-low.c (linux_request_interrupt): Rename from
9980 linux_send_signal, and always send SIGINT.
9981 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9982 and always send SIGINT.
9983 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9984 of send_signal.
9985 (input_interrupt): Likewise.
9986
9987 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9988
9989 * server.c (get_features_xml): Check if target implemented
9990 arch_string.
9991 * win32-i386-low.c (win32_arch_string): New.
9992 (win32_target_ops): Add win32_arch_string as arch_string member.
9993
9994 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9995
9996 * spu-low.c (spu_arch_string): New.
9997 (spu_target_ops): Add spu_arch_string.
9998
9999 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10000
10001 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10002 * configure.ac: Do not check for terminal.h.
10003 * configure, config.in: Regenerated.
10004
10005 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10006
10007 * Makefile.in (OBS): Add $(XML_BUILTIN).
10008 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10009 (clean): Update.
10010 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10011 (arm-with-iwmmxt.c): New.
10012 * config.in, configure: Regenerate.
10013 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10014 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10015 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10016 (arm*-*-linux*): Add iWMMXt and regset support.
10017 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10018 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10019 (arm_store_wmmxregset, target_regsets): New.
10020 * server.c (get_features_xml): Take annex argument. Check builtin
10021 XML documents.
10022 (handle_query): Handle multiple annexes.
10023
10024 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10025
10026 * remote-utils.c [USE_WIN32API] (read, write): Define.
10027 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10028 write.
10029
10030 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10031
10032 * linux-i386-low.c (the_low_target): Set arch_string.
10033 * linux-x86-64-low.c (the_low_target): Likewise.
10034 * linux-low.c (linux_arch_string): New.
10035 (linux_target_ops): Add it.
10036 * linux-low.h (struct linux_target_ops): Add arch_string.
10037 * server.c (write_qxfer_response): Use const void * for DATA.
10038 (get_features_xml): New.
10039 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10040 * target.h (struct target_ops): Add arch_string method.
10041
10042 2007-01-03 Denis Pilat <denis.pilat@st.com>
10043 Daniel Jacobowitz <dan@codesourcery.com>
10044
10045 * linux-low.c (linux_kill): Handle being called with no threads.
10046 * win32-i386-low.c (win32_kill): Likewise.
10047 (get_child_debug_event): Clear current_process_handle.
10048
10049 2006-12-30 Denis PILAT <denis.pilat@st.com>
10050 Daniel Jacobowitz <dan@codesourcery.com>
10051
10052 * remote-utils.c (remote_open): Check the type of specified
10053 serial port devices before opening them.
10054 * server.c (main): Kill the inferior if an error occurs during
10055 the first remote_open.
10056
10057 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10058
10059 * README: Update supported targets.
10060
10061 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10062
10063 * Makefile.in (clean): Remove reg-mips64.c.
10064 (reg-mips64.c, reg-mips64.o): New rules.
10065 * configure.srv: Handle mips64. Include regset support for mips.
10066 * linux-mips-low.c (union mips_register): New.
10067 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10068 (mips_breakpoint, mips_breakpoint_at): Use int.
10069 (mips_collect_register, mips_supply_register)
10070 (mips_collect_register_32bit, mips_supply_register_32bit)
10071 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10072 (mips_store_fpregset, target_regsets): New.
10073 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10074
10075 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10076
10077 * configure.srv: Add target "spu*-*-*".
10078 * Makefile.in (clean): Remove reg-spu.c.
10079 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10080 * spu-low.c: New file.
10081
10082 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10083
10084 * configure.ac: Correct td_thr_tls_get_addr test.
10085 * configure: Regenerated.
10086
10087 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10088
10089 * linux-low.c (linux_wait_for_event): Reformat. Use the
10090 pass_signals array.
10091 * remote-utils.c (decode_address_to_semicolon): New.
10092 * server.c (pass_signals, handle_general_set): New.
10093 (handle_query): Mention QPassSignals for qSupported.
10094 (main): Call handle_general_set.
10095 * server.h (pass_signals, decode_address_to_semicolon): New.
10096
10097 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10098
10099 * server.c (handle_query): Correct error handling for read_auxv.
10100
10101 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10102
10103 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10104 and srv_linux_thread_db to yes.
10105 * linux-s390-low.c (s390_fill_gregset): New function.
10106 (target_regsets): Define data structure.
10107
10108 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10109
10110 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10111 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10112 * config.in, configure: Regenerated.
10113 * inferiors.c (gdb_id_to_thread): New function.
10114 (gdb_id_to_thread_id): Use it.
10115 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10116 * linux-low.h (struct process_info): Add th member.
10117 (thread_db_get_tls_address): New prototype.
10118 * remote-utils.c (decode_address): Make non-static.
10119 * server.c (handle_query): Handle qGetTLSAddr.
10120 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10121 * target.h (struct target_ops): Add get_tls_address.
10122 * thread-db.c (maybe_attach_thread): Save the thread handle.
10123 (thread_db_get_tls_address): New.
10124
10125 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10126
10127 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10128 (linux_resume_one_process): Take a siginfo_t *. Update all
10129 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10130 (struct pending_signals): Add a siginfo_t.
10131 (linux_wait_for_process): Always set last_status.
10132 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10133 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10134 * linux-low.h (struct process_info): Add last_status.
10135
10136 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10137
10138 * remote-utils.c (try_rle): New function.
10139 (putpkt_binary): Use it.
10140
10141 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10142
10143 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10144 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10145 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10146 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10147 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10148 point registers.
10149
10150 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10151
10152 * server.c (terminal_fd): New variable.
10153 (old_foreground_pgrp): Likewise.
10154 (restore_old_foreground_pgrp): New function.
10155 (start_inferior): Record the terminal file descriptor in terminal_fd
10156 and its original foreground group in old_foreground_pgrp. Register
10157 restore_old_foreground_pgrp with atexit().
10158
10159 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10160
10161 * server.c (handle_query): Correct qPart to qXfer.
10162
10163 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10164
10165 * configure.ac: Check for more headers which are missing on
10166 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10167 * configure.srv: Add Cygwin and mingw32.
10168 * remote-utils.c: Don't include headers unconditionally which
10169 are missing on mingw32. Include <winsock.h> for mingw32.
10170 (remote_open): Adjust for mingw32 support. Flush
10171 standard error after writing to it.
10172 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10173 (unblock_async_io, enable_async_io, disable_async_io)
10174 (readchar, getpkt): Update for Winsock support.
10175 (prepare_resume_reply): Expect a protocol signal number.
10176 * server.c: Disable <sys/wait.h> on mingw32.
10177 (start_inferior): Adjust for mingw32 support. Flush
10178 standard error after writing to it.
10179 (attach_inferior): Likewise. Use protocol signal
10180 numbers.
10181 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10182 and names.
10183 * win32-i386-low.c: New file.
10184 * Makefile.in (XM_CLIBS): Set.
10185 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10186 (win32-i386-low.o): New dependency rule.
10187 * linux-low.c (linux_wait): Use target signal numbers.
10188 * target.h (struct target_ops): Doc fix.
10189 * server.h (target_signal_to_name): New prototype.
10190 * gdbreplay.c: Don't include headers unconditionally which
10191 are missing on mingw32. Include <winsock.h> for mingw32.
10192 (remote_close, remote_open): Adjust for Winsock support.
10193 * configure, config.in: Regenerated.
10194
10195 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10196
10197 * server.c (decode_xfer_read, write_qxfer_response): New.
10198 (handle_query): Take a packet length argument. Handle
10199 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10200 the qSupported response.
10201 (main): Update call to handle_query.
10202
10203 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10204
10205 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10206 (putpkt_binary): Renamed from putpkt and adjusted for binary
10207 data.
10208 (putpkt): New wrapper for putpkt_binary.
10209 (readchar): Don't mask off the high bit.
10210 (decode_X_packet): New function.
10211 * server.c (main): Call putpkt_binary if a handler sets the packet
10212 length. Save the length of the incoming packet. Handle 'X'.
10213 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10214
10215 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10216
10217 * server.c (handle_query): Handle qSupported.
10218
10219 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10220
10221 * remote-utils.c (all_symbols_looked_up): New variable.
10222 (look_up_one_symbol): Check it.
10223 * server.h (look_up_one_symbol): New declaration.
10224 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10225
10226 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10227
10228 * Makefile.in (linux-arm-low.o): Update dependencies.
10229 * linux-arm-low.c: Include "gdb_proc_service.h".
10230 (PTRACE_GET_THREAD_AREA): Define.
10231 (ps_get_thread_area): New function.
10232
10233 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10234
10235 * configure.srv (m68k*-*-uclinux*): New target.
10236 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10237 (linux_resume_one_process): Remove extraneous cast.
10238 (linux_read_offsets): New.
10239 (linux_target_op): Add linux_read_offsets on mmuless systems.
10240 * server.c (handle_query): Add qOffsets logic.
10241 * target.h (struct target_ops): Add read_offsets.
10242
10243 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10246 (PTRACE_GET_THREAD_AREA): Define.
10247 (ps_get_thread_area): New function.
10248 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10249 (linux-x86-64-low.o): Update.
10250
10251 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10252
10253 * configure.ac: Remove checks for prfpregset_t.
10254 * gdb_proc_service.h: New file.
10255 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10256 new "gdb_proc_service.h".
10257 * proc-service.c: Likewise.
10258 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10259 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10260 * Makefile.in (gdb_proc_service_h): Updated.
10261 * configure, config.in: Regenerated.
10262
10263 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * remote-utils.c (prepare_resume_reply): Move declaration
10266 of gdb_id_from_wait to the top of the block.
10267
10268 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10269
10270 * linux-low.c (regsets_store_inferior_registers): Read the regset
10271 from the target before filling it.
10272
10273 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10274
10275 * server.c (attach_inferior): Return SIGTRAP for a successful
10276 attach.
10277
10278 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10279
10280 * Makefile.in (OBS): Add version.o.
10281 (STAGESTUFF): Delete.
10282 (version.o): Add dependencies.
10283 (version.c): Replace rule.
10284 (clean): Remove version.c.
10285 * server.c (gdbserver_version): New.
10286 (gdbserver_usage): Use printf.
10287 (main): Handle --version and --help.
10288 * server.h (version, host_name): Add declarations.
10289
10290 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10291
10292 * linux-arm-low.c:
10293 * linux-arm-low.c:
10294 * inferiors.c:
10295 * i387-fp.h:
10296 * i387-fp.c:
10297 * gdbreplay.c:
10298 * regcache.c:
10299 * proc-service.c:
10300 * mem-break.h:
10301 * mem-break.c:
10302 * linux-x86-64-low.c:
10303 * linux-sh-low.c:
10304 * linux-s390-low.c:
10305 * linux-ppc64-low.c:
10306 * linux-ppc-low.c:
10307 * linux-mips-low.c:
10308 * linux-m68k-low.c:
10309 * linux-m32r-low.c:
10310 * linux-low.h:
10311 * linux-low.c:
10312 * linux-ia64-low.c:
10313 * linux-i386-low.c:
10314 * linux-crisv32-low.c:
10315 * thread-db.c:
10316 * terminal.h:
10317 * target.h:
10318 * target.c:
10319 * server.h:
10320 * server.c:
10321 * remote-utils.c:
10322 * regcache.h:
10323 * utils.c:
10324 * Makefile.in:
10325 * configure.ac:
10326 * gdbserver.1: Add (C) after Copyright. Update the FSF
10327 address.
10328
10329 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10330
10331 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10332 (arm_breakpoint_at): Recognize both breakpoints.
10333 (the_low_target): Use the correct breakpoint instruction.
10334
10335 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10336
10337 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10338 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10339 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10340 (the_low_target): Update.
10341
10342 2005-10-25 Andreas Schwab <schwab@suse.de>
10343
10344 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10345
10346 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10347 (ia64_num_regs): Reduce to 462.
10348
10349 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10350
10351 * acinclude.m4: Correct quoting.
10352 * aclocal.m4: Regenerated.
10353
10354 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10355 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10356 (thread_db_init): Call thread_db_err_str.
10357 * configure.ac: Check for TD_VERSION.
10358 * config.in, configure: Regenerated.
10359
10360 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10361
10362 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10363
10364 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10365
10366 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10367 is not available. Define HAVE_PTRACE_GETREGS if it is.
10368 * config.in, configure: Regenerated.
10369 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10370 * linux-i386-low.c, linux-m68k-low.c: Update to use
10371 HAVE_PTRACE_GETREGS.
10372 * linux-low.c (regsets_fetch_inferior_registers)
10373 (regsets_store_inferior_registers): Only return 0 if we processed
10374 GENERAL_REGS.
10375 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10376 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10377
10378 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * inferiors.c (struct thread_info): Add gdb_id.
10381 (add_thread): Add gdb_id argument.
10382 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10383 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10384 calls to add_thread.
10385 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10386 * server.c (handle_query): Use thread_to_gdb_id.
10387 (handle_v_cont, main): Use gdb_id_to_thread_id.
10388 * server.h (add_thread): Update prototype.
10389 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10390 prototypes.
10391
10392 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10395 left-padded registers.
10396 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10397 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10398
10399 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10400
10401 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10402 * configure: Regenerate.
10403 * config.in: Regenerate.
10404 * server.h (NEED_DECLARATION_STRERROR):
10405 Replace with !HAVE_DECL_STRERROR.
10406
10407 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10408
10409 * linux-low.c (linux_wait, linux_send_signal): Don't test
10410 an unsigned long variable for > 0 if it could be MAX_ULONG.
10411 * server.c (myresume): Likewise.
10412 * target.c (set_desired_inferior): Likewise.
10413
10414 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10415
10416 * configure.ac: Simplify and improve check for socklen_t.
10417 * configure, config.in: Regenerate.
10418
10419 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10420
10421 * acconfig.h: Remove.
10422 * configure.ac: Add a test for socklen_t. Use three-argument
10423 AC_DEFINE throughout.
10424 * config.in: Regenerated using autoheader 2.59.
10425 * configure: Regenerated.
10426
10427 * gdbreplay.c (socklen_t): Provide a default.
10428 (remote_open): Use socklen_t.
10429 * remote-utils.c (socklen_t): Provide a default.
10430 (remote_open): Use socklen_t.
10431 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10432 unsigned char.
10433
10434 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10435 char for buffers.
10436 * linux-low.c (linux_read_memory, linux_write_memory)
10437 (linux_read_auxv): Likewise.
10438 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10439 (check_mem_write): Likewise.
10440 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10441 Likewise.
10442 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10443 (registers_from_string, register_data): Likewise.
10444 * server.c (handle_query, main): Likewise.
10445 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10446 (decode_M_packet): Likewise.
10447 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10448 * target.h (struct target_ops): Update read_memory, write_memory,
10449 and read_auxv.
10450 (read_inferior_memory, write_inferior_memory): Update.
10451 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10452 to unsigned char *.
10453 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10454 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10455 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10456 linux-s390-low.c, linux-sh-low.c: Update for changes in
10457 read_inferior_memory and the_low_target->breakpoint.
10458
10459 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10460
10461 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10462 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10463 * configure.srv: Add powerpc64-*-linux*.
10464 * linux-ppc64-low.c: New file.
10465
10466 2005-05-23 Orjan Friberg <orjanf@axis.com>
10467
10468 * linux-cris-low.c: New file with support for CRIS.
10469 * linux-crisv32-low.c: Ditto for CRISv32.
10470 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10471 (clean): Add reg-cris.c and reg-crisv32.c.
10472 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10473 reg-crisv32.o, and reg-crisv32.c to make rules.
10474 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10475 recognized targets.
10476
10477 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10478
10479 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10480 of sizeof (PTRACE_XFER_TYPE).
10481 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10482
10483 2005-05-12 Orjan Friberg <orjanf@axis.com>
10484
10485 * target.h (struct target_ops): Add insert_watchpoint,
10486 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10487 pointers for hardware watchpoint support.
10488 * linux-low.h (struct linux_target_ops): Ditto.
10489 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10490 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10491 to linux_target_ops.
10492 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10493 reply packet.
10494 * server.c (main): Recognize 'Z' and 'z' packets.
10495
10496 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10497
10498 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10499 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10500 (the_low_target): Add new members.
10501
10502 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10503
10504 * proc-service.c (ps_lgetregs): Search all_processes instead of
10505 all_threads.
10506
10507 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10508
10509 * server.c (start_inferior): Change return type to int.
10510 (attach_inferior): Change sigptr to int *.
10511 (handle_v_cont, handle_v_requests): Change signal to int *.
10512 (main): Change signal to int.
10513
10514 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10515
10516 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10517 * configure.srv: Add m32r*-*-linux*.
10518 * linux-m32r-low.c: New file.
10519
10520 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10521
10522 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10523
10524 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10525
10526 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10527 Take unsigned long arguments for PIDs.
10528 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10529 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10530 (wait_for_sigstop, linux_resume_one_process)
10531 (regsets_fetch_inferior_registers, linux_send_signal)
10532 (linux_read_auxv): Likewise. Update the types of variables holding
10533 PIDs. Update format string specifiers.
10534 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10535 * remote-utils.c (prepare_resume_reply): Likewise.
10536 * server.c (cont_thread, general_thread, step_thread)
10537 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10538 unsigned long.
10539 (handle_query): Update format specifiers.
10540 (handle_v_cont, main): Use strtoul for thread IDs.
10541 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10542 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10543 (general_thread, step_thread, thread_from_wait)
10544 (old_thread_from_wait): Update.
10545 * target.h (struct thread_resume): Use unsigned long for THREAD.
10546 (struct target_ops): Use unsigned long for arguments to attach and
10547 thread_alive.
10548
10549 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10550
10551 * acinclude.m4: Include bfd/bfd.m4 directly.
10552 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10553 <agriffis@toolchain.org>.
10554 * aclocal.m4, configure: Regenerated.
10555
10556 2005-01-07 Andrew Cagney <cagney@gnu.org>
10557
10558 * configure.ac: Rename configure.in, require autoconf 2.59.
10559 * configure: Re-generate.
10560
10561 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10562
10563 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10564 LIBS when finished.
10565 * aclocal.m4: Regenerated.
10566 * configure: Regenerated.
10567
10568 2004-11-21 Andreas Schwab <schwab@suse.de>
10569
10570 * linux-m68k-low.c (m68k_num_gregs): Define.
10571 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10572 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10573 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10574 (m68k_breakpoint_at): New. Add to the_low_target.
10575
10576 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10577 srv_linux_thread_db to yes.
10578
10579 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10580
10581 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10582 (ARCH_SET_FS): Likewise.
10583 (ARCH_GET_FS): Likewise.
10584 (ARCH_GET_GS): Likewise.
10585
10586 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10587
10588 * linux-i386-low.c (ps_get_thread_area): New.
10589 * linux-x86-64-low.c (ps_get_thread_area): New.
10590 * linux-low.c: Include <sys/syscall.h>.
10591 (linux_kill_one_process): Don't kill the first thread here.
10592 (linux_kill): Kill the first thread here.
10593 (kill_lwp): New function.
10594 (send_sigstop, linux_send_signal): Use it.
10595 * proc-service.c: Clean up #ifdefs.
10596 (fpregset_info): Delete.
10597 (ps_lgetregs): Update and enable implementation.
10598 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10599 implementations.
10600 * remote-utils.c (struct sym_cache, symbol_cache): New.
10601 (input_interrupt): Print a clearer message.
10602 (async_io_enabled): New variable.
10603 (enable_async_io, disable_async_io): Use it. Update comments.
10604 (look_up_one_symbol): Use the symbol cache.
10605 * thread-db.c (thread_db_look_up_symbols): New function.
10606 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10607
10608 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10609
10610 * configure.in: Test for -rdynamic.
10611 * configure: Regenerated.
10612 * Makefile (INTERNAL_LDFLAGS): New.
10613 (gdbserver, gdbreplay): Use it.
10614
10615 2004-09-02 Andrew Cagney <cagney@gnu.org>
10616
10617 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10618
10619 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10620
10621 * linux-low.c (linux_wait): Clear all_processes list also.
10622
10623 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10624
10625 * linux-low.c: Include <errno.h>. Remove extern declaration of
10626 errno.
10627
10628 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10629
10630 * gdbreplay.c, server.h, utils.c: Update copyright years.
10631
10632 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10633
10634 * server.c (main): Print child status or termination signal from
10635 variable 'signal', not 'sig'.
10636
10637 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10638
10639 * linux-low.c (linux_read_memory): Change return type to
10640 int. Check for and return error from ptrace().
10641 * target.c (read_inferior_memory): Change return type to int. Pass
10642 back return status from the_target->read_memory().
10643 * target.h (struct target_ops): Adapt *read_memory() prototype.
10644 Update comment.
10645 (read_inferior_memory): Adapt prototype.
10646 * server.c (main): Return an error packet if
10647 read_inferior_memory() returns an error.
10648
10649 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10650
10651 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10652 Unify with other clean targets.
10653
10654 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10655
10656 * server.c (handle_v_cont): Call set_desired_inferior.
10657
10658 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10659
10660 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10661
10662 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10663
10664 * linux-low.c (linux_wait): Unblock async I/O.
10665 (linux_resume): Block and enable async I/O.
10666 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10667 * server.h (block_async_io, unblock_async_io): Add prototypes.
10668
10669 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10670
10671 * remote-utils.c (remote_open): Print a status notice after
10672 opening a TCP port.
10673 * server.c (attach_inferior): Print a status notice after
10674 attaching.
10675
10676 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10677
10678 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10679
10680 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10681
10682 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10683 error packet.
10684 * server.c, target.h: Update copyright years.
10685
10686 2004-02-25 Roland McGrath <roland@redhat.com>
10687
10688 * target.h (struct target_ops): New member `read_auxv'.
10689 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10690 * linux-low.c (linux_read_auxv): New function.
10691 (linux_target_ops): Initialize `read_auxv' member to that.
10692
10693 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10694
10695 Committed by Jim Blandy <jimb@redhat.com>.
10696
10697 * linux-s390-low.c (s390_num_regs): Update.
10698 (s390_regmap): Remove control registers. Use __s390x__ predefine
10699 instead of GPR_SIZE to distiguish s390 and s390x targets.
10700
10701 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10702
10703 * linux-low.c: Update copyright year.
10704 (check_removed_breakpoint): Clear pending_is_breakpoint.
10705 (linux_set_resume_request, linux_queue_one_thread)
10706 (resume_status_pending_p): New functions.
10707 (linux_continue_one_thread): Use process->resume.
10708 (linux_resume): Only resume threads if there are no pending events.
10709 * linux-low.h (struct process_info): Add resume request
10710 pointer.
10711
10712 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10713
10714 * regcache.c (new_register_cache): Clear the allocated register
10715 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10716
10717 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10718
10719 * linux-low.c (linux_resume): Take a struct thread_resume *
10720 argument.
10721 (linux_wait): Update call.
10722 (resume_ptr): New static variable.
10723 (linux_continue_one_thread): Renamed from
10724 linux_continue_one_process. Use resume_ptr.
10725 (linux_resume): Use linux_continue_one_thread.
10726 * server.c (handle_v_cont, handle_v_requests): New functions.
10727 (myresume): New function.
10728 (main): Handle 'v' case.
10729 * target.h (struct thread_resume): New type.
10730 (struct target_ops): Change argument of "resume" to struct
10731 thread_resume *.
10732 (myresume): Delete macro.
10733
10734 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10735
10736 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10737 (uninstall): Support DESTDIR.
10738
10739 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10740
10741 * configure.srv: Add xscale*linux copy of arm*linux entry.
10742
10743 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10744
10745 * linux-arm-low.c (arm_reinsert_addr): New function.
10746 (the_low_target): Add arm_reinsert_addr.
10747
10748 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10749
10750 * mem-break.c: Remove whitespace at end of file.
10751
10752 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10753
10754 * configure.in: Check whether we need to prototype strerror.
10755 * server.h: Optionally prototype strerror.
10756 * gdbreplay.c (perror_with_name): Use strerror.
10757 * linux-low.c (linux_attach_lwp): Use strerror.
10758 * utils.c (perror_with_name): Use strerror.
10759 * config.in, configure: Regenerated.
10760
10761 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10762
10763 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10764 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10765
10766 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10767
10768 * Makefile.in (SFILES): Update.
10769 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10770 low-sun3.c: Remove files.
10771
10772 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10773
10774 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10775 (linux_detach_one_process, linux_detach): New functions.
10776 (linux_target_ops): Add linux_detach.
10777 * server.c (main): Handle 'D' packet.
10778 * target.h (struct target_ops): Add "detach" member.
10779 (detach_inferior): Define.
10780
10781 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10782
10783 From Kelley Cook <kelleycook@wideopenwest.com>:
10784 * configure.srv: Accept i[34567]86 variants.
10785
10786 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10787
10788 * linux-low.c (linux_wait_for_event): Correct comment typos.
10789 (linux_resume_one_process): Call check_removed_breakpoint.
10790 (linux_send_signal): New function.
10791 (linux_target_ops): Add linux_send_signal.
10792 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10793 of kill.
10794 * target.h (struct target_ops): Add send_signal.
10795
10796 2003-05-29 Jim Blandy <jimb@redhat.com>
10797
10798 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10799 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10800 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10801 away part of the register's value.
10802
10803 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10804
10805 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10806 (linux_wait_for_event, linux_init_signals): Likewise.
10807
10808 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10809
10810 * configure.in: Check for stdlib.h.
10811 * configure: Regenerated.
10812 * config.in: Regenerated.
10813
10814 2003-01-04 Andreas Schwab <schwab@suse.de>
10815
10816 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10817
10818 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10819
10820 * Makefile.in: Remove obsolete code.
10821
10822 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10823
10824 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10825 defined(PT_FPR0_HI).
10826
10827 2002-11-17 Stuart Hughes <seh@zee2.com>
10828
10829 * linux-arm-low.c (arm_num_regs): Increase.
10830 (arm_regmap): Include status register.
10831
10832 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10833
10834 * linux-low.c (register_addr): Remove incorrect -1 check.
10835
10836 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10837
10838 * linux-low.c (linux_create_inferior): Call setpgid. Return
10839 the new PID.
10840 (unstopped_p, linux_signal_pid): Remove.
10841 (linux_target_ops): Remove linux_signal_pid.
10842 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10843 global instead of target method.
10844 * target.h (struct target_ops): Remove signal_pid. Update comment
10845 for create_inferior.
10846 * server.c (signal_pid): New variable.
10847 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10848 gdbserver. Set the child to be the foreground process group.
10849 (attach_inferior): Set signal_pid.
10850
10851 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10852
10853 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10854
10855 2002-08-20 Jim Blandy <jimb@redhat.com>
10856
10857 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10858 default for this.
10859
10860 2002-08-01 Andrew Cagney <cagney@redhat.com>
10861
10862 * Makefile.in: Make chill references obsolete.
10863
10864 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10865
10866 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10867 * configure: Regenerate.
10868 * config.in: Regenerate.
10869
10870 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10871
10872 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10873 (perror_with_name, remote_close, remote_open, expect, play): Static.
10874
10875 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10876
10877 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10878 byte offsets instead of an array of indexes.
10879 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10880
10881 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10882
10883 * regcache.c: Add comment.
10884
10885 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10886
10887 * thread-db.c: New file.
10888 * proc-service.c: New file.
10889 * acinclude.m4: New file.
10890 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10891 proc-service.o, and thread-db.o.
10892 (linux-low.o): Add USE_THREAD_DB.
10893 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10894 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10895 * aclocal.m4: Regenerated.
10896 * config.in: Regenerated.
10897 * configure: Regenerated.
10898 * configure.in: Check for proc_service.h, sys/procfs.h,
10899 thread_db.h, and linux/elf.h headrs.
10900 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10901 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10902 Check for -lthread_db and thread support.
10903 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10904 PowerPC, and SuperH.
10905 * i387-fp.c: Constify arguments.
10906 * i387-fp.h: Likewise.
10907 * inferiors.c: (struct thread_info): Renamed from
10908 `struct inferior_info'. Remove PID member. Use generic inferior
10909 list header. All uses updated.
10910 (inferiors, signal_pid): Removed.
10911 (all_threads): New variable.
10912 (get_thread): Define.
10913 (add_inferior_to_list): New function.
10914 (for_each_inferior): New function.
10915 (change_inferior_id): New function.
10916 (add_inferior): Removed.
10917 (remove_inferior): New function.
10918 (add_thread): New function.
10919 (free_one_thread): New function.
10920 (remove_thread): New function.
10921 (clear_inferiors): Use for_each_inferior and free_one_thread.
10922 (find_inferior): New function.
10923 (find_inferior_id): New function.
10924 (inferior_target_data): Update argument type.
10925 (set_inferior_target_data): Likewise.
10926 (inferior_regcache_data): Likewise.
10927 (set_inferior_regcache_data): Likewise.
10928 * linux-low.c (linux_bp_reinsert): Remove.
10929 (all_processes, stopping_threads, using_thrads)
10930 (struct pending_signals, debug_threads, pid_of): New.
10931 (inferior_pid): Replace with macro.
10932 (struct inferior_linux_data): Remove.
10933 (get_stop_pc, add_process): New functions.
10934 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10935 Use add_process and add_thread.
10936 (linux_attach_lwp): New function, based on old linux_attach. Use
10937 add_process and add_thread. Set stop_expected for new threads.
10938 (linux_attach): New function.
10939 (linux_kill_one_process): New function.
10940 (linux_kill): Kill all LWPs.
10941 (linux_thread_alive): Use find_inferior_id.
10942 (check_removed_breakpoints, status_pending_p): New functions.
10943 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10944 Update. Use WNOHANG. Wait for cloned processes also. Update process
10945 struct for the found process.
10946 (linux_wait_for_event): New function.
10947 (linux_wait): Use it. Support LWPs.
10948 (send_sigstop, wait_for_sigstop, stop_all_processes)
10949 (linux_resume_one_process, linux_continue_one_process): New functions.
10950 (linux_resume): Support LWPs.
10951 (REGISTER_RAW_SIZE): Remove.
10952 (fetch_register): Use register_size instead. Call supply_register.
10953 (usr_store_inferior_registers): Likewise. Call collect_register.
10954 Fix recursive case.
10955 (regsets_fetch_inferior_registers): Improve error message.
10956 (regsets_store_inferior_registers): Add debugging.
10957 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10958 (unstopped_p, linux_signal_pid): New functions.
10959 (linux_target_ops): Add linux_signal_pid.
10960 (linux_init_signals): New function.
10961 (initialize_low): Call it. Initialize using_threads.
10962 * regcache.c (inferior_regcache_data): Add valid
10963 flag.
10964 (get_regcache): Fetch registers lazily. Add fetch argument
10965 and update all callers.
10966 (regcache_invalidate_one, regcache_invalidate): New
10967 functions.
10968 (new_register_cache): Renamed from create_register_cache.
10969 Return the new regcache.
10970 (free_register_cache): Change argument to a void *.
10971 (registers_to_string, registers_from_string): Call get_regcache
10972 with fetch flag set.
10973 (register_data): Make static. Pass fetch flag to get_regcache.
10974 (supply_register): Call get_regcache with fetch flag clear.
10975 (collect_register): Call get_regcache with fetch flag set.
10976 (collect_register_as_string): New function.
10977 * regcache.h: Update.
10978 * remote-utils.c (putpkt): Flush after debug output and use
10979 stderr.
10980 Handle input interrupts while waiting for an ACK.
10981 (input_interrupt): Use signal_pid method.
10982 (getpkt): Flush after debug output and use stderr.
10983 (outreg): Use collect_register_as_string.
10984 (new_thread_notify, dead_thread_notify): New functions.
10985 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10986 and general_thread.
10987 (look_up_one_symbol): Flush after debug output.
10988 * server.c (step_thread, server_waiting): New variables.
10989 (start_inferior): Don't use signal_pid. Update call to mywait.
10990 (attach_inferior): Update call to mywait.
10991 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10992 (main): Don't fetch/store registers explicitly. Use
10993 set_desired_inferior. Support proposed ``Hs'' packet. Update
10994 calls to mywait.
10995 * server.h: Update.
10996 (struct inferior_list, struct_inferior_list_entry): New.
10997 * target.c (set_desired_inferior): New.
10998 (write_inferior_memory): Constify.
10999 (mywait): New function.
11000 * target.h: Update.
11001 (struct target_ops): New signal_pid method.
11002 (mywait): Removed macro, added prototype.
11003
11004 * linux-low.h (regset_func): Removed.
11005 (regset_fill_func, regset_store_func): New.
11006 (enum regset_type): New.
11007 (struct regset_info): Add type field. Use new operation types.
11008 (struct linux_target_ops): stop_pc renamed to get_pc.
11009 Add decr_pc_after_break and breakpoint_at.
11010 (get_process, get_thread_proess, get_process_thread)
11011 (strut process_info, all_processes, linux_attach_lwp)
11012 (thread_db_init): New.
11013
11014 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11015 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11016 (the_low_target): Add new members.
11017 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11018 (i386_store_fpxregset): Constify.
11019 (target_regsets): Add new kind identifier.
11020 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11021 (i386_set_pc): Add debugging.
11022 (i386_breakpoint_at): New function.
11023 (the_low_target): Add new members.
11024 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11025 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11026 (mips_breakpoint_at): New.
11027 (the_low_target): Add new members.
11028 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11029 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11030 (the_low_target): Add new members.
11031 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11032 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11033 (the_low_target): Add new members.
11034 * linux-x86-64-low.c (target_regsets): Add new kind
11035 identifier.
11036
11037 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11038
11039 From Martin Pool <mbp@samba.org>:
11040 * server.c (gdbserver_usage): New function.
11041 (main): Call it.
11042
11043 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11044
11045 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11046 stop_at -> stop_pc.
11047
11048 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11049
11050 * Makefile.in: Remove obsolete code.
11051
11052 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11053
11054 * linux-low.c (regsets_fetch_inferior_registers),
11055 (regsets_store_inferior_registers): Removed cast to int from
11056 ptrace() calls.
11057 * regcache.h: Added declaration of struct inferior_info.
11058
11059 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11060
11061 * inferiors.c (struct inferior_info): Add regcache_data.
11062 (add_inferior): Call create_register_cache.
11063 (clear_inferiors): Call free_register_cache.
11064 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11065 * regcache.c (struct inferior_regcache_data): New.
11066 (registers): Remove.
11067 (get_regcache): New function.
11068 (create_register_cache, free_register_cache): New functions.
11069 (set_register_cache): Don't initialize the register cache here.
11070 (registers_to_string, registers_from_string, register_data): Call
11071 get_regcache.
11072 * regcache.h: Add prototypes.
11073 * server.h: Likewise.
11074
11075 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11076
11077 * mem-break.c: New file.
11078 * mem-break.h: New file.
11079 * Makefile.in: Add mem-break.o rule; update server.h
11080 dependencies.
11081 * inferiors.c (struct inferior_info): Add target_data
11082 member.
11083 (clear_inferiors): Free target_data member if set.
11084 (inferior_target_data, set_inferior_target_data): New functions.
11085 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11086 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11087 * linux-low.c (linux_bp_reinsert): New variable.
11088 (struct inferior_linux_data): New.
11089 (linux_create_inferior): Use set_inferior_target_data.
11090 (linux_attach): Likewise. Call add_inferior.
11091 (linux_wait_for_one_inferior): New function.
11092 (linux_wait): Call it.
11093 (linux_write_memory): Add const.
11094 (initialize_low): Call set_breakpoint_data.
11095 * linux-low.h (struct linux_target_ops): Add breakpoint
11096 handling members.
11097 * server.c (attach_inferior): Remove extra add_inferior
11098 call.
11099 * server.h: Include mem-break.h. Update inferior.c
11100 prototypes.
11101 * target.c (read_inferior_memory)
11102 (write_inferior_memory): New functions.
11103 * target.h (read_inferior_memory)
11104 (write_inferior_memory): Change macros to prototypes.
11105 (struct target_ops): Update comments. Add const to write_memory
11106 definition.
11107
11108 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11109
11110 * linux-low.c (usr_store_inferior_registers): Support
11111 registers which are allowed to fail to store.
11112 * linux-low.h (linux_target_ops): Likewise.
11113 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11114 (ppc_cannot_store_register): FPSCR may not be storable.
11115
11116 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11117
11118 * server.h: Include <string.h> if HAVE_STRING_H.
11119 * ChangeLog: Correct paths in last ChangeLog entry.
11120
11121 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11122
11123 * linux-low.h: Remove obsolete prototypes.
11124 (struct linux_target_ops): New.
11125 (extern the_low_target): New.
11126 * linux-low.c (num_regs, regmap): Remove declarations.
11127 (register_addr): Use the_low_target explicitly.
11128 (fetch_register): Likewise.
11129 (usr_fetch_inferior_registers): Likewise.
11130 (usr_store_inferior_registers): Likewise.
11131 * linux-arm-low.c (num_regs): Remove.
11132 (arm_num_regs): Define.
11133 (arm_regmap): Renamed from regmap, made static.
11134 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11135 made static.
11136 (arm_cannot_store_register): Renamed from cannot_store_register,
11137 made static.
11138 (the_low_target): New.
11139 * linux-i386-low.c (num_regs): Remove.
11140 (i386_num_regs): Define.
11141 (i386_regmap): Renamed from regmap, made static.
11142 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11143 made static.
11144 (i386_cannot_store_register): Renamed from cannot_store_register,
11145 made static.
11146 (the_low_target): New.
11147 * linux-ia64-low.c (num_regs): Remove.
11148 (ia64_num_regs): Define.
11149 (ia64_regmap): Renamed from regmap, made static.
11150 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11151 made static.
11152 (ia64_cannot_store_register): Renamed from cannot_store_register,
11153 made static.
11154 (the_low_target): New.
11155 * linux-m68k-low.c (num_regs): Remove.
11156 (m68k_num_regs): Define.
11157 (m68k_regmap): Renamed from regmap, made static.
11158 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11159 made static.
11160 (m68k_cannot_store_register): Renamed from cannot_store_register,
11161 made static.
11162 (the_low_target): New.
11163 * linux-mips-low.c (num_regs): Remove.
11164 (mips_num_regs): Define.
11165 (mips_regmap): Renamed from regmap, made static.
11166 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11167 made static.
11168 (mips_cannot_store_register): Renamed from cannot_store_register,
11169 made static.
11170 (the_low_target): New.
11171 * linux-ppc-low.c (num_regs): Remove.
11172 (ppc_num_regs): Define.
11173 (ppc_regmap): Renamed from regmap, made static.
11174 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11175 made static.
11176 (ppc_cannot_store_register): Renamed from cannot_store_register,
11177 made static.
11178 (the_low_target): New.
11179 * linux-s390-low.c (num_regs): Remove.
11180 (s390_num_regs): Define.
11181 (s390_regmap): Renamed from regmap, made static.
11182 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11183 made static.
11184 (s390_cannot_store_register): Renamed from cannot_store_register,
11185 made static.
11186 (the_low_target): New.
11187 * linux-sh-low.c (num_regs): Remove.
11188 (sh_num_regs): Define.
11189 (sh_regmap): Renamed from regmap, made static.
11190 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11191 made static.
11192 (sh_cannot_store_register): Renamed from cannot_store_register,
11193 made static.
11194 (the_low_target): New.
11195 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11196 (the_low_target): New.
11197
11198 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11199
11200 * Makefile.in: Add stamp-h target.
11201 * configure.in: Create stamp-h.
11202 * configure: Regenerated.
11203
11204 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11205
11206 * inferiors.c: New file.
11207 * target.c: New file.
11208 * target.h: New file.
11209 * Makefile.in: Add target.o and inferiors.o. Update
11210 dependencies.
11211 * linux-low.c (inferior_pid): New static variable,
11212 moved from server.c.
11213 (linux_create_inferior): Renamed from create_inferior.
11214 Call add_inferior. Return 0 on success instead of a PID.
11215 (linux_attach): Renamed from myattach.
11216 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11217 (linux_thread_alive): Renamed from mythread_alive.
11218 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11219 child dies.
11220 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11221 (regsets_store_inferior_registers): Correct error message.
11222 Add missing ``return 0''.
11223 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11224 (linux_store_registers): Renamed from store_inferior_registers.
11225 (linux_read_memory): Renamed from read_inferior_memory.
11226 (linux_write_memory): Renamed from write_inferior_memory.
11227 (linux_target_ops): New structure.
11228 (initialize_low): Call set_target_ops ().
11229 * remote-utils.c (unhexify): New function.
11230 (hexify): New function.
11231 (input_interrupt): Send signals to ``signal_pid''.
11232 * server.c (inferior_pid): Remove.
11233 (start_inferior): Update create_inferior call.
11234 (attach_inferior): Call add_inferior.
11235 (handle_query): New function.
11236 (main): Call handle_query for `q' packets.
11237 * server.h: Include "target.h". Remove obsolete prototypes.
11238 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11239
11240 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11241
11242 * Makefile.in: Add WARN_CFLAGS. Update configury
11243 dependencies.
11244 * configure.in: Check for <string.h>
11245 * configure: Regenerate.
11246 * config.in: Regenerate.
11247 * gdbreplay.c: Include needed system headers.
11248 (remote_open): Remove strchr prototype.
11249 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11250 * regcache.c (supply_register): Change buf argument to const void *.
11251 (supply_register_by_name): Likewise.
11252 (collect_register): Change buf argument to void *.
11253 (collect_register_by_name): Likewise.
11254 * regcache.h: Add missing prototypes.
11255 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11256 * server.c (handle_query): New function.
11257 (attached): New static variable, moved out of main.
11258 (main): Quiet longjmp clobber warnings.
11259 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11260 * utils.c (error): Remove NORETURN.
11261 (fatal): Likewise.
This page took 0.268548 seconds and 4 git commands to generate.