gdbserver: fix uClibc build whithout MMU.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2
3 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4
5 2015-04-09 Gary Benson <gbenson@redhat.com>
6
7 * hostio-errno.c (errno_to_fileio_error): Remove function.
8 Update caller to use remote_fileio_to_fio_error.
9
10 2015-04-09 Yao Qi <yao.qi@linaro.org>
11
12 * linux-low.c (linux_insert_point): Call
13 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
14 (linux_remove_point): Call remove_memory_breakpoint if type is
15 raw_bkpt_type_sw.
16 * linux-x86-low.c (x86_insert_point): Don't call
17 insert_memory_breakpoint.
18 (x86_remove_point): Don't call remove_memory_breakpoint.
19
20 2015-04-01 Pedro Alves <palves@redhat.com>
21 Cleber Rosa <crosa@redhat.com>
22
23 * server.c (gdbserver_usage): Reorganize and extend the usage
24 message.
25
26 2015-03-24 Pedro Alves <palves@redhat.com>
27
28 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
29 output. Also dump TRAP_TRACE.
30 (linux_low_filter_event): In debug output, distinguish a
31 resume_stop SIGSTOP from a delayed SIGSTOP.
32
33 2015-03-24 Gary Benson <gbenson@redhat.com>
34
35 * linux-x86-low.c (x86_linux_new_thread): Moved to
36 nat/x86-linux.c.
37 (x86_linux_prepare_to_resume): Likewise.
38
39 2015-03-24 Gary Benson <gbenson@redhat.com>
40
41 * Makefile.in (x86-linux-dregs.o): New rule.
42 * configure.srv: Add x86-linux-dregs.o to relevant targets.
43 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
44 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
45 (x86_linux_dr_get): Likewise.
46 (x86_linux_dr_set): Likewise.
47 (update_debug_registers_callback): Likewise.
48 (x86_linux_dr_set_addr): Likewise.
49 (x86_linux_dr_get_addr): Likewise.
50 (x86_linux_dr_set_control): Likewise.
51 (x86_linux_dr_get_control): Likewise.
52 (x86_linux_dr_get_status): Likewise.
53 (x86_linux_update_debug_registers): Likewise.
54
55 2015-03-24 Gary Benson <gbenson@redhat.com>
56
57 * linux-x86-low.c (x86_linux_update_debug_registers):
58 New function, factored out from...
59 (x86_linux_prepare_to_resume): ...this.
60
61 2015-03-24 Gary Benson <gbenson@redhat.com>
62
63 * linux-x86-low.c (x86_linux_dr_get): Update comments.
64 (x86_linux_dr_set): Likewise.
65 (update_debug_registers_callback): Likewise.
66 (x86_linux_dr_set_addr): Likewise.
67 (x86_linux_dr_get_addr): Likewise.
68 (x86_linux_dr_set_control): Likewise.
69 (x86_linux_dr_get_control): Likewise.
70 (x86_linux_dr_get_status): Likewise.
71 (x86_linux_prepare_to_resume): Likewise.
72
73 2015-03-24 Gary Benson <gbenson@redhat.com>
74
75 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
76 Use perror_with_name. Pass string through gettext.
77 (x86_linux_dr_set): Likewise.
78
79 2015-03-24 Gary Benson <gbenson@redhat.com>
80
81 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
82 (x86_linux_dr_set_addr): ...this.
83 (x86_dr_low_get_addr): Rename to...
84 (x86_linux_dr_get_addr): ...this.
85 (x86_dr_low_set_control): Rename to...
86 (x86_linux_dr_set_control): ...this.
87 (x86_dr_low_get_control): Rename to...
88 (x86_linux_dr_get_control): ...this.
89 (x86_dr_low_get_status): Rename to...
90 (x86_linux_dr_get_status): ...this.
91 (x86_dr_low): Update with new function names.
92
93 2015-03-24 Gary Benson <gbenson@redhat.com>
94
95 * Makefile.in (x86-linux.o): New rule.
96 * configure.srv: Add x86-linux.o to relevant targets.
97 * linux-low.c (lwp_set_arch_private_info): New function.
98 (lwp_arch_private_info): Likewise.
99 * linux-x86-low.c: Include nat/x86-linux.h.
100 (arch_lwp_info): Removed structure.
101 (update_debug_registers_callback):
102 Use lwp_set_debug_registers_changed.
103 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
104 and lwp_set_debug_registers_changed.
105 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
106
107 2015-03-24 Gary Benson <gbenson@redhat.com>
108
109 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
110 * linux-arm-low.c (arm_new_thread): Likewise.
111 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
112 * linux-mips-low.c (mips_linux_new_thread): Likewise.
113 * linux-x86-low.c (x86_linux_new_thread): Likewise.
114 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
115
116 2015-03-24 Gary Benson <gbenson@redhat.com>
117
118 * linux-low.c (ptid_of_lwp): New function.
119 (lwp_is_stopped): Likewise.
120 (lwp_stop_reason): Likewise.
121 * linux-x86-low.c (update_debug_registers_callback):
122 Use lwp_is_stopped.
123 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
124 lwp_stop_reason.
125
126 2015-03-24 Gary Benson <gbenson@redhat.com>
127
128 * linux-low.h (linux_stop_lwp): Remove declaration.
129
130 2015-03-24 Gary Benson <gbenson@redhat.com>
131
132 * linux-low.h: Include nat/linux-nat.h.
133 * linux-low.c (iterate_over_lwps_args): New structure.
134 (iterate_over_lwps_filter): New function.
135 (iterate_over_lwps): Likewise.
136 * linux-x86-low.c (update_debug_registers_callback):
137 Update signature to what iterate_over_lwps expects.
138 Remove PID check that iterate_over_lwps now performs.
139 (x86_dr_low_set_addr): Use iterate_over_lwps.
140 (x86_dr_low_set_control): Likewise.
141
142 2015-03-24 Gary Benson <gbenson@redhat.com>
143
144 * linux-x86-low.c (x86_debug_reg_state): New function.
145 (x86_linux_prepare_to_resume): Use the above.
146
147 2015-03-24 Gary Benson <gbenson@redhat.com>
148
149 * linux-low.c (current_lwp_ptid): New function.
150 * linux-x86-low.c: Include nat/linux-nat.h.
151 (x86_dr_low_get_addr): Use current_lwp_ptid.
152 (x86_dr_low_get_control): Likewise.
153 (x86_dr_low_get_status): Likewise.
154
155 2015-03-20 Pedro Alves <palves@redhat.com>
156
157 * tracepoint.c (cmd_qtstatus): Make "str" const.
158
159 2015-03-20 Pedro Alves <palves@redhat.com>
160
161 * server.c (handle_general_set): Make "req_str" const.
162
163 2015-03-19 Pedro Alves <palves@redhat.com>
164
165 * linux-low.c (linux_resume_one_lwp): Rename to ...
166 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
167 instead call perror_with_name.
168 (check_ptrace_stopped_lwp_gone): New function.
169 (linux_resume_one_lwp): Reimplement as wrapper around
170 linux_resume_one_lwp_throw that swallows errors if the LWP is
171 gone.
172
173 2015-03-19 Pedro Alves <palves@redhat.com>
174
175 * linux-low.c (count_events_callback, select_event_lwp_callback):
176 No longer check whether the thread has resume_stop as last resume
177 kind.
178
179 2015-03-19 Pedro Alves <palves@redhat.com>
180
181 * linux-low.c (count_events_callback, select_event_lwp_callback):
182 Use the lwp's status_pending_p field, not the thread's.
183
184 2015-03-19 Pedro Alves <palves@redhat.com>
185
186 * linux-low.c (select_event_lwp_callback): Update comments to
187 no longer mention SIGTRAP.
188
189 2015-03-18 Gary Benson <gbenson@redhat.com>
190
191 * server.c (handle_query): Do not report vFile:fstat as supported.
192
193 2015-03-11 Gary Benson <gbenson@redhat.com>
194
195 * hostio.c (sys/types.h): New include.
196 (sys/stat.h): Likewise.
197 (common-remote-fileio.h): Likewise.
198 (handle_fstat): New function.
199 (handle_vFile): Handle vFile:fstat packets.
200
201 2015-03-11 Gary Benson <gbenson@redhat.com>
202
203 * configure.ac (AC_CHECK_MEMBERS): Add checks for
204 struct stat.st_blocks and struct stat.st_blksize.
205 * configure: Regenerate.
206 * config.in: Likewise.
207 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
208 (OBS): Add common-remote-fileio.o.
209 (common-remote-fileio.o): New rule.
210
211 2015-03-09 Pedro Alves <palves@redhat.com>
212
213 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
214 'struct sockaddr' pointer in 'accept' call.
215
216 2015-03-09 Pedro Alves <palves@redhat.com>
217
218 Revert:
219 2015-03-07 Pedro Alves <palves@redhat.com>
220 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
221 or <winsock2.h> here. Instead include "gdb_socket.h".
222 (remote_open): Use union gdb_sockaddr_u.
223 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
224 or <winsock2.h> here. Instead include "gdb_socket.h".
225 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
226 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
227 or <sys/un.h>.
228 (init_named_socket, gdb_agent_helper_thread): Use union
229 gdb_sockaddr_u.
230
231 2015-03-07 Pedro Alves <palves@redhat.com>
232
233 * configure.ac (build_warnings): Move
234 -Wdeclaration-after-statement to the C-specific set.
235 * configure: Regenerate.
236
237 2015-03-07 Pedro Alves <palves@redhat.com>
238
239 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
240 or <winsock2.h> here. Instead include "gdb_socket.h".
241 (remote_open): Use union gdb_sockaddr_u.
242 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
243 or <winsock2.h> here. Instead include "gdb_socket.h".
244 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
245 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
246 or <sys/un.h>.
247 (init_named_socket, gdb_agent_helper_thread): Use union
248 gdb_sockaddr_u.
249
250 2015-03-07 Pedro Alves <palves@redhat.com>
251
252 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
253 instead.
254
255 2015-03-06 Yao Qi <yao.qi@linaro.org>
256
257 * linux-aarch64-low.c (aarch64_insert_point): Use
258 show_debug_regs as a boolean.
259 (aarch64_remove_point): Likewise.
260
261 2015-03-05 Pedro Alves <palves@redhat.com>
262
263 * lynx-low.c (lynx_target_ops): Install NULL hooks for
264 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
265 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
266 * nto-low.c (nto_target_ops): Likewise.
267 * spu-low.c (spu_target_ops): Likewise.
268 * win32-low.c (win32_target_ops): Likewise.
269
270 2015-03-04 Pedro Alves <palves@redhat.com>
271
272 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
273 Decide whether a breakpoint triggered based on the SIGTRAP's
274 siginfo.si_code.
275 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
276 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
277 (linux_low_filter_event): Check for breakpoints before checking
278 watchpoints.
279 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
280 siginfo.si_code.
281 (linux_stopped_by_sw_breakpoint)
282 (linux_supports_stopped_by_sw_breakpoint)
283 (linux_stopped_by_hw_breakpoint)
284 (linux_supports_stopped_by_hw_breakpoint): New functions.
285 (linux_target_ops): Install new target methods.
286
287 2015-03-04 Pedro Alves <palves@redhat.com>
288
289 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
290 * server.c (swbreak_feature, hwbreak_feature): New globals.
291 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
292 (captured_main): Clear swbreak_feature and hwbreak_feature.
293 * server.h (swbreak_feature, hwbreak_feature): Declare.
294 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
295 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
296 supports_stopped_by_hw_breakpoint>: New fields.
297 (target_supports_stopped_by_sw_breakpoint)
298 (target_stopped_by_sw_breakpoint)
299 (target_supports_stopped_by_hw_breakpoint)
300 (target_stopped_by_hw_breakpoint): Declare.
301
302 2015-03-04 Pedro Alves <palves@redhat.com>
303
304 enum lwp_stop_reason -> enum target_stop_reason
305 * linux-low.c (check_stopped_by_breakpoint): Adjust.
306 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
307 (linux_wait_1, stuck_in_jump_pad_callback)
308 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
309 (linux_stopped_by_watchpoint):
310 * linux-low.h (enum lwp_stop_reason): Delete.
311 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
312 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
313
314 2015-03-04 Yao Qi <yao.qi@linaro.org>
315
316 * Makefile.in (SFILES): Add linux-aarch64-low.c.
317
318 2015-03-03 Gary Benson <gbenson@redhat.com>
319
320 * hostio.c (handle_vFile): Fix prefix lengths.
321
322 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
323
324 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
325 ptr_bits.
326
327 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
328
329 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
330 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
331 (clean): Add "rm -f" for above C files.
332 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
333 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
334 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
335 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
336 * linux-s390-low.c (HWCAP_S390_VX): New macro.
337 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
338 (init_registers_s390x_vx_linux64)
339 (init_registers_s390x_tevx_linux64)
340 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
341 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
342 declarations.
343 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
344 (s390_store_vxrs_high): New functions.
345 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
346 NT_S390_VXRS_HIGH.
347 (s390_arch_setup): Add logic for selecting one of the new target
348 descriptions. Activate the new vector regsets if applicable.
349 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
350 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
351 and init_registers_s390x_tevx_linux64.
352
353 2015-03-01 Pedro Alves <palves@redhat.com>
354
355 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
356 parameter.
357
358 2015-02-27 Pedro Alves <palves@redhat.com>
359
360 * linux-x86-low.c (u_debugreg_offset): New function.
361 (x86_linux_dr_get, x86_linux_dr_set): Use it.
362
363 2015-02-27 Pedro Alves <palves@redhat.com>
364
365 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
366 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
367 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
368 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
369 (ps_lsetfpregs, ps_getpid)
370 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
371 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
372 (ps_lsetxregs, ps_plog): Declare.
373
374 2015-02-27 Pedro Alves <palves@redhat.com>
375
376 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
377 IP_AGENT_EXPORT_FUNC.
378 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
379 IP_AGENT_EXPORT_FUNC.
380 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
381 (IP_AGENT_EXPORT): Delete.
382 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
383 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
384 (gdb_trampoline_buffer_error, collecting, gdb_collect)
385 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
386 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
387 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
388 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
389 (traceframe_read_count, traceframe_write_count)
390 (traceframes_created, trace_state_variables, get_raw_reg)
391 (get_trace_state_variable_value, set_trace_state_variable_value)
392 (ust_loaded, helper_thread_id, cmd_buf): Use
393 IPA_SYM_EXPORTED_NAME.
394 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
395 (tracepoints) Use IP_AGENT_EXPORT_VAR.
396 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
397 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
398 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
399 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
400 EXTERN_C_PUSH/EXTERN_C_POP.
401 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
402 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
403 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
404 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
405 (traceframe_write_count, traceframe_read_count)
406 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
407 (about_to_request_buffer_space, get_trace_state_variable_value)
408 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
409 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
410 EXTERN_C_PUSH/EXTERN_C_POP.
411 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
412 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
413 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
414 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
415 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
416 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
417 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
418 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
419 Define.
420 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
421 (IP_AGENT_EXPORT_VAR_DECL): Define.
422 (tracing): Declare.
423 (gdb_agent_get_raw_reg): Declare.
424
425 2015-02-27 Tom Tromey <tromey@redhat.com>
426 Pedro Alves <palves@redhat.com>
427
428 Rename symbols whose names are reserved C++ keywords throughout.
429
430 2015-02-27 Pedro Alves <palves@redhat.com>
431
432 * Makefile.in (COMPILER): New, get it from autoconf.
433 (CXX): Get from autoconf instead.
434 (COMPILE.pre): Use COMPILER.
435 (CC-LD): Rename to ...
436 (CC_LD): ... this. Use COMPILER.
437 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
438 (CXX_FOR_TARGET): Default to g++ instead of gcc.
439 * acinclude.m4: Include build-with-cxx.m4.
440 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
441 Disable -Werror by default if building in C++ mode.
442 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
443 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
444 the C++ compiler. Save/restore CXXFLAGS too.
445 * configure: Regenerate.
446
447 2015-02-27 Pedro Alves <palves@redhat.com>
448
449 * acinclude.m4: Include libiberty.m4.
450 * configure.ac: Call libiberty_INIT.
451 * config.in, configure: Regenerate.
452
453 2015-02-26 Pedro Alves <palves@redhat.com>
454
455 * linux-low.c (linux_wait_1): When incrementing the PC past a
456 program breakpoint always use the_low_target.breakpoint_len as
457 increment, rather than the maximum between that and
458 the_low_target.decr_pc_after_break.
459
460 2015-02-23 Pedro Alves <palves@redhat.com>
461
462 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
463 thread was doing a step-over; always adjust the PC if
464 we stepped over a permanent breakpoint.
465 (linux_wait_1): If we stepped over breakpoint that was on top of a
466 permanent breakpoint, manually advance the PC past it.
467
468 2015-02-23 Pedro Alves <palves@redhat.com>
469
470 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
471 modes.
472 (x86_fill_gregset, x86_store_gregset): Use it when handling
473 $orig_eax.
474
475 2015-02-20 Pedro Alves <palves@redhat.com>
476
477 * thread-db.c: Include "nat/linux-procfs.h".
478 (thread_db_init): Skip listing new threads if the kernel supports
479 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
480
481 2015-02-20 Pedro Alves <palves@redhat.com>
482
483 * linux-low.c (status_pending_p_callback): Use ptid_match.
484
485 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
486
487 PR breakpoints/16812
488 * linux-low.c (wstatus_maybe_breakpoint): Remove.
489 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
490 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
491
492 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
493
494 PR breakpoints/15956
495 * tracepoint.c (cmd_qtinit): Add check for current_thread.
496
497 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
498
499 * linux-low.c (linux_low_btrace_conf): Print size.
500 * server.c (handle_btrace_conf_general_set): New.
501 (hanle_general_set): Call handle_btrace_conf_general_set.
502 (handle_query): Report Qbtrace-conf:bts:size as supported.
503
504 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
505
506 * linux-low.c (linux_low_enable_btrace): Update parameters.
507 (linux_low_btrace_conf): New.
508 (linux_target_ops)<to_btrace_conf>: Initialize.
509 * server.c (current_btrace_conf): New.
510 (handle_btrace_enable): Rename to ...
511 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
512 to target_enable_btrace. Update comment. Update users.
513 (handle_qxfer_btrace_conf): New.
514 (qxfer_packets): Add btrace-conf entry.
515 (handle_query): Report qXfer:btrace-conf:read as supported packet.
516 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
517 (target_ops)<read_btrace_conf>: New.
518 (target_enable_btrace): Update parameters.
519 (target_read_btrace_conf): New.
520
521 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
522
523 * server.c (handle_btrace_general_set): Remove call to
524 target_supports_btrace.
525 (supported_btrace_packets): New.
526 (handle_query): Call supported_btrace_packets.
527 * target.h: include btrace-common.h.
528 (btrace_target_info): Removed.
529 (supports_btrace, target_supports_btrace): Update parameters.
530
531 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
532
533 * Makefile.in (SFILES): Add common/btrace-common.c.
534 (OBS): Add common/btrace-common.o.
535 (btrace-common.o): Add build rules.
536 * linux-low: Include btrace-common.h.
537 (linux_low_read_btrace): Use struct btrace_data. Call
538 btrace_data_init and btrace_data_fini.
539
540 2015-02-06 Pedro Alves <palves@redhat.com>
541
542 * thread-db.c (find_new_threads_callback): Add debug output.
543
544 2015-02-04 Pedro Alves <palves@redhat.com>
545
546 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
547 (resume_stopped_resumed_lwps): New function.
548 (linux_wait_for_event_filtered): Use it.
549
550 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
551
552 * Makefile.in (SFILES): Add linux-personality.c.
553 (linux-personality.o): New rule.
554 * configure.srv (srv_linux_obj): Add linux-personality.o to the
555 list of objects to be built.
556 * linux-low.c: Include nat/linux-personality.h.
557 (linux_create_inferior): Remove code to disable address space
558 randomization (moved to ../nat/linux-personality.c). Create
559 cleanup to disable address space randomization.
560
561 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
562
563 * Makefile.in (posix-strerror.o): New rule.
564 (mingw-strerror.o): Likewise.
565 * configure: Regenerated.
566 * configure.ac: Source file ../common/common.host. Initialize new
567 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
568
569 2015-01-14 Yao Qi <yao@codesourcery.com>
570
571 * Makefile.in (SFILES): Add nat/ppc-linux.c.
572 (ppc-linux.o): New rule.
573 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
574 * configure.ac: AC_CHECK_FUNCS(getauxval).
575 * config.in: Re-generated.
576 * configure: Re-generated.
577 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
578 ppc64_64bit_inferior_p
579
580 2015-01-14 Yao Qi <yao@codesourcery.com>
581
582 * linux-ppc-low.c: Include "nat/ppc-linux.h".
583 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
584 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
585 (PT_ORIG_R3, PT_TRAP): Likewise.
586 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
587 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
588 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
589
590 2015-01-10 Joel Brobecker <brobecker@adacore.com>
591
592 * i387-fp.c (i387_cache_to_xsave): In look over
593 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
594 zmmh_low_space field by use of zmmh_high_space.
595
596 2015-01-09 Pedro Alves <palves@redhat.com>
597
598 * linux-low.c (step_over_bkpt): Move higher up in the file.
599 (handle_extended_wait): Don't store the stop_pc here.
600 (get_stop_pc): Adjust comments and rename to ...
601 (check_stopped_by_breakpoint): ... this. Record whether the LWP
602 stopped for a software breakpoint or hardware breakpoint.
603 (thread_still_has_status_pending_p): New function.
604 (status_pending_p_callback): Use
605 thread_still_has_status_pending_p. If the event is no longer
606 interesting, resume the LWP.
607 (handle_tracepoints): Add assert.
608 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
609 (wstatus_maybe_breakpoint): New function.
610 (cancel_breakpoint): Delete function.
611 (check_stopped_by_watchpoint): New function, factored out from
612 linux_low_filter_event.
613 (lp_status_maybe_breakpoint): Delete function.
614 (linux_low_filter_event): Remove filter_ptid argument.
615 Leave thread group exits pending here. Store the LWP's stop PC.
616 Always leave events pending.
617 (linux_wait_for_event_filtered): Pull all events out of the
618 kernel, and leave them all pending.
619 (count_events_callback, select_event_lwp_callback): Consider all
620 events.
621 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
622 (select_event_lwp): Only give preference to the stepping LWP in
623 all-stop mode. Adjust comments.
624 (ignore_event): New function.
625 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
626 references to cancel_breakpoints. Adjust to renames. Also give
627 equal priority to all LWPs that have had events in non-stop mode.
628 If reporting a software breakpoint event, unadjust the LWP's PC.
629 (linux_wait): If linux_wait_1 returned an ignored event, retry.
630 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
631 Adjust.
632 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
633 (resume_status_pending_p): Use thread_still_has_status_pending_p.
634 (linux_stopped_by_watchpoint): Adjust.
635 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
636 * linux-low.h (enum lwp_stop_reason): New.
637 (struct lwp_info) <stop_pc>: Adjust comment.
638 <stopped_by_watchpoint>: Delete field.
639 <stop_reason>: New field.
640 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
641 * mem-break.c (software_breakpoint_inserted_here)
642 (hardware_breakpoint_inserted_here): New function.
643 * mem-break.h (software_breakpoint_inserted_here)
644 (hardware_breakpoint_inserted_here): Declare.
645 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
646 (cancel_breakpoints): Delete.
647 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
648 (upload_fast_traceframes): Remove references to
649 cancel_breakpoints.
650
651 2015-01-09 Pedro Alves <palves@redhat.com>
652
653 * thread-db.c (find_new_threads_callback): Ignore thread if the
654 kernel thread ID is -1.
655
656 2015-01-09 Pedro Alves <palves@redhat.com>
657
658 * linux-low.c (linux_attach_fail_reason_string): Move to
659 nat/linux-ptrace.c, and rename.
660 (linux_attach_lwp): Update comment.
661 (attach_proc_task_lwp_callback): New function.
662 (linux_attach): Adjust to rename and use
663 linux_proc_attach_tgid_threads.
664 (linux_attach_fail_reason_string): Delete declaration.
665
666 2015-01-01 Joel Brobecker <brobecker@adacore.com>
667
668 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
669 * server.c (gdbserver_version): Likewise.
670
671 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
672
673 * remote-utils.c: Include ctype.h.
674 (input_interrupt): Explicitly handle the case when the char
675 received is the NUL byte. Improve the printing of non-ASCII
676 characters.
677
678 2014-12-16 Joel Brobecker <brobecker@adacore.com>
679
680 * linux-low.c (linux_low_filter_event): Update call to
681 linux_enable_event_reporting following the addition of
682 a new parameter to that function.
683
684 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
685
686 PR server/17457
687 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
688 (AARCH64_FPCR_REGNO): Likewise.
689 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
690 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
691 (aarch64_store_fpregset): Likewise.
692
693 2014-12-15 Joel Brobecker <brobecker@adacore.com>
694
695 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
696 Remove FIXME comment about assumption about N.
697
698 2014-12-13 Joel Brobecker <brobecker@adacore.com>
699
700 * configure.ac: If large-file support is disabled in GDBserver,
701 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
702 * configure: Regenerate.
703
704 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
705
706 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
707 warning upon ENODATA from ptrace.
708 * linux-s390-low.c (s390_store_tdb): New.
709 (s390_regsets): Add regset for NT_S390_TDB.
710
711 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
712
713 * linux-low.c (regsets_store_inferior_registers): Skip regsets
714 without a fill_function.
715 * linux-s390-low.c (s390_fill_last_break): Remove.
716 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
717 (s390_arch_setup): Use regset's size instead of fill_function for
718 loop end condition.
719
720 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
721
722 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
723 the regset's store function when ptrace returned an error.
724 * regcache.c (get_thread_regcache): Invalidate register cache
725 before fetching inferior's registers.
726
727 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
728
729 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
730 while-loop as for-loop.
731 (regsets_store_inferior_registers): Likewise.
732
733 2014-11-28 Yao Qi <yao@codesourcery.com>
734
735 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
736 * config.in, configure: Re-generate.
737 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
738 is defined.
739
740 2014-11-21 Yao Qi <yao@codesourcery.com>
741
742 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
743 (AC_CHECK_HEADERS): Remove malloc.h.
744 * configure: Re-generated.
745 * config.in: Re-generated.
746 * server.h: Don't include alloca.h and malloc.h.
747 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
748 Don't include malloc.h.
749
750 2014-11-17 Joel Brobecker <brobecker@adacore.com>
751
752 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
753 corresponding ERRNO check in same block.
754
755 2014-11-12 Pedro Alves <palves@redhat.com>
756
757 * server.c (cont_thread): Update comment.
758 (start_inferior, attach_inferior): No longer clear cont_thread.
759 (handle_v_cont): No longer set cont_thread.
760 (captured_main): Clear cont_thread each time a GDB connects.
761
762 2014-11-12 Pedro Alves <palves@redhat.com>
763
764 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
765 thread, and don't resume all threads if the Hc thread has exited.
766
767 2014-11-12 Pedro Alves <palves@redhat.com>
768
769 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
770 the process group instead of to a specific LWP.
771
772 2014-10-15 Pedro Alves <palves@redhat.com>
773
774 PR server/17487
775 * win32-arm-low.c (arm_set_thread_context): Remove current_event
776 parameter.
777 (arm_set_thread_context): Delete.
778 (the_low_target): Adjust.
779 * win32-i386-low.c (debug_registers_changed)
780 (debug_registers_used): Delete.
781 (update_debug_registers_callback): New function.
782 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
783 needing to update their debug registers.
784 (win32_get_current_dr): New function.
785 (x86_dr_low_get_addr, x86_dr_low_get_control)
786 (x86_dr_low_get_status): Fetch the debug register from the thread
787 record's context.
788 (i386_initial_stuff): Adjust.
789 (i386_get_thread_context): Remove current_event parameter. Don't
790 clear debug_registers_changed nor copy DR values to
791 debug_reg_state.
792 (i386_set_thread_context): Delete.
793 (i386_prepare_to_resume): New function.
794 (i386_thread_added): Mark the thread as needing to update irs
795 debug registers.
796 (the_low_target): Remove i386_set_thread_context and install
797 i386_prepare_to_resume.
798 * win32-low.c (win32_get_thread_context): Adjust.
799 (win32_set_thread_context): Use SetThreadContext
800 directly.
801 (win32_prepare_to_resume): New function.
802 (win32_require_context): New function, factored out from ...
803 (thread_rec): ... this.
804 (continue_one_thread): Call win32_prepare_to_resume on each thread
805 we're about to continue.
806 (win32_resume): Call win32_prepare_to_resume on the event thread.
807 * win32-low.h (struct win32_thread_info)
808 <debug_registers_changed>: New field.
809 (struct win32_target_ops): Change prototype of set_thread_context,
810 delete set_thread_context and add prepare_to_resume.
811 (win32_require_context): New declaration.
812
813 2014-10-08 Gary Benson <gbenson@redhat.com>
814
815 * server.h: Do not include common-exceptions.h.
816
817 2014-10-08 Gary Benson <gbenson@redhat.com>
818
819 * server.h: Do not include cleanups.h.
820
821 2014-09-30 James Hogan <james.hogan@imgtec.com>
822
823 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
824 mips64-dsp-linux.c.
825
826 2014-09-23 Yao Qi <yao@codesourcery.com>
827
828 * linux-low.c (lp_status_maybe_breakpoint): New function.
829 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
830 (count_events_callback): Likewise.
831 (select_event_lwp_callback): Likewise.
832 (cancel_breakpoints_callback): Likewise.
833
834 2014-09-19 Don Breazeal <donb@codesourcery.com>
835
836 * linux-low.c (handle_extended_wait): Call
837 linux_ptrace_get_extended_event.
838 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
839 linux_is_extended_waitstatus.
840
841 2014-09-16 Joel Brobecker <brobecker@adacore.com>
842
843 * Makefile.in (CPPFLAGS): Define.
844 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
845 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
846
847 2014-09-16 Gary Benson <gbenson@redhat.com>
848
849 * inferiors.h (current_inferior): Renamed as...
850 (current_thread): New variable. All uses updated.
851 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
852 (maybe_move_out_of_jump_pad): Likewise.
853 (cancel_breakpoint): Likewise.
854 (linux_low_filter_event): Likewise.
855 (wait_for_sigstop): Likewise.
856 (linux_resume_one_lwp): Likewise.
857 (need_step_over_p): Likewise.
858 (start_step_over): Likewise.
859 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
860 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
861 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
862 and save_inferior as saved_thread.
863 * regcache.c (get_thread_regcache): Renamed saved_inferior as
864 saved_thread.
865 (regcache_invalidate_thread): Likewise.
866 * remote-utils.c (prepare_resume_reply): Likewise.
867 * thread-db.c (thread_db_get_tls_address): Likewise.
868 (disable_thread_event_reporting): Likewise.
869 (remove_thread_event_breakpoints): Likewise.
870 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
871 as saved_thread.
872 * target.h (set_desired_inferior): Renamed as...
873 (set_desired_thread): New declaration. All uses updated.
874 * server.c (myresume): Updated comment to reference thread instead
875 of inferior.
876 (handle_serial_event): Likewise.
877 (handle_target_event): Likewise.
878
879 2014-09-12 Tom Tromey <tromey@redhat.com>
880 Gary Benson <gbenson@redhat.com>
881
882 * regcache.h: Include common-regcache.h.
883 (regcache_read_pc): Don't declare.
884 * regcache.c (get_thread_regcache_for_ptid): New function.
885
886 2014-09-11 Tom Tromey <tromey@redhat.com>
887 Gary Benson <gbenson@redhat.com>
888
889 * symbol.c: New file.
890 * Makefile.in (SFILES): Add symbol.c.
891 (OBS): Add symbol.o.
892
893 2014-09-11 Gary Benson <gbenson@redhat.com>
894
895 * target.c (target_stop_ptid, target_continue_ptid): New
896 functions.
897
898 2014-09-11 Tom Tromey <tromey@redhat.com>
899 Gary Benson <gbenson@redhat.com>
900
901 * target.h: Include target/target.h.
902 * target.c (target_read_memory, target_read_uint32)
903 (target_write_memory): New functions.
904
905 2014-09-11 Gary Benson <gbenson@redhat.com>
906
907 * server.h (debug_hw_points): Don't declare.
908 * server.c (debug_hw_points): Don't define. Replace all uses
909 with show_debug_regs.
910 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
911 all uses with show_debug_regs.
912
913 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
914
915 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
916 endianness into account.
917 (ppc_supply_ptrace_register): Likewise.
918
919 2014-09-03 James Hogan <james.hogan@imgtec.com>
920
921 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
922 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
923
924 2014-09-03 Gary Benson <gbenson@redhat.com>
925
926 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
927 ALL_DEBUG_ADDRESS_REGISTERS.
928
929 2014-09-02 Gary Benson <gbenson@redhat.com>
930
931 * i386-low.h: Renamed as...
932 * x86-low.h: New file. All type, function and variable name
933 prefixes changed from "i386_" to "x86_". All references updated.
934 * i386-low.c: Renamed as...
935 * x86-low.c: New file. All type, function and variable name
936 prefixes changed from "i386_" to "x86_". All references updated.
937
938 2014-09-02 Gary Benson <gbenson@redhat.com>
939
940 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
941 (x86_linux_new_thread): Likewise.
942
943 2014-08-29 Gary Benson <gbenson@redhat.com>
944
945 * server.h (setjmp.h): Do not include.
946 (toplevel): Do not declare.
947 (common-exceptions.h): Include.
948 (cleanups.h): Likewise.
949 * server.c (toplevel): Do not define.
950 (exit_code): New static global.
951 (detach_or_kill_for_exit_cleanup): New function.
952 (main): New function. Original main renamed to...
953 (captured_main): New function.
954 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
955
956 2014-08-29 Gary Benson <gbenson@redhat.com>
957
958 * Makefile.in (SFILES): Add common/common-exceptions.c.
959 (OBS): Add common-exceptions.o.
960 (common-exceptions.o): New rule.
961 * utils.c (prepare_to_throw_exception): New function.
962
963 2014-08-29 Gary Benson <gbenson@redhat.com>
964
965 * config.in: Regenerate.
966 * configure: Likewise.
967
968 2014-08-29 Gary Benson <gbenson@redhat.com>
969
970 * Makefile.in (SFILES): Add common/cleanups.c.
971 (OBS): cleanups.o.
972 (cleanups.o): New rule.
973
974 2014-08-29 Gary Benson <gbenson@redhat.com>
975
976 * utils.c (internal_vwarning): New function.
977
978 2014-08-28 Gary Benson <gbenson@redhat.com>
979
980 * utils.h (fatal): Remove declaration.
981 * utils.c (fatal): Remove function.
982
983 2014-08-28 Gary Benson <gbenson@redhat.com>
984
985 * tracepoint.c (gdb_agent_init): Replace fatal with
986 perror_with_name.
987 (initialize_tracepoint): Likewise.
988
989 2014-08-28 Gary Benson <gbenson@redhat.com>
990
991 * remote-utils.c (remote_prepare): Replace fatal with error.
992
993 2014-08-28 Gary Benson <gbenson@redhat.com>
994
995 * linux-low.c (linux_async): Replace fatal with warning.
996 Tidy up and return.
997 (linux_start_non_stop): Return -1 if linux_async failed.
998
999 2014-08-28 Gary Benson <gbenson@redhat.com>
1000
1001 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1002 gdb_assert.
1003 (i386_dr_low_get_addr): Remove vague comment.
1004 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1005 gdb_assert.
1006
1007 2014-08-28 Gary Benson <gbenson@redhat.com>
1008
1009 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1010 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1011 internal_error.
1012 (linux_resume_one_lwp): Likewise.
1013 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1014 gdb_assert.
1015 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1016 with internal_error.
1017 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1018 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1019 (find_register_by_name): Replace fatal with internal_error.
1020 (find_regno): Likewise.
1021 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1022 * thread-db.c (thread_db_create_event): Likewise.
1023 (thread_db_load_search): Likewise.
1024 (try_thread_db_load_1): Likewise.
1025 * tracepoint.c (get_jump_space_head): Replace fatal with
1026 internal_error.
1027 (claim_trampoline_space): Likewise.
1028 (have_fast_tracepoint_trampoline_buffer): Likewise.
1029 (cmd_qtstart): Likewise.
1030 (stop_tracing): Likewise.
1031 (fast_tracepoint_collecting): Likewise.
1032 (target_malloc): Likewise.
1033 (download_tracepoint): Likewise.
1034 (download_trace_state_variables): Replace check with gdb_assert.
1035 (upload_fast_traceframes): Replace fatal with internal_error.
1036
1037 2014-08-19 Tom Tromey <tromey@redhat.com>
1038 Gary Benson <gbenson@redhat.com>
1039
1040 * Makefile.in (SFILES): Add common/common-debug.c.
1041 (OBS): Add common-debug.o.
1042 (common-debug.o): New rule.
1043 * debug.h (debug_printf): Don't declare.
1044 * debug.c (debug_printf): Renamed and rewritten as...
1045 (debug_vprintf): New function.
1046
1047 2014-08-19 Gary Benson <gbenson@redhat.com>
1048
1049 * utils.h: Do not include print-utils.h.
1050
1051 2014-08-19 Tom Tromey <tromey@redhat.com>
1052 Gary Benson <gbenson@redhat.com>
1053
1054 * server.h: Add static assertion.
1055 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1056
1057 2014-08-19 Tom Tromey <tromey@redhat.com>
1058 Gary Benson <gbenson@redhat.com>
1059
1060 * Makefile.in (SFILES): Add common/errors.c.
1061 (OBS): Add errors.o.
1062 (IPA_OBS): Add errors-ipa.o.
1063 (errors.o): New rule.
1064 (errors-ipa.o): Likewise.
1065 * utils.h (perror_with_name, error, warning): Don't declare.
1066 * utils.c (warning): Renamed and rewritten as...
1067 (vwarning): New function.
1068 (error): Renamed and rewritten as...
1069 (verror): New function.
1070 (internal_error): Renamed and rewritten as...
1071 (internal_verror): New function.
1072
1073 2014-08-07 Gary Benson <gbenson@redhat.com>
1074
1075 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1076 * configure: Regenerate.
1077 * config.in: Likewise.
1078 * server.h: Do not include errno.h.
1079 * event-loop.c: Likewise.
1080 * hostio-errno.c: Likewise.
1081 * linux-low.c: Likewise.
1082 * remote-utils.c: Likewise.
1083 * spu-low.c: Likewise.
1084 * utils.c: Likewise.
1085 * gdbreplay.c: Unconditionally include errno.h.
1086
1087 2014-08-07 Gary Benson <gbenson@redhat.com>
1088
1089 * server.h: Do not include string.h.
1090 * event-loop.c: Likewise.
1091 * linux-low.c: Likewise.
1092 * regcache.c: Likewise.
1093 * remote-utils.c: Likewise.
1094 * spu-low.c: Likewise.
1095 * utils.c: Likewise.
1096
1097 2014-08-07 Gary Benson <gbenson@redhat.com>
1098
1099 * server.h: Do not include gdb_assert.h.
1100
1101 2014-08-07 Gary Benson <gbenson@redhat.com>
1102
1103 * server.h: Do not include common-utils.h.
1104
1105 2014-08-07 Gary Benson <gbenson@redhat.com>
1106
1107 * server.h: Do not include ptid.h.
1108 * notif.h: Likewise.
1109
1110 2014-08-07 Gary Benson <gbenson@redhat.com>
1111
1112 * server.h: Do not include gdb_locale.h.
1113
1114 2014-08-07 Gary Benson <gbenson@redhat.com>
1115
1116 * server.h: Do not include gdb/signals.h.
1117 * win32-low.c: Likewise.
1118
1119 2014-08-07 Gary Benson <gbenson@redhat.com>
1120
1121 * server.h: Do not include pathmax.h.
1122
1123 2014-08-07 Gary Benson <gbenson@redhat.com>
1124
1125 * server.h: Do not include libiberty.h.
1126 * linux-bfin-low.c: Likewise.
1127
1128 2014-08-07 Gary Benson <gbenson@redhat.com>
1129
1130 * server.h: Do not include ansidecl.h.
1131
1132 2014-08-07 Gary Benson <gbenson@redhat.com>
1133
1134 * linux-x86-low.c: Do not include stddef.h.
1135 * lynx-ppc-low.c: Likewise.
1136 * tracepoint.c: Likewise.
1137
1138 2014-08-07 Gary Benson <gbenson@redhat.com>
1139
1140 * server.h: Do not include stdarg.h.
1141 * nto-low.c: Likewise.
1142
1143 2014-08-07 Gary Benson <gbenson@redhat.com>
1144
1145 * server.h: Do not include stdlib.h.
1146 * inferiors.c: Likewise.
1147 * linux-low.c: Likewise.
1148 * regcache.c: Likewise.
1149 * spu-low.c: Likewise.
1150 * tracepoint.c: Likewise.
1151 * utils.c: Likewise.
1152
1153 2014-08-07 Gary Benson <gbenson@redhat.com>
1154
1155 * server.h: Do not include stdio.h.
1156 * linux-low.c: Likewise.
1157 * remote-utils.c: Likewise.
1158 * spu-low.c: Likewise.
1159 * utils.c: Likewise.
1160 * wincecompat.c: Likewise.
1161
1162 2014-08-06 Gary Benson <gbenson@redhat.com>
1163
1164 * regcache.c (init_register_cache): Move conditionals inside if.
1165
1166 2014-08-06 Gary Benson <gbenson@redhat.com>
1167
1168 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1169
1170 2014-07-31 Gary Benson <gbenson@redhat.com>
1171
1172 * ax.h: Do not include server.h.
1173 * gdbthread.h: Likewise.
1174 * lynx-low.h: Likewise.
1175 * notif.h: Likewise.
1176
1177 2014-07-30 Gary Benson <gbenson@redhat.com>
1178
1179 * server.h: Include common-defs.h.
1180 Do not include config.h or build-gnulib-gdbserver/config.h.
1181
1182 2014-07-30 Gary Benson <gbenson@redhat.com>
1183
1184 * hostio-errno.c: Move server.h to top of includes list.
1185 * inferiors.c: Likewise.
1186 * linux-x86-low.c: Likewise.
1187 * notif.c: Include server.h.
1188
1189 2014-07-24 Tom Tromey <tromey@redhat.com>
1190 Gary Benson <gbenson@redhat.com>
1191
1192 * server.h (CORE_ADDR): Now unsigned.
1193
1194 2014-07-16 Pedro Alves <palves@redhat.com>
1195
1196 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1197
1198 2014-07-15 Pedro Alves <palves@redhat.com>
1199
1200 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1201 copy.
1202
1203 2014-07-11 Pedro Alves <palves@redhat.com>
1204
1205 * linux-low.c (kill_wait_lwp): New function, based on
1206 kill_one_lwp_callback, but use my_waitpid directly.
1207 (kill_one_lwp_callback, linux_kill): Use it.
1208
1209 2014-06-23 Pedro Alves <palves@redhat.com>
1210
1211 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1212 before setting DR0..DR3.
1213
1214 2014-06-20 Gary Benson <gbenson@redhat.com>
1215
1216 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1217 * configure: Regenerated.
1218 * config.in: Likewise.
1219
1220 2014-06-20 Gary Benson <gbenson@redhat.com>
1221
1222 * Makefile.in (SFILES): Update locations for files moved
1223 from common to nat.
1224 (object file files): Reordered.
1225
1226 2014-06-20 Gary Benson <gbenson@redhat.com>
1227
1228 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1229 (i386_dr_low_set_addr): Likewise.
1230 (i386_dr_low_get_addr): Likewise.
1231 (i386_dr_low_can_set_control): Likewise.
1232 (i386_dr_low_set_control): Likewise.
1233 (i386_dr_low_get_control): Likewise.
1234 (i386_dr_low_get_status): Likewise.
1235 (i386_get_debug_register_length): Likewise.
1236 * linux-x86-low.c (i386_dr_low_set_addr):
1237 Changed signature. Made static.
1238 (i386_dr_low_get_addr): Likewise.
1239 (i386_dr_low_set_control): Likewise.
1240 (i386_dr_low_get_control): Likewise.
1241 (i386_dr_low_get_status): Likewise.
1242 (i386_dr_low): New global variable.
1243 * win32-i386-low.c (i386_dr_low_set_addr):
1244 Changed signature. Made static.
1245 (i386_dr_low_get_addr): Likewise.
1246 (i386_dr_low_set_control): Likewise.
1247 (i386_dr_low_get_control): Likewise.
1248 (i386_dr_low_get_status): Likewise.
1249 (i386_dr_low): New global variable.
1250
1251 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1252
1253 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1254 * Makefile.in (AR, AR_FLAGS): Define.
1255 * configure: Regenerate.
1256
1257 2014-06-19 Gary Benson <gbenson@redhat.com>
1258
1259 * Makefile.in (i386-dregs.o): New rule.
1260 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1261 * i386-low.c (target.h): Remove include.
1262 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1263 (DR_CONTROL_SHIFT): Likewise.
1264 (DR_CONTROL_SIZE): Likewise.
1265 (DR_RW_EXECUTE): Likewise.
1266 (DR_RW_WRITE): Likewise.
1267 (DR_RW_READ): Likewise.
1268 (DR_RW_IORW): Likewise.
1269 (DR_LEN_1): Likewise.
1270 (DR_LEN_2): Likewise.
1271 (DR_LEN_4): Likewise.
1272 (DR_LEN_8): Likewise.
1273 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1274 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1275 (DR_ENABLE_SIZE): Likewise.
1276 (DR_LOCAL_SLOWDOWN): Likewise.
1277 (DR_GLOBAL_SLOWDOWN): Likewise.
1278 (DR_CONTROL_RESERVED): Likewise.
1279 (I386_DR_CONTROL_MASK): Likewise.
1280 (I386_DR_VACANT): Likewise.
1281 (I386_DR_LOCAL_ENABLE): Likewise.
1282 (I386_DR_GLOBAL_ENABLE): Likewise.
1283 (I386_DR_DISABLE): Likewise.
1284 (I386_DR_SET_RW_LEN): Likewise.
1285 (I386_DR_GET_RW_LEN): Likewise.
1286 (I386_DR_WATCH_HIT): Likewise.
1287 (i386_wp_op_t): Likewise.
1288 (i386_show_dr): Likewise.
1289 (i386_length_and_rw_bits): Likewise.
1290 (i386_insert_aligned_watchpoint): Likewise.
1291 (i386_remove_aligned_watchpoint): Likewise.
1292 (i386_handle_nonaligned_watchpoint): Likewise.
1293 i386_update_inferior_debug_regs(): Likewise.
1294 (i386_dr_insert_watchpoint): Likewise.
1295 (i386_dr_remove_watchpoint): Likewise.
1296 (i386_dr_region_ok_for_watchpoint): Likewise.
1297 (i386_dr_stopped_data_address): Likewise.
1298 (i386_dr_stopped_by_watchpoint): Likewise.
1299
1300 2014-06-19 Gary Benson <gbenson@redhat.com>
1301
1302 * i386-low.c (i386_dr_show): Renamed to
1303 i386_show_dr and made static. All uses updated.
1304 (i386_dr_length_and_rw_bits): Renamed to
1305 i386_length_and_rw_bits and made static.
1306 All uses updated.
1307 (i386_dr_insert_aligned_watchpoint): Renamed to
1308 i386_insert_aligned_watchpoint and made static.
1309 All uses updated.
1310 (i386_dr_remove_aligned_watchpoint): Renamed to
1311 i386_remove_aligned_watchpoint and made static.
1312 All uses updated.
1313 (i386_dr_update_inferior_debug_regs): Renamed to
1314 i386_update_inferior_debug_regs and made static.
1315 All uses updated.
1316
1317 2014-06-18 Gary Benson <gbenson@redhat.com>
1318
1319 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1320 (i386_dr_low_can_set_control): Likewise.
1321 (i386_get_debug_register_length): Likewise.
1322 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1323 (i386_dr_low_can_set_control): Likewise.
1324 (i386_get_debug_register_length): Likewise.
1325
1326 2014-06-17 Gary Benson <gbenson@redhat.com>
1327
1328 * i386-low.h (i386-dregs.h): New include.
1329 (DR_FIRSTADDR): Now in i386-dregs.h.
1330 (DR_LASTADDR): Likewise.
1331 (DR_NADDR): Likewise.
1332 (DR_STATUS): Likewise.
1333 (DR_CONTROL): Likewise.
1334 (i386_debug_reg_state): Likewise.
1335 (i386_dr_insert_watchpoint): Likewise.
1336 (i386_dr_remove_watchpoint): Likewise.
1337 (i386_dr_region_ok_for_watchpoint): Likewise.
1338 (i386_dr_stopped_data_address): Likewise.
1339 (i386_dr_stopped_by_watchpoint): Likewise.
1340 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1341
1342 2014-06-18 Gary Benson <gbenson@redhat.com>
1343
1344 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1345 i386_dr_insert_watchpoint.
1346 (i386_low_remove_watchpoint): Renamed to
1347 i386_dr_remove_watchpoint.
1348 (i386_low_region_ok_for_watchpoint): Renamed to
1349 i386_dr_region_ok_for_watchpoint.
1350 (i386_low_stopped_data_address): Renamed to
1351 i386_dr_stopped_data_address.
1352 (i386_low_stopped_by_watchpoint): Renamed to
1353 i386_dr_stopped_by_watchpoint.
1354 * i386-low.c (i386_show_dr): Renamed to
1355 i386_dr_show and made nonstatic. All uses updated.
1356 (i386_length_and_rw_bits): Renamed to
1357 i386_dr_length_and_rw_bits and made nonstatic.
1358 All uses updated.
1359 (i386_insert_aligned_watchpoint): Renamed to
1360 i386_dr_insert_aligned_watchpoint and made nonstatic.
1361 All uses updated.
1362 (i386_remove_aligned_watchpoint): Renamed to
1363 i386_dr_remove_aligned_watchpoint and made nonstatic.
1364 All uses updated.
1365 (i386_update_inferior_debug_regs): Renamed to
1366 i386_dr_update_inferior_debug_regs and made nonstatic.
1367 All uses updated.
1368 (i386_low_insert_watchpoint): Renamed to
1369 i386_dr_insert_watchpoint. All uses updated.
1370 (i386_low_remove_watchpoint): Renamed to
1371 i386_dr_remove_watchpoint. All uses updated.
1372 (i386_low_region_ok_for_watchpoint): Renamed to
1373 i386_dr_region_ok_for_watchpoint. All uses updated.
1374 (i386_low_stopped_data_address): Renamed to
1375 i386_dr_stopped_data_address. All uses updated.
1376 (i386_low_stopped_by_watchpoint): Renamed to
1377 i386_dr_stopped_by_watchpoint. All uses updated.
1378
1379 2014-06-18 Gary Benson <gbenson@redhat.com>
1380
1381 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1382 (i386_dr_low_can_set_control): Likewise.
1383 (i386_insert_aligned_watchpoint): New check.
1384
1385 2014-06-18 Gary Benson <gbenson@redhat.com>
1386
1387 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1388 Renamed to state.
1389
1390 2014-06-18 Gary Benson <gbenson@redhat.com>
1391
1392 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1393 instead of fatal and error.
1394 (i386_handle_nonaligned_watchpoint): Likewise.
1395
1396 2014-06-18 Gary Benson <gbenson@redhat.com>
1397
1398 * i386-low.c (i386_get_debug_register_length): New macro.
1399 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1400 (i386_show_dr): Use debug_printf instead of fprintf. Use
1401 phex to format values.
1402
1403 2014-06-18 Gary Benson <gbenson@redhat.com>
1404
1405 * i386-low.h: Comment changes.
1406 * i386-low.c: Likewise.
1407
1408 2014-06-18 Gary Benson <gbenson@redhat.com>
1409
1410 * i386-low.c: Whitespace changes.
1411
1412 2014-06-12 Tom Tromey <tromey@redhat.com>
1413
1414 * utils.c (freeargv): Remove.
1415
1416 2014-06-12 Tom Tromey <tromey@redhat.com>
1417
1418 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1419 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1420 (parse_debug_format_options): Likewise.
1421 (gdbserver_usage): Likewise.
1422 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1423 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1424 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1425 against libiberty.
1426 ($(LIBGNU)): Depend on libiberty.
1427 (all-lib): Recurse into all subdirs.
1428 (install-only): Invoke "install" target in subdirs.
1429 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1430 targets.
1431 * configure: Rebuild.
1432 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1433 for vasprintf, vsnprintf, or gettimeofday.
1434 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1435 srv_tgtobj.
1436
1437 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1438
1439 * development.sh: Delete.
1440 * Makefile.in (config.status): Adjust dependency on development.sh.
1441 * configure.ac: Adjust development.sh source call.
1442 * configure: Regenerate.
1443
1444 2014-06-02 Pedro Alves <palves@redhat.com>
1445
1446 * ax.c (gdb_free_agent_expr): New function.
1447 * ax.h (gdb_free_agent_expr): New declaration.
1448 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1449 list.
1450 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1451 static.
1452 (clear_breakpoint_conditions_and_commands): New function.
1453 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1454 (clear_breakpoint_conditions_and_commands): New declaration.
1455
1456 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1457
1458 * linux-aarch64-low.c (asm/ptrace.h): Include.
1459
1460 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1461
1462 Fix TLS access for -static -pthread.
1463 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1464 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1465 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1466
1467 2014-05-20 Pedro Alves <palves@redhat.com>
1468
1469 * linux-aarch64-low.c (aarch64_insert_point)
1470 (aarch64_remove_point): No longer check whether the type is
1471 supported here. Adjust to new interface.
1472 (the_low_target): Install aarch64_supports_z_point_type as
1473 supports_z_point_type method.
1474 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1475 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1476 instead of a Z packet char. Adjust.
1477 (arm_supports_z_point_type): New function.
1478 (arm_insert_point, arm_remove_point): Adjust to new interface.
1479 (the_low_target): Install arm_supports_z_point_type.
1480 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1481 (cris_insert_point, cris_remove_point): Adjust to new interface.
1482 Don't check whether the type is supported here.
1483 (the_low_target): Install cris_supports_z_point_type.
1484 * linux-low.c (linux_supports_z_point_type): New function.
1485 (linux_insert_point, linux_remove_point): Adjust to new interface.
1486 * linux-low.h (struct linux_target_ops) <insert_point,
1487 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1488 raw_breakpoint pointer parameter.
1489 <supports_z_point_type>: New method.
1490 * linux-mips-low.c (mips_supports_z_point_type): New function.
1491 (mips_insert_point, mips_remove_point): Adjust to new interface.
1492 Use mips_supports_z_point_type.
1493 (the_low_target): Install mips_supports_z_point_type.
1494 * linux-ppc-low.c (the_low_target): Install NULL as
1495 supports_z_point_type method.
1496 * linux-s390-low.c (the_low_target): Install NULL as
1497 supports_z_point_type method.
1498 * linux-sparc-low.c (the_low_target): Install NULL as
1499 supports_z_point_type method.
1500 * linux-x86-low.c (x86_supports_z_point_type): New function.
1501 (x86_insert_point): Adjust to new insert_point interface. Use
1502 insert_memory_breakpoint. Adjust to new
1503 i386_low_insert_watchpoint interface.
1504 (x86_remove_point): Adjust to remove_point interface. Use
1505 remove_memory_breakpoint. Adjust to new
1506 i386_low_remove_watchpoint interface.
1507 (the_low_target): Install x86_supports_z_point_type.
1508 * lynx-low.c (lynx_target_ops): Install NULL as
1509 supports_z_point_type callback.
1510 * nto-low.c (nto_supports_z_point_type): New.
1511 (nto_insert_point, nto_remove_point): Adjust to new interface.
1512 (nto_target_ops): Install nto_supports_z_point_type.
1513 * mem-break.c: Adjust intro comment.
1514 (struct raw_breakpoint) <raw_type, size>: New fields.
1515 <inserted>: Update comment.
1516 <shlib_disabled>: Delete field.
1517 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1518 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1519 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1520 (raw_bkpt_type_to_target_hw_bp_type): New function.
1521 (find_enabled_raw_code_breakpoint_at): New function.
1522 (find_raw_breakpoint_at): New type and size parameters. Use them.
1523 (insert_memory_breakpoint): New function, based off
1524 set_raw_breakpoint_at.
1525 (remove_memory_breakpoint): New function.
1526 (set_raw_breakpoint_at): Reimplement.
1527 (set_breakpoint): New, based on set_breakpoint_at.
1528 (set_breakpoint_at): Reimplement.
1529 (delete_raw_breakpoint): Go through the_target->remove_point
1530 instead of assuming memory breakpoints.
1531 (find_gdb_breakpoint_at): Delete.
1532 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1533 (find_gdb_breakpoint): New function.
1534 (set_gdb_breakpoint_at): Delete.
1535 (z_type_supported): New function.
1536 (set_gdb_breakpoint_1): New function, loosely based off
1537 set_gdb_breakpoint_at.
1538 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1539 (delete_gdb_breakpoint_at): Delete.
1540 (delete_gdb_breakpoint_1): New function, loosely based off
1541 delete_gdb_breakpoint_at.
1542 (delete_gdb_breakpoint): New function.
1543 (clear_gdb_breakpoint_conditions): Rename to ...
1544 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1545 breakpoint.
1546 (add_condition_to_breakpoint): Make static.
1547 (add_breakpoint_condition): Take a struct breakpoint pointer
1548 instead of an address. Adjust.
1549 (gdb_condition_true_at_breakpoint): Rename to ...
1550 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1551 z_type parameter.
1552 (gdb_condition_true_at_breakpoint): Reimplement.
1553 (add_breakpoint_commands): Take a struct breakpoint pointer
1554 instead of an address. Adjust.
1555 (gdb_no_commands_at_breakpoint): Rename to ...
1556 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1557 parameter. Return true if no breakpoint was found. Change debug
1558 output.
1559 (gdb_no_commands_at_breakpoint): Reimplement.
1560 (run_breakpoint_commands): Rename to ...
1561 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1562 and change return type to boolean.
1563 (run_breakpoint_commands): New function.
1564 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1565 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1566 breakpoint. Go through the_target->remove_point instead of
1567 assuming memory breakpoint.
1568 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1569 software and hardware breakpoints.
1570 (reinsert_raw_breakpoint): Go through the_target->insert_point
1571 instead of assuming memory breakpoint.
1572 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1573 software and hardware breakpoints.
1574 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1575 Check both software and hardware breakpoints.
1576 (validate_inserted_breakpoint): Assert the breakpoint is a
1577 software breakpoint. Set the inserted flag to -1 instead of
1578 setting shlib_disabled.
1579 (delete_disabled_breakpoints): Adjust.
1580 (validate_breakpoints): Only validate software breakpoints.
1581 Adjust to inserted flag change.
1582 (check_mem_read, check_mem_write): Skip breakpoint types other
1583 than software breakpoints. Adjust to inserted flag change.
1584 * mem-break.h (enum raw_bkpt_type): New enum.
1585 (raw_breakpoint, struct process_info): Forward declare.
1586 (Z_packet_to_target_hw_bp_type): Delete declaration.
1587 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1588 (set_gdb_breakpoint, delete_gdb_breakpoint)
1589 (clear_breakpoint_conditions): New declarations.
1590 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1591 (breakpoint_inserted_here): Update comment.
1592 (add_breakpoint_condition, add_breakpoint_commands): Replace
1593 address parameter with a breakpoint pointer parameter.
1594 (gdb_breakpoint_here): Update comment.
1595 (delete_gdb_breakpoint_at): Delete.
1596 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1597 * server.c (process_point_options): Take a struct breakpoint
1598 pointer instead of an address. Adjust.
1599 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1600 delete_gdb_breakpoint.
1601 * spu-low.c (spu_target_ops): Install NULL as
1602 supports_z_point_type method.
1603 * target.h: Include mem-break.h.
1604 (struct target_ops) <prepare_to_access_memory>: Update comment.
1605 <supports_z_point_type>: New field.
1606 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1607 instead of a char. Also take a raw breakpoint pointer.
1608 * win32-arm-low.c (the_low_target): Install NULL as
1609 supports_z_point_type.
1610 * win32-i386-low.c (i386_supports_z_point_type): New function.
1611 (i386_insert_point, i386_remove_point): Adjust to new interface.
1612 (the_low_target): Install i386_supports_z_point_type.
1613 * win32-low.c (win32_supports_z_point_type): New function.
1614 (win32_insert_point, win32_remove_point): Adjust to new interface.
1615 (win32_target_ops): Install win32_supports_z_point_type.
1616 * win32-low.h (struct win32_target_ops):
1617 <supports_z_point_type>: New method.
1618 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1619 instead of a char. Also take a raw breakpoint pointer.
1620
1621 2014-05-20 Pedro Alves <palves@redhat.com>
1622
1623 * mem-break.h: Include break-common.h.
1624 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1625 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1626 (Z_packet_to_target_hw_bp_type): New declaration.
1627 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1628 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1629 (Z_PACKET_ACCESS_WP): Delete macros.
1630 (Z_packet_to_hw_type): Delete function.
1631 * i386-low.h: Don't include break-common.h here.
1632 (Z_packet_to_hw_type): Delete declaration.
1633 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1634 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1635 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1636 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1637 * linux-aarch64-low.c: Don't include break-common.h here.
1638 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1639 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1640 (Z_packet_to_target_hw_bp_type): Delete function.
1641 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1642 function.
1643 (mips_insert_point, mips_remove_point): Use
1644 Z_packet_to_target_hw_bp_type.
1645
1646 2014-05-20 Pedro Alves <palves@redhat.com>
1647
1648 * linux-aarch64-low.c: Include break-common.h.
1649 (enum target_point_type): Delete.
1650 (Z_packet_to_point_type): Rename to ...
1651 (Z_packet_to_target_hw_bp_type): ... this, and return a
1652 target_hw_bp_type instead.
1653 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1654 instead of an enum target_point_type.
1655 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1656 breakpoint type.
1657 (aarch64_dr_state_insert_one_point)
1658 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1659 (aarch64_handle_aligned_watchpoint)
1660 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1661 Take an enum target_hw_bp_type instead of an enum
1662 target_point_type.
1663 (aarch64_supports_z_point_type): New function.
1664 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1665 use Z_packet_to_target_hw_bp_type.
1666
1667 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1668
1669 * configure.ac: Only use -Werror by default when DEVELOPMENT
1670 is true.
1671 * configure: Regenerate.
1672
1673 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1674
1675 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1676 * linux-x86-low.c (X86_64_USER_REGS): New.
1677 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1678
1679 2014-04-28 Yao Qi <yao@codesourcery.com>
1680
1681 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1682 name.
1683
1684 2014-04-25 Pedro Alves <palves@redhat.com>
1685
1686 PR server/16255
1687 * linux-low.c (linux_attach_fail_reason_string): New function.
1688 (linux_attach_lwp): Delete.
1689 (linux_attach_lwp_1): Rename to ...
1690 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1691 argument. Remove "initial" parameter. Return int instead of
1692 void. Don't error or warn here.
1693 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1694 failure to attach to the tgid. Call warning when failing to
1695 attach to an lwp.
1696 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1697 argument. Remove "initial" parameter. Return int instead of
1698 void. Don't error or warn here.
1699 (linux_attach_fail_reason_string): New declaration.
1700 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1701 interface change. Use linux_attach_fail_reason_string.
1702
1703 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1704 Walfred Tedeschi <walfred.tedeschi@intel.com>
1705
1706 * Makefile.in: Added rules to handle new files
1707 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1708 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1709 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1710 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1711 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1712 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1713 x32-avx512-linux.o.
1714 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1715 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1716 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1717 i386/x32-avx512.xml.
1718 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1719 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1720 i386/x32-avx512-linux.xml.
1721 * i387-fp.c (num_avx512_k_registers): New constant for number
1722 of K registers.
1723 (num_avx512_zmmh_low_registers): New constant for number of
1724 lower ZMM registers (0-15).
1725 (num_avx512_zmmh_high_registers): New constant for number of
1726 higher ZMM registers (16-31).
1727 (num_avx512_ymmh_registers): New contant for number of higher
1728 YMM registers (ymm16-31 added by avx521 on x86_64).
1729 (num_avx512_xmm_registers): New constant for number of higher
1730 XMM registers (xmm16-31 added by AVX512 on x86_64).
1731 (struct i387_xsave): Add space for AVX512 registers.
1732 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1733 Add code to handle AVX512 registers.
1734 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1735 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1736 prototypei from generated file.
1737 (tdesc_amd64_avx512_linux): Likewise.
1738 (init_registers_x32_avx512_linux): Likewise.
1739 (tdesc_x32_avx512_linux): Likewise.
1740 (init_registers_i386_avx512_linux): Likewise.
1741 (tdesc_i386_avx512_linux): Likewise.
1742 (x86_64_regmap): Add AVX512 registers.
1743 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1744 mask.
1745 (initialize_low_arch): Add code to initialize AVX512 registers.
1746
1747 2014-04-23 Pedro Alves <palves@redhat.com>
1748
1749 * mem-break.c (find_gdb_breakpoint_at): Make static.
1750 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1751
1752 2014-04-23 Pedro Alves <palves@redhat.com>
1753
1754 * i386-low.c: Don't include break-common.h here.
1755 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1756 prototype to take target_hw_bp_type as argument instead of a Z
1757 packet char.
1758 * i386-low.h: Include break-common.h here.
1759 (Z_packet_to_hw_type): Declare.
1760 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1761 prototypes.
1762 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1763 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1764 (x86_remove_point): Convert the packet number to a
1765 target_hw_bp_type before calling i386_low_remove_watchpoint.
1766 * win32-i386-low.c (i386_insert_point): Convert the packet number
1767 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1768 (i386_remove_point): Convert the packet number to a
1769 target_hw_bp_type before calling i386_low_remove_watchpoint.
1770
1771 2014-04-23 Pedro Alves <palves@redhat.com>
1772
1773 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1774
1775 2014-04-10 Pedro Alves <palves@redhat.com>
1776
1777 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1778 Check if the condition or command is NULL before checking if the
1779 breakpoint is known. On success, return true.
1780 * mem-break.h (add_breakpoint_condition): Document return.
1781 (add_breakpoint_commands): Add describing comment.
1782 * server.c (skip_to_semicolon): New function.
1783 (process_point_options): Use it.
1784
1785 2014-04-09 Pedro Alves <palves@redhat.com>
1786
1787 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1788 to lwpid_of.
1789
1790 2014-02-27 Pedro Alves <palves@redhat.com>
1791
1792 PR 12702
1793 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1794 macros.
1795 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1796 output.
1797 (last_thread_of_process_p): Take a PID argument instead of a
1798 thread pointer.
1799 (linux_wait_for_lwp): Delete.
1800 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1801 functions.
1802 (linux_low_filter_event): New function, party factored out from
1803 linux_wait_for_event.
1804 (linux_wait_for_event): Rename to ...
1805 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1806 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1807 sigsuspend. Check for zombie leaders.
1808 (linux_wait_for_event): Reimplement as wrapper around
1809 linux_wait_for_event_filtered.
1810 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1811 a normal or signal exit is seen, it's the whole process exiting.
1812 (wait_for_sigstop): No longer a for_each_inferior callback.
1813 Rewrite on top of linux_wait_for_event_filtered.
1814 (stop_all_lwps): Call wait_for_sigstop directly.
1815 * server.c (resume, handle_target_event): Handle
1816 TARGET_WAITKIND_NO_RESUMED.
1817
1818 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1819
1820 * win32-low.c (psapi_get_dll_name,
1821 * win32_CreateToolhelp32Snapshot): Delete.
1822 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1823 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1824 Delete.
1825 (handle_load_dll): Add function description.
1826 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1827
1828 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1829
1830 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1831 Add comment.
1832 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1833 base address when calling win32_add_one_solib.
1834 (handle_load_dll): Delete local variable load_addr.
1835 Remove 0x1000 offset applied to DLL base address when calling
1836 win32_add_one_solib.
1837 (handle_unload_dll): Add comment.
1838
1839 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1840
1841 * win32-low.c (win32_add_all_dlls): Renames
1842 win32_ensure_ntdll_loaded. Rewrite function documentation.
1843 Adjust implementation to always load all DLLs.
1844 Add 0x1000 offset to DLL base address when calling
1845 win32_add_one_solib.
1846 (child_initialization_done): New static global.
1847 (do_initial_child_stuff): Set child_initialization_done to
1848 zero during child initialization, and 1 after. Replace call
1849 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1850 Add comment.
1851 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1852 (handle_unload_dll): Add function documentation.
1853 (get_child_debug_event): Ignore load and unload DLL events
1854 during child initialization.
1855
1856 2014-02-20 Doug Evans <dje@google.com>
1857
1858 Remove global all_lwps.
1859 * inferiors.h (ptid_of): Move here from linux-low.h.
1860 (pid_of, lwpid_of): Ditto.
1861 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1862 parameter is a struct thread_info * now.
1863 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1864 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1865 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1866 directly.
1867 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1868 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1869 * linux-arm-low.c (update_registers_callback): Update, "entry"
1870 parameter is a struct thread_info * now.
1871 Fetch lwpid from current_inferior directly.
1872 (arm_insert_point): Pass &all_threads to find_inferior instead of
1873 &all_lwps.
1874 (arm_remove_point): Ditto.
1875 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1876 (arm_prepare_to_resume): Fetch pid from thread.
1877 (arm_read_description): Fetch lwpid from current_inferior directly.
1878 * linux-low.c (all_lwps): Delete.
1879 (delete_lwp): Delete call to remove_inferior.
1880 (handle_extended_wait): Fetch lwpid from thread.
1881 (add_lwp): Don't set lwp->entry.id. Remove call to
1882 add_inferior_to_list.
1883 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1884 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1885 (kill_one_lwp_callback): Ditto.
1886 (linux_kill): Don't dereference NULL pointer.
1887 Fetch ptid,lwpid from thread.
1888 (get_detach_signal): Fetch ptid from thread.
1889 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1890 Simplify call to regcache_invalidate_thread.
1891 (delete_lwp_callback): Update, "entry" parameter is a
1892 struct thread_info * now. Fetch pid from thread.
1893 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1894 (status_pending_p_callback): Update, "entry" parameter is a
1895 struct thread_info * now. Fetch ptid from thread.
1896 (find_lwp_pid): Update, "entry" parameter is a
1897 struct thread_info * now.
1898 (linux_wait_for_lwp): Fetch pid from thread.
1899 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1900 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1901 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1902 (dequeue_one_deferred_signal): Ditto.
1903 (cancel_breakpoint): Fetch ptid from current_inferior.
1904 (linux_wait_for_event): Pass &all_threads to find_inferior,
1905 not &all_lwps. Fetch ptid, lwpid from thread.
1906 (count_events_callback): Update, "entry" parameter is a
1907 struct thread_info * now.
1908 (select_singlestep_lwp_callback): Ditto.
1909 (select_event_lwp_callback): Ditto.
1910 (cancel_breakpoints_callback): Ditto.
1911 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1912 not &all_lwps.
1913 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1914 (unsuspend_one_lwp): Update, "entry" parameter is a
1915 struct thread_info * now.
1916 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1917 not &all_lwps.
1918 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1919 Fetch lwpid from thread, not lwp.
1920 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1921 Pass &all_threads to find_inferior, not &all_lwps.
1922 (send_sigstop): Fetch lwpid from thread, not lwp.
1923 (send_sigstop_callback): Update, "entry" parameter is a
1924 struct thread_info * now.
1925 (suspend_and_send_sigstop_callback): Ditto.
1926 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1927 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1928 struct thread_info * now.
1929 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1930 from thread, lwp.
1931 (lwp_running): Update, "entry" parameter is a
1932 struct thread_info * now.
1933 (stop_all_lwps): Fetch ptid from thread.
1934 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1935 (linux_resume_one_lwp): Fetch lwpid from thread.
1936 (linux_set_resume_request): Update, "entry" parameter is a
1937 struct thread_info * now. Fetch pid, lwpid from thread.
1938 (resume_status_pending_p): Update, "entry" parameter is a
1939 struct thread_info * now.
1940 (need_step_over_p): Ditto. Fetch lwpid from thread.
1941 (start_step_over): Fetch lwpid from thread.
1942 (linux_resume_one_thread): Update, "entry" parameter is a
1943 struct thread_info * now. Fetch lwpid from thread.
1944 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1945 (proceed_one_lwp): Update, "entry" parameter is a
1946 struct thread_info * now. Fetch lwpid from thread.
1947 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1948 struct thread_info * now.
1949 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1950 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1951 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1952 directly.
1953 (regsets_store_inferior_registers): Ditto.
1954 (fetch_register, store_register): Ditto.
1955 (linux_read_memory, linux_write_memory): Ditto.
1956 (linux_request_interrupt): Ditto.
1957 (linux_read_auxv): Ditto.
1958 (linux_xfer_siginfo): Ditto.
1959 (linux_qxfer_spu): Ditto.
1960 (linux_qxfer_libraries_svr4): Ditto.
1961 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1962 moved to inferiors.h.
1963 (get_lwp): Delete.
1964 (get_thread_lwp): Update.
1965 (struct lwp_info): Delete member "entry". Simplify comment for
1966 member "thread".
1967 (all_lwps): Delete.
1968 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1969 current_inferior directly.
1970 (update_watch_registers_callback): Update, "entry" parameter is a
1971 struct thread_info * now. Fetch pid from thread.
1972 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1973 (mips_insert_point): Fetch lwpid from current_inferior.
1974 Pass &all_threads to find_inferior, not &all_lwps.
1975 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1976 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1977 directly.
1978 (mips_stopped_data_address): Ditto.
1979 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1980 directly.
1981 * linux-tile-low.c (tile_arch_setup): Ditto.
1982 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1983 (update_debug_registers_callback): Update, "entry" parameter is a
1984 struct thread_info * now. Fetch pid from thread.
1985 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1986 Pass &all_threads to find_inferior, not &all_lwps.
1987 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1988 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1989 Pass &all_threads to find_inferior, not &all_lwps.
1990 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1991 (i386_dr_low_get_status): Ditto.
1992 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1993 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1994 (x86_linux_read_description): Ditto.
1995 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1996
1997 2014-02-20 Doug Evans <dje@google.com>
1998
1999 * inferiors.c (get_first_inferior): Fix buglet.
2000
2001 2014-02-19 Doug Evans <dje@google.com>
2002
2003 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2004 * inferiors.c (add_thread): Change result type to struct thread_info *.
2005 All callers updated.
2006 (add_lwp): Call add_thread here instead of in callers.
2007 All callers updated.
2008 * linux-low.h (get_lwp_thread): Rewrite.
2009 (struct lwp_info): New member "thread".
2010
2011 2014-02-19 Doug Evans <dje@google.com>
2012
2013 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2014 All callers updated.
2015
2016 2014-02-19 Doug Evans <dje@google.com>
2017
2018 * inferiors.c (add_thread): Fix whitespace.
2019
2020 2014-02-19 Doug Evans <dje@google.com>
2021
2022 * dll.c (clear_dlls): Replace accessing list implemention details
2023 with API function.
2024 * gdbthread.h (get_first_thread): Declare.
2025 * inferiors.c (for_each_inferior_with_data): New function.
2026 (get_first_thread): New function.
2027 (find_thread_ptid): Simplify.
2028 (get_first_inferior): New function.
2029 (clear_list): Delete.
2030 (one_inferior_p): New function.
2031 (clear_inferior_list): New function.
2032 (clear_inferiors): Update.
2033 * inferiors.h (for_each_inferior_with_data): Declare.
2034 (clear_inferior_list): Declare.
2035 (one_inferior_p): Declare.
2036 (get_first_inferior): Declare.
2037 * linux-low.c (linux_wait_for_event): Replace accessing list
2038 implemention details with API function.
2039 * server.c (target_running): Ditto.
2040 (accumulate_file_name_length): New function.
2041 (emit_dll_description): New function.
2042 (handle_qxfer_libraries): Replace accessing list implemention
2043 details with API function.
2044 (handle_qxfer_threads_worker): New function.
2045 (handle_qxfer_threads_proper): Replace accessing list implemention
2046 details with API function.
2047 (handle_query): Ditto.
2048 (visit_actioned_threads_callback_ftype): New typedef.
2049 (visit_actioned_threads_data): New struct.
2050 (visit_actioned_threads): Rewrite to be find_inferior callback.
2051 (resume): Call find_inferior.
2052 (handle_status): Replace accessing list implemention
2053 details with API function.
2054 (process_serial_event): Replace accessing list implemention details
2055 with API function.
2056 * target.c (set_desired_inferior): Replace accessing list implemention
2057 details with API function.
2058 * tracepoint.c (same_process_p): New function.
2059 (gdb_agent_about_to_close): Replace accessing list implemention
2060 details with API function.
2061 * win32-low.c (child_delete_thread): Replace accessing list
2062 implemention details with API function.
2063 (match_dll_by_basename): New function.
2064 (dll_is_loaded_by_basename): New function.
2065 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2066 details call to dll_is_loaded_by_basename.
2067
2068 2014-02-19 Doug Evans <dje@google.com>
2069
2070 * dll.h (struct dll_info): Add comment.
2071 * gdbthread.h (struct thread_info): Add comment.
2072 (current_ptid): Simplify.
2073 * inferiors.c (add_process): Update.
2074 (remove_process): Update.
2075 * inferiors.h (struct process_info): Rename member "head" to "entry".
2076 * linux-low.c (delete_lwp): Update.
2077 (add_lwp): Update.
2078 (last_thread_of_process_p): Update.
2079 (kill_one_lwp_callback, linux_kill): Update.
2080 (status_pending_p_callback): Update.
2081 (wait_for_sigstop): Update. Simplify read of ptid.
2082 (start_step_over): Update.
2083 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2084 (get_lwp_thread): Update.
2085 (struct lwp_info): Rename member "head" to "entry".
2086 * regcache.h (inferior_list_entry): Delete.
2087 * server.c (kill_inferior_callback): Update.
2088 (detach_or_kill_inferior_callback): Update.
2089 (print_started_pid): Update.
2090 (print_attached_pid): Update.
2091 (process_serial_event): Simplify read of ptid.
2092 * thread-db.c (thread_db_create_event): Update.
2093 (thread_db_get_tls_address): Update.
2094 * win32-low.c (current_inferior_ptid): Simplify.
2095
2096 2014-02-19 Tom Tromey <tromey@redhat.com>
2097
2098 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2099 argument.
2100 (target_supports_btrace): Update.
2101
2102 2014-02-14 Yao Qi <yao@codesourcery.com>
2103
2104 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2105 (rsp-low-ipa.o): New target.
2106
2107 2014-02-12 Tom Tromey <tromey@redhat.com>
2108
2109 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2110 convert_ascii_to_int.
2111 * regcache.c (registers_to_string): Likewise.
2112 * remote-utils.c (decode_M_packet): Likewise.
2113 * server.c (process_serial_event): Likewise.
2114
2115 2014-02-12 Tom Tromey <tromey@redhat.com>
2116
2117 * server.c (handle_query, handle_v_run): Use hex2bin, not
2118 unhexify.
2119 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2120
2121 2014-02-12 Tom Tromey <tromey@redhat.com>
2122
2123 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2124 convert_int_to_ascii.
2125 * regcache.c (registers_to_string, collect_register_as_string):
2126 Likewise.
2127 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2128 Likewise.
2129 * server.c (process_serial_event): Likewise.
2130 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2131 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2132
2133 2014-02-12 Tom Tromey <tromey@redhat.com>
2134
2135 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2136 bin2hex, not hexify.
2137 * tracepoint.c (cmd_qtstatus): Likewise.
2138
2139 2014-02-12 Tom Tromey <tromey@redhat.com>
2140
2141 * remote-utils.c (monitor_output): Pass explicit length to
2142 hexify.
2143
2144 2014-02-12 Tom Tromey <tromey@redhat.com>
2145
2146 * tracepoint.c: Include rsp-low.h.
2147 * server.c: Include rsp-low.h.
2148 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2149 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2150 declare.
2151 * remote-utils.c: Include rsp-low.h.
2152 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2153 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2154 (convert_int_to_ascii, convert_ascii_to_int): Move to
2155 common/rsp-low.c.
2156 * regcache.c: Include rsp-low.h.
2157 * ax.c: Include rsp-low.h.
2158 * Makefile.in (SFILES): Add common/rsp-low.c.
2159 (OBS): Add rsp-low.o.
2160 (rsp-low.o): New target.
2161
2162 2014-02-12 Tom Tromey <tromey@redhat.com>
2163
2164 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2165 Include print-utils.h.
2166 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2167 (plongest, thirty_two, phex_nz): Remove.
2168 * Makefile.in (SFILES): Add common/print-utils.c.
2169 (OBS): Add print-utils.o.
2170 (print-utils-ipa.o): New target.
2171 (print-utils.o): New target.
2172 (IPA_OBJS): Add print-utils-ipa.o.
2173
2174 2014-02-06 Tom Tromey <tromey@redhat.com>
2175
2176 * Makefile.in (SFILES): Fix indentation.
2177
2178 2014-02-05 Doug Evans <dje@google.com>
2179
2180 * linux-low.c (linux_wait_for_event): Improve comment.
2181 (linux_wait_1): Keep current_inferior in sync with event_child.
2182
2183 2014-01-22 Doug Evans <dje@google.com>
2184
2185 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2186
2187 2014-01-22 Doug Evans <dje@google.com>
2188
2189 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2190 * configure: Regenerate.
2191 * config.in: Regenerate.
2192 * Makefile.in (SFILES): Add debug.c.
2193 (OBS): Add debug.o.
2194 * debug.c: New file.
2195 * debug.h: New file.
2196 * linux-aarch64-low.c (*): Update all debugging printfs to use
2197 debug_printf instead of fprintf.
2198 * linux-arm-low.c (*): Ditto.
2199 * linux-cris-low.c (*): Ditto.
2200 * linux-crisv32-low.c (*): Ditto.
2201 * linux-m32r-low.c (*): Ditto.
2202 * linux-sparc-low.c (*): Ditto.
2203 * linux-x86.c (*): Ditto.
2204 * linux-low.c (*): Ditto.
2205 (linux_wait_1): Add calls to debug_enter, debug_exit.
2206 (linux_wait): Remove redundant debugging printf.
2207 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2208 (linux_resume, unstop_all_lwps): Ditto.
2209 * mem-break.c (*): Update all debugging printfs to use
2210 debug_printf instead of fprintf.
2211 * remote-utils.c (*): Ditto.
2212 * thread-db.c (*): Ditto.
2213 * server.c #include <ctype.h>, "gdb_vecs.h".
2214 (debug_threads): Moved to debug.c.
2215 (*): Update all debugging printfs to use debug_printf instead of
2216 fprintf.
2217 (start_inferior): Replace call to fflush with call to debug_flush.
2218 (monitor_show_help): Mention set debug-format.
2219 (parse_debug_format_options): New function.
2220 (handle_monitor_command): Handle "monitor set debug-format".
2221 (gdbserver_usage): Mention --debug-format.
2222 (main): Parse --debug-format.
2223 * server.h (debug_threads): Declaration moved to debug.h.
2224 #include "debug.h".
2225 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2226 trace_debug_1 that uses debug_printf.
2227 (tracepoint_look_up_symbols): Update all debugging printfs to use
2228 debug_printf instead of fprintf.
2229
2230 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2231
2232 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2233 sys/ptrace.h.
2234
2235 2014-01-17 Pedro Alves <palves@redhat.com>
2236
2237 PR build/16445
2238 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2239 defined after including gdb_proc_service.h.
2240
2241 2014-01-16 Doug Evans <dje@google.com>
2242
2243 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2244 (match_dll): Use it.
2245
2246 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2247
2248 * target.h (target_ops) <read_btrace>: Change parameters and
2249 return type to allow error reporting.
2250 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2251 trace reading errors on.
2252 * linux-low.c (linux_low_read_btrace): Pass trace reading
2253 errors on.
2254 (linux_low_disable_btrace): New.
2255
2256 2014-01-15 Doug Evans <dje@google.com>
2257
2258 * inferiors.c (thread_id_to_gdb_id): Delete.
2259 * inferiors.h (thread_id_to_gdb_id): Delete.
2260
2261 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2262
2263 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2264 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2265 versions.
2266
2267 2014-01-08 Pedro Alves <palves@redhat.com>
2268
2269 * server.c (handle_status): Don't discard previous queued stop
2270 replies or thread's pending status here.
2271 (main) <disconnection>: Do it here instead.
2272
2273 2014-01-08 Pedro Alves <palves@redhat.com>
2274
2275 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2276 * server.c (visit_actioned_threads, handle_pending_status): New
2277 function.
2278 (handle_v_cont): Factor out parts to ...
2279 (resume): ... this new function. If in all-stop, and a thread
2280 being resumed has a pending status, report it without actually
2281 resuming.
2282 (myresume): Adjust to use the new 'resume' function.
2283 (clear_pending_status_callback, set_pending_status_callback)
2284 (find_status_pending_thread_callback): New functions.
2285 (handle_status): Handle the case of multiple threads having
2286 interesting statuses to report. Report threads' real last signal
2287 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2288 with an interesting thread to report the status for, instead of
2289 always reporting the status of the first thread.
2290
2291 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2292
2293 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2294 * gdbreplay.c (gdbreplay_version): Likewise.
2295
2296 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2297
2298 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2299 iov.iov_len with the real length in use.
2300
2301 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2302
2303 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2304 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2305 for all targets that use win32-low.c.
2306 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2307 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2308
2309 2013-12-13 Pedro Alves <palves@redhat.com>
2310
2311 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2312 if equal to TARGET_WAITKIND_LOADED.
2313 * win32-low.c (cached_status): New static global.
2314 (win32_wait): Add declaration.
2315 (do_initial_child_stuff): Flush all initial pending debug events
2316 up to the initial breakpoint.
2317 (win32_wait): If CACHED_STATUS was set, return that instead
2318 of doing a real wait. Remove the code resuming the execution
2319 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2320 during the initial phase. Also remove the code changing
2321 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2322 TARGET_WAITKIND_STOPPED.
2323
2324 2013-12-11 Yao Qi <yao@codesourcery.com>
2325
2326 * notif.c (handle_notif_ack): Return 0 if no notification
2327 matches.
2328
2329 2013-11-20 Doug Evans <dje@google.com>
2330
2331 * linux-low.c (linux_set_resume_request): Fix comment.
2332
2333 2013-11-20 Doug Evans <dje@google.com>
2334
2335 * linux-low.c (resume_status_pending_p): Tweak comment.
2336
2337 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2338
2339 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2340 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2341 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2342 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2343 (srv_amd64_regobj): Add amd64-mpx.o.
2344 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2345 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2346 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2347 * i387-fp.c (num_pl_bnd_register) Added constant.
2348 (num_pl_bnd_cfg_registers) Added constant.
2349 (struct i387_xsave) Added reserved area and MPX fields.
2350 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2351 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2352 function.
2353 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2354 (init_registers_amd64_mpx_linux): Declare new function.
2355 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2356 (x86_64_regmap): Add MPX registers.
2357 (x86_linux_read_description): Add MPX case.
2358 (initialize_low_arch): Initialize MPX targets.
2359
2360 2013-11-18 Tom Tromey <tromey@redhat.com>
2361
2362 * configure: Rebuild.
2363 * configure.ac: Don't check for stdlib.h.
2364 * gdbreplay.c: Unconditionally include stdlib.h.
2365
2366 2013-11-18 Tom Tromey <tromey@redhat.com>
2367
2368 * config.in: Rebuild.
2369 * configure: Rebuild.
2370 * configure.ac: Don't use AC_HEADER_DIRENT.
2371
2372 2013-11-18 Tom Tromey <tromey@redhat.com>
2373
2374 * server.h: Don't check HAVE_STRING_H.
2375 * gdbreplay.c: Don't check HAVE_STRING_H.
2376 * configure: Rebuild.
2377
2378 2013-11-18 Tom Tromey <tromey@redhat.com>
2379
2380 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2381 LIBGNU.
2382
2383 2013-11-08 Tom Tromey <tromey@redhat.com>
2384
2385 * configure, config.in: Rebuild.
2386 * configure.ac: Remove unused configury.
2387
2388 2013-11-08 Tom Tromey <tromey@redhat.com>
2389
2390 * acinclude.m4: Include common.m4, codeset.m4.
2391 * configure, config.in: Rebuild.
2392 * configure.ac: Use GDB_AC_COMMON.
2393
2394 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2395
2396 * linux-s390-low.c (HWCAP_S390_TE): New define.
2397 (s390_arch_setup): Consider the TE field in the HWCAP for
2398 determining 'have_regset_tdb'.
2399
2400 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2401
2402 PR gdb/16014
2403 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2404 call to sizeof.
2405
2406 2013-10-02 Pedro Alves <palves@redhat.com>
2407
2408 * server.c (process_serial_event): Don't output "GDBserver
2409 exiting" if GDB is connected through stdio.
2410 * target.c (mywait): Likewise, be silent if GDB is connected
2411 through stdio.
2412
2413 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2414
2415 * lynx-low.c (lynx_add_threads_after_attach): New function.
2416 (lynx_attach): Remove call to add_thread. Add call to
2417 lynx_add_threads_after_attach instead.
2418
2419 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2420
2421 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2422 * config.in, configure: Regenerated.
2423
2424 2013-09-18 Yao Qi <yao@codesourcery.com>
2425
2426 PR server/15959
2427 * server.c (start_inferior): Clear 'resume_info'.
2428
2429 2013-09-16 Jiong Wang <jiwang@tilera.com>
2430
2431 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2432 for each register.
2433
2434 2013-09-16 Jiong Wang <jiwang@tilera.com>
2435
2436 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2437 linux-tile-low.o to srv_tgtobj.
2438
2439 2013-09-16 Will Newton <will.newton@linaro.org>
2440
2441 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2442 out regs.
2443
2444 2013-09-06 Pedro Alves <palves@redhat.com>
2445
2446 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2447 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2448 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2449 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2450 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2451 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2452
2453 2013-09-06 Pedro Alves <palves@redhat.com>
2454
2455 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2456 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2457
2458 2013-09-06 Pedro Alves <palves@redhat.com>
2459
2460 * linux-amd64-ipa.c: Include tracepoint.h.
2461 * linux-i386-ipa.c: Include tracepoint.h.
2462
2463 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2464
2465 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2466 (ps_get_thread_area): New function.
2467
2468 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2469
2470 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2471 (initialize_low_arch): Call init_registers_crisv32 rather than
2472 init_register_crisv32.
2473
2474 2013-09-05 Pedro Alves <palves@redhat.com>
2475
2476 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2477 to ...
2478 * hostio.h: ... this new file.
2479 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2480 win32-low.c: Include hostio.h.
2481
2482 2013-09-05 Pedro Alves <palves@redhat.com>
2483
2484 * server.h (gdb_client_data, handler_func, callback_handler_func)
2485 (delete_file_handler, add_file_handler, append_callback_event)
2486 (delete_callback_event, start_event_loop, initialize_event_loop):
2487 Move to event-loop.h and include it.
2488 * event-loop.h: New file.
2489
2490 2013-09-05 Pedro Alves <palves@redhat.com>
2491
2492 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2493 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2494 (loaded_dll, unloaded_dll): Move to ...
2495 * dll.h: ... this new file.
2496 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2497
2498 2013-09-05 Pedro Alves <palves@redhat.com>
2499
2500 * server.h (current_process, get_thread_process, all_processes)
2501 (add_inferior_to_list, for_each_inferior, current_inferior)
2502 (remove_inferior, add_process, remove_process, find_process_pid)
2503 (have_started_inferiors_p, have_attached_inferiors_p)
2504 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2505 (clear_inferiors, find_inferior, find_inferior_id)
2506 (inferior_target_data, set_inferior_target_data)
2507 (inferior_regcache_data, set_inferior_regcache_data): Move to
2508 inferiors.h, and include it.
2509 * inferiors.h: New file.
2510
2511 2013-09-05 Pedro Alves <palves@redhat.com>
2512
2513 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2514 Move ...
2515 * ax.h: ... here.
2516
2517 2013-09-05 Pedro Alves <palves@redhat.com>
2518
2519 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2520 tracepoint.h.
2521 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2522 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2523 (handle_tracepoint_general_set, handle_tracepoint_query)
2524 (tracepoint_finished_step, tracepoint_was_hit)
2525 (release_while_stepping_state_list, current_traceframe)
2526 (in_readonly_region, traceframe_read_mem)
2527 (fetch_traceframe_registers, traceframe_read_sdata)
2528 (traceframe_read_info, struct fast_tpoint_collect_status)
2529 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2530 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2531 (supply_fast_tracepoint_registers)
2532 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2533 (ipa_tdesc, claim_trampoline_space)
2534 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2535 (agent_mem_read, agent_get_trace_state_variable_value)
2536 (agent_set_trace_state_variable_value, agent_tsv_read)
2537 (agent_mem_read_string, get_raw_reg_func_addr)
2538 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2539 * tracepoint.h: ... this new file.
2540
2541 2013-09-05 Pedro Alves <palves@redhat.com>
2542
2543 * server.h (perror_with_name, error, fatal, warning, paddress)
2544 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2545 include it.
2546 * utils.h: New file.
2547
2548 2013-09-05 Pedro Alves <palves@redhat.com>
2549
2550 * server.h (remote_debug, noack_mode, transport_is_reliable)
2551 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2552 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2553 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2554 (write_enn, initialize_async_io, enable_async_io)
2555 (disable_async_io, check_remote_input_interrupt_request)
2556 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2557 (dead_thread_notify, prepare_resume_reply)
2558 (decode_address_to_semicolon, decode_address, decode_m_packet)
2559 (decode_M_packet, decode_X_packet, decode_xfer_write)
2560 (decode_search_memory_packet, unhexify, hexify)
2561 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2562 (look_up_one_symbol, relocate_instruction)
2563 (monitor_output): Move to remote-utils.h, and include it.
2564 * remote-utils.h: New file.
2565
2566 2013-09-05 Pedro Alves <palves@redhat.com>
2567
2568 * server.h (_): Delete.
2569
2570 2013-09-02 Pedro Alves <palves@redhat.com>
2571
2572 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2573 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2574 allocated.
2575 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2576
2577 2013-09-02 Pierre Muller <muller@sourceware.org>
2578
2579 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2580 or WriteProcessMemory complete successfully and handle
2581 ERROR_PARTIAL_COPY error.
2582
2583 2013-09-02 Pedro Alves <palves@redhat.com>
2584
2585 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2586 error instead of EIO.
2587
2588 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2589
2590 PR server/15604
2591 * linux-low.c: Include filestuff.h.
2592 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2593 * lynx-low.c: Include filestuff.h.
2594 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2595 * server.c: Include filestuff.h.
2596 (main): Call notice_open_fds.
2597 * spu-low.c: Include filestuff.h.
2598 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2599
2600 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2601
2602 * Makefile.in: Explain why ../target and ../nat are not
2603 listed as include file search paths.
2604 (linux-waitpid.o): New object file rule.
2605 * configure.srv (srv_native_linux_obj): New variable.
2606 Replace all occurrences of linux native object files with
2607 $srv_native_linux_obj.
2608 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2609 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2610 (linux_enable_event_reporting): Remove declaration.
2611 (my_waitpid): Moved to common/linux-waitpid.c.
2612 (linux_wait_for_event): Pass ptid when calling
2613 linux_enable_event_reporting.
2614 (linux_supports_tracefork_flag): Remove.
2615 (linux_enable_event_reporting): Likewise.
2616 (linux_tracefork_grandchild): Remove.
2617 (STACK_SIZE): Moved to common/linux-ptrace.c.
2618 (linux_tracefork_child): Remove.
2619 (linux_test_for_tracefork): Remove.
2620 (linux_look_up_symbols): Call linux_supports_traceclone.
2621 (initialize_low): Remove call to linux_test_for_tracefork.
2622 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2623 common/linux-ptrace.h.
2624 (PTRACE_TYPE_ARG4): Likewise.
2625 Include linux-ptrace.h.
2626
2627 2013-08-21 Pedro Alves <palves@redhat.com>
2628
2629 * config.in: Renegerate.
2630
2631 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2632
2633 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2634 (SFILES): Remove $(srcdir)/common/target-common.c and
2635 add $(srcdir)/target/waitstatus.c.
2636 (OBS): Remove target-common.o and add waitstatus.o.
2637 (server_h): Remove $(srcdir)/../common/target-common.h and
2638 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2639 and $(srcdir)/../target/waitstatus.h.
2640 (target-common.o): Remove.
2641 (waitstatus.o): New target object file.
2642 * target.h: Do not include target-common.h and
2643 include target/resume.h, target/wait.h and
2644 target/waitstatus.h.
2645
2646 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2647
2648 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2649 to PTRACE_TYPE_ARG3.
2650 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2651 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2652 PTRACE_TYPE_ARG4.
2653 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2654 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2655
2656 2013-07-27 Jie Zhang <jie@codesourcery.com>
2657 Daniel Jacobowitz <dan@codesourcery.com>
2658 Yao Qi <yao@codesourcery.com>
2659
2660 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2661 (mips-linux-watch.o): New rule.
2662 (mips_linux_watch_h): New variable.
2663 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2664 srv_tgtobj.
2665 * linux-mips-low.c: Include mips-linux-watch.h.
2666 (struct arch_process_info, struct arch_lwp_info): New.
2667 (update_watch_registers_callback): New function.
2668 (mips_linux_new_process, mips_linux_new_thread) New functions.
2669 (mips_linux_prepare_to_resume, mips_insert_point): New
2670 functions.
2671 (mips_remove_point, mips_stopped_by_watchpoint): New
2672 functions.
2673 (rsp_bp_type_to_target_hw_bp_type): New function.
2674 (mips_stopped_data_address): New function.
2675 (the_low_target): Add watchpoint support functions.
2676
2677 2013-07-27 Yao Qi <yao@codesourcery.com>
2678
2679 * i386-low.c: Include break-common.h.
2680 (enum target_hw_bp_type): Remove.
2681
2682 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2683
2684 * Makefile.in (SFILES): /common/target-common.c.
2685 (OBS): Add target-common.o.
2686 (server_h): Add $(srcdir)/../common/target-common.h.
2687 (target-common.o): New target.
2688 * server.c (queue_stop_reply_callback): Free
2689 status string after use.
2690 * target.c (target_waitstatus_to_string): Remove.
2691 * target.h: Include target-common.h.
2692 (resume_kind): Likewise.
2693 (target_waitkind): Likewise.
2694 (target_waitstatus): Likewise.
2695 (TARGET_WNOHANG): Likewise.
2696
2697 2013-07-04 Yao Qi <yao@codesourcery.com>
2698
2699 * Makefile.in (host_alias): Use @host_noncanonical@.
2700 (target_alias): Use @target_noncanonical@.
2701 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2702 ACX_NONCANONICAL_HOST.
2703 * configure: Regenerated.
2704
2705 Revert:
2706 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2707
2708 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2709 * configure: Rebuild.
2710 * Makefile.in (version_host, version_target): Get from configure.
2711 (version.c): Use $(version_host) and $(version_target).
2712
2713 2013-07-03 Pedro Alves <palves@redhat.com>
2714
2715 * Makefile.in (config.status): Depend on development.sh.
2716 * acinclude.m4: Include libmcheck.m4.
2717 * configure: Regenerate.
2718
2719 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2720
2721 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2722 attribute inside the parentheses.
2723 (winapi_DebugSetProcessKillOnExit): Ditto.
2724 (winapi_DebugBreakProcess): Ditto.
2725 (winapi_GenerateConsoleCtrlEvent): Ditto.
2726
2727 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2728
2729 * notif.h (notif_event): Add a dummy member to avoid compiler
2730 errors.
2731
2732 2013-07-01 Pedro Alves <palves@redhat.com>
2733
2734 * hostio.c (HOSTIO_PATH_MAX): Define.
2735 (require_filename, handle_open, handle_unlink, handle_readlink):
2736 Use it.
2737
2738 2013-07-01 Pedro Alves <palves@redhat.com>
2739
2740 * server.h: Include "pathmax.h".
2741 * linux-low.c: Don't include sys/param.h.
2742 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2743 MAXPATHLEN.
2744 * win32-low.c: Don't include sys/param.h.
2745 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2746
2747 2013-07-01 Pedro Alves <palves@redhat.com>
2748
2749 * event-loop.c: Don't check HAVE_UNISTD_H before including
2750 <unistd.h>.
2751 * gdbreplay.c: Likewise.
2752 * remote-utils.c: Likewise.
2753 * server.c: Likewise.
2754 * configure.ac: Don't check for unistd.h.
2755 * configure: Regenerate.
2756
2757 2013-06-28 Tom Tromey <tromey@redhat.com>
2758
2759 * Makefile.in (version.c): Use version.in, not
2760 common/version.in.
2761
2762 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2763
2764 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2765 * configure: Rebuild.
2766 * Makefile.in (version_host, version_target): Get from configure.
2767 (version.c): Use $(version_host) and $(version_target).
2768
2769 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2770
2771 Fix trace-status to output user name without trailing colon.
2772 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2773
2774 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2775
2776 Fix trace-status to output proper start-time and stop-time.
2777 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2778 output start time and stop time in hex as gdb expects.
2779
2780 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2781
2782 * tracepoint.c (build_traceframe_info_xml): Output trace state
2783 variables present in the trace buffer.
2784
2785 2013-06-24 Tom Tromey <tromey@redhat.com>
2786
2787 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2788 create-version.sh.
2789 (version.o): Remove.
2790 * gdbreplay.c: Include version.h.
2791 (version, host_name): Don't declare.
2792 * server.h: Include version.h.
2793 (version, host_name): Don't declare.
2794
2795 2013-06-12 Pedro Alves <palves@redhat.com>
2796
2797 * linux-x86-low.c (linux_is_elf64): Delete global.
2798 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2799 with local linux_pid_exe_is_elf_64_file use.
2800
2801 2013-06-11 Pedro Alves <palves@redhat.com>
2802
2803 * linux-low.c (regset_disabled, disable_regset): New functions.
2804 (regsets_fetch_inferior_registers)
2805 (regsets_store_inferior_registers): Use them.
2806 (initialize_regsets_info); Don't allocate the disabled_regsets
2807 array here.
2808 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2809 comment.
2810
2811 2013-06-11 Pedro Alves <palves@redhat.com>
2812
2813 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2814 xmalloc.
2815
2816 2013-06-11 Pedro Alves <palves@redhat.com>
2817
2818 * linux-x86-low.c (initialize_low_arch): Call
2819 init_registers_x32_avx_linux.
2820
2821 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2822
2823 Fix compatibility with Android Bionic.
2824 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2825 it is not empty.
2826
2827 2013-06-07 Pedro Alves <palves@redhat.com>
2828
2829 PR server/14823
2830 * Makefile.in (OBS): Add tdesc.o.
2831 (IPA_OBJS): Add tdesc-ipa.o.
2832 (tdesc-ipa.o): New rule.
2833 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2834 interface.
2835 * linux-low.c (new_inferior): Delete.
2836 (disabled_regsets, num_regsets): Delete.
2837 (linux_add_process): Adjust to set the new per-process
2838 new_inferior flag.
2839 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2840 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2841 was a stop. When calling arch_setup, switch the current inferior
2842 to the thread that got an event.
2843 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2844 (regsets_fetch_inferior_registers)
2845 (regsets_store_inferior_registers): New regsets_info parameter.
2846 Adjust to use it.
2847 (linux_register_in_regsets): New regs_info parameter. Adjust to
2848 use it.
2849 (register_addr, fetch_register, store_register): New usrregs_info
2850 parameter. Adjust to use it.
2851 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2852 parameter regs_info. Adjust to use it.
2853 (linux_fetch_registers): Get the current inferior's regs_info, and
2854 adjust to use it.
2855 (linux_store_registers): Ditto.
2856 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2857 (initialize_low): Don't initialize the target_regsets here. Call
2858 initialize_low_arch.
2859 * linux-low.h (target_regsets): Delete declaration.
2860 (struct regsets_info): New.
2861 (struct usrregs_info): New.
2862 (struct regs_info): New.
2863 (struct process_info_private) <new_inferior>: New field.
2864 (struct linux_target_ops): Delete the num_regs, regmap, and
2865 regset_bitmap fields. New field regs_info.
2866 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2867 * i387-fp.c (num_xmm_registers): Delete.
2868 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2869 calls to new interface.
2870 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2871 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2872 Infer the number of xmm registers from the regcache's target
2873 description.
2874 * i387-fp.h (num_xmm_registers): Delete.
2875 * inferiors.c (add_thread): Don't install the thread's regcache
2876 here.
2877 * proc-service.c (gregset_info): Fetch the current inferior's
2878 regs_info. Adjust to use it.
2879 * regcache.c: Include tdesc.h.
2880 (register_bytes, reg_defs, num_registers)
2881 (gdbserver_expedite_regs): Delete.
2882 (get_thread_regcache): If the thread doesn't have a regcache yet,
2883 create one, instead of aborting gdbserver.
2884 (regcache_invalidate_one): Rename to ...
2885 (regcache_invalidate_thread): ... this.
2886 (regcache_invalidate_one): New.
2887 (regcache_invalidate): Only invalidate registers of the current
2888 process.
2889 (init_register_cache): Add target_desc parameter, and use it.
2890 (new_register_cache): Ditto. Assert the target description has a
2891 non zero registers_size.
2892 (regcache_cpy): Add assertions. Adjust.
2893 (realloc_register_cache, set_register_cache): Delete.
2894 (registers_to_string, registers_from_string): Adjust.
2895 (find_register_by_name, find_regno, find_register_by_number)
2896 (register_cache_size): Add target_desc parameter, and use it.
2897 (free_register_cache_thread, free_register_cache_thread_one)
2898 (regcache_release, register_cache_size): New.
2899 (register_size): Add target_desc parameter, and use it.
2900 (register_data, supply_register, supply_register_zeroed)
2901 (supply_regblock, supply_register_by_name, collect_register)
2902 (collect_register_as_string, collect_register_by_name): Adjust.
2903 * regcache.h (struct target_desc): Forward declare.
2904 (struct regcache) <tdesc>: New field.
2905 (init_register_cache, new_register_cache): Add target_desc
2906 parameter.
2907 (regcache_invalidate_thread): Declare.
2908 (regcache_invalidate_one): Delete declaration.
2909 (regcache_release): Declare.
2910 (find_register_by_number, register_cache_size, register_size)
2911 (find_regno): Add target_desc parameter.
2912 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2913 declarations.
2914 * remote-utils.c: Include tdesc.h.
2915 (outreg, prepare_resume_reply): Adjust.
2916 * server.c: Include tdesc.h.
2917 (gdbserver_xmltarget): Delete declaration.
2918 (get_features_xml, process_serial_event): Adjust.
2919 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2920 declare.
2921 (struct process_info) <tdesc>: New field.
2922 (ipa_tdesc): Declare.
2923 * tdesc.c: New file.
2924 * tdesc.h: New file.
2925 * tracepoint.c: Include tdesc.h.
2926 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2927 (get_context_regcache): Adjust to pass ipa_tdesc down.
2928 (do_action_at_tracepoint): Adjust to get the register cache size
2929 from the context regcache's description.
2930 (traceframe_walk_blocks): Adjust to get the register cache size
2931 from the current trace frame's description.
2932 (traceframe_get_pc): Adjust to get current trace frame's
2933 description and pass it down.
2934 (gdb_collect): Adjust to get the register cache size from the
2935 IPA's description.
2936 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2937 (gdbserver_xmltarget): Delete.
2938 (initialize_low_tracepoint): Set the ipa's target description.
2939 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2940 (initialize_low_tracepoint): Set the ipa's target description.
2941 * linux-x86-low.c: Include tdesc.h.
2942 [__x86_64__] (is_64bit_tdesc): New.
2943 (ps_get_thread_area, x86_get_thread_area): Use it.
2944 (i386_cannot_store_register): Rename to ...
2945 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2946 (i386_cannot_fetch_register): Rename to ...
2947 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2948 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2949 to new interface.
2950 (target_regsets): Rename to ...
2951 (x86_regsets): ... this.
2952 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2953 interface.
2954 (x86_siginfo_fixup): Use is_64bit_tdesc.
2955 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2956 (tdesc_x32_avx_linux, tdesc_x32_linux)
2957 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2958 Declare.
2959 (x86_linux_update_xmltarget): Delete.
2960 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2961 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2962 (AMD64_LINUX_USER64_CS): New.
2963 (x86_linux_read_description): New, based on
2964 x86_linux_update_xmltarget.
2965 (same_process_callback): New.
2966 (x86_arch_setup_process_callback): New.
2967 (x86_linux_update_xmltarget): New.
2968 (x86_regsets_info): New.
2969 (amd64_linux_regs_info): New.
2970 (i386_linux_usrregs_info): New.
2971 (i386_linux_regs_info): New.
2972 (x86_linux_regs_info): New.
2973 (x86_arch_setup): Reimplement.
2974 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2975 (x86_emit_ops): Ditto.
2976 (the_low_target): Adjust. Install x86_linux_regs_info,
2977 x86_cannot_fetch_register, and x86_cannot_store_register.
2978 (initialize_low_arch): New.
2979 * linux-ia64-low.c (tdesc_ia64): Declare.
2980 (ia64_fetch_register): Adjust.
2981 (ia64_usrregs_info, regs_info): New globals.
2982 (ia64_regs_info): New function.
2983 (the_low_target): Adjust.
2984 (initialize_low_arch): New function.
2985 * linux-sparc-low.c (tdesc_sparc64): Declare.
2986 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2987 Adjust.
2988 (sparc_arch_setup): New function.
2989 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2990 (the_low_target): Adjust.
2991 (initialize_low_arch): New function.
2992 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2993 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2994 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2995 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2996 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2997 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2998 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2999 (tdesc_powerpc_isa205_vsx64l): Declare.
3000 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3001 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3002 (ppc_set_pc, ppc_get_hwcap): Adjust.
3003 (ppc_usrregs_info): Forward declare.
3004 (!__powerpc64__) ppc_regmap_adjusted: New global.
3005 (ppc_arch_setup): Adjust to the current process'es target
3006 description.
3007 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3008 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3009 (ppc_store_evrregset): Adjust.
3010 (target_regsets): Rename to ...
3011 (ppc_regsets): ... this, and make static.
3012 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3013 (ppc_regs_info): New function.
3014 (the_low_target): Adjust.
3015 (initialize_low_arch): New function.
3016 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3017 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3018 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3019 (tdesc_s390x_linux64v2): Declare.
3020 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3021 (s390_fill_gregset, s390_store_last_break): Adjust.
3022 (target_regsets): Rename to ...
3023 (s390_regsets): ... this, and make static.
3024 (s390_get_pc, s390_set_pc): Adjust.
3025 (s390_get_hwcap): New target_desc parameter, and use it.
3026 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3027 (s390_arch_setup): Adjust to set the current process'es target
3028 description. Don't adjust the regmap.
3029 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3030 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3031 (regs_info_3264): New globals.
3032 (s390_regs_info): New function.
3033 (the_low_target): Adjust.
3034 (initialize_low_arch): New function.
3035 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3036 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3037 [__mips64] (init_registers_mips_linux)
3038 (init_registers_mips_dsp_linux): Delete defines.
3039 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3040 (have_dsp): New global.
3041 (mips_read_description): New, based on mips_arch_setup.
3042 (mips_arch_setup): Reimplement.
3043 (get_usrregs_info): New function.
3044 (mips_cannot_fetch_register, mips_cannot_store_register)
3045 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3046 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3047 (target_regsets): Rename to ...
3048 (mips_regsets): ... this, and make static.
3049 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3050 (dsp_regs_info, regs_info): New globals.
3051 (mips_regs_info): New function.
3052 (the_low_target): Adjust.
3053 (initialize_low_arch): New function.
3054 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3055 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3056 Declare.
3057 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3058 (arm_read_description): New, with bits factored from
3059 arm_arch_setup.
3060 (arm_arch_setup): Reimplement.
3061 (target_regsets): Rename to ...
3062 (arm_regsets): ... this, and make static.
3063 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3064 (arm_regs_info): New function.
3065 (the_low_target): Adjust.
3066 (initialize_low_arch): New function.
3067 * linux-m68k-low.c (tdesc_m68k): Declare.
3068 (target_regsets): Rename to ...
3069 (m68k_regsets): ... this, and make static.
3070 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3071 (m68k_regs_info): New function.
3072 (m68k_arch_setup): New function.
3073 (the_low_target): Adjust.
3074 (initialize_low_arch): New function.
3075 * linux-sh-low.c (tdesc_sharch): Declare.
3076 (target_regsets): Rename to ...
3077 (sh_regsets): ... this, and make static.
3078 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3079 (sh_regs_info, sh_arch_setup): New functions.
3080 (the_low_target): Adjust.
3081 (initialize_low_arch): New function.
3082 * linux-bfin-low.c (tdesc_bfin): Declare.
3083 (bfin_arch_setup): New function.
3084 (bfin_usrregs_info, regs_info): New globals.
3085 (bfin_regs_info): New function.
3086 (the_low_target): Adjust.
3087 (initialize_low_arch): New function.
3088 * linux-cris-low.c (tdesc_cris): Declare.
3089 (cris_arch_setup): New function.
3090 (cris_usrregs_info, regs_info): New globals.
3091 (cris_regs_info): New function.
3092 (the_low_target): Adjust.
3093 (initialize_low_arch): New function.
3094 * linux-cris-low.c (tdesc_crisv32): Declare.
3095 (cris_arch_setup): New function.
3096 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3097 (cris_regs_info): New function.
3098 (the_low_target): Adjust.
3099 (initialize_low_arch): New function.
3100 * linux-m32r-low.c (tdesc_m32r): Declare.
3101 (m32r_arch_setup): New function.
3102 (m32r_usrregs_info, regs_info): New globals.
3103 (m32r_regs_info): Adjust.
3104 (initialize_low_arch): New function.
3105 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3106 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3107 (tic6x_usrregs_info): Forward declare.
3108 (tic6x_read_description): New function, based on ...
3109 (tic6x_arch_setup): ... this. Reimplement.
3110 (target_regsets): Rename to ...
3111 (tic6x_regsets): ... this, and make static.
3112 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3113 (tic6x_regs_info): New function.
3114 (the_low_target): Adjust.
3115 (initialize_low_arch): New function.
3116 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3117 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3118 (target_regsets): Rename to ...
3119 (xtensa_regsets): ... this, and make static.
3120 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3121 globals.
3122 (xtensa_arch_setup, xtensa_regs_info): New functions.
3123 (the_low_target): Adjust.
3124 (initialize_low_arch): New function.
3125 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3126 (nios2_arch_setup): Set the current process'es tdesc.
3127 (target_regsets): Rename to ...
3128 (nios2_regsets): ... this.
3129 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3130 (nios2_regs_info): New function.
3131 (the_low_target): Adjust.
3132 (initialize_low_arch): New function.
3133 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3134 (aarch64_arch_setup): Set the current process'es tdesc.
3135 (target_regsets): Rename to ...
3136 (aarch64_regsets): ... this.
3137 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3138 (aarch64_regs_info): New function.
3139 (the_low_target): Adjust.
3140 (initialize_low_arch): New function.
3141 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3142 globals.
3143 (target_regsets): Rename to ...
3144 (tile_regsets): ... this.
3145 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3146 (tile_regs_info): New function.
3147 (tile_arch_setup): Set the current process'es tdesc.
3148 (the_low_target): Adjust.
3149 (initialize_low_arch): New function.
3150 * spu-low.c (tdesc_spu): Declare.
3151 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3152 * win32-arm-low.c (tdesc_arm): Declare.
3153 (arm_arch_setup): New function.
3154 (the_low_target): Install arm_arch_setup instead of
3155 init_registers_arm.
3156 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3157 (init_windows_x86): Rename to ...
3158 (i386_arch_setup): ... this. Set `win32_tdesc'.
3159 (the_low_target): Adjust.
3160 * win32-low.c (win32_tdesc): New global.
3161 (child_add_thread): Don't create the thread cache here.
3162 (do_initial_child_stuff): Set the new process'es tdesc.
3163 * win32-low.h (struct target_desc): Forward declare.
3164 (win32_tdesc): Declare.
3165 * lynx-i386-low.c (tdesc_i386): Declare global.
3166 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3167 * lynx-low.c (lynx_tdesc): New global.
3168 (lynx_add_process): Set the new process'es tdesc.
3169 * lynx-low.h (struct target_desc): Forward declare.
3170 (lynx_tdesc): Declare global.
3171 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3172 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3173 * nto-low.c (nto_tdesc): New global.
3174 (do_attach): Set the new process'es tdesc.
3175 * nto-low.h (struct target_desc): Forward declare.
3176 (nto_tdesc): Declare.
3177 * nto-x86-low.c (tdesc_i386): Declare.
3178 (nto_x86_arch_setup): Set `nto_tdesc'.
3179
3180 2013-06-04 Gary Benson <gbenson@redhat.com>
3181
3182 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3183 to qSupported response when appropriate.
3184 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3185 with nonzero-length annex.
3186 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3187 arguments supplied in annex.
3188
3189 2013-05-31 Doug Evans <dje@google.com>
3190
3191 PR server/15594
3192 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3193 64 bits in 64-cross-32 environment.
3194
3195 2013-05-28 Pedro Alves <palves@redhat.com>
3196
3197 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3198 (aarch64-without-fpu.c): Delete rule.
3199 * configure.srv (aarch64*-*-linux*): Remove references to
3200 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3201 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3202 declaration.
3203
3204 2013-05-24 Pedro Alves <palves@redhat.com>
3205
3206 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3207 instead of strchr/decode_address. Error if the range isn't split
3208 with a ','. Don't assume there's be a ':' in the action.
3209
3210 2013-05-23 Yao Qi <yao@codesourcery.com>
3211 Pedro Alves <palves@redhat.com>
3212
3213 * linux-low.c (lwp_in_step_range): New function.
3214 (linux_wait_1): If the thread was range stepping and stopped
3215 outside the stepping range, report the stop to GDB. Otherwise,
3216 continue stepping. Add range stepping debug output.
3217 (linux_set_resume_request): Copy the step range from the resume
3218 request to the lwp.
3219 (linux_supports_range_stepping): New.
3220 (linux_target_ops) <supports_range_stepping>: Set to
3221 linux_supports_range_stepping.
3222 * linux-low.h (struct linux_target_ops)
3223 <supports_range_stepping>: New field.
3224 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3225 * linux-x86-low.c (x86_supports_range_stepping): New.
3226 (the_low_target) <supports_range_stepping>: Set to
3227 x86_supports_range_stepping.
3228 * server.c (handle_v_cont): Handle 'r' action.
3229 (handle_v_requests): Append ";r" if the target supports range
3230 stepping.
3231 * target.h (struct thread_resume) <step_range_start,
3232 step_range_end>: New fields.
3233 (struct target_ops) <supports_range_stepping>:
3234 New field.
3235 (target_supports_range_stepping): New macro.
3236
3237 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3238
3239 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3240 confusion in comment.
3241
3242 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3243
3244 * lynx-low.c (struct process_info_private): New type.
3245 (lynx_add_process): New function.
3246 (lynx_create_inferior, lynx_attach): Replace calls to
3247 add_process by calls to lynx_add_process.
3248 (lynx_resume): If PTID is null, then try using
3249 current_process()->private->last_wait_event_ptid.
3250 Add comments.
3251 (lynx_clear_inferiors): Delete. The contents of that function
3252 has been inlined in lynx_mourn;
3253 (lynx_wait_1): Save the ptid in the process's private data.
3254 (lynx_mourn): Free the process' private data. Replace call
3255 to lynx_clear_inferiors by call to clear_inferiors.
3256
3257 2013-05-17 Yao Qi <yao@codesourcery.com>
3258
3259 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3260 the right place.
3261
3262 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3263
3264 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3265 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3266 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3267 PT_TEXT_END_ADDR guards. Update comments.
3268 (linux_target_op) <read_offsets>: Conditionally define to
3269 linux_read_offsets if the target is UCLIBC and if it defines
3270 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3271
3272 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3273 Andrew Jenner <andrew@codesourcery.com>
3274
3275 * Makefile.in (SFILES): Add linux-nios2-low.c.
3276 (clean): Add action to delete nios2-linux.c.
3277 (nios2-linux.c): New rule.
3278 * configure.srv: Add nios2*-*-linux*.
3279 * linux-nios2-low.c: New.
3280
3281 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3282
3283 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3284
3285 2013-04-25 Hui Zhu <hui@codesourcery.com>
3286
3287 PR gdb/15186
3288 * ax.c (ax_printf): Add fflush.
3289
3290 2013-04-22 Tom Tromey <tromey@redhat.com>
3291
3292 * Makefile.in (SFILES): Add filestuff.c.
3293 (OBS): Add filestuff.o.
3294 (filestuff.o): New target.
3295 * config.in, configure: Rebuild.
3296 * configure.ac: Check for fdwalk, pipe2.
3297
3298 2013-04-17 Pedro Alves <palves@redhat.com>
3299
3300 * configure.ac (USE_THREAD_DB): Delete variable.
3301 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3302 Don't AC_SUBST USE_THREAD_DB.
3303 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3304 * config.in, configure: Regenerate.
3305
3306 2013-04-16 Pedro Alves <palves@redhat.com>
3307
3308 * linux-low.h (struct lwp_info) <thread_known>: Move under
3309 the USE_THREAD_DB #ifdef.
3310
3311 2013-04-16 Pedro Alves <palves@redhat.com>
3312
3313 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3314 (linux-low.o): Delete rule.
3315 * linux-low.h: Always include "gdb_thread_db.h" instead of
3316 conditionally including thread_db.h.
3317 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3318 HAVE_THREAD_DB_H.
3319
3320 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3321
3322 * Makefile.in (install-only): Fix make install regression.
3323
3324 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3325
3326 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3327 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3328 installation.
3329 * gdbserver.1: Remove.
3330
3331 2013-03-22 Pedro Alves <palves@redhat.com>
3332
3333 * linux-low.c (handle_extended_wait): Don't call
3334 linux_enable_event_reporting.
3335
3336 2013-03-15 Tony Theodore <tonyt@logyst.com>
3337
3338 PR build/9098:
3339 * Makefile.in (SHELL): Use @SHELL@.
3340
3341 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3342
3343 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3344 compiler warning.
3345
3346 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3347
3348 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3349 Remove extraneous NULL element.
3350
3351 2013-03-13 Yao Qi <yao@codesourcery.com>
3352
3353 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3354 'V' block in trace frame.
3355
3356 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3357
3358 * target.h (struct target_ops): Add btrace ops.
3359 (target_supports_btrace): New macro.
3360 (target_enable_btrace): New macro.
3361 (target_disable_btrace): New macro.
3362 (target_read_btrace): New macro.
3363 * gdbthread.h (struct thread_info): Add btrace field.
3364 * server.c: Include btrace-common.h.
3365 (handle_btrace_general_set): New function.
3366 (handle_btrace_enable): New function.
3367 (handle_btrace_disable): New function.
3368 (handle_general_set): Call handle_btrace_general_set.
3369 (handle_qxfer_btrace): New function.
3370 (struct qxfer qxfer_packets[]): Add btrace entry.
3371 * inferiors.c (remove_thread): Disable btrace.
3372 * linux-low: Include linux-btrace.h.
3373 (linux_low_enable_btrace): New function.
3374 (linux_low_read_btrace): New function.
3375 (linux_target_ops): Add btrace ops.
3376 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3377 Add srv_linux_btrace=yes.
3378 (x86_64-*-linux*): Add linux-btrace.o.
3379 Add srv_linux_btrace=yes.
3380 * configure.ac: Define HAVE_LINUX_BTRACE.
3381 * config.in: Regenerated.
3382 * configure: Regenerated.
3383
3384 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3385
3386 * server.c (handle_qxfer): Preserve error message if -3 is
3387 returned.
3388 (qxfer): Document the -3 return value.
3389
3390 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3391
3392 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3393 (linux_btrace_h): New variable.
3394 (linux-btrace.o): New rule.
3395
3396 2013-03-08 Stan Shebs <stan@codesourcery.com>
3397 Hafiz Abid Qadeer <abidh@codesourcery.com>
3398
3399 * tracepoint.c (trace_buffer_size): New global.
3400 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3401 (init_trace_buffer): Change to one-argument function. Allocate
3402 trace buffer memory.
3403 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3404 handle QTBuffer:size packet.
3405 (cmd_bigqtbuffer_size): New function.
3406 (initialize_tracepoint): Call init_trace_buffer with
3407 DEFAULT_TRACE_BUFFER_SIZE.
3408 * server.c (handle_query): Add QTBuffer:size in the
3409 supported packets.
3410
3411 2013-03-07 Yao Qi <yao@codesourcery.com>
3412
3413 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3414 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3415 of -1.
3416 (cmd_qtsp): Adjust condition. Do post increment.
3417 Set cur_action and cur_step_action back to 0.
3418
3419 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3420
3421 PR server/15236
3422 * linux-low.c (linux_write_memory): Return early success if LEN is
3423 zero.
3424
3425 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3426
3427 * configure.srv: Add x86_64-*-cygwin* as target.
3428
3429 2013-02-28 Tom Tromey <tromey@redhat.com>
3430
3431 * configure.ac: Invoke AC_SYS_LARGEFILE.
3432 * configure, config.in: Rebuild.
3433
3434 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3435
3436 * win32-low.c: Throughout, fix format strings and casts of
3437 printf-like functions to avoid type related warnings on all
3438 platforms.
3439 (get_child_debug_event): Print dwDebugEventCode as hex since
3440 that's how it's usually documented.
3441
3442 2013-02-28 Yao Qi <yao@codesourcery.com>
3443
3444 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3445 pulongest.
3446
3447 2013-02-27 Jiong Wang <jiwang@tilera.com>
3448
3449 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3450 (reg-tilegx32.c): New rule.
3451 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3452 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3453 different register info initializer according to elf class.
3454 (init_registers_tilgx32): New function. The tilegx32 register info
3455 initializer.
3456 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3457 (tile_store_gregset): Likewise.
3458
3459 2013-02-27 Yao Qi <yao@codesourcery.com>
3460
3461 * server.c (process_point_options): Print debug message when
3462 debug_threads is true.
3463
3464 2013-02-26 Yao Qi <yao@codesourcery.com>
3465
3466 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3467
3468 2013-02-19 Pedro Alves <palves@redhat.com>
3469 Kai Tietz <ktietz@redhat.com>
3470
3471 PR gdb/15161
3472
3473 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3474 instead of strtoul to extract address from packet.
3475 (process_serial_event) <'z'>: Likewise.
3476
3477 2013-02-18 Yao Qi <yao@codesourcery.com>
3478
3479 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3480
3481 2013-02-14 Pedro Alves <palves@redhat.com>
3482
3483 Plug memory leak.
3484
3485 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3486 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3487
3488 2013-02-14 Pedro Alves <palves@redhat.com>
3489
3490 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3491
3492 2013-02-14 Pedro Alves <palves@redhat.com>
3493
3494 * tracepoint.c (save_string): Delete.
3495 (add_tracepoint_action): Use savestring instead of save_string.
3496
3497 2013-02-12 Pedro Alves <palves@redhat.com>
3498
3499 * linux-xtensa-low.c: Ditto.
3500 * xtensa-xtregs.c: Ditto.
3501
3502 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3503
3504 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3505 thread_db.
3506
3507 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3508
3509 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3510 aarch64_num_wp_regs and aarch64_num_bp_regs to
3511 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3512
3513 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3514
3515 * linux-aarch64-low.c (ps_get_thread_area): Replace
3516 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3517
3518 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3519 Marcus Shawcroft <marcus.shawcroft@arm.com>
3520 Nigel Stephens <nigel.stephens@arm.com>
3521 Yufeng Zhang <yufeng.zhang@arm.com>
3522
3523 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3524 (aarch64.c, aarch64-without-fpu.c): New targets.
3525 * configure.srv (aarch64*-*-linux*): New.
3526 * linux-aarch64-low.c: New file.
3527
3528 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3529
3530 * linux-low.c (handle_extended_wait, linux_create_inferior)
3531 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3532 (dequeue_one_deferred_signal, linux_resume_one_thread)
3533 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3534 (linux_tracefork_grandchild, linux_test_for_tracefork)
3535 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3536 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3537 where the argument is 0.
3538
3539 2013-01-25 Yao Qi <yao@codesourcery.com>
3540
3541 * event-loop.c: Include "queue.h".
3542 (gdb_event_p): New typedef.
3543 (struct gdb_event) <next_event>: Remove.
3544 (event_queue): Change to QUEUE(gdb_event_p).
3545 (async_queue_event): Remove.
3546 (gdb_event_xfree): New.
3547 (initialize_event_loop): New.
3548 (process_event): Use API from QUEUE.
3549 (wait_for_event): Likewise.
3550 * server.c (main): Call initialize_event_loop.
3551 * server.h (initialize_event_loop): Declare.
3552
3553 2013-01-18 Yao Qi <yao@codesourcery.com>
3554
3555 * ax.h (struct eval_agent_expr_context): New.
3556 (gdb_eval_agent_expr): Update declaration.
3557 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3558 TFRAME. Add new argument CTX.
3559 * server.h (struct eval_agent_expr_context): Declare.
3560 (agent_mem_read, agent_tsv_read): Update declaration.
3561 (agent_mem_read_string): Likewise.
3562 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3563 (add_traceframe_block): Add new argument TPOINT.
3564 Increase TPOINT->traceframe_usage.
3565 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3566 eval_tracepoint_agent_expr.
3567 (condition_true_at_tracepoint): Likewise.
3568 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3569 (agent_mem_read_string, agent_tsv_read): Likewise.
3570
3571 2013-01-16 Yao Qi <yao@codesourcery.com>
3572
3573 * linux-low.c (linux_resume_one_lwp): Don't check
3574 'lwp->bp_reinsert != 0'.
3575
3576 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3577 Pedro Alves <palves@redhat.com>
3578
3579 * lynx-low.c (ptrace_request_to_str): Define a temporary
3580 macro and use it to simplify this function's implementation.
3581
3582 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3583
3584 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3585 sets errno.
3586
3587 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3588
3589 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3590
3591 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3592
3593 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3594
3595 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3596
3597 * lynx-low.c (lynx_resume): Use the resume_info parameter
3598 to determine the ptid for the lynx_ptrace call, unless
3599 it is equal to minus_one_ptid, in which case we use the
3600 ptid of the current_inferior.
3601 (lynx_wait_1): After having received a thread create/exit
3602 event, resume the inferior's execution using the signaling
3603 thread's ptid, rather than the old ptid.
3604
3605 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3606
3607 * lynx-low.c (lynx_resume): Delete variable ret.
3608
3609 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3610
3611 * gdbreplay.c (gdbreplay_version): Update copyright year.
3612 * server.c (gdbserver_version): Likewise.
3613
3614 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3615
3616 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3617 new thread.
3618
3619 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3620
3621 * lynx-low.c (ptrace_request_to_str): Add handling for
3622 PTRACE_GETTRACESIG.
3623
3624 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3625
3626 * lynx-low.c (lynx_attach): Delete variable new_process.
3627
3628 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3629
3630 * lynx-low.c (lynx_create_inferior): Delete variable
3631 new_process.
3632
3633 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3634
3635 * lynx-low.c (ptrace_request_to_str): Do not handle
3636 PTRACE_GETTHREADLIST if this macro does not exist.
3637
3638 2012-12-15 Yao Qi <yao@codesourcery.com>
3639
3640 * Makefile.in (OBS): Add notif.o.
3641 * notif.c, notif.h: New.
3642 * server.c: Include "notif.h".
3643 (struct vstop_notif) <next>: Remove.
3644 <base>: New field.
3645 (queue_stop_reply): Update.
3646 (push_event, send_next_stop_reply): Remove.
3647 (discard_queued_stop_replies): Update.
3648 (notif_stop): New variable.
3649 (handle_v_stopped): Remove.
3650 (handle_v_requests): Don't call handle_v_stopped. Call
3651 handle_ack_notif instead.
3652 (queue_stop_reply_callback): Call notif_event_enque instead
3653 of queue_stop_reply.
3654 (handle_status): Don't call send_next_stop_reply, call
3655 notif_write_event instead.
3656 (kill_inferior_callback): Likewise.
3657 (detach_or_kill_inferior_callback): Likewise.
3658 (main): Call initialize_notif.
3659 (process_serial_event): Call QUEUE_is_empty.
3660 (handle_target_event): Call notif_push instead of push event.
3661 * server.h (push_event): Remove declaration.
3662
3663 2012-12-10 Tom Tromey <tromey@redhat.com>
3664
3665 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3666 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3667 macros.
3668 (.c.o): Rewrite.
3669 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3670 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3671 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3672 (amd64-linux-ipa.o, ax.o): Rewrite.
3673 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3674 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3675 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3676 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3677 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3678 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3679 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3680 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3681 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3682 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3683 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3684 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3685 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3686 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3687 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3688 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3689 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3690 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3691 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3692 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3693 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3694 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3695 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3696 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3697 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3698 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3699 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3700 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3701 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3702 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3703 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3704 (reg-tilegx.o): Remove.
3705 (all_object_files): New macro.
3706 Include .deps files.
3707 * aclocal.m4, configure: Rebuild.
3708 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3709 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3710 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3711
3712 2012-12-05 Tom Tromey <tromey@redhat.com>
3713
3714 PR gdb/14917:
3715 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3716
3717 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3718
3719 * configure.ac: Check for linux/perf_event.h.
3720 * config.in: Regenerated.
3721 * configure: Regenerated.
3722
3723 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3724
3725 * hostio.c (handle_readlink): Decrease buffer size
3726 parameter passed to readlink by one byte.
3727
3728 2012-11-26 Yao Qi <yao@codesourcery.com>
3729
3730 * configure.ac (build_warnings): Append '-Wempty-body'.
3731 * configure: Regenerated.
3732 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3733 body.
3734
3735 2012-11-15 Pierre Muller <muller@sourceware.org>
3736
3737 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3738 * config.in: Regenerate.
3739 * configure: Regenerate.
3740 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3741 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3742 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3743 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3744 header.
3745 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3746 instead of <sys/wait.h> header.
3747 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3748
3749 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3750
3751 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3752 (various make rules): Remove -DGDBSERVER
3753
3754 2012-11-09 Yao Qi <yao@codesourcery.com>
3755
3756 * spu-low.c (current_ptid): Move it to ..
3757 * gdbthread.h: ... here. New.
3758 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3759 * server.c (myresume, process_serial_event): Likewise.
3760 * thread-db.c (thread_db_find_new_threads): Likewise.
3761 * tracepoint.c (run_inferior_command): Likewise.
3762
3763 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3764
3765 * server.c (handle_search_memory_1): Include access length in
3766 warning message.
3767
3768 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3769
3770 * linux-crisv32-low.c: Fix compile errors.
3771
3772 2012-09-04 Yao Qi <yao@codesourcery.com>
3773
3774 * tracepoint.c (cmd_qtsv): Adjust debug message.
3775 Don't check CUR_TPOINT.
3776
3777 2012-08-28 Yao Qi <yao@codesourcery.com>
3778
3779 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3780 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3781 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3782 Remove declarations of xmalloc, xreallloc, xstrdup and
3783 freeargv.
3784 * Makefile.in (libiberty_h): New.
3785 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3786 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3787
3788 2012-08-23 Yao Qi <yao@codesourcery.com>
3789
3790 * server.h: Remove declaration of 'xsnprintf'.
3791
3792 2012-08-22 Keith Seitz <keiths@redhat.com>
3793
3794 * server.h: Include build-gnulib-gbserver/config.h.
3795 * gdbreplay.c: Likewise.
3796
3797 2012-08-08 Doug Evans <dje@google.com>
3798
3799 * Makefile.in (SFILES): Add gdb_vecs.c.
3800 (OBS): Add gdb_vecs.o.
3801 (gdb_vecs_h, host_defs_h): New variables.
3802 (thread-db.o): Add $(gdb_vecs_h) dependency.
3803 (gdb_vecs.o): New rule.
3804 * thread-db.c: #include "gdb_vecs.h".
3805 (thread_db_load_search): Use a vector to iterate over path elements.
3806 Handle text appearing after "$pdir".
3807
3808 * configure.ac: Add check for strstr.
3809 * config.in: Regenerate.
3810 * configure: Regenerate.
3811
3812 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3813
3814 * hostio.c (handle_pread): If pread fails, fall back to attempting
3815 lseek/read.
3816 (handle_pwrite): Likewise for pwrite.
3817
3818 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3819
3820 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3821 between unsupported TYPE and unimplementable ADDR/LEN combination.
3822 (arm_insert_point): Act on new return value.
3823
3824 2012-07-31 Pedro Alves <palves@redhat.com>
3825
3826 * server.c (process_point_options): Only skip tokens if we find
3827 one that is unrecognized. Don't treat 'X' specially while
3828 skipping unrecognized tokens.
3829
3830 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3831
3832 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3833 to 4-byte-align HW breakpoint addresses for Thumb.
3834
3835 2012-07-27 Yao Qi <yao@codesourcery.com>
3836
3837 PR remote/14161.
3838
3839 * server.h: Declare gdb_agent_about_to_close.
3840 * target.c (kill_inferior): Include "agent.h".
3841 New. Send command 'kill'.
3842 * target.h (kill_inferior): Removed macro.
3843 * tracepoint.c (gdb_agent_about_to_close): New.
3844 (gdb_agent_helper_thread): Handle command 'close'.
3845 Wait endlessly until the inferior stops.
3846 Install gdb_agent_remove_socket to atexit hook.
3847 (agent_socket_name): New static variable.
3848 (gdb_agent_socket_init): Replace local variable 'name' with
3849 'agent_socket_name'.
3850 (gdb_agent_remove_socket): New.
3851
3852 2012-07-27 Yao Qi <yao@codesourcery.com>
3853
3854 * server.c (process_point_options): Stop at 'X' when parsing.
3855
3856 2012-07-19 Michael Eager <eager@eagercon.com>
3857
3858 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3859 to hw_execute.
3860 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3861 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3862 hardware breakpoint.
3863
3864 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3865
3866 * gdbserver/linux-low.c (initialize_low): Call
3867 linux_ptrace_init_warnings.
3868
3869 2012-07-02 Doug Evans <dje@google.com>
3870
3871 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3872 pointer to int.
3873
3874 2012-07-02 Stan Shebs <stan@codesourcery.com>
3875
3876 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3877 (ax.o): Add it to build rule.
3878 (ax-ipa.o): Ditto.
3879 (OBS): Add format.o.
3880 (IPA_OBS): Add format.o.
3881 * server.c (handle_query): Claim support for breakpoint commands.
3882 (process_point_options): Add command case.
3883 (process_serial_event): Leave running if there are printfs in
3884 effect.
3885 * mem-break.h (any_persistent_commands): Declare.
3886 (add_breakpoint_commands): Declare.
3887 (gdb_no_commands_at_breakpoint): Declare.
3888 (run_breakpoint_commands): Declare.
3889 * mem-break.c (struct point_command_list): New struct.
3890 (struct breakpoint): New field command_list.
3891 (any_persistent_commands): New function.
3892 (add_commands_to_breakpoint): New function.
3893 (add_breakpoint_commands): New function.
3894 (gdb_no_commands_at_breakpoint): New function.
3895 (run_breakpoint_commands): New function.
3896 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3897 locally.
3898 * ax.c: Include format.h.
3899 (ax_printf): New function.
3900 (gdb_eval_agent_expr): Add printf opcode.
3901
3902 2012-06-13 Yao Qi <yao@codesourcery.com>
3903
3904 * server.c (start_inferior): Remove duplicated writes to fields
3905 'last_resume_kind' and 'last_status' of 'current_inferior'.
3906
3907 2012-06-12 Yao Qi <yao@codesourcery.com>
3908 Pedro Alves <palves@redhat.com>
3909
3910 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3911 comment.
3912 * server.c (handle_v_cont): Extend comment.
3913
3914 2012-06-11 Yao Qi <yao@codesourcery.com>
3915
3916 * linux-low.c (linux_attach): Add 'static'.
3917
3918 2012-06-06 Yao Qi <yao@codesourcery.com>
3919
3920 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3921
3922 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3923
3924 Fix gcc -flto compilation warning.
3925 * server.c (main): Make variable multi_mode and attach volatile.
3926
3927 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3928
3929 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3930 if the platform doesn't know about it.
3931
3932 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3933
3934 * Makefile.in (SFILES): Add linux-tile-low.c.
3935 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3936 * configure.srv: Handle tilegx-*-linux*.
3937 * linux-tile-low.c: New file.
3938
3939 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3940
3941 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3942
3943 2012-05-24 Pedro Alves <palves@redhat.com>
3944
3945 PR gdb/7205
3946
3947 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3948
3949 2012-05-24 Pedro Alves <palves@redhat.com>
3950
3951 PR gdb/7205
3952
3953 Replace target_signal with gdb_signal throughout.
3954
3955 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3956
3957 * linux-low.c (linux_store_registers): Avoid the copying sequence
3958 when no data has been retrieved by ptrace.
3959
3960 2012-05-22 Will Deacon <will.deacon@arm.com>
3961
3962 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3963 Include asm/ptrace.h.
3964 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3965 already defined.
3966
3967 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3968
3969 * linux-low.c (linux_store_registers): Don't re-retrieve data
3970 with ptrace that has already been obtained from /proc. Always
3971 copy any data retrieved with ptrace to the buffer supplied.
3972
3973 2012-05-11 Yao Qi <yao@codesourcery.com>
3974 Pedro Alves <palves@redhat.com>
3975
3976 * linux-low.c (enum stopping_threads_kind): New.
3977 (stopping_threads): Change type to `enum stopping_threads_kind'.
3978 (handle_extended_wait): If stopping and suspending threads, leave
3979 the new_lwp suspended too.
3980 (linux_wait_for_event): Adjust.
3981 (stop_all_lwps): Set `stopping_threads' to
3982 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3983 whether we're suspending threads or just stopping them. Assert no
3984 recursion happens.
3985
3986 2012-04-29 Yao Qi <yao@codesourcery.com>
3987
3988 * server.h: Move some code to ...
3989 * gdbthread.h: ... here. New.
3990 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3991 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3992 (nto-low.o, win32-low.o): Likewise.
3993 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3994 * regcache.c, remote-utils.c, server.c: Likewise.
3995 * target.c, tracepoint.c, win32-low.c: Likewise.
3996
3997 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3998
3999 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4000 (PTRACE_ARG4_TYPE): Likewise.
4001 (PTRACE_XFER_TYPE): Likewise.
4002 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4003 ptrace to PTRACE_ARG3_TYPE.
4004 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4005 (PTRACE_ARG4_TYPE): Likewise.
4006 (PTRACE_XFER_TYPE): Likewise.
4007 (linux_detach_one_lwp): Cast fourth argument of
4008 ptrace to long then PTRACE_ARG4_TYPE.
4009 (regsets_fetch_inferior_registers): Cast third argument of
4010 ptrace to long then PTRACE_ARG3_TYPE.
4011 (regsets_store_inferior_registers): Likewise.
4012
4013 2012-04-20 Pedro Alves <palves@redhat.com>
4014
4015 * configure: Regenerate.
4016
4017 2012-04-19 Pedro Alves <palves@redhat.com>
4018
4019 * Makefile.in (GNULIB_BUILDDIR): New.
4020 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4021 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4022 (all, install-only, uninstall, clean-info, all-lib, clean): No
4023 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4024 (maintainer-clean realclean distclean): Use subdir_do.
4025 (subdir_do): New.
4026 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4027 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4028 * acinclude.m4: Include acx_configure_dir.m4.
4029 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4030 calls. Call AC_PROG_RANLIB. Configure gnulib using
4031 ACX_CONFIGURE_DIR.
4032 (GNULIB): New.
4033 (GNULIB_STDINT_H): Adjust.
4034 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4035 * gdbreplay.c: Include build-gnulib/config.h.
4036 * server.h: Likewise.
4037 * aclocal.m4: Regenerate.
4038 * config.in: Regenerate.
4039 * configure: Regenerate.
4040
4041 2012-04-19 Pedro Alves <palves@redhat.com>
4042
4043 * Makefile.in (LIBGNU, INCGNU): Adjust.
4044 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4045 (all, install-only, uninstall, clean-info, all-lib, clean)
4046 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4047 * configure.ac: Adjust AC_OUTPUT output.
4048 * aclocal.m4: Regenerate.
4049 * configure: Regenerate.
4050
4051 2012-04-19 Pedro Alves <palves@redhat.com>
4052
4053 * Makefile.in (generated_files): New.
4054 (server_h): Remove the explicit dependency on config.h, and depend
4055 on $generated_files.
4056
4057 2012-04-19 Pedro Alves <palves@redhat.com>
4058
4059 * Makefile.in (INCGNU): Add -Ignulib.
4060
4061 2012-04-19 Pedro Alves <palves@redhat.com>
4062
4063 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4064 (INCGNU): ... this, and spell out -I here.
4065 (GNULIB_LIB): Rename to ...
4066 (LIBGNU): ... this.
4067 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4068
4069 2012-04-19 Pedro Alves <palves@redhat.com>
4070
4071 * config.in: Regenerate.
4072
4073 2012-04-19 Pedro Alves <palves@redhat.com>
4074
4075 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4076 * server.h (memmem): Remove declaration.
4077 * config.in: Regenerate.
4078 * configure: Regenerate.
4079
4080 2012-04-19 Yao Qi <yao@codesourcery.com>
4081
4082 * Makefile.in (SFILES): Add common/vec.c.
4083 (OBS): Add vec.o.
4084 (vec.o): New rule.
4085
4086 2012-04-19 Yao Qi <yao@codesourcery.com>
4087
4088 * remote-utils.c (prepare_resume_reply): Replace with macro
4089 target_core_of_thread.
4090 * server.c (handle_qxfer_threads_proper): Likewise.
4091 * target.h (traget_core_of_thread): New macro.
4092
4093 2012-04-18 Pedro Alves <palves@redhat.com>
4094
4095 * aclocal.m4: Regenerate.
4096 * configure: Regenerate.
4097
4098 2012-04-16 Yao Qi <yao@codesourcery.com>
4099
4100 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4101 duplicated on address.
4102
4103 2012-04-16 Yao Qi <yao@codesourcery.com>
4104
4105 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4106 (struct tracepoint_action_ops) <send>: New field.
4107 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4108 (agent_expr_send, x_tracepoint_action_send): New.
4109 (l_tracepoint_action_send): New.
4110 (cmd_qtdp): Download and install tracepoint
4111 according to `use_agent'.
4112 (run_inferior_command): Add one more parameter `len'.
4113 Update callers.
4114 (tracepoint_send_agent): New.
4115 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4116
4117 2012-04-16 Yao Qi <yao@codesourcery.com>
4118
4119 * tracepoint.c (download_tracepoints): Moved to ...
4120 (cmd_qtstart): ... here.
4121
4122 2012-04-14 Yao Qi <yao@codesourcery.com>
4123
4124 * tracepoint.c: Include inttypes.h.
4125 (struct collect_memory_action): Use sized types.
4126 (struct tracepoint): Likewise.
4127 (cmd_qtdp, stop_tracing): Update print specifiers.
4128 (cmd_qtp, response_tracepoint): Likewise.
4129 (collect_data_at_tracepoint): Likewise.
4130 (collect_data_at_step): Likewise.
4131
4132 2012-04-14 Yao Qi <yao@codesourcery.com>
4133
4134 Import gnulib module inttypes.
4135 * aclocal.m4, config.in, configure: Regenerated.
4136
4137 2012-04-14 Yao Qi <yao@codesourcery.com>
4138
4139 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4140 Makefile and config.status at last.
4141
4142 2012-04-13 Yao Qi <yao@codesourcery.com>
4143
4144 * tracepoint.c: Include stdint.h unconditionally.
4145
4146 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4147
4148 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4149 on BFD_HAVE_SYS_PROCFS_TYPE.
4150 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4151 * configure: Regenerate.
4152 * config.in: Likewise.
4153
4154 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4155
4156 * Makefile.in (clean): Also remove x32.c x32-linux.c
4157 x32-avx.c x32-avx-linux.c.
4158 (x32.o): New target.
4159 (x32.c): Likewise.
4160 (x32-linux.o): Likewise.
4161 (x32-linux.c): Likewise.
4162 (x32-avx.o): Likewise.
4163 (x32-avx.c): Likewise.
4164 (x32-avx-linux.o): Likewise.
4165 (x32-avx-linux.c): Likewise.
4166
4167 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4168 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4169 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4170 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4171 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4172 i386/x32-avx-linux.xml.
4173
4174 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4175 (init_registers_x32_avx_linux): Likwise.
4176 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4177 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4178
4179 2012-04-13 Pedro Alves <palves@redhat.com>
4180
4181 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4182 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4183 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4184 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4185 the sub-make.
4186
4187 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4188
4189 * linux-x86-low.c (compat_x32_clock_t): New.
4190 (compat_x32_siginfo_t): Likewise.
4191 (compat_x32_siginfo_from_siginfo): Likewise.
4192 (siginfo_from_compat_x32_siginfo): Likewise.
4193 (linux_is_elf64): Likewise.
4194 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4195 and siginfo_from_compat_x32_siginfo for x32.
4196 (x86_arch_setup): Set linux_is_elf64.
4197
4198 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4199
4200 PR gdb/13969
4201 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4202 e_machine field.
4203 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4204 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4205 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4206 compatible with process.
4207
4208 2012-04-12 Yao Qi <yao@codesourcery.com>
4209
4210 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4211 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4212 (install-only, install-info, clean): Handle sub dir gnulib.
4213 (all-lib, am--refresh): New targets.
4214 (memmem.o): Remove target.
4215 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4216 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4217 (AC_REPLACE_FUNCS): Remove memmem.
4218 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4219 (AC_OUTPUT): Generate Makefile in gnulib/.
4220 * aclocal.m4, config.in, configure: Regenerated.
4221
4222 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4223
4224 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4225
4226 2012-04-05 Pedro Alves <palves@redhat.com>
4227
4228 -Werror=strict-aliasing
4229
4230 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4231 pointer.
4232
4233 2012-04-04 Pedro Alves <palves@redhat.com>
4234
4235 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4236 (sparc_store_gregset_from_stack, sparc_store_gregset)
4237 (sparc_breakpoint_at): Fix formatting.
4238
4239 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4240
4241 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4242 are available.
4243 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4244 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4245 * config.in: Regenerate.
4246 * configure: Likewise.
4247
4248 2012-03-29 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4251 Correct ptrace arguments.
4252
4253 2012-03-28 Pedro Alves <palves@redhat.com>
4254
4255 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4256 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4257 (IA64_FR1_REGNUM): New defines.
4258 (ia64_fetch_register): New.
4259 (the_low_target): Install it.
4260 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4261 field.
4262 * linux-low.c (linux_fetch_registers): Try the
4263 the_low_target.fetch_register hook first.
4264
4265 * linux-arm-low.c (the_low_target): Adjust.
4266 * linux-bfin-low.c (the_low_target): Adjust.
4267 * linux-cris-low.c (the_low_target): Adjust.
4268 * linux-crisv32-low.c (the_low_target): Adjust.
4269 * linux-m32r-low.c (the_low_target): Adjust.
4270 * linux-m68k-low.c (the_low_target): Adjust.
4271 * linux-mips-low.c (the_low_target): Adjust.
4272 * linux-ppc-low.c (the_low_target): Adjust.
4273 * linux-s390-low.c (the_low_target): Adjust.
4274 * linux-sh-low.c (the_low_target): Adjust.
4275 * linux-sparc-low.c (the_low_target): Adjust.
4276 * linux-tic6x-low.c (the_low_target): Adjust.
4277 * linux-x86-low.c (the_low_target): Adjust.
4278 * linux-xtensa-low.c (the_low_target): Adjust.
4279
4280 2012-03-26 Pedro Alves <palves@redhat.com>
4281
4282 * server.c (handle_qxfer_libraries): Don't bail early if
4283 the_target->qxfer_libraries_svr4 is not NULL.
4284
4285 2012-03-26 Pedro Alves <palves@redhat.com>
4286
4287 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4288
4289 2012-03-23 Pedro Alves <palves@redhat.com>
4290
4291 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4292 "library-list-svr4" element's start tag when the the DSO list is
4293 empty.
4294
4295 2012-03-23 Pedro Alves <palves@redhat.com>
4296
4297 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4298 a variable whose type size is the same as the inferior's pointer
4299 size.
4300
4301 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4302
4303 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4304 struct siginfo.
4305 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4306 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4307 * linux-low.h: Include <signal.h>.
4308 (struct siginfo): Remove forward declaration.
4309 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4310 struct siginfo.
4311
4312 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4313
4314 * .gitignore: Ignore more files.
4315
4316 2012-03-19 Pedro Alves <palves@redhat.com>
4317 Jan Kratochvil <jan.kratochvil@redhat.com>
4318
4319 * server.c (cont_thread, general_thread): Add describing comments.
4320 (start_inferior): Clear `cont_thread'.
4321 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4322 of a process.
4323
4324 2012-03-15 Yao Qi <yao@codesourcery.com>
4325
4326 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4327 handling to ...
4328 (cmd_qtdp): ... here.
4329
4330 2012-03-15 Yao Qi <yao@codesourcery.com>
4331
4332 * tracepoint.c (struct tracepoint_action_ops): New.
4333 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4334 (m_tracepoint_action_download): New.
4335 (r_tracepoint_action_download): New.
4336 (x_tracepoint_action_download): New.
4337 (l_tracepoint_action_download): New.
4338 (add_tracepoint_action): Install `action->ops' according type.
4339 (download_tracepoint_1): Move code `download' function pointer
4340 of various tracepoint_action_ops.
4341
4342 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4343
4344 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4345 linux_ptrace_attach_warnings.
4346
4347 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4348
4349 * Makefile.in (linux-ptrace.o): New.
4350 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4351 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4352 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4353 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4354 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4355 of these targets.
4356 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4357
4358 2012-03-08 Yao Qi <yao@codesourcery.com>
4359 Pedro Alves <palves@redhat.com>
4360
4361 Fix PR server/13392.
4362 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4363 offset of JMP insn.
4364 * tracepoint.c (remove_tracepoint): New.
4365 (cmd_qtdp): Call remove_tracepoint when failed to install.
4366
4367 2012-03-07 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c (get_detach_signal): New.
4370 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4371 Pass on pending signals to PTRACE_DETACH. Check the result of the
4372 ptrace call.
4373 * server.c (program_signals, program_signals_p): New.
4374 (handle_general_set): Handle QProgramSignals.
4375 * server.h (program_signals, program_signals_p): Declare.
4376
4377 2012-03-05 Pedro Alves <palves@redhat.com>
4378 Jan Kratochvil <jan.kratochvil@redhat.com>
4379
4380 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4381 New comment why.
4382
4383 2012-03-03 Yao Qi <yao@codesourcery.com>
4384
4385 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4386 agent_look_up_symbols.
4387
4388 2012-03-03 Yao Qi <yao@codesourcery.com>
4389
4390 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4391 (linux-x86-low.o): Likewise.
4392 * server.h: Remove in_process_agent_loaded.
4393 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4394 common/agent.c.
4395 Update callers.
4396
4397 2012-03-03 Yao Qi <yao@codesourcery.com>
4398
4399 * tracepoint.c (gdb_agent_capability): New global.
4400 (in_process_agent_loaded_ust): Renamed to
4401 `in_process_agent_supports_ust'.
4402 Update callers.
4403 (in_process_agent_supports_ust): Call agent_capability_check.
4404 (clear_installed_tracepoints): Assert that agent supports
4405 agent.
4406
4407 2012-03-03 Yao Qi <yao@codesourcery.com>
4408
4409 * linux-low.c (linux_supports_agent): New.
4410 (linux_target_ops): Initialize field `supports_agent' with
4411 linux_supports_agent.
4412 * target.h (struct target_ops) <supports_agent>: New.
4413 (target_supports_agent): New macro.
4414 * server.c (handle_general_set): Handle packet 'QAgent'.
4415 (handle_query): Send `QAgent+'.
4416 * Makefile.in (server.o): Depends on agent.h.
4417
4418 2012-03-03 Yao Qi <yao@codesourcery.com>
4419
4420 * Makefile.in (OBS): Add agent.o.
4421 Add new rule for agent.o.
4422 Track dependence of tracepoint.c on agent.h.
4423 * tracepoint.c (run_inferior_command_1):
4424 (run_inferior_command): Call agent_run_command.
4425 (gdb_ust_connect_sync_socket): Deleted. Move it to
4426 common/agent.c.
4427 (resume_thread, stop_thread): Likewise.
4428 (gdb_ust_socket_init): Renamed to ...
4429 (gdb_agent_socket_init): ... New.
4430 (gdb_ust_thread): Renamed to ...
4431 (gdb_agent_helper_thread): ... New.
4432 (gdb_ust_init): Move some code to ...
4433 (gdb_agent_init): ... here. New.
4434 [HAVE_UST]: Call gdb_ust_init.
4435 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4436 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4437 * config.in, configure: Regenerated.
4438
4439 2012-03-02 Pedro Alves <palves@redhat.com>
4440
4441 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4442 * linux-low.c (struct simple_pid_list): New.
4443 (stopped_pids): New a struct simple_pid_list pointer.
4444 (add_to_pid_list, pull_pid_from_list): New.
4445 (handle_extended_wait): Don't assume the first signal new children
4446 report is SIGSTOP. Adjust call to pull_pid_from_list.
4447 (linux_wait_for_lwp): Adjust.
4448
4449 2012-03-02 Yao Qi <yao@codesourcery.com>
4450
4451 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4452 debug log.
4453
4454 2012-03-02 Yao Qi <yao@codesourcery.com>
4455
4456 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4457 `stop_pc' and `tpoint'. Update caller.
4458
4459 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4460
4461 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4462 * linux-low.c (use_linux_regsets): New macro.
4463 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4464 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4465 (linux_register_in_regsets): New function.
4466 (usr_fetch_inferior_registers): Skip registers covered by
4467 regsets.
4468 (usr_store_inferior_registers): Likewise.
4469 (usr_fetch_inferior_registers): New macro.
4470 (usr_store_inferior_registers): Likewise.
4471 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4472 (linux_store_registers): Likewise.
4473 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4474 prototype.
4475 (init_registers_mips64_dsp_linux): Likewise.
4476 (init_registers_mips_linux): New macro.
4477 (init_registers_mips_dsp_linux): Likewise.
4478 (mips_dsp_num_regs): Likewise.
4479 (DSP_BASE, DSP_CONTROL): New fallback macros.
4480 (mips_base_regs): New macro.
4481 (mips_regmap): Use it. Fix the size.
4482 (mips_dsp_regmap): New variable.
4483 (mips_dsp_regset_bitmap): Likewise.
4484 (mips_arch_setup): New function.
4485 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4486 than mips_regmap.
4487 (mips_cannot_store_register): Likewise.
4488 (the_low_target): Update .arch_setup, .num_regs and .regmap
4489 initializers. Add .regset_bitmap initializer.
4490 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4491 initializer.
4492 * linux-bfin-low.c (the_low_target): Likewise.
4493 * linux-cris-low.c (the_low_target): Likewise.
4494 * linux-crisv32-low.c (the_low_target): Likewise.
4495 * linux-ia64-low.c (the_low_target): Likewise.
4496 * linux-m32r-low.c (the_low_target): Likewise.
4497 * linux-m68k-low.c (the_low_target): Likewise.
4498 * linux-ppc-low.c (the_low_target): Likewise.
4499 * linux-s390-low.c (the_low_target): Likewise.
4500 * linux-sh-low.c (the_low_target): Likewise.
4501 * linux-sparc-low.c (the_low_target): Likewise.
4502 * linux-tic6x-low.c (the_low_target): Likewise.
4503 * linux-x86-low.c (the_low_target): Likewise.
4504 * linux-xtensa-low.c (the_low_target): Likewise.
4505 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4506 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4507 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4508 srv_xmlfiles.
4509 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4510 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4511
4512 2012-02-29 Yao Qi <yao@codesourcery.com>
4513 Pedro Alves <palves@redhat.com>
4514
4515 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4516 `step_over_finished' is true.
4517
4518 2012-02-27 Pedro Alves <palves@redhat.com>
4519
4520 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4521 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4522
4523 2012-02-27 Pedro Alves <palves@redhat.com>
4524
4525 PR server/9684
4526 * linux-low.c (pid_is_stopped): New.
4527 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4528
4529 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4530
4531 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4532 of conditions.
4533
4534 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4535
4536 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4537
4538 2012-02-24 Luis Machado <lgustavo@codesourcery>
4539
4540 * server.c (handle_query): Advertise support for target-side
4541 breakpoint condition evaluation.
4542 (process_point_options): New function.
4543 (process_serial_event): When inserting a breakpoint, check for
4544 a target-side condition that should be evaluated.
4545
4546 * mem-break.c: Include regcache.h and ax.h.
4547 (point_cond_list_t): New data structure.
4548 (breakpoint) <cond_list>: New field.
4549 (find_gdb_breakpoint_at): Make non-static.
4550 (delete_gdb_breakpoint_at): Clear any target-side
4551 conditions.
4552 (clear_gdb_breakpoint_conditions): New function.
4553 (add_condition_to_breakpoint): Likewise.
4554 (add_breakpoint_condition): Likewise.
4555 (gdb_condition_true_at_breakpoint): Likewise.
4556 (gdb_breakpoint_here): Return result directly instead
4557 of going through a local variable.
4558
4559 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4560 (clear_gdb_breakpoint_conditions): Likewise.
4561 (add_breakpoint_condition): Likewise.
4562 (gdb_condition_true_at_breakpoint): Likewise.
4563
4564 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4565 (need_step_over_p): Take target-side breakpoint condition into
4566 consideration.
4567
4568 2012-02-24 Luis Machado <lgustavo@codesourcery>
4569
4570 * server.h: Include tracepoint.h.
4571 (agent_mem_read, agent_get_trace_state_variable_value,
4572 agent_set_trace_state_variable_value,
4573 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4574 get_set_tsv_func_addr): New prototypes.
4575
4576 * ax.h: New include file.
4577 * ax.c: New source file.
4578
4579 * tracepoint.c: Include ax.h.
4580 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4581 agent_expr, eval_result_type): Move to ax.h.
4582 (parse_agent_expr): Rename to ...
4583 (gdb_parse_agent_expr): ... this, make it non-static and move
4584 to ax.h.
4585 (unparse_agent_expr) Rename to ...
4586 (gdb_unparse_agent_expr): ... this, make it non-static and move
4587 to ax.h.
4588 (eval_agent_expr): Rename to ...
4589 (eval_tracepoint_agent_expr): ... this.
4590 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4591 forward declarations.
4592 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4593 (agent_get_trace_state_variable_value): New function.
4594 (agent_set_trace_state_variable_value): New function.
4595 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4596 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4597 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4598 (condition_true_at_tracepoint): Likewise.
4599 (parse_agent_expr): Rename to ...
4600 (gdb_parse_agent_expr): ... this and move to ax.c.
4601 (unparse_agent_expr): Rename to ...
4602 (gdb_unparse_agent_expr): ... this and move to ax.c.
4603 (gdb_agent_op_name): Move to ax.c.
4604 (eval_agent_expr): Rename to ...
4605 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4606 and move to ax.c.
4607 (eval_tracepoint_agent_expr): New function.
4608 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4609 non-static.
4610 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4611 ax.c.
4612 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4613 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4614 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4615 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4616 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4617 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4618 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4619 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4620 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4621 (compile_bytecodes): Remove forward declaration.
4622 (is_goto_target): Move to ax.c.
4623 (compile_bytecodes): Move to ax.c and call
4624 agent_get_trace_state_variable_value (...) and
4625 agent_set_trace_state_variable_value (...).
4626
4627 * Makefile.in: Update ax.c and IPA dependencies.
4628
4629 2012-02-24 Pedro Alves <palves@redhat.com>
4630
4631 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4632 (cmd_bigqtbuffer_circular): ... this. Only handle
4633 'QTBuffer:circular:'.
4634 (handle_tracepoint_general_set): Adjust.
4635
4636 2012-02-16 Yao Qi <yao@codesourcery.com>
4637
4638 * inferiors.c: Move code to ...
4639 * dll.c: .... here. New.
4640 * server.h: Declare clear_dlls.
4641 * Makefile.in (SFILES): Add dll.c.
4642 (OBS): Add dll.o
4643 (dll.o): New rule.
4644
4645 2012-02-11 Yao Qi <yao@codesourcery.com>
4646
4647 * server.c: (handle_monitor_command): Add a new parameter
4648 `own_buf'.
4649 (handle_query): Update caller.
4650
4651 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4652
4653 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4654 * configure, config.in: Regenerate.
4655 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4656 is not defined.
4657
4658 2012-02-02 Pedro Alves <palves@redhat.com>
4659
4660 Try SIGKILL first, then PTRACE_KILL.
4661 * linux-low.c (linux_kill_one_lwp): New.
4662 (linux_kill_one_lwp): Rename to ...
4663 (kill_one_lwp_callback): ... this. Use the new
4664 linux_kill_one_lwp.
4665
4666 2012-02-02 Pedro Alves <palves@redhat.com>
4667
4668 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4669 inferior.
4670
4671 2012-01-27 Pedro Alves <palves@redhat.com>
4672
4673 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4674 (elf_64_file_p): Make static.
4675 (linux_pid_exe_is_elf_64_file): New.
4676 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4677 Delete declarations.
4678 (linux_pid_exe_is_elf_64_file): Declare.
4679 * linux-x86-low.c (x86_arch_setup): Use
4680 linux_pid_exe_is_elf_64_file.
4681
4682 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4683
4684 * linux-low.c (linux_wait_for_event_1): Rename to ...
4685 (linux_wait_for_event): ... here and merge it with former
4686 linux_wait_for_event - new variable wait_ptid, use it.
4687 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4688
4689 2012-01-23 Pedro Alves <palves@redhat.com>
4690
4691 * server.c (main): Avoid yet another case of infinite loop while
4692 detaching/killing after a longjmp.
4693
4694 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4695
4696 Code cleanup.
4697 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4698
4699 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4700
4701 * hostio.c (handle_readlink): New function.
4702 (handle_vFile): Call it to handle "vFile:readlink" packets.
4703
4704 2012-01-20 Pedro Alves <palves@redhat.com>
4705 Ulrich Weigand <ulrich.weigand@linaro.org>
4706
4707 * server.c (handle_v_requests): Only support vAttach and vRun to
4708 start multiple processes when in extended protocol mode.
4709
4710 2012-01-17 Pedro Alves <palves@redhat.com>
4711
4712 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4713 memalign plus mprotect to allocate the scratch buffer.
4714
4715 2012-01-13 Pedro Alves <palves@redhat.com>
4716
4717 * server.c (attach_inferior): Clear `cont_thread'.
4718
4719 2012-01-13 Pedro Alves <palves@redhat.com>
4720
4721 * server.c (main): Avoid infinite loop while detaching/killing
4722 after a longjmp.
4723
4724 2012-01-09 Doug Evans <dje@google.com>
4725
4726 * server.c (start_inferior): Set last_ptid in --wrapper case.
4727
4728 2012-01-06 Yao Qi <yao@codesourcery.com>
4729
4730 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4731 defined.
4732 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4733
4734 2012-01-04 Yao Qi <yao@codesourcery.com>
4735
4736 * tracepoint.c (cmd_qtdp): Print debug message
4737 for static tracepoint.
4738
4739 2012-01-04 Yao Qi <yao@codesourcery.com>
4740
4741 * tracepoint.c (trace_vdebug): Differentiate debug message
4742 between gdbserver and IPA.
4743
4744 2012-01-03 Yao Qi <yao@codesourcery.com>
4745
4746 * tracepoint.c (tracepoint_was_hit): Don't collect for
4747 static tracepoint.
4748
4749 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4750
4751 * terminal.h: Reformat copyright header.
4752
4753 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4754
4755 * server.c (gdbserver_version): Update copyright year.
4756 * gdbreplay.c (gdbreplay_version): Likewise.
4757
4758 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4759
4760 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4761
4762 Revert:
4763 2011-12-18 Hui Zhu <teawater@gmail.com>
4764 * linux-low.c (linux_create_inferior): Save return value to ret.
4765
4766 2011-12-18 Hui Zhu <teawater@gmail.com>
4767
4768 * linux-low.c (linux_create_inferior): Save return value to ret.
4769
4770 2011-12-16 Doug Evans <dje@google.com>
4771
4772 * linux-low.c (linux_create_inferior): If stdio connection,
4773 redirect stdin from /dev/null, stdout to stderr.
4774 * remote-utils.c (remote_is_stdio): New static global.
4775 (remote_connection_is_stdio): New function.
4776 (remote_prepare): Handle stdio connection.
4777 (remote_open): Ditto.
4778 (remote_close): Don't close stdin for stdio connections.
4779 (read_prim,write_prim): New functions. Replace all calls to
4780 read/write to these.
4781 * server.c (main): Watch for "-" argument. Move call to
4782 remote_prepare before start_inferior.
4783 * server.h (STDIO_CONNECTION_NAME): New macro.
4784 (remote_connection_is_stdio): Declare.
4785
4786 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4787 in debugging output.
4788
4789 2011-12-15 Yao Qi <yao@codesourcery.com>
4790
4791 * tracepoint.c: Include sys/syscall.h.
4792 (gdb_ust_thread): Remove preprocessor conditional.
4793
4794 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4795
4796 * linux-low.c (linux_detach_one_lwp): Call
4797 the_low_target.prepare_to_resume before detaching.
4798
4799 2011-12-14 Yao Qi <yao@codesourcery.com>
4800
4801 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4802 of write.
4803
4804 2011-12-14 Yao Qi <yao@codesourcery.com>
4805
4806 * i386-low.c (i386_low_stopped_data_address): Initialize local
4807 variable `control'.
4808
4809 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4810
4811 PR remote/13492
4812
4813 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4814 DR_CONTROL unless necessary. Extend comments.
4815 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4816 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4817
4818 2011-12-13 Yao Qi <yao@codesourcery.com>
4819
4820 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4821 macros.
4822 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4823
4824 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4825
4826 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4827 Print new debug message for such case.
4828
4829 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4830
4831 Fix overlapping memcpy.
4832 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4833 the read_inferior_memory transfer.
4834 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4835 write_inferior_memory transfer.
4836 (set_fast_tracepoint_jump): New variable buf. Use it for the
4837 read_inferior_memory and write_inferior_memory transfers.
4838 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4839 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4840 Use it for the write_inferior_memory transfer.
4841 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4842 buffers.
4843
4844 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4845
4846 * linux-low.c (fetch_register, store_register): Make code
4847 consistent, fix formatting.
4848
4849 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4850
4851 * linux-low.c (usr_store_inferior_registers): Factor out code
4852 to handle individual registers into...
4853 (store_register): ... this new function.
4854
4855 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4856
4857 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4858 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4859 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4860 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4861 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4862 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4863 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4864 (srv_xmlfiles): Add new XML files.
4865
4866 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4867 and <sys/uio.h>.
4868 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4869 (init_registers_s390_linux32v1): Add prototype.
4870 (init_registers_s390_linux32v2): Likewise.
4871 (init_registers_s390_linux64v1): Likewise.
4872 (init_registers_s390_linux64v2): Likewise.
4873 (init_registers_s390x_linux64v1): Likewise.
4874 (init_registers_s390x_linux64v2): Likewise.
4875 (s390_num_regs): Increment to 52.
4876 (s390_regmap): Add orig_r2 register.
4877 (s390_num_regs_3264): Increment to 68.
4878 (s390_regmap_3264): Add orig_r2 register.
4879 (s390_collect_ptrace_register): Handle orig_r2 register.
4880 (s390_supply_ptrace_register): Likewise.
4881 (s390_fill_last_break): New function.
4882 (s390_store_last_break): Likewise.
4883 (s390_fill_system_call): New function.
4884 (s390_store_system_call): Likewise.
4885 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4886 register sets.
4887 (s390_check_regset): New function.
4888 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4889 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4890 Update target_regsets for available register sets.
4891
4892 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4893 Jan Kratochvil <jan.kratochvil@redhat.com>
4894
4895 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4896 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4897 New.
4898 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4899 * linux-low.h (struct process_info_private): New member r_debug.
4900 * server.c (handle_qxfer_libraries): Call
4901 the_target->qxfer_libraries_svr4.
4902 (handle_qxfer_libraries_svr4): New function.
4903 (qxfer_packets): New entry "libraries-svr4".
4904 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4905 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4906 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4907 PACKET_qXfer_libraries_svr4.
4908
4909 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4910
4911 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4912 PSW address/mask between 8-byte and 16-byte formats.
4913 (s390_supply_ptrace_register): Likewise.
4914 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4915 basic addressing mode bit.
4916
4917 2011-11-24 Stan Shebs <stan@codesourcery.com>
4918
4919 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4920
4921 2011-11-17 Stan Shebs <stan@codesourcery.com>
4922
4923 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4924 (tracing_start_time): New global.
4925 (tracing_stop_time): New global.
4926 (tracing_user_name): New global.
4927 (tracing_notes): New global.
4928 (tracing_stop_note): New global.
4929 (cmd_qtstart): Set traceframe_usage, start_time.
4930 (stop_tracing): Set stop_time.
4931 (cmd_qtstatus): Report additional status.
4932 (cmd_qtp): New function.
4933 (handle_tracepoint_query): Call it.
4934 (cmd_qtnotes): New function.
4935 (handle_tracepoint_general_set): Call it.
4936 (get_timestamp): Rename from tsv_get_timestamp.
4937
4938 2011-11-14 Stan Shebs <stan@codesourcery.com>
4939 Kwok Cheung Yeung <kcy@codesourcery.com>
4940
4941 * linux-x86-low.c (small_jump_insn): New.
4942 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4943 trampoline and error message, build a trampoline and issue a small
4944 jump instruction to it.
4945 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4946 trampoline and error message.
4947 (x86_get_min_fast_tracepoint_insn_len): New.
4948 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4949 * linux-low.h (struct linux_target_ops): Add arguments to
4950 install_fast_tracepoint_jump_pad operation, add new operation.
4951 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4952 arguments.
4953 (linux_get_min_fast_tracepoint_insn_len): New function.
4954 (linux_target_op): Add new operation.
4955 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4956 (gdb_trampoline_buffer_end): Ditto.
4957 (gdb_trampoline_buffer_error): Ditto.
4958 (struct ipa_sym_addresses): Add fields for new IPA variables.
4959 (symbol_list): Add entries for new IPA variables.
4960 (struct tracepoint): Add fields to hold the address range of the
4961 trampoline used by the tracepoint.
4962 (trampoline_buffer_head): New static variable.
4963 (trampoline_buffer_tail): Ditto.
4964 (claim_trampoline_space): New function.
4965 (have_fast_tracepoint_trampoline_buffer): New function.
4966 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4967 structure.
4968 (install_fast_tracepoint): Ditto, also add error buffer argument.
4969 (cmd_qtminftpilen): New function.
4970 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4971 (fast_tracepoint_from_trampoline_address): New function.
4972 (fast_tracepoint_collecting): Handle trampoline as part of jump
4973 pad space.
4974 (set_trampoline_buffer_space): New function.
4975 (initialize_tracepoint): Initialize new IPA variables.
4976 * target.h (struct target_ops): Add arguments to
4977 install_fast_tracepoint_jump_pad operation, add new
4978 get_min_fast_tracepoint_insn_len operation.
4979 (target_get_min_fast_tracepoint_insn_len): New.
4980 (install_fast_tracepoint_jump_pad): Add arguments.
4981 * server.h (IPA_BUFSIZ): Define.
4982 * linux-i386-ipa.c: Include extra header files.
4983 (initialize_fast_tracepoint_trampoline_buffer): New function.
4984 (initialize_low_tracepoint): Call it.
4985 * server.h (set_trampoline_buffer_space): Declare.
4986 (claim_trampoline_space): Ditto.
4987 (have_fast_tracepoint_trampoline_buffer): Ditto.
4988
4989 2011-11-14 Yao Qi <yao@codesourcery.com>
4990
4991 * server.c (handle_query): Handle InstallInTrace for qSupported.
4992 * tracepoint.c (add_tracepoint): Sort list.
4993 (install_tracepoint, download_tracepoint): New.
4994 (cmd_qtdp): Call them to install and download tracepoints.
4995 (sort_tracepoints): Removed.
4996 (cmd_qtstart): Update.
4997
4998 2011-11-14 Yao Qi <yao@codesourcery.com>
4999
5000 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5001 * mem-break.h: Declare.
5002 * tracepoint.c (cmd_qtstart): Move some code to ...
5003 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5004 New.
5005 (download_tracepoints): Move some code to ...
5006 (download_tracepoint_1): ... here. New.
5007
5008 2011-11-08 Yao Qi <yao@codesourcery.com>
5009
5010 * remote-utils.c (relocate_instruction): A comment fix.
5011
5012 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5013
5014 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5015 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5016 dr_status_mirror and dr_control_mirror from debug_reg_state.
5017 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5018 (i386_initial_stuff): Remove use of deleted globals.
5019 (i386_get_thread_context, i386_set_thread_context,
5020 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5021 from debug_reg_state.
5022
5023 2011-11-05 Yao Qi <yao@codesourcery.com>
5024
5025 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5026 address as TPOINT's.
5027
5028 2011-11-02 Stan Shebs <stan@codesourcery.com>
5029
5030 * tracepoint.c (agent_mem_read_string): New function.
5031 (eval_agent_expr): Call it for tracenz.
5032 * server.c (handle_query): Report support for tracenz.
5033
5034 2011-11-02 Yao Qi <yao@codesourcery.com>
5035
5036 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5037
5038 2011-11-02 Yao Qi <yao@codesourcery.com>
5039
5040 * target.h: Fix a typo in comment.
5041
5042 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5043
5044 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5045 clobber the breakpoints' shadows with fast tracepoint jumps.
5046 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5047 * target.c (write_inferior_memory): Also pass MYADDR down to
5048 check_mem_write.
5049
5050 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5051
5052 * configure.ac: Check support for personality routine.
5053 * configure: Regenerate.
5054 * config.in: Likewise.
5055 * linux-low.c: Include <sys/personality.h>.
5056 Define ADDR_NO_RANDOMIZE if necessary.
5057 (linux_create_inferior): Disable address space randomization when
5058 forking inferior, if requested.
5059 (linux_supports_disable_randomization): New function.
5060 (linux_target_ops): Install it.
5061 * server.h (disable_randomization): Declare.
5062 * server.c (disable_randomization): New global variable.
5063 (handle_general_set): Handle QDisableRandomization.
5064 (handle_query): Likewise for qSupported.
5065 (main): Support --disable-randomization and --no-disable-randomization
5066 command line arguments.
5067 * target.h (struct target_ops): Add supports_disable_randomization.
5068 (target_supports_disable_randomization): New macro.
5069
5070 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5071
5072 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5073 ifdef check.
5074 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5075 [!PT_GETDSBT] (target_loadmap): New definition.
5076 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5077 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5078 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5079 and PT_GETDSBT to LINUX_LOADMAP.
5080 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5081 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5082
5083 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5084
5085 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5086 (arm_linux_hwbp_cap): New static variable.
5087 (arm_linux_get_hwbp_cap): Replace by ...
5088 (arm_linux_init_hwbp_cap): ... this new function.
5089 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5090 (arm_linux_get_hw_watchpoint_count): Likewise.
5091 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5092 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5093 (arm_prepare_to_resume): Use perror_with_name instead of error.
5094
5095 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5096
5097 * linux-arm-low.c: Include <signal.h>.
5098 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5099 (struct arm_linux_hwbp_cap): New data type.
5100 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5101 (struct arm_linux_hw_breakpoint): New data type.
5102 (MAX_BPTS, MAX_WPTS): Define.
5103 (struct arch_process_info, struct arch_lwp_info): New data types.
5104 (arm_linux_get_hwbp_cap): New function.
5105 (arm_linux_get_hw_breakpoint_count): Likewise.
5106 (arm_linux_get_hw_watchpoint_count): Likewise.
5107 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5108 (arm_hwbp_control_initialize): Likewise.
5109 (arm_hwbp_control_is_enabled): Likewise.
5110 (arm_hwbp_control_is_initialized): Likewise.
5111 (arm_hwbp_control_disable): Likewise.
5112 (arm_linux_hw_breakpoint_equal): Likewise.
5113 (arm_linux_hw_point_initialize): Likewise.
5114 (struct update_registers_data): New data structure.
5115 (update_registers_callback: New function.
5116 (arm_insert_point): Likewise.
5117 (arm_remove_point): Likewise.
5118 (arm_stopped_by_watchpoint): Likewise.
5119 (arm_stopped_data_address): Likewise.
5120 (arm_new_process): Likewise.
5121 (arm_new_thread): Likewise.
5122 (arm_prepare_to_resume): Likewise.
5123 (the_low_target): Register arm_insert_point, arm_remove_point,
5124 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5125 arm_new_thread, and arm_prepare_to_resume.
5126
5127 2011-09-15 Stan Shebs <stan@codesourcery.com>
5128
5129 * server.h (struct emit_ops): Add compare-goto fields.
5130 * tracepoint.c (gdb_agent_op_sizes): New table.
5131 (emit_eq_goto): New function.
5132 (emit_ne_goto): New function.
5133 (emit_lt_goto): New function.
5134 (emit_le_goto): New function.
5135 (emit_gt_goto): New function.
5136 (emit_ge_goto): New function.
5137 (is_goto_target): New function.
5138 (compile_bytecodes): Recognize special cases of compare-goto
5139 combinations and call specialized emitters for them.
5140 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5141 (amd64_emit_ne_goto): New function.
5142 (amd64_emit_lt_goto): New function.
5143 (amd64_emit_le_goto): New function.
5144 (amd64_emit_gt_goto): New function.
5145 (amd64_emit_ge_goto): New function.
5146 (amd64_emit_ops): Add the new functions.
5147 (i386_emit_eq_goto): New function.
5148 (i386_emit_ne_goto): New function.
5149 (i386_emit_lt_goto): New function.
5150 (i386_emit_le_goto): New function.
5151 (i386_emit_gt_goto): New function.
5152 (i386_emit_ge_goto): New function.
5153 (i386_emit_ops): Add the new functions.
5154
5155 2011-09-08 Stan Shebs <stan@codesourcery.com>
5156
5157 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5158 (i386_emit_epilogue): Restore %ebx.
5159
5160 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5161
5162 * server.c (step_thread): Remove definition.
5163 (process_serial_event): Don't handle Hs.
5164 * server.h (step_thread): Remove declaration.
5165 * target.c (set_desired_inferior): Remove use of step_thread.
5166
5167 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5168
5169 * linux-low.c: Include linux-procfs.h.
5170 (linux_attach_lwp_1): Update comments.
5171 (linux_attach): Scan for existing threads when attaching to a
5172 process that is the tgid.
5173 * Makefile.in: Update dependencies.
5174
5175 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5176
5177 * configure.srv: Add linux-procfs.o dependencies.
5178
5179 2011-08-14 Yao Qi <yao@codesourcery.com>
5180
5181 * target.h (struct target_ops): Fix indent.
5182 * win32-low.c (win32_target_ops): Fix comment.
5183
5184 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5185 Yao Qi <yao@codesourcery.com>
5186
5187 * Makefile.in (clean): Remove tic6x-*.c files.
5188 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5189 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5190 (tic6x-c64xp-linux.c): Likewise.
5191 * configure.srv: Add support for tic6x-*-uclinux.
5192 * linux-tic6x-low.c: New.
5193 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5194
5195 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5196 Yao Qi <yao@codesourcery.com>
5197
5198 * target.h (struct target_ops): Add read_loadmap.
5199 * linux-low.c (struct target_loadseg): New type.
5200 (struct target_loadmap): New type.
5201 (linux_read_loadmap): New function.
5202 (linux_target_ops): Add linux_read_loadmap.
5203 * server.c (handle_query): Support qXfer:fdpic:read packet.
5204 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5205 to NULL.
5206
5207 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5208
5209 * win32-low.c: Include <stdint.h>.
5210
5211 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5212
5213 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5214 to the inferior here.
5215 (i386_remove_aligned_watchpoint): Ditto.
5216 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5217 fit part of the watchpoint in the debug registers.
5218 (i386_update_inferior_debug_regs): New.
5219 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5220 registers, and only update the inferior on success.
5221 (i386_low_remove_watchpoint): Ditto.
5222
5223 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5224
5225 * linux-low.c (compare_ints, unique, list_threads, show_process,
5226 linux_core_of_thread): Delete.
5227 (linux_target_ops): Change linux_core_of_thread to
5228 linux_common_core_of_thread.
5229 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5230 * utils.c (malloc_failure): Change type of argument.
5231 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5232 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5233 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5234 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5235 (IPA_OBJS): Add common-utils-ipa.o.
5236 (ptid_h, linux_osdata_h): New macros.
5237 (server_h): Add common/common-utils.h, common/xml-utils.h,
5238 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5239 common/ptid.h.
5240 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5241 ptid.o, buffer.o): New rules.
5242 (linux-low.o): Add common/linux-osdata.h as a dependency.
5243 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5244 * configure.ac: Add AC_HEADER_DIRENT check.
5245 * config.in: Regenerate.
5246 * configure: Regenerate.
5247 * remote-utils.c (xml_escape_text): Delete.
5248 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5249 buffer_xml_printf): Move to common/buffer.c.
5250 * server.c (main): Remove call to initialize_inferiors.
5251 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5252 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5253 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5254 internal_error, gdb_assert, gdb_assert_fail): Delete.
5255 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5256 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5257 common/buffer.h.
5258 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5259 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5260 initialize_inferiors): Delete.
5261
5262 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5263
5264 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5265 symbol error.
5266
5267 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5268
5269 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5270 assertion.
5271 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5272
5273 2011-05-26 Yao Qi <yao@codesourcery.com>
5274
5275 * Makefile.in (thread-db.o): Track dependence to
5276 common/gdb_thread_db.h.
5277 * thread-db.c: include gdb_thread_db.h from right place.
5278
5279 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5280
5281 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5282 __FILE__ and __LINE__ to internal_error.
5283
5284 2011-05-13 Doug Evans <dje@google.com>
5285
5286 * thread-db.c (try_thread_db_load_from_sdir): New function.
5287 (try_thread_db_load_from_dir): New function.
5288 (thread_db_load_search): Handle $sdir, ignore $pdir.
5289 Remove trying of system directories if search of
5290 libthread-db-search-path fails, that is now done via $sdir.
5291
5292 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5293
5294 * server.c (handle_query): Add EnableDisableTracepoints to the list
5295 of supported features.
5296 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5297 tracepoints.
5298 (cmd_qtenable_disable): New.
5299 (cmd_qtstart): Install tracepoints even if disabled.
5300 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5301 receiving a QTEnable or QTDisable packet.
5302 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5303 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5304 tracepoints.
5305 (gdb_probe): Skip data collection if static tracepoint is disabled.
5306
5307 2011-05-10 Doug Evans <dje@google.com>
5308
5309 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5310
5311 2011-05-04 Doug Evans <dje@google.com>
5312
5313 * linux-low.c (linux_join): Skip process lookup.
5314 * spu-low.c (spu_join): Ditto.
5315 * server.c (join_inferiors_callback): Delete.
5316 (process_serial_event): For 'D' packet (detach) call join_inferior
5317 directly.
5318
5319 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5320
5321 * README: Don't mention xscale*-*-linux*.
5322 * configure.srv (xscale*-*-linux*): Don't handle target.
5323
5324 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5325
5326 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5327 casting pointers.
5328 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5329 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5330 (i386_emit_void_call_2): Likewise.
5331
5332 2011-04-26 Yao Qi <yao@codesourcery.com>
5333
5334 * linux-low.c: Move common macros to linux-ptrace.h.
5335 Include linux-ptrace.h.
5336 * Makefile.in (linux_ptrace_h): New.
5337 (linux-low.o): Depends on linux-ptrace.h.
5338
5339 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5340
5341 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5342 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5343 (remote_prepare): New function with most of the TCP code from ...
5344 (remote_open): ... here. Detect PORT here unconditionally. Move also
5345 setting transport_is_reliable.
5346 * server.c (run_once): New variable.
5347 (gdbserver_usage): Document it.
5348 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5349 the first run if RUN_ONCE.
5350 * server.h (run_once, remote_prepare): New declarations.
5351
5352 2011-04-19 Tom Tromey <tromey@redhat.com>
5353
5354 * win32-low.c (handle_load_dll): Remove duplicate "the".
5355
5356 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5357
5358 Remove support for old Cygwin 1.5 versions.
5359 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5360 function to avoid warning.
5361 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5362 warning.
5363
5364 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5365
5366 * gdbserver/server.h (Macro _): Define it if not available.
5367
5368 2011-03-14 Michael Snyder <msnyder@vmware.com>
5369
5370 * hostio.c (handle_close): Remove unnecessary null test.
5371
5372 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5373
5374 * Makefile.in (maintainer-clean realclean distclean): Remove
5375 "make ... subdir_do" command.
5376
5377 2011-03-10 Michael Snyder <msnyder@vmware.com>
5378
5379 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5380
5381 * server.c (handle_v_run): Free alloced buffer on early return.
5382
5383 2011-03-09 Yao Qi <yao@codesourcery.com>
5384
5385 Revert:
5386 2011-03-04 Yao Qi <yao@codesourcery.com>
5387
5388 * Makefile.in: Remove GNU make feature --directory.
5389
5390 2011-03-05 Yao Qi <yao@codesourcery.com>
5391
5392 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5393 (subdir_do): New make target. Copied from gdb/Makefile.
5394 (maintainer-clean, realclean, distclean, clean): Call corresponding
5395 make targets in common/Makefile.
5396
5397 2011-02-11 Yao Qi <yao@codesourcery.com>
5398
5399 * configure.ac: Call AC_PROG_RANLIB.
5400 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5401 * configure: Regenerate.
5402
5403 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5404
5405 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5406
5407 2011-03-06 Yao Qi <yao@codesourcery.com>
5408
5409 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5410
5411 2011-03-05 Yao Qi <yao@codesourcery.com>
5412
5413 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5414 (subdir_do): New make target. Copied from gdb/Makefile.
5415 (maintainer-clean, realclean, distclean, clean): Call corresponding
5416 make targets in common/Makefile.
5417
5418 2011-03-04 Yao Qi <yao@codesourcery.com>
5419
5420 * Makefile.in: Remove GNU make feature --directory.
5421
5422 2011-03-04 Michael Snyder <msnyder@vmware.com>
5423
5424 * server.c (queue_stop_reply): Call xmalloc not malloc.
5425
5426 2011-03-02 Michael Snyder <msnyder@vmware.com>
5427
5428 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5429
5430 2011-02-28 Michael Snyder <msnyder@vmware.com>
5431
5432 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5433 (cmd_qtframe): Ditto.
5434 (cmd_qtbuffer): Ditto.
5435 (cmd_bigqtbuffer): Ditto.
5436
5437 * utils.c (decimal2str): Initialize 'width' to nine, then
5438 don't mess with it.
5439
5440 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5441
5442 * hostio.c (require_data): Free *data, not data.
5443
5444 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5445
5446 * hostio.c (require_data): Use free, not xfree.
5447
5448 2011-02-27 Michael Snyder <msnyder@vmware.com>
5449
5450 * server.c (handle_query): Discard unused value.
5451
5452 * hostio.c (require_data): Free malloc memory before returning
5453 error.
5454
5455 2011-02-26 Michael Snyder <msnyder@vmware.com>
5456
5457 * linux-low.c (list_threads): Call closedir for dirent.
5458
5459 2011-02-27 Michael Snyder <msnyder@vmware.com>
5460
5461 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5462 a case statement falls through.
5463
5464 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5465
5466 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5467 in comparison.
5468
5469 2011-02-26 Michael Snyder <msnyder@vmware.com>
5470
5471 * utils.c (decimal2str): Eliminate dead code and dead param.
5472 (pulongest): Drop dead param from call to decimal2str.
5473 (plongest): Ditto.
5474
5475 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5476
5477 Revert the following patch (not approved yet):
5478 2011-02-21 Hui Zhu <teawater@gmail.com>
5479 * tracepoint.c (tp_printf): New function.
5480 (eval_agent_expr): Handle gdb_agent_op_printf.
5481
5482 2011-02-21 Hui Zhu <teawater@gmail.com>
5483
5484 * tracepoint.c (tp_printf): New function.
5485 (eval_agent_expr): Handle gdb_agent_op_printf.
5486
5487 2011-02-18 Tom Tromey <tromey@redhat.com>
5488
5489 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5490 (tracepoint.o): Likewise.
5491 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5492 (gdb_agent_op_names): Likewise.
5493
5494 2011-02-18 Tom Tromey <tromey@redhat.com>
5495
5496 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5497 gdb_agent_op_rot>: New constants.
5498 (gdb_agent_op_names): Add pick and roll.
5499 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5500 cases.
5501
5502 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5503
5504 * aclocal.m4: Regenerated with aclocal-1.11.1.
5505
5506 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5507
5508 * server.c (handle_qxfer_traceframe_info): New.
5509 (qxfer_packets): Register "traceframe-info".
5510 (handle_query): Report support for qXfer:traceframe-info:read+.
5511 * tracepoint.c (match_blocktype): New.
5512 (traceframe_find_block_type): Rename to ...
5513 (traceframe_walk_blocks): ... this. Add callback filter argument,
5514 and use it.
5515 (traceframe_find_block_type): New, reimplemented on top of
5516 traceframe_walk_blocks.
5517 (build_traceframe_info_xml): New.
5518 (traceframe_read_info): New.
5519 * server.h (traceframe_read_info): Declare.
5520
5521 2011-02-11 Yao Qi <yao@codesourcery.com>
5522
5523 * configure.ac: Call AC_PROG_RANLIB.
5524 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5525 * configure: Regenerate.
5526
5527 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5528
5529 * server.c (gdb_read_memory): Change return semantics to allow
5530 partial transfers.
5531 (handle_search_memory_1): Adjust.
5532 (process_serial_event) <'m' packet>: Handle partial transfers.
5533 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5534
5535 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5536
5537 * regcache.c (init_register_cache): Initialize
5538 regcache->register_status.
5539 (free_register_cache): Release regcache->register_status.
5540 (regcache_cpy): Copy register_status.
5541 (registers_to_string): Print 'x's for unavailable registers.
5542 (supply_register): Mark the register's status valid or
5543 unavailable, depending on whether a buffer was passed in or not.
5544 (supply_register_zeroed): New.
5545 (supply_regblock): Mark the registers' status valid or
5546 unavailable, depending on whether a buffer was passed in or not.
5547 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5548 (struct regcache): New `register_status' field.
5549 (supply_register_zeroed): Declare.
5550 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5551 supply_register_zeroed, rather than passing a NULL buffer to
5552 supply_register.
5553 * tracepoint.c (fetch_traceframe_registers): Update comment.
5554
5555 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5556
5557 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5558 buffer explicit.
5559
5560 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5561
5562 * server.h (decode_xfer_write): Change prototype.
5563 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5564 and don't extract the annex here.
5565 * server.c (decode_xfer_read): Remove `annex' parameter,
5566 and don't extract the annex here.
5567 (decode_xfer): New.
5568 (struct qxfer): New.
5569 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5570 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5571 (handle_qxfer_statictrace): New functions, abstracted out from
5572 handle_query, and made to use the struct qxfer interface.
5573 (handle_threads_qxfer_proper): Rename to ...
5574 (handle_qxfer_threads_proper): ... this.
5575 (handle_threads_qxfer): Rename to ...
5576 (handle_qxfer_threads): ... this. Adjust.
5577 (qxfer_packets): New array.
5578 (handle_qxfer): New function.
5579 (handle_query): Use handle_qxfer.
5580
5581 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5582
5583 * gdbreplay.c: Shorten lines of >= 80 columns.
5584 * linux-low.c: Ditto.
5585 * linux-ppc-low.c: Ditto.
5586 * linux-s390-low.c: Ditto.
5587 * linux-sparc-low.c: Ditto.
5588 * linux-x86-low.c: Ditto.
5589 * linux-xtensa-low.c: Ditto.
5590 * mem-break.c: Ditto.
5591 * nto-low.c: Ditto.
5592 * regcache.h: Ditto.
5593 * remote-utils.c: Ditto.
5594 * server.c: Ditto.
5595 * server.h: Ditto.
5596 * thread-db.c: Ditto.
5597 * tracepoint.c: Ditto.
5598 * utils.c: Ditto.
5599 * win32-low.h: Ditto.
5600
5601 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5602
5603 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5604 update.
5605
5606 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5607
5608 * server.c (gdbserver_version): Update copyright year in version
5609 output.
5610 * gdbreplay.c (gdbreplay_version): Ditto.
5611
5612 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5613
5614 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5615 * linux-bfin-low.c: New file.
5616 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5617 PT_DATA_ADDR for BFIN targets.
5618 * Makefile.in (SFILES): Add linux-bfin-low.c.
5619 (clean): Remove reg-bfin.c.
5620 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5621 * README: Mention supported Blackfin targets.
5622
5623 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5624
5625 * .gitignore: New file.
5626
5627 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5628
5629 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5630
5631 2010-10-22 Jie Zhang <jie@codesourcery.com>
5632
5633 * Makefile.in: Add FLAGS_TO_PASS variable.
5634 (install): Remove dependency of install-only and recursively
5635 invoke make for install-only.
5636
5637 2010-10-04 Doug Evans <dje@google.com>
5638
5639 * Makefile.in (uninstall): Use $(DESTDIR).
5640
5641 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5642
5643 PR gdb/11842
5644
5645 * linux-x86-low.c (compat_siginfo_from_siginfo)
5646 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5647 si_code is < 0. Check for si_code == SI_TIMER before checking for
5648 si_code < 0.
5649
5650 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5651
5652 * lynx-i386-low.c: New file.
5653 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5654
5655 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5656
5657 * lynx-low.c (ptrace_request_to_str): Remove handling for
5658 request values that have been removed in LynxOS 5.x.
5659
5660 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5661
5662 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5663 <ptrace.h>
5664
5665 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5666
5667 * configure.ac: Add --enable-inprocess-agent option.
5668 * configure: Rebuilt.
5669
5670 2010-09-06 Yao Qi <yao@codesourcery.com>
5671
5672 * linux-low.c (linux_kill): Remove unused variable.
5673 (linux_stabilize_threads): Likewise.
5674 * server.c (start_inferior): Likewise.
5675 (queue_stop_reply_callback): Likewise.
5676 * tracepoint.c (do_action_at_tracepoint): Likewise.
5677
5678 2010-09-06 Yao Qi <yao@codesourcery.com>
5679
5680 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5681 on return.
5682
5683 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5684
5685 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5686
5687 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5688
5689 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5690 "$(IPA_DEPFILES)".
5691
5692 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5693
5694 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5695 gdbserver/lynx-ppc-low.c: New files.
5696 * Makefile.in (lynx_low_h): New variable.
5697 (lynx-low.o, lynx-ppc-low.o): New rules.
5698 * configure.ac: On LynxOS, link with -lnetinet.
5699 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5700 * configure: regenerate.
5701
5702 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5703
5704 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5705 * configure.ac: Add check for vasprintf and vsnprintf.
5706 * configure, config.in: Regenerate.
5707 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5708
5709 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5710
5711 * gdbreplay.c: Move include of alloca.h up, next to include of
5712 malloc.h.
5713 * server.h: Add include of malloc.h.
5714 * mem-break.c: Remove include of malloc.h.
5715 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5716
5717 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5718
5719 * Makefile.in (memmem.o): Build with -Wno-error.
5720
5721 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5722
5723 * utils.c (xsnprintf): Make non-static.
5724 * server.h: Add xsnprintf declaration.
5725 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5726 replace calls to snprintf by calls to xsnprintf throughout.
5727
5728 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5729
5730 * configure.ac: Add configure check for alloca.
5731 * configure, config.in: Regenerate.
5732 * server.h: Include alloca.h if it exists.
5733 * gdbreplay.c: Include alloca.h if it exists.
5734
5735 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5736
5737 * linux-low.c (__SIGRTMIN): Define if not already defined.
5738 (linux_create_inferior): Check for __ANDROID__ rather than
5739 __SIGRTMIN.
5740 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5741 are already deferred.
5742 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5743 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5744 stopped and already has a pending signal to report.
5745 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5746 a pending signal to report or is moving out of a jump pad.
5747 (linux_init_signals): Check for __ANDROID__ rather than
5748 __SIGRTMIN.
5749
5750 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5751
5752 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5753 debug_threads check. Avoid a linear search when not doing debug
5754 output.
5755
5756 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5757
5758 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5759 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5760 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5761 (process_event): Change local fd's type to gdb_fildes_t.
5762 (create_file_handler): Adjust prototype.
5763 (delete_file_handler): Adjust prototype.
5764 (handle_file_event): Adjust prototype. Use pfildes.
5765 (create_file_event): Adjsut prototype.
5766 * remote-utils.c (remote_desc, listen_desc): Change type to
5767 gdb_fildes_t.
5768 * server.h: New gdb_fildes_t typedef.
5769 [USE_WIN32API]: Include winsock2.h.
5770 (delete_file_handler, add_file_handler): Adjust prototypes.
5771 (pfildes): Declare.
5772 * utils.c (pfildes): New.
5773
5774 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5775
5776 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5777 * configure: Regenerate.
5778
5779 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5780
5781 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5782 (linux_done_accessing_memory): ... this.
5783 (linux_target_ops): Adjust.
5784 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5785 * nto-low.c (nto_target_ops): Adjust comment.
5786 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5787 * spu-low.c (spu_target_ops): Adjust comment.
5788 * target.h (target_ops): Rename unprepare_to_access_memory field
5789 to done_accessing_memory.
5790 (unprepare_to_access_memory): Rename to ...
5791 (done_accessing_memory): ... this.
5792
5793 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5794
5795 * linux-low.c (linux_prepare_to_access_memory): New.
5796 (linux_unprepare_to_access_memory): New.
5797 (linux_target_ops): Install them.
5798 * server.c (read_memory): Rename to ...
5799 (gdb_read_memory): ... this. Use
5800 prepare_to_access_memory/prepare_to_access_memory.
5801 (write_memory): Rename to ...
5802 (gdb_write_memory): ... this. Use
5803 prepare_to_access_memory/prepare_to_access_memory.
5804 (handle_search_memory_1): Adjust.
5805 (process_serial_event): Adjust.
5806 * target.h (struct target_ops): New fields
5807 prepare_to_access_memory and unprepare_to_access_memory.
5808 (prepare_to_access_memory, unprepare_to_access_memory): New.
5809 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5810 prepare_to_access_memory/prepare_to_access_memory.
5811 * nto-low.c (nto_target_ops): Adjust.
5812 * spu-low.c (spu_target_ops): Adjust.
5813 * win32-low.c (win32_target_ops): Adjust.
5814
5815 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5816
5817 * Makefile.in (WARN_CFLAGS): Get it from configure.
5818 (WERROR_CFLAGS): New.
5819 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5820 * configure.ac: Introduce --enable-werror, which adds -Werror to
5821 the compiler command line. Enabled by default. Disable with
5822 --disable-werror. Add -Wdeclaration-after-statement
5823 Wpointer-arith and -Wformat-nonliteral to warning flags.
5824 * configure: Regenerate.
5825
5826 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5827
5828 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5829
5830 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5831
5832 * gdbreplay.c (remote_error): New.
5833 (gdbchar): New.
5834 (expect): Use gdbchar. Check for error reading from GDB.
5835 Clarify sync error output.
5836 (play): Check for errors writing to GDB.
5837 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5838 * remote-utils.c (getpkt): Check for errors writing to the remote
5839 descriptor.
5840
5841 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5842
5843 * linux-low.c (linux_wait_1): Move non-debugging code out of
5844 `debug_threads' control.
5845
5846 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5847
5848 * linux-low.c (linux_wait_1): Don't set last_status here.
5849 * server.c (push_event, queue_stop_reply_callback): Assert we're
5850 not pushing a TARGET_WAITKIND_IGNORE event.
5851 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5852 (myresume, handle_target_event): Set the thread's last_resume_kind
5853 and last_status from the target returned status.
5854
5855 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5856
5857 PR threads/10729
5858
5859 * linux-x86-low.c (update_debug_registers_callback): New.
5860 (i386_dr_low_set_addr): Use it.
5861 (i386_dr_low_get_addr): New.
5862 (i386_dr_low_set_control): Use update_debug_registers_callback.
5863 (i386_dr_low_get_control): New.
5864 (i386_dr_low_get_status): Adjust.
5865 * linux-low.c (linux_stop_lwp): New.
5866 * linux-low.h (linux_stop_lwp): Declare.
5867
5868 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5869 argument instead of a i386_debug_reg_state.
5870 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5871 a i386_debug_reg_state.
5872 (i386_insert_aligned_watchpoint): Adjust.
5873 (i386_remove_aligned_watchpoint): Adjust.
5874 (i386_low_stopped_data_address): Read the debug registers from the
5875 inferior instead of from the mirrors.
5876 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5877 (i386_dr_low_get_addr): Declare.
5878 (i386_dr_low_get_control): Declare.
5879 (i386_dr_low_get_status): Change prototype.
5880
5881 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5882 (i386_dr_low_get_addr): New.
5883 (i386_dr_low_get_control): New.
5884 (i386_dr_low_get_status): Adjust prototype. Return
5885 dr_status_mirror.
5886 (i386_initial_stuff): Clear dr_status_mirror and
5887 dr_control_mirror.
5888 (i386_get_thread_context): Adjust.
5889 (i386_set_thread_context): Adjust.
5890 (i386_thread_added): Adjust.
5891
5892 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5893
5894 * linux-low.h (linux_thread_area): Delete declaration.
5895
5896 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5897
5898 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5899 after its termination.
5900
5901 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5902
5903 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5904 (gdb_wants_all_stopped): Delete.
5905 (linux_wait_1): Don't call them.
5906 * server.c (handle_v_cont): Tag all threads as want-stopped.
5907 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5908 stopped as "client-wants-stopped".
5909
5910 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5911
5912 * Makefile.in (signals_h): New.
5913 (server_h): Depend on it.
5914 (server.o): Don't depend on $(signals_def).
5915 (signals.o): Depend on $(signals_def).
5916
5917 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5918
5919 * Makefile.in (signals_def): New.
5920 (server_h): Append include/gdb/signals.h and signals_def.
5921 (server.o): Append signals_def.
5922
5923 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5924
5925 * server.c (handle_target_event): Use target_signal_to_host for
5926 resume_info.sig initialization.
5927 * target.h (struct thread_resume) <sig>: New comment.
5928
5929 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5930
5931 * server.c (handle_query): strcpy() the returned string from paddress()
5932 instead of sprintf().
5933 * utils.c (paddress): Return phex_nz().
5934
5935 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5936
5937 * server.c (handle_v_cont): Call mourn_inferior if process
5938 just exited.
5939 (myresume): Likewise.
5940
5941 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5942
5943 Static tracepoints, and integration with UST.
5944
5945 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5946 * mem-break.c (uninsert_all_breakpoints)
5947 (reinsert_all_breakpoints): New.
5948 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5949 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5950 (gdb_agent_ust_loaded, helper_thread_id)
5951 (gdb_agent_helper_thread_id): New macros.
5952 (struct ipa_sym_addresses): Add addr_ust_loaded,
5953 addr_helper_thread_id, addr_cmd_buf.
5954 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5955 (in_process_agent_loaded_ust): New.
5956 (write_e_ust_not_loaded): New.
5957 (maybe_write_ipa_ust_not_loaded): New.
5958 (struct collect_static_trace_data_action): New.
5959 (enum tracepoint_type) <static_tracepoint>: New.
5960 (struct tracepoint) <handle>: Mention static tracepoints.
5961 (struct static_tracepoint_ctx): New.
5962 (CMD_BUF_SIZE): New.
5963 (add_tracepoint_action): Handle static tracepoint actions.
5964 (unprobe_marker_at): New.
5965 (clear_installed_tracepoints): Handle static tracepoints.
5966 (cmd_qtdp): Handle static tracepoints.
5967 (probe_marker_at): New.
5968 (cmd_qtstart): Handle static tracepoints.
5969 (response_tracepoint): Handle static tracepoints.
5970 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5971 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5972 (get_context_regcache): Handle static tracepoints.
5973 (do_action_at_tracepoint): Handle static tracepoint actions.
5974 (traceframe_find_block_type): Handle static trace data blocks.
5975 (traceframe_read_sdata): New.
5976 (download_tracepoints): Download static tracepoint actions.
5977 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5978 (GDB_PROBE_NAME): New.
5979 (ust_ops): New.
5980 (GET_UST_SYM): New.
5981 (USTF): New.
5982 (dlsym_ust): New.
5983 (ust_marker_to_static_tracepoint): New.
5984 (gdb_probe): New.
5985 (collect_ust_data_at_tracepoint): New.
5986 (gdb_ust_probe): New.
5987 (UNIX_PATH_MAX, SOCK_DIR): New.
5988 (gdb_ust_connect_sync_socket): New.
5989 (resume_thread, stop_thread): New.
5990 (run_inferior_command): New.
5991 (init_named_socket): New.
5992 (gdb_ust_socket_init): New.
5993 (cstr_to_hexstr): New.
5994 (next_st): New.
5995 (first_marker, next_marker): New.
5996 (response_ust_marker): New.
5997 (cmd_qtfstm, cmd_qtsstm): New.
5998 (unprobe_marker_at, probe_marker_at): New.
5999 (cmd_qtstmat, gdb_ust_thread): New.
6000 (gdb_ust_init): New.
6001 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6002 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6003 (ST_REGENTRY): New.
6004 (x86_64_st_collect_regmap): New.
6005 (X86_64_NUM_ST_COLLECT_GREGS): New.
6006 (AMD64_RIP_REGNUM): New.
6007 (supply_static_tracepoint_registers): New.
6008 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6009 (ST_REGENTRY): New.
6010 (i386_st_collect_regmap): New.
6011 (i386_NUM_ST_COLLECT_GREGS): New.
6012 (supply_static_tracepoint_registers): New.
6013 * server.c (handle_query): Handle qXfer:statictrace:read.
6014 <qSupported>: Report support for StaticTracepoints, and
6015 qXfer:statictrace:read features.
6016 * server.h (traceframe_read_sdata)
6017 (supply_static_tracepoint_registers): Declare.
6018 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6019 (unpack_varlen_hex): Include in IPA build.
6020 * Makefile.in (ustlibs, ustinc): New.
6021 (IPA_OBJS): Add remote-utils-ipa.o.
6022 ($(IPA_LIB)): Link -ldl and -lpthread.
6023 (UST_CFLAGS): New.
6024 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6025 * config.in, configure: Regenerate.
6026
6027 2010-06-20 Ian Lance Taylor <iant@google.com>
6028 Pedro Alves <pedro@codesourcery.com>
6029
6030 * linux-x86-low.c (always_true): Delete.
6031 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6032 trying to fool the compiler with always_true.
6033
6034 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6035
6036 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6037 conditions in gdbserver.
6038
6039 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6040
6041 * spu-low.c (spu_read_memory): Wrap around local store limit.
6042 (spu_write_memory): Likewise.
6043
6044 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6045
6046 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6047 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6048 LONGEST uses.
6049 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6050 uses.
6051 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6052 uses with LONGEST uses.
6053
6054 2010-06-14 Stan Shebs <stan@codesourcery.com>
6055 Pedro Alves <pedro@codesourcery.com>
6056
6057 Bytecode compiler.
6058
6059 * linux-x86-low.c: Include limits.h.
6060 (add_insns): New.
6061 (always_true): New.
6062 (EMIT_ASM): New.
6063 (EMIT_ASM32): New.
6064 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6065 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6066 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6067 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6068 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6069 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6070 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6071 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6072 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6073 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6074 (amd64_emit_void_call_2): New.
6075 (amd64_emit_ops): New.
6076 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6077 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6078 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6079 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6080 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6081 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6082 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6083 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6084 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6085 (i386_emit_stack_adjust, i386_emit_int_call_1)
6086 (i386_emit_void_call_2): New.
6087 (i386_emit_ops): New.
6088 (x86_emit_ops): New.
6089 (the_low_target): Install x86_emit_ops.
6090 * server.h (struct emit_ops): New.
6091 (get_raw_reg_func_addr): Declare.
6092 (current_insn_ptr, emit_error): Declare.
6093 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6094 (set_trace_state_variable_value): New defines.
6095 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6096 addr_get_trace_state_variable_value and
6097 addr_set_trace_state_variable_value.
6098 (symbol_list): New fields for get_raw_reg,
6099 get_trace_state_variable_value and set_trace_state_variable_value.
6100 (condfn): New typedef.
6101 (struct tracepoint): New field `compiled_cond'.
6102 (do_action_at_tracepoint): Clear compiled_cond.
6103 (get_trace_state_variable_value, set_trace_state_variable_value):
6104 Export in the IPA.
6105 (condition_true_at_tracepoint): If there's a compiled condition,
6106 run that.
6107 (current_insn_ptr, emit_error): New globals.
6108 (struct bytecode_address): New.
6109 (get_raw_reg_func_addr): New.
6110 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6111 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6112 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6113 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6114 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6115 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6116 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6117 (compile_tracepoint_condition, compile_bytecodes): New.
6118 * target.h (emit_ops): Forward declare.
6119 (struct target_ops): New field emit_ops.
6120 (target_emit_ops): New.
6121 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6122 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6123 * linux-low.c (linux_emit_ops): New.
6124 (linux_target_ops): Install it.
6125 * linux-low.h (struct linux_target_ops): New field emit_ops.
6126
6127 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6128
6129 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6130 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6131
6132 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6133 Stan Shebs <stan@codesourcery.com>
6134
6135 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6136 (all): Depend on $(extra_libraries).
6137 (install-only): Install the IPA.
6138 (IPA_OBJS, IPA_LIB): New.
6139 (clean): Remove the IPA lib.
6140 (IPAGENT_CFLAGS): New.
6141 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6142 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6143 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6144 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6145 * configure.ac: Check for atomic builtins support in the compiler.
6146 (IPA_DEPFILES, extra_libraries): Define.
6147 * configure.srv (ipa_obj): Add description.
6148 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6149 (i[34567]86-*-linux*): Set ipa_obj.
6150 (x86_64-*-linux*): Set ipa_obj.
6151 * linux-low.c (stabilizing_threads): New.
6152 (supports_fast_tracepoints): New.
6153 (linux_detach): Stabilize threads before detaching.
6154 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6155 the lwp is either not stabilizing, or is moving out of a jump pad.
6156 (linux_fast_tracepoint_collecting): New.
6157 (maybe_move_out_of_jump_pad): New.
6158 (enqueue_one_deferred_signal): New.
6159 (dequeue_one_deferred_signal): New.
6160 (linux_wait_for_event_1): If moving out of a jump pad, defer
6161 pending signals to later.
6162 (linux_stabilize_threads): New.
6163 (linux_wait_1): Check if threads need moving out of jump pads, and
6164 do it if so.
6165 (stuck_in_jump_pad_callback): New.
6166 (move_out_of_jump_pad_callback): New.
6167 (lwp_running): New.
6168 (linux_resume_one_lwp): Handle moving out of jump pads.
6169 (linux_set_resume_request): Dequeue deferred signals.
6170 (need_step_over_p): Also step over fast tracepoint jumps.
6171 (start_step_over): Also uninsert fast tracepoint jumps.
6172 (finish_step_over): Also reinsert fast tracepoint jumps.
6173 (linux_install_fast_tracepoint_jump): New.
6174 (linux_target_ops): Install linux_stabilize_threads and
6175 linux_install_fast_tracepoint_jump_pad.
6176 * linux-low.h (linux_target_ops) <get_thread_area,
6177 install_fast_tracepoint_jump_pad>: New fields.
6178 (struct lwp_info) <collecting_fast_tracepoint,
6179 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6180 (linux_get_thread_area): Declare.
6181 * linux-x86-low.c (jump_insn): New.
6182 (x86_get_thread_area): New.
6183 (append_insns): New.
6184 (push_opcode): New.
6185 (amd64_install_fast_tracepoint_jump_pad): New.
6186 (i386_install_fast_tracepoint_jump_pad): New.
6187 (x86_install_fast_tracepoint_jump_pad): New.
6188 (the_low_target): Install x86_get_thread_area and
6189 x86_install_fast_tracepoint_jump_pad.
6190 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6191 (struct fast_tracepoint_jump): New.
6192 (fast_tracepoint_jump_insn): New.
6193 (fast_tracepoint_jump_shadow): New.
6194 (find_fast_tracepoint_jump_at): New.
6195 (fast_tracepoint_jump_here): New.
6196 (delete_fast_tracepoint_jump): New.
6197 (set_fast_tracepoint_jump): New.
6198 (uninsert_fast_tracepoint_jumps_at): New.
6199 (reinsert_fast_tracepoint_jumps_at): New.
6200 (set_breakpoint_at): Use write_inferior_memory.
6201 (uninsert_raw_breakpoint): Use write_inferior_memory.
6202 (check_mem_read): Mask out fast tracepoint jumps.
6203 (check_mem_write): Mask out fast tracepoint jumps.
6204 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6205 (set_fast_tracepoint_jump): Declare.
6206 (delete_fast_tracepoint_jump)
6207 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6208 (reinsert_fast_tracepoint_jumps_at): Declare.
6209 * regcache.c: Don't compile many functions when building the
6210 in-process agent library.
6211 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6212 the register buffer in the heap.
6213 (free_register_cache): If the register buffer isn't owned by the
6214 regcache, don't free it.
6215 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6216 pre-existing register caches.
6217 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6218 type.
6219 (convert_ascii_to_int): : Constify `from' parameter type.
6220 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6221 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6222 the needed buffer in-place.
6223 (relocate_instruction): New.
6224 * server.c (handle_query) <qSymbols>: If the target supports
6225 tracepoints, give it a chance of looking up symbols. Report
6226 support for fast tracepoints.
6227 (handle_status): Stabilize threads.
6228 (process_serial_event): Adjust.
6229 * server.h (struct fast_tracepoint_jump): Forward declare.
6230 (struct process_info) <fast_tracepoint_jumps>: New field.
6231 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6232 (decode_X_packet, decode_M_packet): Adjust.
6233 (relocate_instruction): Declare.
6234 (in_process_agent_loaded): Declare.
6235 (tracepoint_look_up_symbols): Declare.
6236 (struct fast_tpoint_collect_status): Declare.
6237 (fast_tracepoint_collecting): Declare.
6238 (force_unlock_trace_buffer): Declare.
6239 (handle_tracepoint_bkpts): Declare.
6240 (initialize_low_tracepoint)
6241 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6242 * target.h (struct target_ops) <stabilize_threads,
6243 install_fast_tracepoint_jump_pad>: New fields.
6244 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6245 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6246 [HAVE_STDINT_H]: Include stdint.h.
6247 (trace_debug_1): Rename to ...
6248 (trace_vdebug): ... this.
6249 (trace_debug): Rename to ...
6250 (trace_debug_1): ... this. Add `level' parameter.
6251 (trace_debug): New.
6252 (ATTR_USED, ATTR_NOINLINE): New.
6253 (IP_AGENT_EXPORT): New.
6254 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6255 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6256 (about_to_request_buffer_space, trace_buffer_is_full)
6257 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6258 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6259 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6260 (traceframe_write_count, traceframes_created)
6261 (trace_state_variables)
6262 New renaming defines.
6263 (struct ipa_sym_addresses): New.
6264 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6265 (symbol_list): New.
6266 (ipa_sym_addrs): New.
6267 (all_tracepoint_symbols_looked_up): New.
6268 (in_process_agent_loaded): New.
6269 (write_e_ipa_not_loaded): New.
6270 (maybe_write_ipa_not_loaded): New.
6271 (tracepoint_look_up_symbols): New.
6272 (debug_threads) [IN_PROCESS_AGENT]: New.
6273 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6274 (UNKNOWN_SIDE_EFFECTS): New.
6275 (stop_tracing): New.
6276 (flush_trace_buffer): New.
6277 (stop_tracing_bkpt): New.
6278 (flush_trace_buffer_bkpt): New.
6279 (read_inferior_integer): New.
6280 (read_inferior_uinteger): New.
6281 (read_inferior_data_pointer): New.
6282 (write_inferior_data_pointer): New.
6283 (write_inferior_integer): New.
6284 (write_inferior_uinteger): New.
6285 (struct collect_static_trace_data_action): Delete.
6286 (enum tracepoint_type): New.
6287 (struct tracepoint) <type>: New field `type'.
6288 <actions_str, step_actions, step_actions_str>: Only include in
6289 GDBserver.
6290 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6291 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6292 (tracepoints): Use IP_AGENT_EXPORT.
6293 (last_tracepoint): Don't include in the IPA.
6294 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6295 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6296 (alloced_trace_state_variables): New.
6297 (trace_state_variables): Use IP_AGENT_EXPORT.
6298 (traceframe_t): Delete unused variable.
6299 (circular_trace_buffer): Don't include in the IPA.
6300 (trace_buffer_start): Delete.
6301 (struct trace_buffer_control): New.
6302 (trace_buffer_free): Delete.
6303 (struct ipa_trace_buffer_control): New.
6304 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6305 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6306 New.
6307 (trace_buffer_ctrl): New.
6308 (TRACE_BUFFER_CTRL_CURR): New.
6309 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6310 Reimplement as macros.
6311 (trace_buffer_wrap): Delete.
6312 (traceframe_write_count, traceframe_read_count)
6313 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6314 (struct tracepoint_hit_ctx) <type>: New field.
6315 (struct fast_tracepoint_ctx): New.
6316 (memory_barrier): New.
6317 (cmpxchg): New.
6318 (record_tracepoint_error): Update atomically in the IPA.
6319 (clear_inferior_trace_buffer): New.
6320 (about_to_request_buffer_space): New.
6321 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6322 updating the same buffer.
6323 (add_tracepoint): Default the tracepoint's type to trap
6324 tracepoint, and orig_size to -1.
6325 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6326 internal variables.
6327 (create_trace_state_variable): New parameter `gdb'. Handle it.
6328 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6329 (cmd_qtdp): Handle fast tracepoints.
6330 (cmd_qtdv): Adjust.
6331 (max_jump_pad_size): New.
6332 (gdb_jump_pad_head): New.
6333 (get_jump_space_head): New.
6334 (claim_jump_space): New.
6335 (sort_tracepoints): New.
6336 (MAX_JUMP_SIZE): New.
6337 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6338 IPA.
6339 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6340 support. Upload fast traceframes, and delete internal IPA
6341 breakpoints.
6342 (stop_tracing_handler): New.
6343 (flush_trace_buffer_handler): New.
6344 (cmd_qtstop): Upload fast tracepoints.
6345 (response_tracepoint): Handle fast tracepoints.
6346 (tracepoint_finished_step): Upload fast traceframes. Set the
6347 tracepoint hit context's tracepoint type.
6348 (handle_tracepoint_bkpts): New.
6349 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6350 type. Add comment about fast tracepoints.
6351 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6352 non-existing action_str field.
6353 (get_context_regcache): Handle fast tracepoints.
6354 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6355 to the regcache.
6356 (fast_tracepoint_from_jump_pad_address): New.
6357 (fast_tracepoint_from_ipa_tpoint_address): New.
6358 (collecting_t): New.
6359 (force_unlock_trace_buffer): New.
6360 (fast_tracepoint_collecting): New.
6361 (collecting): New.
6362 (gdb_collect): New.
6363 (write_inferior_data_ptr): New.
6364 (target_tp_heap): New.
6365 (target_malloc): New.
6366 (download_agent_expr): New.
6367 (UALIGN): New.
6368 (download_tracepoints): New.
6369 (download_trace_state_variables): New.
6370 (upload_fast_traceframes): New.
6371 (IPA_FIRST_TRACEFRAME): New.
6372 (IPA_NEXT_TRACEFRAME_1): New.
6373 (IPA_NEXT_TRACEFRAME): New.
6374 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6375 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6376 (gdb_jump_pad_buffer_end): New.
6377 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6378 (initialize_tracepoint): Adjust.
6379 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6380 buffer. Initialize the low module.
6381 * utils.c (PREFIX, TOOLNAME): New.
6382 (malloc_failure): Use PREFIX.
6383 (error): In the IPA, an error causes an exit.
6384 (fatal, warning): Use PREFIX.
6385 (internal_error): Use TOOLNAME.
6386 (NUMCELLS): Increase to 10.
6387 * configure, config.in: Regenerate.
6388
6389 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6390
6391 * server.c (handle_query) <qSupported>: Do two passes over the
6392 qSupported string to avoid nesting strtok.
6393
6394 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6395
6396 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6397 (CDEPS): New.
6398 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6399 -Wl,--dynamic-list.
6400 * configure: Regenerate.
6401 * proc-service.list: New.
6402
6403 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6404
6405 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6406 New comment.
6407
6408 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6409
6410 * gdbreplay.c (remote_open): Check error return from socket() call by
6411 its equality to -1 not by it being negative.
6412 * remote-utils.c (remote_open): Likewise.
6413
6414 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6415
6416 * config.h: Regenerate.
6417
6418 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6419
6420 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6421 doesn't provide PTRACE_GET_THREAD_AREA.
6422
6423 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6424
6425 * linux-m68k-low.c: Include <asm/ptrace.h>
6426 (ps_get_thread_area): Implement.
6427
6428 2010-05-03 Doug Evans <dje@google.com>
6429
6430 * event-loop.c (struct callback_event): New struct.
6431 (callback_list): New global.
6432 (append_callback_event, delete_callback_event): New functions.
6433 (process_callback): New function.
6434 (start_event_loop): Call it.
6435 * remote-utils.c (NOT_SCHEDULED): Define.
6436 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6437 moved out of readchar.
6438 (readchar): Rewrite. Call reschedule before returning.
6439 (reset_readchar): New function.
6440 (remote_close): Call it.
6441 (process_remaining, reschedule): New functions.
6442 * server.h (callback_handler_func): New typedef.
6443 (append_callback_event, delete_callback_event): Declare.
6444
6445 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6446
6447 * proc-service.c (ps_pglobal_lookup): Use
6448 thread_db_look_up_one_symbol.
6449 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6450 parameter. Use it instead of all_symbols_looked_up.
6451 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6452 field.
6453 (all_symbols_looked_up): Don't declare.
6454 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6455 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6456 field.
6457 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6458 Set all_symbols_looked_up here.
6459 (thread_db_look_up_one_symbol): New.
6460 (thread_db_get_tls_address): Adjust.
6461 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6462 thread_db object on the heap, and tentatively set it in the
6463 process structure.
6464 (thread_db_init): Don't set all_symbols_looked_up here.
6465 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6466
6467 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6468
6469 * linux-low.c (linux_kill, linux_detach): Adjust.
6470 (status_pending_p_callback): Remove redundant statement. Check
6471 for !TARGET_WAITIKIND_IGNORE, instead of
6472 TARGET_WAITKIND_STOPPED.
6473 (handle_tracepoints): Make sure LWP is locked. Adjust.
6474 (linux_wait_for_event_1): Adjust.
6475 (linux_cancel_breakpoints): New.
6476 (unsuspend_one_lwp): New.
6477 (unsuspend_all_lwps): New.
6478 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6479 (send_sigstop_callback): Change return type to int, add new
6480 `except' parameter and handle it.
6481 (suspend_and_send_sigstop_callback): New.
6482 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6483 pass them down. If SUSPEND, also increment the lwp's suspend
6484 count.
6485 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6486 (need_step_over_p): Don't consider suspended LWPs.
6487 (start_step_over): Adjust.
6488 (proceed_one_lwp): Change return type to int, add new `except'
6489 parameter and handle it.
6490 (unsuspend_and_proceed_one_lwp): New.
6491 (proceed_all_lwps): Use find_inferior instead of
6492 for_each_inferior.
6493 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6494 also decrement the suspend count of LWPs. Pass `except' down,
6495 instead of hacking its suspend count.
6496 (linux_pause_all): Add `freeze' parameter. Adjust.
6497 (linux_unpause_all): New.
6498 (linux_target_ops): Install linux_unpause_all.
6499 * server.c (handle_status): Adjust.
6500 * target.h (struct target_ops): New fields `unpause_all' and
6501 `cancel_breakpoints'. Add new parameter to `pause_all'.
6502 (pause_all): Add new `freeze' parameter.
6503 (unpause_all): New.
6504 (cancel_breakpoints): New.
6505 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6506 cancel breakpoints.
6507 (cmd_qtstart): Pause threads.
6508 (stop_tracing): Pause threads, and cancel breakpoints.
6509 * win32-low.c (win32_target_ops): Adjust.
6510
6511 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6512
6513 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6514 the inferior right away from here...
6515 (linux_wait_1): ... to here, and adjust to check the thread's
6516 last_resume_kind instead of the lwp's step or stop_expected flags.
6517
6518 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6519
6520 * README: Use consistent `GDB' and `GDBserver' spellings.
6521
6522 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6523
6524 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6525 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6526 (linux_detach_one_lwp): Assume the lwp is stopped.
6527 (any_thread_of): Delete.
6528 (linux_detach): Stop all lwps here. Don't blindly delete all
6529 breakpoints.
6530 (delete_lwp_callback): New.
6531 (linux_mourn): Delete all lwps of the process that is gone.
6532 (linux_wait_1): Don't delete the last lwp of the process here.
6533 * mem-break.h (mark_breakpoints_out): Declare.
6534 * mem-break.c (mark_breakpoints_out): New.
6535 (free_all_breakpoints): Use it.
6536 * server.c (handle_target_event): If the process is gone, mark
6537 breakpoints out.
6538 * thread-db.c (struct thread_db) <create_bp>: New field.
6539 (thread_db_enable_reporting): Fix prototype. Store a thread event
6540 breakpoint reference in the thread_db struct.
6541 (thread_db_load_search): Clear the thread_db object.
6542 (try_thread_db_load_1): Ditto.
6543 (switch_to_process): New.
6544 (disable_thread_event_reporting): Use it.
6545 (remove_thread_event_breakpoints): New.
6546 (thread_db_detach, thread_db_mourn): Use it.
6547
6548 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6549
6550 * linux-low.c (linux_enable_event_reporting): New.
6551 (linux_wait_for_event_1, handle_extended_wait): Use it.
6552
6553 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6554
6555 * linux-low.c (linux_kill_one_lwp, linux_kill)
6556 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6557 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6558 SIGSTOP even if the LWP is stopped.
6559 (send_sigstop_callback): New.
6560 (stop_all_lwps): Use send_sigstop_callback instead.
6561 (linux_resume_one_thread): Adjust.
6562 (proceed_one_lwp): Still proceed an LWP that the client has
6563 requested to stop, if we haven't reported it as stopped yet. Make
6564 sure that LWPs the client want stopped, have a pending SIGSTOP.
6565
6566 2010-04-26 Doug Evans <dje@google.com>
6567
6568 * server.c (handle_general_set): Make static.
6569
6570 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6571 Print received char after testing for error/eof instead of before.
6572 (input_interrupt): Tweak comment.
6573
6574 2010-04-23 Doug Evans <dje@google.com>
6575
6576 * server.c (start_inferior): Print inferior argv if --debug.
6577
6578 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6579
6580 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6581 * nto-x86-low.c: Include server.h
6582
6583 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6584
6585 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6586 be consistent with other sources of this directory.
6587 (init_registers_amd64): Correct name of source file of this function
6588 in the comment.
6589
6590 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6591
6592 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6593 64-bit executables.
6594
6595 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6596
6597 * win32-i386-low.c: Add 64-bit support.
6598 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6599 (init_registers_amd64): Declare.
6600 (mappings): Add 64-bit version of array.
6601 (init_windows_x86): New function.
6602 (the_low_target): Change init_arch field to init_windows_x86.
6603
6604 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6605
6606 * win32-low.c: Adapt to support also 64-bit architecture.
6607 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6608 (get_image_name): Use SIZE_T type for local variable `done'.
6609 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6610 (toolhelp_get_dll_name): Idem.
6611 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6612 Use uintptr_t typecast to avoid warning.
6613 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6614 (handle_exception): Use phex_nz to avoid warning.
6615 (win32_wait): Remove unused local variable `process'.
6616
6617 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6618
6619 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6620 `amd64-avx.o'.
6621
6622 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6623
6624 * configure.ac: Use `ws2_32' library for srv_mingw.
6625 * configure: Regenerate.
6626 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6627 * remote-utils.c: Likewise.
6628
6629 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6630
6631 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6632 if __x86_64__ is defined.
6633
6634 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6635
6636 * configure: Regenerate.
6637
6638 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6639
6640 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6641 * target.h (target_ops): New get_tib_address field.
6642 * win32-low.h (win32_thread_info): Add thread_local_base field.
6643 * win32-low.c (child_add_thread): Add tlb argument.
6644 Set thread_local_base field to TLB.
6645 (get_child_debug_event): Adapt to child_add_thread change.
6646 (win32_get_tib_address): New function.
6647 (win32_target_ops): Set get_tib_address field to
6648 win32_get_tib_address.
6649 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6650
6651 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6652
6653 * linux-low.c (linux_mourn): Also remove the process.
6654 * server.c (handle_target_event): Don't remove the process here.
6655 * nto-low.c (nto_mourn): New.
6656 (nto_target_ops): Install it.
6657 * spu-low.c (spu_mourn): New.
6658 (spu_target_ops): Install it.
6659 * win32-low.c (win32_mourn): New.
6660 (win32_target_ops): Install it.
6661
6662 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6663
6664 * server.h (buffer_xml_printf): Remove redundant `;'.
6665
6666 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6667
6668 * regcache.c (set_register_cache): Invalidate regcaches before
6669 changing the register cache layout.
6670 (regcache_invalidate_one): Allow a NULL regcache.
6671 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6672 regcaches before changing the register cache layout or the target
6673 regsets.
6674
6675 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6676
6677 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6678 variable warning on Linux/x86-64.
6679
6680 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6681
6682 GDBserver disconnected tracing support.
6683
6684 * linux-low.c (linux_remove_process): Delete.
6685 (add_lwp): Don't set last_resume_kind here.
6686 (linux_kill): Use `mourn'.
6687 (linux_detach): Use `thread_db_detach', and `mourn'.
6688 (linux_mourn): New.
6689 (linux_attach_lwp_1): Adjust comment.
6690 (linux_attach): last_resume_kind moved the thread_info; adjust.
6691 (status_pending_p_callback): Adjust.
6692 (linux_wait_for_event_1): Adjust.
6693 (count_events_callback, select_singlestep_lwp_callback)
6694 (select_event_lwp_callback, cancel_breakpoints_callback)
6695 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6696 (proceed_one_lwp): Adjust.
6697 (linux_async): Add debug output.
6698 (linux_thread_stopped): New.
6699 (linux_pause_all): New.
6700 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6701 linux_pause_all.
6702 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6703 (thread_db_free): Delete declaration.
6704 (thread_db_detach, thread_db_mourn): Declare.
6705 * thread-db.c (thread_db_init): Use thread_db_mourn.
6706 (thread_db_free): Delete, split in two.
6707 (disable_thread_event_reporting): New.
6708 (thread_db_detach): New.
6709 (thread_db_mourn): New.
6710
6711 * server.h (struct thread_info) <last_resume_kind>: New field.
6712 <attached>: Add comment.
6713 <gdb_detached>: New field.
6714 (handler_func): Change return type to int.
6715 (handle_serial_event, handle_target_event): Ditto.
6716 (gdb_connected): Declare.
6717 (tracing): Delete.
6718 (disconnected_tracing): Declare.
6719 (stop_tracing): Declare.
6720
6721 * server.c (handle_query) <qSupported>: Report support for
6722 disconnected tracing.
6723 (queue_stop_reply_callback): Account for running threads.
6724 (gdb_wants_thread_stopped): New.
6725 (gdb_wants_all_threads_stopped): New.
6726 (gdb_reattached_process): New.
6727 (handle_status): Clear the `gdb_detached' flag of all processes.
6728 In all-stop, stop all threads.
6729 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6730 (process_serial_event): If the remote connection breaks, or if an
6731 exit was forced with "monitor exit", force an event loop exit.
6732 Handle disconnected tracing on detach.
6733 (handle_serial_event): Adjust.
6734 (handle_target_event): If GDB isn't connected, forward events back
6735 to the inferior, unless the last process exited, in which case,
6736 exit gdbserver. Adjust interface.
6737
6738 * remote-utils.c (remote_open): Don't block in accept. Instead
6739 register an event loop source on the listen socket file
6740 descriptor. Refactor bits into ...
6741 (listen_desc): ... this new global.
6742 (gdb_connected): ... this new function.
6743 (enable_async_notification): ... this new function.
6744 (handle_accept_event): ... this new function.
6745 (remote_close): Clear remote_desc.
6746
6747 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6748
6749 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6750 New fields.
6751 (mourn_inferior): Define.
6752 (target_process_qsupported): Avoid the dangling else problem.
6753 (thread_stopped): Define.
6754 (pause_all): Define.
6755 (target_waitstatus_to_string): Declare.
6756 * target.c (target_waitstatus_to_string): New.
6757
6758 * tracepoint.c (tracing): Make extern.
6759 (disconnected_tracing): New.
6760 (stop_tracing): Make extern. Handle tracing stops due to GDB
6761 disconnecting.
6762 (cmd_qtdisconnected): New.
6763 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6764 (handle_tracepoint_general_set): Handle QTDisconnected.
6765
6766 * event-loop.c (event_handler_func): Change return type to int.
6767 (process_event): Bail out if the event handler wants the event
6768 loop to stop.
6769 (handle_file_event): Ditto.
6770 (start_event_loop): Bail out if the event handler wants the event
6771 loop to stop.
6772
6773 * nto-low.c (nto_target_ops): Adjust.
6774 * spu-low.c (spu_wait): Don't remove the process here.
6775 (spu_target_ops): Adjust.
6776 * win32-low.c (win32_wait): Don't remove the process here.
6777 (win32_target_ops): Adjust.
6778
6779 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6780
6781 * regcache.c (realloc_register_cache): Invalidate inferior's
6782 regcache before recreating it.
6783
6784 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6785
6786 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6787
6788 2010-04-09 Stan Shebs <stan@codesourcery.com>
6789 Pedro Alves <pedro@codesourcery.com>
6790
6791 * server.h (LONGEST): New.
6792 (struct thread_info) <while_stepping>: New field.
6793 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6794 Declare.
6795 (initialize_tracepoint, handle_tracepoint_general_set)
6796 (handle_tracepoint_query, tracepoint_finished_step)
6797 (tracepoint_was_hit, release_while_stepping_state_list):
6798 (current_traceframe): Declare.
6799 * server.c (handle_general_set): Handle tracepoint packets.
6800 (read_memory): New.
6801 (write_memory): New.
6802 (handle_search_memory_1): Use read_memory.
6803 (handle_query): Report support for conditional tracepoints, trace
6804 state variables, and tracepoint sources. Handle tracepoint
6805 queries.
6806 (main): Initialize the tracepoints module.
6807 (process_serial_event): Handle traceframe reads/writes.
6808
6809 * linux-low.c (handle_tracepoints): New.
6810 (linux_wait_1): Call it.
6811 (linux_resume_one_lwp): Handle while-stepping.
6812 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6813 (linux_target_ops): Install them.
6814 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6815 New field.
6816 * linux-x86-low.c (x86_supports_tracepoints): New.
6817 (the_low_target). Install it.
6818
6819 * mem-break.h (delete_breakpoint): Declare.
6820 * mem-break.c (delete_breakpoint): Make external.
6821
6822 * target.h (struct target_ops): Add `supports_tracepoints',
6823 `read_pc', and `write_pc' fields.
6824 (target_supports_tracepoints): Define.
6825 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6826 (phex_nz): New.
6827
6828 * regcache.h (struct regcache) <registers_owned>: New field.
6829 (init_register_cache, regcache_cpy): Declare.
6830 (regcache_read_pc, regcache_write_pc): Declare.
6831 (register_cache_size): Declare.
6832 (supply_regblock): Declare.
6833 * regcache.c (init_register_cache): New.
6834 (new_register_cache): Use it.
6835 (regcache_cpy): New.
6836 (register_cache_size): New.
6837 (supply_regblock): New.
6838 (regcache_read_pc, regcache_write_pc): New.
6839
6840 * tracepoint.c: New.
6841
6842 * Makefile.in (OBS): Add tracepoint.o.
6843 (tracepoint.o): New rule.
6844
6845 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6846
6847 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6848 (i386-mmx.o): New.
6849 (i386-mmx.c): Likewise.
6850 (i386-mmx-linux.o): Likewise.
6851 (i386-mmx-linux.c): Likewise.
6852
6853 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6854 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6855 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6856 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6857
6858 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6859 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6860 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6861
6862 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6863
6864 * Makefile.in (clean): Updated.
6865 (i386-avx.o): New.
6866 (i386-avx.c): Likewise.
6867 (i386-avx-linux.o): Likewise.
6868 (i386-avx-linux.c): Likewise.
6869 (amd64-avx.o): Likewise.
6870 (amd64-avx.c): Likewise.
6871 (amd64-avx-linux.o): Likewise.
6872 (amd64-avx-linux.c): Likewise.
6873
6874 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6875 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6876 (srv_amd64_regobj): Add amd64-avx.o.
6877 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6878 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6879 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6880 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6881 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6882 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6883 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6884
6885 * i387-fp.c: Include "i386-xstate.h".
6886 (i387_xsave): New.
6887 (i387_cache_to_xsave): Likewise.
6888 (i387_xsave_to_cache): Likewise.
6889 (x86_xcr0): Likewise.
6890
6891 * i387-fp.h (i387_cache_to_xsave): Likewise.
6892 (i387_xsave_to_cache): Likewise.
6893 (x86_xcr0): Likewise.
6894
6895 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6896 * linux-crisv32-low.c (target_regsets): Likewise.
6897 * linux-m68k-low.c (target_regsets): Likewise.
6898 * linux-mips-low.c (target_regsets): Likewise.
6899 * linux-ppc-low.c (target_regsets): Likewise.
6900 * linux-s390-low.c (target_regsets): Likewise.
6901 * linux-sh-low.c (target_regsets): Likewise.
6902 * linux-sparc-low.c (target_regsets): Likewise.
6903 * linux-xtensa-low.c (target_regsets): Likewise.
6904
6905 * linux-low.c: Include <sys/uio.h>.
6906 (regsets_fetch_inferior_registers): Support nt_type.
6907 (regsets_store_inferior_registers): Likewise.
6908 (linux_process_qsupported): New.
6909 (linux_target_ops): Add linux_process_qsupported.
6910
6911 * linux-low.h (regset_info): Add nt_type.
6912 (linux_target_ops): Add process_qsupported.
6913
6914 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6915 and <sys/uio.h>.
6916 (init_registers_i386_avx_linux): New.
6917 (init_registers_amd64_avx_linux): Likewise.
6918 (xmltarget_i386_linux_no_xml): Likewise.
6919 (xmltarget_amd64_linux_no_xml): Likewise.
6920 (PTRACE_GETREGSET): Likewise.
6921 (PTRACE_SETREGSET): Likewise.
6922 (x86_fill_xstateregset): Likewise.
6923 (x86_store_xstateregset): Likewise.
6924 (use_xml): Likewise.
6925 (x86_linux_update_xmltarget): Likewise.
6926 (x86_linux_process_qsupported): Likewise.
6927 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6928 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6929 init_registers_i386_linux here. Call
6930 x86_linux_update_xmltarget.
6931 (the_low_target): Add x86_linux_process_qsupported.
6932
6933 * server.c (handle_query): Call target_process_qsupported.
6934
6935 * target.h (target_ops): Add process_qsupported.
6936 (target_process_qsupported): New.
6937
6938 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6939
6940 * inferiors.c (add_thread): Set last_status kind to
6941 TARGET_WAITKIND_IGNORE.
6942 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6943 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6944 (linux_wait_1): Move `thread' local definition to block that uses
6945 it. Don't NULL initialize `event_child'.
6946 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6947 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6948 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6949
6950 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6951
6952 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6953 an extended waitstatus, or by a watchpoint.
6954 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6955 thread was stepping or has been stopped by a watchpoint.
6956
6957 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6958
6959 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6960 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6961 of another, then delete the previous, and validate all
6962 breakpoints.
6963 (validate_inserted_breakpoint): New.
6964 (delete_disabled_breakpoints): New.
6965 (validate_breakpoints): New.
6966 (check_mem_read): Validate breakpoints before trusting their
6967 shadow. Delete disabled breakpoints.
6968 (check_mem_write): Validate breakpoints before trusting they
6969 should be inserted. Delete disabled breakpoints.
6970 * mem-break.h (validate_breakpoints):
6971 * server.c (handle_query): Validate breakpoints when we see a
6972 qSymbol query.
6973
6974 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6975
6976 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6977 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6978 if we could tell there's a GDB breakpoint at stop_pc.
6979 (need_step_over_p): Don't do a step over if we find a GDB
6980 breakpoint at the resume PC.
6981
6982 * mem-break.c (struct raw_breakpoint): New.
6983 (enum bkpt_type): New type `gdb_breakpoint'.
6984 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6985 fields. New field `raw'.
6986 (find_raw_breakpoint_at): New.
6987 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6988 breakpoint instead.
6989 (set_breakpoint_at): Adjust.
6990 (delete_raw_breakpoint): New.
6991 (release_breakpoint): New.
6992 (delete_breakpoint): Rename to...
6993 (delete_breakpoint_1): ... this. Add proc parameter. Use
6994 release_breakpoint. Return ENOENT.
6995 (delete_breakpoint): Reimplement.
6996 (find_breakpoint_at): Delete.
6997 (find_gdb_breakpoint_at): New.
6998 (delete_breakpoint_at): Delete.
6999 (set_gdb_breakpoint_at): New.
7000 (delete_gdb_breakpoint_at): New.
7001 (gdb_breakpoint_here): New.
7002 (set_reinsert_breakpoint): Use release_breakpoint.
7003 (uninsert_breakpoint): Rename to ...
7004 (uninsert_raw_breakpoint): ... this.
7005 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7006 (reinsert_raw_breakpoint): Change parameter type to
7007 raw_breakpoint.
7008 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7009 instead.
7010 (check_breakpoints): Adjust. Use release_breakpoint.
7011 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7012 (breakpoint_inserted_here): Ditto.
7013 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7014 Don't trust the breakpoint's shadow if it is not inserted.
7015 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7016 (delete_all_breakpoints): Adjust.
7017 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7018 use delete_breakpoint_1.
7019
7020 * mem-break.h (breakpoints_supported): Delete declaration.
7021 (set_gdb_breakpoint_at): Declare.
7022 (gdb_breakpoint_here): Declare.
7023 (delete_breakpoint_at): Delete.
7024 (delete_gdb_breakpoint_at): Declare.
7025
7026 * server.h (struct raw_breakpoint): Forward declare.
7027 (struct process_info): New field `raw_breakpoints'.
7028
7029 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7030 breakpoints.
7031
7032 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7033
7034 * linux-low.c (status_pending_p_callback): Fix comment.
7035 (linux_wait_for_event_1): Move most of the internal breakpoint
7036 handling from here...
7037 (linux_wait_1): ... to here.
7038 (count_events_callback): New.
7039 (select_singlestep_lwp_callback): New.
7040 (select_event_lwp_callback): New.
7041 (cancel_breakpoints_callback): New.
7042 (select_event_lwp): New.
7043 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7044 priority to all LWPs that have had events that should be reported
7045 to the client. Cancel breakpoints when about to reporting the
7046 event to the client, not while stopping lwps. No longer cancel
7047 finished single-steps here.
7048 (cancel_finished_single_step): Delete.
7049 (cancel_finished_single_steps): Delete.
7050
7051 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7052
7053 * mem-break.c (enum bkpt_type): New.
7054 (struct breakpoint): New field `type'.
7055 (set_breakpoint_at): Change return type to struct breakpoint
7056 pointer. Set type to `other_breakpoint' by default.
7057 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7058 in the breakpoint list.
7059 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7060 (reinsert_breakpoint): Rename to ...
7061 (reinsert_raw_breakpoint): ... this.
7062 (reinsert_breakpoints_at): Adjust.
7063 * mem-break.h (struct breakpoint): Declare.
7064 (set_breakpoint_at): Change return type to struct breakpoint
7065 pointer.
7066
7067 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7068
7069 * server.c (handle_query): Assign, not compare.
7070
7071 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7072
7073 Teach linux gdbserver to step-over-breakpoints.
7074
7075 * linux-low.c (can_hardware_single_step): New.
7076 (supports_breakpoints): New.
7077 (handle_extended_wait): If stopping threads, read the stop pc of
7078 the new cloned LWP.
7079 (get_pc): New.
7080 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7081 low target doesn't support retrieving the PC.
7082 (add_lwp): Set last_resume_kind to resume_continue.
7083 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7084 (linux_attach): Don't clear stop_expected. Set the lwp's
7085 last_resume_kind to resume_stop.
7086 (linux_detach_one_lwp): Don't check for removed breakpoints.
7087 (check_removed_breakpoint): Delete.
7088 (status_pending_p): Rename to ...
7089 (status_pending_p_callback): ... this. Don't check for removed
7090 breakpoints. Don't consider threads that are stopped from GDB's
7091 perspective.
7092 (linux_wait_for_lwp): Always read the stop_pc here.
7093 (cancel_breakpoint): New.
7094 (step_over_bkpt): New global.
7095 (linux_wait_for_event_1): Implement stepping over breakpoints.
7096 (gdb_wants_lwp_stopped): New.
7097 (gdb_wants_all_stopped): New.
7098 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7099 single-step traps here. Store the thread's last reported target
7100 wait status.
7101 (send_sigstop): Don't clear stop_expected. Always set it,
7102 instead.
7103 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7104 (cancel_finished_single_step): New.
7105 (cancel_finished_single_steps): New.
7106 (wait_for_sigstop): Don't cancel finished single-step traps here.
7107 (linux_resume_one_lwp): Don't check for removed breakpoints.
7108 Don't set `step' on non-hardware step archs.
7109 (linux_set_resume_request): Ignore resume_stop requests if already
7110 stopping or stopped. Set the lwp's last_resume_kind.
7111 (resume_status_pending_p): Don't check for removed breakpoints.
7112 (need_step_over_p): New.
7113 (start_step_over): New.
7114 (finish_step_over): New.
7115 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7116 requests. Clear the thread's last reported target waitstatus.
7117 Don't use the `suspended' flag. Don't consider pending breakpoints.
7118 (linux_resume): Start a step-over if necessary.
7119 (proceed_one_lwp): New.
7120 (proceed_all_lwps): New.
7121 (unstop_all_lwps): New.
7122 * linux-low.h (struct lwp_info): Rewrite comment for the
7123 `suspended' flag. Add the `stop_pc' field. Delete the
7124 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7125 Add `'last_resume_kind' and `need_step_over' fields.
7126 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7127 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7128 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7129 (set_raw_breakpoint_at): New.
7130 (set_breakpoint_at): Rewrite to use it.
7131 (reinsert_breakpoint_handler): Delete.
7132 (set_reinsert_breakpoint): New.
7133 (reinsert_breakpoint_by_bp): Delete.
7134 (delete_reinsert_breakpoints): New.
7135 (uninsert_breakpoint): Rewrite.
7136 (uninsert_breakpoints_at): New.
7137 (reinsert_breakpoint): Rewrite.
7138 (reinsert_breakpoints_at): New.
7139 (check_breakpoints): Rewrite.
7140 (breakpoint_here): New.
7141 (breakpoint_inserted_here): New.
7142 (check_mem_read): Adjust.
7143 * mem-break.h (breakpoints_supported, breakpoint_here)
7144 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7145 (reinsert_breakpoint_by_bp): Delete declaration.
7146 (delete_reinsert_breakpoints): Declare.
7147 (reinsert_breakpoint): Delete declaration.
7148 (reinsert_breakpoints_at): Declare.
7149 (uninsert_breakpoint): Delete declaration.
7150 (uninsert_breakpoints_at): Declare.
7151 (check_breakpoints): Adjust prototype.
7152 * server.h: Adjust include order.
7153 (struct thread_info): Declare here. Add a `last_status' field.
7154
7155 2010-03-23 Michael Snyder <msnyder@vmware.com>
7156
7157 * server.c (crc32): New function.
7158 (handle_query): Add handling for 'qCRC:' request.
7159
7160 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7161
7162 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7163 lwp had been stopped by a watchpoint.
7164
7165 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7166
7167 * server.h (internal_error): Declare.
7168 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7169 * utils.c (internal_error): New function.
7170
7171 2010-03-15 Andreas Schwab <schwab@redhat.com>
7172
7173 * configure.srv: Fix typo setting srv_regobj.
7174
7175 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7176
7177 * linux-low.c (fetch_register): Avoid passing a non string literal
7178 format to `error'.
7179 (usr_store_inferior_registers): Ditto.
7180
7181 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7182
7183 * linux-low.c (linux_write_memory): Bail out early if peeking
7184 memory failed.
7185
7186 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7187
7188 * linux-low.h (struct lwp_info): New fields
7189 `stopped_by_watchpoint' and `stopped_data_address'.
7190 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7191 here, and cache them in the lwp object.
7192 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7193 directly.
7194 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7195 field.
7196 (linux_stopped_by_watchpoint): Rewrite.
7197 (linux_stopped_data_address): Rewrite.
7198
7199 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7200
7201 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7202 switching the current inferior, not before.
7203
7204 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7205
7206 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7207 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7208 i386-linux.c and amd64-linux.c.
7209 (reg-i386.o): Removed.
7210 (reg-i386.c): Likewise.
7211 (reg-i386-linux.o): Likewise.
7212 (reg-i386-linux.c): Likewise.
7213 (reg-x86-64.o): Likewise.
7214 (reg-x86-64.c): Likewise.
7215 (reg-x86-64-linux.o): Likewise.
7216 (reg-x86-64-linux.c): Likewise.
7217 (i386.o): New.
7218 (i386.c): Likewise.
7219 (i386-linux.o): Likewise.
7220 (i386-linux.c): Likewise.
7221 (amd64.o): Likewise.
7222 (amd64.c): Likewise.
7223 (amd64-linux.o): Likewise.
7224 (amd64-linux.c): Likewise.
7225
7226 * configure.srv (srv_i386_regobj): New.
7227 (srv_i386_linux_regobj): Likewise.
7228 (srv_amd64_regobj): Likewise.
7229 (srv_amd64_linux_regobj): Likewise.
7230 (srv_i386_32bit_xmlfiles): Likewise.
7231 (srv_i386_64bit_xmlfiles): Likewise.
7232 (srv_i386_xmlfiles): Likewise.
7233 (srv_amd64_xmlfiles): Likewise.
7234 (srv_i386_linux_xmlfiles): Likewise.
7235 (srv_amd64_linux_xmlfiles): Likewise.
7236 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7237 srv_xmlfiles to $srv_i386_xmlfiles.
7238 (i[34567]86-*-mingw32ce*): Likewise.
7239 (i[34567]86-*-mingw*): Likewise.
7240 (i[34567]86-*-nto*): Likewise.
7241 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7242 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7243 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7244 (x86_64-*-linux*): Likewise.
7245
7246 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7247 (init_registers_amd64_linux): New.
7248 (x86_arch_setup): Replace init_registers_x86_64_linux with
7249 init_registers_amd64_linux.
7250
7251 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7252
7253 * configure.ac: Check for libdl. If it is not available link against
7254 static libthread_db.
7255 * configure: Regenerate.
7256
7257 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7258
7259 PR9605
7260
7261 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7262 handing a read watchpoint.
7263 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7264
7265 2010-02-12 Doug Evans <dje@google.com>
7266
7267 * linux-low.c (linux_supports_tracefork_flag): Document.
7268 (linux_look_up_symbols): Add comment.
7269
7270 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7271
7272 * regcache.c (supply_register): Clear regcache if buf is NULL.
7273
7274 2010-02-02 Nicolas Roche <roche@sourceware.org>
7275 Joel Brobecker <brobecker@adacore.com>
7276
7277 * inferiors.c (find_inferior): Add function documentation.
7278 (unloaded_dll): Handle the case where the unloaded dll has not
7279 been previously registered in the dll list.
7280
7281 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7282
7283 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7284 (thumb2_breakpoint): New.
7285 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7286
7287 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7288
7289 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7290 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7291 breakpoints.
7292
7293 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7294
7295 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7296
7297 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7298
7299 * linux-s390-low.c (s390_collect_ptrace_register)
7300 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7301
7302 2010-01-21 Doug Evans <dje@google.com>
7303
7304 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7305 (PTRACE_ARG4_TYPE): New macro.
7306 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7307 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7308 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7309 (usr_store_inferior_registers): Ditto.
7310 (linux_read_memory, linux_write_memory): Ditto.
7311 (linux_test_for_tracefork): Ditto.
7312
7313 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7314 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7315
7316 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7317
7318 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7319 target.
7320
7321 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7322
7323 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7324 prototype to take a regcache. Adjust.
7325
7326 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7327
7328 * regcache.h (struct thread_info): Forward declare.
7329 (struct regcache): New.
7330 (new_register_cache): Adjust prototype.
7331 (get_thread_regcache): Declare.
7332 (free_register_cache): Adjust prototype.
7333 (registers_to_string, registers_from_string): Ditto.
7334 (supply_register, supply_register_by_name, collect_register)
7335 (collect_register_as_string, collect_register_by_name): Ditto.
7336 * regcache.c (struct inferior_regcache_data): Delete.
7337 (get_regcache): Rename to ...
7338 (get_thread_regcache): ... this. Adjust. Switch inferior before
7339 fetching registers.
7340 (regcache_invalidate_one): Adjust.
7341 (regcache_invalidate): Fix prototype.
7342 (new_register_cache): Return the new register cache.
7343 (free_register_cache): Change prototype.
7344 (realloc_register_cache): Adjust.
7345 (registers_to_string): Change prototype to take a regcache. Adjust.
7346 (registers_from_string): Ditto.
7347 (register_data): Ditto.
7348 (supply_register): Ditto.
7349 (supply_register_by_name): Ditto.
7350 (collect_register): Ditto.
7351 (collect_register_as_string): Ditto.
7352 (collect_register_by_name): Ditto.
7353 * server.c (process_serial_event): Adjust.
7354 * linux-low.h (regset_fill_func, regset_store_func): Change
7355 prototype.
7356 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7357 Change prototype.
7358 * linux-low.c (get_stop_pc): Adjust.
7359 (check_removed_breakpoint): Adjust.
7360 (linux_wait_for_event): Adjust.
7361 (linux_resume_one_lwp): Adjust.
7362 (fetch_register): Add regcache parameter. Adjust.
7363 (usr_store_inferior_registers): Ditto.
7364 (regsets_fetch_inferior_registers): Ditto.
7365 (regsets_store_inferior_registers): Ditto.
7366 (linux_fetch_registers, linux_store_registers): Ditto.
7367 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7368 regcache. Adjust.
7369 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7370 Ditto.
7371 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7372 prototype to take a regcache.
7373 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7374 * remote-utils.c (convert_ascii_to_int, outreg)
7375 (prepare_resume_reply): Change prototype to take a regcache.
7376 Adjust.
7377 * target.h (struct target_ops) <fetch_registers, store_registers>:
7378 Change prototype to take a regcache.
7379 (fetch_inferior_registers, store_inferior_registers): Change
7380 prototype to take a regcache. Adjust.
7381 * proc-service.c (ps_lgetregs): Adjust.
7382 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7383 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7384 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7385 take a regcache. Adjust.
7386 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7387 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7388 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7389 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7390 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7391 (cris_cannot_fetch_register):
7392 (cris_breakpoint_at): Change prototype to take a regcache.
7393 Adjust.
7394 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7395 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7396 to take a regcache. Adjust.
7397 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7398 Adjust.
7399 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7400 take a regcache. Adjust.
7401 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7402 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7403 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7404 * linux-mips-low.c (mips_get_pc):
7405 (mips_set_pc): Change prototype to take a regcache. Adjust.
7406 (mips_reinsert_addr): Adjust.
7407 (mips_collect_register): Change prototype to take a regcache.
7408 Adjust.
7409 (mips_supply_register):
7410 (mips_collect_register_32bit, mips_supply_register_32bit)
7411 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7412 (mips_store_fpregset): Ditto.
7413 * linux-ppc-low.c (ppc_supply_ptrace_register)
7414 (ppc_supply_ptrace_register): Ditto.
7415 (parse_spufs_run): Adjust.
7416 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7417 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7418 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7419 take a regcache. Adjust.
7420 * linux-s390-low.c (s390_collect_ptrace_register)
7421 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7422 (s390_set_pc): Change prototype to take a regcache. Adjust.
7423 (s390_arch_setup): Adjust.
7424 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7425 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7426 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7427 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7428 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7429 regcache. Adjust.
7430 (sparc_breakpoint_at): Adjust.
7431 * linux-xtensa-low.c (xtensa_fill_gregset):
7432 (xtensa_store_gregset):
7433 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7434 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7435 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7436 prototype to take a regcache. Adjust.
7437 * win32-arm-low.c (arm_fetch_inferior_register)
7438 (arm_store_inferior_register): Change prototype to take a
7439 regcache. Adjust.
7440 * win32-i386-low.c (i386_fetch_inferior_register)
7441 (i386_store_inferior_register): Change prototype to take a
7442 regcache. Adjust.
7443 * win32-low.c (child_fetch_inferior_registers)
7444 (child_store_inferior_registers): Change prototype to take a
7445 regcache. Adjust.
7446 (win32_wait): Adjust.
7447 (win32_fetch_inferior_registers): Change prototype to take a
7448 regcache. Adjust.
7449 (win32_store_inferior_registers): Adjust.
7450 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7451 store_inferior_register>: Change prototype to take a regcache.
7452
7453 2010-01-20 Doug Evans <dje@google.com>
7454
7455 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7456 #ifdef.
7457 (linux_wait_for_event1, linux_init_signals): Ditto.
7458 (W_STOPCODE): Provide definition if missing.
7459
7460 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7461
7462 * linux-low.c (linux_core_of_thread): New.
7463 (compare_ints, show_process, list_threads): New.
7464 (linux_qxfer_osdata): Report threads and cores.
7465 (linux_target_op): Register linux_core_of_thread.
7466 * remote-utils.c (prepare_resume_reply): Report the core.
7467 (buffer_xml_printf): Support %d specifier.
7468 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7469 New.
7470 (handle_query): Handle qXfer:threads. Announce availability
7471 thereof.
7472 * target.h (struct target_ops): New field core_of_thread.
7473
7474 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7475
7476 * Makefile.in (clean): Remove new generated files.
7477 (reg-s390.o, reg-s390.c): Remove rules.
7478 (reg-s390x.o, reg-s390x.c): Likewise.
7479 (s390-linux32.o, s390-linux32.c): Add rules.
7480 (s390-linux64.o, s390-linux64.c): Likewise.
7481 (s390x-linux64.o, s390x-linux64.c): Likewise.
7482 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7483 * linux-s390-low.c: Include <elf.h>.
7484 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7485 (init_registers_s390): Remove prototype.
7486 (init_registers_s390x): Likewise.
7487 (init_registers_s390_linux32): Add prototype.
7488 (init_registers_s390_linux64): Likewise.
7489 (init_registers_s390x_linux64): Likewise.
7490 (s390_num_regs_3264): New define.
7491 (s390_regmap_3264): New global variable.
7492 (s390_cannot_fetch_register): Remove obsolete check.
7493 (s390_cannot_store_register): Likewise.
7494 (s390_collect_ptrace_register): Handle upper/lower register halves.
7495 (s390_supply_ptrace_register): Likewise.
7496 (s390_fill_gregset): Update to register number changes.
7497 (s390_get_hwcap): New routine.
7498 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7499 Install appropriate regmap and register set.
7500
7501 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7502
7503 * server.c (gdbserver_version): Update copyright year to 2010.
7504 * gdbreplay.c (gdbreplay_version): Likewise.
7505
7506 2009-12-28 Doug Evans <dje@google.com>
7507
7508 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7509 elf/external.h. Include <elf.h> instead but only if necessary.
7510
7511 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7512
7513 * linux-low.c (linux_remove_process): Remove `detaching'
7514 parameter. Don't release/detach from thread_db here.
7515 (linux_kill): Release/detach from thread_db here, ...
7516 (linux_detach): ... and here, before actually detaching.
7517 (linux_wait_1): ... and here, when a process exits.
7518 * thread-db.c (any_thread_of): New.
7519 (thread_db_free): Switch the current inferior to a thread of the
7520 passed in process.
7521
7522 2009-12-21 Doug Evans <dje@google.com>
7523
7524 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7525
7526 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7527 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7528 warning ifndef __NR_tkill. Move setting of errno there too.
7529 Delete unnecessary resetting of errno after syscall.
7530 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7531
7532 * configure.ac: Check for dladdr.
7533 * config.in: Regenerate.
7534 * configure: Regenerate.
7535 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7536 (try_thread_db_load): Update.
7537
7538 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7539
7540 2009-12-18 Doug Evans <dje@google.com>
7541
7542 * event-loop.c: Include unistd.h if it exists.
7543
7544 * linux-low.c (my_waitpid): Move definition away from being in
7545 between linux_tracefork_child/linux_test_for_tracefork.
7546
7547 * gdb_proc_service.h (psaddr_t): Fix type.
7548 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7549 signature to match glibc.
7550
7551 2009-12-16 Doug Evans <dje@google.com>
7552
7553 * linux-low.c (linux_read_memory): Fix argument to read.
7554
7555 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7556
7557 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7558 events, don't leave current_inferior pointing at null.
7559
7560 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7561
7562 * win32-low.c (LOG): Delete.
7563 (OUTMSG): Output to stderr.
7564 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7565 on compile time LOG macro.
7566 (win32_wait): Fix debug output.
7567
7568 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7569
7570 * win32-low.c (win32_add_one_solib): If the dll name is
7571 "ntdll.dll", prepend the system directory to the dll path.
7572
7573 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7574
7575 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7576
7577 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7578 Vladimir Prus <vladimir@codesourcery.com>
7579
7580 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7581 * configure.ac: Check for __mcoldfire__ and set
7582 gdb_cv_m68k_is_coldfire.
7583 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7584 reg-cf.o and reg-m68k.o.
7585 * configure: Regenerated.
7586
7587 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7588
7589 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7590 Pass it to thread_db_free.
7591 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7592 proper `detaching' argument to linux_remove_process.
7593 * linux-low.h (thread_db_free): Add `detaching' parameter.
7594 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7595 to thread_db_free.
7596 (thread_db_free): Add `detaching' parameter. Only
7597 call td_ta_clear_event if detaching from process.
7598
7599 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7600
7601 * thread-db.c (thread_db_free): Fix typo.
7602
7603 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7604
7605 PR gdb/10838
7606 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7607
7608 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7609
7610 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7611 with an i686 compiler.
7612 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7613 needed.
7614 * configure: Rebuilt.
7615
7616 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7617
7618 PR gdb/10783
7619
7620 * server.c (handle_search_memory_1): Correct read_addr initialization
7621 in loop for searching subsequent chunks.
7622
7623 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7624
7625 * configure.ac: New --with-libthread-db option.
7626 * thread-db.c: Allow direct dependence on libthread_db.
7627 (thread_db_free): Adjust.
7628 * config.in: Regenerate.
7629 * configure: Likewise.
7630
7631 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7632
7633 PR gdb/10757
7634 * thread-db.c (attach_thread): New function.
7635 (maybe_attach_thread): Return success/failure.
7636 (find_new_threads_callback): Adjust.
7637 (thread_db_find_new_threads): Loop until no new threads.
7638
7639 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7640
7641 * proc-service.c (ps_lgetregs): Formatting.
7642
7643 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7644
7645 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7646 * configure.ac: Adjust.
7647 * linux-low.h (struct process_info_private): Move members to struct
7648 thread_db.
7649 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7650 * linux-low.c (linux_remove_process): Adjust.
7651 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7652 * server.c (handle_query): Move code ...
7653 (handle_monitor_command): ... here. New function.
7654 * target.h (struct target_ops): New member.
7655 * thread-db.c (struct thread_db): New.
7656 (libthread_db_search_path): New variable.
7657 (thread_db_create_event, thread_db_enable_reporting)
7658 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7659 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7660 (try_thread_db_load_1, dladdr_to_soname): New functions.
7661 (try_thread_db_load, thread_db_load_search): New functions.
7662 (thread_db_init): Search for libthread_db.
7663 (thread_db_free): New function.
7664 (thread_db_handle_monitor_command): Likewise.
7665 * config.in: Regenerate.
7666 * configure: Regenerate.
7667
7668 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7669
7670 * spu-low.c (spu_kill): Wait for inferior to terminate.
7671 Call clear_inferiors.
7672 (spu_detach): Call clear_inferiors.
7673
7674 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7675
7676 * aclocal.m4: Regenerate.
7677 * config.in: Likewise.
7678 * configure: Likewise.
7679
7680 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7681
7682 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7683 (parse_spufs_run): New function.
7684 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7685 (ppc_breakpoint_at): Handle SPU breakpoints.
7686
7687 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7688
7689 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7690 (SPUFS_MAGIC): Define.
7691 (spu_enumerate_spu_ids): New function.
7692 (linux_qxfer_spu): New function.
7693 (linux_target_ops): Install linux_qxfer_spu.
7694
7695 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7696
7697 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7698 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7699 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7700 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7701 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7702 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7703 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7704 (init_registers_powerpc_cell32l): Add prototype.
7705 (init_registers_powerpc_cell64l): Likewise.
7706 (ppc_arch_setup): Detect Cell/B.E. architecture.
7707
7708 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7709
7710 * Makefile.in (datarootdir): New variable.
7711
7712 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7713
7714 * linux-low.c (linux_write_memory): Update debugging output.
7715 * Makefile.in (clean): Add new descriptions.
7716 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7717 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7718 * configure.srv: Add new files for arm*-*-linux*.
7719 * linux-arm-low.c: Add new declarations.
7720 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7721 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7722 (HWCAP_VFPv3D16): New.
7723 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7724 instead of __IWMMXT__.
7725 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7726 (arm_arch_setup): New.
7727 (target_regsets): Remove #ifdef. Add VFP regset.
7728 (the_low_target): Use arm_arch_setup.
7729
7730 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7731
7732 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7733 the main thread again.
7734
7735 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7736
7737 Adding Neutrino gdbserver.
7738 * configure: Regenerated.
7739 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7740 * configure.srv (i[34567]86-*-nto*): New target.
7741 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7742 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7743 (nto_comctrl) [__QNX__]: New function.
7744 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7745
7746 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7747
7748 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7749 srv_tgtobj.
7750
7751 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7752 Pedro Alves <pedro@codesourcery.com>
7753
7754 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7755 don't support CONTEXT_EXTENDED_REGISTERS.
7756 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7757 (the_low_target): Install them.
7758 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7759 failing with ERROR_PIPE_NOT_CONNECTED.
7760
7761 2009-06-30 Doug Evans <dje@google.com>
7762 Pierre Muller <muller@ics.u-strasbg.fr>
7763
7764 Add h/w watchpoint support to x86-linux, win32-i386.
7765 * Makefile.in (SFILES): Add i386-low.c
7766 (i386_low_h): Define.
7767 (i386-low.o): Add dependencies.
7768 (linux-x86-low.o): Add i386-low.h dependency.
7769 (win32-i386-low.o): Ditto.
7770 * i386-low.c: New file.
7771 * i386-low.h: New file.
7772 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7773 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7774 * linux-low.c (linux_add_process): Initialize arch_private.
7775 (linux_remove_process): Free arch_private.
7776 (add_lwp): Initialize arch_private.
7777 (delete_lwp): Free arch_private.
7778 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7779 provided.
7780 * linux-low.h (process_info_private): New member arch_private.
7781 (lwp_info): New member arch_private.
7782 (linux_target_ops): New members new_process, new_thread,
7783 prepare_to_resume.
7784 (ptid_of): New macro.
7785 * linux-x86-low.c: Include stddef.h, i386-low.h.
7786 (arch_process_info): New struct.
7787 (arch_lwp_info): New struct.
7788 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7789 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7790 (i386_dr_low_get_status): New function.
7791 (x86_insert_point, x86_remove_point): New functions.
7792 (x86_stopped_by_watchpoint): New function.
7793 (x86_stopped_data_address): New function.
7794 (x86_linux_new_process, x86_linux_new_thread): New functions.
7795 (x86_linux_prepare_to_resume): New function.
7796 (the_low_target): Add entries for insert_point, remove_point,
7797 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7798 prepare_to_resume.
7799 * server.c (debug_hw_points): New global.
7800 (monitor_show_help): Document set debug-hw-points.
7801 (handle_query): Process "set debug-hw-points".
7802 * server.h (debug_hw_points): Declare.
7803 (paddress): Declare.
7804 * utils.c (NUMCELLS, CELLSIZE): New macros.
7805 (get_sell, xsnprintf, paddress): New functions.
7806 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7807 remove_point, stopped_by_watchpoint, stopped_data_address.
7808 * win32-i386-low.c: Include i386-low.h.
7809 (debug_reg_state): Replaces dr.
7810 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7811 (i386_dr_low_get_status): New function.
7812 (i386_insert_point, i386_remove_point): New functions.
7813 (i386_stopped_by_watchpoint): New function.
7814 (i386_stopped_data_address): New function.
7815 (i386_initial_stuff): Update.
7816 (get_thread_context,set_thread_context,i386_thread_added): Update.
7817 (the_low_target): Add entries for insert_point,
7818 remove_point, stopped_by_watchpoint, stopped_data_address.
7819 * win32-low.c (win32_insert_watchpoint): New function.
7820 (win32_remove_watchpoint): New function.
7821 (win32_stopped_by_watchpoint): New function.
7822 (win32_stopped_data_address): New function.
7823 (win32_target_ops): Add entries for insert_watchpoint,
7824 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7825 * win32-low.h (win32_target_ops): New members insert_point,
7826 remove_point, stopped_by_watchpoint, stopped_data_address.
7827
7828 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7829
7830 * server.c (process_serial_event): Re-return unsupported, not
7831 error, if the type isn't recognized. Re-allow supporting only
7832 insert or remove packets. Also call require_running for
7833 breakpoints. Add missing break statement to default case. Tidy.
7834 * target.h (struct target_ops): Rename insert_watchpoint to
7835 insert_point, and remove_watchpoint to remove_point.
7836
7837 * linux-low.h (struct linux_target_ops): Likewise.
7838 * linux-low.c (linux_insert_watchpoint): Rename to ...
7839 (linux_insert_point): ... this. Adjust.
7840 (linux_remove_watchpoint): Rename to ...
7841 (linux_remove_point): ... this. Adjust.
7842 (linux_target_ops): Adjust.
7843 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7844 (cris_insert_point): ... this.
7845 (cris_remove_watchpoint): Rename to ...
7846 (cris_remove_point): ... this.
7847 (the_low_target): Adjust.
7848
7849 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7850
7851 * server.c (handle_v_kill): Pass signal_pid to
7852 kill_inferior if multi_process is zero.
7853
7854 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7855
7856 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7857 * target.h (target_ops): Comment for *_watchpoint to make it clear
7858 the functions can get types '0' and '1'.
7859
7860 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7861
7862 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7863 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7864 * regcache.c (get_regcache): Likewise.
7865 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7866 * win32-low.c (child_fetch_inferior_registers): Remove check for
7867 regno 0.
7868
7869 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7870 Pedro Alves <pedro@codesourcery.com>
7871
7872 * target.h (struct target_ops) <supports_multi_process>: New
7873 callback.
7874 (target_supports_multi_process): New.
7875 * server.c (handle_query): Even if GDB reports support, only
7876 enable multi-process if the target also supports it. Report
7877 multi-process support only if the target backend supports it.
7878 * linux-low.c (linux_supports_multi_process): New function.
7879 (linux_target_ops): Install it as target_supports_multi_process
7880 callback.
7881
7882 2009-05-24 Doug Evans <dje@google.com>
7883
7884 Global renaming of find_thread_pid to find_thread_ptid.
7885 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7886 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7887 All callers updated.
7888
7889 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7890 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7891 directly.
7892
7893 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7894 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7895 (linux_resume_one_lwp): Ditto.
7896
7897 2009-05-23 Doug Evans <dje@google.com>
7898
7899 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7900 from struct inferior_list_entry * to struct lwp_info *.
7901 All callers updated.
7902
7903 2009-05-13 Doug Evans <dje@google.com>
7904
7905 * linux-x86-low.c: Don't include assert.h.
7906 (x86_siginfo_fixup): Use fatal, not assert.
7907 (x86_arch_setup): Fix comment.
7908
7909 2009-05-12 Doug Evans <dje@google.com>
7910
7911 Biarch support for i386/amd64 gdbserver.
7912 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7913 Add linux-x86-low.c.
7914 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7915 (linux-x86-low.o): Add.
7916 * linux-x86-64-low.c: Delete.
7917 * linux-i386-low.c: Delete.
7918 * linux-x86-low.c: New file.
7919 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7920 linux-x86-low.o.
7921 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7922 linux-x86-low.o.
7923 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7924 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7925 (linux_child_pid_to_exec_file): New function.
7926 (elf_64_header_p, elf_64_file_p): New functions.
7927 (siginfo_fixup): New function.
7928 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7929 give target a chance to convert layout.
7930 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7931 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7932
7933 2009-05-07 Doug Evans <dje@google.com>
7934
7935 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7936 (regsets_store_inferior_registers): Ditto.
7937
7938 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7939
7940 PR server/10048
7941
7942 * linux-low.c (must_set_ptrace_flags): Delete.
7943 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7944 of the global.
7945 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7946 `lwp->must_set_ptrace_flags' instead.
7947 (linux_wait_for_event_1): Set ptrace options here.
7948 (linux_wait_1): ... not here.
7949
7950 2009-04-30 Doug Evans <dje@google.com>
7951
7952 * inferiors.c (started_inferior_callback): New function.
7953 (attached_inferior_callback): New function.
7954 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7955 * server.c (print_started_pid, print_attached_pid): New functions.
7956 (detach_or_kill_for_exit): New function.
7957 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7958 * server.h (have_started_inferiors_p): Declare.
7959 (have_attached_inferiors_p): Declare.
7960
7961 * inferiors.c (remove_process): Fix memory leak, free process.
7962 * linux-low.c (linux_remove_process): New function.
7963 (linux_kill): Call it instead of remove_process.
7964 (linux_detach, linux_wait_1): Ditto.
7965
7966 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7967
7968 * configure.srv: Add x86 Windows CE target.
7969
7970 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7971
7972 * inferiors.c (get_thread_process): Make global.
7973 * server.h (get_thread_process): Add prototype.
7974 * thread-db.c (find_one_thread): Use get_thread_process
7975 instead of current_process.
7976 (thread_db_get_tls_address): Do not crash if called when
7977 thread layer is not yet initialized.
7978
7979 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7980
7981 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7982 * spu-low.c (current_tid): Rename to ...
7983 (current_ptid): ... this.
7984 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7985 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7986 ptid_get_lwp (current_ptid) instead of current_tid.
7987 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7988 instead of current_tid. Use find_process_pid to verify pid
7989 argument is valid. Pass proper argument to remove_process.
7990 (spu_thread_alive): Compare current_ptid instead of current_tid.
7991 (spu_resume): Likewise.
7992
7993 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7994
7995 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7996 variable.
7997
7998 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7999
8000 Implement the multiprocess extensions, and add linux multiprocess
8001 support.
8002
8003 * server.h (ULONGEST): Declare.
8004 (struct ptid, ptid_t): New.
8005 (minus_one_ptid, null_ptid): Declare.
8006 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8007 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8008 (struct inferior_list_entry): Change `id' type from unsigned from
8009 to ptid_t.
8010 (struct sym_cache, struct breakpoint, struct
8011 process_info_private): Forward declare.
8012 (struct process_info): Declare.
8013 (current_process): Declare.
8014 (all_processes): Declare.
8015 (initialize_inferiors): Declare.
8016 (add_thread): Adjust to use ptid_t.
8017 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8018 (add_process, remove_process, find_thread_pid): Declare.
8019 (find_inferior_id): Adjust to use ptid_t.
8020 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8021 (multi_process): Declare.
8022 (push_event): Adjust to use ptid_t.
8023 (read_ptid, write_ptid): Declare.
8024 (prepare_resume_reply): Adjust to use ptid_t.
8025 (clear_symbol_cache): Declare.
8026 * inferiors.c (all_processes): New.
8027 (null_ptid, minus_one_ptid): New.
8028 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8029 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8030 (add_thread): Change unsigned long to ptid. Remove gdb_id
8031 parameter. Adjust.
8032 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8033 (gdb_id_to_thread): Rename to ...
8034 (find_thread_pid): ... this. Change unsigned long to ptid.
8035 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8036 (loaded_dll, pull_pid_from_list): Adjust.
8037 (add_process, remove_process, find_process_pid)
8038 (get_thread_process, current_process, initialize_inferiors): New.
8039 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8040 (struct target_waitstatus) <related_pid>: Ditto.
8041 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8042 return type to int.
8043 (struct target_ops) <join>: Add `pid' argument.
8044 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8045 (struct target_ops) <wait>: Add `ptid' field. Change return type
8046 to ptid.
8047 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8048 (mywait): Add `ptid' argument. Change return type to ptid_t.
8049 (target_pid_to_str): Declare.
8050 * target.c (set_desired_inferior): Adjust to use ptids.
8051 (mywait): Add new `ptid' argument. Adjust.
8052 (target_pid_to_str): New.
8053 * mem-break.h (free_all_breakpoints): Declare.
8054 * mem-break.c (breakpoints): Delelete.
8055 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8056 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8057 to use per-process breakpoint list.
8058 (free_all_breakpoints): New.
8059 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8060 (symbol_cache, all_symbols_looked_up): Delete.
8061 (hexchars): New.
8062 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8063 read_ptid): New.
8064 (prepare_resume_reply): Change ptid argument's type from unsigned
8065 long to ptid_t. Adjust. Implement W;process and X;process.
8066 (free_sym_cache, clear_symbol_cache): New.
8067 (look_up_one_symbol): Adjust to per-process symbol cache. *
8068 * server.c (cont_thread, general_thread, step_thread): Change type
8069 to ptid_t.
8070 (attached): Delete.
8071 (multi_process): New.
8072 (last_ptid): Change type to ptid_t.
8073 (struct vstop_notif) <ptid>: Change type to ptid_t.
8074 (queue_stop_reply, push_event): Change `ptid' argument's type to
8075 ptid_t.
8076 (discard_queued_stop_replies): Add `pid' argument.
8077 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8078 changes. Don't reference the `attached' global.
8079 (attach_inferior): Adjust to mywait interface changes.
8080 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8081 features. Handle and report "multiprocess+". Handle
8082 "qAttached:PID".
8083 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8084 changes.
8085 (handle_v_kill): New.
8086 (handle_v_stopped): Adjust to use target_pid_to_str.
8087 (handle_v_requests): Allow multiple attaches and runs when
8088 multiprocess extensions are in effect. Handle "vKill".
8089 (myresume): Adjust to use ptids.
8090 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8091 (handle_status): Adjust to discard_queued_stop_replies interface
8092 change.
8093 (first_thread_of, kill_inferior_callback)
8094 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8095 (main): Call initialize_inferiors. Adjust to use ptids, killing
8096 and detaching from all inferiors. Handle multiprocess packet
8097 variants.
8098 * linux-low.h: Include gdb_proc_service.h.
8099 (struct process_info_private): New.
8100 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8101 <lwpid_of>: Use ptid_get_lwp.
8102 (get_lwp_thread): Adjust.
8103 (struct lwp_info): Add `dead' member.
8104 (find_lwp_pid): Declare.
8105 * linux-low.c (thread_db_active): Delete.
8106 (new_inferior): Adjust comment.
8107 (inferior_pid): Delete.
8108 (linux_add_process): New.
8109 (handle_extended_wait): Adjust.
8110 (add_lwp): Change unsigned long to ptid.
8111 (linux_create_inferior): Add process to processes table. Adjust
8112 to use ptids. Don't set new_inferior here.
8113 (linux_attach_lwp): Rename to ...
8114 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8115 it. Adjust to use ptids.
8116 (linux_attach_lwp): New.
8117 (linux_attach): Add process to processes table. Don't set
8118 new_inferior here.
8119 (struct counter): New.
8120 (second_thread_of_pid_p, last_thread_of_process_p): New.
8121 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8122 multiple processes.
8123 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8124 processes. Remove process from process table.
8125 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8126 to multiple processes.
8127 (any_thread_of): New.
8128 (linux_detach): Add `pid' argument, and handle it. Remove process
8129 from processes table.
8130 (linux_join): Add `pid' argument. Handle it.
8131 (linux_thread_alive): Change unsighed long argument to ptid_t.
8132 Consider dead lwps as not being alive.
8133 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8134 threads we're not interested in.
8135 (same_lwp, find_lwp_pid): New.
8136 (linux_wait_for_lwp): Change `pid' argument's type from int to
8137 ptid_t. Adjust.
8138 (linux_wait_for_event): Rename to ...
8139 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8140 from int to ptid_t. Adjust.
8141 (linux_wait_for_event): New.
8142 (linux_wait_1): Add `ptid' argument. Change return type to
8143 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8144 that exit from the process table.
8145 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8146 Adjust.
8147 (mark_lwp_dead): New.
8148 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8149 stopping all threads, mark its main lwp as dead.
8150 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8151 ptids.
8152 (fetch_register, usr_store_inferior_registers)
8153 (regsets_fetch_inferior_registers)
8154 (regsets_store_inferior_registers, linux_read_memory)
8155 (linux_write_memory): Inline `inferior_pid'.
8156 (linux_look_up_symbols): Adjust to use per-process
8157 `thread_db_active'.
8158 (linux_request_interrupt): Adjust to use ptids.
8159 (linux_read_auxv): Inline `inferior_pid'.
8160 (initialize_low): Don't reference thread_db_active.
8161 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8162 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8163 (ps_getpid): Return the pid of the current inferior.
8164 * thread-db.c (proc_handle, thread_agent): Delete.
8165 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8166 per-process data.
8167 (find_one_thread): Change argument type to ptid_t. Adjust to
8168 per-process data.
8169 (maybe_attach_thread): Adjust to per-process data and ptids.
8170 (thread_db_find_new_threads): Ditto.
8171 (thread_db_init): Ditto.
8172 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8173 processes table. Adjust to use ptids.
8174 (spu_kill, spu_detach): Adjust interface. Remove process from
8175 processes table.
8176 (spu_join, spu_thread_alive): Adjust interface.
8177 (spu_wait): Adjust interface. Remove process from processes
8178 table. Adjust to use ptids.
8179 * win32-low.c (current_inferior_tid): Delete.
8180 (current_inferior_ptid): New.
8181 (debug_event_ptid): New.
8182 (thread_rec): Take a ptid. Adjust.
8183 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8184 (child_delete_thread): Ditto.
8185 (do_initial_child_stuff): Add `attached' argument. Add process to
8186 processes table.
8187 (child_fetch_inferior_registers, child_store_inferior_registers):
8188 Adjust.
8189 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8190 (win32_attach): Pass 1 to do_initial_child_stuff.
8191 (win32_kill): Adjust interface. Remove process from processes
8192 table.
8193 (win32_detach): Ditto.
8194 (win32_join): Adjust interface.
8195 (win32_thread_alive): Take a ptid.
8196 (win32_resume): Adjust to use ptids.
8197 (get_child_debug_event): Ditto.
8198 (win32_wait): Adjust interface. Remove exiting process from
8199 processes table.
8200
8201 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8202
8203 Non-stop mode support.
8204
8205 * server.h (non_stop): Declare.
8206 (gdb_client_data, handler_func): Declare.
8207 (delete_file_handler, add_file_handler, start_event_loop):
8208 Declare.
8209 (handle_serial_event, handle_target_event, push_event)
8210 (putpkt_notif): Declare.
8211 * target.h (enum resume_kind): New.
8212 (struct thread_resume): Replace `step' field by `kind' field.
8213 (TARGET_WNOHANG): Define.
8214 (struct target_ops) <wait>: Add `options' argument.
8215 <supports_non_stop, async, start_non_stop>: New fields.
8216 (target_supports_non_stop, target_async): New.
8217 (start_non_stop): Declare.
8218 (mywait): Add `options' argument.
8219 * target.c (mywait): Add `options' argument. Print child exit
8220 notifications here.
8221 (start_non_stop): New.
8222 * server.c (non_stop, own_buf, mem_buf): New globals.
8223 (struct vstop_notif): New.
8224 (notif_queue): New global.
8225 (queue_stop_reply, push_event, discard_queued_stop_replies)
8226 (send_next_stop_reply): New.
8227 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8228 interface changes.
8229 (attach_inferior): In non-stop mode, don't wait for the target
8230 here.
8231 (handle_general_set): Handle QNonStop.
8232 (handle_query): When handling qC, return the current general
8233 thread, instead of the first thread of the list.
8234 (handle_query): If the backend supports non-stop mode, include
8235 QNonStop+ in the qSupported query response.
8236 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8237 and non-stop mode.
8238 (handle_v_attach, handle_v_run): Handle non-stop mode.
8239 (handle_v_stopped): New.
8240 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8241 (myresume): Adjust to use resume_kind. Handle non-stop.
8242 (queue_stop_reply_callback): New.
8243 (handle_status): Handle non-stop mode.
8244 (main): Clear non_stop flag on reconnection. Use the event-loop.
8245 Refactor serial protocol handling from here ...
8246 (process_serial_event): ... to this new function. When GDB
8247 selects any thread, select one here. In non-stop mode, wait until
8248 GDB acks all pending events before exiting.
8249 (handle_serial_event, handle_target_event): New.
8250 * remote-utils.c (remote_open): Install remote_desc in the event
8251 loop.
8252 (remote_close): Remove remote_desc from the event loop.
8253 (putpkt_binary): Rename to...
8254 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8255 (putpkt_binary): New as wrapper around putpkt_binary_1.
8256 (putpkt_notif): New.
8257 (prepare_resume_reply): In non-stop mode, don't change the
8258 general_thread.
8259 * event-loop.c: New.
8260 * Makefile.in (OBJ): Add event-loop.o.
8261 (event-loop.o): New rule.
8262
8263 * linux-low.h (pid_of): Moved here.
8264 (lwpid_of): New.
8265 (get_lwp_thread): Use lwpid_of.
8266 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8267 * linux-low.c (pid_of): Delete.
8268 (inferior_pid): Use lwpid_of.
8269 (linux_event_pipe): New.
8270 (target_is_async_p): New.
8271 (delete_lwp): New.
8272 (handle_extended_wait): Use lwpid_of.
8273 (add_lwp): Don't set lwpid field.
8274 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8275 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8276 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8277 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8278 first. Adjust to linux_wait_for_event interface changes. Use
8279 lwpid_of.
8280 (linux_detach): Don't delete the main lwp here.
8281 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8282 (status_pending_p): Don't consider explicitly suspended lwps.
8283 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8284 pointer. Add OPTIONS argument. Change return type to int. Use
8285 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8286 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8287 pointer. Add status pointer argument. Return a pid instead of a
8288 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8289 changes. In non-stop mode, don't switch to a random thread.
8290 (linux_wait): Rename to...
8291 (linux_wait_1): ... this. Add target_options argument, and handle
8292 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8293 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8294 clean exit and signal exit code. Don't stop all threads in
8295 non-stop mode. In all-stop mode, only stop all threads when
8296 reporting a stop to GDB. Handle explicit thread stop requests.
8297 (async_file_flush, async_file_mark): New.
8298 (linux_wait): New.
8299 (send_sigstop): Use lwpid_of.
8300 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8301 interface changes. In non-stop mode, don't switch to a random
8302 thread.
8303 (linux_resume_one_lwp): Use lwpid_of.
8304 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8305 (linux_resume_one_thread): ... this. Handle resume_stop. In
8306 non-stop mode, don't look for pending flag in all threads.
8307 (resume_status_pending_p): Don't consider explicitly suspended
8308 threads.
8309 (my_waitpid): Reimplement. Emulate __WALL.
8310 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8311 Use lwpid_of.
8312 (sigchld_handler, linux_supports_non_stop, linux_async)
8313 (linux_start_non_stop): New.
8314 (linux_target_ops): Register linux_supports_non_stop, linux_async
8315 and linux_start_non_stop.
8316 (initialize_low): Install SIGCHLD handler.
8317 * thread-db.c (thread_db_create_event, find_one_thread)
8318 (thread_db_get_tls_address): Use lwpid_of.
8319 * win32-low.c (win32_detach): Adjust to use resume_kind.
8320 (win32_wait): Add `options' argument.
8321 * spu-low.c (spu_resume): Adjust to use resume_kind.
8322 (spu_wait): Add `options' argument.
8323
8324 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8325
8326 Decouple target code from remote protocol.
8327
8328 * target.h (enum target_waitkind): New.
8329 (struct target_waitstatus): New.
8330 (struct target_ops) <wait>: Return an unsigned long. Take a
8331 target_waitstatus pointer instead of a char pointer.
8332 (mywait): Likewise.
8333 * target.c (mywait): Change prototype to return an unsigned long.
8334 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8335 * server.h (thread_from_wait, old_thread_from_wait): Delete
8336 declarations.
8337 (prepare_resume_reply): Change prototype to take a
8338 target_waitstatus.
8339 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8340 (last_status, last_ptid): New.
8341 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8342 pid instead of a signal.
8343 (attach_inferior): Remove "status" and "signal" parameters.
8344 Adjust.
8345 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8346 not as an address.
8347 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8348 (handle_v_requests, myresume): Remove "status" and "signal"
8349 parameters. Adjust.
8350 (handle_status): New.
8351 (main): Delete local `status'. Adjust.
8352 * remote-utils.c: Include target.h.
8353 (prepare_resume_reply): Change prototype to take a
8354 target_waitstatus. Adjust.
8355
8356 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8357 interface.
8358 * spu-low.c (spu_wait): Adjust.
8359 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8360 Delete.
8361 (win32_wait): Adjust.
8362
8363 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8364
8365 * target.h (struct thread_resume): Delete leave_stopped member.
8366 (struct target_ops): Add a `n' argument to the `resume' callback.
8367 * server.c (start_inferior): Adjust.
8368 (handle_v_cont, myresume): Adjust.
8369 * linux-low.c (check_removed_breakpoint): Adjust to resume
8370 interface change, and to removed leave_stopped field.
8371 (resume_ptr): Delete.
8372 (struct thread_resume_array): New.
8373 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8374 resume interface change.
8375 (linux_continue_one_thread, linux_queue_one_thread)
8376 (resume_status_pending_p): Check if the resume field is NULL
8377 instead of checking the leave_stopped member.
8378 (linux_resume): Adjust to the target resume interface change.
8379 * spu-low.c (spu_resume): Adjust to the target resume interface
8380 change.
8381 * win32-low.c (win32_detach, win32_resume): Ditto.
8382
8383 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8384
8385 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8386 flag.
8387 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8388 pending.
8389 (linux_continue_one_thread): Only preserve the stepping flag if
8390 there's a pending breakpoint.
8391
8392 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8393
8394 * server.c (main): After the inferior having exited, call
8395 remote_close before exiting gdbserver.
8396
8397 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8398
8399 Fix size of FPSCR in Power 7 processors.
8400 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8401 (PPC_FEATURE_HAS_DFP): New #define.
8402 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8403 size of the FPSCR.
8404
8405 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8406
8407 * server.c (handle_query) Whitespace and formatting.
8408
8409 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8410
8411 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8412 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8413 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8414 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8415 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8416 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8417 Makefile.in, configure.ac: Fix whitespace throughout.
8418 * configure: Regenerate.
8419
8420 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8421
8422 * inferiors.c (find_inferior): Make it safe for the callback
8423 function to delete the currently iterated inferior.
8424
8425 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8426
8427 * Makefile.in (linuw_low_h): Move higher.
8428 (thread-db.o): Depend on $(linux_low_h).
8429
8430 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8431
8432 Rename "process" to "lwp" throughout.
8433
8434 * linux-low.c (all_processes): Rename to...
8435 (all_lwps): ... this.
8436 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8437 (add_process): Rename to ...
8438 (add_lwp): ... this. Adjust.
8439 (linux_create_inferior): Adjust.
8440 (linux_attach_lwp): Adjust.
8441 (linux_attach): Adjust.
8442 (linux_kill_one_process): Rename to ...
8443 (linux_kill_one_lwp): ... this. Adjust.
8444 (linux_kill): Adjust.
8445 (linux_detach_one_process): Rename to ...
8446 (linux_detach_one_lwp): ... this. Adjust.
8447 (linux_detach): Adjust.
8448 (check_removed_breakpoint): Adjust.
8449 (status_pending_p): Adjust.
8450 (linux_wait_for_process): Rename to ...
8451 (linux_wait_for_lwp): ... this. Adjust.
8452 (linux_wait_for_event): Adjust.
8453 (send_sigstop): Adjust.
8454 (wait_for_sigstop): Adjust.
8455 (stop_all_processes): Rename to ...
8456 (stop_all_lwps): ... this.
8457 (linux_resume_one_process): Rename to ...
8458 (linux_resume_one_lwp): ... this. Adjust.
8459 (linux_set_resume_request, linux_continue_one_thread)
8460 (linux_queue_one_thread, resume_status_pending_p)
8461 (usr_store_inferior_registers, regsets_store_inferior_registers)
8462 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8463 Adjust.
8464 * linux-low.h (get_process): Rename to ...
8465 (get_lwp): ... this. Adjust.
8466 (get_thread_process): Rename to ...
8467 (get_thread_lwp): ... this. Adjust.
8468 (get_process_thread): Rename to ...
8469 (get_lwp_thread): ... this. Adjust.
8470 (struct process_info): Rename to ...
8471 (struct lwp_info): ... this.
8472 (all_processes): Rename to ...
8473 (all_lwps): ... this.
8474 * proc-service.c (ps_lgetregs): Adjust.
8475 * thread-db.c (thread_db_create_event, find_one_thread)
8476 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8477
8478 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8479
8480 * server.c (handle_query): Handle "qAttached".
8481
8482 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8483
8484 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8485 GPLv3, update license URL.
8486
8487 2009-03-01 Doug Evans <dje@google.com>
8488
8489 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8490 (server_h): Add gdb_signals.h.
8491 (signals.o): Update.
8492 * server.h (target_signal_from_host,target_signal_to_host_p)
8493 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8494
8495 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8496
8497 * remote-utils.c (getpkt): Also generate remote-debug
8498 information if noack_mode is set.
8499
8500 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8501
8502 * server.c (handle_query): Report qXfer:siginfo:read and
8503 qXfer:siginfo:write as supported and handle them.
8504 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8505 * linux-low.c (linux_xfer_siginfo): New.
8506 (linux_target_ops): Set it.
8507
8508 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8509
8510 * server.c (gdbserver_usage): Mention --remote-debug.
8511 (main): Accept '--remote-debug' switch.
8512
8513 2009-01-18 Doug Evans <dje@google.com>
8514
8515 * regcache.c (new_register_cache): No need to check result of xcalloc.
8516 * server.c (handle_search_memory): Back out calls to xmalloc,
8517 result is checked and error is returned to user upon failure.
8518 (handle_query): Ditto. Add more checks for result of malloc.
8519 (handle_v_cont): Check result of malloc, report error back to
8520 user upon failure.
8521 (handle_v_run): Ditto. Call freeargv.
8522 * server.h (freeargv): Declare.
8523 * utils.c (freeargv): New fn.
8524
8525 2009-01-15 Doug Evans <dje@google.com>
8526
8527 * gdbreplay.c (perror_with_name): Make arg const char *.
8528 * server.h (target_signal_to_name): Make return type const char *.
8529 * thread-db.c (thread_db_err_str): Make return type const char *.
8530 * utils.c (perror_with_name): Make arg const char *.
8531
8532 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8533
8534 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8535 when handling a EXIT_PROCESS_DEBUG_EVENT.
8536
8537 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8538
8539 * gdbreplay.c (gdbreplay_version): Update copyright year.
8540 * server.c (gdbserver_version): Likewise.
8541
8542 2009-01-05 Doug Evans <dje@google.com>
8543
8544 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8545 (handle_extended_wait): Improve comment.
8546
8547 2008-12-13 Doug Evans <dje@google.com>
8548
8549 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8550 * server.h (ATTR_MALLOC): New macro.
8551 (xmalloc,xcalloc,xstrdup): Declare.
8552 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8553 * inferiors.c: Ditto.
8554 * linux-low.c: Ditto.
8555 * mem-break.c: Ditto.
8556 * regcache.c: Ditto.
8557 * remote-utils.c: Ditto.
8558 * server.c: Ditto.
8559 * target.c: Ditto.
8560 * win32-low.c: Ditto.
8561
8562 2008-12-12 Doug Evans <dje@google.com>
8563
8564 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8565 in debugging printf.
8566
8567 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8568
8569 2008-12-09 Doug Evans <dje@google.com>
8570
8571 * linux-low.h (struct process_info): Delete member tid, unused.
8572 * thread-db.c (find_one_thread): Update.
8573 (maybe_attach_thread): Update.
8574
8575 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8576
8577 * target.h (struct target_ops): Add qxfer_osdata member.
8578 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8579 and dirent.h.
8580 (linux_qxfer_osdata): New functions.
8581 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8582 callback.
8583 * server.c (handle_query): Handle "qXfer:osdata:read:".
8584 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8585 (buffer_xml_printf): New functions.
8586 * server.h (struct buffer): New.
8587 (buffer_grow_str, buffer_grow_str0): New macros.
8588 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8589 (buffer_xml_printf): Declare.
8590
8591 2008-11-24 Doug Evans <dje@google.com>
8592
8593 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8594
8595 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8596
8597 * server.c (handle_v_run): Always use the supplied argument list.
8598
8599 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8600
8601 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8602 (xtensa_regmap_table): Add entry for scompare1.
8603
8604 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8605
8606 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8607 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8608 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8609 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8610 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8611 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8612 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8613 XML target descriptions.
8614 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8615 when inferior is running on an ISA 2.05 or later processor. Add
8616 special case to return offset for full 64-bit slot of FPSCR when
8617 in 32-bits.
8618
8619 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8620
8621 * Makefile.in (SFILES, clean): Added sparc64 files.
8622 (reg-sparc64.o, reg-sparc64.c): New.
8623 * configure.srv (sparc*-*-linux*): New configuration.
8624 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8625 syscall arguments for SPARC.
8626 (regsets_store_inferior_registers): Likewise.
8627 * linux-sparc-low.c: New file.
8628
8629 2008-10-21 Doug Evans <dje@google.com>
8630
8631 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8632 (READLINE_DIR,READLINE_DEP): Delete.
8633 (INTERNAL_CFLAGS): Update.
8634 (LINTFLAGS): Update.
8635
8636 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8637
8638 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8639 whole argv from the last run, not just argv[0].
8640
8641 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8642
8643 * regcache.c (new_register_cache): Return NULL if the register
8644 cache size isn't known yet.
8645 (free_register_cache): Avoid dereferencing a NULL regcache.
8646
8647 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8648
8649 * configure.srv: Merge MIPS and MIPS64.
8650
8651 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8652
8653 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8654
8655 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8656
8657 * Makefile.in: Add required vsx dependencies.
8658
8659 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8660 Declare init_registers_powerpc_vsx32l.
8661 Declare init_registers_powerpc_vsx64l.
8662 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8663 (ppc_arch_setup): Check for VSX in hwcap.
8664 (ppc_fill_vsxregset): New function.
8665 (ppc_store_vsxregset): New function.
8666 Add new VSX entry in regset_info target_regsets.
8667
8668 * configure.srv: Add new VSX dependencies.
8669
8670 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8671
8672 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8673 (remote_open): Set or clear transport_is_reliable.
8674 (putpkt_binary): Don't expect acks in noack mode.
8675 (getpkt): Don't send ack/nac in noack mode.
8676 * server.c (handle_general_set): Handle QStartNoAckMode.
8677 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8678 qSupported.
8679 (main): Reset noack_mode on every connection.
8680 * server.h (noack_mode): Declare.
8681
8682 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8683
8684 * Makefile.in (GDBREPLAY_OBS): New variable.
8685 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8686
8687 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8688 Daniel Jacobowitz <dan@codesourcery.com>
8689
8690 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8691 (usr_store_inferior_registers): Likewise.
8692 (regsets_store_inferior_registers): Likewise.
8693
8694 2008-07-31 Rolf Jansen <rj@surtec.com>
8695 Pedro Alves <pedro@codesourcery.com>
8696
8697 * configure.ac: Check for memmem declaration.
8698 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8699 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8700 (disable_packet_qfThreadInfo): Unconditionally compile.
8701 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8702 * configure, config.in: Regenerate.
8703
8704 2008-07-28 Doug Kwan <dougkwan@google.com>
8705
8706 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8707 (linux_write_memory): Remove declaration of errno.
8708
8709 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8710
8711 * linux-low.c (handle_extended_wait): Do not use "status"
8712 variable uninitialized.
8713
8714 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8715
8716 * server.c (handle_v_attach): Inhibit reporting dll changes.
8717
8718 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8719
8720 * remote-utils.c (prepare_resume_reply): If requested, don't
8721 output "thread:TID" in the T stop reply.
8722
8723 * server.c (disable_packet_vCont, disable_packet_Tthread)
8724 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8725 (handle_query): If requested, disable support for qC, qfThreadInfo
8726 and qsThreadInfo.
8727 (handle_v_requests): If requested, disable support for vCont.
8728 (gdbserver_show_disableable): New.
8729 (main): Handle --disable-packet and --disable-packet=LIST.
8730
8731 * server.h (disable_packet_vCont, disable_packet_Tthread)
8732 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8733
8734 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8735
8736 * server.c (gdbserver_usage): Mention --version.
8737
8738 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8739
8740 * Makefile.in (gdbreplay.o): New rule.
8741
8742 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8743
8744 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8745 message, not gdbserver.
8746
8747 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8748 Nathan Sidwell <nathan@codesourcery.com>
8749 Joseph Myers <joseph@codesourcery.com>
8750
8751 * acinclude.m4: Include ../../config/acx.m4.
8752 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8753 * configure, config.in: Regenerate.
8754 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8755 * server.c (gdbserver_version): Print PKGVERSION.
8756 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8757 (main): Adjust gdbserver_usage calls.
8758 * gdbreplay.c (version, host_name): Add declarations.
8759 (gdbreplay_version, gdbreplay_usage): New.
8760 (main): Accept --version and --help options.
8761
8762 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8763
8764 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8765 (arm_breakpoint_at): Handle Thumb.
8766 (the_low_target): Add comment.
8767
8768 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8769
8770 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8771
8772 2008-05-09 Doug Evans <dje@google.com>
8773
8774 * server.h (decode_search_memory_packet): Declare.
8775 * remote-utils.c (decode_search_memory_packet): New fn.
8776 * server.c (handle_search_memory_1): New fn.
8777 (handle_search_memory): New fn.
8778 (handle_query): Process qSearch:memory packets.
8779
8780 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8781
8782 * regcache.c (registers_length): Remove.
8783 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8784 full register packet.
8785 * regcache.h (registers_length): Remove prototype.
8786 * server.h (PBUFSIZ): Define to 16384.
8787
8788 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8789
8790 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8791 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8792 powerpc-64l.o, and powerpc-altivec64l.o.
8793 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8794 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8795 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8796 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8797 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8798 to srv_xmlfiles.
8799
8800 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8801 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8802 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8803 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8804 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8805 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8806 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8807 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8808 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8809 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8810 (clean): Update.
8811
8812 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8813 (init_registers_powerpc_32l): ... this new prototype.
8814 (init_registers_powerpc_32): Remove, replace by ...
8815 (init_registers_powerpc_altivec32l): ... this new prototype.
8816 (init_registers_powerpc_e500): Remove, replace by ...
8817 (init_registers_powerpc_e500l): ... this new prototype.
8818 (init_registers_ppc64): Remove, replace by ...
8819 (init_registers_powerpc_64l): ... this new prototype.
8820 (init_registers_powerpc_64): Remove, replace by ...
8821 (init_registers_powerpc_altivec64l): ... this new prototype.
8822 (ppc_num_regs): Set to 73.
8823 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8824 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8825 (ppc_cannot_store_register): Handle orig_r3 and trap.
8826 (ppc_arch_setup): Update init_registers_... calls.
8827 (ppc_fill_gregset): Handle orig_r3 and trap.
8828
8829 * inferiors.c (clear_inferiors): Reset current_inferior.
8830
8831 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8832
8833 * acinclude.m4: Add override.m4.
8834 * configure: Regenerate.
8835
8836 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8837
8838 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8839 initial call to init_register_ppc64.
8840
8841 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8842
8843 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8844 single powerpc*-*-linux* case.
8845 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8846
8847 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8848
8849 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8850 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8851 from reg_xmlfiles.
8852 * linux-ppc-low.c: Include <elf.h>.
8853 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8854 (ppc_hwcap): New global variable.
8855 (ppc_regmap): Remove __SPE__ #ifdef sections.
8856 (ppc_regmap_e500): New global variable.
8857 (ppc_cannot_store_register): Update __SPE__ special case.
8858 (ppc_get_hwcap): New function.
8859 (ppc_arch_setup): Use it to determine whether inferior supports
8860 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8861 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8862 Do not access registers if target does not support AltiVec.
8863 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8864 Do not access registers if target does not support SPE.
8865 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8866
8867 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8868
8869 * linux-low.c (disabled_regsets, num_regsets): New.
8870 (use_regsets_p): Delete.
8871 (linux_wait_for_process): Clear disabled_regsets.
8872 (regsets_fetch_inferior_registers): Check and set it.
8873 (regsets_store_inferior_registers): Likewise.
8874 (linux_fetch_registers, linux_store_registers): Do not use
8875 use_regsets_p.
8876 (initialize_low): Allocate disabled_regsets.
8877
8878 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8879
8880 * Makefile.in (LIBOBJS): New.
8881 (OBS): Use LIBOBJS.
8882 (memmem.o): New rule.
8883 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8884 * configure: Regenerated.
8885
8886 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8887
8888 * server.c (handle_query): Never return "unsupported" for
8889 qXfer:features:read queries.
8890
8891 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8892
8893 * server.c (get_features_xml): Fix inverted condition.
8894 (handle_query): Always support qXfer:feature:read.
8895
8896 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8897
8898 * server.c (wrapper_argv): New.
8899 (start_inferior): Handle wrapper_argv. If set, expect an extra
8900 trap.
8901 (gdbserver_usage): Document --wrapper.
8902 (main): Parse --wrapper.
8903
8904 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8905
8906 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8907 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8908 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8909 (ppc_set_pc): Likewise.
8910 (ppc_arch_setup): New function.
8911 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8912 of collect_register.
8913 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8914
8915 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8916
8917 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8918 instead of linux-ppc64-low.o.
8919 * linux-ppc64-low.c: Remove file.
8920 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8921 (linux-ppc64-low.o): Remove rule.
8922
8923 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8924 (init_registers_powerpc_64): Likewise.
8925 (ppc_regmap): Conditionally define depending on __powerpc64__.
8926 (ppc_cannot_store_register): Do not special-case "fpscr" when
8927 compiled on __powerpc64__.
8928 (ppc_collect_ptrace_register): New function.
8929 (ppc_supply_ptrace_register): New function.
8930 (ppc_breakpoint): Change type to "unsigned int".
8931 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8932 (the_low_target): Conditionally provide initializers for the
8933 arch_setup member depending on __powerpc64__. Install
8934 collect_ptrace_register and supply_ptrace_register members.
8935
8936 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8937
8938 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8939 * server.c (gdbserver_xmltarget): Define.
8940 (get_features_xml): Use it to replace "target.xml" and arch_string.
8941
8942 * configure.srv: Remove srv_xmltarget. Add XML files that were
8943 mentioned there to srv_xmlfiles instead. Remove conditional tests
8944 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8945 srv_xmlfiles and srv_regobj to include all possible choices.
8946 * configure.ac (srv_xmltarget): Remove.
8947 (srv_xmlfiles): Do not add "target.xml".
8948 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8949 checks for supplementary target information.
8950 * configure: Regenerate.
8951 * Makefile.in (XML_TARGET): Remove.
8952 (target.xml): Remove rule.
8953 (clean): Do not clean up target.xml.
8954 (.PRECIOUS): Do not mention target.xml.
8955
8956 * target.h (struct target_ops): Remove arch_string member.
8957 * linux-low.c (linux_arch_string): Remove.
8958 (linux_target_ops): Remove arch_string initializer.
8959 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8960 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8961 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8962 * spu-low.c (spu_arch_string): Remove.
8963 (spu_target_ops): Remove arch_string initializer.
8964 * win32-low.c (win32_arch_string): Remove.
8965 (win32_target_ops): Remove arch_string initializer.
8966 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8967 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8968 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8969
8970 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8971
8972 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8973 by collect_ptrace_register and supply_ptrace_register hooks.
8974 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8975 instead of checking for the_low_target.left_pad_xfer.
8976 (usr_store_inferior_registers): Use collect_ptrace_register callback
8977 instead of checking for the_low_target.left_pad_xfer.
8978
8979 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8980 (s390_supply_ptrace_register): Likewise.
8981 (s390_fill_gregset): Call s390_collect_ptrace_register.
8982 (the_low_target): Update.
8983
8984 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8985 (ppc_supply_ptrace_register): Likewise.
8986 (the_low_target): Update.
8987
8988 * linux-i386-low.c (the_low_target): Update.
8989 * linux-x86-64-low.c (the_low_target): Update.
8990
8991 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8992
8993 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8994 reg-s390.o and reg-s390x.o.
8995
8996 * linux-low.c (new_inferior): New global variable.
8997 (linux_create_inferior, linux_attach): Set it.
8998 (linux_wait_for_process): Call the_low_target.arch_setup after the
8999 target has stopped for the first time.
9000 (initialize_low): Do not call the_low_target.arch_setup.
9001
9002 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9003 (s390_set_pc): Likewise.
9004 (s390_arch_setup): New function.
9005 (the_low_target): Use s390_arch_setup as arch_setup routine.
9006
9007 * regcache.c (realloc_register_cache): New function.
9008 (set_register_cache): Call it for each existing regcache.
9009
9010 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9011
9012 * server.h (init_registers): Remove prototype.
9013
9014 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9015 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9016 instead of init_registers ().
9017 * linux-arm-low.c (init_registers_arm): Add prototype.
9018 (init_registers_arm_with_iwmmxt): Likewise.
9019 (the_low_target): Add initializer for arch_setup field.
9020 * linux-cris-low.c (init_registers_cris): Add prototype.
9021 (the_low_target): Add initializer for arch_setup field.
9022 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9023 (the_low_target): Add initializer for arch_setup field.
9024 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9025 (the_low_target): Add initializer for arch_setup field.
9026 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9027 (the_low_target): Add initializer for arch_setup field.
9028 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9029 (the_low_target): Add initializer for arch_setup field.
9030 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9031 (the_low_target): Add initializer for arch_setup field.
9032 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9033 (init_registers_mips64_linux): Likewise.
9034 (the_low_target): Add initializer for arch_setup field.
9035 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9036 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9037 (the_low_target): Add initializer for arch_setup field.
9038 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9039 (init_registers_powerpc_64): Likewise.
9040 (the_low_target): Add initializer for arch_setup field.
9041 * linux-s390-low.c (init_registers_s390): Add prototype.
9042 (init_registers_s390x): Likewise.
9043 (the_low_target): Add initializer for arch_setup field.
9044 * linux-sh-low.c (init_registers_sh): Add prototype.
9045 (the_low_target): Add initializer for arch_setup field.
9046 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9047 (the_low_target): Add initializer for arch_setup field.
9048 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9049 (the_low_target): Add initializer for arch_setup field.
9050
9051 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9052 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9053 instead of init_registers ().
9054 * win32-arm-low.c (init_registers_arm): Add prototype.
9055 (the_low_target): Add initializer for arch_setup field.
9056 * win32-i386-low.c (init_registers_i386): Add prototype.
9057 (the_low_target): Add initializer for arch_setup field.
9058
9059 * spu-low.c (init_registers_spu): Add prototype.
9060 (initialize_low): Call initialie_registers_spu () instead of
9061 initialize_registers ().
9062
9063 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9064
9065 * server.c (handle_v_requests): When handling the vRun and vAttach
9066 packets, if already debugging a process, don't kill it. Return an
9067 error instead.
9068
9069 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9070
9071 * server.c (handle_query): Correct length check.
9072
9073 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9074
9075 * win32-low.c (do_initial_child_stuff): Add process handle
9076 parameter. Set current_process_handle and current_process_id from the
9077 parameters. Clear globals.
9078 (win32_create_inferior): Don't set current_process_handle and
9079 current_process_id here. Instead pass them on the call to
9080 do_initial_child_stuff.
9081 (win32_attach): Likewise.
9082 (win32_clear_inferiors): New.
9083 (win32_kill): Don't close the current process handle or the
9084 current thread handle here. Instead call win32_clear_inferiors.
9085 (win32_detach): Don't open a new handle to the process. Call
9086 win32_clear_inferiors.
9087 (win32_join): Don't rely on current_process_handle; open a new
9088 handle using the process id.
9089 (win32_wait): Call win32_clear_inferiors when the inferior process
9090 has exited.
9091
9092 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9093
9094 * server.c (monitor_show_help): Add "exit".
9095
9096 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9097
9098 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9099 (clean): Add reg-xtensa.c.
9100 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9101 * configure.srv (xtensa*-*-linux*) New target.
9102 * linux-xtensa-low.c: New.
9103 * xtensa-xtregs.c: New.
9104
9105 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9106
9107 * hostio.c: Don't include errno.h.
9108 (errno_to_fileio_errno): Move to hostio-errno.
9109 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9110 error number outputting to the target->hostio_last_error callback.
9111 (hostio_packet_error): Use FILEIO_EINVAL directly.
9112 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9113 calls to hostio_error.
9114 * hostio-errno.c: New.
9115 * server.h (hostio_last_error_from_errno): Declare.
9116 * target.h (target_ops): Add hostio_last_error member.
9117 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9118 as hostio_last_error handler.
9119 * spu-low.c (spu_target_ops): Likewise.
9120 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9121 (wince_hostio_last_error): New functions.
9122 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9123 as hostio_last_error handler.
9124 (win32_target_ops) [!_WIN32_WCE]: Register
9125 hostio_last_error_from_errno as hostio_last_error handler.
9126 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9127 (hostio-errno.o): New rule.
9128 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9129 * configure.srv (srv_hostio_err_objs): New variable. Default to
9130 hostio-errno.o.
9131 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9132 * configure: Regenerate.
9133
9134 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9135
9136 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9137 (linux_kill, linux_detach): Clean up the process list.
9138 * remote-utils.c (remote_open): Improve port number parsing.
9139 (putpkt_binary, input_interrupt): Only send interrupts if the target
9140 is running.
9141 * server.c (extended_protocol): Make static.
9142 (attached): Define earlier.
9143 (exit_requested, response_needed, program_argv): New variables.
9144 (target_running): New.
9145 (start_inferior): Clear attached here.
9146 (attach_inferior): Set attached here.
9147 (require_running): Define.
9148 (handle_query): Use require_running and target_running. Implement
9149 "monitor exit".
9150 (handle_v_attach, handle_v_run): New.
9151 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9152 (gdbserver_usage): Update.
9153 (main): Redo argument parsing. Handle --debug and --multi. Handle
9154 --attach along with other options or after the port. Save
9155 program_argv. Support no initial program. Resynchronize
9156 communication with GDB after an error. Handle "monitor exit".
9157 Use require_running and target_running. Always allow the extended
9158 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9159 restart in extended mode.
9160 * README: Refer to the GDB manual. Update --attach usage.
9161
9162 2007-12-20 Andreas Schwab <schwab@suse.de>
9163
9164 * linux-low.c (STACK_SIZE): Define.
9165 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9166 (linux_test_for_tracefork): Likewise.
9167
9168 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9169
9170 * linux-low.c (linux_wait_for_event): Update messages. Do not
9171 reinsert auto-delete breakpoints.
9172 * mem-break.c (struct breakpoint): Change return type of handler to
9173 int.
9174 (set_breakpoint_at): Update handler type.
9175 (reinsert_breakpoint_handler): Return 1 instead of calling
9176 delete_breakpoint.
9177 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9178 setting a new one.
9179 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9180 * mem-break.h (set_breakpoint_at): Update handler type.
9181 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9182 * win32-low.c (auto_delete_breakpoint): New.
9183 (get_child_debug_event): Use it.
9184
9185 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9186
9187 * configure.ac: Check for pread and pwrite.
9188 * hostio.c (handle_pread): Fall back to lseek and read.
9189 (handle_pwrite): Fall back to lseek and write.
9190 * config.in, configure: Regenerated.
9191
9192 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9193
9194 * server.c (myresume): Add own_buf argument.
9195 (main): Update calls.
9196
9197 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9198
9199 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9200 * remote-utils.c (remote_open): Do not call disable_async_io.
9201 (block_async_io): Delete.
9202 (unblock_async_io): Make static.
9203 (initialize_async_io): New.
9204 * server.c (handle_v_cont): Handle async I/O here.
9205 (myresume): Likewise. Move other common resume tasks here...
9206 (main): ... from here. Call initialize_async_io. Disable async
9207 I/O before the main loop.
9208 * server.h (initialize_async_io): Declare.
9209 (block_async_io, unblock_async_io): Delete prototypes.
9210 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9211
9212 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9213
9214 * remote-utils.c (readchar): Allow binary data in received messages.
9215
9216 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9217
9218 * win32-low.c (attaching): New global.
9219 (win32_create_inferior): Clear the `attaching' global.
9220 (win32_attach): Set the `attaching' global.
9221 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9222 attaching. Only set a breakpoint at the entry point if not
9223 attaching.
9224
9225 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9226
9227 * server.c (main): Don't report dll events on the initial
9228 connection on attaches.
9229
9230 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9231
9232 * server.c (main): Relax numerical bases supported for the pid of
9233 the --attach command line argument.
9234
9235 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9236
9237 * win32-low.c (win32_attach): Call OpenProcess before
9238 DebugActiveProcess, not after. Add last error output to error
9239 call.
9240
9241 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9242
9243 * win32-low.c (win32_get_thread_context)
9244 (win32_set_thread_context): New functions.
9245 (thread_rec): Use win32_get_thread_context.
9246 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9247 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9248 field.
9249
9250 2007-12-03 Leo Zayas
9251 Pedro Alves <pedro_alves@portugalmail.pt>
9252
9253 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9254 global variables.
9255 (child_add_thread): Minor cleanup.
9256 (child_continue): Resume artificially suspended threads before
9257 calling ContinueDebugEvent.
9258 (suspend_one_thread): New.
9259 (fake_breakpoint_event): New.
9260 (get_child_debug_event): Change return type to int. Check here if
9261 gdb sent an interrupt request. If a soft interrupt was requested,
9262 fake a breakpoint event. Return 0 if there is no event to handle,
9263 and 1 otherwise.
9264 (win32_wait): Don't check here if gdb sent an interrupt request.
9265 Ensure there is a valid event to handle.
9266 (win32_request_interrupt): Add soft interruption method as last
9267 resort.
9268
9269 2007-12-03 Leo Zayas
9270 Pedro Alves <pedro_alves@portugalmail.pt>
9271
9272 * win32-low.h (win32_thread_info): Add descriptions to the
9273 structure members. Replace `suspend_count' counter by a
9274 `suspended' flag.
9275 * win32-low.c (thread_rec): Update condition of when to get the
9276 context from the inferior. Rely on ContextFlags being set if it
9277 has already been retrieved. Only suspend the inferior thread if
9278 we haven't already. Warn if that fails.
9279 (continue_one_thread): s/suspend_count/suspended/. Only call
9280 ResumeThread once. Warn if that fails.
9281
9282 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9283
9284 * win32-low.c (win32_wait): Don't read from the inferior when it
9285 has already exited.
9286
9287 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9288
9289 * Makefile.in (win32_low_h): New variable.
9290 (win32-low.o): Add dependency on $(win32_low_h).
9291 (win32-arm-low.o, win32-i386-low.o): New rules.
9292
9293 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9294
9295 * hostio.c: Correct copyright year.
9296
9297 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9298
9299 * Makefile.in (OBS): Add hostio.o.
9300 (hostio.o): New rule.
9301 * server.h (handle_vFile): Declare.
9302 * hostio.c: New file.
9303 * server.c (handle_v_requests): Take packet_len and new_packet_len
9304 for binary packets. Call handle_vFile.
9305 (main): Update call to handle_v_requests.
9306
9307 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9308
9309 * linux-low.c: Include <sched.h>.
9310
9311 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9312
9313 * linux-low.c (linux_tracefork_grandchild): New.
9314 (linux_tracefork_child): Use clone.
9315 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9316
9317 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9318
9319 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9320
9321 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9322
9323 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9324
9325 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9326
9327 * inferiors.c (change_inferior_id): Delete.
9328 (add_pid_to_list, pull_pid_from_list): New.
9329 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9330 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9331 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9332 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9333 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9334 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9335 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9336 (using_threads): Always set to 1.
9337 (handle_extended_wait): New.
9338 (add_process): Do not set TID.
9339 (linux_create_inferior): Set must_set_ptrace_flags.
9340 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9341 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9342 (linux_thread_alive): Rename TID argument to LWPID.
9343 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9344 (linux_wait_for_event): Do not use TID or check using_threads. Update
9345 call to dead_thread_notify. Call handle_extended_wait.
9346 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9347 (send_sigstop): Delete sigstop_sent.
9348 (wait_for_sigstop): Avoid TID.
9349 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9350 (linux_test_for_tracefork): New.
9351 (linux_lookup_signals): Use thread_db_active and
9352 linux_supports_tracefork_flag.
9353 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9354 * linux-low.h (get_process_thread): Avoid TID.
9355 (struct process_ifo): Move thread_known and tid to the end. Remove
9356 sigstop_sent.
9357 (linux_attach_lwp, thread_db_init): Update prototypes.
9358 * server.h (change_inferior_id): Delete prototype.
9359 (add_pid_to_list, pull_pid_from_list): New prototypes.
9360 * thread-db.c (thread_db_use_events): New.
9361 (find_first_thread): Rename to...
9362 (find_one_thread): ...this. Update callers and messages. Do not
9363 call fatal. Check thread_db_use_events. Do not call
9364 change_inferior_id or new_thread_notify.
9365 (maybe_attach_thread): Update. Do not call new_thread_notify.
9366 (thread_db_init): Set thread_db_use_events. Check use_events.
9367 * utils.c (fatal, warning): Correct message prefix.
9368
9369 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9370
9371 * Makefile.in (clean): Remove new files.
9372 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9373 (powerpc-64.o, powerpc-64.c): New rules.
9374 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9375 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9376 with SPE.
9377 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9378 SPE targets.
9379 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9380 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9381 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9382 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9383 (target_regsets): Add AltiVec and SPE register sets.
9384 * configure.ac: Check for AltiVec and SPE.
9385 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9386 (ppc_fill_vrregset, ppc_store_vrregset): New.
9387 (target_regsets): Add AltiVec register set.
9388 * configure: Regenerated.
9389
9390 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9391
9392 * linux-low.c (O_LARGEFILE): Define.
9393 (linux_read_memory): Use /proc/PID/mem.
9394 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9395 * configure, config.in: Regenerated.
9396
9397 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9398
9399 * linux-low.c (linux_wait_for_event): Do not pass signals while
9400 single-stepping.
9401
9402 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9403
9404 * win32-low.c (create_process): New.
9405 (win32_create_inferior): Use create_process instead of
9406 CreateProcess. If create_process failed retry appending an ".exe"
9407 suffix. Store the GetLastError result immediatelly after
9408 create_process calls and use it on the call to error.
9409
9410 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9411
9412 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9413
9414 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9415
9416 * configure.ac: Switch license to GPLv3.
9417
9418 2007-08-01 Michael Snyder <msnyder@access-company.com>
9419
9420 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9421
9422 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9423
9424 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9425 typedef.
9426 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9427 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9428 CloseToolhelp32Snapshot.
9429 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9430 CloseToolhelp32Snapshot.
9431
9432 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9433
9434 * server.c (main): Check for inferior exit before main loop.
9435
9436 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9437
9438 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9439 instead of on tmp_desc.
9440
9441 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9442 Daniel Jacobowitz <dan@codesourcery.com>
9443
9444 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9445 (add_thread): Minor cleanups.
9446 (clear_inferiors): Move lower in the file. Clear the DLL
9447 list.
9448 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9449 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9450 (xml_escape_text): New.
9451 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9452 for qSupported.
9453 (handle_v_cont): Report errors.
9454 (gdbserver_version): Update.
9455 (main): Correct size of own_buf. Do not report initial DLL events.
9456 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9457 (unloaded_dll, xml_escape_text): New.
9458 * win32-low.c (enum target_waitkind): Update comments.
9459 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9460 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9461 (win32_EnumProcessModules, win32_GetModuleInformation)
9462 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9463 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9464 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9465 (win32_Module32First, win32_Module32Next, load_toolhelp)
9466 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9467 (get_child_debug_event): Handle DLL events.
9468 (win32_wait): Likewise.
9469
9470 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9471
9472 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9473 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9474
9475 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9476
9477 * win32-low.c (handle_output_debug_string): Ignore event if not
9478 waiting.
9479
9480 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9481
9482 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9483
9484 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9485
9486 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9487
9488 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9489
9490 * inferiors.c (change_inferior_id): Add comment.
9491 * linux-low.c (check_removed_breakpoint): Add an early
9492 prototype. Improve debug output.
9493 (linux_attach): Doc update.
9494 (linux_detach_one_process, linux_detach): Clean up before releasing
9495 each process.
9496 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9497 * linux-low.h (struct process_info): Doc improvement.
9498 * mem-break.c (delete_all_breakpoints): New.
9499 * mem-break.h (delete_all_breakpoints): New prototype.
9500 * thread-db.c (find_first_thread): New.
9501 (thread_db_create_event): Call it instead of
9502 thread_db_find_new_threads. Clean up unused variables.
9503 (maybe_attach_thread): Remove first thread handling.
9504 (thread_db_find_new_threads): Use find_first_thread.
9505 (thread_db_get_tls_address): Likewise.
9506
9507 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9508
9509 * thread-db.c (thread_db_find_new_threads): Add prototype.
9510 (thread_db_create_event): Check for the main thread before adding
9511 a new thread.
9512 (maybe_attach_thread): Only enable event reporting if TID == 0.
9513 (thread_db_get_tls_address): Check for new threads.
9514
9515 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9516
9517 * linux-low.c (linux_create_inferior): Try execv before execvp.
9518 * spu-low.c (spu_create_inferior): Likewise.
9519
9520 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9521
9522 * linux-low.c (linux_create_inferior): Change execv to execvp.
9523 * spu-low.c (spu_create_inferior): Likewies.
9524
9525 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9526
9527 * Makefile.in (clean): Clean new files instead of deleted ones.
9528 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9529 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9530 rules.
9531 * configure.srv: Specify XML files and new regformats for MIPS and
9532 MIPS64 GNU/Linux.
9533 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9534 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9535 an entry for the restart register.
9536 (mips_cannot_fetch_register, mips_cannot_store_register)
9537 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9538 register names to match the XML descriptions.
9539 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9540 restart register instead of $0.
9541
9542 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9543 Markus Deuling <deuling@de.ibm.com>
9544
9545 * remote-utils.c (decode_xfer_write): New function.
9546 * server.h (decode_xfer_write): Add prototype.
9547 * server.c (handle_query): Add PACKET_LEN argument. Support
9548 qXfer:spu:read and qXfer:spu:write packets.
9549 (main): Pass packet_len to handle_query.
9550 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9551 * target.h (target_ops): Add qxfer_spu.
9552
9553 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9554
9555 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9556 accessing non-seekable spufs files.
9557
9558 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9559
9560 * server.c (handle_query): Add reply for qC packet.
9561
9562 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9563 Leo Zayas <lerele@champenstudios@com>
9564
9565 * server.h (check_remote_input_interrupt_request): New function.
9566 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9567 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9568 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9569 (check_remote_input_interrupt_request): New function.
9570 * server.h (check_remote_input_interrupt_request): Declare.
9571 * win32-low.c (winapi_DebugBreakProcess,
9572 winapi_GenerateConsoleCtrlEvent): New typedefs.
9573 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9574 to 250 ms.
9575 (win32_wait): Check for remote interrupt request
9576 with check_remote_input_interrupt_request.
9577 (win32_request_interrupt): New function.
9578 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9579
9580 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9581
9582 * win32-low.c (debug_registers_changed,
9583 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9584 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9585 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9586 (thread_rec): Get context using the low target.
9587 (child_add_thread): Call thread_added on the low target,
9588 which does the same thing.
9589 (regptr): Delete.
9590 (do_initial_child_stuff): Remove debug registers references.
9591 Set context using the low target. Resume threads after
9592 setting the contexts.
9593 (child_continue): Remove dead variable. Remove debug
9594 registers references.
9595 (child_fetch_inferior_registers): Go through the low target.
9596 (do_child_store_inferior_registers): Remove.
9597 (child_store_inferior_registers): Go through the low target.
9598 (win32_resume): Remove debug registers references.
9599 Set context using the low target.
9600 (handle_exception): Change return type to void. Don't record
9601 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9602 first chance exception.
9603 (get_child_debug_event): Change return type to void. Remove
9604 goto loop. Always return after waiting for debug event.
9605 (win32_wait): Convert to switch statement. Handle spurious
9606 events.
9607
9608 * win32-i386-low.c (debug_registers_changed,
9609 debug_registers_used): New.
9610 (initial_stuff): Rename to ...
9611 (i386_initial_stuff): ... this. Clear debug registers
9612 state variables.
9613 (store_debug_registers): Delete.
9614 (i386_get_thread_context): New.
9615 (load_debug_registers): Delete.
9616 (i386_set_thread_context): New.
9617 (i386_thread_added): New.
9618 (single_step): Rename to ...
9619 (i386_single_step): ... this.
9620 (do_fetch_inferior_registers): Rename to ...
9621 (i386_fetch_inferior_register): ... this.
9622 (i386_store_inferior_register): New.
9623 (the_low_target): Adapt to new interface.
9624
9625 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9626 (arm_get_thread_context): New.
9627 (arm_set_thread_context): New.
9628 (regptr): New.
9629 (do_fetch_inferior_registers): Rename to ...
9630 (arm_fetch_inferior_register): ... this.
9631 (arm_store_inferior_register): New.
9632 (arm_wince_breakpoint): Reimplement as unsigned long.
9633 (arm_wince_breakpoint_len): Define.
9634 (the_low_target): Adapt to new interface.
9635
9636 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9637 load_debug_registers. Add get_thread_context, set_thread_context,
9638 thread_added and store_inferior_register. Rename
9639 fetch_inferior_registers to fetch_inferior_register.
9640 (regptr): Remove declaration.
9641
9642 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9643
9644 * linux-low.c (linux_detach): Change return type to int. Return 0.
9645 * spu-low.c (spu_detach): Likewise.
9646
9647 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9648
9649 * target.h (target_ops): Change return type of detach to int.
9650 Add join.
9651 (join_inferior): New.
9652 * server.c (main): Don't skip detach support on mingw32.
9653 If the inferior doesn't support detaching return error.
9654 Call join_inferior instead of using waitpid.
9655 * linux-low.c (linux_join): New.
9656 (linux_target_op): Add linux_join.
9657 * spu-low.c (spu_join): New.
9658 (spu_target_ops): Add spu_join.
9659 * win32-low.c (win32_detach): Adapt to new interface.
9660 Reopen current_process_handle before detaching. Issue a child
9661 resume before detaching.
9662 (win32_join): New.
9663 (win32_target_op): Add win32_join.
9664
9665 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9666
9667 * win32-low.c (win32-attach): Fix return value.
9668 * target.h (target_ops): Describe ATTACH return values.
9669
9670 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9671
9672 * win32-low.c (GETPROCADDRESS): Define.
9673 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9674 (winapi_DebugSetProcessKillOnExit): Likewise.
9675 (win32_create_inferior): Force usage of ansi CreateProcessA.
9676 (win32_attach): Use GETPROCADDRESS.
9677 (win32_detach): Likewise.
9678
9679 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9680
9681 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9682
9683 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9684
9685 * win32-low.c: Commit leftover changes from 2007-03-29.
9686
9687 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9688
9689 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9690 fields short instead of int. Add explicit padding.
9691 (i387_cache_to_fsave): Remove unnecessary casts.
9692 (i387_fsave_to_cache): Doc fix.
9693 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9694
9695 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9696
9697 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9698 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9699
9700 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9701
9702 * configure.srv (arm*-*-mingw32ce*): Move near the other
9703 arm targets.
9704
9705 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9706
9707 * configure.ac: Add errno checking.
9708 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9709 sys/file.h and malloc.h.
9710 (AC_CHECK_DECLS): Add perror.
9711 (srv_mingwce): Handle.
9712 * configure.srv (i[34567]86-*-cygwin*): Add
9713 win32-i386-low.o to srv_tgtobj.
9714 (i[34567]86-*-mingw*): Likewise.
9715 (arm*-*-mingw32ce*): Add case.
9716 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9717 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9718 [__MINGW32CE__] (strerror): New function.
9719 [__MINGW32CE__] (errno): Define to GetLastError.
9720 [__MINGW32CE__] (COUNTOF): New macro.
9721 (remote_open): Remove extra close call.
9722 * mem-break.c (delete_breakpoint_at): New function.
9723 * mem-break.h (delete_breakpoint_at): Declare.
9724 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9725 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9726 [USE_WIN32API] (read, write): Add char* casts.
9727 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9728 * server.h: Include wincecompat.h on Windows CE.
9729 [HAVE_ERRNO_H]: Check.
9730 (perror): Declare if not declared.
9731 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9732 (perror_with_name): Remove errno declaration.
9733 * wincecompat.h: New.
9734 * wincecompat.c: New.
9735 * win32-low.h: New.
9736 * win32-arm-low.c: New.
9737 * win32-i386-low.c: New.
9738 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9739 (OUTMSG2): Make it safe.
9740 (_T): New macro.
9741 (COUNTOF): New macro.
9742 (NUM_REGS): Get it from the low target.
9743 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9744 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9745 (thread_rec): Let low target handle debug registers.
9746 (child_add_thread): Likewise.
9747 (child_init_thread_list): Likewise.
9748 (continue_one_thread): Likewise.
9749 (regptr): New.
9750 (do_child_fetch_inferior_registers): Move to ...
9751 * win32-i386-low.c: ... here, and rename to ...
9752 (do_fetch_inferior_registers): ... this.
9753 * win32-low.c (child_fetch_inferior_registers):
9754 Go through the low target.
9755 (do_child_store_inferior_registers): Use regptr.
9756 (strwinerror): New function.
9757 (win32_create_inferior): Handle Windows CE.
9758 Use strwinerror instead of strerror on Windows error
9759 codes. Add program to the error output.
9760 Don't close the main thread handle on Windows CE.
9761 (win32_attach): Use coredll.dll on Windows CE.
9762 (win32_kill): Close current process and current
9763 thread handles.
9764 (win32_detach): Use coredll.dll on Windows CE.
9765 (win32_resume): Let low target handle debug registers, and
9766 step request.
9767 (handle_exception): Add/Remove initial breakpoint. Avoid
9768 non-existant WSTOPSIG on Windows CE.
9769 (win32_read_inferior_memory): Cast to remove warning.
9770 (win32_arch_string): Go through the low target.
9771 (initialize_low): Call set_breakpoint_data with the low
9772 target's breakpoint.
9773 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9774 FOP_REGNUM, mappings): Move to ...
9775 * win32-i386-low.c: ... here.
9776 * win32-low.c (win32_thread_info): Move to ...
9777 * win32-low.h: ... here.
9778 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9779 win32-arm-low.c and wincecompat.c.
9780 (all:): Add $EXEEXT.
9781 (install-only:): Likewise.
9782 (gdbserver:): Likewise.
9783 (gdbreplay:): Likewise.
9784 * config.in: Regenerate.
9785 * configure: Regenerate.
9786
9787 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9788
9789 * win32-low.c: Rename typedef thread_info to
9790 win32_thread_info throughout.
9791
9792 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9793
9794 * win32-i386-low.c: Rename to ...
9795 * win32-low.c: ... this.
9796 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9797 * Makefile.in: Likewise.
9798
9799 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9800
9801 * remote-utils.c (monitor_output): Constify msg parameter.
9802 * server.h (monitor_output): Likewise.
9803 * win32-i386-low.c (handle_output_debug_string): New.
9804 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9805 handle_output_debug_string.
9806 (get_child_debug_event): Likewise.
9807
9808 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9809
9810 * server.c (main): Correct strtoul check.
9811
9812 2007-03-27 Jon Ringle <jon@ringle.org>
9813
9814 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9815
9816 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9817
9818 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9819
9820 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9821
9822 * terminal.h: Check HAVE_SGTTY_H.
9823
9824 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9825
9826 * remote-utils.c (remote_open): Print out the assigned port number.
9827
9828 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9829
9830 * remote-utils.c (monitor_output): New function.
9831 * server.c (debug_threads): Define here.
9832 (monitor_show_help): New function.
9833 (handle_query): Handle qRcmd.
9834 (main): Do not handle 'd' packet.
9835 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9836 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9837 of debug_threads.
9838
9839 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9840
9841 * Makefile.in (EXEEXT): New.
9842 (clean): Use $(EXEEXT).
9843
9844 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9845
9846 * target.h (target_ops): Rename send_signal to request_interrupt,
9847 and remove enum target_signal parameter.
9848 * linux-low.c (linux_request_interrupt): Rename from
9849 linux_send_signal, and always send SIGINT.
9850 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9851 and always send SIGINT.
9852 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9853 of send_signal.
9854 (input_interrupt): Likewise.
9855
9856 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9857
9858 * server.c (get_features_xml): Check if target implemented
9859 arch_string.
9860 * win32-i386-low.c (win32_arch_string): New.
9861 (win32_target_ops): Add win32_arch_string as arch_string member.
9862
9863 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9864
9865 * spu-low.c (spu_arch_string): New.
9866 (spu_target_ops): Add spu_arch_string.
9867
9868 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9869
9870 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9871 * configure.ac: Do not check for terminal.h.
9872 * configure, config.in: Regenerated.
9873
9874 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9875
9876 * Makefile.in (OBS): Add $(XML_BUILTIN).
9877 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9878 (clean): Update.
9879 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9880 (arm-with-iwmmxt.c): New.
9881 * config.in, configure: Regenerate.
9882 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9883 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9884 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9885 (arm*-*-linux*): Add iWMMXt and regset support.
9886 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9887 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9888 (arm_store_wmmxregset, target_regsets): New.
9889 * server.c (get_features_xml): Take annex argument. Check builtin
9890 XML documents.
9891 (handle_query): Handle multiple annexes.
9892
9893 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9894
9895 * remote-utils.c [USE_WIN32API] (read, write): Define.
9896 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9897 write.
9898
9899 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9900
9901 * linux-i386-low.c (the_low_target): Set arch_string.
9902 * linux-x86-64-low.c (the_low_target): Likewise.
9903 * linux-low.c (linux_arch_string): New.
9904 (linux_target_ops): Add it.
9905 * linux-low.h (struct linux_target_ops): Add arch_string.
9906 * server.c (write_qxfer_response): Use const void * for DATA.
9907 (get_features_xml): New.
9908 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9909 * target.h (struct target_ops): Add arch_string method.
9910
9911 2007-01-03 Denis Pilat <denis.pilat@st.com>
9912 Daniel Jacobowitz <dan@codesourcery.com>
9913
9914 * linux-low.c (linux_kill): Handle being called with no threads.
9915 * win32-i386-low.c (win32_kill): Likewise.
9916 (get_child_debug_event): Clear current_process_handle.
9917
9918 2006-12-30 Denis PILAT <denis.pilat@st.com>
9919 Daniel Jacobowitz <dan@codesourcery.com>
9920
9921 * remote-utils.c (remote_open): Check the type of specified
9922 serial port devices before opening them.
9923 * server.c (main): Kill the inferior if an error occurs during
9924 the first remote_open.
9925
9926 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9927
9928 * README: Update supported targets.
9929
9930 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9931
9932 * Makefile.in (clean): Remove reg-mips64.c.
9933 (reg-mips64.c, reg-mips64.o): New rules.
9934 * configure.srv: Handle mips64. Include regset support for mips.
9935 * linux-mips-low.c (union mips_register): New.
9936 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9937 (mips_breakpoint, mips_breakpoint_at): Use int.
9938 (mips_collect_register, mips_supply_register)
9939 (mips_collect_register_32bit, mips_supply_register_32bit)
9940 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9941 (mips_store_fpregset, target_regsets): New.
9942 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9943
9944 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9945
9946 * configure.srv: Add target "spu*-*-*".
9947 * Makefile.in (clean): Remove reg-spu.c.
9948 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9949 * spu-low.c: New file.
9950
9951 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9952
9953 * configure.ac: Correct td_thr_tls_get_addr test.
9954 * configure: Regenerated.
9955
9956 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9957
9958 * linux-low.c (linux_wait_for_event): Reformat. Use the
9959 pass_signals array.
9960 * remote-utils.c (decode_address_to_semicolon): New.
9961 * server.c (pass_signals, handle_general_set): New.
9962 (handle_query): Mention QPassSignals for qSupported.
9963 (main): Call handle_general_set.
9964 * server.h (pass_signals, decode_address_to_semicolon): New.
9965
9966 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9967
9968 * server.c (handle_query): Correct error handling for read_auxv.
9969
9970 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9971
9972 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9973 and srv_linux_thread_db to yes.
9974 * linux-s390-low.c (s390_fill_gregset): New function.
9975 (target_regsets): Define data structure.
9976
9977 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9978
9979 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9980 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9981 * config.in, configure: Regenerated.
9982 * inferiors.c (gdb_id_to_thread): New function.
9983 (gdb_id_to_thread_id): Use it.
9984 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9985 * linux-low.h (struct process_info): Add th member.
9986 (thread_db_get_tls_address): New prototype.
9987 * remote-utils.c (decode_address): Make non-static.
9988 * server.c (handle_query): Handle qGetTLSAddr.
9989 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9990 * target.h (struct target_ops): Add get_tls_address.
9991 * thread-db.c (maybe_attach_thread): Save the thread handle.
9992 (thread_db_get_tls_address): New.
9993
9994 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9995
9996 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9997 (linux_resume_one_process): Take a siginfo_t *. Update all
9998 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9999 (struct pending_signals): Add a siginfo_t.
10000 (linux_wait_for_process): Always set last_status.
10001 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10002 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10003 * linux-low.h (struct process_info): Add last_status.
10004
10005 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10006
10007 * remote-utils.c (try_rle): New function.
10008 (putpkt_binary): Use it.
10009
10010 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10011
10012 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10013 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10014 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10015 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10016 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10017 point registers.
10018
10019 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10020
10021 * server.c (terminal_fd): New variable.
10022 (old_foreground_pgrp): Likewise.
10023 (restore_old_foreground_pgrp): New function.
10024 (start_inferior): Record the terminal file descriptor in terminal_fd
10025 and its original foreground group in old_foreground_pgrp. Register
10026 restore_old_foreground_pgrp with atexit().
10027
10028 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10029
10030 * server.c (handle_query): Correct qPart to qXfer.
10031
10032 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10033
10034 * configure.ac: Check for more headers which are missing on
10035 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10036 * configure.srv: Add Cygwin and mingw32.
10037 * remote-utils.c: Don't include headers unconditionally which
10038 are missing on mingw32. Include <winsock.h> for mingw32.
10039 (remote_open): Adjust for mingw32 support. Flush
10040 standard error after writing to it.
10041 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10042 (unblock_async_io, enable_async_io, disable_async_io)
10043 (readchar, getpkt): Update for Winsock support.
10044 (prepare_resume_reply): Expect a protocol signal number.
10045 * server.c: Disable <sys/wait.h> on mingw32.
10046 (start_inferior): Adjust for mingw32 support. Flush
10047 standard error after writing to it.
10048 (attach_inferior): Likewise. Use protocol signal
10049 numbers.
10050 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10051 and names.
10052 * win32-i386-low.c: New file.
10053 * Makefile.in (XM_CLIBS): Set.
10054 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10055 (win32-i386-low.o): New dependency rule.
10056 * linux-low.c (linux_wait): Use target signal numbers.
10057 * target.h (struct target_ops): Doc fix.
10058 * server.h (target_signal_to_name): New prototype.
10059 * gdbreplay.c: Don't include headers unconditionally which
10060 are missing on mingw32. Include <winsock.h> for mingw32.
10061 (remote_close, remote_open): Adjust for Winsock support.
10062 * configure, config.in: Regenerated.
10063
10064 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10065
10066 * server.c (decode_xfer_read, write_qxfer_response): New.
10067 (handle_query): Take a packet length argument. Handle
10068 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10069 the qSupported response.
10070 (main): Update call to handle_query.
10071
10072 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10075 (putpkt_binary): Renamed from putpkt and adjusted for binary
10076 data.
10077 (putpkt): New wrapper for putpkt_binary.
10078 (readchar): Don't mask off the high bit.
10079 (decode_X_packet): New function.
10080 * server.c (main): Call putpkt_binary if a handler sets the packet
10081 length. Save the length of the incoming packet. Handle 'X'.
10082 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10083
10084 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10085
10086 * server.c (handle_query): Handle qSupported.
10087
10088 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10089
10090 * remote-utils.c (all_symbols_looked_up): New variable.
10091 (look_up_one_symbol): Check it.
10092 * server.h (look_up_one_symbol): New declaration.
10093 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10094
10095 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10096
10097 * Makefile.in (linux-arm-low.o): Update dependencies.
10098 * linux-arm-low.c: Include "gdb_proc_service.h".
10099 (PTRACE_GET_THREAD_AREA): Define.
10100 (ps_get_thread_area): New function.
10101
10102 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10103
10104 * configure.srv (m68k*-*-uclinux*): New target.
10105 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10106 (linux_resume_one_process): Remove extraneous cast.
10107 (linux_read_offsets): New.
10108 (linux_target_op): Add linux_read_offsets on mmuless systems.
10109 * server.c (handle_query): Add qOffsets logic.
10110 * target.h (struct target_ops): Add read_offsets.
10111
10112 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10113
10114 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10115 (PTRACE_GET_THREAD_AREA): Define.
10116 (ps_get_thread_area): New function.
10117 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10118 (linux-x86-64-low.o): Update.
10119
10120 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * configure.ac: Remove checks for prfpregset_t.
10123 * gdb_proc_service.h: New file.
10124 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10125 new "gdb_proc_service.h".
10126 * proc-service.c: Likewise.
10127 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10128 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10129 * Makefile.in (gdb_proc_service_h): Updated.
10130 * configure, config.in: Regenerated.
10131
10132 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10133
10134 * remote-utils.c (prepare_resume_reply): Move declaration
10135 of gdb_id_from_wait to the top of the block.
10136
10137 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10138
10139 * linux-low.c (regsets_store_inferior_registers): Read the regset
10140 from the target before filling it.
10141
10142 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10143
10144 * server.c (attach_inferior): Return SIGTRAP for a successful
10145 attach.
10146
10147 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10148
10149 * Makefile.in (OBS): Add version.o.
10150 (STAGESTUFF): Delete.
10151 (version.o): Add dependencies.
10152 (version.c): Replace rule.
10153 (clean): Remove version.c.
10154 * server.c (gdbserver_version): New.
10155 (gdbserver_usage): Use printf.
10156 (main): Handle --version and --help.
10157 * server.h (version, host_name): Add declarations.
10158
10159 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10160
10161 * linux-arm-low.c:
10162 * linux-arm-low.c:
10163 * inferiors.c:
10164 * i387-fp.h:
10165 * i387-fp.c:
10166 * gdbreplay.c:
10167 * regcache.c:
10168 * proc-service.c:
10169 * mem-break.h:
10170 * mem-break.c:
10171 * linux-x86-64-low.c:
10172 * linux-sh-low.c:
10173 * linux-s390-low.c:
10174 * linux-ppc64-low.c:
10175 * linux-ppc-low.c:
10176 * linux-mips-low.c:
10177 * linux-m68k-low.c:
10178 * linux-m32r-low.c:
10179 * linux-low.h:
10180 * linux-low.c:
10181 * linux-ia64-low.c:
10182 * linux-i386-low.c:
10183 * linux-crisv32-low.c:
10184 * thread-db.c:
10185 * terminal.h:
10186 * target.h:
10187 * target.c:
10188 * server.h:
10189 * server.c:
10190 * remote-utils.c:
10191 * regcache.h:
10192 * utils.c:
10193 * Makefile.in:
10194 * configure.ac:
10195 * gdbserver.1: Add (C) after Copyright. Update the FSF
10196 address.
10197
10198 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10199
10200 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10201 (arm_breakpoint_at): Recognize both breakpoints.
10202 (the_low_target): Use the correct breakpoint instruction.
10203
10204 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10205
10206 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10207 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10208 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10209 (the_low_target): Update.
10210
10211 2005-10-25 Andreas Schwab <schwab@suse.de>
10212
10213 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10214
10215 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10216 (ia64_num_regs): Reduce to 462.
10217
10218 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10219
10220 * acinclude.m4: Correct quoting.
10221 * aclocal.m4: Regenerated.
10222
10223 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10224 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10225 (thread_db_init): Call thread_db_err_str.
10226 * configure.ac: Check for TD_VERSION.
10227 * config.in, configure: Regenerated.
10228
10229 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10230
10231 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10232
10233 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10234
10235 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10236 is not available. Define HAVE_PTRACE_GETREGS if it is.
10237 * config.in, configure: Regenerated.
10238 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10239 * linux-i386-low.c, linux-m68k-low.c: Update to use
10240 HAVE_PTRACE_GETREGS.
10241 * linux-low.c (regsets_fetch_inferior_registers)
10242 (regsets_store_inferior_registers): Only return 0 if we processed
10243 GENERAL_REGS.
10244 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10245 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10246
10247 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * inferiors.c (struct thread_info): Add gdb_id.
10250 (add_thread): Add gdb_id argument.
10251 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10252 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10253 calls to add_thread.
10254 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10255 * server.c (handle_query): Use thread_to_gdb_id.
10256 (handle_v_cont, main): Use gdb_id_to_thread_id.
10257 * server.h (add_thread): Update prototype.
10258 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10259 prototypes.
10260
10261 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10262
10263 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10264 left-padded registers.
10265 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10266 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10267
10268 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10269
10270 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10271 * configure: Regenerate.
10272 * config.in: Regenerate.
10273 * server.h (NEED_DECLARATION_STRERROR):
10274 Replace with !HAVE_DECL_STRERROR.
10275
10276 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * linux-low.c (linux_wait, linux_send_signal): Don't test
10279 an unsigned long variable for > 0 if it could be MAX_ULONG.
10280 * server.c (myresume): Likewise.
10281 * target.c (set_desired_inferior): Likewise.
10282
10283 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10284
10285 * configure.ac: Simplify and improve check for socklen_t.
10286 * configure, config.in: Regenerate.
10287
10288 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10289
10290 * acconfig.h: Remove.
10291 * configure.ac: Add a test for socklen_t. Use three-argument
10292 AC_DEFINE throughout.
10293 * config.in: Regenerated using autoheader 2.59.
10294 * configure: Regenerated.
10295
10296 * gdbreplay.c (socklen_t): Provide a default.
10297 (remote_open): Use socklen_t.
10298 * remote-utils.c (socklen_t): Provide a default.
10299 (remote_open): Use socklen_t.
10300 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10301 unsigned char.
10302
10303 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10304 char for buffers.
10305 * linux-low.c (linux_read_memory, linux_write_memory)
10306 (linux_read_auxv): Likewise.
10307 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10308 (check_mem_write): Likewise.
10309 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10310 Likewise.
10311 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10312 (registers_from_string, register_data): Likewise.
10313 * server.c (handle_query, main): Likewise.
10314 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10315 (decode_M_packet): Likewise.
10316 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10317 * target.h (struct target_ops): Update read_memory, write_memory,
10318 and read_auxv.
10319 (read_inferior_memory, write_inferior_memory): Update.
10320 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10321 to unsigned char *.
10322 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10323 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10324 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10325 linux-s390-low.c, linux-sh-low.c: Update for changes in
10326 read_inferior_memory and the_low_target->breakpoint.
10327
10328 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10329
10330 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10331 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10332 * configure.srv: Add powerpc64-*-linux*.
10333 * linux-ppc64-low.c: New file.
10334
10335 2005-05-23 Orjan Friberg <orjanf@axis.com>
10336
10337 * linux-cris-low.c: New file with support for CRIS.
10338 * linux-crisv32-low.c: Ditto for CRISv32.
10339 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10340 (clean): Add reg-cris.c and reg-crisv32.c.
10341 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10342 reg-crisv32.o, and reg-crisv32.c to make rules.
10343 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10344 recognized targets.
10345
10346 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10347
10348 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10349 of sizeof (PTRACE_XFER_TYPE).
10350 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10351
10352 2005-05-12 Orjan Friberg <orjanf@axis.com>
10353
10354 * target.h (struct target_ops): Add insert_watchpoint,
10355 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10356 pointers for hardware watchpoint support.
10357 * linux-low.h (struct linux_target_ops): Ditto.
10358 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10359 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10360 to linux_target_ops.
10361 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10362 reply packet.
10363 * server.c (main): Recognize 'Z' and 'z' packets.
10364
10365 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10366
10367 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10368 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10369 (the_low_target): Add new members.
10370
10371 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10372
10373 * proc-service.c (ps_lgetregs): Search all_processes instead of
10374 all_threads.
10375
10376 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10377
10378 * server.c (start_inferior): Change return type to int.
10379 (attach_inferior): Change sigptr to int *.
10380 (handle_v_cont, handle_v_requests): Change signal to int *.
10381 (main): Change signal to int.
10382
10383 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10384
10385 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10386 * configure.srv: Add m32r*-*-linux*.
10387 * linux-m32r-low.c: New file.
10388
10389 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10390
10391 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10392
10393 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10394
10395 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10396 Take unsigned long arguments for PIDs.
10397 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10398 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10399 (wait_for_sigstop, linux_resume_one_process)
10400 (regsets_fetch_inferior_registers, linux_send_signal)
10401 (linux_read_auxv): Likewise. Update the types of variables holding
10402 PIDs. Update format string specifiers.
10403 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10404 * remote-utils.c (prepare_resume_reply): Likewise.
10405 * server.c (cont_thread, general_thread, step_thread)
10406 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10407 unsigned long.
10408 (handle_query): Update format specifiers.
10409 (handle_v_cont, main): Use strtoul for thread IDs.
10410 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10411 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10412 (general_thread, step_thread, thread_from_wait)
10413 (old_thread_from_wait): Update.
10414 * target.h (struct thread_resume): Use unsigned long for THREAD.
10415 (struct target_ops): Use unsigned long for arguments to attach and
10416 thread_alive.
10417
10418 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10419
10420 * acinclude.m4: Include bfd/bfd.m4 directly.
10421 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10422 <agriffis@toolchain.org>.
10423 * aclocal.m4, configure: Regenerated.
10424
10425 2005-01-07 Andrew Cagney <cagney@gnu.org>
10426
10427 * configure.ac: Rename configure.in, require autoconf 2.59.
10428 * configure: Re-generate.
10429
10430 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10431
10432 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10433 LIBS when finished.
10434 * aclocal.m4: Regenerated.
10435 * configure: Regenerated.
10436
10437 2004-11-21 Andreas Schwab <schwab@suse.de>
10438
10439 * linux-m68k-low.c (m68k_num_gregs): Define.
10440 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10441 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10442 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10443 (m68k_breakpoint_at): New. Add to the_low_target.
10444
10445 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10446 srv_linux_thread_db to yes.
10447
10448 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10449
10450 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10451 (ARCH_SET_FS): Likewise.
10452 (ARCH_GET_FS): Likewise.
10453 (ARCH_GET_GS): Likewise.
10454
10455 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10456
10457 * linux-i386-low.c (ps_get_thread_area): New.
10458 * linux-x86-64-low.c (ps_get_thread_area): New.
10459 * linux-low.c: Include <sys/syscall.h>.
10460 (linux_kill_one_process): Don't kill the first thread here.
10461 (linux_kill): Kill the first thread here.
10462 (kill_lwp): New function.
10463 (send_sigstop, linux_send_signal): Use it.
10464 * proc-service.c: Clean up #ifdefs.
10465 (fpregset_info): Delete.
10466 (ps_lgetregs): Update and enable implementation.
10467 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10468 implementations.
10469 * remote-utils.c (struct sym_cache, symbol_cache): New.
10470 (input_interrupt): Print a clearer message.
10471 (async_io_enabled): New variable.
10472 (enable_async_io, disable_async_io): Use it. Update comments.
10473 (look_up_one_symbol): Use the symbol cache.
10474 * thread-db.c (thread_db_look_up_symbols): New function.
10475 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10476
10477 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10478
10479 * configure.in: Test for -rdynamic.
10480 * configure: Regenerated.
10481 * Makefile (INTERNAL_LDFLAGS): New.
10482 (gdbserver, gdbreplay): Use it.
10483
10484 2004-09-02 Andrew Cagney <cagney@gnu.org>
10485
10486 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10487
10488 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10489
10490 * linux-low.c (linux_wait): Clear all_processes list also.
10491
10492 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10493
10494 * linux-low.c: Include <errno.h>. Remove extern declaration of
10495 errno.
10496
10497 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10498
10499 * gdbreplay.c, server.h, utils.c: Update copyright years.
10500
10501 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10502
10503 * server.c (main): Print child status or termination signal from
10504 variable 'signal', not 'sig'.
10505
10506 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10507
10508 * linux-low.c (linux_read_memory): Change return type to
10509 int. Check for and return error from ptrace().
10510 * target.c (read_inferior_memory): Change return type to int. Pass
10511 back return status from the_target->read_memory().
10512 * target.h (struct target_ops): Adapt *read_memory() prototype.
10513 Update comment.
10514 (read_inferior_memory): Adapt prototype.
10515 * server.c (main): Return an error packet if
10516 read_inferior_memory() returns an error.
10517
10518 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10519
10520 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10521 Unify with other clean targets.
10522
10523 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10524
10525 * server.c (handle_v_cont): Call set_desired_inferior.
10526
10527 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10528
10529 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10530
10531 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10532
10533 * linux-low.c (linux_wait): Unblock async I/O.
10534 (linux_resume): Block and enable async I/O.
10535 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10536 * server.h (block_async_io, unblock_async_io): Add prototypes.
10537
10538 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10539
10540 * remote-utils.c (remote_open): Print a status notice after
10541 opening a TCP port.
10542 * server.c (attach_inferior): Print a status notice after
10543 attaching.
10544
10545 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10546
10547 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10548
10549 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10550
10551 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10552 error packet.
10553 * server.c, target.h: Update copyright years.
10554
10555 2004-02-25 Roland McGrath <roland@redhat.com>
10556
10557 * target.h (struct target_ops): New member `read_auxv'.
10558 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10559 * linux-low.c (linux_read_auxv): New function.
10560 (linux_target_ops): Initialize `read_auxv' member to that.
10561
10562 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10563
10564 Committed by Jim Blandy <jimb@redhat.com>.
10565
10566 * linux-s390-low.c (s390_num_regs): Update.
10567 (s390_regmap): Remove control registers. Use __s390x__ predefine
10568 instead of GPR_SIZE to distiguish s390 and s390x targets.
10569
10570 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10571
10572 * linux-low.c: Update copyright year.
10573 (check_removed_breakpoint): Clear pending_is_breakpoint.
10574 (linux_set_resume_request, linux_queue_one_thread)
10575 (resume_status_pending_p): New functions.
10576 (linux_continue_one_thread): Use process->resume.
10577 (linux_resume): Only resume threads if there are no pending events.
10578 * linux-low.h (struct process_info): Add resume request
10579 pointer.
10580
10581 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10582
10583 * regcache.c (new_register_cache): Clear the allocated register
10584 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10585
10586 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10587
10588 * linux-low.c (linux_resume): Take a struct thread_resume *
10589 argument.
10590 (linux_wait): Update call.
10591 (resume_ptr): New static variable.
10592 (linux_continue_one_thread): Renamed from
10593 linux_continue_one_process. Use resume_ptr.
10594 (linux_resume): Use linux_continue_one_thread.
10595 * server.c (handle_v_cont, handle_v_requests): New functions.
10596 (myresume): New function.
10597 (main): Handle 'v' case.
10598 * target.h (struct thread_resume): New type.
10599 (struct target_ops): Change argument of "resume" to struct
10600 thread_resume *.
10601 (myresume): Delete macro.
10602
10603 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10604
10605 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10606 (uninstall): Support DESTDIR.
10607
10608 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10609
10610 * configure.srv: Add xscale*linux copy of arm*linux entry.
10611
10612 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10613
10614 * linux-arm-low.c (arm_reinsert_addr): New function.
10615 (the_low_target): Add arm_reinsert_addr.
10616
10617 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10618
10619 * mem-break.c: Remove whitespace at end of file.
10620
10621 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10622
10623 * configure.in: Check whether we need to prototype strerror.
10624 * server.h: Optionally prototype strerror.
10625 * gdbreplay.c (perror_with_name): Use strerror.
10626 * linux-low.c (linux_attach_lwp): Use strerror.
10627 * utils.c (perror_with_name): Use strerror.
10628 * config.in, configure: Regenerated.
10629
10630 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10631
10632 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10633 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10634
10635 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10636
10637 * Makefile.in (SFILES): Update.
10638 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10639 low-sun3.c: Remove files.
10640
10641 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10642
10643 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10644 (linux_detach_one_process, linux_detach): New functions.
10645 (linux_target_ops): Add linux_detach.
10646 * server.c (main): Handle 'D' packet.
10647 * target.h (struct target_ops): Add "detach" member.
10648 (detach_inferior): Define.
10649
10650 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10651
10652 From Kelley Cook <kelleycook@wideopenwest.com>:
10653 * configure.srv: Accept i[34567]86 variants.
10654
10655 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10656
10657 * linux-low.c (linux_wait_for_event): Correct comment typos.
10658 (linux_resume_one_process): Call check_removed_breakpoint.
10659 (linux_send_signal): New function.
10660 (linux_target_ops): Add linux_send_signal.
10661 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10662 of kill.
10663 * target.h (struct target_ops): Add send_signal.
10664
10665 2003-05-29 Jim Blandy <jimb@redhat.com>
10666
10667 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10668 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10669 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10670 away part of the register's value.
10671
10672 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10673
10674 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10675 (linux_wait_for_event, linux_init_signals): Likewise.
10676
10677 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10678
10679 * configure.in: Check for stdlib.h.
10680 * configure: Regenerated.
10681 * config.in: Regenerated.
10682
10683 2003-01-04 Andreas Schwab <schwab@suse.de>
10684
10685 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10686
10687 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10688
10689 * Makefile.in: Remove obsolete code.
10690
10691 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10692
10693 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10694 defined(PT_FPR0_HI).
10695
10696 2002-11-17 Stuart Hughes <seh@zee2.com>
10697
10698 * linux-arm-low.c (arm_num_regs): Increase.
10699 (arm_regmap): Include status register.
10700
10701 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10702
10703 * linux-low.c (register_addr): Remove incorrect -1 check.
10704
10705 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10706
10707 * linux-low.c (linux_create_inferior): Call setpgid. Return
10708 the new PID.
10709 (unstopped_p, linux_signal_pid): Remove.
10710 (linux_target_ops): Remove linux_signal_pid.
10711 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10712 global instead of target method.
10713 * target.h (struct target_ops): Remove signal_pid. Update comment
10714 for create_inferior.
10715 * server.c (signal_pid): New variable.
10716 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10717 gdbserver. Set the child to be the foreground process group.
10718 (attach_inferior): Set signal_pid.
10719
10720 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10721
10722 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10723
10724 2002-08-20 Jim Blandy <jimb@redhat.com>
10725
10726 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10727 default for this.
10728
10729 2002-08-01 Andrew Cagney <cagney@redhat.com>
10730
10731 * Makefile.in: Make chill references obsolete.
10732
10733 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10734
10735 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10736 * configure: Regenerate.
10737 * config.in: Regenerate.
10738
10739 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10740
10741 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10742 (perror_with_name, remote_close, remote_open, expect, play): Static.
10743
10744 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10745
10746 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10747 byte offsets instead of an array of indexes.
10748 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10749
10750 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * regcache.c: Add comment.
10753
10754 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10755
10756 * thread-db.c: New file.
10757 * proc-service.c: New file.
10758 * acinclude.m4: New file.
10759 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10760 proc-service.o, and thread-db.o.
10761 (linux-low.o): Add USE_THREAD_DB.
10762 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10763 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10764 * aclocal.m4: Regenerated.
10765 * config.in: Regenerated.
10766 * configure: Regenerated.
10767 * configure.in: Check for proc_service.h, sys/procfs.h,
10768 thread_db.h, and linux/elf.h headrs.
10769 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10770 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10771 Check for -lthread_db and thread support.
10772 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10773 PowerPC, and SuperH.
10774 * i387-fp.c: Constify arguments.
10775 * i387-fp.h: Likewise.
10776 * inferiors.c: (struct thread_info): Renamed from
10777 `struct inferior_info'. Remove PID member. Use generic inferior
10778 list header. All uses updated.
10779 (inferiors, signal_pid): Removed.
10780 (all_threads): New variable.
10781 (get_thread): Define.
10782 (add_inferior_to_list): New function.
10783 (for_each_inferior): New function.
10784 (change_inferior_id): New function.
10785 (add_inferior): Removed.
10786 (remove_inferior): New function.
10787 (add_thread): New function.
10788 (free_one_thread): New function.
10789 (remove_thread): New function.
10790 (clear_inferiors): Use for_each_inferior and free_one_thread.
10791 (find_inferior): New function.
10792 (find_inferior_id): New function.
10793 (inferior_target_data): Update argument type.
10794 (set_inferior_target_data): Likewise.
10795 (inferior_regcache_data): Likewise.
10796 (set_inferior_regcache_data): Likewise.
10797 * linux-low.c (linux_bp_reinsert): Remove.
10798 (all_processes, stopping_threads, using_thrads)
10799 (struct pending_signals, debug_threads, pid_of): New.
10800 (inferior_pid): Replace with macro.
10801 (struct inferior_linux_data): Remove.
10802 (get_stop_pc, add_process): New functions.
10803 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10804 Use add_process and add_thread.
10805 (linux_attach_lwp): New function, based on old linux_attach. Use
10806 add_process and add_thread. Set stop_expected for new threads.
10807 (linux_attach): New function.
10808 (linux_kill_one_process): New function.
10809 (linux_kill): Kill all LWPs.
10810 (linux_thread_alive): Use find_inferior_id.
10811 (check_removed_breakpoints, status_pending_p): New functions.
10812 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10813 Update. Use WNOHANG. Wait for cloned processes also. Update process
10814 struct for the found process.
10815 (linux_wait_for_event): New function.
10816 (linux_wait): Use it. Support LWPs.
10817 (send_sigstop, wait_for_sigstop, stop_all_processes)
10818 (linux_resume_one_process, linux_continue_one_process): New functions.
10819 (linux_resume): Support LWPs.
10820 (REGISTER_RAW_SIZE): Remove.
10821 (fetch_register): Use register_size instead. Call supply_register.
10822 (usr_store_inferior_registers): Likewise. Call collect_register.
10823 Fix recursive case.
10824 (regsets_fetch_inferior_registers): Improve error message.
10825 (regsets_store_inferior_registers): Add debugging.
10826 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10827 (unstopped_p, linux_signal_pid): New functions.
10828 (linux_target_ops): Add linux_signal_pid.
10829 (linux_init_signals): New function.
10830 (initialize_low): Call it. Initialize using_threads.
10831 * regcache.c (inferior_regcache_data): Add valid
10832 flag.
10833 (get_regcache): Fetch registers lazily. Add fetch argument
10834 and update all callers.
10835 (regcache_invalidate_one, regcache_invalidate): New
10836 functions.
10837 (new_register_cache): Renamed from create_register_cache.
10838 Return the new regcache.
10839 (free_register_cache): Change argument to a void *.
10840 (registers_to_string, registers_from_string): Call get_regcache
10841 with fetch flag set.
10842 (register_data): Make static. Pass fetch flag to get_regcache.
10843 (supply_register): Call get_regcache with fetch flag clear.
10844 (collect_register): Call get_regcache with fetch flag set.
10845 (collect_register_as_string): New function.
10846 * regcache.h: Update.
10847 * remote-utils.c (putpkt): Flush after debug output and use
10848 stderr.
10849 Handle input interrupts while waiting for an ACK.
10850 (input_interrupt): Use signal_pid method.
10851 (getpkt): Flush after debug output and use stderr.
10852 (outreg): Use collect_register_as_string.
10853 (new_thread_notify, dead_thread_notify): New functions.
10854 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10855 and general_thread.
10856 (look_up_one_symbol): Flush after debug output.
10857 * server.c (step_thread, server_waiting): New variables.
10858 (start_inferior): Don't use signal_pid. Update call to mywait.
10859 (attach_inferior): Update call to mywait.
10860 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10861 (main): Don't fetch/store registers explicitly. Use
10862 set_desired_inferior. Support proposed ``Hs'' packet. Update
10863 calls to mywait.
10864 * server.h: Update.
10865 (struct inferior_list, struct_inferior_list_entry): New.
10866 * target.c (set_desired_inferior): New.
10867 (write_inferior_memory): Constify.
10868 (mywait): New function.
10869 * target.h: Update.
10870 (struct target_ops): New signal_pid method.
10871 (mywait): Removed macro, added prototype.
10872
10873 * linux-low.h (regset_func): Removed.
10874 (regset_fill_func, regset_store_func): New.
10875 (enum regset_type): New.
10876 (struct regset_info): Add type field. Use new operation types.
10877 (struct linux_target_ops): stop_pc renamed to get_pc.
10878 Add decr_pc_after_break and breakpoint_at.
10879 (get_process, get_thread_proess, get_process_thread)
10880 (strut process_info, all_processes, linux_attach_lwp)
10881 (thread_db_init): New.
10882
10883 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10884 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10885 (the_low_target): Add new members.
10886 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10887 (i386_store_fpxregset): Constify.
10888 (target_regsets): Add new kind identifier.
10889 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10890 (i386_set_pc): Add debugging.
10891 (i386_breakpoint_at): New function.
10892 (the_low_target): Add new members.
10893 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10894 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10895 (mips_breakpoint_at): New.
10896 (the_low_target): Add new members.
10897 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10898 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10899 (the_low_target): Add new members.
10900 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10901 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10902 (the_low_target): Add new members.
10903 * linux-x86-64-low.c (target_regsets): Add new kind
10904 identifier.
10905
10906 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10907
10908 From Martin Pool <mbp@samba.org>:
10909 * server.c (gdbserver_usage): New function.
10910 (main): Call it.
10911
10912 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10913
10914 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10915 stop_at -> stop_pc.
10916
10917 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10918
10919 * Makefile.in: Remove obsolete code.
10920
10921 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10922
10923 * linux-low.c (regsets_fetch_inferior_registers),
10924 (regsets_store_inferior_registers): Removed cast to int from
10925 ptrace() calls.
10926 * regcache.h: Added declaration of struct inferior_info.
10927
10928 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10929
10930 * inferiors.c (struct inferior_info): Add regcache_data.
10931 (add_inferior): Call create_register_cache.
10932 (clear_inferiors): Call free_register_cache.
10933 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10934 * regcache.c (struct inferior_regcache_data): New.
10935 (registers): Remove.
10936 (get_regcache): New function.
10937 (create_register_cache, free_register_cache): New functions.
10938 (set_register_cache): Don't initialize the register cache here.
10939 (registers_to_string, registers_from_string, register_data): Call
10940 get_regcache.
10941 * regcache.h: Add prototypes.
10942 * server.h: Likewise.
10943
10944 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10945
10946 * mem-break.c: New file.
10947 * mem-break.h: New file.
10948 * Makefile.in: Add mem-break.o rule; update server.h
10949 dependencies.
10950 * inferiors.c (struct inferior_info): Add target_data
10951 member.
10952 (clear_inferiors): Free target_data member if set.
10953 (inferior_target_data, set_inferior_target_data): New functions.
10954 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10955 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10956 * linux-low.c (linux_bp_reinsert): New variable.
10957 (struct inferior_linux_data): New.
10958 (linux_create_inferior): Use set_inferior_target_data.
10959 (linux_attach): Likewise. Call add_inferior.
10960 (linux_wait_for_one_inferior): New function.
10961 (linux_wait): Call it.
10962 (linux_write_memory): Add const.
10963 (initialize_low): Call set_breakpoint_data.
10964 * linux-low.h (struct linux_target_ops): Add breakpoint
10965 handling members.
10966 * server.c (attach_inferior): Remove extra add_inferior
10967 call.
10968 * server.h: Include mem-break.h. Update inferior.c
10969 prototypes.
10970 * target.c (read_inferior_memory)
10971 (write_inferior_memory): New functions.
10972 * target.h (read_inferior_memory)
10973 (write_inferior_memory): Change macros to prototypes.
10974 (struct target_ops): Update comments. Add const to write_memory
10975 definition.
10976
10977 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10978
10979 * linux-low.c (usr_store_inferior_registers): Support
10980 registers which are allowed to fail to store.
10981 * linux-low.h (linux_target_ops): Likewise.
10982 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10983 (ppc_cannot_store_register): FPSCR may not be storable.
10984
10985 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10986
10987 * server.h: Include <string.h> if HAVE_STRING_H.
10988 * ChangeLog: Correct paths in last ChangeLog entry.
10989
10990 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10991
10992 * linux-low.h: Remove obsolete prototypes.
10993 (struct linux_target_ops): New.
10994 (extern the_low_target): New.
10995 * linux-low.c (num_regs, regmap): Remove declarations.
10996 (register_addr): Use the_low_target explicitly.
10997 (fetch_register): Likewise.
10998 (usr_fetch_inferior_registers): Likewise.
10999 (usr_store_inferior_registers): Likewise.
11000 * linux-arm-low.c (num_regs): Remove.
11001 (arm_num_regs): Define.
11002 (arm_regmap): Renamed from regmap, made static.
11003 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11004 made static.
11005 (arm_cannot_store_register): Renamed from cannot_store_register,
11006 made static.
11007 (the_low_target): New.
11008 * linux-i386-low.c (num_regs): Remove.
11009 (i386_num_regs): Define.
11010 (i386_regmap): Renamed from regmap, made static.
11011 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11012 made static.
11013 (i386_cannot_store_register): Renamed from cannot_store_register,
11014 made static.
11015 (the_low_target): New.
11016 * linux-ia64-low.c (num_regs): Remove.
11017 (ia64_num_regs): Define.
11018 (ia64_regmap): Renamed from regmap, made static.
11019 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11020 made static.
11021 (ia64_cannot_store_register): Renamed from cannot_store_register,
11022 made static.
11023 (the_low_target): New.
11024 * linux-m68k-low.c (num_regs): Remove.
11025 (m68k_num_regs): Define.
11026 (m68k_regmap): Renamed from regmap, made static.
11027 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11028 made static.
11029 (m68k_cannot_store_register): Renamed from cannot_store_register,
11030 made static.
11031 (the_low_target): New.
11032 * linux-mips-low.c (num_regs): Remove.
11033 (mips_num_regs): Define.
11034 (mips_regmap): Renamed from regmap, made static.
11035 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11036 made static.
11037 (mips_cannot_store_register): Renamed from cannot_store_register,
11038 made static.
11039 (the_low_target): New.
11040 * linux-ppc-low.c (num_regs): Remove.
11041 (ppc_num_regs): Define.
11042 (ppc_regmap): Renamed from regmap, made static.
11043 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11044 made static.
11045 (ppc_cannot_store_register): Renamed from cannot_store_register,
11046 made static.
11047 (the_low_target): New.
11048 * linux-s390-low.c (num_regs): Remove.
11049 (s390_num_regs): Define.
11050 (s390_regmap): Renamed from regmap, made static.
11051 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11052 made static.
11053 (s390_cannot_store_register): Renamed from cannot_store_register,
11054 made static.
11055 (the_low_target): New.
11056 * linux-sh-low.c (num_regs): Remove.
11057 (sh_num_regs): Define.
11058 (sh_regmap): Renamed from regmap, made static.
11059 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11060 made static.
11061 (sh_cannot_store_register): Renamed from cannot_store_register,
11062 made static.
11063 (the_low_target): New.
11064 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11065 (the_low_target): New.
11066
11067 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11068
11069 * Makefile.in: Add stamp-h target.
11070 * configure.in: Create stamp-h.
11071 * configure: Regenerated.
11072
11073 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11074
11075 * inferiors.c: New file.
11076 * target.c: New file.
11077 * target.h: New file.
11078 * Makefile.in: Add target.o and inferiors.o. Update
11079 dependencies.
11080 * linux-low.c (inferior_pid): New static variable,
11081 moved from server.c.
11082 (linux_create_inferior): Renamed from create_inferior.
11083 Call add_inferior. Return 0 on success instead of a PID.
11084 (linux_attach): Renamed from myattach.
11085 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11086 (linux_thread_alive): Renamed from mythread_alive.
11087 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11088 child dies.
11089 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11090 (regsets_store_inferior_registers): Correct error message.
11091 Add missing ``return 0''.
11092 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11093 (linux_store_registers): Renamed from store_inferior_registers.
11094 (linux_read_memory): Renamed from read_inferior_memory.
11095 (linux_write_memory): Renamed from write_inferior_memory.
11096 (linux_target_ops): New structure.
11097 (initialize_low): Call set_target_ops ().
11098 * remote-utils.c (unhexify): New function.
11099 (hexify): New function.
11100 (input_interrupt): Send signals to ``signal_pid''.
11101 * server.c (inferior_pid): Remove.
11102 (start_inferior): Update create_inferior call.
11103 (attach_inferior): Call add_inferior.
11104 (handle_query): New function.
11105 (main): Call handle_query for `q' packets.
11106 * server.h: Include "target.h". Remove obsolete prototypes.
11107 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11108
11109 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11110
11111 * Makefile.in: Add WARN_CFLAGS. Update configury
11112 dependencies.
11113 * configure.in: Check for <string.h>
11114 * configure: Regenerate.
11115 * config.in: Regenerate.
11116 * gdbreplay.c: Include needed system headers.
11117 (remote_open): Remove strchr prototype.
11118 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11119 * regcache.c (supply_register): Change buf argument to const void *.
11120 (supply_register_by_name): Likewise.
11121 (collect_register): Change buf argument to void *.
11122 (collect_register_by_name): Likewise.
11123 * regcache.h: Add missing prototypes.
11124 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11125 * server.c (handle_query): New function.
11126 (attached): New static variable, moved out of main.
11127 (main): Quiet longjmp clobber warnings.
11128 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11129 * utils.c (error): Remove NORETURN.
11130 (fatal): Likewise.
This page took 0.294649 seconds and 4 git commands to generate.